agentv 5.3.1-next.1 → 5.3.3

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.
Files changed (66) hide show
  1. package/README.md +52 -44
  2. package/dist/{artifact-writer-7NBCOAYC.js → artifact-writer-KJEOROKQ.js} +5 -5
  3. package/dist/{chunk-ELCJ23K4.js → chunk-6262OKXM.js} +2856 -2404
  4. package/dist/chunk-6262OKXM.js.map +1 -0
  5. package/dist/{chunk-LKGARI3W.js → chunk-6RFRY7X2.js} +812 -570
  6. package/dist/chunk-6RFRY7X2.js.map +1 -0
  7. package/dist/chunk-AQ5BIAXF.js +604 -0
  8. package/dist/chunk-AQ5BIAXF.js.map +1 -0
  9. package/dist/chunk-BV5VQLI2.js +2 -0
  10. package/dist/{chunk-LXBI3SPX.js → chunk-JGSRUJZQ.js} +46 -20
  11. package/dist/chunk-JGSRUJZQ.js.map +1 -0
  12. package/dist/chunk-MMDLXYBX.js +721 -0
  13. package/dist/chunk-MMDLXYBX.js.map +1 -0
  14. package/dist/chunk-TEEXVJWM.js +2 -0
  15. package/dist/{chunk-RKE7SSET.js → chunk-WIAJ7JAV.js} +186 -64
  16. package/dist/chunk-WIAJ7JAV.js.map +1 -0
  17. package/dist/cli.d.ts +1 -0
  18. package/dist/cli.js +17517 -10
  19. package/dist/cli.js.map +1 -1
  20. package/dist/config.d.ts +2 -0
  21. package/dist/config.js +14 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/contracts-DsZmZLl8.d.ts +742 -0
  24. package/dist/contracts.d.ts +2 -0
  25. package/dist/contracts.js +28 -0
  26. package/dist/contracts.js.map +1 -0
  27. package/dist/dashboard/assets/{index-CbEMiJSb.js → index-BfqOlLOF.js} +1 -1
  28. package/dist/dashboard/assets/index-Bh8lpGce.css +1 -0
  29. package/dist/dashboard/assets/index-oPR3ywQb.js +121 -0
  30. package/dist/dashboard/index.html +2 -2
  31. package/dist/{dist-NMXMI5SK.js → dist-A3SGR7TW.js} +16 -16
  32. package/dist/dist-A3SGR7TW.js.map +1 -0
  33. package/dist/index.d.ts +4 -0
  34. package/dist/index.js +137 -18
  35. package/dist/{interactive-BN527UV3.js → interactive-WPQJDJKZ.js} +24 -24
  36. package/dist/interactive-WPQJDJKZ.js.map +1 -0
  37. package/dist/provider.d.ts +2 -0
  38. package/dist/provider.js +24 -0
  39. package/dist/provider.js.map +1 -0
  40. package/dist/sdk.d.ts +802 -0
  41. package/dist/sdk.js +145 -0
  42. package/dist/sdk.js.map +1 -0
  43. package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +17 -18
  44. package/dist/skills/agentv-eval-writer/SKILL.md +27 -15
  45. package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +5 -5
  46. package/dist/skills/agentv-eval-writer/references/eval.schema.json +5402 -4639
  47. package/dist/skills/agentv-eval-writer/references/python-helpers.md +2 -2
  48. package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +19 -2
  49. package/dist/templates/.agentv/providers.yaml +42 -0
  50. package/dist/templates/.env.example +2 -2
  51. package/dist/{ts-eval-loader-2RFVZHCT-7CZ3DCDD.js → ts-eval-loader-3G5GEAEC-6F52JLPP.js} +3 -3
  52. package/dist/ts-eval-loader-3G5GEAEC-6F52JLPP.js.map +1 -0
  53. package/package.json +29 -4
  54. package/dist/chunk-ASIGJIOJ.js +0 -17993
  55. package/dist/chunk-ASIGJIOJ.js.map +0 -1
  56. package/dist/chunk-ELCJ23K4.js.map +0 -1
  57. package/dist/chunk-LKGARI3W.js.map +0 -1
  58. package/dist/chunk-LXBI3SPX.js.map +0 -1
  59. package/dist/chunk-RKE7SSET.js.map +0 -1
  60. package/dist/dashboard/assets/index-DTA6-l7q.js +0 -121
  61. package/dist/dashboard/assets/index-D_bokML8.css +0 -1
  62. package/dist/interactive-BN527UV3.js.map +0 -1
  63. package/dist/templates/.agentv/targets.yaml +0 -97
  64. /package/dist/{artifact-writer-7NBCOAYC.js.map → artifact-writer-KJEOROKQ.js.map} +0 -0
  65. /package/dist/{dist-NMXMI5SK.js.map → chunk-BV5VQLI2.js.map} +0 -0
  66. /package/dist/{ts-eval-loader-2RFVZHCT-7CZ3DCDD.js.map → chunk-TEEXVJWM.js.map} +0 -0
@@ -0,0 +1,121 @@
1
+ var WI=Object.defineProperty;var mO=e=>{throw TypeError(e)};var ZI=(e,t,r)=>t in e?WI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var g0=(e,t,r)=>ZI(e,typeof t!="symbol"?t+"":t,r),y0=(e,t,r)=>t.has(e)||mO("Cannot "+r);var q=(e,t,r)=>(y0(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>t.has(e)?mO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(y0(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(y0(e,t,"access private method"),r);var nh=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return q(e,t,n)}});function JI(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 v0={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 pO;function ez(){if(pO)return ac;pO=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 d in i)d!=="key"&&(o[d]=i[d])}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 gO;function tz(){return gO||(gO=1,v0.exports=ez()),v0.exports}var c=tz(),x0={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 yO;function rz(){if(yO)return Oe;yO=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"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function _(L,X,le){this.props=L,this.context=X,this.refs=N,this.updater=le||b}_.prototype.isReactComponent={},_.prototype.setState=function(L,X){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,X,"setState")},_.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function E(){}E.prototype=_.prototype;function C(L,X,le){this.props=L,this.context=X,this.refs=N,this.updater=le||b}var A=C.prototype=new E;A.constructor=C,w(A,_.prototype),A.isPureReactComponent=!0;var T=Array.isArray;function M(){}var D={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function z(L,X,le){var ue=le.ref;return{$$typeof:e,type:L,key:X,ref:ue!==void 0?ue:null,props:le}}function k(L,X){return z(L.type,X,L.props)}function H(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function U(L){var X={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(le){return X[le]})}var ae=/\/+/g;function Z(L,X){return typeof L=="object"&&L!==null&&L.key!=null?U(""+L.key):X.toString(36)}function G(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(X){L.status==="pending"&&(L.status="fulfilled",L.value=X)},function(X){L.status==="pending"&&(L.status="rejected",L.reason=X)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function $(L,X,le,ue,pe){var xe=typeof L;(xe==="undefined"||xe==="boolean")&&(L=null);var we=!1;if(L===null)we=!0;else switch(xe){case"bigint":case"string":case"number":we=!0;break;case"object":switch(L.$$typeof){case e:case t:we=!0;break;case p:return we=L._init,$(we(L._payload),X,le,ue,pe)}}if(we)return pe=pe(L),we=ue===""?"."+Z(L,0):ue,T(pe)?(le="",we!=null&&(le=we.replace(ae,"$&/")+"/"),$(pe,X,le,"",function(te){return te})):pe!=null&&(H(pe)&&(pe=k(pe,le+(pe.key==null||L&&L.key===pe.key?"":(""+pe.key).replace(ae,"$&/")+"/")+we)),X.push(pe)),1;we=0;var _e=ue===""?".":ue+":";if(T(L))for(var de=0;de<L.length;de++)ue=L[de],xe=_e+Z(ue,de),we+=$(ue,X,le,xe,pe);else if(de=x(L),typeof de=="function")for(L=de.call(L),de=0;!(ue=L.next()).done;)ue=ue.value,xe=_e+Z(ue,de++),we+=$(ue,X,le,xe,pe);else if(xe==="object"){if(typeof L.then=="function")return $(G(L),X,le,ue,pe);throw X=String(L),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return we}function F(L,X,le){if(L==null)return L;var ue=[],pe=0;return $(L,ue,"","",function(xe){return X.call(le,xe,pe++)}),ue}function J(L){if(L._status===-1){var X=L._result;X=X(),X.then(function(le){(L._status===0||L._status===-1)&&(L._status=1,L._result=le)},function(le){(L._status===0||L._status===-1)&&(L._status=2,L._result=le)}),L._status===-1&&(L._status=0,L._result=X)}if(L._status===1)return L._result.default;throw L._result}var re=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},oe={map:F,forEach:function(L,X,le){F(L,function(){X.apply(this,arguments)},le)},count:function(L){var X=0;return F(L,function(){X++}),X},toArray:function(L){return F(L,function(X){return X})||[]},only:function(L){if(!H(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Oe.Activity=g,Oe.Children=oe,Oe.Component=_,Oe.Fragment=r,Oe.Profiler=i,Oe.PureComponent=C,Oe.StrictMode=n,Oe.Suspense=f,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(L){return D.H.useMemoCache(L)}},Oe.cache=function(L){return function(){return L.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(L,X,le){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ue=w({},L.props),pe=L.key;if(X!=null)for(xe in X.key!==void 0&&(pe=""+X.key),X)!R.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(L.type,pe,ue)},Oe.createContext=function(L){return L={$$typeof:l,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Oe.createElement=function(L,X,le){var ue,pe={},xe=null;if(X!=null)for(ue in X.key!==void 0&&(xe=""+X.key),X)R.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(L&&L.defaultProps)for(ue in we=L.defaultProps,we)pe[ue]===void 0&&(pe[ue]=we[ue]);return z(L,xe,pe)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(L){return{$$typeof:d,render:L}},Oe.isValidElement=H,Oe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:J}},Oe.memo=function(L,X){return{$$typeof:h,type:L,compare:X===void 0?null:X}},Oe.startTransition=function(L){var X=D.T,le={};D.T=le;try{var ue=L(),pe=D.S;pe!==null&&pe(le,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(M,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(L){return D.H.use(L)},Oe.useActionState=function(L,X,le){return D.H.useActionState(L,X,le)},Oe.useCallback=function(L,X){return D.H.useCallback(L,X)},Oe.useContext=function(L){return D.H.useContext(L)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(L,X){return D.H.useDeferredValue(L,X)},Oe.useEffect=function(L,X){return D.H.useEffect(L,X)},Oe.useEffectEvent=function(L){return D.H.useEffectEvent(L)},Oe.useId=function(){return D.H.useId()},Oe.useImperativeHandle=function(L,X,le){return D.H.useImperativeHandle(L,X,le)},Oe.useInsertionEffect=function(L,X){return D.H.useInsertionEffect(L,X)},Oe.useLayoutEffect=function(L,X){return D.H.useLayoutEffect(L,X)},Oe.useMemo=function(L,X){return D.H.useMemo(L,X)},Oe.useOptimistic=function(L,X){return D.H.useOptimistic(L,X)},Oe.useReducer=function(L,X,le){return D.H.useReducer(L,X,le)},Oe.useRef=function(L){return D.H.useRef(L)},Oe.useState=function(L){return D.H.useState(L)},Oe.useSyncExternalStore=function(L,X,le){return D.H.useSyncExternalStore(L,X,le)},Oe.useTransition=function(){return D.H.useTransition()},Oe.version="19.2.4",Oe}var vO;function tu(){return vO||(vO=1,x0.exports=rz()),x0.exports}var S=tu();const Ul=rs(S),nz=JI({__proto__:null,default:Ul},[S]);var b0={exports:{}},ic={},j0={exports:{}},w0={};/**
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 xO;function az(){return xO||(xO=1,(function(e){function t($,F){var J=$.length;$.push(F);e:for(;0<J;){var re=J-1>>>1,oe=$[re];if(0<i(oe,F))$[re]=F,$[J]=oe,J=re;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var F=$[0],J=$.pop();if(J!==F){$[0]=J;e:for(var re=0,oe=$.length,L=oe>>>1;re<L;){var X=2*(re+1)-1,le=$[X],ue=X+1,pe=$[ue];if(0>i(le,J))ue<oe&&0>i(pe,le)?($[re]=pe,$[ue]=J,re=ue):($[re]=le,$[X]=J,re=X);else if(ue<oe&&0>i(pe,J))$[re]=pe,$[ue]=J,re=ue;else break e}}return F}function i($,F){var J=$.sortIndex-F.sortIndex;return J!==0?J:$.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,d=l.now();e.unstable_now=function(){return l.now()-d}}var f=[],h=[],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,C=typeof setImmediate<"u"?setImmediate:null;function A($){for(var F=r(h);F!==null;){if(F.callback===null)n(h);else if(F.startTime<=$)n(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=r(h)}}function T($){if(w=!1,A($),!b)if(r(f)!==null)b=!0,M||(M=!0,U());else{var F=r(h);F!==null&&G(T,F.startTime-$)}}var M=!1,D=-1,R=5,z=-1;function k(){return N?!0:!(e.unstable_now()-z<R)}function H(){if(N=!1,M){var $=e.unstable_now();z=$;var F=!0;try{e:{b=!1,w&&(w=!1,E(D),D=-1),x=!0;var J=y;try{t:{for(A($),g=r(f);g!==null&&!(g.expirationTime>$&&k());){var re=g.callback;if(typeof re=="function"){g.callback=null,y=g.priorityLevel;var oe=re(g.expirationTime<=$);if($=e.unstable_now(),typeof oe=="function"){g.callback=oe,A($),F=!0;break t}g===r(f)&&n(f),A($)}else n(f);g=r(f)}if(g!==null)F=!0;else{var L=r(h);L!==null&&G(T,L.startTime-$),F=!1}}break e}finally{g=null,y=J,x=!1}F=void 0}}finally{F?U():M=!1}}}var U;if(typeof C=="function")U=function(){C(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($,F){D=_(function(){$(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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function($){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var J=y;y=F;try{return $()}finally{y=J}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function($,F){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var J=y;y=$;try{return F()}finally{y=J}},e.unstable_scheduleCallback=function($,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,$){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,$={id:p++,callback:F,priorityLevel:$,startTime:J,expirationTime:oe,sortIndex:-1},J>re?($.sortIndex=J,t(h,$),r(f)===null&&$===r(h)&&(w?(E(D),D=-1):w=!0,G(T,J-re))):($.sortIndex=oe,t(f,$),b||x||(b=!0,M||(M=!0,U()))),$},e.unstable_shouldYield=k,e.unstable_wrapCallback=function($){var F=y;return function(){var J=y;y=F;try{return $.apply(this,arguments)}finally{y=J}}}})(w0)),w0}var bO;function iz(){return bO||(bO=1,j0.exports=az()),j0.exports}var S0={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 jO;function sz(){if(jO)return pr;jO=1;var e=tu();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" 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(f,h,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:g==null?null:""+g,children:f,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return pr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,pr.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,p)},pr.flushSync=function(f){var h=l.T,p=n.p;try{if(l.T=null,n.p=2,f)return f()}finally{l.T=h,n.p=p,n.d.f()}},pr.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(f,h))},pr.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},pr.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,g=d(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?n.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:x}):p==="script"&&n.d.X(f,{crossOrigin:g,integrity:y,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},pr.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=d(h.as,h.crossOrigin);n.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(f)},pr.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,g=d(p,h.crossOrigin);n.d.L(f,p,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},pr.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=d(h.as,h.crossOrigin);n.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(f)},pr.requestFormReset=function(f){n.d.r(f)},pr.unstable_batchedUpdates=function(f,h){return f(h)},pr.useFormState=function(f,h,p){return l.H.useFormState(f,h,p)},pr.useFormStatus=function(){return l.H.useHostTransitionStatus()},pr.version="19.2.4",pr}var wO;function U2(){if(wO)return S0.exports;wO=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(),S0.exports=sz(),S0.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 SO;function oz(){if(SO)return ic;SO=1;var e=iz(),t=tu(),r=U2();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 d(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 f(a){if(o(a)!==a)throw Error(n(188))}function h(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 f(v),a;if(j===m)return f(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"),C=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),R=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 T:return"Suspense";case M:return"SuspenseList";case z:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case C: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 R:s=a._payload,a=a._init;try{return Z(a(s))}catch{}}return null}var G=Array.isArray,$=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 L(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=L(null),pe=L(null),xe=L(null),we=L(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)?L_(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=L_(s),a=I_(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=I_(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 Re(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 Ct(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:"")?Re(u):""}function hr(a,s){switch(a.tag){case 26:case 27:case 5:return Re(a.type);case 16:return Re("Lazy");case 13:return a.child!==s&&s!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return Ct(a.type,!1);case 11:return Ct(a.type.render,!1);case 1:return Ct(a.type,!0);case 31:return Re("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,ng=e.unstable_shouldYield,Ld=e.unstable_requestPaint,Te=e.unstable_now,mr=e.unstable_getCurrentPriorityLevel,Kn=e.unstable_ImmediatePriority,Id=e.unstable_UserBlockingPriority,zd=e.unstable_NormalPriority,M$=e.unstable_LowPriority,y1=e.unstable_IdlePriority,R$=e.log,D$=e.unstable_setDisableYieldValue,fu=null,Kr=null;function ri(a){if(typeof R$=="function"&&D$(a),Kr&&typeof Kr.setStrictMode=="function")try{Kr.setStrictMode(fu,a)}catch{}}var Gr=Math.clz32?Math.clz32:L$,k$=Math.log,$$=Math.LN2;function L$(a){return a>>>=0,a===0?32:31-(k$(a)/$$|0)|0}var Bd=256,Ud=262144,qd=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 Fd(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 I$(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 v1(){var a=qd;return qd<<=1,(qd&62914560)===0&&(qd=4194304),a}function ag(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 z$(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-Gr(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&&x1(a,m,0),j!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=j&~(O&~s))}function x1(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-Gr(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function b1(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-Gr(u),v=1<<m;v&s|a[m]&s&&(a[m]|=s),u&=~v}}function j1(a,s){var u=s&-s;return u=(u&42)!==0?1:ig(u),(u&(a.suspendedLanes|s))!==0?0:u}function ig(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 sg(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function w1(){var a=F.p;return a!==0?a:(a=window.event,a===void 0?32:oO(a.type))}function S1(a,s){var u=F.p;try{return F.p=a,s()}finally{F.p=u}}var ni=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ni,Tr="__reactProps$"+ni,_o="__reactContainer$"+ni,og="__reactEvents$"+ni,B$="__reactListeners$"+ni,U$="__reactHandles$"+ni,N1="__reactResources$"+ni,pu="__reactMarker$"+ni;function lg(a){delete a[Zt],delete a[Tr],delete a[og],delete a[B$],delete a[U$]}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=K_(a);a!==null;){if(u=a[Zt])return u;a=K_(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[N1];return s||(s=a[N1]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qt(a){a[pu]=!0}var _1=new Set,O1={};function ss(a,s){Co(a,s),Co(a+"Capture",s)}function Co(a,s){for(O1[a]=s,a=0;a<s.length;a++)_1.add(s[a])}var q$=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]*$"),E1={},A1={};function F$(a){return Pn.call(A1,a)?!0:Pn.call(E1,a)?!1:q$.test(a)?A1[a]=!0:(E1[a]=!0,!1)}function Hd(a,s,u){if(F$(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 Kd(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 C1(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function H$(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 ug(a){if(!a._valueTracker){var s=C1(a)?"checked":"value";a._valueTracker=H$(a,s,""+a[s])}}function T1(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=C1(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function Gd(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 K$=/[\n"\\]/g;function cn(a){return a.replace(K$,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function cg(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?dg(a,O,un(s)):u!=null?dg(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 P1(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)){ug(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),ug(a)}function dg(a,s,u){s==="number"&&Gd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function To(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 M1(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 R1(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),ug(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 G$=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function D1(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||G$.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function k1(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&&D1(a,v,m)}else for(var j in s)s.hasOwnProperty(j)&&D1(a,j,s[j])}function fg(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 Y$=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"]]),V$=/^[\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 Yd(a){return V$.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ga(){}var hg=null;function mg(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Mo=null,Ro=null;function $1(a){var s=Eo(a);if(s&&(a=s.stateNode)){var u=a[Tr]||null;e:switch(a=s.stateNode,s.type){case"input":if(cg(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[Tr]||null;if(!v)throw Error(n(90));cg(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&&T1(m)}break e;case"textarea":M1(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&To(a,!!u.multiple,s,!1)}}}var pg=!1;function L1(a,s,u){if(pg)return a(s,u);pg=!0;try{var m=a(s);return m}finally{if(pg=!1,(Mo!==null||Ro!==null)&&(kf(),Mo&&(s=Mo,a=Ro,Ro=Mo=null,$1(s),a)))for(s=0;s<a.length;s++)$1(a[s])}}function yu(a,s){var u=a.stateNode;if(u===null)return null;var m=u[Tr]||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"),gg=!1;if(ya)try{var vu={};Object.defineProperty(vu,"passive",{get:function(){gg=!0}}),window.addEventListener("test",vu,vu),window.removeEventListener("test",vu,vu)}catch{gg=!1}var ai=null,yg=null,Vd=null;function I1(){if(Vd)return Vd;var a,s=yg,u=s.length,m,v="value"in ai?ai.value:ai.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 Vd=v.slice(a,1<m?1-m:void 0)}function Qd(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 Xd(){return!0}function z1(){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)?Xd:z1,this.isPropagationStopped=z1,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=Xd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Xd)},persist:function(){},isPersistent:Xd}),s}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wd=Pr(os),xu=g({},os,{view:0,detail:0}),Q$=Pr(xu),vg,xg,bu,Zd=g({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jg,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"?(vg=a.screenX-bu.screenX,xg=a.screenY-bu.screenY):xg=vg=0,bu=a),vg)},movementY:function(a){return"movementY"in a?a.movementY:xg}}),B1=Pr(Zd),X$=g({},Zd,{dataTransfer:0}),W$=Pr(X$),Z$=g({},xu,{relatedTarget:0}),bg=Pr(Z$),J$=g({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),eL=Pr(J$),tL=g({},os,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),rL=Pr(tL),nL=g({},os,{data:0}),U1=Pr(nL),aL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iL={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"},sL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oL(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=sL[a])?!!s[a]:!1}function jg(){return oL}var lL=g({},xu,{key:function(a){if(a.key){var s=aL[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Qd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?iL[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jg,charCode:function(a){return a.type==="keypress"?Qd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Qd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),uL=Pr(lL),cL=g({},Zd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),q1=Pr(cL),dL=g({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jg}),fL=Pr(dL),hL=g({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),mL=Pr(hL),pL=g({},Zd,{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}),gL=Pr(pL),yL=g({},os,{newState:0,oldState:0}),vL=Pr(yL),xL=[9,13,27,32],wg=ya&&"CompositionEvent"in window,ju=null;ya&&"documentMode"in document&&(ju=document.documentMode);var bL=ya&&"TextEvent"in window&&!ju,F1=ya&&(!wg||ju&&8<ju&&11>=ju),H1=" ",K1=!1;function G1(a,s){switch(a){case"keyup":return xL.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y1(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Do=!1;function jL(a,s){switch(a){case"compositionend":return Y1(s);case"keypress":return s.which!==32?null:(K1=!0,H1);case"textInput":return a=s.data,a===H1&&K1?null:a;default:return null}}function wL(a,s){if(Do)return a==="compositionend"||!wg&&G1(a,s)?(a=I1(),Vd=yg=ai=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 F1&&s.locale!=="ko"?null:s.data;default:return null}}var SL={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 V1(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!SL[a.type]:s==="textarea"}function Q1(a,s,u,m){Mo?Ro?Ro.push(m):Ro=[m]:Mo=m,s=qf(s,"onChange"),0<s.length&&(u=new Wd("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var wu=null,Su=null;function NL(a){P_(a,0)}function Jd(a){var s=gu(a);if(T1(s))return a}function X1(a,s){if(a==="change")return s}var W1=!1;if(ya){var Sg;if(ya){var Ng="oninput"in document;if(!Ng){var Z1=document.createElement("div");Z1.setAttribute("oninput","return;"),Ng=typeof Z1.oninput=="function"}Sg=Ng}else Sg=!1;W1=Sg&&(!document.documentMode||9<document.documentMode)}function J1(){wu&&(wu.detachEvent("onpropertychange",eS),Su=wu=null)}function eS(a){if(a.propertyName==="value"&&Jd(Su)){var s=[];Q1(s,Su,a,mg(a)),L1(NL,s)}}function _L(a,s,u){a==="focusin"?(J1(),wu=s,Su=u,wu.attachEvent("onpropertychange",eS)):a==="focusout"&&J1()}function OL(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Jd(Su)}function EL(a,s){if(a==="click")return Jd(s)}function AL(a,s){if(a==="input"||a==="change")return Jd(s)}function CL(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Yr=typeof Object.is=="function"?Object.is:CL;function Nu(a,s){if(Yr(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)||!Yr(a[v],s[v]))return!1}return!0}function tS(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function rS(a,s){var u=tS(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=tS(u)}}function nS(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?nS(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function aS(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Gd(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=Gd(a.document)}return s}function _g(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 TL=ya&&"documentMode"in document&&11>=document.documentMode,ko=null,Og=null,_u=null,Eg=!1;function iS(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Eg||ko==null||ko!==Gd(m)||(m=ko,"selectionStart"in m&&_g(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=qf(Og,"onSelect"),0<m.length&&(s=new Wd("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 $o={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")},Ag={},sS={};ya&&(sS=document.createElement("div").style,"AnimationEvent"in window||(delete $o.animationend.animation,delete $o.animationiteration.animation,delete $o.animationstart.animation),"TransitionEvent"in window||delete $o.transitionend.transition);function us(a){if(Ag[a])return Ag[a];if(!$o[a])return a;var s=$o[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in sS)return Ag[a]=s[u];return a}var oS=us("animationend"),lS=us("animationiteration"),uS=us("animationstart"),PL=us("transitionrun"),ML=us("transitionstart"),RL=us("transitioncancel"),cS=us("transitionend"),dS=new Map,Cg="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(" ");Cg.push("scrollEnd");function Mn(a,s){dS.set(a,s),ss(s,[a])}var ef=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=[],Lo=0,Tg=0;function tf(){for(var a=Lo,s=Tg=Lo=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&&fS(u,v,j)}}function rf(a,s,u,m){dn[Lo++]=a,dn[Lo++]=s,dn[Lo++]=u,dn[Lo++]=m,Tg|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function Pg(a,s,u,m){return rf(a,s,u,m),nf(a)}function cs(a,s){return rf(a,null,null,s),nf(a)}function fS(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-Gr(u),a=j.hiddenUpdates,m=a[v],m===null?a[v]=[s]:m.push(s),s.lane=u|536870912),j):null}function nf(a){if(50<Yu)throw Yu=0,By=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 DL(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 Vr(a,s,u,m){return new DL(a,s,u,m)}function Mg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function va(a,s){var u=a.alternate;return u===null?(u=Vr(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 hS(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 af(a,s,u,m,v,j){var O=0;if(m=a,typeof a=="function")Mg(a)&&(O=1);else if(typeof a=="string")O=zI(a,u,ue.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case z:return a=Vr(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=Vr(12,u,s,v|2),a.elementType=_,a.lanes=j,a;case T:return a=Vr(13,u,s,v),a.elementType=T,a.lanes=j,a;case M:return a=Vr(19,u,s,v),a.elementType=M,a.lanes=j,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case C:O=10;break e;case E:O=9;break e;case A:O=11;break e;case D:O=14;break e;case R:O=16,m=null;break e}O=29,u=Error(n(130,a===null?"null":typeof a,"")),m=null}return s=Vr(O,u,s,v),s.elementType=a,s.type=m,s.lanes=j,s}function ds(a,s,u,m){return a=Vr(7,a,m,s),a.lanes=u,a}function Rg(a,s,u){return a=Vr(6,a,null,s),a.lanes=u,a}function mS(a){var s=Vr(18,null,null,0);return s.stateNode=a,s}function Dg(a,s,u){return s=Vr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var pS=new WeakMap;function fn(a,s){if(typeof a=="object"&&a!==null){var u=pS.get(a);return u!==void 0?u:(s={value:a,source:s,stack:ma(s)},pS.set(a,s),s)}return{value:a,source:s,stack:ma(s)}}var zo=[],Bo=0,sf=null,Ou=0,hn=[],mn=0,ii=null,Gn=1,Yn="";function xa(a,s){zo[Bo++]=Ou,zo[Bo++]=sf,sf=a,Ou=s}function gS(a,s,u){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=ii,ii=a;var m=Gn;a=Yn;var v=32-Gr(m)-1;m&=~(1<<v),u+=1;var j=32-Gr(s)+v;if(30<j){var O=v-v%5;j=(m&(1<<O)-1).toString(32),m>>=O,v-=O,Gn=1<<32-Gr(s)+v|u<<v|m,Yn=j+a}else Gn=1<<j|u<<v|m,Yn=a}function kg(a){a.return!==null&&(xa(a,1),gS(a,1,0))}function $g(a){for(;a===sf;)sf=zo[--Bo],zo[Bo]=null,Ou=zo[--Bo],zo[Bo]=null;for(;a===ii;)ii=hn[--mn],hn[mn]=null,Yn=hn[--mn],hn[mn]=null,Gn=hn[--mn],hn[mn]=null}function yS(a,s){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=ii,Gn=s.id,Yn=s.overflow,ii=a}var Jt=null,it=null,Le=!1,si=null,pn=!1,Lg=Error(n(519));function oi(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Eu(fn(s,a)),Lg}function vS(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[Zt]=a,s[Tr]=m,u){case"dialog":Me("cancel",s),Me("close",s);break;case"iframe":case"object":case"embed":Me("load",s);break;case"video":case"audio":for(u=0;u<Qu.length;u++)Me(Qu[u],s);break;case"source":Me("error",s);break;case"img":case"image":case"link":Me("error",s),Me("load",s);break;case"details":Me("toggle",s);break;case"input":Me("invalid",s),P1(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Me("invalid",s);break;case"textarea":Me("invalid",s),R1(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||k_(s.textContent,u)?(m.popover!=null&&(Me("beforetoggle",s),Me("toggle",s)),m.onScroll!=null&&Me("scroll",s),m.onScrollEnd!=null&&Me("scrollend",s),m.onClick!=null&&(s.onclick=ga),s=!0):s=!1,s||oi(a,!0)}function xS(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(!Le)return xS(a),Le=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||t0(a.type,a.memoizedProps)),u=!u),u&&it&&oi(a),xS(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=H_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=H_(a)}else s===27?(s=it,ji(a.type)?(a=s0,s0=null,it=a):it=s):it=Jt?yn(a.stateNode.nextSibling):null;return!0}function fs(){it=Jt=null,Le=!1}function Ig(){var a=si;return a!==null&&(kr===null?kr=a:kr.push.apply(kr,a),si=null),a}function Eu(a){si===null?si=[a]:si.push(a)}var zg=L(null),hs=null,ba=null;function li(a,s,u){le(zg,s._currentValue),s._currentValue=u}function ja(a){a._currentValue=zg.current,X(zg)}function Bg(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 Ug(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),Bg(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),Bg(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;Yr(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&&Ug(s,a,u,m),s.flags|=262144}function of(a){for(a=a.firstContext;a!==null;){if(!Yr(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 bS(hs,a)}function lf(a,s){return hs===null&&ms(a),bS(a,s)}function bS(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 kL=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()})}},$L=e.unstable_scheduleCallback,LL=e.unstable_NormalPriority,Tt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qg(){return{controller:new kL,data:new Map,refCount:0}}function Au(a){a.refCount--,a.refCount===0&&$L(LL,function(){a.controller.abort()})}var Cu=null,Fg=0,Fo=0,Ho=null;function IL(a,s){if(Cu===null){var u=Cu=[];Fg=0,Fo=Gy(),Ho={status:"pending",value:void 0,then:function(m){u.push(m)}}}return Fg++,s.then(jS,jS),s}function jS(){if(--Fg===0&&Cu!==null){Ho!==null&&(Ho.status="fulfilled");var a=Cu;Cu=null,Fo=0,Ho=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function zL(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 wS=$.S;$.S=function(a,s){i_=Te(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&IL(a,s),wS!==null&&wS(a,s)};var ps=L(null);function Hg(){var a=ps.current;return a!==null?a:rt.pooledCache}function uf(a,s){s===null?le(ps,ps.current):le(ps,s.pool)}function SS(){var a=Hg();return a===null?null:{parent:Tt._currentValue,pool:a}}var Ko=Error(n(460)),Kg=Error(n(474)),cf=Error(n(542)),df={then:function(){}};function NS(a){return a=a.status,a==="fulfilled"||a==="rejected"}function _S(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,ES(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,ES(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 OS(){if(ys===null)throw Error(n(459));var a=ys;return ys=null,a}function ES(a){if(a===Ko||a===cf)throw Error(n(483))}var Go=null,Tu=0;function ff(a){var s=Tu;return Tu+=1,Go===null&&(Go=[]),_S(Go,a,s)}function Pu(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function hf(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 AS(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=Rg(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===R&&gs(be)===B.type)?(B=v(B,Y.props),Pu(B,Y),B.return=K,B):(B=af(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=Dg(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=Rg(""+B,K.mode,Y),B.return=K,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case x:return Y=af(B.type,B.key,B.props,null,K.mode,Y),Pu(Y,B),Y.return=K,Y;case b:return B=Dg(B,K.mode,Y),B.return=K,B;case R: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,ff(B),Y);if(B.$$typeof===C)return se(K,lf(K,B),Y);hf(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 R: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,ff(Y),ie);if(Y.$$typeof===C)return W(K,B,lf(K,Y),ie);hf(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 R: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,ff(ie),be);if(ie.$$typeof===C)return ee(K,B,Y,lf(B,ie),be);hf(B,ie)}return null}function me(K,B,Y,ie){for(var be=null,qe=null,ye=B,Ce=B=0,ke=null;ye!==null&&Ce<Y.length;Ce++){ye.index>Ce?(ke=ye,ye=null):ke=ye.sibling;var Fe=W(K,ye,Y[Ce],ie);if(Fe===null){ye===null&&(ye=ke);break}a&&ye&&Fe.alternate===null&&s(K,ye),B=j(Fe,B,Ce),qe===null?be=Fe:qe.sibling=Fe,qe=Fe,ye=ke}if(Ce===Y.length)return u(K,ye),Le&&xa(K,Ce),be;if(ye===null){for(;Ce<Y.length;Ce++)ye=se(K,Y[Ce],ie),ye!==null&&(B=j(ye,B,Ce),qe===null?be=ye:qe.sibling=ye,qe=ye);return Le&&xa(K,Ce),be}for(ye=m(ye);Ce<Y.length;Ce++)ke=ee(ye,K,Ce,Y[Ce],ie),ke!==null&&(a&&ke.alternate!==null&&ye.delete(ke.key===null?Ce:ke.key),B=j(ke,B,Ce),qe===null?be=ke:qe.sibling=ke,qe=ke);return a&&ye.forEach(function(Oi){return s(K,Oi)}),Le&&xa(K,Ce),be}function Se(K,B,Y,ie){if(Y==null)throw Error(n(151));for(var be=null,qe=null,ye=B,Ce=B=0,ke=null,Fe=Y.next();ye!==null&&!Fe.done;Ce++,Fe=Y.next()){ye.index>Ce?(ke=ye,ye=null):ke=ye.sibling;var Oi=W(K,ye,Fe.value,ie);if(Oi===null){ye===null&&(ye=ke);break}a&&ye&&Oi.alternate===null&&s(K,ye),B=j(Oi,B,Ce),qe===null?be=Oi:qe.sibling=Oi,qe=Oi,ye=ke}if(Fe.done)return u(K,ye),Le&&xa(K,Ce),be;if(ye===null){for(;!Fe.done;Ce++,Fe=Y.next())Fe=se(K,Fe.value,ie),Fe!==null&&(B=j(Fe,B,Ce),qe===null?be=Fe:qe.sibling=Fe,qe=Fe);return Le&&xa(K,Ce),be}for(ye=m(ye);!Fe.done;Ce++,Fe=Y.next())Fe=ee(ye,K,Ce,Fe.value,ie),Fe!==null&&(a&&Fe.alternate!==null&&ye.delete(Fe.key===null?Ce:Fe.key),B=j(Fe,B,Ce),qe===null?be=Fe:qe.sibling=Fe,qe=Fe);return a&&ye.forEach(function(XI){return s(K,XI)}),Le&&xa(K,Ce),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===R&&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=af(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=Dg(Y,K.mode,ie),ie.return=K,K=ie}return O(K);case R: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,ff(Y),ie);if(Y.$$typeof===C)return et(K,B,lf(K,Y),ie);hf(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=Rg(Y,K.mode,ie),ie.return=K,K=ie),O(K)):u(K,B)}return function(K,B,Y,ie){try{Tu=0;var be=et(K,B,Y,ie);return Go=null,be}catch(ye){if(ye===Ko||ye===cf)throw ye;var qe=Vr(29,ye,null,K.mode);return qe.lanes=ie,qe.return=K,qe}finally{}}}var vs=AS(!0),CS=AS(!1),ui=!1;function Gg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yg(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 ci(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function di(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=nf(a),fS(a,null,u),s}return rf(a,m,s,u),nf(a)}function Mu(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,b1(a,u)}}function Vg(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 Qg=!1;function Ru(){if(Qg){var a=Ho;if(a!==null)throw a}}function Du(a,s,u,m){Qg=!1;var v=a.updateQueue;ui=!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&&(Qg=!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:ui=!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),gi|=O,a.lanes=O,a.memoizedState=se}}function TS(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function PS(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)TS(u[a],s)}var Yo=L(null),mf=L(0);function MS(a,s){a=Ta,le(mf,a),le(Yo,s),Ta=a|s.baseLanes}function Xg(){le(mf,Ta),le(Yo,Yo.current)}function Wg(){Ta=mf.current,X(Yo),X(mf)}var Qr=L(null),gn=null;function fi(a){var s=a.alternate;le(wt,wt.current&1),le(Qr,a),gn===null&&(s===null||Yo.current!==null||s.memoizedState!==null)&&(gn=a)}function Zg(a){le(wt,wt.current),le(Qr,a),gn===null&&(gn=a)}function RS(a){a.tag===22?(le(wt,wt.current),le(Qr,a),gn===null&&(gn=a)):hi()}function hi(){le(wt,wt.current),le(Qr,Qr.current)}function Xr(a){X(Qr),gn===a&&(gn=null),X(wt)}var wt=L(0);function pf(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||a0(u)||i0(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,gf=!1,Vo=!1,xs=!1,yf=0,ku=0,Qo=null,BL=0;function gt(){throw Error(n(321))}function Jg(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Yr(a[u],s[u]))return!1;return!0}function ey(a,s,u,m,v,j){return wa=j,Ae=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=a===null||a.memoizedState===null?gN:py,xs=!1,j=u(m,v),xs=!1,Vo&&(j=kS(s,u,m,v)),DS(a),j}function DS(a){$.H=Iu;var s=Ze!==null&&Ze.next!==null;if(wa=0,Pt=Ze=Ae=null,gf=!1,ku=0,Qo=null,s)throw Error(n(300));a===null||Mt||(a=a.dependencies,a!==null&&of(a)&&(Mt=!0))}function kS(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)}$.H=yN,j=s(u,m)}while(Vo);return j}function UL(){var a=$.H,s=a.useState()[0];return s=typeof s.then=="function"?$u(s):s,a=a.useState()[0],(Ze!==null?Ze.memoizedState:null)!==a&&(Ae.flags|=1024),s}function ty(){var a=yf!==0;return yf=0,a}function ry(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function ny(a){if(gf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}gf=!1}wa=0,Pt=Ze=Ae=null,Vo=!1,ku=yf=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 vf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $u(a){var s=ku;return ku+=1,Qo===null&&(Qo=[]),a=_S(Qo,a,s),s=Ae,(Pt===null?s.memoizedState:Pt.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?gN:py),a}function xf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return $u(a);if(a.$$typeof===C)return er(a)}throw Error(n(438,String(a)))}function ay(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=vf(),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 bf(a){var s=St();return iy(s,Ze,a)}function iy(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,gi|=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,gi|=se;V=V.next}while(V!==null&&V!==s);if(I===null?O=j:I.next=P,!Yr(j,a.memoizedState)&&(Mt=!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 sy(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);Yr(j,s.memoizedState)||(Mt=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),u.lastRenderedState=j}return[j,m]}function $S(a,s,u){var m=Ae,v=St(),j=Le;if(j){if(u===void 0)throw Error(n(407));u=u()}else u=s();var O=!Yr((Ze||v).memoizedState,u);if(O&&(v.memoizedState=u,Mt=!0),v=v.queue,uy(zS.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},IS.bind(null,m,v,u,s),null),rt===null)throw Error(n(349));j||(wa&127)!==0||LS(m,s,u)}return u}function LS(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ae.updateQueue,s===null?(s=vf(),Ae.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function IS(a,s,u,m){s.value=u,s.getSnapshot=m,BS(s)&&US(a)}function zS(a,s,u){return u(function(){BS(s)&&US(a)})}function BS(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Yr(a,u)}catch{return!0}}function US(a){var s=cs(a,2);s!==null&&$r(s,a,2)}function oy(a){var s=wr();if(typeof a=="function"){var u=a;if(a=u(),xs){ri(!0);try{u()}finally{ri(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:a},s}function qS(a,s,u,m){return a.baseState=u,iy(a,Ze,typeof m=="function"?m:Sa)}function qL(a,s,u,m,v){if(Sf(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)}};$.T!==null?u(!0):j.isTransition=!1,m(j),u=s.pending,u===null?(j.next=s.pending=j,FS(s,j)):(j.next=u.next,s.pending=u.next=j)}}function FS(a,s){var u=s.action,m=s.payload,v=a.state;if(s.isTransition){var j=$.T,O={};$.T=O;try{var P=u(v,m),I=$.S;I!==null&&I(O,P),HS(a,s,P)}catch(V){ly(a,s,V)}finally{j!==null&&O.types!==null&&(j.types=O.types),$.T=j}}else try{j=u(v,m),HS(a,s,j)}catch(V){ly(a,s,V)}}function HS(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){KS(a,s,m)},function(m){return ly(a,s,m)}):KS(a,s,u)}function KS(a,s,u){s.status="fulfilled",s.value=u,GS(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,FS(a,u)))}function ly(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,GS(s),s=s.next;while(s!==m)}a.action=null}function GS(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function YS(a,s){return s}function VS(a,s){if(Le){var u=rt.formState;if(u!==null){e:{var m=Ae;if(Le){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}}oi(m)}m=!1}m&&(s=u[0])}}return u=wr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:YS,lastRenderedState:s},u.queue=m,u=hN.bind(null,Ae,m),m.dispatch=u,m=oy(!1),j=my.bind(null,Ae,!1,m.queue),m=wr(),v={state:s,dispatch:null,action:a,pending:null},m.queue=v,u=qL.bind(null,Ae,v,j,u),v.dispatch=u,m.memoizedState=a,[s,u,!1]}function QS(a){var s=St();return XS(s,Ze,a)}function XS(a,s,u){if(s=iy(a,s,YS)[0],a=bf(Sa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=$u(s)}catch(O){throw O===Ko?cf: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},FL.bind(null,v,u),null)),[m,j,a]}function FL(a,s){a.action=s}function WS(a){var s=St(),u=Ze;if(u!==null)return XS(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=vf(),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 ZS(){return St().memoizedState}function jf(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 wf(a,s,u,m){var v=St();m=m===void 0?null:m;var j=v.memoizedState.inst;Ze!==null&&m!==null&&Jg(m,Ze.memoizedState.deps)?v.memoizedState=Xo(s,j,u,m):(Ae.flags|=a,v.memoizedState=Xo(1|s,j,u,m))}function JS(a,s){jf(8390656,8,a,s)}function uy(a,s){wf(2048,8,a,s)}function HL(a){Ae.flags|=4;var s=Ae.updateQueue;if(s===null)s=vf(),Ae.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function eN(a){var s=St().memoizedState;return HL({ref:s,nextImpl:a}),function(){if((Ge&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function tN(a,s){return wf(4,2,a,s)}function rN(a,s){return wf(4,4,a,s)}function nN(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 aN(a,s,u){u=u!=null?u.concat([a]):null,wf(4,4,nN.bind(null,s,a),u)}function cy(){}function iN(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&Jg(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function sN(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&Jg(s,m[1]))return m[0];if(m=a(),xs){ri(!0);try{a()}finally{ri(!1)}}return u.memoizedState=[m,s],m}function dy(a,s,u){return u===void 0||(wa&1073741824)!==0&&(De&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=o_(),Ae.lanes|=a,gi|=a,u)}function oN(a,s,u,m){return Yr(u,s)?u:Yo.current!==null?(a=dy(a,u,m),Yr(a,s)||(Mt=!0),a):(wa&42)===0||(wa&1073741824)!==0&&(De&261930)===0?(Mt=!0,a.memoizedState=u):(a=o_(),Ae.lanes|=a,gi|=a,s)}function lN(a,s,u,m,v){var j=F.p;F.p=j!==0&&8>j?j:8;var O=$.T,P={};$.T=P,my(a,!1,s,u);try{var I=v(),V=$.S;if(V!==null&&V(P,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ne=zL(I,m);Lu(a,s,ne,Jr(a))}else Lu(a,s,m,Jr(a))}catch(se){Lu(a,s,{then:function(){},status:"rejected",reason:se},Jr())}finally{F.p=j,O!==null&&P.types!==null&&(O.types=P.types),$.T=O}}function KL(){}function fy(a,s,u,m){if(a.tag!==5)throw Error(n(476));var v=uN(a).queue;lN(a,v,s,J,u===null?KL:function(){return cN(a),u(m)})}function uN(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 cN(a){var s=uN(a);s.next===null&&(s=a.alternate.memoizedState),Lu(a,s.next.queue,{},Jr())}function hy(){return er(ec)}function dN(){return St().memoizedState}function fN(){return St().memoizedState}function GL(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Jr();a=ci(u);var m=di(s,a,u);m!==null&&($r(m,s,u),Mu(m,s,u)),s={cache:qg()},a.payload=s;return}s=s.return}}function YL(a,s,u){var m=Jr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Sf(a)?mN(s,u):(u=Pg(a,s,u,m),u!==null&&($r(u,a,m),pN(u,s,m)))}function hN(a,s,u){var m=Jr();Lu(a,s,u,m)}function Lu(a,s,u,m){var v={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Sf(a))mN(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,Yr(P,O))return rf(a,s,v,0),rt===null&&tf(),!1}catch{}finally{}if(u=Pg(a,s,v,m),u!==null)return $r(u,a,m),pN(u,s,m),!0}return!1}function my(a,s,u,m){if(m={lane:2,revertLane:Gy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Sf(a)){if(s)throw Error(n(479))}else s=Pg(a,u,m,2),s!==null&&$r(s,a,2)}function Sf(a){var s=a.alternate;return a===Ae||s!==null&&s===Ae}function mN(a,s){Vo=gf=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function pN(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,b1(a,u)}}var Iu={readContext:er,use:xf,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 gN={readContext:er,use:xf,useCallback:function(a,s){return wr().memoizedState=[a,s===void 0?null:s],a},useContext:er,useEffect:JS,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,jf(4194308,4,nN.bind(null,s,a),u)},useLayoutEffect:function(a,s){return jf(4194308,4,a,s)},useInsertionEffect:function(a,s){jf(4,2,a,s)},useMemo:function(a,s){var u=wr();s=s===void 0?null:s;var m=a();if(xs){ri(!0);try{a()}finally{ri(!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){ri(!0);try{u(s)}finally{ri(!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=YL.bind(null,Ae,a),[m.memoizedState,a]},useRef:function(a){var s=wr();return a={current:a},s.memoizedState=a},useState:function(a){a=oy(a);var s=a.queue,u=hN.bind(null,Ae,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:cy,useDeferredValue:function(a,s){var u=wr();return dy(u,a,s)},useTransition:function(){var a=oy(!1);return a=lN.bind(null,Ae,a.queue,!0,!1),wr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ae,v=wr();if(Le){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),rt===null)throw Error(n(349));(De&127)!==0||LS(m,s,u)}v.memoizedState=u;var j={value:u,getSnapshot:s};return v.queue=j,JS(zS.bind(null,m,j,a),[a]),m.flags|=2048,Xo(9,{destroy:void 0},IS.bind(null,m,j,u,s),null),u},useId:function(){var a=wr(),s=rt.identifierPrefix;if(Le){var u=Yn,m=Gn;u=(m&~(1<<32-Gr(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=yf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=BL++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:hy,useFormState:VS,useActionState:VS,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=my.bind(null,Ae,!0,u),u.dispatch=s,[a,s]},useMemoCache:ay,useCacheRefresh:function(){return wr().memoizedState=GL.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)}}},py={readContext:er,use:xf,useCallback:iN,useContext:er,useEffect:uy,useImperativeHandle:aN,useInsertionEffect:tN,useLayoutEffect:rN,useMemo:sN,useReducer:bf,useRef:ZS,useState:function(){return bf(Sa)},useDebugValue:cy,useDeferredValue:function(a,s){var u=St();return oN(u,Ze.memoizedState,a,s)},useTransition:function(){var a=bf(Sa)[0],s=St().memoizedState;return[typeof a=="boolean"?a:$u(a),s]},useSyncExternalStore:$S,useId:dN,useHostTransitionStatus:hy,useFormState:QS,useActionState:QS,useOptimistic:function(a,s){var u=St();return qS(u,Ze,a,s)},useMemoCache:ay,useCacheRefresh:fN};py.useEffectEvent=eN;var yN={readContext:er,use:xf,useCallback:iN,useContext:er,useEffect:uy,useImperativeHandle:aN,useInsertionEffect:tN,useLayoutEffect:rN,useMemo:sN,useReducer:sy,useRef:ZS,useState:function(){return sy(Sa)},useDebugValue:cy,useDeferredValue:function(a,s){var u=St();return Ze===null?dy(u,a,s):oN(u,Ze.memoizedState,a,s)},useTransition:function(){var a=sy(Sa)[0],s=St().memoizedState;return[typeof a=="boolean"?a:$u(a),s]},useSyncExternalStore:$S,useId:dN,useHostTransitionStatus:hy,useFormState:WS,useActionState:WS,useOptimistic:function(a,s){var u=St();return Ze!==null?qS(u,Ze,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:ay,useCacheRefresh:fN};yN.useEffectEvent=eN;function gy(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 yy={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Jr(),v=ci(m);v.payload=s,u!=null&&(v.callback=u),s=di(a,v,m),s!==null&&($r(s,a,m),Mu(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Jr(),v=ci(m);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=di(a,v,m),s!==null&&($r(s,a,m),Mu(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Jr(),m=ci(u);m.tag=2,s!=null&&(m.callback=s),s=di(a,m,u),s!==null&&($r(s,a,u),Mu(s,a,u))}};function vN(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 xN(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&&yy.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 bN(a){ef(a)}function jN(a){console.error(a)}function wN(a){ef(a)}function Nf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function SN(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 vy(a,s,u){return u=ci(u),u.tag=3,u.payload={element:null},u.callback=function(){Nf(a,s)},u}function NN(a){return a=ci(a),a.tag=3,a}function _N(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(){SN(s,u,m)}}var O=u.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(a.callback=function(){SN(s,u,m),typeof v!="function"&&(yi===null?yi=new Set([this]):yi.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function VL(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=Qr.current,u!==null){switch(u.tag){case 31:case 13:return gn===null?$f():u.alternate===null&&yt===0&&(yt=3),u.flags&=-257,u.flags|=65536,u.lanes=v,m===df?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),Fy(a,m,v)),!1;case 22:return u.flags|=65536,m===df?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)),Fy(a,m,v)),!1}throw Error(n(435,u.tag))}return Fy(a,m,v),$f(),!1}if(Le)return s=Qr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,m!==Lg&&(a=Error(n(422),{cause:m}),Eu(fn(a,u)))):(m!==Lg&&(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=vy(a.stateNode,m,v),Vg(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=vy(u.stateNode,m,a),Vg(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"&&(yi===null||!yi.has(j))))return u.flags|=65536,v&=-v,u.lanes|=v,v=NN(v),_N(v,a,u,m),Vg(u,v),!1}u=u.return}while(u!==null);return!1}var xy=Error(n(461)),Mt=!1;function tr(a,s,u,m){s.child=a===null?CS(s,null,u,m):vs(s,a.child,u,m)}function ON(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=ey(a,s,u,O,j,v),P=ty(),a!==null&&!Mt?(ry(a,s,v),Na(a,s,v)):(Le&&P&&kg(s),s.flags|=1,tr(a,s,m,v),s.child)}function EN(a,s,u,m,v){if(a===null){var j=u.type;return typeof j=="function"&&!Mg(j)&&j.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=j,AN(a,s,j,m,v)):(a=af(u.type,null,m,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(j=a.child,!Ey(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 AN(a,s,u,m,v){if(a!==null){var j=a.memoizedProps;if(Nu(j,m)&&a.ref===s.ref)if(Mt=!1,s.pendingProps=m=j,Ey(a,v))(a.flags&131072)!==0&&(Mt=!0);else return s.lanes=a.lanes,Na(a,s,v)}return by(a,s,u,m,v)}function CN(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 TN(a,s,j,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&uf(s,j!==null?j.cachePool:null),j!==null?MS(s,j):Xg(),RS(s);else return m=s.lanes=536870912,TN(a,s,j!==null?j.baseLanes|u:u,u,m)}else j!==null?(uf(s,j.cachePool),MS(s,j),hi(),s.memoizedState=null):(a!==null&&uf(s,null),Xg(),hi());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 TN(a,s,u,m,v){var j=Hg();return j=j===null?null:{parent:Tt._currentValue,pool:j},s.memoizedState={baseLanes:u,cachePool:j},a!==null&&uf(s,null),Xg(),RS(s),a!==null&&qo(a,s,m,!0),s.childLanes=v,null}function _f(a,s){return s=Ef({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function PN(a,s,u){return vs(s,a.child,null,u),a=_f(s,s.pendingProps),a.flags|=2,Xr(s),s.memoizedState=null,a}function QL(a,s,u){var m=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Le){if(m.mode==="hidden")return a=_f(s,m),s.lanes=536870912,zu(null,a);if(Zg(s),(a=it)?(a=F_(a,pn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ii!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=mS(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw oi(s);return s.lanes=536870912,null}return _f(s,m)}var j=a.memoizedState;if(j!==null){var O=j.dehydrated;if(Zg(s),v)if(s.flags&256)s.flags&=-257,s=PN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Mt||qo(a,s,u,!1),v=(u&a.childLanes)!==0,Mt||v){if(m=rt,m!==null&&(O=j1(m,u),O!==0&&O!==j.retryLane))throw j.retryLane=O,cs(a,O),$r(m,a,O),xy;$f(),s=PN(a,s,u)}else a=j.treeContext,it=yn(O.nextSibling),Jt=s,Le=!0,si=null,pn=!1,a!==null&&yS(s,a),s=_f(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 Of(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 by(a,s,u,m,v){return ms(s),u=ey(a,s,u,m,void 0,v),m=ty(),a!==null&&!Mt?(ry(a,s,v),Na(a,s,v)):(Le&&m&&kg(s),s.flags|=1,tr(a,s,u,v),s.child)}function MN(a,s,u,m,v,j){return ms(s),s.updateQueue=null,u=kS(s,m,u,v),DS(a),m=ty(),a!==null&&!Mt?(ry(a,s,j),Na(a,s,j)):(Le&&m&&kg(s),s.flags|=1,tr(a,s,u,j),s.child)}function RN(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=yy,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=m,j.state=s.memoizedState,j.refs={},Gg(s),O=u.contextType,j.context=typeof O=="object"&&O!==null?er(O):Io,j.state=s.memoizedState,O=u.getDerivedStateFromProps,typeof O=="function"&&(gy(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&&yy.enqueueReplaceState(j,j.state,null),Du(s,m,j,v),Ru(),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)&&xN(s,j,m,O),ui=!1;var W=s.memoizedState;j.state=W,Du(s,m,j,v),Ru(),V=s.memoizedState,P||W!==V||ui?(typeof se=="function"&&(gy(s,u,se,m),V=s.memoizedState),(I=ui||vN(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,Yg(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)&&xN(s,j,m,I),ui=!1,W=s.memoizedState,j.state=W,Du(s,m,j,v),Ru();var ee=s.memoizedState;O!==se||W!==ee||ui||a!==null&&a.dependencies!==null&&of(a.dependencies)?(typeof P=="function"&&(gy(s,u,P,m),ee=s.memoizedState),(ne=ui||vN(s,u,ne,m,W,ee,I)||a!==null&&a.dependencies!==null&&of(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,Of(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 DN(a,s,u,m){return fs(),s.flags|=256,tr(a,s,u,m),s.child}var jy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wy(a){return{baseLanes:a,cachePool:SS()}}function Sy(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Zr),a}function kN(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(Le){if(v?fi(s):hi(),(a=it)?(a=F_(a,pn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ii!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=mS(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw oi(s);return i0(a)?s.lanes=32:s.lanes=536870912,null}var P=m.children;return m=m.fallback,v?(hi(),v=s.mode,P=Ef({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=wy(u),m.childLanes=Sy(a,O,u),s.memoizedState=jy,zu(null,m)):(fi(s),Ny(s,P))}var I=a.memoizedState;if(I!==null&&(P=I.dehydrated,P!==null)){if(j)s.flags&256?(fi(s),s.flags&=-257,s=_y(a,s,u)):s.memoizedState!==null?(hi(),s.child=a.child,s.flags|=128,s=null):(hi(),P=m.fallback,v=s.mode,m=Ef({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=wy(u),m.childLanes=Sy(a,O,u),s.memoizedState=jy,s=zu(null,m));else if(fi(s),i0(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=_y(a,s,u)}else if(Mt||qo(a,s,u,!1),O=(u&a.childLanes)!==0,Mt||O){if(O=rt,O!==null&&(m=j1(O,u),m!==0&&m!==I.retryLane))throw I.retryLane=m,cs(a,m),$r(O,a,m),xy;a0(P)||$f(),s=_y(a,s,u)}else a0(P)?(s.flags|=192,s.child=a.child,s=null):(a=I.treeContext,it=yn(P.nextSibling),Jt=s,Le=!0,si=null,pn=!1,a!==null&&yS(s,a),s=Ny(s,m.children),s.flags|=4096);return s}return v?(hi(),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=wy(u):(v=P.cachePool,v!==null?(I=Tt._currentValue,v=v.parent!==I?{parent:I,pool:I}:v):v=SS(),P={baseLanes:P.baseLanes|u,cachePool:v}),m.memoizedState=P,m.childLanes=Sy(a,O,u),s.memoizedState=jy,zu(a.child,m)):(fi(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 Ny(a,s){return s=Ef({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function Ef(a,s){return a=Vr(22,a,null,s),a.lanes=0,a}function _y(a,s,u){return vs(s,a.child,null,u),a=Ny(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function $N(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),Bg(a.return,s,u)}function Oy(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 LN(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=Le?Ou:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&$N(a,u,s);else if(a.tag===19)$N(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&&pf(a)===null&&(v=u),u=u.sibling;u=v,u===null?(v=s.child,s.child=null):(v=u.sibling,u.sibling=null),Oy(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&&pf(a)===null){s.child=v;break}a=v.sibling,v.sibling=u,u=v,v=a}Oy(s,!0,u,null,j,m);break;case"together":Oy(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),gi|=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 Ey(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&of(a)))}function XL(a,s,u){switch(s.tag){case 3:_e(s,s.stateNode.containerInfo),li(s,Tt,a.memoizedState.cache),fs();break;case 27:case 5:te(s);break;case 4:_e(s,s.stateNode.containerInfo);break;case 10:li(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Zg(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(fi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?kN(a,s,u):(fi(s),a=Na(a,s,u),a!==null?a.sibling:null);fi(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 LN(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,CN(a,s,u,s.pendingProps);case 24:li(s,Tt,a.memoizedState.cache)}return Na(a,s,u)}function IN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Mt=!0;else{if(!Ey(a,u)&&(s.flags&128)===0)return Mt=!1,XL(a,s,u);Mt=(a.flags&131072)!==0}else Mt=!1,Le&&(s.flags&1048576)!==0&&gS(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")Mg(a)?(m=bs(a,m),s.tag=1,s=RN(null,s,a,m,u)):(s.tag=0,s=by(null,s,a,m,u));else{if(a!=null){var v=a.$$typeof;if(v===A){s.tag=11,s=ON(null,s,a,m,u);break e}else if(v===D){s.tag=14,s=EN(null,s,a,m,u);break e}}throw s=Z(a)||a,Error(n(306,s,""))}}return s;case 0:return by(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,v=bs(m,s.pendingProps),RN(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,Yg(a,s),Du(s,m,null,u);var O=s.memoizedState;if(m=O.cache,li(s,Tt,m),m!==j.cache&&Ug(s,[Tt],u,!0),Ru(),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=DN(a,s,m,u);break e}else if(m!==v){v=fn(Error(n(424)),s),Eu(v),s=DN(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,Le=!0,si=null,pn=!0,u=CS(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 Of(a,s),a===null?(u=Q_(s.type,null,s.pendingProps,null))?s.memoizedState=u:Le||(u=s.type,a=s.pendingProps,m=Ff(xe.current).createElement(u),m[Zt]=s,m[Tr]=a,rr(m,u,a),qt(m),s.stateNode=m):s.memoizedState=Q_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return te(s),a===null&&Le&&(m=s.stateNode=G_(s.type,s.pendingProps,xe.current),Jt=s,pn=!0,v=it,ji(s.type)?(s0=v,it=yn(m.firstChild)):it=v),tr(a,s,s.pendingProps.children,u),Of(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Le&&((v=m=it)&&(m=OI(m,s.type,s.pendingProps,pn),m!==null?(s.stateNode=m,Jt=s,it=yn(m.firstChild),pn=!1,v=!0):v=!1),v||oi(s)),te(s),v=s.type,j=s.pendingProps,O=a!==null?a.memoizedProps:null,m=j.children,t0(v,j)?m=null:O!==null&&t0(v,O)&&(s.flags|=32),s.memoizedState!==null&&(v=ey(a,s,UL,null,null,u),ec._currentValue=v),Of(a,s),tr(a,s,m,u),s.child;case 6:return a===null&&Le&&((a=u=it)&&(u=EI(u,s.pendingProps,pn),u!==null?(s.stateNode=u,Jt=s,it=null,a=!0):a=!1),a||oi(s)),null;case 13:return kN(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 ON(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,li(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 EN(a,s,s.type,s.pendingProps,u);case 15:return AN(a,s,s.type,s.pendingProps,u);case 19:return LN(a,s,u);case 31:return QL(a,s,u);case 22:return CN(a,s,u,s.pendingProps);case 24:return ms(s),m=er(Tt),a===null?(v=Hg(),v===null&&(v=rt,j=qg(),v.pooledCache=j,j.refCount++,j!==null&&(v.pooledCacheLanes|=u),v=j),s.memoizedState={parent:m,cache:v},Gg(s),li(s,Tt,v)):((a.lanes&u)!==0&&(Yg(a,s),Du(s,null,null,u),Ru()),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),li(s,Tt,m)):(m=j.cache,li(s,Tt,m),m!==v.cache&&Ug(s,[Tt],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 Ay(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(d_())a.flags|=8192;else throw ys=df,Kg}else a.flags&=-16777217}function zN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!eO(s))if(d_())a.flags|=8192;else throw ys=df,Kg}function Af(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?v1():536870912,a.lanes|=s,el|=s)}function Bu(a,s){if(!Le)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 WL(a,s,u){var m=s.pendingProps;switch($g(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(Tt),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,Ig())),st(s),null;case 26:var v=s.type,j=s.memoizedState;return a===null?(_a(s),j!==null?(st(s),zN(s,j)):(st(s),Ay(s,v,null,m,u))):j?j!==a.memoizedState?(_a(s),st(s),zN(s,j)):(st(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&_a(s),st(s),Ay(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)?vS(s):(a=G_(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))vS(s);else{var O=Ff(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[Tr]=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),Ay(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||k_(a.nodeValue,u)),a||oi(s,!0)}else a=Ff(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=Ig(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Xr(s),s):(Xr(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=Ig(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Xr(s),s):(Xr(s),null)}return Xr(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),Af(s,s.updateQueue),st(s),null);case 4:return de(),a===null&&Xy(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=pf(a),j!==null){for(s.flags|=128,Bu(m,!1),a=j.updateQueue,s.updateQueue=a,Af(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)hS(u,a),u=u.sibling;return le(wt,wt.current&1|2),Le&&xa(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&Te()>Rf&&(s.flags|=128,v=!0,Bu(m,!1),s.lanes=4194304)}else{if(!v)if(a=pf(j),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,Af(s,a),Bu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!j.alternate&&!Le)return st(s),null}else 2*Te()-m.renderingStartTime>Rf&&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=Te(),a.sibling=null,u=wt.current,le(wt,v?u&1|2:u&1),Le&&xa(s,m.treeForkCount),a):(st(s),null);case 22:case 23:return Xr(s),Wg(),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&&Af(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(Tt),st(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function ZL(a,s){switch($g(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return ja(Tt),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(Xr(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(Xr(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 Xr(s),Wg(),a!==null&&X(ps),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return ja(Tt),null;case 25:return null;default:return null}}function BN(a,s){switch($g(s),s.tag){case 3:ja(Tt),de();break;case 26:case 27:case 5:je(s);break;case 4:de();break;case 31:s.memoizedState!==null&&Xr(s);break;case 13:Xr(s);break;case 19:X(wt);break;case 10:ja(s.type);break;case 22:case 23:Xr(s),Wg(),a!==null&&X(ps);break;case 24:ja(Tt)}}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 mi(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 UN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{PS(s,u)}catch(m){Qe(a,a.return,m)}}}function qN(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 FN(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 Cy(a,s,u){try{var m=a.stateNode;bI(m,a.type,u,s),m[Tr]=s}catch(v){Qe(a,a.return,v)}}function HN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&ji(a.type)||a.tag===4}function Ty(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||HN(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&&ji(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 Py(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&&ji(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(Py(a,s,u),a=a.sibling;a!==null;)Py(a,s,u),a=a.sibling}function Cf(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&&ji(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Cf(a,s,u),a=a.sibling;a!==null;)Cf(a,s,u),a=a.sibling}function KN(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[Tr]=u}catch(j){Qe(a,a.return,j)}}var Oa=!1,Rt=!1,My=!1,GN=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function JL(a,s){if(a=a.containerInfo,Jy=Xf,a=aS(a),_g(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(e0={focusedElem:a,selectionRange:u},Xf=!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)n0(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":n0(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 YN(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&&UN(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{PS(a,s)}catch(O){Qe(u,u.return,O)}}break;case 27:s===null&&m&4&&KN(u);case 26:case 5:Aa(a,u),s===null&&m&4&&FN(u),m&512&&qu(u,u.return);break;case 12:Aa(a,u);break;case 31:Aa(a,u),m&4&&XN(a,u);break;case 13:Aa(a,u),m&4&&WN(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=lI.bind(null,u),AI(a,u))));break;case 22:if(m=u.memoizedState!==null||Oa,!m){s=s!==null&&s.memoizedState!==null||Rt,v=Oa;var j=Rt;Oa=m,(Rt=s)&&!j?Ca(a,u,(u.subtreeFlags&8772)!==0):Aa(a,u),Oa=v,Rt=j}break;case 30:break;default:Aa(a,u)}}function VN(a){var s=a.alternate;s!==null&&(a.alternate=null,VN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&lg(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,Mr=!1;function Ea(a,s,u){for(u=u.child;u!==null;)QN(a,s,u),u=u.sibling}function QN(a,s,u){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(fu,u)}catch{}switch(u.tag){case 26:Rt||Vn(u,s),Ea(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Rt||Vn(u,s);var m=dt,v=Mr;ji(u.type)&&(dt=u.stateNode,Mr=!1),Ea(a,s,u),Wu(u.stateNode),dt=m,Mr=v;break;case 5:Rt||Vn(u,s);case 6:if(m=dt,v=Mr,dt=null,Ea(a,s,u),dt=m,Mr=v,dt!==null)if(Mr)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&&(Mr?(a=dt,U_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),ll(a)):U_(dt,u.stateNode));break;case 4:m=dt,v=Mr,dt=u.stateNode.containerInfo,Mr=!0,Ea(a,s,u),dt=m,Mr=v;break;case 0:case 11:case 14:case 15:mi(2,u,s),Rt||mi(4,u,s),Ea(a,s,u);break;case 1:Rt||(Vn(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&qN(u,s,m)),Ea(a,s,u);break;case 21:Ea(a,s,u);break;case 22:Rt=(m=Rt)||u.memoizedState!==null,Ea(a,s,u),Rt=m;break;default:Ea(a,s,u)}}function XN(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 WN(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 eI(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new GN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new GN),s;default:throw Error(n(435,a.tag))}}function Tf(a,s){var u=eI(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var v=uI.bind(null,a,m);m.then(v,v)}})}function Rr(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(ji(P.type)){dt=P.stateNode,Mr=!1;break e}break;case 5:dt=P.stateNode,Mr=!1;break e;case 3:case 4:dt=P.stateNode.containerInfo,Mr=!0;break e}P=P.return}if(dt===null)throw Error(n(160));QN(j,O,v),dt=null,Mr=!1,j=v.alternate,j!==null&&(j.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)ZN(s,a),s=s.sibling}var Rn=null;function ZN(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Rr(s,a),Dr(a),m&4&&(mi(3,a,a.return),Uu(3,a),mi(5,a,a.return));break;case 1:Rr(s,a),Dr(a),m&512&&(Rt||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=Rn;if(Rr(s,a),Dr(a),m&512&&(Rt||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=Z_("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=Z_("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 J_(v,a.type,a.stateNode);else a.stateNode=W_(v,m,a.memoizedProps);else j!==m?(j===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):j.count--,m===null?J_(v,a.type,a.stateNode):W_(v,m,a.memoizedProps)):m===null&&a.stateNode!==null&&Cy(a,a.memoizedProps,u.memoizedProps)}break;case 27:Rr(s,a),Dr(a),m&512&&(Rt||u===null||Vn(u,u.return)),u!==null&&m&4&&Cy(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Rr(s,a),Dr(a),m&512&&(Rt||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,Cy(a,v,u!==null?u.memoizedProps:v)),m&1024&&(My=!0);break;case 6:if(Rr(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(Gf=null,v=Rn,Rn=Hf(s.containerInfo),Rr(s,a),Rn=v,Dr(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{ll(s.containerInfo)}catch(me){Qe(a,a.return,me)}My&&(My=!1,JN(a));break;case 4:m=Rn,Rn=Hf(a.stateNode.containerInfo),Rr(s,a),Dr(a),Rn=m;break;case 12:Rr(s,a),Dr(a);break;case 31:Rr(s,a),Dr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Tf(a,m)));break;case 13:Rr(s,a),Dr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Mf=Te()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Tf(a,m)));break;case 22:v=a.memoizedState!==null;var I=u!==null&&u.memoizedState!==null,V=Oa,ne=Rt;if(Oa=V||v,Rt=ne||I,Rr(s,a),Rt=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||Rt||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?q_(ee,!0):q_(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,Tf(a,u))));break;case 19:Rr(s,a),Dr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Tf(a,m)));break;case 30:break;case 21:break;default:Rr(s,a),Dr(a)}}function Dr(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(HN(m)){u=m;break}m=m.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var v=u.stateNode,j=Ty(a);Cf(a,j,v);break;case 5:var O=u.stateNode;u.flags&32&&(Po(O,""),u.flags&=-33);var P=Ty(a);Cf(a,P,O);break;case 3:case 4:var I=u.stateNode.containerInfo,V=Ty(a);Py(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 JN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;JN(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;)YN(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:mi(4,s,s.return),js(s);break;case 1:Vn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&qN(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 Ca(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:Ca(v,j,u),Uu(4,j);break;case 1:if(Ca(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++)TS(I[v],P)}catch(V){Qe(m,m.return,V)}}u&&O&64&&UN(j),qu(j,j.return);break;case 27:KN(j);case 26:case 5:Ca(v,j,u),u&&m===null&&O&4&&FN(j),qu(j,j.return);break;case 12:Ca(v,j,u);break;case 31:Ca(v,j,u),u&&O&4&&XN(v,j);break;case 13:Ca(v,j,u),u&&O&4&&WN(v,j);break;case 22:j.memoizedState===null&&Ca(v,j,u),qu(j,j.return);break;case 30:break;default:Ca(v,j,u)}s=s.sibling}}function Ry(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 Dy(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;)e_(a,s,u,m),s=s.sibling}function e_(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&&Ry(O,s);break;case 24:Dn(a,s,u,m),v&2048&&Dy(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&&Ry(O.alternate,O);break;case 24:Wo(j,O,P,I,v),v&&V&2048&&Dy(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&&Ry(m.alternate,m);break;case 24:Fu(u,m),v&2048&&Dy(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;)t_(a,s,u),a=a.sibling}function t_(a,s,u){switch(a.tag){case 26:Zo(a,s,u),a.flags&Hu&&a.memoizedState!==null&&BI(u,Rn,a.memoizedState,a.memoizedProps);break;case 5:Zo(a,s,u);break;case 3:case 4:var m=Rn;Rn=Hf(a.stateNode.containerInfo),Zo(a,s,u),Rn=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 r_(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,a_(m,a)}r_(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)n_(a),a=a.sibling}function n_(a){switch(a.tag){case 0:case 11:case 15:Ku(a),a.flags&2048&&mi(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,Pf(a)):Ku(a);break;default:Ku(a)}}function Pf(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,a_(m,a)}r_(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:mi(8,s,s.return),Pf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Pf(s));break;default:Pf(s)}a=a.sibling}}function a_(a,s){for(;Ft!==null;){var u=Ft;switch(u.tag){case 0:case 11:case 15:mi(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(VN(m),m===u){Ft=null;break e}if(v!==null){v.return=j,Ft=v;break e}Ft=j}}}var tI={getCacheForType:function(a){var s=er(Tt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return er(Tt).controller.signal}},rI=typeof WeakMap=="function"?WeakMap:Map,Ge=0,rt=null,Pe=null,De=0,Ve=0,Wr=null,pi=!1,Jo=!1,ky=!1,Ta=0,yt=0,gi=0,ws=0,$y=0,Zr=0,el=0,Gu=null,kr=null,Ly=!1,Mf=0,i_=0,Rf=1/0,Df=null,yi=null,kt=0,vi=null,tl=null,Pa=0,Iy=0,zy=null,s_=null,Yu=0,By=null;function Jr(){return(Ge&2)!==0&&De!==0?De&-De:$.T!==null?Gy():w1()}function o_(){if(Zr===0)if((De&536870912)===0||Le){var a=Ud;Ud<<=1,(Ud&3932160)===0&&(Ud=262144),Zr=a}else Zr=536870912;return a=Qr.current,a!==null&&(a.flags|=32),Zr}function $r(a,s,u){(a===rt&&(Ve===2||Ve===9)||a.cancelPendingCommit!==null)&&(rl(a,0),xi(a,De,Zr,!1)),mu(a,u),((Ge&2)===0||a!==rt)&&(a===rt&&((Ge&2)===0&&(ws|=u),yt===4&&xi(a,De,Zr,!1)),Qn(a))}function l_(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?iI(a,s):qy(a,s,!0),j=m;do{if(v===0){Jo&&!m&&xi(a,s,0,!1);break}else{if(u=a.current.alternate,j&&!nI(u)){v=qy(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=qy(P,O,!1),O!==2){if(ky&&!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),xi(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:xi(m,s,Zr,!pi);break e;case 2:kr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(v=Mf+300-Te(),10<v)){if(xi(m,s,Zr,!pi),Fd(m,0,!0)!==0)break e;Pa=s,m.timeoutHandle=z_(u_.bind(null,m,u,kr,Df,Ly,s,Zr,ws,el,pi,j,"Throttled",-0,0),v);break e}u_(m,u,kr,Df,Ly,s,Zr,ws,el,pi,j,null,-0,0)}}break}while(!0);Qn(a)}function u_(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},t_(s,j,se);var me=(j&62914560)===j?Mf-Te():(j&4194048)===j?i_-Te():0;if(me=UI(se,me),me!==null){Pa=j,a.cancelPendingCommit=me(y_.bind(null,a,s,j,u,m,v,O,P,I,ne,se,null,W,ee)),xi(a,j,O,!V);return}}y_(a,s,j,u,m,v,O,P,I)}function nI(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(!Yr(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 xi(a,s,u,m){s&=~$y,s&=~ws,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var v=s;0<v;){var j=31-Gr(v),O=1<<j;m[j]=-1,v&=~O}u!==0&&x1(a,u,s)}function kf(){return(Ge&6)===0?(Vu(0),!1):!0}function Uy(){if(Pe!==null){if(Ve===0)var a=Pe.return;else a=Pe,ba=hs=null,ny(a),Go=null,Tu=0,a=Pe;for(;a!==null;)BN(a.alternate,a),a=a.return;Pe=null}}function rl(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,SI(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Pa=0,Uy(),rt=a,Pe=u=va(a.current,null),De=s,Ve=0,Wr=null,pi=!1,Jo=hu(a,s),ky=!1,el=Zr=$y=ws=gi=yt=0,kr=Gu=null,Ly=!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-Gr(m),j=1<<v;s|=a[v],m&=~j}return Ta=s,tf(),u}function c_(a,s){Ae=null,$.H=Iu,s===Ko||s===cf?(s=OS(),Ve=3):s===Kg?(s=OS(),Ve=4):Ve=s===xy?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Wr=s,Pe===null&&(yt=1,Nf(a,fn(s,a.current)))}function d_(){var a=Qr.current;return a===null?!0:(De&4194048)===De?gn===null:(De&62914560)===De||(De&536870912)!==0?a===gn:!1}function f_(){var a=$.H;return $.H=Iu,a===null?Iu:a}function h_(){var a=$.A;return $.A=tI,a}function $f(){yt=4,pi||(De&4194048)!==De&&Qr.current!==null||(Jo=!0),(gi&134217727)===0&&(ws&134217727)===0||rt===null||xi(rt,De,Zr,!1)}function qy(a,s,u){var m=Ge;Ge|=2;var v=f_(),j=h_();(rt!==a||De!==s)&&(Df=null,rl(a,s)),s=!1;var O=yt;e:do try{if(Ve!==0&&Pe!==null){var P=Pe,I=Wr;switch(Ve){case 8:Uy(),O=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(s=!0);var V=Ve;if(Ve=0,Wr=null,nl(a,P,I,V),u&&Jo){O=0;break e}break;default:V=Ve,Ve=0,Wr=null,nl(a,P,I,V)}}aI(),O=yt;break}catch(ne){c_(a,ne)}while(!0);return s&&a.shellSuspendCounter++,ba=hs=null,Ge=m,$.H=v,$.A=j,Pe===null&&(rt=null,De=0,tf()),O}function aI(){for(;Pe!==null;)m_(Pe)}function iI(a,s){var u=Ge;Ge|=2;var m=f_(),v=h_();rt!==a||De!==s?(Df=null,Rf=Te()+500,rl(a,s)):Jo=hu(a,s);e:do try{if(Ve!==0&&Pe!==null){s=Pe;var j=Wr;t:switch(Ve){case 1:Ve=0,Wr=null,nl(a,s,j,1);break;case 2:case 9:if(NS(j)){Ve=0,Wr=null,p_(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:NS(j)?(Ve=0,Wr=null,p_(s)):(Ve=0,Wr=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?eO(O):P.stateNode.complete){Ve=0,Wr=null;var I=P.sibling;if(I!==null)Pe=I;else{var V=P.return;V!==null?(Pe=V,Lf(V)):Pe=null}break t}}Ve=0,Wr=null,nl(a,s,j,5);break;case 6:Ve=0,Wr=null,nl(a,s,j,6);break;case 8:Uy(),yt=6;break e;default:throw Error(n(462))}}sI();break}catch(ne){c_(a,ne)}while(!0);return ba=hs=null,$.H=m,$.A=v,Ge=u,Pe!==null?0:(rt=null,De=0,tf(),yt)}function sI(){for(;Pe!==null&&!ng();)m_(Pe)}function m_(a){var s=IN(a.alternate,a,Ta);a.memoizedProps=a.pendingProps,s===null?Lf(a):Pe=s}function p_(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=MN(u,s,s.pendingProps,s.type,void 0,De);break;case 11:s=MN(u,s,s.pendingProps,s.type.render,s.ref,De);break;case 5:ny(s);default:BN(u,s),s=Pe=hS(s,Ta),s=IN(u,s,Ta)}a.memoizedProps=a.pendingProps,s===null?Lf(a):Pe=s}function nl(a,s,u,m){ba=hs=null,ny(s),Go=null,Tu=0;var v=s.return;try{if(VL(a,v,s,u,De)){yt=1,Nf(a,fn(u,a.current)),Pe=null;return}}catch(j){if(v!==null)throw Pe=v,j;yt=1,Nf(a,fn(u,a.current)),Pe=null;return}s.flags&32768?(Le||m===1?a=!0:Jo||(De&536870912)!==0?a=!1:(pi=a=!0,(m===2||m===9||m===3||m===6)&&(m=Qr.current,m!==null&&m.tag===13&&(m.flags|=16384))),g_(s,a)):Lf(s)}function Lf(a){var s=a;do{if((s.flags&32768)!==0){g_(s,pi);return}a=s.return;var u=WL(s.alternate,s,Ta);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 g_(a,s){do{var u=ZL(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 y_(a,s,u,m,v,j,O,P,I){a.cancelPendingCommit=null;do If();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|=Tg,z$(a,u,j,O,P,I),a===rt&&(Pe=rt=null,De=0),tl=s,vi=a,Pa=u,Iy=j,zy=v,s_=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,cI(zd,function(){return w_(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=$.T,$.T=null,v=F.p,F.p=2,O=Ge,Ge|=4;try{JL(a,s,u)}finally{Ge=O,F.p=v,$.T=m}}kt=1,v_(),x_(),b_()}}function v_(){if(kt===1){kt=0;var a=vi,s=tl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=$.T,$.T=null;var m=F.p;F.p=2;var v=Ge;Ge|=4;try{ZN(s,a);var j=e0,O=aS(a.containerInfo),P=j.focusedElem,I=j.selectionRange;if(O!==P&&P&&P.ownerDocument&&nS(P.ownerDocument.documentElement,P)){if(I!==null&&_g(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=rS(P,Se),B=rS(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}}Xf=!!Jy,e0=Jy=null}finally{Ge=v,F.p=m,$.T=u}}a.current=s,kt=2}}function x_(){if(kt===2){kt=0;var a=vi,s=tl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=$.T,$.T=null;var m=F.p;F.p=2;var v=Ge;Ge|=4;try{YN(a,s.alternate,s)}finally{Ge=v,F.p=m,$.T=u}}kt=3}}function b_(){if(kt===4||kt===3){kt=0,Ld();var a=vi,s=tl,u=Pa,m=s_;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?kt=5:(kt=0,tl=vi=null,j_(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(yi=null),sg(u),s=s.stateNode,Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(fu,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=$.T,v=F.p,F.p=2,$.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{$.T=s,F.p=v}}(Pa&3)!==0&&If(),Qn(a),v=a.pendingLanes,(u&261930)!==0&&(v&42)!==0?a===By?Yu++:(Yu=0,By=a):Yu=0,Vu(0)}}function j_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Au(s)))}function If(){return v_(),x_(),b_(),w_()}function w_(){if(kt!==5)return!1;var a=vi,s=Iy;Iy=0;var u=sg(Pa),m=$.T,v=F.p;try{F.p=32>u?32:u,$.T=null,u=zy,zy=null;var j=vi,O=Pa;if(kt=0,tl=vi=null,Pa=0,(Ge&6)!==0)throw Error(n(331));var P=Ge;if(Ge|=4,n_(j.current),e_(j,j.current,O,u),Ge=P,Vu(0,!1),Kr&&typeof Kr.onPostCommitFiberRoot=="function")try{Kr.onPostCommitFiberRoot(fu,j)}catch{}return!0}finally{F.p=v,$.T=m,j_(a,s)}}function S_(a,s,u){s=fn(u,s),s=vy(a.stateNode,s,2),a=di(a,s,2),a!==null&&(mu(a,2),Qn(a))}function Qe(a,s,u){if(a.tag===3)S_(a,a,u);else for(;s!==null;){if(s.tag===3){S_(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(yi===null||!yi.has(m))){a=fn(u,a),u=NN(2),m=di(s,u,2),m!==null&&(_N(u,m,s,a),mu(m,2),Qn(m));break}}s=s.return}}function Fy(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new rI;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)||(ky=!0,v.add(u),a=oI.bind(null,a,s,u),s.then(a,a))}function oI(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>Te()-Mf?(Ge&2)===0&&rl(a,0):$y|=u,el===De&&(el=0)),Qn(a)}function N_(a,s){s===0&&(s=v1()),a=cs(a,s),a!==null&&(mu(a,s),Qn(a))}function lI(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),N_(a,u)}function uI(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),N_(a,u)}function cI(a,s){return du(a,s)}var zf=null,al=null,Hy=!1,Bf=!1,Ky=!1,bi=0;function Qn(a){a!==al&&a.next===null&&(al===null?zf=al=a:al=al.next=a),Bf=!0,Hy||(Hy=!0,fI())}function Vu(a,s){if(!Ky&&Bf){Ky=!0;do for(var u=!1,m=zf;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-Gr(42|a)+1)-1,j&=v&~(O&~P),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(u=!0,A_(m,j))}else j=De,j=Fd(m,m===rt?j:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(j&3)===0||hu(m,j)||(u=!0,A_(m,j));m=m.next}while(u);Ky=!1}}function dI(){__()}function __(){Bf=Hy=!1;var a=0;bi!==0&&wI()&&(a=bi);for(var s=Te(),u=null,m=zf;m!==null;){var v=m.next,j=O_(m,s);j===0?(m.next=null,u===null?zf=v:u.next=v,v===null&&(al=u)):(u=m,(a!==0||(j&3)!==0)&&(Bf=!0)),m=v}kt!==0&&kt!==5||Vu(a),bi!==0&&(bi=0)}function O_(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,v=a.expirationTimes,j=a.pendingLanes&-62914561;0<j;){var O=31-Gr(j),P=1<<O,I=v[O];I===-1?((P&u)===0||(P&m)!==0)&&(v[O]=I$(P,s)):I<=s&&(a.expiredLanes|=P),j&=~P}if(s=rt,u=De,u=Fd(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),sg(u)){case 2:case 8:u=Id;break;case 32:u=zd;break;case 268435456:u=y1;break;default:u=zd}return m=E_.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 E_(a,s){if(kt!==0&&kt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(If()&&a.callbackNode!==u)return null;var m=De;return m=Fd(a,a===rt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(l_(a,m,s),O_(a,Te()),a.callbackNode!=null&&a.callbackNode===u?E_.bind(null,a):null)}function A_(a,s){if(If())return null;l_(a,s,!0)}function fI(){NI(function(){(Ge&6)!==0?du(Kn,dI):__()})}function Gy(){if(bi===0){var a=Fo;a===0&&(a=Bd,Bd<<=1,(Bd&261888)===0&&(Bd=256)),bi=a}return bi}function C_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Yd(""+a)}function T_(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 hI(a,s,u,m,v){if(s==="submit"&&u&&u.stateNode===v){var j=C_((v[Tr]||null).action),O=m.submitter;O&&(s=(s=O[Tr]||null)?C_(s.formAction):O.getAttribute("formAction"),s!==null&&(j=s,O=null));var P=new Wd("action","action",null,m,v);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(bi!==0){var I=O?T_(v,O):new FormData(v);fy(u,{pending:!0,data:I,method:v.method,action:j},null,I)}}else typeof j=="function"&&(P.preventDefault(),I=O?T_(v,O):new FormData(v),fy(u,{pending:!0,data:I,method:v.method,action:j},j,I))},currentTarget:v}]})}}for(var Yy=0;Yy<Cg.length;Yy++){var Vy=Cg[Yy],mI=Vy.toLowerCase(),pI=Vy[0].toUpperCase()+Vy.slice(1);Mn(mI,"on"+pI)}Mn(oS,"onAnimationEnd"),Mn(lS,"onAnimationIteration"),Mn(uS,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(PL,"onTransitionRun"),Mn(ML,"onTransitionStart"),Mn(RL,"onTransitionCancel"),Mn(cS,"onTransitionEnd"),Co("onMouseEnter",["mouseout","mouseover"]),Co("onMouseLeave",["mouseout","mouseover"]),Co("onPointerEnter",["pointerout","pointerover"]),Co("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(" "),gI=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qu));function P_(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){ef(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){ef(ne)}v.currentTarget=null,j=I}}}}function Me(a,s){var u=s[og];u===void 0&&(u=s[og]=new Set);var m=a+"__bubble";u.has(m)||(M_(s,a,2,!1),u.add(m))}function Qy(a,s,u){var m=0;s&&(m|=4),M_(u,a,m,s)}var Uf="_reactListening"+Math.random().toString(36).slice(2);function Xy(a){if(!a[Uf]){a[Uf]=!0,_1.forEach(function(u){u!=="selectionchange"&&(gI.has(u)||Qy(u,!1,a),Qy(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Uf]||(s[Uf]=!0,Qy("selectionchange",!1,s))}}function M_(a,s,u,m){switch(oO(s)){case 2:var v=HI;break;case 8:v=KI;break;default:v=d0}u=v.bind(null,s,u,a),v=void 0,!gg||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 Wy(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}L1(function(){var V=j,ne=mg(u),se=[];e:{var W=dS.get(a);if(W!==void 0){var ee=Wd,me=a;switch(a){case"keypress":if(Qd(u)===0)break e;case"keydown":case"keyup":ee=uL;break;case"focusin":me="focus",ee=bg;break;case"focusout":me="blur",ee=bg;break;case"beforeblur":case"afterblur":ee=bg;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=B1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=W$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=fL;break;case oS:case lS:case uS:ee=eL;break;case cS:ee=mL;break;case"scroll":case"scrollend":ee=Q$;break;case"wheel":ee=gL;break;case"copy":case"cut":case"paste":ee=rL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=q1;break;case"toggle":case"beforetoggle":ee=vL}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!==hg&&(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=B1,ie="onMouseLeave",K="onMouseEnter",B="mouse",(a==="pointerout"||a==="pointerover")&&(Se=q1,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=yI,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&&R_(se,W,ee,Se,!1),me!==null&&et!==null&&R_(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=X1;else if(V1(W))if(W1)qe=AL;else{qe=OL;var ye=_L}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?V&&fg(V.elementType)&&(qe=X1):qe=EL;if(qe&&(qe=qe(a,V))){Q1(se,qe,u,ne);break e}ye&&ye(a,W,V),a==="focusout"&&V&&W.type==="number"&&V.memoizedProps.value!=null&&dg(W,"number",W.value)}switch(ye=V?gu(V):window,a){case"focusin":(V1(ye)||ye.contentEditable==="true")&&(ko=ye,Og=V,_u=null);break;case"focusout":_u=Og=ko=null;break;case"mousedown":Eg=!0;break;case"contextmenu":case"mouseup":case"dragend":Eg=!1,iS(se,u,ne);break;case"selectionchange":if(TL)break;case"keydown":case"keyup":iS(se,u,ne)}var Ce;if(wg)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?G1(a,u)&&(ke="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(ke="onCompositionStart");ke&&(F1&&u.locale!=="ko"&&(Do||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Do&&(Ce=I1()):(ai=ne,yg="value"in ai?ai.value:ai.textContent,Do=!0)),ye=qf(V,ke),0<ye.length&&(ke=new U1(ke,a,null,u,ne),se.push({event:ke,listeners:ye}),Ce?ke.data=Ce:(Ce=Y1(u),Ce!==null&&(ke.data=Ce)))),(Ce=bL?jL(a,u):wL(a,u))&&(ke=qf(V,"onBeforeInput"),0<ke.length&&(ye=new U1("onBeforeInput","beforeinput",null,u,ne),se.push({event:ye,listeners:ke}),ye.data=Ce)),hI(se,a,V,u,ne)}P_(se,s)})}function Xu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function qf(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 yI(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function R_(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 vI=/\r\n?/g,xI=/\u0000|\uFFFD/g;function D_(a){return(typeof a=="string"?a:""+a).replace(vI,`
49
+ `).replace(xI,"")}function k_(a,s){return s=D_(s),D_(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":Kd(a,"class",m);break;case"tabIndex":Kd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Kd(a,u,m);break;case"style":k1(a,m,j);break;case"data":if(s!=="object"){Kd(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=Yd(""+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=Yd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ga);break;case"onScroll":m!=null&&Me("scroll",a);break;case"onScrollEnd":m!=null&&Me("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=Yd(""+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":Me("beforetoggle",a),Me("toggle",a),Hd(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":Hd(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=Y$.get(u)||u,Hd(a,u,m))}}function Zy(a,s,u,m,v,j){switch(u){case"style":k1(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&&Me("scroll",a);break;case"onScrollEnd":m!=null&&Me("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(!O1.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[Tr]||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,""):Hd(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":Me("error",a),Me("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":Me("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)}}P1(a,j,P,I,V,O,v,!1);return;case"select":Me("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?To(a,!!m,s,!1):u!=null&&To(a,!!m,u,!0);return;case"textarea":Me("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)}R1(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":Me("beforetoggle",a),Me("toggle",a),Me("cancel",a),Me("close",a);break;case"iframe":case"object":Me("load",a);break;case"video":case"audio":for(m=0;m<Qu.length;m++)Me(Qu[m],a);break;case"image":Me("error",a),Me("load",a);break;case"details":Me("toggle",a);break;case"embed":case"source":case"link":Me("error",a),Me("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(fg(s)){for(ne in u)u.hasOwnProperty(ne)&&(m=u[ne],m!==void 0&&Zy(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 bI(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)}}cg(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?To(a,!!u,W,!1):!!m!=!!u&&(s!=null?To(a,!!u,s,!0):To(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)}M1(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(fg(s)){for(var et in u)W=u[et],u.hasOwnProperty(et)&&W!==void 0&&!m.hasOwnProperty(et)&&Zy(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||Zy(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 $_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jI(){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&&$_(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&&$_(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 Jy=null,e0=null;function Ff(a){return a.nodeType===9?a:a.ownerDocument}function L_(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 I_(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 t0(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 r0=null;function wI(){var a=window.event;return a&&a.type==="popstate"?a===r0?!1:(r0=a,!0):(r0=null,!1)}var z_=typeof setTimeout=="function"?setTimeout:void 0,SI=typeof clearTimeout=="function"?clearTimeout:void 0,B_=typeof Promise=="function"?Promise:void 0,NI=typeof queueMicrotask=="function"?queueMicrotask:typeof B_<"u"?function(a){return B_.resolve(null).then(a).catch(_I)}:z_;function _I(a){setTimeout(function(){throw a})}function ji(a){return a==="head"}function U_(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 q_(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 n0(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":n0(u),lg(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function OI(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 EI(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 F_(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 a0(a){return a.data==="$?"||a.data==="$~"}function i0(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function AI(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 s0=null;function H_(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 K_(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 G_(a,s,u){switch(s=Ff(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]);lg(a)}var vn=new Map,Y_=new Set;function Hf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ma=F.d;F.d={f:CI,r:TI,D:PI,C:MI,L:RI,m:DI,X:$I,S:kI,M:LI};function CI(){var a=Ma.f(),s=kf();return a||s}function TI(a){var s=Eo(a);s!==null&&s.tag===5&&s.type==="form"?cN(s):Ma.r(a)}var il=typeof document>"u"?null:document;function V_(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+'"]'),Y_.has(v)||(Y_.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 PI(a){Ma.D(a),V_("dns-prefetch",a,null)}function MI(a,s){Ma.C(a,s),V_("preconnect",a,s)}function RI(a,s,u){Ma.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 DI(a,s){Ma.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 kI(a,s,u){Ma.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))&&o0(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,Kf(O,s,m)}O={type:"stylesheet",instance:O,count:1,state:P},v.set(j,O)}}}function $I(a,s){Ma.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))&&l0(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 LI(a,s){Ma.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))&&l0(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 Q_(a,s,u,m){var v=(v=xe.current)?Hf(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||II(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 X_(a){return g({},a,{"data-precedence":a.precedence,precedence:null})}function II(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 W_(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),Kf(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=X_(u),(v=vn.get(v))&&o0(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,Kf(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),l0(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,Kf(m,u.precedence,a));return s.instance}function Kf(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 o0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function l0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Gf=null;function Z_(a,s,u){if(Gf===null){var m=new Map,v=Gf=new Map;v.set(u,m)}else v=Gf,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 J_(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function zI(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 eO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function BI(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=Yf.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=j,qt(j);return}j=s.ownerDocument||s,m=X_(m),(v=vn.get(v))&&o0(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=Yf.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var u0=0;function UI(a,s){return a.stylesheets&&a.count===0&&Qf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Qf(a,a.stylesheets),a.unsuspend){var j=a.unsuspend;a.unsuspend=null,j()}},6e4+s);0<a.imgBytes&&u0===0&&(u0=62500*jI());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Qf(a,a.stylesheets),a.unsuspend)){var j=a.unsuspend;a.unsuspend=null,j()}},(a.imgBytes>u0?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(v)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Vf=null;function Qf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Vf=new Map,s.forEach(qI,a),Vf=null,Yf.call(a))}function qI(a,s){if(!(s.state.loading&4)){var u=Vf.get(a);if(u)var m=u.get(null);else{u=new Map,Vf.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=Yf.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:C,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function FI(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=ag(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ag(0),this.hiddenUpdates=ag(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 tO(a,s,u,m,v,j,O,P,I,V,ne,se){return a=new FI(a,s,u,O,I,V,ne,se,P),s=1,j===!0&&(s|=24),j=Vr(3,null,null,s),a.current=j,j.stateNode=a,s=qg(),s.refCount++,a.pooledCache=s,s.refCount++,j.memoizedState={element:m,isDehydrated:u,cache:s},Gg(j),a}function rO(a){return a?(a=Io,a):Io}function nO(a,s,u,m,v,j){v=rO(v),m.context===null?m.context=v:m.pendingContext=v,m=ci(s),m.payload={element:u},j=j===void 0?null:j,j!==null&&(m.callback=j),u=di(a,m,s),u!==null&&($r(u,a,s),Mu(u,a,s))}function aO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function c0(a,s){aO(a,s),(a=a.alternate)&&aO(a,s)}function iO(a){if(a.tag===13||a.tag===31){var s=cs(a,67108864);s!==null&&$r(s,a,67108864),c0(a,67108864)}}function sO(a){if(a.tag===13||a.tag===31){var s=Jr();s=ig(s);var u=cs(a,s);u!==null&&$r(u,a,s),c0(a,s)}}var Xf=!0;function HI(a,s,u,m){var v=$.T;$.T=null;var j=F.p;try{F.p=2,d0(a,s,u,m)}finally{F.p=j,$.T=v}}function KI(a,s,u,m){var v=$.T;$.T=null;var j=F.p;try{F.p=8,d0(a,s,u,m)}finally{F.p=j,$.T=v}}function d0(a,s,u,m){if(Xf){var v=f0(m);if(v===null)Wy(a,s,m,Wf,u),lO(a,m);else if(YI(v,a,s,u,m))m.stopPropagation();else if(lO(a,m),s&4&&-1<GI.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-Gr(O);P.entanglements[1]|=I,O&=~I}Qn(j),(Ge&6)===0&&(Rf=Te()+500,Vu(0))}}break;case 31:case 13:P=cs(j,2),P!==null&&$r(P,j,2),kf(),c0(j,2)}if(j=f0(m),j===null&&Wy(a,s,m,Wf,u),j===v)break;v=j}v!==null&&m.stopPropagation()}else Wy(a,s,m,null,u)}}function f0(a){return a=mg(a),h0(a)}var Wf=null;function h0(a){if(Wf=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=d(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 Wf=a,null}function oO(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 Id:return 8;case zd:case M$:return 32;case y1:return 268435456;default:return 32}default:return 32}}var m0=!1,wi=null,Si=null,Ni=null,tc=new Map,rc=new Map,_i=[],GI="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 lO(a,s){switch(a){case"focusin":case"focusout":wi=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":Ni=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&&iO(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function YI(a,s,u,m,v){switch(s){case"focusin":return wi=nc(wi,a,s,u,m,v),!0;case"dragenter":return Si=nc(Si,a,s,u,m,v),!0;case"mouseover":return Ni=nc(Ni,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 uO(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,S1(a.priority,function(){sO(u)});return}}else if(s===31){if(s=d(u),s!==null){a.blockedOn=s,S1(a.priority,function(){sO(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 Zf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=f0(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);hg=m,u.target.dispatchEvent(m),hg=null}else return s=Eo(u),s!==null&&iO(s),a.blockedOn=u,!1;s.shift()}return!0}function cO(a,s,u){Zf(a)&&u.delete(s)}function VI(){m0=!1,wi!==null&&Zf(wi)&&(wi=null),Si!==null&&Zf(Si)&&(Si=null),Ni!==null&&Zf(Ni)&&(Ni=null),tc.forEach(cO),rc.forEach(cO)}function Jf(a,s){a.blockedOn===s&&(a.blockedOn=null,m0||(m0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,VI)))}var eh=null;function dO(a){eh!==a&&(eh=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){eh===a&&(eh=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(h0(m||u)===null)continue;break}var j=Eo(u);j!==null&&(a.splice(s,3),s-=3,fy(j,{pending:!0,data:v,method:u.method,action:m},m,v))}}))}function ll(a){function s(I){return Jf(I,a)}wi!==null&&Jf(wi,a),Si!==null&&Jf(Si,a),Ni!==null&&Jf(Ni,a),tc.forEach(s),rc.forEach(s);for(var u=0;u<_i.length;u++){var m=_i[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<_i.length&&(u=_i[0],u.blockedOn===null);)uO(u),u.blockedOn===null&&_i.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[Tr]||null;if(typeof j=="function")O||dO(u);else if(O){var P=null;if(j&&j.hasAttribute("formAction")){if(v=j,O=j[Tr]||null)P=O.formAction;else if(h0(v)!==null)continue}else P=O.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),dO(u)}}}function fO(){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 p0(a){this._internalRoot=a}th.prototype.render=p0.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,m=Jr();nO(u,m,a,s,null,null)},th.prototype.unmount=p0.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;nO(a.current,2,null,a,null,null),kf(),s[_o]=null}};function th(a){this._internalRoot=a}th.prototype.unstable_scheduleHydration=function(a){if(a){var s=w1();a={blockedOn:null,target:a,priority:s};for(var u=0;u<_i.length&&s!==0&&s<_i[u].priority;u++);_i.splice(u,0,a),u===0&&uO(a)}};var hO=t.version;if(hO!=="19.2.4")throw Error(n(527,hO,"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=h(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var QI={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rh.isDisabled&&rh.supportsFiber)try{fu=rh.inject(QI),Kr=rh}catch{}}return ic.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,m="",v=bN,j=jN,O=wN;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=tO(a,1,!1,null,null,u,m,null,v,j,O,fO),a[_o]=s.current,Xy(a),new p0(s)},ic.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var m=!1,v="",j=bN,O=jN,P=wN,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=tO(a,1,!0,s,u??null,m,v,I,j,O,P,fO),s.context=rO(null),u=s.current,m=Jr(),m=ig(m),v=ci(m),v.callback=null,di(u,v,m),u=m,s.current.lanes=u,mu(s,u),Qn(s),a[_o]=s.current,Xy(a),new th(s)},ic.version="19.2.4",ic}var NO;function lz(){if(NO)return b0.exports;NO=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(),b0.exports=oz(),b0.exports}var uz=lz(),dd=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,$i,Cl,P2,cz=(P2=class extends dd{constructor(){super();Ne(this,zs);Ne(this,$i);Ne(this,Cl);fe(this,Cl,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){q(this,$i)||this.setEventListener(q(this,Cl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,$i))==null||t.call(this),fe(this,$i,void 0))}setEventListener(t){var r;fe(this,Cl,t),(r=q(this,$i))==null||r.call(this),fe(this,$i,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,$i=new WeakMap,Cl=new WeakMap,P2),Qb=new cz,dz={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Li,Vb,M2,fz=(M2=class{constructor(){Ne(this,Li,dz);Ne(this,Vb,!1)}setTimeoutProvider(e){fe(this,Li,e)}setTimeout(e,t){return q(this,Li).setTimeout(e,t)}clearTimeout(e){q(this,Li).clearTimeout(e)}setInterval(e,t){return q(this,Li).setInterval(e,t)}clearInterval(e){q(this,Li).clearInterval(e)}},Li=new WeakMap,Vb=new WeakMap,M2),Ps=new fz;function hz(e){setTimeout(e,0)}var mz=typeof window>"u"||"Deno"in globalThis;function Ir(){}function pz(e,t){return typeof e=="function"?e(t):e}function Ox(e){return typeof e=="number"&&e>=0&&e!==1/0}function q2(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 _O(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:l,stale:d}=e;if(l){if(n){if(t.queryHash!==Xb(l,t.options))return!1}else if(!Pc(t.queryKey,l))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||i&&i!==t.state.fetchStatus||o&&!o(t))}function OO(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Tc(t.options.mutationKey)!==Tc(o))return!1}else if(!Pc(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Xb(e,t){return((t==null?void 0:t.queryKeyHashFn)||Tc)(e)}function Tc(e){return JSON.stringify(e,(t,r)=>Ax(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 gz=Object.prototype.hasOwnProperty;function F2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=EO(e)&&EO(t);if(!n&&!(Ax(e)&&Ax(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),d=l.length,f=n?new Array(d):{};let h=0;for(let p=0;p<d;p++){const g=n?p:l[p],y=e[g],x=t[g];if(y===x){f[g]=y,(n?p<o:gz.call(e,g))&&h++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){f[g]=x;continue}const b=F2(y,x,r+1);f[g]=b,b===y&&h++}return o===d&&h===o?e:f}function Ex(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 EO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ax(e){if(!AO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!AO(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function AO(e){return Object.prototype.toString.call(e)==="[object Object]"}function yz(e){return new Promise(t=>{Ps.setTimeout(t,e)})}function Cx(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?F2(e,t):t}function vz(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function xz(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Wb=Symbol();function H2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Wb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function K2(e,t){return typeof e=="function"?e(...t):!!e}function bz(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 Mc=(()=>{let e=()=>mz;return{isServer(){return e()},setIsServer(t){e=t}}})();function Tx(){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 jz=hz;function wz(){let e=[],t=0,r=d=>{d()},n=d=>{d()},i=jz;const o=d=>{t?e.push(d):i(()=>{r(d)})},l=()=>{const d=e;e=[],d.length&&i(()=>{n(()=>{d.forEach(f=>{r(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||l()}return f},batchCalls:d=>(...f)=>{o(()=>{d(...f)})},schedule:o,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d},setScheduler:d=>{i=d}}}var or=wz(),Tl,Ii,Pl,R2,Sz=(R2=class extends dd{constructor(){super();Ne(this,Tl,!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,Tl)!==t&&(fe(this,Tl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return q(this,Tl)}},Tl=new WeakMap,Ii=new WeakMap,Pl=new WeakMap,R2),zh=new Sz;function Nz(e){return Math.min(1e3*2**e,3e4)}function G2(e){return(e??"online")==="online"?zh.isOnline():!0}var Px=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Y2(e){let t=!1,r=0,n;const i=Tx(),o=()=>i.status!=="pending",l=w=>{var N;if(!o()){const _=new Px(w);y(_),(N=e.onCancel)==null||N.call(e,_)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>Qb.isFocused()&&(e.networkMode==="always"||zh.isOnline())&&e.canRun(),p=()=>G2(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()||h())&&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 M;if(o())return;const E=e.retry??(Mc.isServer()?0:3),C=e.retryDelay??Nz,A=typeof C=="function"?C(r,_):C,T=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,_);if(t||!T){y(_);return}r++,(M=e.onFail)==null||M.call(e,r,_),yz(A).then(()=>h()?void 0:x()).then(()=>{t?y(_):b()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(n==null||n(),i),cancelRetry:d,continueRetry:f,canStart:p,start:()=>(p()?b():x().then(b),i)}}var Bs,D2,V2=(D2=class{constructor(){Ne(this,Bs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ox(this.gcTime)&&fe(this,Bs,Ps.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Mc.isServer()?1/0:300*1e3))}clearGcTimeout(){q(this,Bs)&&(Ps.clearTimeout(q(this,Bs)),fe(this,Bs,void 0))}},Bs=new WeakMap,D2),Us,Ml,Sn,qs,Ht,sd,Fs,tn,Q2,Ra,k2,_z=(k2=class extends V2{constructor(t){super();Ne(this,tn);Ne(this,Us);Ne(this,Ml);Ne(this,Sn);Ne(this,qs);Ne(this,Ht);Ne(this,sd);Ne(this,Fs);fe(this,Fs,!1),fe(this,sd,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,TO(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,sd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=TO(this.options);r.data!==void 0&&(this.setState(CO(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=Cx(this.state.data,t,this.options);return $e(this,tn,Ra).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){$e(this,tn,Ra).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===Wb||!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:!q2(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)||$e(this,tn,Q2).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||$e(this,tn,Ra).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,p,g,y,x,b,w,N,_,E,C;if(this.state.fetchStatus!=="idle"&&((f=q(this,Ht))==null?void 0:f.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(T=>T.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=H2(this.options,r),M=(()=>{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,M,this):A(M)},d=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:q(this,qs),state:this.state,fetchFn:o};return i(A),A})();(h=this.options.behavior)==null||h.onFetch(d,this),fe(this,Ml,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=d.fetchOptions)==null?void 0:p.meta))&&$e(this,tn,Ra).call(this,{type:"fetch",meta:(g=d.fetchOptions)==null?void 0:g.meta}),fe(this,Ht,Y2({initialPromise:r==null?void 0:r.initialPromise,fn:d.fetchFn,onCancel:A=>{A instanceof Px&&A.revert&&this.setState({...q(this,Ml),fetchStatus:"idle"}),n.abort()},onFail:(A,T)=>{$e(this,tn,Ra).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{$e(this,tn,Ra).call(this,{type:"pause"})},onContinue:()=>{$e(this,tn,Ra).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.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 Px){if(A.silent)return q(this,Ht).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw $e(this,tn,Ra).call(this,{type:"error",error:A}),(_=(N=q(this,Sn).config).onError)==null||_.call(N,A,this),(C=(E=q(this,Sn).config).onSettled)==null||C.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Us=new WeakMap,Ml=new WeakMap,Sn=new WeakMap,qs=new WeakMap,Ht=new WeakMap,sd=new WeakMap,Fs=new WeakMap,tn=new WeakSet,Q2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ra=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,...X2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...CO(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Ml,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})})},k2);function X2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:G2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function CO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function TO(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 Lr,Ie,od,Sr,Hs,Rl,ka,zi,ld,Dl,kl,Ks,Gs,Bi,$l,Ye,wc,Mx,Rx,Dx,kx,$x,Lx,Ix,Z2,$2,W2=($2=class extends dd{constructor(t,r){super();Ne(this,Ye);Ne(this,Lr);Ne(this,Ie);Ne(this,od);Ne(this,Sr);Ne(this,Hs);Ne(this,Rl);Ne(this,ka);Ne(this,zi);Ne(this,ld);Ne(this,Dl);Ne(this,kl);Ne(this,Ks);Ne(this,Gs);Ne(this,Bi);Ne(this,$l,new Set);this.options=r,fe(this,Lr,t),fe(this,zi,null),fe(this,ka,Tx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,Ie).addObserver(this),PO(q(this,Ie),this.options)?$e(this,Ye,wc).call(this):this.updateResult(),$e(this,Ye,kx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zx(q(this,Ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zx(q(this,Ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Ye,$x).call(this),$e(this,Ye,Lx).call(this),q(this,Ie).removeObserver(this)}setOptions(t){const r=this.options,n=q(this,Ie);if(this.options=q(this,Lr).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");$e(this,Ye,Ix).call(this),q(this,Ie).setOptions(this.options),r._defaulted&&!Ex(this.options,r)&&q(this,Lr).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,Ie),observer:this});const i=this.hasListeners();i&&MO(q(this,Ie),n,this.options,r)&&$e(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)))&&$e(this,Ye,Mx).call(this);const o=$e(this,Ye,Rx).call(this);i&&(q(this,Ie)!==n||Nn(this.options.enabled,q(this,Ie))!==Nn(r.enabled,q(this,Ie))||o!==q(this,Bi))&&$e(this,Ye,Dx).call(this,o)}getOptimisticResult(t){const r=q(this,Lr).getQueryCache().build(q(this,Lr),t),n=this.createResult(r,t);return Ez(this,n)&&(fe(this,Sr,n),fe(this,Rl,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,$l).add(t)}getCurrentQuery(){return q(this,Ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=q(this,Lr).defaultQueryOptions(t),n=q(this,Lr).getQueryCache().build(q(this,Lr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return $e(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),d=q(this,Rl),h=t!==n?t.state:q(this,od),{state:p}=t;let g={...p},y=!1,x;if(r._optimisticResults){const k=this.hasListeners(),H=!k&&PO(t,r),U=k&&MO(t,n,r,i);(H||U)&&(g={...g,...X2(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===(d==null?void 0:d.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=Cx(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,ld))x=q(this,Dl);else try{fe(this,ld,r.select),x=r.select(x),x=Cx(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",C=N==="pending",A=N==="error",T=C&&E,M=x!==void 0,R={status:N,fetchStatus:g.fetchStatus,isPending:C,isSuccess:N==="success",isError:A,isInitialLoading:T,isLoading:T,data:x,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!C,isLoadingError:A&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:A&&M,isStale:Zb(t,r),refetch:this.refetch,promise:q(this,ka),isEnabled:Nn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=R.data!==void 0,H=R.status==="error"&&!k,U=G=>{H?G.reject(R.error):k&&G.resolve(R.data)},ae=()=>{const G=fe(this,ka,R.promise=Tx());U(G)},Z=q(this,ka);switch(Z.status){case"pending":t.queryHash===n.queryHash&&U(Z);break;case"fulfilled":(H||R.data!==Z.value)&&ae();break;case"rejected":(!H||R.error!==Z.reason)&&ae();break}}return R}updateResult(){const t=q(this,Sr),r=this.createResult(q(this,Ie),this.options);if(fe(this,Hs,q(this,Ie).state),fe(this,Rl,this.options),q(this,Hs).data!==void 0&&fe(this,kl,q(this,Ie)),Ex(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,$l).size)return!0;const l=new Set(o??q(this,$l));return this.options.throwOnError&&l.add("error"),Object.keys(q(this,Sr)).some(d=>{const f=d;return q(this,Sr)[f]!==t[f]&&l.has(f)})};$e(this,Ye,Z2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Ye,kx).call(this)}},Lr=new WeakMap,Ie=new WeakMap,od=new WeakMap,Sr=new WeakMap,Hs=new WeakMap,Rl=new WeakMap,ka=new WeakMap,zi=new WeakMap,ld=new WeakMap,Dl=new WeakMap,kl=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Bi=new WeakMap,$l=new WeakMap,Ye=new WeakSet,wc=function(t){$e(this,Ye,Ix).call(this);let r=q(this,Ie).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ir)),r},Mx=function(){$e(this,Ye,$x).call(this);const t=Yi(this.options.staleTime,q(this,Ie));if(Mc.isServer()||q(this,Sr).isStale||!Ox(t))return;const n=q2(q(this,Sr).dataUpdatedAt,t)+1;fe(this,Ks,Ps.setTimeout(()=>{q(this,Sr).isStale||this.updateResult()},n))},Rx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,Ie)):this.options.refetchInterval)??!1},Dx=function(t){$e(this,Ye,Lx).call(this),fe(this,Bi,t),!(Mc.isServer()||Nn(this.options.enabled,q(this,Ie))===!1||!Ox(q(this,Bi))||q(this,Bi)===0)&&fe(this,Gs,Ps.setInterval(()=>{(this.options.refetchIntervalInBackground||Qb.isFocused())&&$e(this,Ye,wc).call(this)},q(this,Bi)))},kx=function(){$e(this,Ye,Mx).call(this),$e(this,Ye,Dx).call(this,$e(this,Ye,Rx).call(this))},$x=function(){q(this,Ks)&&(Ps.clearTimeout(q(this,Ks)),fe(this,Ks,void 0))},Lx=function(){q(this,Gs)&&(Ps.clearInterval(q(this,Gs)),fe(this,Gs,void 0))},Ix=function(){const t=q(this,Lr).getQueryCache().build(q(this,Lr),this.options);if(t===q(this,Ie))return;const r=q(this,Ie);fe(this,Ie,t),fe(this,od,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Z2=function(t){or.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(q(this,Sr))}),q(this,Lr).getQueryCache().notify({query:q(this,Ie),type:"observerResultsUpdated"})})},$2);function Oz(e,t){return Nn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function PO(e,t){return Oz(e,t)||e.state.data!==void 0&&zx(e,t,t.refetchOnMount)}function zx(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&&Zb(e,t)}return!1}function MO(e,t,r,n){return(e!==t||Nn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Zb(e,r)}function Zb(e,t){return Nn(t.enabled,e)!==!1&&e.isStaleByTime(Yi(t.staleTime,e))}function Ez(e,t){return!Ex(e.getCurrentResult(),t)}function Bh(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 d={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const N=C=>{bz(C,()=>t.signal,()=>w=!0)},_=H2(t.options,t.fetchOptions),E=async(C,A,T)=>{if(w)return Promise.reject();if(A==null&&C.pages.length)return Promise.resolve(C);const D=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return N(H),H})(),R=await _(D),{maxPages:z}=t.options,k=T?xz:vz;return{pages:k(C.pages,R,z),pageParams:k(C.pageParams,A,z)}};if(i&&o.length){const C=i==="backward",A=C?J2:Bx,T={pages:o,pageParams:l},M=A(n,T);d=await E(T,M,C)}else{const C=e??o.length;do{const A=f===0?l[0]??n.initialPageParam:Bx(n,d);if(f>0&&A==null)break;d=await E(d,A),f++}while(f<C)}return d};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function Bx(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 J2(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 Az(e,t){return t?Bx(e,t)!=null:!1}function Cz(e,t){return!t||!e.getPreviousPageParam?!1:J2(e,t)!=null}var Tz=class extends W2{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:Bh()})}getOptimisticResult(e){return e.behavior=Bh(),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:d}=n,f=(w=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,h=l&&f==="forward",p=i&&f==="forward",g=l&&f==="backward",y=i&&f==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Az(t,r.data),hasPreviousPage:Cz(t,r.data),isFetchNextPageError:h,isFetchingNextPage:p,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:d&&!h&&!g,isRefetching:o&&!p&&!y}}},ud,ea,gr,Ys,ta,Ci,L2,Pz=(L2=class extends V2{constructor(t){super();Ne(this,ta);Ne(this,ud);Ne(this,ea);Ne(this,gr);Ne(this,Ys);fe(this,ud,t.client),this.mutationId=t.mutationId,fe(this,gr,t.mutationCache),fe(this,ea,[]),this.state=t.state||Mz(),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,d,f,h,p,g,y,x,b,w,N,_,E,C,A,T,M,D;const r=()=>{$e(this,ta,Ci).call(this,{type:"continue"})},n={client:q(this,ud),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Ys,Y2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(R,z)=>{$e(this,ta,Ci).call(this,{type:"failed",failureCount:R,error:z})},onPause:()=>{$e(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{$e(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((d=(l=this.options).onMutate)==null?void 0:d.call(l,t,n));z!==this.state.context&&$e(this,ta,Ci).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const R=await q(this,Ys).start();return await((h=(f=q(this,gr).config).onSuccess)==null?void 0:h.call(f,R,t,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,R,t,this.state.context,n)),await((x=(y=q(this,gr).config).onSettled)==null?void 0:x.call(y,R,null,this.state.variables,this.state.context,this,n)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,R,null,t,this.state.context,n)),$e(this,ta,Ci).call(this,{type:"success",data:R}),R}catch(R){try{await((_=(N=q(this,gr).config).onError)==null?void 0:_.call(N,R,t,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((C=(E=this.options).onError)==null?void 0:C.call(E,R,t,this.state.context,n))}catch(z){Promise.reject(z)}try{await((T=(A=q(this,gr).config).onSettled)==null?void 0:T.call(A,void 0,R,this.state.variables,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((D=(M=this.options).onSettled)==null?void 0:D.call(M,void 0,R,t,this.state.context,n))}catch(z){Promise.reject(z)}throw $e(this,ta,Ci).call(this,{type:"error",error:R}),R}finally{q(this,gr).runNext(this)}}},ud=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})})},L2);function Mz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $a,kn,cd,I2,Rz=(I2=class extends dd{constructor(t={}){super();Ne(this,$a);Ne(this,kn);Ne(this,cd);this.config=t,fe(this,$a,new Set),fe(this,kn,new Map),fe(this,cd,0)}build(t,r,n){const i=new Pz({client:t,mutationCache:this,mutationId:++nh(this,cd)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){q(this,$a).add(t);const r=ah(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,$a).delete(t)){const r=ah(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=ah(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=ah(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,$a).forEach(t=>{this.notify({type:"removed",mutation:t})}),q(this,$a).clear(),q(this,kn).clear()})}getAll(){return Array.from(q(this,$a))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>OO(r,n))}findAll(t={}){return this.getAll().filter(r=>OO(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))))}},$a=new WeakMap,kn=new WeakMap,cd=new WeakMap,I2);function ah(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ra,z2,Dz=(z2=class extends dd{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??Xb(i,r);let l=this.get(o);return l||(l=new _z({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=>_O(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>_O(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,z2),vt,Ui,qi,Ll,Il,Fi,zl,Bl,B2,kz=(B2=class{constructor(e={}){Ne(this,vt);Ne(this,Ui);Ne(this,qi);Ne(this,Ll);Ne(this,Il);Ne(this,Fi);Ne(this,zl);Ne(this,Bl);fe(this,vt,e.queryCache||new Dz),fe(this,Ui,e.mutationCache||new Rz),fe(this,qi,e.defaultOptions||{}),fe(this,Ll,new Map),fe(this,Il,new Map),fe(this,Fi,0)}mount(){nh(this,Fi)._++,q(this,Fi)===1&&(fe(this,zl,Qb.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,vt).onFocus())})),fe(this,Bl,zh.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,vt).onOnline())})))}unmount(){var e,t;nh(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=pz(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=Bh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ir).catch(Ir)}ensureInfiniteQueryData(e){return e.behavior=Bh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zh.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,Ll).set(Tc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...q(this,Ll).values()],r={};return t.forEach(n=>{Pc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){q(this,Il).set(Tc(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=Xb(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===Wb&&(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,Ll=new WeakMap,Il=new WeakMap,Fi=new WeakMap,zl=new WeakMap,Bl=new WeakMap,B2),eM=S.createContext(void 0),ho=e=>{const t=S.useContext(eM);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$z=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(eM.Provider,{value:e,children:t})),tM=S.createContext(!1),Lz=()=>S.useContext(tM);tM.Provider;function Iz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zz=S.createContext(Iz()),Bz=()=>S.useContext(zz),Uz=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?K2(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},qz=e=>{S.useEffect(()=>{e.clearReset()},[e])},Fz=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||K2(r,[e.error,n])),Hz=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))}},Kz=(e,t)=>e.isLoading&&e.isFetching&&!t,Gz=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,RO=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function rM(e,t,r){var y,x,b,w;const n=Lz(),i=Bz(),o=ho(),l=o.defaultQueryOptions(e);(x=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||x.call(y,l);const d=o.getQueryCache().get(l.queryHash);l._optimisticResults=n?"isRestoring":"optimistic",Hz(l),Uz(l,i,d),qz(i);const f=!o.getQueryCache().get(l.queryHash),[h]=S.useState(()=>new t(o,l)),p=h.getOptimisticResult(l),g=!n&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const _=g?h.subscribe(or.batchCalls(N)):Ir;return h.updateResult(),_},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(l)},[l,h]),Gz(l,p))throw RO(l,h,i);if(Fz({result:p,errorResetBoundary:i,throwOnError:l.throwOnError,query:d,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&&!Mc.isServer()&&Kz(p,n)){const N=f?RO(l,h,i):d==null?void 0:d.promise;N==null||N.catch(Ir).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?p:h.trackResult(p)}function Ue(e,t){return rM(e,W2)}function nM(e,t){return rM(e,Tz)}var Sc=typeof window<"u"?S.useLayoutEffect:S.useEffect;function N0(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 Yz(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 Vz(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var aM=!1;function Rc(e){return e[e.length-1]}function Qz(e){return typeof e=="function"}function Hi(e,t){return Qz(e)?e(t):e}var Xz=Object.prototype.hasOwnProperty,DO=Object.prototype.propertyIsEnumerable,Wz=()=>Object.create(null),Ss=(e,t)=>Ia(e,t,Wz);function Ia(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,o=LO(e)&&LO(i);if(!o&&!(ql(e)&&ql(i)))return i;const l=o?e:kO(e);if(!l)return i;const d=o?i:kO(i);if(!d)return i;const f=l.length,h=d.length,p=o?new Array(h):r();let g=0;for(let y=0;y<h;y++){const x=o?y:d[y],b=e[x],w=i[x];if(b===w){p[x]=b,(o?y<f:Xz.call(e,x))&&g++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[x]=w;continue}const N=Ia(b,w,r,n+1);p[x]=N,N===b&&g++}return f===h&&g===f?e:p}function kO(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!DO.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(!DO.call(e,i))return!1;n.push(i)}return n}function ql(e){if(!$O(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!$O(r)||!r.hasOwnProperty("isPrototypeOf"))}function $O(e){return Object.prototype.toString.call(e)==="[object Object]"}function LO(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 Zz(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function IO(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 Zz(t)}var Jz=["http:","https:","mailto:","tel:"];function Uh(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+=IO(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+IO(r?e.slice(r):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function e8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function t8(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 Ua(){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 f=r;t.delete(f.key),f.next&&(r=f.next,f.next.prev=void 0),f===n&&(n=void 0)}const d=t.get(o);if(d)d.value=l,i(d);else{const f={key:o,value:l,prev:n};n&&(n.next=f),n=f,r||(r=f),t.set(o,f)}},clear(){t.clear(),r=void 0,n=void 0}}}var Ms=4,iM=5;function r8(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 Jb(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 d=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=d,r[4]=d,r[5]=d,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=r8(o);if(l){const[d,f]=l,h=o.charCodeAt(d+1);if(h===45){if(d+2<o.length&&o.charCodeAt(d+2)===36){const p=d+3,g=f;if(p<g)return r[0]=3,r[1]=t+d,r[2]=t+p,r[3]=t+g,r[4]=t+f+1,r[5]=i,r}}else if(h===36){const p=d+1,g=d+2;return g===f?(r[0]=2,r[1]=t+d,r[2]=t+p,r[3]=t+g,r[4]=t+f+1,r[5]=e.length,r):(r[0]=1,r[1]=t+d,r[2]=t+g,r[3]=t+f,r[4]=t+f+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 Qm(e,t,r,n,i,o,l){var f,h,p,g,y,x,b,w,N,_,E,C,A;l==null||l(r);let d=n;{const T=r.fullPath??r.from,M=T.length,D=((f=r.options)==null?void 0:f.caseSensitive)??e,R=!!((p=(h=r.options)==null?void 0:h.params)!=null&&p.parse&&((y=(g=r.options)==null?void 0:g.skipRouteOnParseError)!=null&&y.params));for(;d<M;){const k=Jb(T,d,t);let H;const U=d,ae=k[5];switch(d=ae+1,o++,k[0]){case 0:{const Z=T.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 $=Rs(r.fullPath??r.from);$.parent=i,$.depth=o,H=$,i.static.set(Z,$)}}else{const G=Z.toLowerCase(),$=(b=i.staticInsensitive)==null?void 0:b.get(G);if($)H=$;else{i.staticInsensitive??(i.staticInsensitive=new Map);const F=Rs(r.fullPath??r.from);F.parent=i,F.depth=o,H=F,i.staticInsensitive.set(G,F)}}break}case 1:{const Z=T.substring(U,k[1]),G=T.substring(k[4],ae),$=D&&!!(Z||G),F=Z?$?Z:Z.toLowerCase():void 0,J=G?$?G:G.toLowerCase():void 0,re=!R&&((w=i.dynamic)==null?void 0:w.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===$&&oe.prefix===F&&oe.suffix===J));if(re)H=re;else{const oe=O0(1,r.fullPath??r.from,$,F,J);H=oe,oe.depth=o,oe.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(oe)}break}case 3:{const Z=T.substring(U,k[1]),G=T.substring(k[4],ae),$=D&&!!(Z||G),F=Z?$?Z:Z.toLowerCase():void 0,J=G?$?G:G.toLowerCase():void 0,re=!R&&((N=i.optional)==null?void 0:N.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===$&&oe.prefix===F&&oe.suffix===J));if(re)H=re;else{const oe=O0(3,r.fullPath??r.from,$,F,J);H=oe,oe.parent=i,oe.depth=o,i.optional??(i.optional=[]),i.optional.push(oe)}break}case 2:{const Z=T.substring(U,k[1]),G=T.substring(k[4],ae),$=D&&!!(Z||G),F=Z?$?Z:Z.toLowerCase():void 0,J=G?$?G:G.toLowerCase():void 0,re=O0(2,r.fullPath??r.from,$,F,J);H=re,re.parent=i,re.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(re)}}i=H}if(R&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const k=Rs(r.fullPath??r.from);k.kind=iM,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&&T.endsWith("/")){const k=Rs(r.fullPath??r.from);k.kind=Ms,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=R,i.parsingPriority=((A=(C=r.options)==null?void 0:C.skipRouteOnParseError)==null?void 0:A.priority)??0,z&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const T of r.children)Qm(e,t,T,d,i,o,l)}function _0(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 Ti(e){var t,r,n;if(e.pathless)for(const i of e.pathless)Ti(i);if(e.static)for(const i of e.static.values())Ti(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Ti(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(_0);for(const i of e.dynamic)Ti(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(_0);for(const i of e.optional)Ti(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(_0);for(const i of e.wildcard)Ti(i)}}function Rs(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 O0(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 n8(e,t){const r=Rs("/"),n=new Uint16Array(6);for(const i of e)Qm(!1,n,i,1,r,0);Ti(r),t.masksTree=r,t.flatCache=kc(1e3)}function a8(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=ej(e,t.masksTree);return t.flatCache.set(e,n),n}function i8(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=Rs("/"),Qm(t,new Uint16Array(6),{from:e},1,l,0),i.singleCache.set(o,l)),ej(n,l,r)}function s8(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=ej(e,t.segmentTree,r)}catch(l){if(l instanceof URIError)o=null;else throw l}return o&&(o.branch=u8(o.route)),t.matchCache.set(n,o),o}function o8(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function l8(e,t=!1,r){const n=Rs(e.fullPath),i=new Uint16Array(6),o={},l={};let d=0;return Qm(t,i,e,1,n,0,f=>{if(r==null||r(f,d),f.id in o&&Ua(),o[f.id]=f,d!==0&&f.path){const h=o8(f.fullPath);(!l[h]||f.fullPath.endsWith("/"))&&(l[h]=f)}d++}),Ti(n),{processedTree:{segmentTree:n,singleCache:kc(1e3),matchCache:kc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:l}}function ej(e,t,r=!1){const n=e.split("/"),i=d8(e,n,t,r);if(!i)return null;const[o]=sM(e,n,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function sM(e,t,r){var p,g,y,x,b,w,N,_,E,C;const n=c8(r.node);let i=null;const o=Object.create(null);let l=((p=r.extract)==null?void 0:p.part)??0,d=((g=r.extract)==null?void 0:g.node)??0,f=((y=r.extract)==null?void 0:y.path)??0,h=((x=r.extract)==null?void 0:x.segment)??0;for(;d<n.length;l++,d++,f++,h++){const A=n[d];if(A.kind===Ms)break;if(A.kind===iM){h--,l--,f--;continue}const T=t[l],M=f;if(T&&(f+=T.length),A.kind===1){i??(i=r.node.fullPath.split("/"));const D=i[h],R=((b=A.prefix)==null?void 0:b.length)??0;if(D.charCodeAt(R)===123){const z=((w=A.suffix)==null?void 0:w.length)??0,k=D.substring(R+2,D.length-z-1),H=T.substring(R,T.length-z);o[k]=decodeURIComponent(H)}else{const z=D.substring(1);o[z]=decodeURIComponent(T)}}else if(A.kind===3){if(r.skipped&1<<d){l--,f=M-1;continue}i??(i=r.node.fullPath.split("/"));const D=i[h],R=((N=A.prefix)==null?void 0:N.length)??0,z=((_=A.suffix)==null?void 0:_.length)??0,k=D.substring(R+3,D.length-z-1),H=A.suffix||A.prefix?T.substring(R,T.length-z):T;H&&(o[k]=decodeURIComponent(H))}else if(A.kind===2){const D=A,R=e.substring(M+(((E=D.prefix)==null?void 0:E.length)??0),e.length-(((C=D.suffix)==null?void 0:C.length)??0)),z=decodeURIComponent(R);o["*"]=z,o._splat=z;break}}return r.rawParams&&Object.assign(o,r.rawParams),[o,{part:l,node:d,path:f,segment:h}]}function u8(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function c8(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function d8(e,t,r,n){if(e==="/"&&r.index)return{node:r.index,skipped:0};const i=!Rc(t),o=i&&e!=="/",l=t.length-(i?1:0),d=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,p=null;for(;d.length;){const g=d.pop(),{node:y,index:x,skipped:b,depth:w,statics:N,dynamics:_,optionals:E}=g;let{extract:C,rawParams:A,parsedParams:T}=g;if(y.skipOnParamError){if(!E0(e,t,g))continue;A=g.rawParams,C=g.extract,T=g.parsedParams}n&&y.route&&y.kind!==Ms&&oc(h,g)&&(h=g);const M=x===l;if(M&&(y.route&&!o&&oc(p,g)&&(p=g),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const D=M?void 0:t[x];let R;if(M&&y.index){const z={node:y.index,index:x,skipped:b,depth:w+1,statics:N,dynamics:_,optionals:E,extract:C,rawParams:A,parsedParams:T};let k=!0;if(y.index.skipOnParamError&&(E0(e,t,z)||(k=!1)),k){if(N===l&&!_&&!E&&!b)return z;oc(p,z)&&(p=z)}}if(y.wildcard&&oc(f,g))for(const z of y.wildcard){const{prefix:k,suffix:H}=z;if(k&&(M||!(z.caseSensitive?D:R??(R=D.toLowerCase())).startsWith(k)))continue;if(H){if(M)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:C,rawParams:A,parsedParams:T};if(!(z.skipOnParamError&&!E0(e,t,U))){f=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];d.push({node:U,index:x,skipped:z,depth:k,statics:N,dynamics:_,optionals:E,extract:C,rawParams:A,parsedParams:T})}if(!M)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:R??(R=D.toLowerCase());if(ae&&!G.startsWith(ae)||Z&&!G.endsWith(Z))continue}d.push({node:U,index:x+1,skipped:b,depth:k,statics:N,dynamics:_,optionals:E+1,extract:C,rawParams:A,parsedParams:T})}}if(!M&&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:R??(R=D.toLowerCase());if(H&&!ae.startsWith(H)||U&&!ae.endsWith(U))continue}d.push({node:k,index:x+1,skipped:b,depth:w+1,statics:N,dynamics:_+1,optionals:E,extract:C,rawParams:A,parsedParams:T})}if(!M&&y.staticInsensitive){const z=y.staticInsensitive.get(R??(R=D.toLowerCase()));z&&d.push({node:z,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:E,extract:C,rawParams:A,parsedParams:T})}if(!M&&y.static){const z=y.static.get(D);z&&d.push({node:z,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:E,extract:C,rawParams:A,parsedParams:T})}if(y.pathless){const z=w+1;for(let k=y.pathless.length-1;k>=0;k--){const H=y.pathless[k];d.push({node:H,index:x,skipped:b,depth:z,statics:N,dynamics:_,optionals:E,extract:C,rawParams:A,parsedParams:T})}}}if(p&&f)return oc(f,p)?p:f;if(p)return p;if(f)return f;if(n&&h){let g=h.index;for(let x=0;x<h.index;x++)g+=t[x].length;const y=g===e.length?"/":e.slice(g);return h.rawParams??(h.rawParams=Object.create(null)),h.rawParams["**"]=decodeURIComponent(y),h}return null}function E0(e,t,r){try{const[n,i]=sM(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===Ms)>(e.node.kind===Ms)||t.node.kind===Ms==(e.node.kind===Ms)&&t.depth>e.depth))):!0}function Ch(e){return tj(e.filter(t=>t!==void 0).join("/"))}function tj(e){return e.replace(/\/{2,}/g,"/")}function oM(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 lM(e){return Vi(oM(e))}function qh(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function f8(e,t,r){return qh(e,r)===qh(t,r)}function h8({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 d;if(o)d=e.split("/");else if(i)d=t.split("/");else{for(d=e.split("/");d.length>1&&Rc(d)==="";)d.pop();const g=t.split("/");for(let y=0,x=g.length;y<x;y++){const b=g[y];b===""?y?y===x-1&&d.push(b):d=[b]:b===".."?d.pop():b==="."||d.push(b)}}d.length>1&&(Rc(d)===""?r==="never"&&d.pop():r==="always"&&d.push(""));let f,h="";for(let g=0;g<d.length;g++){g>0&&(h+="/");const y=d[g];if(!y)continue;f=Jb(y,0,f);const x=f[0];if(x===0){h+=y;continue}const b=f[5],w=y.substring(0,f[1]),N=y.substring(f[4],b),_=y.substring(f[2],f[3]);x===1?h+=w||N?`${w}{$${_}}${N}`:`$${_}`:x===2?h+=w||N?`${w}{$}${N}`:"$":h+=`${w}{-$${_}}${N}`}h=tj(h);const p=h||"/";return l&&n&&n.set(l,p),p}function m8(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 A0(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=>BO(i,r)).join("/"):BO(n,r)}function zO({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 d=0,f,h="";for(;d<l;){const p=d;f=Jb(e,p,f);const g=f[5];if(d=g+1,p===g)continue;const y=f[0];if(y===0){h+="/"+e.substring(p,g);continue}if(y===2){const x=t._splat;o._splat=x,o["*"]=x;const b=e.substring(p,f[1]),w=e.substring(f[4],g);if(!x){i=!0,(b||w)&&(h+="/"+b+w);continue}const N=A0("_splat",t,r);h+="/"+b+N+w;continue}if(y===1){const x=e.substring(f[2],f[3]);!i&&!(x in t)&&(i=!0),o[x]=t[x];const b=e.substring(p,f[1]),w=e.substring(f[4],g),N=A0(x,t,r)??"undefined";h+="/"+b+N+w;continue}if(y===3){const x=e.substring(f[2],f[3]),b=t[x];if(b==null)continue;o[x]=b;const w=e.substring(p,f[1]),N=e.substring(f[4],g),_=A0(x,t,r)??"";h+="/"+w+_+N;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:o,interpolatedPath:h||"/",isMissingParams:i}}function BO(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function Or(e){return!!(e!=null&&e.isNotFound)}function p8(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var g8="tsr-scroll-restoration-v1_3";function y8(){const e=p8();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(g8,JSON.stringify(t))}catch{}}}}var UO=y8(),v8=e=>e.state.__TSR_key||e.href;function x8(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 ih=!1,lc="window",qO="data-scroll-restoration-id";function b8(e,t){if(!UO)return;const r=UO;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,ih=!1;const n=e.options.getScrollRestorationKey||v8,i=new Map;window.history.scrollRestoration="manual";const o=d=>{if(!(ih||!e.isScrollRestoring))if(d.target===document||d.target===window)i.set(lc,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const f=d.target;i.set(f,{scrollX:f.scrollLeft||0,scrollY:f.scrollTop||0})}},l=d=>{var h;if(!e.isScrollRestoring||!d||i.size===0||!r)return;const f=(h=r.state)[d]||(h[d]={});for(const[p,g]of i){let y;if(p===lc)y=lc;else if(p.isConnected){const x=p.getAttribute(qO);y=x?`[${qO}="${x}"]`:x8(p)}y&&(f[y]=g)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",d=>{l(d.fromLocation?n(d.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{l(n(e.stores.resolvedLocation.state??e.stores.location.state)),r.persist()}),e.subscribe("onRendered",d=>{var g;const f=n(d.toLocation),h=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}))){ih=!0;try{const y=e.isScrollRestoring?r.state[f]: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:h}),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:h};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{ih=!1}e.isScrollRestoring&&r.set(y=>(y[f]||(y[f]={}),y))}})}function j8(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 C0(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function w8(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]=C0(i):Array.isArray(o)?o.push(C0(i)):r[n]=[o,C0(i)]}return r}var S8=_8(JSON.parse),N8=O8(JSON.stringify,JSON.parse);function _8(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=w8(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function O8(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=j8(i,n);return o?`?${o}`:""}}var Qs="__root__";function rj(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 E8(e){return{input:({url:t})=>{for(const r of e)t=Ux(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=uM(e[r],t);return t}}}function A8(e){const t=lM(e.basepath),r=`/${t}`,n=`${r}/`,i=e.caseSensitive?r:r.toLowerCase(),o=e.caseSensitive?n:n.toLowerCase();return{input:({url:l})=>{const d=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return d===i?l.pathname="/":d.startsWith(o)&&(l.pathname=l.pathname.slice(r.length)),l},output:({url:l})=>(l.pathname=Ch(["/",t,l.pathname]),l)}}function Ux(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 uM(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 C8(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:i,init:o}=t,l=new Map,d=new Map,f=new Map,h=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([]),C=r([]),A=n(()=>T0(l,_.state)),T=n(()=>T0(d,E.state)),M=n(()=>T0(f,C.state)),D=n(()=>_.state[0]),R=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:h.state}}),k=n(()=>({status:h.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=l.get(oe);if(L&&L.routeId===F)return L.state}}),H.set(F,J)),J}const ae={status:h,loadedAt:p,isLoading:g,isTransitioning:y,location:x,resolvedLocation:b,statusCode:w,redirect:N,matchesId:_,pendingMatchesId:E,cachedMatchesId:C,activeMatchesSnapshot:A,pendingMatchesSnapshot:T,cachedMatchesSnapshot:M,firstMatchId:D,hasPendingMatches:R,matchRouteReactivity:z,activeMatchStoresById:l,pendingMatchStoresById:d,cachedMatchStoresById:f,__store:k,getMatchStoreByRouteId:U,setActiveMatches:Z,setPendingMatches:G,setCachedMatches:$};Z(e.matches),o==null||o(ae);function Z(F){P0(F,l,_,r,i)}function G(F){P0(F,d,E,r,i)}function $(F){P0(F,f,C,r,i)}return ae}function T0(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function P0(e,t,r,n,i){const o=e.map(d=>d.id),l=new Set(o);i(()=>{for(const d of t.keys())l.has(d)||t.delete(d);for(const d of e){const f=t.get(d.id);if(!f){const h=n(d);h.routeId=d.routeId,t.set(d.id,h);continue}f.routeId=d.routeId,f.state!==d&&f.setState(()=>d)}t8(r.state,o)||r.setState(()=>o)})}var qx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},T8=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Xm=(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 d=e.router.getMatch(l.id);d&&Object.assign(n,d.__routeContext,d.__beforeLoadContext)}return n},FO=(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 d=e.matches[l];if(e.router.looseRoutesById[d.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},cM=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},HO=(e,t,r)=>{const n=Xs(e,r);e.updateMatch(t,i=>({...i,context:n}))},uc=(e,t,r,n)=>{var d,f;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{(f=(d=l.options).onError)==null||f.call(d,r)}catch(h){r=h,Ki(e,e.router.getMatch(i),r)}e.updateMatch(i,h=>{var p,g;return(p=h._nonReactive.beforeLoadPromise)==null||p.resolve(),h._nonReactive.beforeLoadPromise=void 0,(g=h._nonReactive.loadPromise)==null||g.resolve(),{...h,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!zr(r)&&!Or(r)&&(e.serialError??(e.serialError=r))},dM=(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&&!Xm(e,t)&&(r.options.loader||r.options.beforeLoad||hM(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const l=setTimeout(()=>{qx(e)},i);n._nonReactive.pendingTimeout=l}},P8=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;dM(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()},M8=(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:d}=i;l&&uc(e,r,l,"PARSE_PARAMS"),d&&uc(e,r,d,"VALIDATE_SEARCH"),dM(e,t,n,i);const f=new AbortController;let h=!1;const p=()=>{h||(h=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:f})))},g=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,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=Xm(e,t),_={search:x,abortController:f,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,T=>({...T,__beforeLoadContext:A})),g()})};let C;try{if(C=n.options.beforeLoad(_),Dc(C))return p(),C.catch(A=>{uc(e,r,A,"BEFORE_LOAD")}).then(E)}catch(A){p(),uc(e,r,A,"BEFORE_LOAD")}E(C)},R8=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],o=()=>d(),l=()=>M8(e,r,t,i),d=()=>{if(cM(e,r))return;const f=P8(e,r,i);return Dc(f)?f.then(l):l()};return o()},D8=(e,t,r)=>{var o,l,d,f,h,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),(f=(d=r.options).scripts)==null?void 0:f.call(d,i),(p=(h=r.options).headers)==null?void 0:p.call(h,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}))},fM=(e,t,r,n,i)=>{const o=t[n-1],{params:l,loaderDeps:d,abortController:f,cause:h}=e.router.getMatch(r),p=Xs(e,n),g=Xm(e,r);return{params:l,deps:d,preload:!!g,parentMatchPromise:o,abortController:f,context:p,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:g?"preload":h,route:i,...e.router.options.additionalContext}},KO=async(e,t,r,n,i)=>{var o,l,d,f,h;try{const p=e.router.getMatch(r);try{(!(aM??e.router.isServer)||p.ssr===!0)&&$c(i);const g=i.options.loader,y=typeof g=="function"?g:g==null?void 0:g.handler,x=y==null?void 0:y(fM(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((d=(l=i.options.notFoundComponent)==null?void 0:l.preload)==null?void 0:d.call(l)),Ki(e,e.router.getMatch(r),g);try{(h=(f=i.options).onError)==null||h.call(f,g)}catch(b){y=b,Ki(e,e.router.getMatch(r),b)}!zr(y)&&!Or(y)&&await $c(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)}},k8=async(e,t,r)=>{var x,b,w,N;async function n(_,E,C,A,T){const M=Date.now()-E.updatedAt,D=_?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,R=T.options.shouldReload,z=typeof R=="function"?R(fM(e,t,i,r,T)):R,{status:k,invalid:H}=A,U=M>=D&&(!!e.forceStaleReload||A.cause==="enter"||C!==void 0&&C!==A.id);l=k==="success"&&(H||(z??U)),_&&T.options.preload===!1||(l&&!e.sync&&p?(d=!0,(async()=>{var ae,Z;try{await KO(e,t,i,r,T);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 KO(e,t,i,r,T):HO(e,i,r))}const{id:i,routeId:o}=e.matches[r];let l=!1,d=!1;const f=e.router.looseRoutesById[o],h=f.options.loader,p=((typeof h=="function"||h==null?void 0:h.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(cM(e,i)){if(!e.router.getMatch(i))return e.matches[r];HO(e,i,r)}else{const _=e.router.getMatch(i),E=e.router.stores.matchesId.state[r],C=((x=E&&e.router.stores.activeMatchStoresById.get(E)||null)==null?void 0:x.routeId)===o?E:(b=e.router.stores.activeMatchesSnapshot.state.find(T=>T.routeId===o))==null?void 0:b.id,A=Xm(e,i);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&p)return _;await _._nonReactive.loaderPromise;const T=e.router.getMatch(i),M=T._nonReactive.error||T.error;M&&Ki(e,T,M),T.status==="pending"&&await n(A,_,C,T,f)}else{const T=A&&!e.router.stores.activeMatchStoresById.has(i),M=e.router.getMatch(i);M._nonReactive.loaderPromise=Fl(),T!==M.preload&&e.updateMatch(i,D=>({...D,preload:T})),await n(A,_,C,M,f)}}const g=e.router.getMatch(i);d||((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,d||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const y=d?g.isFetching:!1;return y!==g.isFetching||g.invalid!==!1?(e.updateMatch(i,_=>({..._,isFetching:y,invalid:!1})),e.router.getMatch(i)):g};async function GO(e){var y,x;const t=e,r=[];T8(t.router)&&qx(t);let n;for(let b=0;b<t.matches.length;b++){try{const w=R8(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?FO(t,n):void 0,l=n&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let d,f;for(let b=0;b<l;b++)r.push(k8(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)?d??(d=N):f??(f=N)}if(f!==void 0)throw f}const h=d??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!h&&n&&t.preload)return t.matches;if(h){const b=FO(t,h);b===void 0&&Ua();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=_),h.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,C=>({...C,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:h},isFetching:!1})),p=b,await $c(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 $c(b,["errorComponent"])}for(let b=0;b<=p;b++){const{id:w,routeId:N}=t.matches[b],_=t.router.looseRoutesById[N];try{const E=D8(t,w,_);if(E){const C=await E;t.updateMatch(w,A=>({...A,...C}))}}catch(E){console.error(`Error executing head for route ${N}:`,E)}}const g=qx(t);if(Dc(g)&&await g,h)throw h;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function YO(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 $c(e,t=Th){!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===Th?(()=>{if(e._componentsPromise===void 0){const n=YO(e,Th);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():YO(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function hM(e){var t;for(const r of Th)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var Th=["component","errorComponent","pendingComponent","notFoundComponent"],Qi="__TSR_index",VO="popstate",QO="beforeunload";function $8(e){let t=e.getLocation();const r=new Set,n=l=>{t=e.getLocation(),r.forEach(d=>d({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?n(l):t=e.getLocation()},o=async({task:l,navigateOpts:d,...f})=>{var g,y;if((d==null?void 0:d.ignoreBlocker)??!1){l();return}const h=((g=e.getBlockers)==null?void 0:g.call(e))??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&h.length&&p)for(const x of h){const b=Fh(f.path,f.state);if(await x.blockerFn({currentLocation:t,nextLocation:b,action:f.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,d,f)=>{const h=t.state[Qi];d=XO(h+1,d),o({task:()=>{e.pushState(l,d),n({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:l,state:d})},replace:(l,d,f)=>{const h=t.state[Qi];d=XO(h,d),o({task:()=>{e.replaceState(l,d),n({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:l,state:d})},go:(l,d)=>{o({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:d,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 f;if(!e.setBlockers)return()=>{};const d=((f=e.getBlockers)==null?void 0:f.call(e))??[];return e.setBlockers([...d,l]),()=>{var p,g;const h=((p=e.getBlockers)==null?void 0:p.call(e))??[];(g=e.setBlockers)==null||g.call(e,h.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 XO(e,t){t||(t={});const r=nj();return{...t,key:r,__TSR_key:r,[Qi]:e}}function L8(e){var R,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,d=(k=>k),f=(()=>Fh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((R=t.history.state)!=null&&R.__TSR_key)&&!((z=t.history.state)!=null&&z.key)){const k=nj();t.history.replaceState({[Qi]:0,key:k,__TSR_key:k},"")}let h=f(),p,g=!1,y=!1,x=!1,b=!1;const w=()=>h;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)},C=(k,H,U)=>{const ae=d(H);_||(p=h),h=Fh(H,U),N={href:ae,state:U,isPush:(N==null?void 0:N.isPush)||k==="push"},_||(_=Promise.resolve().then(()=>E()))},A=k=>{h=f(),D.notify({type:k})},T=async()=>{if(y){y=!1;return}const k=f(),H=k.state[Qi]-h.state[Qi],U=H===1,ae=H===-1,Z=!U&&!ae||g;g=!1;const G=Z?"GO":ae?"BACK":"FORWARD",$=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:h,nextLocation:k,action:G})){y=!0,t.history.go(1),D.notify($);return}}}h=f(),D.notify($)},M=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=$8({getLocation:w,getLength:()=>t.history.length,pushState:(k,H)=>C("push",k,H),replaceState:(k,H)=>C("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=>d(k),flush:E,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(QO,M,{capture:!0}),t.removeEventListener(VO,T)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(QO,M,{capture:!0}),t.addEventListener(VO,T),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 I8(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Fh(e,t){const r=I8(e),n=r.indexOf("#"),i=r.indexOf("?"),o=nj();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 nj(){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 z8=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=m8(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=L8()),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=C8(U8(this.latestLocation),g),b8(this)}let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(o||i!==f||l!==h){this.basepath=f;const g=[],y=lM(f);y&&y!=="/"&&g.push(A8({basepath:f})),h&&g.push(h),this.rewrite=g.length===0?void 0:g.length===1?g[0]:E8(g),this.history&&this.updateLatestLocation(),d=!0}d&&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=l8(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&n8(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:f,search:h,hash:p,href:g,state:y})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const _=this.options.parseSearch(h),E=this.options.stringifySearch(_);return{href:f+E+p,publicHref:g,pathname:sc(f).path,external:!1,searchStr:E,search:Ss(n==null?void 0:n.search,_),hash:sc(p.slice(1)).path,state:Ia(n==null?void 0:n.state,y)}}const x=new URL(g,this.origin),b=Ux(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:Ia(n==null?void 0:n.state,y)}},o=i(r),{__tempLocation:l,__tempKey:d}=o.state;if(l&&(!d||d===this.tempLocationKey)){const f=i(l);return f.state.key=o.state.key,f.state.__TSR_key=o.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:o}}return o},this.resolvePathWithBase=(r,n)=>h8({base:r,to:tj(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=>q8({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,d=this.matchRoutesLightweight(l);o.from;const f=o.unsafeRelative==="path"?l.pathname:o.from??d.fullPath,h=this.resolvePathWithBase(f,"."),p=d.search,g=Object.assign(Object.create(null),d.params),y=o.to?this.resolvePathWithBase(h,`${o.to}`):this.resolvePathWithBase(h,"."),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(zO({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,Ph(ae.options.validateSearch,{...U,..._}))}catch{}}),_=U}_=F8({search:_,dest:o,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),_=Ss(p,_);const E=this.options.stringifySearch(_),C=o.hash===!0?l.hash:o.hash?Hi(o.hash,l.hash):void 0,A=C?`#${C}`:"";let T=o.state===!0?l.state:o.state?Hi(o.state,l.state):{};T=Ia(l.state,T);const M=`${N}${E}${A}`;let D,R,z=!1;if(this.rewrite){const U=new URL(M,this.origin),ae=uM(this.rewrite,U);D=U.href.replace(U.origin,""),ae.origin!==this.origin?(R=ae.href,z=!0):R=ae.pathname+ae.search+ae.hash}else D=e8(M),R=D;return{publicHref:R,href:D,pathname:N,search:_,searchStr:E,state:T,hash:C??"",external:z,unmaskOnReload:o.unmaskOnReload}},i=(o={},l)=>{const d=n(o);let f=l?n(l):void 0;if(!f){const h=Object.create(null);if(this.options.routeMasks){const p=a8(d.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:g,params:y,...x}=p.route,b=y===!1||y===null?Object.create(null):(y??!0)===!0?h:Object.assign(h,Hi(y,h));l={from:r.from,...x,params:b},f=n(l)}}}return f&&(d.maskedLocation=f),d};return r.mask?i(r,{from:r.from,...r.mask}):i(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:n,...i})=>{const o=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(p=>{i.state[p]=this.latestLocation.state[p]});const h=Vs(i.state,this.latestLocation.state);return f.forEach(p=>{delete i.state[p]}),h},l=Vi(this.latestLocation.href)===Vi(i.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=Fl(()=>{d==null||d.resolve(),d=void 0}),l&&o())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...p}=i;f&&(p={...f,state:{...f.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=h??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:d,...f}={})=>{if(d){const g=this.history.location.state.__TSR_index,y=Fh(d,{__TSR_index:r?g:g+1}),x=new URL(y.pathname,this.origin);f.to=Ux(this.rewrite,x).pathname,f.search=this.options.parseSearch(y.search),f.hash=y.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:o,replace:r,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:n,href:i,publicHref:o,...l})=>{var f,h;let d=!1;if(i)try{new URL(`${i}`),d=!0}catch{}if(d&&!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=!d&&o?o:i;if(Uh(p,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const g=((h=(f=this.history).getBlockers)==null?void 0:h.call(f))??[];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(f=>{this.startTransition(async()=>{var h;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 GO({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 C=this.stores.pendingMatchesSnapshot.state,A=C.length,T=this.stores.activeMatchesSnapshot.state;x=A?T.filter(R=>!this.stores.pendingMatchStoresById.has(R.id)):null;const M=new Set;for(const R of this.stores.pendingMatchStoresById.values())R.routeId&&M.add(R.routeId);const D=new Set;for(const R of this.stores.activeMatchStoresById.values())R.routeId&&D.add(R.routeId);b=A?T.filter(R=>!M.has(R.routeId)):null,w=A?C.filter(R=>!D.has(R.routeId)):null,N=A?C.filter(R=>D.has(R.routeId)):T,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),A&&(this.stores.setActiveMatches(C),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(R=>R.status!=="error"&&R.status!=="notFound"&&R.status!=="redirected")]),this.clearExpiredCache())});for(const[C,A]of[[b,"onLeave"],[w,"onEnter"],[N,"onStay"]])if(C)for(const T of C)(E=(_=this.looseRoutesById[T.routeId].options)[A])==null||E.call(_,T)})})}})}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&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.activeMatchesSnapshot.state.some(f=>f.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.setState(()=>d)},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,d=typeof n.types=="function"?n.types(Nl(o,l)):n.types;if(d===!1){r();return}i={update:r,types:d}}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 d=n(l.state);d.status==="redirected"?this.stores.cachedMatchStoresById.delete(r)&&this.stores.cachedMatchesId.setState(f=>f.filter(h=>h!==r)):l.setState(()=>d)}})},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&&Uh(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=$c,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]),d=i.filter(f=>!l.has(f.id));if(d.length){const f=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...f,...d])}try{return i=await GO({router:this,matches:i,location:n,preload:!0,updateMatch:(f,h)=>{o.has(f)?i=i.map(p=>p.id===f?h(p):p):this.updateMatch(f,h)}}),i}catch(f){if(zr(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:n});Or(f)||console.error(f);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,d=i8(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,l.pathname,this.processedTree);return!d||r.params&&!Vs(d.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Vs(l.search,o.search,{partial:!0})?d.rawParams:!1:d.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??N8,parseSearch:e.parseSearch??S8,protocolAllowlist:e.protocolAllowlist??Jz}),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,d=!1;(n?n.path!=="/"&&i["**"]:Vi(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:d=!0);const f=d?K8(this.options.notFoundMode,l):void 0,h=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=h[x-1];let N,_,E;{const G=(w==null?void 0:w.search)??e.search,$=(w==null?void 0:w._strictSearch)??void 0;try{const F=Ph(b.options.validateSearch,{...G})??void 0;N={...G,...F},_={...$,...F},E=void 0}catch(F){let J=F;if(F instanceof Hh||(J=new Hh(F.message,{cause:F})),t!=null&&t.throwOnError)throw J;N=G,_={},E=J}}const C=((y=(g=b.options).loaderDeps)==null?void 0:y.call(g,{search:N}))??"",A=C?JSON.stringify(C):"",{interpolatedPath:T,usedParams:M}=zO({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),D=b.id+T+A,R=this.getMatch(D),z=p.get(b.id),k=(R==null?void 0:R._strictParams)??M;let H;if(!R)try{WO(b,M,o,k)}catch(G){if(Or(G)||zr(G)?H=G:H=new B8(G.message,{cause:G}),t!=null&&t.throwOnError)throw H}Object.assign(i,k);const U=z?"stay":"enter";let ae;if(R)ae={...R,cause:U,params:(z==null?void 0:z.params)??i,_strictParams:k,search:Ss(z?z.search:R.search,N),_strictSearch:_};else{const G=b.options.loader||b.options.beforeLoad||b.lazyFn||hM(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:T,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?Ia(z.loaderDeps,C):C,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=f===b.id),ae.searchError=E;const Z=this.getParentContext(w);ae.context={...Z,...ae.__routeContext,...ae.__beforeLoadContext},h[x]=ae}for(let x=0;x<h.length;x++){const b=h[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=h[x-1],C=this.getParentContext(E);if(w.options.context){const A={deps:b.loaderDeps,params:b.params,context:C??{},location:e,navigate:T=>this.navigate({...T,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:h,routeId:w.id};b.__routeContext=w.options.context(A)??void 0}b.context={...C,...b.__routeContext,...b.__beforeLoadContext}}}return h}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=Rc(t),o={...e.search};for(const g of t)try{Object.assign(o,Ph(g.options.validateSearch,o))}catch{}const l=Rc(this.stores.matchesId.state),d=l&&((p=this.stores.activeMatchStoresById.get(l))==null?void 0:p.state),f=d&&d.routeId===i.id&&d.pathname===e.pathname;let h;if(f)h=d.params;else{const g=Object.assign(Object.create(null),r);for(const y of t)try{WO(y,r,n??{},g)}catch{}h=g}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:h}}},Hh=class extends Error{},B8=class extends Error{};function U8(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ph(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Hh("Async validation not supported");if(r.issues)throw new Hh(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 q8({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Vi(e);let o,l;const d=s8(i,r,!0);return d&&(o=d.route,Object.assign(n,d.rawParams),l=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:(d==null?void 0:d.branch)||[t.__root__],routeParams:n,foundRoute:o,parsedParams:l}}function F8({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return H8(r)(e,t,n??!1)}function H8(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:d,next:f})=>{let h=d;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(h=o.options.preSearchFilters.reduce((g,y)=>y(g),d));const p=f(h);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:d,next:f})=>{const h=f(d);if(!t._includeValidateSearch)return h;try{return{...h,...Ph(o.options.validateSearch,h)??void 0}}catch{return h}};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,d)=>{if(o>=d.length)return l;const f=d[o];return f({search:l,next:p=>n(o+1,p,d)})};return function(l,d,f){return t.dest=d,t._includeValidateSearch=f,n(0,l,t.middlewares)}}function K8(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 WO(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 G8="Error preloading route! ☝️",mM=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 f,h;this.originalIndex=t.originalIndex;const r=this.options,n=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(h=(f=this.options).getParentRoute)==null?void 0:h.call(f),n?this._path=Qs:this.parentRoute||Ua();let i=n?Qs:r==null?void 0:r.path;i&&i!=="/"&&(i=oM(i));const o=(r==null?void 0:r.id)||i;let l=n?Qs:Ch([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),l!=="__root__"&&(l=Ch(["/",l]));const d=l==="__root__"?"/":Ch([this.parentRoute.fullPath,i]);this._path=i,this._id=l,this._fullPath=d,this._to=Vi(d)},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=>rj({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.")}},Y8=class extends mM{constructor(e){super(e)}};function V8(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 aj(e){const t=e.errorComponent??ij;return c.jsx(Q8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?S.createElement(t,{error:r,reset:n}):e.children})}var Q8=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 ij({error:e}){const[t,r]=S.useState(!1);return c.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[c.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),c.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"})]}),c.jsx("div",{style:{height:".25rem"}}),t?c.jsx("div",{children:c.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?c.jsx("code",{children:e.message}):null})}):null]})}function X8({children:e,fallback:t=null}){return pM()?c.jsx(Ul.Fragment,{children:e}):c.jsx(Ul.Fragment,{children:t})}function pM(){return Ul.useSyncExternalStore(W8,()=>!0,()=>!1)}function W8(){return()=>{}}var gM=S.createContext(null);function xr(e){return S.useContext(gM)}var Wm=S.createContext(void 0),Z8=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 J8({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:o,checkDirty:l,shallowPropagate:d};function n(h,p,g){const y=p.depsTail;if(y!==void 0&&y.dep===h)return;const x=y!==void 0?y.nextDep:p.deps;if(x!==void 0&&x.dep===h){x.version=g,p.depsTail=x;return}const b=h.subsTail;if(b!==void 0&&b.version===g&&b.sub===p)return;const w=p.depsTail=h.subsTail={version:g,dep:h,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:h.subs=w}function i(h,p=h.sub){const g=h.dep,y=h.prevDep,x=h.nextDep,b=h.nextSub,w=h.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(h){let p=h.nextSub,g;e:do{const y=h.sub;let x=y.flags;if(x&60?x&12?x&4?!(x&48)&&f(h,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=(h=b).nextSub;w!==void 0&&(g={value:p,prev:g},p=w);continue}}if((h=p)!==void 0){p=h.nextSub;continue}for(;g!==void 0;)if(h=g.value,g=g.prev,h!==void 0){p=h.nextSub;continue e}break}while(!0)}function l(h,p){let g,y=0,x=!1;e:do{const b=h.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&&d(N),x=!0}}else if((w&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(g={value:h,prev:g}),h=b.deps,p=b,++y;continue}if(!x){const N=h.nextDep;if(N!==void 0){h=N;continue}}for(;y--;){const N=p.subs,_=N.nextSub!==void 0;if(_?(h=g.value,g=g.prev):h=N,x){if(e(p)){_&&d(N),p=h.sub;continue}x=!1}else p.flags&=-33;p=h.sub;const E=h.nextDep;if(E!==void 0){h=E;continue e}}return x}while(!0)}function d(h){do{const p=h.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&t(p))}while((h=h.nextSub)!==void 0)}function f(h,p){let g=p.depsTail;for(;g!==void 0;){if(g===h)return!0;g=g.prevDep}return!1}}function sj(e,t,r){var o,l,d;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:(d=n?e.complete:r)==null?void 0:d.bind(i)}}const Fx=[];let Mh=0;const{link:ZO,unlink:eB,propagate:tB,checkDirty:yM,shallowPropagate:JO}=J8({update(e){return e._update()},notify(e){Fx[Hx++]=e,e.flags&=~ft.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ft.Mutable|ft.Dirty,Kh(e))}});let sh=0,Hx=0,Jn,Kx=0;function vM(e){try{++Kx,e()}finally{--Kx||xM()}}function Kh(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=eB(r,e)}function xM(){if(!(Kx>0)){for(;sh<Hx;){const e=Fx[sh];Fx[sh++]=void 0,e.notify()}sh=0,Hx=0}}function bM(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&&ZO(i,Jn,Mh),i._snapshot},subscribe(o){const l=sj(o),d={current:!1},f=rB(()=>{var h;i.get(),d.current?(h=l.next)==null||h.call(l,i._snapshot):d.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(o){const l=Jn,d=Object.is;if(r)Jn=i,++Mh,i.depsTail=void 0;else if(o===void 0)return!1;r&&(i.flags=ft.Mutable|ft.RecursedCheck);try{const f=i._snapshot,h=typeof o=="function"?o(f):o===void 0&&r?n(f):o;return f===void 0||!d(f,h)?(i._snapshot=h,!0):!1}finally{Jn=l,r&&(i.flags&=~ft.RecursedCheck),Kh(i)}}};return r?(i.flags=ft.Mutable|ft.Dirty,i.get=function(){const o=i.flags;if(o&ft.Dirty||o&ft.Pending&&yM(i.deps,i)){if(i._update()){const l=i.subs;l!==void 0&&JO(l)}}else o&ft.Pending&&(i.flags=o&~ft.Pending);return Jn!==void 0&&ZO(i,Jn,Mh),i._snapshot}):i.set=function(o){if(i._update(o)){const l=i.subs;l!==void 0&&(tB(l),JO(l),xM())}},i}function rB(e){const t=()=>{const n=Jn;Jn=r,++Mh,r.depsTail=void 0,r.flags=ft.Watching|ft.RecursedCheck;try{return e()}finally{Jn=n,r.flags&=~ft.RecursedCheck,Kh(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&&yM(this.deps,this)?t():this.flags=ft.Watching},stop(){this.flags=ft.None,this.depsTail=void 0,Kh(this)}};return t(),r}class nB{constructor(t){this.atom=bM(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(sj(t))}}class aB{constructor(t){this.atom=bM(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(sj(t))}}function eE(e){return typeof e=="function"?new aB(e):new nB(e)}var M0={exports:{}},R0={},D0={exports:{}},k0={};/**
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 tE;function iB(){if(tE)return k0;tE=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 d(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,f(w)&&N({inst:w})},[g,x,y]),i(function(){return f(w)&&N({inst:w}),g(function(){f(w)&&N({inst:w})})},[g]),l(x),x}function f(g){var y=g.getSnapshot;g=g.value;try{var x=y();return!r(g,x)}catch{return!0}}function h(g,y){return y()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return k0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,k0}var rE;function sB(){return rE||(rE=1,D0.exports=iB()),D0.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 nE;function oB(){if(nE)return R0;nE=1;var e=tu(),t=sB();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,d=e.useMemo,f=e.useDebugValue;return R0.useSyncExternalStoreWithSelector=function(h,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=d(function(){function _(M){if(!E){if(E=!0,C=M,M=y(M),x!==void 0&&w.hasValue){var D=w.value;if(x(D,M))return A=D}return A=M}if(D=A,n(C,M))return D;var R=y(M);return x!==void 0&&x(D,R)?(C=M,D):(C=M,A=R)}var E=!1,C,A,T=g===void 0?null:g;return[function(){return _(p())},T===null?void 0:function(){return _(T())}]},[p,g,y,x]);var N=i(h,b[0],b[1]);return l(function(){w.hasValue=!0,w.value=N},[N]),f(N),N},R0}var aE;function lB(){return aE||(aE=1,M0.exports=oB()),M0.exports}var jM=lB();function uB(e,t){return e===t}function cr(e,t,r=uB){const n=S.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(l);return d},[e]),i=S.useCallback(()=>e==null?void 0:e.get(),[e]);return jM.useSyncExternalStoreWithSelector(n,i,i,t,r)}var cB={state:void 0,get:()=>{},subscribe:()=>()=>{}};function mo(e){const t=xr(),r=S.useContext(e.from?Z8:Wm),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??cB,l=>{if((e.shouldThrow??!0)&&!l&&Ua(),l===void 0)return;const d=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const f=Ia(o.current,d);return o.current=f,f}return d})}function wM(e){return mo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function SM(e){const{select:t,...r}=e;return mo({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function NM(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 _M(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 OM(e){return mo({...e,select:t=>e.select?e.select(t.context):t.context})}var Zm=U2();function dB(e,t){const r=xr(),n=Vz(t),{activeProps:i,inactiveProps:o,activeOptions:l,to:d,preload:f,preloadDelay:h,hashScrollIntoView:p,replace:g,startTransition:y,resetScroll:x,viewTransition:b,children:w,target:N,disabled:_,style:E,className:C,onClick:A,onBlur:T,onFocus:M,onMouseEnter:D,onMouseLeave:R,onTouchStart:z,ignoreBlocker:k,params:H,search:U,hash:ae,state:Z,mask:G,reloadDocument:$,unsafeRelative:F,from:J,_fromLocation:re,...oe}=e,L=pM(),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,Te=>Te,(Te,mr)=>Te.href===mr.href),ue=S.useMemo(()=>{const Te={_fromLocation:le,...X};return r.buildLocation(Te)},[r,le,X]),pe=ue.maskedLocation?ue.maskedLocation.publicHref:ue.publicHref,xe=ue.maskedLocation?ue.maskedLocation.external:ue.external,we=S.useMemo(()=>yB(pe,xe,r.history,_),[_,xe,pe,r.history]),_e=S.useMemo(()=>{if(we!=null&&we.external)return Uh(we.href,r.protocolAllowlist)?void 0:we.href;if(!vB(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),Uh(d,r.protocolAllowlist)?void 0:d}catch{}},[d,we,r.protocolAllowlist]),de=S.useMemo(()=>{if(_e)return!1;if(l!=null&&l.exact){if(!f8(le.pathname,ue.pathname,r.basepath))return!1}else{const Te=qh(le.pathname,r.basepath),mr=qh(ue.pathname,r.basepath);if(!(Te.startsWith(mr)&&(Te.length===mr.length||Te[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?L&&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,L,ue.hash,ue.pathname,ue.search,r.basepath]),te=de?Hi(i,{})??fB:$0,je=de?$0:Hi(o,{})??$0,ce=[C,te.className,je.className].filter(Boolean).join(" "),Et=(E||te.style||je.style)&&{...E,...te.style,...je.style},[Re,At]=S.useState(!1),Ct=S.useRef(!1),hr=e.reloadDocument||_e?!1:f??r.options.defaultPreload,ma=h??r.options.defaultPreloadDelay??0,Pn=S.useCallback(()=>{r.preloadRoute({...X,_builtLocation:ue}).catch(Te=>{console.warn(Te),console.warn(G8)})},[r,X,ue]);Yz(n,S.useCallback(Te=>{Te!=null&&Te.isIntersecting&&Pn()},[Pn]),gB,{disabled:!!_||hr!=="viewport"}),S.useEffect(()=>{Ct.current||!_&&hr==="render"&&(Pn(),Ct.current=!0)},[_,Pn,hr]);const du=Te=>{const mr=Te.currentTarget.getAttribute("target"),Kn=N!==void 0?N:mr;if(!_&&!xB(Te)&&!Te.defaultPrevented&&(!Kn||Kn==="_self")&&Te.button===0){Te.preventDefault(),Zm.flushSync(()=>{At(!0)});const Id=r.subscribe("onResolved",()=>{Id(),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},...C&&{className:C},...A&&{onClick:A},...T&&{onBlur:T},...M&&{onFocus:M},...D&&{onMouseEnter:D},...R&&{onMouseLeave:R},...z&&{onTouchStart:z}};const No=Te=>{if(_||hr!=="intent")return;if(!ma){Pn();return}const mr=Te.currentTarget;if(cc.has(mr))return;const Kn=setTimeout(()=>{cc.delete(mr),Pn()},ma);cc.set(mr,Kn)},ng=Te=>{_||hr!=="intent"||Pn()},Ld=Te=>{if(_||!hr||!ma)return;const mr=Te.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([T,Ld]),onFocus:ul([M,No]),onMouseEnter:ul([D,No]),onMouseLeave:ul([R,Ld]),onTouchStart:ul([z,ng]),disabled:!!_,target:N,...Et&&{style:Et},...ce&&{className:ce},..._&&hB,...de&&mB,...L&&Re&&pB}}var $0={},fB={className:"active"},hB={role:"link","aria-disabled":!0},mB={"data-status":"active","aria-current":"page"},pB={"data-transitioning":"transitioning"},cc=new WeakMap,gB={rootMargin:"100px"},ul=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function yB(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function vB(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}=dB(n,t),l=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!r){const{disabled:d,...f}=o;return S.createElement("a",f,l)}return S.createElement(r,o,l)});function xB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var bB=class extends mM{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=>OM({...r,from:this.id}),this.useSearch=r=>_M({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>NM({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>SM({...r,from:this.id}),this.useLoaderData=r=>wM({...r,from:this.id}),this.useNavigate=()=>po({from:this.fullPath}),this.Link=Ul.forwardRef((r,n)=>c.jsx(Ee,{ref:n,from:this.fullPath,...r}))}};function jB(e){return new bB(e)}var wB=class extends Y8{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=>OM({...t,from:this.id}),this.useSearch=t=>_M({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>NM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>SM({...t,from:this.id}),this.useLoaderData=t=>wM({...t,from:this.id}),this.useNavigate=()=>po({from:this.fullPath}),this.Link=Ul.forwardRef((t,r)=>c.jsx(Ee,{ref:r,from:this.fullPath,...t}))}};function SB(e){return new wB(e)}function dr(e){return typeof e=="object"?new iE(e,{silent:!0}).createRoute(e):new iE(e,{silent:!0}).createRoute}var iE=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=jB(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function NB(e){const t=xr(),r=`not-found-${cr(t.stores.location,n=>n.pathname)}-${cr(t.stores.status,n=>n)}`;return c.jsx(aj,{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 _B(){return c.jsx("p",{children:"Not Found"})}function xl(e){return c.jsx(c.Fragment,{children:e.children})}function EM(e,t,r){return t.options.notFoundComponent?c.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?c.jsx(e.options.defaultNotFoundComponent,{...r}):c.jsx(_B,{})}function OB(e){return null}function EB(){return OB(xr()),null}var AM=S.memo(function({matchId:t}){const r=xr(),n=r.stores.activeMatchStoresById.get(t);n||Ua();const i=cr(r.stores.loadedAt,l=>l),o=cr(n,l=>l);return c.jsx(AB,{router:r,matchId:t,resetKey:i,matchState:S.useMemo(()=>{var f;const l=o.routeId,d=(f=r.routesById[l].parentRoute)==null?void 0:f.id;return{routeId:l,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:d}},[o._displayPending,o.routeId,o.ssr,r.routesById])})});function AB({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?c.jsx(o,{}):null,d=i.options.errorComponent??e.options.defaultErrorComponent,f=i.options.onCatch??e.options.defaultOnCatch,h=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=d?aj:xl,x=h?NB:xl;return c.jsxs(i.isRoot?i.options.shellComponent??xl:xl,{children:[c.jsx(Wm.Provider,{value:t,children:c.jsx(g,{fallback:l,children:c.jsx(y,{getResetKey:()=>r,errorComponent:d||ij,onCatch:(N,_)=>{if(Or(N))throw N;f==null||f(N,_)},children:c.jsx(x,{fallback:N=>{if(!h||N.routeId&&N.routeId!==n.routeId||!N.routeId&&!i.isRoot)throw N;return S.createElement(h,N)},children:p||n._displayPending?c.jsx(X8,{fallback:l,children:c.jsx(sE,{matchId:t})}):c.jsx(sE,{matchId:t})})})})}),n.parentRouteId===Qs?c.jsxs(c.Fragment,{children:[c.jsx(CB,{resetKey:r}),e.options.scrollRestoration&&aM?c.jsx(EB,{}):null]}):null]})}function CB({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 sE=S.memo(function({matchId:t}){var h,p,g,y;const r=xr(),n=r.stores.activeMatchStoresById.get(t);n||Ua();const i=cr(n,x=>x),o=i.routeId,l=r.routesById[o],d=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]),f=S.useMemo(()=>{const x=l.options.component??r.options.defaultComponent;return x?c.jsx(x,{},d):c.jsx(CM,{})},[d,l.options.component,r.options.defaultComponent]);if(i._displayPending)throw(h=r.getMatch(i.id))==null?void 0:h._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)||Ua(),EM(r,l,i.error);if(i.status==="redirected")throw zr(i.error)||Ua(),(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise;if(i.status==="error")throw i.error;return f}),CM=S.memo(function(){const t=xr(),r=S.useContext(Wm);let n,i=!1,o;{const h=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=cr(h,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,d=t.options.defaultPendingComponent?c.jsx(t.options.defaultPendingComponent,{}):null;if(i)return l||Ua(),EM(t,l,void 0);if(!o)return null;const f=c.jsx(AM,{matchId:o});return n===Qs?c.jsx(S.Suspense,{fallback:d,children:f}):f});function TB(){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=N0(i),d=i||r||o,f=N0(d),h=i||o,p=N0(h);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&&!h&&e.emit({type:"onBeforeRouteMount",...Nl(e.stores.location.state,e.stores.resolvedLocation.state)})},[h,p,e]),Sc(()=>{if(f&&!d){const g=Nl(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...g}),vM(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),g.hrefChanged&&V8(e)}},[d,f,e]),null}function PB(){const e=xr(),t=e.routesById[Qs].options.pendingComponent??e.options.defaultPendingComponent,r=t?c.jsx(t,{}):null,n=c.jsxs(typeof document<"u"&&e.ssr?xl:S.Suspense,{fallback:r,children:[c.jsx(TB,{}),c.jsx(MB,{})]});return e.options.InnerWrap?c.jsx(e.options.InnerWrap,{children:n}):n}function MB(){const e=xr(),t=cr(e.stores.firstMatchId,i=>i),r=cr(e.stores.loadedAt,i=>i),n=t?c.jsx(AM,{matchId:t}):null;return c.jsx(Wm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:c.jsx(aj,{getResetKey:()=>r,errorComponent:ij,onCatch:void 0,children:n})})}function RB(){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 DB(e){const t=xr(),r=S.useRef(void 0);return cr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=Ia(r.current,i);return r.current=o,o}return i})}var kB=e=>({createMutableStore:eE,createReadonlyStore:eE,batch:vM}),$B=e=>new LB(e),LB=class extends z8{constructor(e){super(e,kB)}};function IB({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const n=c.jsx(gM.Provider,{value:e,children:t});return e.options.Wrap?c.jsx(e.options.Wrap,{children:n}):n}function zB({router:e,...t}){return c.jsx(IB,{router:e,...t,children:c.jsx(PB,{})})}function oj(e){const r=xr();return S.useRef(void 0),cr(r.stores.__store,n=>n)}function lj(e){const t=xr(),r=S.useRef(void 0);return cr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=Ia(r.current,i);return r.current=o,o}return i})}const TM=S.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function BB({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 c.jsx(TM.Provider,{value:o,children:e})}function PM(){return S.useContext(TM)}function UB(e){return`agentv.studio.initial-project-redirect:${e}`}function uj(e,t){const r=`/projects/${encodeURIComponent(e)}`;return t?`${r}?tab=${encodeURIComponent(t)}`:r}function Ei(e,t){return t?`/projects/${encodeURIComponent(t)}/runs/${encodeURIComponent(e)}`:`/runs/${encodeURIComponent(e)}`}function Gx(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function fd(e){return e.resultDir?{result_dir:e.resultDir}:e.evalPath?{eval_path:e.evalPath}:{}}function qB(e,t,r={}){const n=Gx(e,t,r.projectId),o=new URLSearchParams(fd(r)).toString();return o?`${n}?${o}`:n}function Jm(e){return e.result_dir?e.result_dir:[e.eval_path??e.suite??"",e.testId,e.target??""].join(":")}function ep(e,t,r={}){return e.testId===t&&(!r.resultDir||e.result_dir===r.resultDir)&&(!r.evalPath||e.eval_path===r.evalPath)}function oE(e,t,r){const n=`tags/${encodeURIComponent(e)}/${encodeURIComponent(t)}`;return r?`/projects/${encodeURIComponent(r)}/${n}`:`/${n}`}function lE(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function uE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function cE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function FB(e){return e?uj(e,"runs"):"/?tab=runs"}function HB(e,t,r=!1){if(!r)return t&&e.includes(t)?t:void 0}function KB(e,t,r,n){return t===!1?{kind:"single-project-home"}:r&&e.includes(r)?{kind:"redirect",redirectPath:uj(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 GB(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,d=uj(o.projectId);if(t.some(f=>f.to===d)||t.push({label:l,to:d}),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:lE(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:Ei(o.runId,o.projectId)}),t.push({label:o.category??"Category",to:uE(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:Ei(o.runId,o.projectId)}),t.push({label:o.suite??"Suite",to:cE(o.runId,o.suite??"Suite",o.projectId)})):i.includes("/projects/$projectId_/runs/$runId")?t.push({label:nr(o.runId),to:Ei(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:Ei(o.runId,o.projectId)}),t.push({label:o.evalId??"Eval",to:Gx(o.runId,o.evalId??"Eval",o.projectId)})):i.includes("/projects/$projectId_/tags/$key/$value")?t.push({label:o.value??"Tag",to:oE(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:Ei(o.runId)}),t.push({label:o.category??"Category",to:uE(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:Ei(o.runId)}),t.push({label:o.suite??"Suite",to:cE(o.runId,o.suite??"Suite")})):i.includes("/jobs/$runId")?t.push({label:nr(o.runId),to:lE(o.runId)}):i.includes("/runs/$runId")?t.push({label:nr(o.runId),to:Ei(o.runId)}):i.includes("/evals/$runId/$evalId")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ei(o.runId)}),t.push({label:o.evalId??"Eval",to:Gx(o.runId,o.evalId??"Eval")})):i.includes("/tags/$key/$value")?t.push({label:o.value??"Tag",to:oE(o.key??"experiment",o.value??"Tag")}):i==="/settings"&&t.push({label:"Settings",to:"/settings"})}}return t}function YB(){const e=DB(),{toggle:t}=PM(),r=GB(e),n=r.length>0;return c.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:[c.jsx("button",{type:"button",onClick:t,className:"shrink-0 text-gray-400 hover:text-gray-200 md:hidden","aria-label":"Toggle navigation",children:c.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:[c.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),c.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),c.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n?c.jsx(Ee,{to:"/",className:"shrink-0 text-cyan-400 hover:text-cyan-300 hover:underline",children:"Projects"}):c.jsx("span",{className:"shrink-0 text-gray-400",children:"Projects"}),r.map((i,o)=>{const l=o===r.length-1;return c.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:"shrink-0 text-gray-600",children:">"}),l?c.jsx("span",{className:"min-w-0 truncate text-gray-400",children:i.label}):c.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 VB(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 MM(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function QB(e){const t=MM(e);return t?`Last synced ${t}`:"Never synced"}function cj(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function RM(e,t,r){const n=r?` (${r})`:"";return`${e} of ${t} run${t===1?"":"s"} on remote${n}`}function XB(e,t,r){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,r??cj(e.run_count),QB(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(n=>n!==void 0)}function WB(e){return(e==null?void 0:e.sync_status)==="syncing"}function ZB(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=VB(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 JB(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":cj(e)}function dE(e){const t=[`Synced ${JB(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=MM(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function e6(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 ${cj(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function dj(e){return[e6(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function Gh(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}. ${dj(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?`${dE(e)} Sync completed: ${t.join(", ")}.`:`${dE(e)} Project results were already up to date.`}}function Yh(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${dj(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 t6(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 r6=50;function DM(e,t){const r=new URLSearchParams({limit:String(r6)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function kM(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 fE(e){return e.split("/").filter(t=>t.length>0).map(t=>encodeURIComponent(t)).join("/")}function hd(e,t){const r=t.toString();return r?`${e}?${r}`:e}function md(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/${fE(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${fE(e.filePath)}`,r=md(e.resultDir);return e.raw&&r.set("raw","1"),e.download&&r.set("download","1"),hd(t,r)}const fj={queryKey:["runs"],queryFn:()=>He("/api/runs"),refetchInterval:5e3},n6={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>He(DM("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function a6(e){return{queryKey:["runs",e],queryFn:()=>He(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function i6(e,t){const r=t?`${ut(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>t6(r),enabled:!!e,refetchInterval:3e3}}function s6(e,t){return Ue(i6(e,t))}const jl="experiment",o6={queryKey:["tags","keys"],queryFn:()=>He("/api/tags")};function hj(e){return{queryKey:["tags","groups",e],queryFn:()=>He(`/api/tags?key=${encodeURIComponent(e)}`),enabled:!!e}}function l6(e){return{queryKey:["projects",e,"tags","keys"],queryFn:()=>He(`${ut(e)}/tags`),enabled:!!e}}function mj(e,t){return{queryKey:["projects",e,"tags","groups",t],queryFn:()=>He(`${ut(e)}/tags?key=${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function u6(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>He(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const c6={queryKey:["compare"],queryFn:()=>He("/api/compare")},d6={queryKey:["targets"],queryFn:()=>He("/api/targets")};function f6(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`;return{queryKey:["runs",e,"evals",t,r??"","files"],queryFn:()=>He(hd(n,md(r))),enabled:!!e&&!!t}}function h6(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 m6(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/transcript`;return{queryKey:["runs",e,"evals",t,r??"","transcript"],queryFn:()=>He(hd(n,md(r))),enabled:!!e&&!!t}}function p6(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>He(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const g6={queryKey:["config"],queryFn:()=>He("/api/config"),staleTime:5e3};function Lc(e){const t=e?`${ut(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>He(t),staleTime:5e3,refetchInterval:r=>WB(r.state.data)?1e3:!1}}function y6(){return Ue(fj)}function v6(){var t;const e=nM(n6);return{...e,data:kM((t=e.data)==null?void 0:t.pages)}}function pd(e){return Ue(a6(e))}function x6(){return Ue(c6)}function b6(e,t,r){return Ue(f6(e,t,r))}function Vh(e,t,r,n){return Ue(h6(e,t,r,n))}function j6(e,t,r){return Ue(m6(e,t,r))}function $M(e,t){return Ue(p6(e,t))}function pt(e){return Ue(e?R6(e):g6)}function tp(e){return Ue(Lc(e))}const Ic=.8,rp="AgentV";function to(e,t=Ic){return e>=t}const w6={queryKey:["projects"],queryFn:()=>He("/api/projects"),refetchInterval:1e4};function pj(){return Ue(w6)}async function S6(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 N6(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 _6(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 gj(e){return{queryKey:["projects",e,"runs"],queryFn:()=>He(`${ut(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function O6(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>He(DM(`${ut(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function E6(e){return Ue(gj(e))}function A6(e){var r;const t=nM(O6(e));return{...t,data:kM((r=t.data)==null?void 0:r.pages)}}function C6(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>He(`${ut(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function gd(e,t){return Ue(C6(e,t))}function LM(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 T6(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(hd(i,md(n))),enabled:!!e&&!!t&&!!r}}function Qh(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 P6(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(hd(i,md(n))),enabled:!!e&&!!t&&!!r}}function IM(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 M6(e){return{queryKey:["projects",e,"targets"],queryFn:()=>He(`${ut(e)}/targets`),enabled:!!e}}function R6(e){return{queryKey:["projects",e,"config"],queryFn:()=>He(`${ut(e)}/config`),enabled:!!e,staleTime:5e3}}async function zM(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 BM(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 UM extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function hE(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 d=await l.json().catch(()=>({error:l.statusText}));throw new UM(d.error??`Failed to combine runs: ${l.status}`,l.status,d.duplicates??[])}return l.json()}async function D6(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 k6(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 $6(e){const t=e?`${ut(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>He(t),staleTime:3e4}}function L6(e){return Ue($6(e))}function I6(e){const t=e?`${ut(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>He(t),staleTime:3e4}}function z6(e){return Ue(I6(e))}async function qM(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 B6(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 U6(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 yj(e,t){return Ue(U6(e,t))}function q6(e){const t=e?`${ut(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>He(t),refetchInterval:3e3}}function vj(e){return Ue(q6(e))}async function F6(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 H6(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 FM(e){var t;return((t=e.experiment)==null?void 0:t.trim())||"default"}function xj(e){return e?H6(e.config_source):"Runtime source unknown"}function K6(e){if(!e)return"Runtime source metadata was not recorded for this run.";const t=[xj(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 HM(e){return e&&e!=="default"?e:void 0}function G6(e,t){const r=[HM(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 KM(e){const t=e.results[0],r=zc(e.sourceLabel),n=e.source==="remote",i=n&&r?r:G6(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,HM(t==null?void 0:t.experiment),o,n?void 0:e.source].filter(h=>!!h),d=zc(e.remoteRepo),f=[];return f.push({label:"Experiment namespace",value:FM({experiment:t==null?void 0:t.experiment,runtime_source:e.runtimeSource})}),e.runtimeSource&&f.push({label:"Runtime source",value:xj(e.runtimeSource)}),n&&(r&&r!==i&&f.push({label:"Source",value:r}),d&&f.push({label:"Repo",value:d})),{heading:i,meta:l.join(" · "),...n&&{sourceBadge:"Remote"},...r&&{sourceLabel:r},sourceContext:f}}function Y6(e){return e.replace(/\.eval\.(ya?ml|json|jsonl)$/i,"").replace(/\.(ya?ml|json|jsonl)$/i,"")}function V6(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("/")?Y6(n):t)||t,title:t}}function GM(e){return zc(e.eval_path)??zc(e.suite)}function Q6(e){return V6(GM(e))}function YM(e){const t=e.map(n=>GM(n)??"");return t.filter(n=>n&&n!=="Uncategorized").length>0&&new Set(t).size>1}const Xh="remote::";function VM(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 qa(e){const t=e==null?void 0:e.trim();return t||void 0}function X6(e){const t=qa(e);return t&&t!=="default"&&t!=="-"?t:void 0}function QM(e){let t=e.trim();return t.startsWith(Xh)&&(t=t.slice(Xh.length)),t.replace(/\.(jsonl|json)$/i,"")}function W6(e){const r=QM(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,d,f,h="000"]=r,p=new Date(`${n}-${i}-${o}T${l}:${d}:${f}.${h}Z`);return Number.isNaN(p.getTime())?void 0:p}function bj(e,t){const r=qa(e);return r?W6(r)?!0:QM(r)===VM(t):!1}function Z6(e,t){const r=qa(e);if(!r)return;const n=r.startsWith(Xh)?r.slice(Xh.length):r,i=n.lastIndexOf("::");if(i!==-1){const o=n.slice(i+2);if(bj(o,t))return qa(n.slice(0,i))}return n}function J6(e){return[qa(e.display_name),qa(e.title),Z6(e.filename,e.timestamp)].find(r=>!!r&&!bj(r,e.timestamp))}function e9(e){return`${Math.round(e*100)}%`}function t9(e,t){const r=[t],n=qa(e.filename),i=qa(e.display_name),o=qa(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 jj(e,t={}){const r=VM(e.timestamp),n=X6(e.experiment),i=J6(e),o=n&&!bj(n,e.timestamp)?n:void 0,l=i??o??r,d=t.includePassRate??!0,f=[];l!==r&&f.push(r),e.target&&e.target!==l&&f.push(e.target),n&&n!==l&&f.push(n),d&&f.push(e9(e.pass_rate));const h=f.join(" · "),p=h?`${l} · ${h}`:l;return{primary:l,secondary:h,label:p,title:t9(e,p)}}function Zi(e){return e?e.charAt(0).toUpperCase()+e.slice(1):"Tag"}function wj({appName:e}){return e!==rp?c.jsx("span",{className:"av-brand-name",children:e}):c.jsxs("span",{className:"av-brand-name","aria-label":"AgentV",children:[c.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"A"}),c.jsx("span",{className:"av-brand-name__middle","aria-hidden":"true",children:"gent"}),c.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"V"})]})}function r9({result:e,className:t=""}){const r=Q6(e);return r?c.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}=PM(),i=lj().href;return S.useEffect(()=>{i&&r()},[r,i]),c.jsxs(c.Fragment,{children:[t&&c.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"}),c.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)??rp;return c.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:c.jsx(Ee,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:c.jsx(wj,{appName:r})})})}function XM({display:e}){return c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"block truncate",children:e.primary}),e.secondary?c.jsx("span",{className:"block truncate text-xs text-gray-600",children:e.secondary}):null]})}function WM({result:e,passThreshold:t,showEvalSourceLabel:r}){const n=to(e.score,t);return c.jsxs(c.Fragment,{children:[c.jsx("span",{className:`mt-0.5 shrink-0 text-xs ${n?"text-emerald-400":"text-red-400"}`,children:n?"✓":"✗"}),c.jsxs("span",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"block truncate",children:e.testId}),r?c.jsx(r9,{result:e,className:"mt-1 max-w-full text-[11px] leading-4"}):null]})]})}function ZM(){const t=lj().search;return{resultDir:t.result_dir,evalPath:t.eval_path}}const mE=[{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:"Providers",description:"Provider results"}];function L0(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 pE({projectId:e}){const t=lj(),{data:r}=pj(),n=(r==null?void 0:r.projects)??[],i=t.search,o=mE.some(d=>d.id===i.tab)?i.tab:"runs",l=!e&&n.length===0;return c.jsxs(qn,{children:[c.jsx(ha,{projectId:e}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Navigate"}),c.jsxs(Ee,{to:"/",className:L0(t.pathname==="/"),children:[c.jsx("span",{className:"truncate",children:"Projects"}),n.length>0?c.jsx("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:n.length}):null]}),c.jsx(Ee,{to:"/settings",className:L0(t.pathname==="/settings"),children:c.jsx("span",{className:"truncate",children:"Settings"})})]}),l?c.jsxs("div",{className:"mb-4",children:[c.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Workspace"}),mE.map(d=>c.jsxs(Ee,{to:"/",search:{tab:d.id},className:L0(o===d.id),title:d.description,children:[c.jsx("span",{className:"truncate",children:d.label}),c.jsx("span",{className:"shrink-0 text-xs text-gray-500",children:d.description})]},d.id))]}):null]})]})}function n9(){const e=RB(),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}),d=e({to:"/projects/$projectId",fuzzy:!0});if(t&&typeof t=="object"&&"projectId"in t){const{projectId:x,runId:b,evalId:w}=t;return c.jsx(l9,{projectId:x,runId:b,currentEvalId:w})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:x,runId:b,category:w}=i;return c.jsx(c9,{projectId:x,runId:b,category:w})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:x,runId:b,suite:w}=o;return c.jsx(u9,{projectId:x,runId:b,suite:w})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:x,runId:b}=r;return c.jsx(gE,{projectId:x,currentRunId:b})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:x}=l;return c.jsx(gE,{projectId:x})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:x,key:b,value:w}=n;return c.jsx(d9,{projectId:x,tagKey:b,currentValue:w})}if(d&&typeof d=="object"&&"projectId"in d){const{projectId:x}=d;return c.jsx(pE,{projectId:x})}const f=e({to:"/runs/$runId",fuzzy:!0}),h=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 c.jsx(o9,{runId:x,category:b})}if(g&&typeof g=="object"&&"runId"in g){const{runId:x,suite:b}=g;return c.jsx(s9,{runId:x,suite:b})}if(h&&typeof h=="object"&&"runId"in h){const{runId:x,evalId:b}=h;return c.jsx(i9,{runId:x,currentEvalId:b})}if(y&&typeof y=="object"&&"key"in y){const{key:x,value:b}=y;return c.jsx(f9,{tagKey:x,currentValue:b})}if(f&&typeof f=="object"&&"runId"in f){const{runId:x}=f;return c.jsx(a9,{currentRunId:x})}return c.jsx(pE,{})}function a9({currentRunId:e}){const{data:t}=y6(),{data:r}=pt(),{data:n}=vj(),i=((n==null?void 0:n.runs)??[]).filter(o=>o.status==="starting"||o.status==="running").length;return c.jsxs(qn,{children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[c.jsx(Ee,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:c.jsx(wj,{appName:(r==null?void 0:r.app_name)??rp})}),i>0&&c.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:[c.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-cyan-400"}),i]})]}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.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=jj(o),d=e===o.filename;return c.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 ${d?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,title:l.title,children:c.jsx(XM,{display:l})},o.filename)})]}),c.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:c.jsx(Ee,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function i9({runId:e,currentEvalId:t}){const{data:r}=pd(e),{data:n}=pt(),i=ZM(),o=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=YM((r==null?void 0:r.results)??[]);return c.jsxs(qn,{children:[c.jsx(ha,{}),c.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[c.jsx(Ee,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),c.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e})]}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.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(d=>{const f=fd({resultDir:d.result_dir,evalPath:d.eval_path}),h=ep(d,t,i);return c.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:d.testId},search:f,className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${h?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:c.jsx(WM,{result:d,passThreshold:o,showEvalSourceLabel:l})},Jm(d))})]})]})}function s9({runId:e,suite:t}){const{data:r}=pd(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 c.jsxs(qn,{children:[c.jsx(ha,{}),c.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[c.jsx(Ee,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),c.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),c.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),o.map(l=>{const d=to(l.score,i),f=fd({resultDir:l.result_dir,evalPath:l.eval_path});return c.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:l.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:[c.jsx("span",{className:`text-xs ${d?"text-emerald-400":"text-red-400"}`,children:d?"✓":"✗"}),c.jsx("span",{className:"truncate",children:l.testId})]},Jm(l))})]})]})}function o9({runId:e,category:t}){const{data:r}=$M(e,t),n=(r==null?void 0:r.suites)??[];return c.jsxs(qn,{children:[c.jsx(ha,{}),c.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[c.jsx(Ee,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),c.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),c.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),n.map(i=>c.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:[c.jsx("span",{className:`text-xs ${i.passed===i.total?"text-emerald-400":"text-red-400"}`,children:i.passed===i.total?"✓":"✗"}),c.jsx("span",{className:"truncate",children:i.name})]},i.name))]})]})}function gE({projectId:e,currentRunId:t}){const{data:r}=E6(e);return c.jsxs(qn,{children:[c.jsx(ha,{projectId:e}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.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=jj(n),o=t===n.filename;return c.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:c.jsx(XM,{display:i})},n.filename)})]})]})}function l9({projectId:e,runId:t,currentEvalId:r}){const{data:n}=gd(e,t),{data:i}=pt(e),o=ZM(),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,d=YM((n==null?void 0:n.results)??[]);return c.jsxs(qn,{children:[c.jsx(ha,{projectId:e}),c.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[c.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"}),c.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t})]}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.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(f=>{const h=fd({resultDir:f.result_dir,evalPath:f.eval_path}),p=ep(f,r,o);return c.jsx(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:f.testId},search:h,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:c.jsx(WM,{result:f,passThreshold:l,showEvalSourceLabel:d})},Jm(f))})]})]})}function u9({projectId:e,runId:t,suite:r}){const{data:n}=gd(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(d=>(d.suite??"Uncategorized")===r);return c.jsxs(qn,{children:[c.jsx(ha,{projectId:e}),c.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[c.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"}),c.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),c.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),l.map(d=>{const f=to(d.score,o),h=fd({resultDir:d.result_dir,evalPath:d.eval_path});return c.jsxs(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:d.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:[c.jsx("span",{className:`text-xs ${f?"text-emerald-400":"text-red-400"}`,children:f?"✓":"✗"}),c.jsx("span",{className:"truncate",children:d.testId})]},Jm(d))})]})]})}function c9({projectId:e,runId:t,category:r}){const{data:n}=Ue(LM(e,t,r)),i=(n==null?void 0:n.suites)??[];return c.jsxs(qn,{children:[c.jsx(ha,{projectId:e}),c.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[c.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"}),c.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),c.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),i.map(o=>c.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:[c.jsx("span",{className:`text-xs ${o.passed===o.total?"text-emerald-400":"text-red-400"}`,children:o.passed===o.total?"✓":"✗"}),c.jsx("span",{className:"truncate",children:o.name})]},o.name))]})]})}function d9({projectId:e,tagKey:t,currentValue:r}){const{data:n}=Ue(mj(e,t)),i=(n==null?void 0:n.groups)??[];return c.jsxs(qn,{children:[c.jsx(ha,{projectId:e}),c.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:c.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"]})}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.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 c.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 f9({tagKey:e,currentValue:t}){const{data:r}=Ue(hj(e)),n=(r==null?void 0:r.groups)??[];return c.jsxs(qn,{children:[c.jsx(ha,{}),c.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:c.jsxs(Ee,{to:"/",search:{tab:"tags",key:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:["← All ",Zi(e)," values"]})}),c.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[c.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 c.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 h9(){return c.jsx(BB,{children:c.jsx(m9,{})})}function m9(){return c.jsxs("div",{className:"flex h-screen overflow-hidden",children:[c.jsx(n9,{}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[c.jsx(YB,{}),c.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:c.jsx(CM,{})})]})]})}const Yt=SB({component:h9}),p9=dr("/settings")({component:g9});function g9(){const{data:e,isLoading:t}=pt(),r=ho(),[n,i]=S.useState(""),[o,l]=S.useState(!1),[d,f]=S.useState(null),h=(e==null?void 0:e.threshold)??Ic,p=n||String(h),g=(e==null?void 0:e.read_only)===!0,y=(e==null?void 0:e.app_name)??rp,x=async()=>{const b=Number.parseFloat(n||String(h));if(Number.isNaN(b)||b<0||b>1){f({type:"error",text:"Threshold must be a number between 0 and 1"});return}l(!0),f(null);try{await k6({threshold:b}),await r.invalidateQueries({queryKey:["config"]}),i(""),f({type:"success",text:"Settings saved"}),setTimeout(()=>f(null),3e3)}catch{f({type:"error",text:"Failed to save settings"})}finally{l(!1)}};return t?c.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[c.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):c.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Configure ",c.jsx(wj,{appName:y})]})]}),c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[c.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),c.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),c.jsx("div",{className:"mt-6 space-y-4",children:c.jsxs("div",{children:[c.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),c.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",Ic]}),c.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c.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"}),c.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(p)||0)*100),"%)"]})]})]})}),c.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!g&&c.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&&c.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),d&&c.jsx("span",{className:`text-sm ${d.type==="success"?"text-emerald-400":"text-red-400"}`,children:d.text})]})]}),c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:c.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",c.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function yE({entry:e,selected:t,current:r=!1,onSelect:n,onOpen:i}){return c.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:[c.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:[c.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:e.name}),r?c.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?c.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]}),c.jsx("span",{className:"mt-1 block truncate text-xs text-gray-500",children:e.path})]}),c.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 y9({open:e,onClose:t,onAdded:r}){const n=S.useRef(null),[i,o]=S.useState(null),[l,d]=S.useState(""),[f,h]=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(R,z={})=>{w(!0),g(null),x(null);try{const k=await S6(R);o(k),d(k.path),h(z.selectCurrent&&k.current.hasAgentv?k.current.path:"")}catch(k){g(k.message)}finally{w(!1)}},[]);S.useEffect(()=>{var R;e&&(o(null),d(""),h(""),g(null),x(null),_(!1),(R=n.current)==null||R.focus(),E(void 0,{selectCurrent:!0}))},[E,e]),S.useEffect(()=>{if(!e)return;function R(z){z.key==="Escape"&&(z.preventDefault(),t())}return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[t,e]);const C=S.useMemo(()=>!i||!f?null:f===i.current.path?i.current:i.entries.find(R=>R.path===f)??null,[i,f]),A=!!(C!=null&&C.hasAgentv)&&!N;function T(R){R.preventDefault(),E(l,{selectCurrent:!0})}async function M(){if(!(!f||!A)){_(!0),x(null);try{const R=await N6(f);r(R),t()}catch(R){x(R.message)}finally{_(!1)}}}if(!e)return null;const D=f?C!=null&&C.hasAgentv?`Ready to add ${C.name}.`:"Selected folder does not contain an .agentv/ directory.":"Select a folder containing an .agentv/ directory.";return c.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:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-4 py-3",children:[c.jsx("h2",{className:"text-xl font-semibold text-white",children:"Add project"}),c.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"})]}),c.jsxs("div",{className:"space-y-4 overflow-y-auto p-4",children:[c.jsxs("form",{onSubmit:T,className:"flex flex-col gap-2 sm:flex-row",children:[c.jsx("label",{className:"sr-only",htmlFor:"add-project-path",children:"Folder path"}),c.jsx("input",{id:"add-project-path",value:l,onChange:R=>d(R.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}),c.jsxs("div",{className:"flex gap-2",children:[c.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"}),c.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"}),c.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?c.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,c.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[c.jsxs("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:[c.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Current folder"}),c.jsx("p",{className:"mt-1 truncate text-sm text-gray-300",children:(i==null?void 0:i.path)??(b?"Loading folders...":"No folder loaded")})]}),c.jsx("div",{className:"max-h-80 overflow-y-auto",children:i?c.jsxs(c.Fragment,{children:[c.jsx(yE,{entry:i.current,current:!0,selected:f===i.current.path,onSelect:()=>h(i.current.path),onOpen:()=>void E(i.current.path,{selectCurrent:!0})}),i.entries.map(R=>c.jsx(yE,{entry:R,selected:f===R.path,onSelect:()=>h(R.path),onOpen:()=>void E(R.path,{selectCurrent:!0})},R.path)),i.entries.length===0?c.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"No subfolders in this location."}):null]}):c.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:b?"Loading folders...":"Enter a folder path to browse."})})]}),c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-3",children:c.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Selected"}),c.jsx("p",{className:"mt-1 truncate text-sm text-gray-200",children:f||"None"})]}),c.jsx("p",{className:`text-sm ${C!=null&&C.hasAgentv?"text-cyan-300":"text-gray-500"}`,children:D})]})}),y?c.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]}),c.jsxs("div",{className:"flex items-center justify-between border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[c.jsx("p",{className:"text-xs tabular-nums text-gray-500",children:i?`${i.entries.length} folders`:"0 folders"}),c.jsxs("div",{className:"flex gap-2",children:[c.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"}),c.jsx("button",{type:"button",onClick:()=>void M(),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 JM(e){return e.executionStatus==="execution_error"}function np(e,t){let r=0,n=0,i=0,o=0;for(const d of e){if(JM(d)){i++;continue}r++,o+=d.score,d.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 eR(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 tR(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=tR(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=tR(e))&&(n&&(n+=" "),n+=t);return n}var v9=["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 Sj(e){if(typeof e!="string")return!1;var t=v9;return t.includes(e)}var x9=["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"],b9=new Set(x9);function rR(e){return typeof e!="string"?!1:b9.has(e)}function nR(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)&&(rR(r)||nR(r))&&(t[r]=e[r]);return t}function yd(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)&&(rR(r)||nR(r)||Sj(r))&&(t[r]=e[r]);return t}function j9(e){return e==null?null:S.isValidElement(e)?Er(e.props):typeof e=="object"&&!Array.isArray(e)?Er(e):null}var w9=["children","width","height","viewBox","className","style","title","desc"];function Yx(){return Yx=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},Yx.apply(null,arguments)}function S9(e,t){if(e==null)return{};var r,n,i=N9(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 N9(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 Nj=S.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:o,className:l,style:d,title:f,desc:h}=e,p=S9(e,w9),g=o||{width:n,height:i,x:0,y:0},y=Xe("recharts-surface",l);return S.createElement("svg",Yx({},Er(p),{className:y,width:n,height:i,style:d,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),S.createElement("title",null,f),S.createElement("desc",null,h),r)}),_9=["children","className"];function Vx(){return Vx=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},Vx.apply(null,arguments)}function O9(e,t){if(e==null)return{};var r,n,i=E9(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 E9(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=O9(e,_9),o=Xe("recharts-layer",n);return S.createElement("g",Vx({className:o},Er(i),{ref:t}),r)}),aR=S.createContext(null),A9=()=>S.useContext(aR);function at(e){return function(){return e}}const iR=Math.cos,Wh=Math.sin,Fn=Math.sqrt,Zh=Math.PI,ap=2*Zh,Qx=Math.PI,Xx=2*Qx,As=1e-6,C9=Xx-As;function sR(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function T9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return sR;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 P9{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?sR:T9(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,d=this._y1,f=n-t,h=i-r,p=l-t,g=d-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*f-h*p)>As)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-l,b=i-d,w=f*f+h*h,N=x*x+b*b,_=Math.sqrt(w),E=Math.sqrt(y),C=o*Math.tan((Qx-Math.acos((w+y-N)/(2*_*E)))/2),A=C/E,T=C/_;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+T*f},${this._y1=r+T*h}`}}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 d=n*Math.cos(i),f=n*Math.sin(i),h=t+d,p=r+f,g=1^l,y=l?i-o:o-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>As||Math.abs(this._y1-p)>As)&&this._append`L${h},${p}`,n&&(y<0&&(y=y%Xx+Xx),y>C9?this._append`A${n},${n},0,1,${g},${t-d},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=p}`:y>As&&this._append`A${n},${n},0,${+(y>=Qx)},${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 _j(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 P9(t)}function Oj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function oR(e){this._context=e}oR.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 ip(e){return new oR(e)}function lR(e){return e[0]}function uR(e){return e[1]}function cR(e,t){var r=at(!0),n=null,i=ip,o=null,l=_j(d);e=typeof e=="function"?e:e===void 0?lR:at(e),t=typeof t=="function"?t:t===void 0?uR:at(t);function d(f){var h,p=(f=Oj(f)).length,g,y=!1,x;for(n==null&&(o=i(x=l())),h=0;h<=p;++h)!(h<p&&r(g=f[h],h,f))===y&&((y=!y)?o.lineStart():o.lineEnd()),y&&o.point(+e(g,h,f),+t(g,h,f));if(x)return o=null,x+""||null}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:at(+f),d):e},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:at(+f),d):t},d.defined=function(f){return arguments.length?(r=typeof f=="function"?f:at(!!f),d):r},d.curve=function(f){return arguments.length?(i=f,n!=null&&(o=i(n)),d):i},d.context=function(f){return arguments.length?(f==null?n=o=null:o=i(n=f),d):n},d}function oh(e,t,r){var n=null,i=at(!0),o=null,l=ip,d=null,f=_j(h);e=typeof e=="function"?e:e===void 0?lR:at(+e),t=typeof t=="function"?t:at(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?uR:at(+r);function h(g){var y,x,b,w=(g=Oj(g)).length,N,_=!1,E,C=new Array(w),A=new Array(w);for(o==null&&(d=l(E=f())),y=0;y<=w;++y){if(!(y<w&&i(N=g[y],y,g))===_)if(_=!_)x=y,d.areaStart(),d.lineStart();else{for(d.lineEnd(),d.lineStart(),b=y-1;b>=x;--b)d.point(C[b],A[b]);d.lineEnd(),d.areaEnd()}_&&(C[y]=+e(N,y,g),A[y]=+t(N,y,g),d.point(n?+n(N,y,g):C[y],r?+r(N,y,g):A[y]))}if(E)return d=null,E+""||null}function p(){return cR().defined(i).curve(l).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:at(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:at(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:at(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:at(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:at(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:at(+g),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(g){return arguments.length?(i=typeof g=="function"?g:at(!!g),h):i},h.curve=function(g){return arguments.length?(l=g,o!=null&&(d=l(o)),h):l},h.context=function(g){return arguments.length?(g==null?o=d=null:d=l(o=g),h):o},h}class dR{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 M9(e){return new dR(e,!0)}function R9(e){return new dR(e,!1)}const Ej={draw(e,t){const r=Fn(t/Zh);e.moveTo(r,0),e.arc(0,0,r,0,ap)}},D9={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()}},fR=Fn(1/3),k9=fR*2,$9={draw(e,t){const r=Fn(t/k9),n=r*fR;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},L9={draw(e,t){const r=Fn(t),n=-r/2;e.rect(n,n,r,r)}},I9=.8908130915292852,hR=Wh(Zh/10)/Wh(7*Zh/10),z9=Wh(ap/10)*hR,B9=-iR(ap/10)*hR,U9={draw(e,t){const r=Fn(t*I9),n=z9*r,i=B9*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const l=ap*o/5,d=iR(l),f=Wh(l);e.lineTo(f*r,-d*r),e.lineTo(d*n-f*i,f*n+d*i)}e.closePath()}},I0=Fn(3),q9={draw(e,t){const r=-Fn(t/(I0*3));e.moveTo(0,r*2),e.lineTo(-I0*r,-r),e.lineTo(I0*r,-r),e.closePath()}},xn=-.5,bn=Fn(3)/2,Wx=1/Fn(12),F9=(Wx/2+1)*3,H9={draw(e,t){const r=Fn(t/F9),n=r/2,i=r*Wx,o=n,l=r*Wx+r,d=-o,f=l;e.moveTo(n,i),e.lineTo(o,l),e.lineTo(d,f),e.lineTo(xn*n-bn*i,bn*n+xn*i),e.lineTo(xn*o-bn*l,bn*o+xn*l),e.lineTo(xn*d-bn*f,bn*d+xn*f),e.lineTo(xn*n+bn*i,xn*i-bn*n),e.lineTo(xn*o+bn*l,xn*l-bn*o),e.lineTo(xn*d+bn*f,xn*f-bn*d),e.closePath()}};function K9(e,t){let r=null,n=_j(i);e=typeof e=="function"?e:at(e||Ej),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 Jh(){}function em(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 mR(e){this._context=e}mR.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:em(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:em(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function G9(e){return new mR(e)}function pR(e){this._context=e}pR.prototype={areaStart:Jh,areaEnd:Jh,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:em(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Y9(e){return new pR(e)}function gR(e){this._context=e}gR.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:em(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function V9(e){return new gR(e)}function yR(e){this._context=e}yR.prototype={areaStart:Jh,areaEnd:Jh,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 Q9(e){return new yR(e)}function vE(e){return e<0?-1:1}function xE(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),d=(o*i+l*n)/(n+i);return(vE(o)+vE(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(d))||0}function bE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function z0(e,t,r){var n=e._x0,i=e._y0,o=e._x1,l=e._y1,d=(o-n)/3;e._context.bezierCurveTo(n+d,i+d*t,o-d,l-d*r,o,l)}function tm(e){this._context=e}tm.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:z0(this,this._t0,bE(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,z0(this,bE(this,r=xE(this,e,t)),r);break;default:z0(this,this._t0,r=xE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function vR(e){this._context=new xR(e)}(vR.prototype=Object.create(tm.prototype)).point=function(e,t){tm.prototype.point.call(this,t,e)};function xR(e){this._context=e}xR.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 X9(e){return new tm(e)}function W9(e){return new vR(e)}function bR(e){this._context=e}bR.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=jE(e),i=jE(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 jE(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 Z9(e){return new bR(e)}function sp(e,t){this._context=e,this._t=t}sp.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 J9(e){return new sp(e,.5)}function eU(e){return new sp(e,0)}function tU(e){return new sp(e,1)}function ro(e,t){if((l=e.length)>1)for(var r=1,n,i,o=e[t[0]],l,d=o.length;r<l;++r)for(i=o,o=e[t[r]],n=0;n<d;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Zx(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function rU(e,t){return e[t]}function nU(e){const t=[];return t.key=e,t}function aU(){var e=at([]),t=Zx,r=ro,n=rU;function i(o){var l=Array.from(e.apply(this,arguments),nU),d,f=l.length,h=-1,p;for(const g of o)for(d=0,++h;d<f;++d)(l[d][h]=[0,+n(g,l[d].key,h,o)]).data=g;for(d=0,p=Oj(t(l));d<f;++d)l[p[d]].index=d;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?Zx:typeof o=="function"?o:at(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??ro,i):r},i}function iU(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 sU(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,d=0;l<i;++l)d+=e[l][r][1]||0;n[r][1]+=n[r][0]=-d/2}ro(e,t)}}function oU(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 d=0,f=0,h=0;d<l;++d){for(var p=e[t[d]],g=p[n][1]||0,y=p[n-1][1]||0,x=(g-y)/2,b=0;b<d;++b){var w=e[t[b]],N=w[n][1]||0,_=w[n-1][1]||0;x+=N-_}f+=g,h+=x*g}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,ro(e,t)}}var B0={},U0={},wE;function lU(){return wE||(wE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(U0)),U0}var q0={},SE;function jR(){return SE||(SE=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})(q0)),q0}var F0={},NE;function Aj(){return NE||(NE=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})(F0)),F0}var H0={},K0={},_E;function uU(){return _E||(_E=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})(K0)),K0}var OE;function Cj(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uU(),r=Aj();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 d=0,f="",h="",p=!1;for(i.charCodeAt(0)===46&&(o.push(""),d++);d<l;){const g=i[d];h?g==="\\"&&d+1<l?(d++,f+=i[d]):g===h?h="":f+=g:p?g==='"'||g==="'"?h=g:g==="]"?(p=!1,o.push(f),f=""):f+=g:g==="["?(p=!0,f&&(o.push(f),f="")):g==="."?f&&(o.push(f),f=""):f+=g,d++}return f&&o.push(f),o}e.toPath=n})(H0)),H0}var EE;function Tj(){return EE||(EE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lU(),r=jR(),n=Aj(),i=Cj();function o(d,f,h){if(d==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const p=d[f];return p===void 0?r.isDeepKey(f)?o(d,i.toPath(f),h):h:p}case"number":case"symbol":{typeof f=="number"&&(f=n.toKey(f));const p=d[f];return p===void 0?h:p}default:{if(Array.isArray(f))return l(d,f,h);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const p=d[f];return p===void 0?h:p}}}function l(d,f,h){if(f.length===0)return h;let p=d;for(let g=0;g<f.length;g++){if(p==null||t.isUnsafeProperty(f[g]))return h;p=p[f[g]]}return p===void 0?h:p}e.get=o})(B0)),B0}var G0,AE;function cU(){return AE||(AE=1,G0=Tj().get),G0}var dU=cU();const Hl=rs(dU);var fU=4;function Gi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fU,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 d=r[l-1];return typeof d=="string"?i+d+o:d!==void 0?i+Gi(d)+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",hU=0,Uc=e=>{var t=++hU;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},wR=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 SR(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",vd=e=>mt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ur(e){return e!=null}function go(){}var mU=["type","size","sizeType"];function Jx(){return Jx=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},Jx.apply(null,arguments)}function CE(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 TE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CE(Object(r),!0).forEach(function(n){pU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pU(e,t,r){return(t=gU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gU(e){var t=yU(e,"string");return typeof t=="symbol"?t:t+""}function yU(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 vU(e,t){if(e==null)return{};var r,n,i=xU(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 xU(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 NR={symbolCircle:Ej,symbolCross:D9,symbolDiamond:$9,symbolSquare:L9,symbolStar:U9,symbolTriangle:q9,symbolWye:H9},bU=Math.PI/180,jU=e=>{var t="symbol".concat(vd(e));return NR[t]||Ej},wU=(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*bU;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}},SU=(e,t)=>{NR["symbol".concat(vd(e))]=t},Pj=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=vU(e,mU),o=TE(TE({},i),{},{type:t,size:r,sizeType:n}),l="circle";typeof t=="string"&&(l=t);var d=()=>{var y=jU(l),x=K9().type(y).size(wU(r,n,l)),b=x();if(b!==null)return b},{className:f,cx:h,cy:p}=o,g=Er(o);return ge(h)&&ge(p)&&ge(r)?S.createElement("path",Jx({},g,{className:Xe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};Pj.registerSymbol=SU;var _R=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Mj=(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=>{Sj(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},NU=(e,t,r)=>n=>(e(t,r,n),null),op=(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];Sj(i)&&typeof o=="function"&&(n||(n={}),n[i]=NU(o,t,r))}),n};function PE(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 _U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(r),!0).forEach(function(n){OU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OU(e,t,r){return(t=EU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EU(e){var t=AU(e,"string");return typeof t=="symbol"?t:t+""}function AU(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=_U({},e),n=t,i=Object.keys(t),o=i.reduce((l,d)=>(l[d]===void 0&&n[d]!==void 0&&(l[d]=n[d]),l),r);return o}function rm(){return rm=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},rm.apply(null,arguments)}function ME(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 OR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ME(Object(r),!0).forEach(function(n){CU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ME(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CU(e,t,r){return(t=TU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TU(e){var t=PU(e,"string");return typeof t=="symbol"?t:t+""}function PU(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,MU={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function RU(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function DU(e){var{data:t,iconType:r,inactiveColor:n}=e,i=wn/2,o=wn/6,l=wn/3,d=t.inactive?n:t.color,f=r??t.type;if(f==="none")return null;if(f==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:d,strokeDasharray:RU(t.payload),x1:0,y1:i,x2:wn,y2:i,className:"recharts-legend-icon"});if(f==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:d,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(f==="rect")return S.createElement("path",{stroke:"none",fill:d,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 h=OR({},t);return delete h.legendIcon,S.cloneElement(t.legendIcon,h)}return S.createElement(Pj,{fill:d,cx:i,cy:i,size:wn,sizeType:"diameter",type:f})}function kU(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:o,iconType:l,labelStyle:d}=e,f={x:0,y:0,width:wn,height:wn},h={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 d=="object"?OR({},d):{};w.color=g.inactive?o:w.color||g.color;var N=x?x(g.value,g,y):g.value;return S.createElement("li",rm({className:b,style:h,key:"legend-item-".concat(y)},op(e,g,y)),S.createElement(Nj,{width:r,height:r,viewBox:f,style:p,"aria-label":"".concat(g.value," legend icon")},S.createElement(DU,{data:g,iconType:l,inactiveColor:o})),S.createElement("span",{className:"recharts-legend-item-text",style:w},N))})}var $U=e=>{var t=fr(e,MU),{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(kU,rm({},t,{payload:r})))},Y0={},V0={},RE;function LU(){return RE||(RE=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],d=n(l,o,r);i.has(d)||i.set(d,l)}return Array.from(i.values())}e.uniqBy=t})(V0)),V0}var Q0={},DE;function IU(){return DE||(DE=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})(Q0)),Q0}var X0={},kE;function ER(){return kE||(kE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(X0)),X0}var W0={},Z0={},J0={},$E;function zU(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(J0)),J0}var LE;function AR(){return LE||(LE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zU();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Z0)),Z0}var ev={},IE;function BU(){return IE||(IE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(ev)),ev}var zE;function UU(){return zE||(zE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AR(),r=BU();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(W0)),W0}var tv={},rv={},BE;function qU(){return BE||(BE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tj();function r(n){return function(i){return t.get(i,n)}}e.property=r})(rv)),rv}var nv={},av={},iv={},sv={},UE;function CR(){return UE||(UE=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})(sv)),sv}var ov={},qE;function TR(){return qE||(qE=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})(ov)),ov}var lv={},FE;function PR(){return FE||(FE=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})(lv)),lv}var HE;function FU(){return HE||(HE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CR(),r=TR(),n=PR();function i(p,g,y){return typeof y!="function"?i(p,g,()=>{}):o(p,g,function x(b,w,N,_,E,C){const A=y(b,w,N,_,E,C);return A!==void 0?!!A:o(b,w,x,C)},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 f(p,g,y,x);if(g instanceof Map)return d(p,g,y,x);if(g instanceof Set)return h(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 d(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 f(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 C=p[E];let A=!1;if(y(C,N,w,p,g,x)&&(A=!0),A){b.add(E),_=!0;break}}if(!_)return!1}return!0}function h(p,g,y,x){return g.size===0?!0:p instanceof Set?f([...p],[...g],y,x):!1}e.isMatchWith=i,e.isSetMatch=h})(iv)),iv}var KE;function MR(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=FU();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(av)),av}var uv={},cv={},dv={},GE;function HU(){return GE||(GE=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})(dv)),dv}var fv={},YE;function Rj(){return YE||(YE=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})(fv)),fv}var hv={},VE;function RR(){return VE||(VE=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]",d="[object Date]",f="[object Map]",h="[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]",C="[object Uint32Array]",A="[object BigUint64Array]",T="[object Int8Array]",M="[object Int16Array]",D="[object Int32Array]",R="[object BigInt64Array]",z="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=y,e.arrayTag=p,e.bigInt64ArrayTag=R,e.bigUint64ArrayTag=A,e.booleanTag=i,e.dataViewTag=w,e.dateTag=d,e.errorTag=b,e.float32ArrayTag=z,e.float64ArrayTag=k,e.functionTag=g,e.int16ArrayTag=M,e.int32ArrayTag=D,e.int8ArrayTag=T,e.mapTag=f,e.numberTag=n,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=E,e.uint32ArrayTag=C,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=_})(hv)),hv}var mv={},QE;function KU(){return QE||(QE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(mv)),mv}var XE;function DR(){return XE||(XE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HU(),r=Rj(),n=RR(),i=TR(),o=KU();function l(p,g){return d(p,void 0,p,new Map,g)}function d(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[_]=d(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(_,d(E,_,y,x,b));return N}if(p instanceof Set){const N=new Set;x.set(p,N);for(const _ of p)N.add(d(_,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[_]=d(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),f(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),f(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),f(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,f(N,p,y,x,b),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return x.set(p,N),f(N,p,y,x,b),N}if(p instanceof Number){const N=new Number(p.valueOf());return x.set(p,N),f(N,p,y,x,b),N}if(p instanceof String){const N=new String(p.valueOf());return x.set(p,N),f(N,p,y,x,b),N}if(typeof p=="object"&&h(p)){const N=Object.create(Object.getPrototypeOf(p));return x.set(p,N),f(N,p,y,x,b),N}return p}function f(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[_]=d(g[_],_,y,x,b))}}function h(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=d,e.copyProperties=f})(cv)),cv}var WE;function GU(){return WE||(WE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DR();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(uv)),uv}var ZE;function YU(){return ZE||(ZE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MR(),r=GU();function n(i){return i=r.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=n})(nv)),nv}var pv={},gv={},yv={},JE;function VU(){return JE||(JE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DR(),r=Rj(),n=RR();function i(o,l){return t.cloneDeepWith(o,(d,f,h,p)=>{const g=l==null?void 0:l(d,f,h,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,h,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})(yv)),yv}var eA;function QU(){return eA||(eA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VU();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(gv)),gv}var vv={},xv={},tA;function kR(){return tA||(tA=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})(xv)),xv}var bv={},rA;function XU(){return rA||(rA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rj();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(bv)),bv}var nA;function WU(){return nA||(nA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jR(),r=kR(),n=XU(),i=Cj();function o(l,d){let f;if(Array.isArray(d)?f=d:typeof d=="string"&&t.isDeepKey(d)&&(l==null?void 0:l[d])==null?f=i.toPath(d):f=[d],f.length===0)return!1;let h=l;for(let p=0;p<f.length;p++){const g=f[p];if((h==null||!Object.hasOwn(h,g))&&!((Array.isArray(h)||n.isArguments(h))&&r.isIndex(g)&&g<h.length))return!1;h=h[g]}return!0}e.has=o})(vv)),vv}var aA;function ZU(){return aA||(aA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MR(),r=Aj(),n=QU(),i=Tj(),o=WU();function l(d,f){switch(typeof d){case"object":{Object.is(d==null?void 0:d.valueOf(),-0)&&(d="-0");break}case"number":{d=r.toKey(d);break}}return f=n.cloneDeep(f),function(h){const p=i.get(h,d);return p===void 0?o.has(h,d):f===void 0?p===void 0:t.isMatch(p,f)}}e.matchesProperty=l})(pv)),pv}var iA;function JU(){return iA||(iA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ER(),r=qU(),n=YU(),i=ZU();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})(tv)),tv}var sA;function eq(){return sA||(sA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LU(),r=IU(),n=ER(),i=UU(),o=JU();function l(d,f=n.identity){return i.isArrayLikeObject(d)?t.uniqBy(Array.from(d),r.ary(o.iteratee(f),1)):[]}e.uniqBy=l})(Y0)),Y0}var jv,oA;function tq(){return oA||(oA=1,jv=eq().uniqBy),jv}var rq=tq();const lA=rs(rq);function $R(e,t,r){return t===!0?lA(e,r):typeof t=="function"?lA(e,t):e}var Dj=S.createContext(null),nq=e=>e,ct=()=>{var e=S.useContext(Dj);return e?e.store.dispatch:nq},Rh=()=>{},aq=()=>Rh,iq=(e,t)=>e===t;function ve(e){var t=S.useContext(Dj),r=S.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Rh,[t,e]);return jM.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:aq,t?t.store.getState:Rh,t?t.store.getState:Rh,r,iq)}function sq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function oq(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lq(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 uA=e=>Array.isArray(e)?e:[e];function uq(e){const t=Array.isArray(e[0])?e[0]:e;return lq(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function cq(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var dq=class{constructor(e){this.value=e}deref(){return this.value}},fq=typeof WeakRef<"u"?WeakRef:dq,hq=0,cA=1;function lh(){return{s:hq,v:void 0,o:null,p:null}}function LR(e,t={}){let r=lh();const{resultEqualityCheck:n}=t;let i,o=0;function l(){var g;let d=r;const{length:f}=arguments;for(let y=0,x=f;y<x;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=d.o;w===null&&(d.o=w=new WeakMap);const N=w.get(b);N===void 0?(d=lh(),w.set(b,d)):d=N}else{let w=d.p;w===null&&(d.p=w=new Map);const N=w.get(b);N===void 0?(d=lh(),w.set(b,d)):d=N}}const h=d;let p;if(d.s===cA)p=d.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 fq(p):p}return h.s=cA,h.v=p,p}return l.clearCache=()=>{r=lh(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function mq(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,l=0,d,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),sq(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:g,memoizeOptions:y=[],argsMemoize:x=LR,argsMemoizeOptions:b=[]}=p,w=uA(y),N=uA(b),_=uq(i),E=g(function(){return o++,h.apply(null,arguments)},...w),C=x(function(){l++;const T=cq(_,arguments);return d=E.apply(null,T),d},...N);return Object.assign(C,{resultFunc:h,memoizedResultFunc:E,dependencies:_,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>d,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var Q=mq(LR),pq=Object.assign((e,t=Q)=>{oq(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,d,f)=>(l[r[f]]=d,l),{}))},{withTypes:()=>pq}),wv={},Sv={},Nv={},dA;function gq(){return dA||(dA=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),d=t(i);if(l===d&&l===0){if(n<i)return o==="desc"?1:-1;if(n>i)return o==="desc"?-1:1}return o==="desc"?d-l:l-d}return 0};e.compareValues=r})(Nv)),Nv}var _v={},Ov={},fA;function IR(){return fA||(fA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Ov)),Ov}var hA;function yq(){return hA||(hA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IR(),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})(_v)),_v}var mA;function vq(){return mA||(mA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gq(),r=yq(),n=Cj();function i(o,l,d,f){if(o==null)return[];d=f?void 0:d,Array.isArray(o)||(o=Object.values(o)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(d)||(d=d==null?[]:[d]),d=d.map(x=>String(x));const h=(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]:h(b,x.path):typeof x=="function"?x(b):Array.isArray(x)?h(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],d[w]);if(N!==0)return N}return 0}).map(x=>x.original)}e.orderBy=i})(Sv)),Sv}var Ev={},pA;function xq(){return pA||(pA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],o=Math.floor(n),l=(d,f)=>{for(let h=0;h<d.length;h++){const p=d[h];Array.isArray(p)&&f<o?l(p,f+1):i.push(p)}};return l(r,0),i}e.flatten=t})(Ev)),Ev}var Av={},gA;function zR(){return gA||(gA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kR(),r=AR(),n=CR(),i=PR();function o(l,d,f){return n.isObject(f)&&(typeof d=="number"&&r.isArrayLike(f)&&t.isIndex(d)&&d<f.length||typeof d=="string"&&d in f)?i.isEqualsSameValueZero(f[d],l):!1}e.isIterateeCall=o})(Av)),Av}var yA;function bq(){return yA||(yA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vq(),r=xq(),n=zR();function i(o,...l){const d=l.length;return d>1&&n.isIterateeCall(o,l[0],l[1])?l=[]:d>2&&n.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(o,r.flatten(l),["asc"])}e.sortBy=i})(wv)),wv}var Cv,vA;function jq(){return vA||(vA=1,Cv=bq().sortBy),Cv}var wq=jq();const lp=rs(wq);var BR=e=>e.legend.settings,Sq=e=>e.legend.size,Nq=e=>e.legend.payload,_q=Q([Nq,BR],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?lp(n,r):n});function Oq(){return ve(_q)}var uh=1;function UR(){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)>uh||Math.abs(l.left-t.left)>uh||Math.abs(l.top-t.top)>uh||Math.abs(l.width-t.width)>uh)&&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 Eq=typeof Symbol=="function"&&Symbol.observable||"@@observable",xA=Eq,Tv=()=>Math.random().toString(36).substring(7).split("").join("."),Aq={INIT:`@@redux/INIT${Tv()}`,REPLACE:`@@redux/REPLACE${Tv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Tv()}`},nm=Aq;function kj(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 qR(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(qR)(e,t)}let n=e,i=t,o=new Map,l=o,d=0,f=!1;function h(){l===o&&(l=new Map,o.forEach((N,_)=>{l.set(_,N)}))}function p(){if(f)throw new Error(ar(3));return i}function g(N){if(typeof N!="function")throw new Error(ar(4));if(f)throw new Error(ar(5));let _=!0;h();const E=d++;return l.set(E,N),function(){if(_){if(f)throw new Error(ar(6));_=!1,h(),l.delete(E),o=null}}}function y(N){if(!kj(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(f)throw new Error(ar(9));try{f=!0,i=n(i,N)}finally{f=!1}return(o=l).forEach(E=>{E()}),N}function x(N){if(typeof N!="function")throw new Error(ar(10));n=N,y({type:nm.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)}},[xA](){return this}}}return y({type:nm.INIT}),{dispatch:y,subscribe:g,getState:p,replaceReducer:x,[xA]:b}}function Cq(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:nm.INIT})>"u")throw new Error(ar(12));if(typeof r(void 0,{type:nm.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ar(13))})}function FR(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{Cq(r)}catch(o){i=o}return function(l={},d){if(i)throw i;let f=!1;const h={};for(let p=0;p<n.length;p++){const g=n[p],y=r[g],x=l[g],b=y(x,d);if(typeof b>"u")throw d&&d.type,new Error(ar(14));h[g]=b,f=f||b!==x}return f=f||n.length!==Object.keys(l).length,f?h:l}}function am(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Tq(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(ar(15))};const l={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},d=e.map(f=>f(l));return o=am(...d)(i.dispatch),{...i,dispatch:o}}}function HR(e){return kj(e)&&"type"in e&&typeof e.type=="string"}var KR=Symbol.for("immer-nothing"),bA=Symbol.for("immer-draftable"),Ar=Symbol.for("immer-state");function $n(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var nn=Object,Kl=nn.getPrototypeOf,im="constructor",up="prototype",eb="configurable",sm="enumerable",Dh="writable",qc="value",Ka=e=>!!e&&!!e[Ar];function Un(e){var t;return e?GR(e)||dp(e)||!!e[bA]||!!((t=e[im])!=null&&t[bA])||fp(e)||hp(e):!1}var Pq=nn[up][im].toString(),jA=new WeakMap;function GR(e){if(!e||!$j(e))return!1;const t=Kl(e);if(t===null||t===nn[up])return!0;const r=nn.hasOwnProperty.call(t,im)&&t[im];if(r===Object)return!0;if(!bl(r))return!1;let n=jA.get(r);return n===void 0&&(n=Function.toString.call(r),jA.set(r,n)),n===Pq}function cp(e,t,r=!0){xd(e)===0?(r?Reflect.ownKeys(e):nn.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function xd(e){const t=e[Ar];return t?t.type_:dp(e)?1:fp(e)?2:hp(e)?3:0}var wA=(e,t,r=xd(e))=>r===2?e.has(t):nn[up].hasOwnProperty.call(e,t),tb=(e,t,r=xd(e))=>r===2?e.get(t):e[t],om=(e,t,r,n=xd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Mq(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var dp=Array.isArray,fp=e=>e instanceof Map,hp=e=>e instanceof Set,$j=e=>typeof e=="object",bl=e=>typeof e=="function",Pv=e=>typeof e=="boolean";function Rq(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Da=e=>e.copy_||e.base_,Lj=e=>e.modified_?e.copy_:e.base_;function rb(e,t){if(fp(e))return new Map(e);if(hp(e))return new Set(e);if(dp(e))return Array[up].slice.call(e);const r=GR(e);if(t===!0||t==="class_only"&&!r){const n=nn.getOwnPropertyDescriptors(e);delete n[Ar];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const l=i[o],d=n[l];d[Dh]===!1&&(d[Dh]=!0,d[eb]=!0),(d.get||d.set)&&(n[l]={[eb]:!0,[Dh]:!0,[sm]:d[sm],[qc]:e[l]})}return nn.create(Kl(e),n)}else{const n=Kl(e);if(n!==null&&r)return{...e};const i=nn.create(n);return nn.assign(i,e)}}function Ij(e,t=!1){return mp(e)||Ka(e)||!Un(e)||(xd(e)>1&&nn.defineProperties(e,{set:ch,add:ch,clear:ch,delete:ch}),nn.freeze(e),t&&cp(e,(r,n)=>{Ij(n,!0)},!1)),e}function Dq(){$n(2)}var ch={[qc]:Dq};function mp(e){return e===null||!$j(e)?!0:nn.isFrozen(e)}var lm="MapSet",nb="Patches",SA="ArrayMethods",YR={};function ao(e){const t=YR[e];return t||$n(0,e),t}var NA=e=>!!YR[e],Fc,VR=()=>Fc,kq=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:NA(lm)?ao(lm):void 0,arrayMethodsPlugin_:NA(SA)?ao(SA):void 0});function _A(e,t){t&&(e.patchPlugin_=ao(nb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ab(e){ib(e),e.drafts_.forEach($q),e.drafts_=null}function ib(e){e===Fc&&(Fc=e.parent_)}var OA=e=>Fc=kq(Fc,e);function $q(e){const t=e[Ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function EA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ar].modified_&&(ab(t),$n(4)),Un(e)&&(e=AA(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Ar].base_,e,t)}else e=AA(t,r);return Lq(t,e,!0),ab(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==KR?e:void 0}function AA(e,t){if(mp(t))return t;const r=t[Ar];if(!r)return um(t,e.handledSet_,e);if(!pp(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);WR(r,e)}return r.copy_}function Lq(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ij(t,r)}function QR(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var pp=(e,t)=>e.scope_===t,Iq=[];function XR(e,t,r,n){const i=Da(e),o=e.type_;if(n!==void 0&&tb(i,n,o)===t){om(i,n,r,o);return}if(!e.draftLocations_){const d=e.draftLocations_=new Map;cp(i,(f,h)=>{if(Ka(h)){const p=d.get(h)||[];p.push(f),d.set(h,p)}})}const l=e.draftLocations_.get(t)??Iq;for(const d of l)om(i,d,r,o)}function zq(e,t,r){e.callbacks_.push(function(i){var d;const o=t;if(!o||!pp(o,i))return;(d=i.mapSetPlugin_)==null||d.fixSetContents(o);const l=Lj(o);XR(e,o.draft_??o,l,r),WR(o,i)})}function WR(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)}QR(e)}}function Bq(e,t,r){const{scope_:n}=e;if(Ka(r)){const i=r[Ar];pp(i,n)&&i.callbacks_.push(function(){kh(e);const l=Lj(i);XR(e,r,l,t)})}else Un(r)&&e.callbacks_.push(function(){const o=Da(e);e.type_===3?o.has(r)&&um(r,n.handledSet_,n):tb(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&um(tb(e.copy_,t,e.type_),n.handledSet_,n)})}function um(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ka(e)||t.has(e)||!Un(e)||mp(e)||(t.add(e),cp(e,(n,i)=>{if(Ka(i)){const o=i[Ar];if(pp(o,r)){const l=Lj(o);om(e,n,l,e.type_),QR(o)}}else Un(i)&&um(i,t,r)})),e}function Uq(e,t){const r=dp(e),n={type_:r?1:0,scope_:t?t.scope_:VR(),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=cm;r&&(i=[n],o=Hc);const{revoke:l,proxy:d}=Proxy.revocable(i,o);return n.draft_=d,n.revoke_=l,[d,n]}var cm={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(!wA(i,t,e.type_))return qq(e,i,t);const o=i[t];if(e.finalized_||!Un(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&Rq(t))return o;if(o===Mv(e.base_,t)){kh(e);const l=e.type_===1?+t:t,d=ob(e.scope_,o,e,l);return e.copy_[l]=d}return o},has(e,t){return t in Da(e)},ownKeys(e){return Reflect.ownKeys(Da(e))},set(e,t,r){const n=ZR(Da(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Mv(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(Mq(r,i)&&(r!==void 0||wA(e.base_,t,e.type_)))return!0;kh(e),sb(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),Bq(e,t,r)),!0},deleteProperty(e,t){return kh(e),Mv(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),sb(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&&{[Dh]:!0,[eb]:e.type_!==1||t!=="length",[sm]:n[sm],[qc]:r[t]}},defineProperty(){$n(11)},getPrototypeOf(e){return Kl(e.base_)},setPrototypeOf(){$n(12)}},Hc={};for(let e in cm){let t=cm[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 cm.set.call(this,e[0],t,r,e[0])};function Mv(e,t){const r=e[Ar];return(r?Da(r):e)[t]}function qq(e,t,r){var i;const n=ZR(t,r);return n?qc in n?n[qc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function ZR(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 sb(e){e.modified_||(e.modified_=!0,e.parent_&&sb(e.parent_))}function kh(e){e.copy_||(e.assigned_=new Map,e.copy_=rb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Fq=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 d=this;return function(h=l,...p){return d.produce(h,g=>n.call(this,g,...p))}}bl(n)||$n(6),i!==void 0&&!bl(i)&&$n(7);let o;if(Un(r)){const l=OA(this),d=ob(l,r,void 0);let f=!0;try{o=n(d),f=!1}finally{f?ab(l):ib(l)}return _A(l,i),EA(o,l)}else if(!r||!$j(r)){if(o=n(r),o===void 0&&(o=r),o===KR&&(o=void 0),this.autoFreeze_&&Ij(o,!0),i){const l=[],d=[];ao(nb).generateReplacementPatches_(r,o,{patches_:l,inversePatches_:d}),i(l,d)}return o}else $n(1,r)},this.produceWithPatches=(r,n)=>{if(bl(r))return(d,...f)=>this.produceWithPatches(d,h=>r(h,...f));let i,o;return[this.produce(r,n,(d,f)=>{i=d,o=f}),i,o]},Pv(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Pv(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Pv(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Un(t)||$n(8),Ka(t)&&(t=On(t));const r=OA(this),n=ob(r,t,void 0);return n[Ar].isManual_=!0,ib(r),n}finishDraft(t,r){const n=t&&t[Ar];(!n||!n.isManual_)&&$n(9);const{scope_:i}=n;return _A(i,r),EA(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(nb).applyPatches_;return Ka(t)?i(t,r):this.produce(t,o=>i(o,r))}};function ob(e,t,r,n){const[i,o]=fp(t)?ao(lm).proxyMap_(t,r):hp(t)?ao(lm).proxySet_(t,r):Uq(t,r);return((r==null?void 0:r.scope_)??VR()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?zq(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function On(e){return Ka(e)||$n(10,e),JR(e)}function JR(e){if(!Un(e)||mp(e))return e;const t=e[Ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=rb(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=rb(e,!0);return cp(r,(i,o)=>{om(r,i,JR(o))},n),t&&(t.finalized_=!1),r}var Hq=new Fq,e3=Hq.produce;function t3(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var Kq=t3(),Gq=t3,Yq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?am:am.apply(null,arguments)};function on(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(an(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=>HR(n)&&n.type===e,r}var r3=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 CA(e){return Un(e)?e3(e,()=>{}):e}function dh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Vq(e){return typeof e=="boolean"}var Qq=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new r3;return r&&(Vq(r)?l.push(Kq):l.push(Gq(r.extraArgument))),l},n3="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[n3]:!0}}),TA=e=>t=>{setTimeout(t,e)},a3=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,l=!1;const d=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:TA(10):e.type==="callback"?e.queueNotification:TA(e.timeout),h=()=>{l=!1,o&&(o=!1,d.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const g=()=>i&&p(),y=n.subscribe(g);return d.add(p),()=>{y(),d.delete(p)}},dispatch(p){var g;try{return i=!((g=p==null?void 0:p.meta)!=null&&g[n3]),o=!i,o&&(l||(l=!0,f(h))),n.dispatch(p)}finally{i=!0}}})},Xq=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new r3(e);return n&&i.push(a3(typeof n=="object"?n:void 0)),i};function Wq(e){const t=Qq(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:l=void 0}=e||{};let d;if(typeof r=="function")d=r;else if(kj(r))d=FR(r);else throw new Error(an(1));let f;typeof n=="function"?f=n(t):f=t();let h=am;i&&(h=Yq({trace:!1,...typeof i=="object"&&i}));const p=Tq(...f),g=Xq(p);let y=typeof l=="function"?l(g):g();const x=h(...y);return qR(d,o,x)}function i3(e){const t={},r=[];let n;const i={addCase(o,l){const d=typeof o=="string"?o:o.type;if(!d)throw new Error(an(28));if(d in t)throw new Error(an(29));return t[d]=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 Zq(e){return typeof e=="function"}function Jq(e,t){let[r,n,i]=i3(t),o;if(Zq(e))o=()=>CA(e());else{const d=CA(e);o=()=>d}function l(d=o(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[i]),h.reduce((p,g)=>{if(g)if(Ka(p)){const x=g(p,f);return x===void 0?p:x}else{if(Un(p))return e3(p,y=>g(y,f));{const y=g(p,f);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},d)}return l.getInitialState=o,l}var e7="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",t7=(e=21)=>{let t="",r=e;for(;r--;)t+=e7[Math.random()*64|0];return t},r7=Symbol.for("rtk-slice-createasyncthunk");function n7(e,t){return`${e}/${t}`}function a7({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[r7];return function(i){const{name:o,reducerPath:l=o}=i;if(!o)throw new Error(an(11));const d=(typeof i.reducers=="function"?i.reducers(s7()):i.reducers)||{},f=Object.keys(d),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,T){const M=typeof A=="string"?A:A.type;if(!M)throw new Error(an(12));if(M in h.sliceCaseReducersByType)throw new Error(an(13));return h.sliceCaseReducersByType[M]=T,p},addMatcher(A,T){return h.sliceMatchers.push({matcher:A,reducer:T}),p},exposeAction(A,T){return h.actionCreators[A]=T,p},exposeCaseReducer(A,T){return h.sliceCaseReducersByName[A]=T,p}};f.forEach(A=>{const T=d[A],M={reducerName:A,type:n7(o,A),createNotation:typeof i.reducers=="function"};l7(T)?c7(M,T,p,t):o7(M,T,p)});function g(){const[A={},T=[],M=void 0]=typeof i.extraReducers=="function"?i3(i.extraReducers):[i.extraReducers],D={...A,...h.sliceCaseReducersByType};return Jq(i.initialState,R=>{for(let z in D)R.addCase(z,D[z]);for(let z of h.sliceMatchers)R.addMatcher(z.matcher,z.reducer);for(let z of T)R.addMatcher(z.matcher,z.reducer);M&&R.addDefaultCase(M)})}const y=A=>A,x=new Map,b=new WeakMap;let w;function N(A,T){return w||(w=g()),w(A,T)}function _(){return w||(w=g()),w.getInitialState()}function E(A,T=!1){function M(R){let z=R[A];return typeof z>"u"&&T&&(z=dh(b,M,_)),z}function D(R=y){const z=dh(x,T,()=>new WeakMap);return dh(z,R,()=>{const k={};for(const[H,U]of Object.entries(i.selectors??{}))k[H]=i7(U,R,()=>dh(b,R,_),T);return k})}return{reducerPath:A,getSelectors:D,get selectors(){return D(M)},selectSlice:M}}const C={name:o,reducer:N,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:_,...E(l),injectInto(A,{reducerPath:T,...M}={}){const D=T??l;return A.inject({reducerPath:D,reducer:N},M),{...C,...E(D,!0)}}};return C}}function i7(e,t,r,n){function i(o,...l){let d=t(o);return typeof d>"u"&&n&&(d=r()),e(d,...l)}return i.unwrapped=e,i}var br=a7();function s7(){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 o7({type:e,reducerName:t,createNotation:r},n,i){let o,l;if("reducer"in n){if(r&&!u7(n))throw new Error(an(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 l7(e){return e._reducerDefinitionType==="asyncThunk"}function u7(e){return e._reducerDefinitionType==="reducerWithPrepare"}function c7({type:e,reducerName:t},r,n,i){if(!i)throw new Error(an(18));const{payloadCreator:o,fulfilled:l,pending:d,rejected:f,settled:h,options:p}=r,g=i(e,o,p);n.exposeAction(t,g),l&&n.addCase(g.fulfilled,l),d&&n.addCase(g.pending,d),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:l||fh,pending:d||fh,rejected:f||fh,settled:h||fh})}function fh(){}var d7="task",s3="listener",o3="completed",zj="cancelled",f7=`task-${zj}`,h7=`task-${o3}`,lb=`${s3}-${zj}`,m7=`${s3}-${o3}`,gp=class{constructor(e){g0(this,"name","TaskAbortError");g0(this,"message");this.code=e,this.message=`${d7} ${zj} (reason: ${e})`}},Bj=(e,t)=>{if(typeof e!="function")throw new TypeError(an(32))},dm=()=>{},l3=(e,t=dm)=>(e.catch(t),e),u3=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ws=e=>{if(e.aborted)throw new gp(e.reason)};function c3(e,t){let r=dm;return new Promise((n,i)=>{const o=()=>i(new gp(e.reason));if(e.aborted){o();return}r=u3(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=dm})}var p7=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof gp?"cancelled":"rejected",error:r}}finally{t==null||t()}},fm=e=>t=>l3(c3(e,t).then(r=>(Ws(e),r))),d3=e=>{const t=fm(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:_l}=Object,PA={},yp="listenerMiddleware",g7=(e,t)=>{const r=n=>u3(e,()=>n.abort(e.reason));return(n,i)=>{Bj(n);const o=new AbortController;r(o);const l=p7(async()=>{Ws(e),Ws(o.signal);const d=await n({pause:fm(o.signal),delay:d3(o.signal),signal:o.signal});return Ws(o.signal),d},()=>o.abort(h7));return i!=null&&i.autoJoin&&t.push(l.catch(dm)),{result:fm(e)(l),cancel(){o.abort(f7)}}}},y7=(e,t)=>{const r=async(n,i)=>{Ws(t);let o=()=>{};const d=[new Promise((f,h)=>{let p=e({predicate:n,effect:(g,y)=>{y.unsubscribe(),f([g,y.getState(),y.getOriginalState()])}});o=()=>{p(),h()}})];i!=null&&d.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await c3(t,Promise.race(d));return Ws(t),f}finally{o()}};return(n,i)=>l3(r(n,i))},f3=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(an(21));return Bj(o),{predicate:i,type:t,effect:o}},h3=_l(e=>{const{type:t,predicate:r,effect:n}=f3(e);return{id:t7(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(an(22))}}},{withTypes:()=>h3}),MA=(e,t)=>{const{type:r,effect:n,predicate:i}=f3(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},ub=e=>{e.pending.forEach(t=>{t.abort(lb)})},v7=(e,t)=>()=>{for(const r of t.keys())ub(r);e.clear()},RA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},m3=_l(on(`${yp}/add`),{withTypes:()=>m3}),x7=on(`${yp}/removeAll`),p3=_l(on(`${yp}/remove`),{withTypes:()=>p3}),b7=(...e)=>{console.error(`${yp}/error`,...e)},bd=(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=b7}=e;Bj(l);const d=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),b=>{x.unsubscribe(),b!=null&&b.cancelActive&&ub(x)}),f=x=>{const b=MA(t,x)??h3(x);return d(b)};_l(f,{withTypes:()=>f});const h=x=>{const b=MA(t,x);return b&&(b.unsubscribe(),x.cancelActive&&ub(b)),!!b};_l(h,{withTypes:()=>h});const p=async(x,b,w,N)=>{const _=new AbortController,E=y7(f,_.signal),C=[];try{x.pending.add(_),n(x),await Promise.resolve(x.effect(b,_l({},w,{getOriginalState:N,condition:(A,T)=>E(A,T).then(Boolean),take:E,delay:d3(_.signal),pause:fm(_.signal),extra:o,signal:_.signal,fork:g7(_.signal,C),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((A,T,M)=>{A!==_&&(A.abort(lb),M.delete(A))})},cancel:()=>{_.abort(lb),x.pending.delete(_)},throwIfCancelled:()=>{Ws(_.signal)}})))}catch(A){A instanceof gp||RA(l,A,{raisedBy:"effect"})}finally{await Promise.all(C),_.abort(m7),i(x),x.pending.delete(_)}},g=v7(t,r);return{middleware:x=>b=>w=>{if(!HR(w))return b(w);if(m3.match(w))return f(w.payload);if(x7.match(w)){g();return}if(p3.match(w))return h(w.payload);let N=x.getState();const _=()=>{if(N===PA)throw new Error(an(23));return N};let E;try{if(E=b(w),t.size>0){const C=x.getState(),A=Array.from(t.values());for(const T of A){let M=!1;try{M=T.predicate(w,C,N)}catch(D){M=!1,RA(l,D,{raisedBy:"predicate"})}M&&p(T,w,x,_)}}}finally{N=PA}return E},startListening:f,stopListening:h,clearListeners:g}};function an(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 j7={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},g3=br({name:"chartLayout",initialState:j7,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:w7,setLayout:S7,setChartSize:N7,setScale:_7}=g3.actions,O7=g3.reducer;function y3(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 DA(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?DA(Object(r),!0).forEach(function(n){E7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E7(e,t,r){return(t=A7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A7(e){var t=C7(e,"string");return typeof t=="symbol"?t:t+""}function C7(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 T7=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:o,verticalAlign:l,layout:d}=t;if((d==="vertical"||d==="horizontal"&&l==="middle")&&o!=="center"&&ge(e[o]))return wl(wl({},e),{},{[o]:e[o]+(n||0)});if((d==="horizontal"||d==="vertical"&&o==="center")&&l!=="middle"&&ge(e[l]))return wl(wl({},e),{},{[l]:e[l]+(i||0)})}return e},Qa=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",v3=(e,t,r,n)=>{if(n)return e.map(d=>d.coordinate);var i,o,l=e.map(d=>(d.coordinate===t&&(i=!0),d.coordinate===r&&(o=!0),d.coordinate));return i||l.push(t),o||l.push(r),l},x3=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:o,scale:l,realScaleType:d,isCategorical:f,categoricalDomain:h,tickCount:p,ticks:g,niceTicks:y,axisType:x}=e;if(!l)return null;var b=d==="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 C=n?n.indexOf(_):_,A=l.map(C);return Be(A)?{coordinate:A+w,value:_,offset:w,index:E}:null}).filter(Ur);return N}return f&&h?h.map((_,E)=>{var C=l.map(_);return Be(C)?{coordinate:C+w,value:_,index:E,offset:w}:null}).filter(Ur):l.ticks&&p!=null?l.ticks(p).map((_,E)=>{var C=l.map(_);return Be(C)?{coordinate:C+w,value:_,index:E,offset:w}:null}).filter(Ur):l.domain().map((_,E)=>{var C=l.map(_);return Be(C)?{coordinate:C+w,value:n?n[_]:_,index:E,offset:w}:null}).filter(Ur)},P7=(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},M7=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,d=0;d<r;++d){var f=e[d],h=f==null?void 0:f[i];if(h!=null){var p=h[1],g=h[0],y=la(p)?g:p;y>=0?(h[0]=o,o+=y,h[1]=o):(h[0]=l,l+=y,h[1]=l)}}}},R7=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 d=e[l],f=d==null?void 0:d[i];if(f!=null){var h=la(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},D7={sign:M7,expand:iU,none:ro,silhouette:sU,wiggle:oU,positive:R7},k7=(e,t,r)=>{var n,i=(n=D7[r])!==null&&n!==void 0?n:ro,o=aU().keys(t).value((d,f)=>Number(Ot(d,f,0))).order(Zx).offset(i),l=o(e);return l.forEach((d,f)=>{d.forEach((h,p)=>{var g=Ot(e[p],t[f],0);Array.isArray(g)&&g.length===2&&ge(g[0])&&ge(g[1])&&(h[0]=g[0],h[1]=g[1])})}),l};function $7(e){return e==null?void 0:String(e)}function kA(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 d=SR(r,"value",i[t.dataKey]);if(d)return d.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Ot(i,mt(l)?t.dataKey:l),h=t.scale.map(f);return ge(h)?h:null}var $A=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 d=Ot(o,t.dataKey,t.scale.domain()[l]);if(mt(d))return null;var f=t.scale.map(d);return ge(f)?f-i/2+n:null},L7=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]},I7=e=>{var t=e.flat(2).filter(ge);return[Math.min(...t),Math.max(...t)]},z7=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],B7=(e,t,r)=>{if(e!=null)return z7(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var{stackedData:l}=o,d=l.reduce((f,h)=>{var p=y3(h,t,r),g=I7(p);return!Be(g[0])||!Be(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(d[0],n[0]),Math.max(d[1],n[1])]},[1/0,-1/0]))},LA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,IA=/^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=lp(t,p=>p.coordinate),o=1/0,l=1,d=i.length;l<d;l++){var f=i[l],h=i[l-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function zA(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 vp(e,t){if(e)return String(e);if(typeof t=="string")return t}var U7=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},q7=(e,t)=>t==="centric"?e.angle:e.radius,Xa=e=>e.layout.width,Wa=e=>e.layout.height,F7=e=>e.layout.scale,b3=e=>e.layout.margin,xp=Q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),bp=Q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),H7="data-recharts-item-index",K7="data-recharts-item-id",jd=60;function BA(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 hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(r),!0).forEach(function(n){G7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G7(e,t,r){return(t=Y7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y7(e){var t=V7(e,"string");return typeof t=="symbol"?t:t+""}function V7(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 Q7=e=>e.brush.height;function X7(e){var t=bp(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:jd;return r+i}return r},0)}function W7(e){var t=bp(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:jd;return r+i}return r},0)}function Z7(e){var t=xp(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function J7(e){var t=xp(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=Q([Xa,Wa,b3,Q7,X7,W7,Z7,J7,BR,Sq],(e,t,r,n,i,o,l,d,f,h)=>{var p={left:(r.left||0)+i,right:(r.right||0)+o},g={top:(r.top||0)+l,bottom:(r.bottom||0)+d},y=hh(hh({},g),p),x=y.bottom;y.bottom+=n,y=T7(y,f,h);var b=e-y.left-y.right,w=t-y.top-y.bottom;return hh(hh({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(w,0)})}),eF=Q(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Uj=Q(Xa,Wa,(e,t)=>({x:0,y:0,width:e,height:t})),tF=S.createContext(null),jr=()=>S.useContext(tF)!=null,jp=e=>e.brush,wp=Q([jp,Vt,b3],(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})),Rv={},Dv={},kv={},UA;function rF(){return UA||(UA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:o}={}){let l,d=null;const f=o!=null&&o.includes("leading"),h=o==null||o.includes("trailing"),p=()=>{d!==null&&(r.apply(l,d),l=void 0,d=null)},g=()=>{h&&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,d=null},N=()=>{p()},_=function(...E){if(i!=null&&i.aborted)return;l=this,d=E;const C=y==null;x(),f&&C&&p()};return _.schedule=x,_.cancel=w,_.flush=N,i==null||i.addEventListener("abort",w,{once:!0}),_}e.debounce=t})(kv)),kv}var qA;function nF(){return qA||(qA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rF();function r(n,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:d=!0,maxWait:f}=o,h=Array(2);l&&(h[0]="leading"),d&&(h[1]="trailing");let p,g=null;const y=t.debounce(function(...w){p=n.apply(this,w),g=null},i,{edges:h}),x=function(...w){return f!=null&&(g===null&&(g=Date.now()),Date.now()-g>=f)?(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})(Dv)),Dv}var FA;function aF(){return FA||(FA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nF();function r(n,i=0,o={}){const{leading:l=!0,trailing:d=!0}=o;return t.debounce(n,i,{leading:l,maxWait:i,trailing:d})}e.throttle=r})(Rv)),Rv}var $v,HA;function iF(){return HA||(HA=1,$v=aF().throttle),$v}var sF=iF();const oF=rs(sF);var hm=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}},j3=(e,t,r)=>{var{width:n=aa.width,height:i=aa.height,aspect:o,maxHeight:l}=r,d=no(n)?e:Number(n),f=no(i)?t:Number(i);return o&&o>0&&(d?f=d/o:f&&(d=f*o),l&&f!=null&&f>l&&(f=l)),{calculatedWidth:d,calculatedHeight:f}},lF={width:0,height:0,overflow:"visible"},uF={width:0,overflowX:"visible"},cF={height:0,overflowY:"visible"},dF={},fF=e=>{var{width:t,height:r}=e,n=no(t),i=no(r);return n&&i?lF:n?uF:i?cF:dF};function hF(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 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 KA(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 GA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KA(Object(r),!0).forEach(function(n){mF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mF(e,t,r){return(t=pF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pF(e){var t=gF(e,"string");return typeof t=="symbol"?t:t+""}function gF(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 w3=S.createContext(aa.initialDimension);function yF(e){return ca(e.width)&&ca(e.height)}function S3(e){var{children:t,width:r,height:n}=e,i=S.useMemo(()=>({width:r,height:n}),[r,n]);return yF(i)?S.createElement(w3.Provider,{value:i},t):null}var qj=()=>S.useContext(w3),vF=S.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=aa.initialDimension,width:i,height:o,minWidth:l=aa.minWidth,minHeight:d,maxHeight:f,children:h,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}),C=S.useCallback((R,z)=>{E(k=>{var H=Math.round(R),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 R=U=>{var ae,Z=U[0];if(Z!=null){var{width:G,height:$}=Z.contentRect;C(G,$),(ae=N.current)===null||ae===void 0||ae.call(N,G,$)}};p>0&&(R=oF(R,p,{trailing:!0,leading:!1}));var z=new ResizeObserver(R),{width:k,height:H}=w.current.getBoundingClientRect();return C(k,H),z.observe(w.current),()=>{z.disconnect()}},[C,p]);var{containerWidth:A,containerHeight:T}=_;hm(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:M,calculatedHeight:D}=j3(A,T,{width:i,height:o,aspect:r,maxHeight:f});return hm(M!=null&&M>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.`,M,D,i,o,l,d,r),S.createElement("div",{id:g?"".concat(g):void 0,className:Xe("recharts-responsive-container",y),style:GA(GA({},b),{},{width:i,height:o,minWidth:l,minHeight:d,maxHeight:f}),ref:w},S.createElement("div",{style:fF({width:i,height:o})},S.createElement(S3,{width:M,height:D},h)))}),Fj=S.forwardRef((e,t)=>{var r=qj();if(ca(r.width)&&ca(r.height))return e.children;var{width:n,height:i}=hF({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=j3(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ge(o)&&ge(l)?S.createElement(S3,{width:o,height:l},e.children):S.createElement(vF,cb({},e,{width:n,height:i,ref:t}))});function Hj(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 Sp=()=>{var e,t=jr(),r=ve(eF),n=ve(wp),i=(e=ve(jp))===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}},xF={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},N3=()=>{var e;return(e=ve(Vt))!==null&&e!==void 0?e:xF},Kj=()=>ve(Xa),Gj=()=>ve(Wa),bF=()=>ve(e=>e.layout.margin),We=e=>e.layout.layoutType,yo=()=>ve(We),_3=()=>{var e=yo();if(e==="horizontal"||e==="vertical")return e},O3=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},jF=()=>{var e=yo();return e!==void 0},wd=e=>{var t=ct(),r=jr(),{width:n,height:i}=e,o=qj(),l=n,d=i;return o&&(l=o.width>0?o.width:n,d=o.height>0?o.height:i),S.useEffect(()=>{!r&&ca(l)&&ca(d)&&t(N7({width:l,height:d}))},[t,r,l,d]),null},E3=Symbol.for("immer-nothing"),YA=Symbol.for("immer-draftable"),ln=Symbol.for("immer-state");function Ln(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?A3(e)||Array.isArray(e)||!!e[YA]||!!((t=e.constructor)!=null&&t[YA])||Sd(e)||_p(e):!1}var wF=Object.prototype.constructor.toString(),VA=new WeakMap;function A3(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=VA.get(r);return n===void 0&&(n=Function.toString.call(r),VA.set(r,n)),n===wF}function mm(e,t,r=!0){Np(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 Np(e){const t=e[ln];return t?t.type_:Array.isArray(e)?1:Sd(e)?2:_p(e)?3:0}function db(e,t){return Np(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function C3(e,t,r){const n=Np(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function SF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Sd(e){return e instanceof Map}function _p(e){return e instanceof Set}function Cs(e){return e.copy_||e.base_}function fb(e,t){if(Sd(e))return new Map(e);if(_p(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=A3(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],d=n[l];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(n[l]={configurable:!0,writable:!0,enumerable:d.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 Yj(e,t=!1){return Op(e)||Yl(e)||!io(e)||(Np(e)>1&&Object.defineProperties(e,{set:mh,add:mh,clear:mh,delete:mh}),Object.freeze(e),t&&Object.values(e).forEach(r=>Yj(r,!0))),e}function NF(){Ln(2)}var mh={value:NF};function Op(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var _F={};function so(e){const t=_F[e];return t||Ln(0,e),t}var Gc;function T3(){return Gc}function OF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function QA(e,t){t&&(so("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hb(e){mb(e),e.drafts_.forEach(EF),e.drafts_=null}function mb(e){e===Gc&&(Gc=e.parent_)}function XA(e){return Gc=OF(Gc,e)}function EF(e){const t=e[ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function WA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ln].modified_&&(hb(t),Ln(4)),io(e)&&(e=pm(t,e),t.parent_||gm(t,e)),t.patches_&&so("Patches").generateReplacementPatches_(r[ln].base_,e,t.patches_,t.inversePatches_)):e=pm(t,r,[]),hb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==E3?e:void 0}function pm(e,t,r){if(Op(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[ln];if(!i)return mm(t,(o,l)=>ZA(e,i,t,o,l,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return gm(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,d=!1;i.type_===3&&(l=new Set(o),o.clear(),d=!0),mm(l,(f,h)=>ZA(e,i,o,f,h,r,d),n),gm(e,o,!1),r&&e.patches_&&so("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function ZA(e,t,r,n,i,o,l){if(i==null||typeof i!="object"&&!l)return;const d=Op(i);if(!(d&&!l)){if(Yl(i)){const f=o&&t&&t.type_!==3&&!db(t.assigned_,n)?o.concat(n):void 0,h=pm(e,i,f);if(C3(r,n,h),Yl(h))e.canAutoFreeze_=!1;else return}else l&&r.add(i);if(io(i)&&!d){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&d)return;pm(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Sd(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&gm(e,i)}}}function gm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yj(t,r)}function AF(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:T3(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Vj;r&&(i=[n],o=Yc);const{revoke:l,proxy:d}=Proxy.revocable(i,o);return n.draft_=d,n.revoke_=l,d}var Vj={get(e,t){if(t===ln)return e;const r=Cs(e);if(!db(r,t))return CF(e,r,t);const n=r[t];return e.finalized_||!io(n)?n:n===Lv(e.base_,t)?(Iv(e),e.copy_[t]=gb(n,e)):n},has(e,t){return t in Cs(e)},ownKeys(e){return Reflect.ownKeys(Cs(e))},set(e,t,r){const n=P3(Cs(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Lv(Cs(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(SF(r,i)&&(r!==void 0||db(e.base_,t)))return!0;Iv(e),pb(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 Lv(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Iv(e),pb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Cs(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ln(11)},getPrototypeOf(e){return Kc(e.base_)},setPrototypeOf(){Ln(12)}},Yc={};mm(Vj,(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 Vj.set.call(this,e[0],t,r,e[0])};function Lv(e,t){const r=e[ln];return(r?Cs(r):e)[t]}function CF(e,t,r){var i;const n=P3(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function P3(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 pb(e){e.modified_||(e.modified_=!0,e.parent_&&pb(e.parent_))}function Iv(e){e.copy_||(e.copy_=fb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var TF=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(f=o,...h){return l.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&Ln(6),n!==void 0&&typeof n!="function"&&Ln(7);let i;if(io(t)){const o=XA(this),l=gb(t,void 0);let d=!0;try{i=r(l),d=!1}finally{d?hb(o):mb(o)}return QA(o,n),WA(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===E3&&(i=void 0),this.autoFreeze_&&Yj(i,!0),n){const o=[],l=[];so("Patches").generateReplacementPatches_(t,i,o,l),n(o,l)}return i}else Ln(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(l,...d)=>this.produceWithPatches(l,f=>t(f,...d));let n,i;return[this.produce(t,r,(l,d)=>{n=l,i=d}),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)||Ln(8),Yl(e)&&(e=PF(e));const t=XA(this),r=gb(e,void 0);return r[ln].isManual_=!0,mb(t),r}finishDraft(e,t){const r=e&&e[ln];(!r||!r.isManual_)&&Ln(9);const{scope_:n}=r;return QA(n,t),WA(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 gb(e,t){const r=Sd(e)?so("MapSet").proxyMap_(e,t):_p(e)?so("MapSet").proxySet_(e,t):AF(e,t);return(t?t.scope_:T3()).drafts_.push(r),r}function PF(e){return Yl(e)||Ln(10,e),M3(e)}function M3(e){if(!io(e)||Op(e))return e;const t=e[ln];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=fb(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=fb(e,!0);return mm(r,(i,o)=>{C3(r,i,M3(o))},n),t&&(t.finalized_=!1),r}var MF=new TF;MF.produce;var RF={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},R3=br({name:"legend",initialState:RF,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:JA,setLegendSettings:DF,addLegendPayload:kF,replaceLegendPayload:$F,removeLegendPayload:LF}=R3.actions,IF=R3.reducer,zv={exports:{}},Bv={};/**
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 eC;function zF(){if(eC)return Bv;eC=1;var e=tu();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,d=e.useDebugValue;return Bv.useSyncExternalStoreWithSelector=function(f,h,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(T){if(!_){if(_=!0,E=T,T=g(T),y!==void 0&&b.hasValue){var M=b.value;if(y(M,T))return C=M}return C=T}if(M=C,r(E,T))return M;var D=g(T);return y!==void 0&&y(M,D)?(E=T,M):(E=T,C=D)}var _=!1,E,C,A=p===void 0?null:p;return[function(){return N(h())},A===null?void 0:function(){return N(A())}]},[h,p,g,y]);var w=n(f,x[0],x[1]);return o(function(){b.hasValue=!0,b.value=w},[w]),d(w),w},Bv}var tC;function BF(){return tC||(tC=1,zv.exports=zF()),zv.exports}BF();function UF(e){e()}function qF(){let e=null,t=null;return{clear(){e=null,t=null},notify(){UF(()=>{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 rC={notify(){},get:()=>[]};function FF(e,t){let r,n=rC,i=0,o=!1;function l(w){p();const N=n.subscribe(w);let _=!1;return()=>{_||(_=!0,N(),g())}}function d(){n.notify()}function f(){b.onStateChange&&b.onStateChange()}function h(){return o}function p(){i++,r||(r=e.subscribe(f),n=qF())}function g(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=rC)}function y(){o||(o=!0,p())}function x(){o&&(o=!1,g())}const b={addNestedSub:l,notifyNestedSubs:d,handleChangeWrapper:f,isSubscribed:h,trySubscribe:y,tryUnsubscribe:x,getListeners:()=>n};return b}var HF=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",KF=HF(),GF=()=>typeof navigator<"u"&&navigator.product==="ReactNative",YF=GF(),VF=()=>KF||YF?S.useLayoutEffect:S.useEffect,QF=VF();function nC(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function XF(e,t){if(nC(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])||!nC(e[r[i]],t[r[i]]))return!1;return!0}var Uv=Symbol.for("react-redux-context"),qv=typeof globalThis<"u"?globalThis:{};function WF(){if(!S.createContext)return{};const e=qv[Uv]??(qv[Uv]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var ZF=WF();function JF(e){const{children:t,context:r,serverState:n,store:i}=e,o=S.useMemo(()=>{const f=FF(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),l=S.useMemo(()=>i.getState(),[i]);QF(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),l!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,l]);const d=r||ZF;return S.createElement(d.Provider,{value:o},t)}var eH=JF,tH=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function rH(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(tH.has(n)){if(e[n]==null&&t[n]==null)continue;if(!XF(e[n],t[n]))return!1}else if(!rH(e[n],t[n]))return!1;return!0}var nH=["contextPayload"];function yb(){return yb=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},yb.apply(null,arguments)}function aC(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?aC(Object(r),!0).forEach(function(n){aH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aH(e,t,r){return(t=iH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iH(e){var t=sH(e,"string");return typeof t=="symbol"?t:t+""}function sH(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,t){if(e==null)return{};var r,n,i=lH(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 lH(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 uH(e){return e.value}function cH(e){var{contextPayload:t}=e,r=oH(e,nH),n=$R(t,e.payloadUniqBy,uH),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($U,i)}function dH(e,t,r,n,i,o){var{layout:l,align:d,verticalAlign:f}=t,h,p;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(d==="center"&&l==="vertical"?h={left:((n||0)-o.width)/2}:h=d==="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))&&(f==="middle"?p={top:((i||0)-o.height)/2}:p=f==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),Vl(Vl({},h),p)}function fH(e){var t=ct();return S.useEffect(()=>{t(DF(e))},[t,e]),null}function hH(e){var t=ct();return S.useEffect(()=>(t(JA(e)),()=>{t(JA({width:0,height:0}))}),[t,e]),null}function mH(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var pH={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function gH(e){var t=fr(e,pH),r=Oq(),n=A9(),i=bF(),{width:o,height:l,wrapperStyle:d,portal:f}=t,[h,p]=UR([r]),g=Kj(),y=Gj();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=mH(t.layout,l,o,x),w=f?d:Vl(Vl({position:"absolute",width:(b==null?void 0:b.width)||o||"auto",height:(b==null?void 0:b.height)||l||"auto"},dH(d,t,i,g,y,h)),d),N=f??n;if(N==null||r==null)return null;var _=S.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:p},S.createElement(fH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!f&&S.createElement(hH,{width:h.width,height:h.height}),S.createElement(cH,yb({},t,b,{margin:i,chartWidth:g,chartHeight:y,contextPayload:r})));return Zm.createPortal(_,N)}var D3=S.memo(gH,ru);D3.displayName="Legend";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 iC(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?iC(Object(r),!0).forEach(function(n){yH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yH(e,t,r){return(t=vH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vH(e){var t=xH(e,"string");return typeof t=="symbol"?t:t+""}function xH(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 bH(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 jH(e,t){return t==null?e:lp(e,t)}var wH=e=>{var{separator:t=cl.separator,contentStyle:r,itemStyle:n,labelStyle:i=cl.labelStyle,payload:o,formatter:l,itemSorter:d,wrapperClassName:f,labelClassName:h,label:p,labelFormatter:g,accessibilityLayer:y=cl.accessibilityLayer}=e,x=()=>{if(o&&o.length){var T={padding:0,margin:0},M=jH(o,d),D=M.map((R,z)=>{if(!R||R.type==="none")return null;var k=R.formatter||l||bH,{value:H,name:U}=R,ae=H,Z=U;if(k){var G=k(H,U,R,z,o);if(Array.isArray(G))[ae,Z]=G;else if(G!=null)ae=G;else return null}var $=dc(dc({},cl.itemStyle),{},{color:R.color||cl.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(z),style:$},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"},R.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:T},D)}return null},b=dc(dc({},cl.contentStyle),r),w=dc({margin:0},i),N=!mt(p),_=N?p:"",E=Xe("recharts-default-tooltip",f),C=Xe("recharts-tooltip-label",h);N&&g&&o!==void 0&&o!==null&&(_=g(p,o));var A=y?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",vb({className:E,style:b},A),S.createElement("p",{className:C,style:w},S.isValidElement(_)?_:"".concat(_)),x())},fc="recharts-tooltip-wrapper",SH={visibility:"hidden"};function NH(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 sC(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:o,reverseDirection:l,tooltipDimension:d,viewBox:f,viewBoxDimension:h}=e;if(o&&ge(o[n]))return o[n];var p=r[n]-d-(i>0?i:0),g=r[n]+i;if(t[n])return l[n]?p:g;var y=f[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(h==null)return 0;var w=g+d,N=y+h;return w>N?Math.max(p,y):Math.max(g,y)}function _H(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 OH(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:o,reverseDirection:l,tooltipBox:d,useTranslate3d:f,viewBox:h}=e,p,g,y;return d.height>0&&d.width>0&&r?(g=sC({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:l,tooltipDimension:d.width,viewBox:h,viewBoxDimension:h.width}),y=sC({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:l,tooltipDimension:d.height,viewBox:h,viewBoxDimension:h.height}),p=_H({translateX:g,translateY:y,useTranslate3d:f})):p=SH,{cssProperties:p,cssClasses:NH({translateX:g,translateY:y,coordinate:r})}}var EH=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Nd={isSsr:EH()};function k3(){var[e,t]=S.useState(()=>Nd.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 oC(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?oC(Object(r),!0).forEach(function(n){AH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AH(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=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 PH(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function MH(e){var t,r,n,i,o,l,d=k3(),[f,h]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var N,_,E,C;h({dismissed:!0,dismissedAtCoordinate:{x:(N=(_=e.coordinate)===null||_===void 0?void 0:_.x)!==null&&N!==void 0?N:0,y:(E=(C=e.coordinate)===null||C===void 0?void 0:C.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]),f.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==f.dismissedAtCoordinate.x||((o=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)!==f.dismissedAtCoordinate.y)&&h(dl(dl({},f),{},{dismissed:!1}));var{cssClasses:p,cssProperties:g}=OH({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:PH({prefersReducedMotion:d,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:!f.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 RH=S.memo(MH),$3=()=>{var e;return(e=ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function xb(){return xb=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},xb.apply(null,arguments)}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 uC(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){DH(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 DH(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=$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)}var cC={curveBasisClosed:Y9,curveBasisOpen:V9,curveBasis:G9,curveBumpX:M9,curveBumpY:R9,curveLinearClosed:Q9,curveLinear:ip,curveMonotoneX:X9,curveMonotoneY:W9,curveNatural:Z9,curveStep:J9,curveStepAfter:tU,curveStepBefore:eU},ym=e=>Be(e.x)&&Be(e.y),dC=e=>e.base!=null&&ym(e.base)&&ym(e),hc=e=>e.x,mc=e=>e.y,LH=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(vd(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=cC["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return cC[r]||ip},fC={connectNulls:!1,type:"linear"},IH=e=>{var{type:t=fC.type,points:r=[],baseLine:n,layout:i,connectNulls:o=fC.connectNulls}=e,l=LH(t,i),d=o?r.filter(ym):r;if(Array.isArray(n)){var f,h=r.map((b,w)=>uC(uC({},b),{},{base:n[w]}));i==="vertical"?f=oh().y(mc).x1(hc).x0(b=>b.base.x):f=oh().x(hc).y1(mc).y0(b=>b.base.y);var p=f.defined(dC).curve(l),g=o?h.filter(dC):h;return p(g)}var y;i==="vertical"&&ge(n)?y=oh().y(mc).x1(hc).x0(n):ge(n)?y=oh().x(hc).y1(mc).y0(n):y=cR().x(hc).y(mc);var x=y.defined(ym).curve(l);return x(d)},L3=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},d=r&&r.length?IH(l):n;return S.createElement("path",xb({},zn(e),Mj(e),{className:Xe("recharts-curve",t),d:d===null?void 0:d,ref:i}))},zH=["x","y","top","left","width","height","className"];function bb(){return bb=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},bb.apply(null,arguments)}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 BH(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){UH(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 UH(e,t,r){return(t=qH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qH(e){var t=FH(e,"string");return typeof t=="symbol"?t:t+""}function FH(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 HH(e,t){if(e==null)return{};var r,n,i=KH(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 KH(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 GH=(e,t,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),YH=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:o=0,height:l=0,className:d}=e,f=HH(e,zH),h=BH({x:t,y:r,top:n,left:i,width:o,height:l},f);return!ge(t)||!ge(r)||!ge(o)||!ge(l)||!ge(n)||!ge(i)?null:S.createElement("path",bb({},Er(h),{className:Xe("recharts-cross",d),d:GH(t,r,o,l,n,i)}))};function VH(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 mC(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 pC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mC(Object(r),!0).forEach(function(n){QH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mC(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 ZH=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),I3=(e,t,r)=>e.map(n=>"".concat(ZH(n)," ").concat(t,"ms ").concat(r)).join(","),JH=(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)=>pC(pC({},r),{},{[n]:e(n,t[n])}),{});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 It(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){eK(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 eK(e,t,r){return(t=tK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tK(e){var t=rK(e,"string");return typeof t=="symbol"?t:t+""}function rK(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 vm=(e,t,r)=>e+(t-e)*r,jb=e=>{var{from:t,to:r}=e;return t!==r},z3=(e,t,r)=>{var n=Vc((i,o)=>{if(jb(o)){var[l,d]=e(o.from,o.to,o.velocity);return It(It({},o),{},{from:l,velocity:d})}return o},t);return r<1?Vc((i,o)=>jb(o)&&n[i]!=null?It(It({},o),{},{velocity:vm(o.velocity,n[i].velocity,r),from:vm(o.from,n[i].from,r)}):o,t):z3(e,n,r-1)};function nK(e,t,r,n,i,o){var l,d=n.reduce((y,x)=>It(It({},y),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),f=()=>Vc((y,x)=>x.from,d),h=()=>!Object.values(d).filter(jb).length,p=null,g=y=>{l||(l=y);var x=y-l,b=x/r.dt;d=z3(r,d,b),i(It(It(It({},e),t),f())),l=y,h()||(p=o.setTimeout(g))};return()=>(p=o.setTimeout(g),()=>{var y;(y=p)===null||y===void 0||y()})}function aK(e,t,r,n,i,o,l){var d=null,f=i.reduce((g,y)=>{var x=e[y],b=t[y];return x==null||b==null?g:It(It({},g),{},{[y]:[x,b]})},{}),h,p=g=>{h||(h=g);var y=(g-h)/n,x=Vc((w,N)=>vm(...N,r(y)),f);if(o(It(It(It({},e),t),x)),y<1)d=l.setTimeout(p);else{var b=Vc((w,N)=>vm(...N,r(1)),f);o(It(It(It({},e),t),b))}};return()=>(d=l.setTimeout(p),()=>{var g;(g=d)===null||g===void 0||g()})}const iK=(e,t,r,n,i,o)=>{var l=JH(e,t);return r==null?()=>(i(It(It({},e),t)),()=>{}):r.isStepper===!0?nK(e,t,r,l,i,o):aK(e,t,r,n,l,i,o)};var xm=1e-4,B3=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],U3=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),yC=(e,t)=>r=>{var n=B3(e,t);return U3(n,r)},sK=(e,t)=>r=>{var n=B3(e,t),i=[...n.map((o,l)=>o*l).slice(1),0];return U3(i,r)},oK=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]]},lK=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=oK(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},uK=(e,t,r,n)=>{var i=yC(e,r),o=yC(t,n),l=sK(e,r),d=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,g=p,y=0;y<8;++y){var x=i(g)-p,b=l(g);if(Math.abs(x-p)<xm||b<xm)return o(g);g=d(g-x/b)}return o(g)};return f.isStepper=!1,f},vC=function(){return uK(...lK(...arguments))},cK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,o=(l,d,f)=>{var h=-(l-d)*r,p=f*n,g=f+(h-p)*i/1e3,y=f*i/1e3+l;return Math.abs(y-d)<xm&&Math.abs(g)<xm?[d,0]:[y,g]};return o.isStepper=!0,o.dt=i,o},dK=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return vC(e);case"spring":return cK();default:if(e.split("(")[0]==="cubic-bezier")return vC(e)}return typeof e=="function"?e:null};function fK(e){var t,r=()=>null,n=!1,i=null,o=l=>{if(!n){if(Array.isArray(l)){if(!l.length)return;var d=l,[f,...h]=d;if(typeof f=="number"){i=e.setTimeout(o.bind(null,h),f);return}o(f),i=e.setTimeout(o.bind(null,h));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 hK{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 mK(){return fK(new hK)}var pK=S.createContext(mK);function gK(e,t){var r=S.useContext(pK);return S.useMemo(()=>t??r(e),[e,t,r])}var yK={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},xC={t:0},Fv={t:1};function Ep(e){var t=fr(e,yK),{isActive:r,canBegin:n,duration:i,easing:o,begin:l,onAnimationEnd:d,onAnimationStart:f,children:h}=t,p=k3(),g=r==="auto"?!Nd.isSsr&&!p:r,y=gK(t.animationId,t.animationManager),[x,b]=S.useState(g?xC:Fv),w=S.useRef(null);return S.useEffect(()=>{g||b(Fv)},[g]),S.useEffect(()=>{if(!g||!n)return go;var N=iK(xC,Fv,dK(o),i,b,y.getTimeoutController()),_=()=>{w.current=N()};return y.start([f,l,_,i,d]),()=>{y.stop(),w.current&&w.current(),d()}},[g,n,i,o,l,f,d,y]),h(x.t)}function Ap(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 vK=["radius"],xK=["radius"],bC,jC,wC,SC,NC,_C,OC,EC,AC,CC;function TC(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 PC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(r),!0).forEach(function(n){bK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bK(e,t,r){return(t=jK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jK(e){var t=wK(e,"string");return typeof t=="symbol"?t:t+""}function wK(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 bm(){return bm=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},bm.apply(null,arguments)}function MC(e,t){if(e==null)return{};var r,n,i=SK(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 SK(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 RC=(e,t,r,n,i)=>{var o=Gi(r),l=Gi(n),d=Math.min(Math.abs(o)/2,Math.abs(l)/2),f=l>=0?1:-1,h=o>=0?1:-1,p=l>=0&&o>=0||l<0&&o<0?1:0,g;if(d>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>d?d:N}g=bt(bC||(bC=Xn(["M",",",""])),e,t+f*y[0]),y[0]>0&&(g+=bt(jC||(jC=Xn(["A ",",",",0,0,",",",",",""])),y[0],y[0],p,e+h*y[0],t)),g+=bt(wC||(wC=Xn(["L ",",",""])),e+r-h*y[1],t),y[1]>0&&(g+=bt(SC||(SC=Xn(["A ",",",",0,0,",`,
82
+ `,",",""])),y[1],y[1],p,e+r,t+f*y[1])),g+=bt(NC||(NC=Xn(["L ",",",""])),e+r,t+n-f*y[2]),y[2]>0&&(g+=bt(_C||(_C=Xn(["A ",",",",0,0,",`,
83
+ `,",",""])),y[2],y[2],p,e+r-h*y[2],t+n)),g+=bt(OC||(OC=Xn(["L ",",",""])),e+h*y[3],t+n),y[3]>0&&(g+=bt(EC||(EC=Xn(["A ",",",",0,0,",`,
84
+ `,",",""])),y[3],y[3],p,e,t+n-f*y[3])),g+="Z"}else if(d>0&&i===+i&&i>0){var _=Math.min(d,i);g=bt(AC||(AC=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+f*_,_,_,p,e+h*_,t,e+r-h*_,t,_,_,p,e+r,t+f*_,e+r,t+n-f*_,_,_,p,e+r-h*_,t+n,e+h*_,t+n,_,_,p,e,t+n-f*_)}else g=bt(CC||(CC=Xn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},DC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},q3=e=>{var t=fr(e,DC),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:d,height:f,radius:h,className:p}=t,{animationEasing:g,animationDuration:y,animationBegin:x,isAnimationActive:b,isUpdateAnimationActive:w}=t,N=S.useRef(d),_=S.useRef(f),E=S.useRef(o),C=S.useRef(l),A=S.useMemo(()=>({x:o,y:l,width:d,height:f,radius:h}),[o,l,d,f,h]),T=Ap(A,"rectangle-");if(o!==+o||l!==+l||d!==+d||f!==+f||d===0||f===0)return null;var M=Xe("recharts-rectangle",p);if(!w){var D=Er(t),{radius:R}=D,z=MC(D,vK);return S.createElement("path",bm({},z,{x:Gi(o),y:Gi(l),width:Gi(d),height:Gi(f),radius:typeof h=="number"?h:void 0,className:M,d:RC(o,l,d,f,h)}))}var k=N.current,H=_.current,U=E.current,ae=C.current,Z="0px ".concat(n===-1?1:n,"px"),G="".concat(n,"px ").concat(n,"px"),$=I3(["strokeDasharray"],y,typeof g=="string"?g:DC.animationEasing);return S.createElement(Ep,{animationId:T,key:T,canBegin:n>0,duration:y,easing:g,isActive:w,begin:x},F=>{var J=jt(k,d,F),re=jt(H,f,F),oe=jt(U,o,F),L=jt(ae,l,F);r.current&&(N.current=J,_.current=re,E.current=oe,C.current=L);var X;b?F>0?X={transition:$,strokeDasharray:G}:X={strokeDasharray:Z}:X={strokeDasharray:G};var le=Er(t),{radius:ue}=le,pe=MC(le,xK);return S.createElement("path",bm({},pe,{radius:typeof h=="number"?h:void 0,className:M,d:RC(oe,L,J,re,h),ref:r,style:PC(PC({},X),t.style)}))})};function kC(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 $C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kC(Object(r),!0).forEach(function(n){NK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NK(e,t,r){return(t=_K(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _K(e){var t=OK(e,"string");return typeof t=="symbol"?t:t+""}function OK(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 jm=Math.PI/180,EK=e=>e*180/Math.PI,lr=(e,t,r,n)=>({x:e+Math.cos(-jm*n)*r,y:t+Math.sin(-jm*n)*r}),AK=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},CK=(e,t)=>{var{x:r,y:n}=e,{x:i,y:o}=t;return Math.sqrt((r-i)**2+(n-o)**2)},TK=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:o}=t,l=CK({x:r,y:n},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var d=(r-i)/l,f=Math.acos(d);return n>o&&(f=2*Math.PI-f),{radius:l,angle:EK(f),angleInRadian:f}},PK=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}},MK=(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},RK=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:o}=TK({x:r,y:n},t),{innerRadius:l,outerRadius:d}=t;if(i<l||i>d||i===0)return null;var{startAngle:f,endAngle:h}=PK(t),p=o,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?$C($C({},t),{},{radius:i,angle:MK(p,t)}):null};function F3(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:o}=e,l=lr(t,r,n,i),d=lr(t,r,n,o);return{points:[l,d],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var LC,IC,zC,BC,UC,qC,FC;function wb(){return wb=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},wb.apply(null,arguments)}function Ds(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var DK=(e,t)=>{var r=Br(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},ph=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:o,isExternal:l,cornerRadius:d,cornerIsExternal:f}=e,h=d*(l?1:-1)+n,p=Math.asin(d/h)/jm,g=f?i:i+o*p,y=lr(t,r,h,g),x=lr(t,r,n,g),b=f?i-o*p:i,w=lr(t,r,h*Math.cos(p*jm),b);return{center:y,circleTangency:x,lineTangency:w,theta:p}},H3=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:o,endAngle:l}=e,d=DK(o,l),f=o+d,h=lr(t,r,i,o),p=lr(t,r,i,f),g=bt(LC||(LC=Ds(["M ",",",`
92
+ A `,",",`,0,
93
+ `,",",`,
94
+ `,",",`
95
+ `])),h.x,h.y,i,i,+(Math.abs(d)>180),+(o>f),p.x,p.y);if(n>0){var y=lr(t,r,n,o),x=lr(t,r,n,f);g+=bt(IC||(IC=Ds(["L ",",",`
96
+ A `,",",`,0,
97
+ `,",",`,
98
+ `,","," Z"])),x.x,x.y,n,n,+(Math.abs(d)>180),+(o<=f),y.x,y.y)}else g+=bt(zC||(zC=Ds(["L ",","," Z"])),t,r);return g},kK=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:d,startAngle:f,endAngle:h}=e,p=Br(h-f),{circleTangency:g,lineTangency:y,theta:x}=ph({cx:t,cy:r,radius:i,angle:f,sign:p,cornerRadius:o,cornerIsExternal:d}),{circleTangency:b,lineTangency:w,theta:N}=ph({cx:t,cy:r,radius:i,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:d}),_=d?Math.abs(f-h):Math.abs(f-h)-x-N;if(_<0)return l?bt(BC||(BC=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):H3({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var E=bt(UC||(UC=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:C,lineTangency:A,theta:T}=ph({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:d}),{circleTangency:M,lineTangency:D,theta:R}=ph({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:d}),z=d?Math.abs(f-h):Math.abs(f-h)-T-R;if(z<0&&o===0)return"".concat(E,"L").concat(t,",").concat(r,"Z");E+=bt(qC||(qC=Ds(["L",",",`
106
+ A`,",",",0,0,",",",",",`
107
+ A`,",",",0,",",",",",",",`
108
+ A`,",",",0,0,",",",",","Z"])),D.x,D.y,o,o,+(p<0),M.x,M.y,n,n,+(z>180),+(p>0),C.x,C.y,o,o,+(p<0),A.x,A.y)}else E+=bt(FC||(FC=Ds(["L",",","Z"])),t,r);return E},$K={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},K3=e=>{var t=fr(e,$K),{cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:d,cornerIsExternal:f,startAngle:h,endAngle:p,className:g}=t;if(o<i||h===p)return null;var y=Xe("recharts-sector",g),x=o-i,b=Bn(l,x,0,!0),w;return b>0&&Math.abs(h-p)<360?w=kK({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(b,x/2),forceCornerRadius:d,cornerIsExternal:f,startAngle:h,endAngle:p}):w=H3({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:p}),S.createElement("path",wb({},Er(t),{className:y,d:w}))};function LK(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(_R(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:o,outerRadius:l,angle:d}=t,f=lr(n,i,o,d),h=lr(n,i,l,d);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return F3(t)}}var Hv={},Kv={},Gv={},HC;function IK(){return HC||(HC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IR();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Gv)),Gv}var KC;function zK(){return KC||(KC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IK();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})(Kv)),Kv}var GC;function BK(){return GC||(GC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zR(),r=zK();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 d=Math.max(Math.ceil((o-i)/(l||1)),0),f=new Array(d);for(let h=0;h<d;h++)f[h]=i,i+=l;return f}e.range=n})(Hv)),Hv}var Yv,YC;function UK(){return YC||(YC=1,Yv=BK().range),Yv}var qK=UK();const G3=rs(qK);var Hn=e=>e.chartData,Qj=Q([Hn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),_d=(e,t,r,n)=>n?Qj(e):Hn(e),FK=(e,t,r)=>r?Qj(e):Hn(e),HK=Q([_d],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});Q([Qj],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var KK=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 VC(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function Y3(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 GK(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(sa(n))return VC(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,l,d;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"&&LA.test(i)){var f=LA.exec(i);if(f==null||f[1]==null||t==null)l=void 0;else{var h=+f[1];l=t[0]-h}}else l=t==null?void 0:t[0];if(o==="auto")t!=null&&(d=Math.max(...t));else if(ge(o))d=o;else if(typeof o=="function")try{t!=null&&(d=o(t==null?void 0:t[1]))}catch{}else if(typeof o=="string"&&IA.test(o)){var p=IA.exec(o);if(p==null||p[1]==null||t==null)d=void 0;else{var g=+p[1];d=t[1]+g}}else d=t==null?void 0:t[1];var y=[l,d];if(sa(y))return t==null?y:VC(y,t,r)}}}var nu=1e9,YK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wj,ht=!0,An="[DecimalError] ",Zs=An+"Invalid argument: ",Xj=An+"Exponent out of range: ",au=Math.floor,Ts=Math.pow,VK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,rn,Kt=1e7,lt=7,V3=9007199254740991,wm=au(V3/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 Fa(this,new this.constructor(e))};he.dividedToIntegerBy=he.idiv=function(e){var t=this,r=t.constructor;return nt(Fa(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(rn))throw Error(An+"NaN");if(r.s<1)throw Error(An+(r.s?"NaN":"-Infinity"));return r.eq(rn)?new n(0):(ht=!1,t=Fa(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?W3(t,e):Q3(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=Fa(r,e,0,1).times(e),ht=!0,r.minus(t)):nt(new n(r),i)};he.naturalExponential=he.exp=function(){return X3(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?Q3(t,e):W3(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,d=this,f=d.constructor;if(d.s<1){if(!d.s)return new f(0);throw Error(An+"NaN")}for(e=Dt(d),ht=!1,i=Math.sqrt(+d),i==0||i==1/0?(t=ia(d.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 f(t)):n=new f(i.toString()),r=f.precision,i=l=r+3;;)if(o=n,n=o.plus(Fa(d,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(d)){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,d,f,h,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,f=y.length,h=x.length,f<h&&(o=y,y=x,x=o,l=f,f=h,h=l),o=[],l=f+h,n=l;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)d=o[i]+x[n]*y[i-n-1]+t,o[i--]=d%Kt|0,t=d/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,d=this,f=d.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(rn);if(d=new f(d),!d.s){if(e.s<1)throw Error(An+"Infinity");return d}if(d.eq(rn))return d;if(n=f.precision,e.eq(rn))return nt(d,n);if(t=e.e,r=e.d.length-1,l=t>=r,o=d.s,l){if((r=p<0?-p:p)<=V3){for(i=new f(rn),t=Math.ceil(n/lt+4),ht=!1;r%2&&(i=i.times(d),XC(i.d,t)),r=au(r/2),r!==0;)d=d.times(d),XC(d.d,t);return ht=!0,e.s<0?new f(rn).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,d.s=1,ht=!1,i=e.times(Qc(d,n+h)),ht=!0,i=X3(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 Q3(e,t){var r,n,i,o,l,d,f,h,p=e.constructor,g=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ht?nt(t,g):t;if(f=e.d,h=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(n=f,o=-o,d=h.length):(n=h,i=l,d=f.length),l=Math.ceil(g/lt),d=l>d?l+1:d+1,o>d&&(o=d,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(d=f.length,o=h.length,d-o<0&&(o=d,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Kt|0,f[o]%=Kt;for(r&&(f.unshift(r),++i),d=f.length;f[--d]==0;)f.pop();return t.d=f,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+=Pi(r)),o+=n;l=e[t],n=l+"",r=lt-n.length,r&&(o+=Pi(r))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Fa=(function(){function e(n,i){var o,l=0,d=n.length;for(n=n.slice();d--;)o=n[d]*i+l,n[d]=o%Kt|0,l=o/Kt|0;return l&&n.unshift(l),n}function t(n,i,o,l){var d,f;if(o!=l)f=o>l?1:-1;else for(d=f=0;d<o;d++)if(n[d]!=i[d]){f=n[d]>i[d]?1:-1;break}return f}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 d,f,h,p,g,y,x,b,w,N,_,E,C,A,T,M,D,R,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(f=n.e-i.e,D=U.length,T=H.length,x=new z(k),b=x.d=[],h=0;U[h]==(H[h]||0);)++h;if(U[h]>(H[h]||0)&&--f,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,h=0,D==1)for(p=0,U=U[0],E++;(h<T||p)&&E--;h++)C=p*Kt+(H[h]||0),b[h]=C/U|0,p=C%U|0;else{for(p=Kt/(U[0]+1)|0,p>1&&(U=e(U,p),H=e(H,p),D=U.length,T=H.length),A=D,w=H.slice(0,D),N=w.length;N<D;)w[N++]=0;R=U.slice(),R.unshift(0),M=U[0],U[1]>=Kt/2&&++M;do p=0,d=t(U,w,D,N),d<0?(_=w[0],D!=N&&(_=_*Kt+(w[1]||0)),p=_/M|0,p>1?(p>=Kt&&(p=Kt-1),g=e(U,p),y=g.length,N=w.length,d=t(g,w,y,N),d==1&&(p--,r(g,D<y?R:U,y))):(p==0&&(d=p=1),g=U.slice()),y=g.length,y<N&&g.unshift(0),r(w,g,N),d==-1&&(N=w.length,d=t(U,w,D,N),d<1&&(p++,r(w,D<N?R:U,N))),N=w.length):d===0&&(p++,w=[0]),b[h++]=p,d&&w[0]?w[N++]=H[A]||0:(w=[H[A]],N=1);while((A++<T||w[0]!==void 0)&&E--)}return b[0]||b.shift(),x.e=f,nt(x,l?o+Dt(x)+1:o)}})();function X3(e,t){var r,n,i,o,l,d,f=0,h=0,p=e.constructor,g=p.precision;if(Dt(e)>16)throw Error(Xj+Dt(e));if(!e.s)return new p(rn);for(ht=!1,d=g,l=new p(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(n=Math.log(Ts(2,h))/Math.LN10*2+5|0,d+=n,r=i=o=new p(rn),p.precision=d;;){if(i=nt(i.times(e),d),r=r.times(++f),l=o.plus(Fa(i,r,d)),ia(l.d).slice(0,d)===ia(o.d).slice(0,d)){for(;h--;)o=nt(o.times(o),d);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 Vv(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 Pi(e){for(var t="";e--;)t+="0";return t}function Qc(e,t){var r,n,i,o,l,d,f,h,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(rn))return new w(0);if(t==null?(ht=!1,h=N):h=t,x.eq(10))return t==null&&(ht=!0),Vv(w,h);if(h+=y,w.precision=h,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 f=Vv(w,h+2,N).times(o+""),x=Qc(new w(n+"."+r.slice(1)),h-y).plus(f),w.precision=N,t==null?(ht=!0,nt(x,N)):x;for(d=l=x=Fa(x.minus(rn),x.plus(rn),h),p=nt(x.times(x),h),i=3;;){if(l=nt(l.times(p),h),f=d.plus(Fa(l,new w(i),h)),ia(f.d).slice(0,h)===ia(d.d).slice(0,h))return d=d.times(2),o!==0&&(d=d.plus(Vv(w,h+2,N).times(o+""))),d=Fa(d,new w(g),h),w.precision=N,t==null?(ht=!0,nt(d,N)):d;d=f,i+=2}}function QC(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>wm||e.e<-wm))throw Error(Xj+r)}else e.s=0,e.e=0,e.d=[0];return e}function nt(e,t,r){var n,i,o,l,d,f,h,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,h=g[p=0];else{if(p=Math.ceil((n+1)/lt),o=g.length,p>=o)return e;for(h=o=g[p],l=1;o>=10;o/=10)l++;n%=lt,i=n-lt+l}if(r!==void 0&&(o=Ts(10,l-i-1),d=h/o%10|0,f=t<0||g[p+1]!==void 0||h%o,f=r<4?(d||f)&&(r==0||r==(e.s<0?3:2)):d>5||d==5&&(r==4||f||r==6&&(n>0?i>0?h/Ts(10,l-i):0:g[p-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=Dt(e),g.length=1,t=t-o-1,g[0]=Ts(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=Ts(10,lt-n),g[p]=i>0?(h/Ts(10,l-i)%Ts(10,i)|0)*o:0),f)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>wm||e.e<-wm))throw Error(Xj+Dt(e));return e}function W3(e,t){var r,n,i,o,l,d,f,h,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(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),l=h-n,l){for(p=l<0,p?(r=f,l=-l,d=g.length):(r=g,n=h,d=f.length),i=Math.max(Math.ceil(x/lt),d)+2,l>i&&(l=i,r.length=1),r.reverse(),i=l;i--;)r.push(0);r.reverse()}else{for(i=f.length,d=g.length,p=i<d,p&&(d=i),i=0;i<d;i++)if(f[i]!=g[i]){p=f[i]<g[i];break}l=0}for(p&&(r=f,f=g,g=r,t.s=-t.s),d=f.length,i=g.length-d;i>0;--i)f[d++]=0;for(i=g.length;i>l;){if(f[--i]<g[i]){for(o=i;o&&f[--o]===0;)f[o]=Kt-1;--f[o],f[i]+=Kt}f[i]-=g[i]}for(;f[--d]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,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)+Pi(n):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pi(-i-1)+o,r&&(n=r-l)>0&&(o+=Pi(n))):i>=l?(o+=Pi(i+1-l),r&&(n=r-i-1)>0&&(o=o+"."+Pi(n))):((n=i+1)<l&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-l)>0&&(i+1===l&&(o+="."),o+=Pi(n))),e.s<0?"-"+o:o}function XC(e,t){if(e.length>t)return e.length=t,!0}function Z3(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 QC(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,VK.test(o))QC(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=Z3,i.config=i.set=QK,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 QK(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 Wj=Z3(YK);rn=new Wj(1);const ze=Wj;function J3(e){var t;return e===0?t=1:t=Math.floor(new ze(e).abs().log(10).toNumber())+1,t}function e4(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 t4=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Zj=(e,t,r)=>{if(e.lte(0))return new ze(0);var n=J3(e.toNumber()),i=new ze(10).pow(n),o=e.div(i),l=n!==1?.05:.1,d=new ze(Math.ceil(o.div(l).toNumber())).add(r).mul(l),f=d.mul(i);return t?new ze(f.toNumber()):new ze(Math.ceil(f.toNumber()))},r4=(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()),d=new ze(10).pow(l),f=e.div(d).toNumber(),h=i.findIndex(x=>x>=f-1e-10);if(h===-1&&(d=d.mul(10),h=0),h+=r,h>=i.length){var p=Math.floor(h/i.length);h%=i.length,d=d.mul(new ze(10).pow(p))}var g=(n=i[h])!==null&&n!==void 0?n:1,y=new ze(g).mul(d);return t?y:new ze(Math.ceil(y.toNumber()))},XK=(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(J3(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),d=[],f=0;f<t;f++)d.push(i.add(new ze(f-l).mul(n)).toNumber());return d},n4=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]:Zj;if(!Number.isFinite((r-t)/(n-1)))return{step:new ze(0),tickMin:new ze(0),tickMax:new ze(0)};var d=l(new ze(r).sub(t).div(n-1),i,o),f;t<=0&&r>=0?f=new ze(0):(f=new ze(t).add(r).div(2),f=f.sub(new ze(f).mod(d)));var h=Math.ceil(f.sub(t).div(d).toNumber()),p=Math.ceil(new ze(r).sub(f).div(d).toNumber()),g=h+p+1;return g>n?n4(t,r,n,i,o+1,l):(g<n&&(p=r>0?p+(n-g):p,h=r>0?h:h+(n-g)),{step:d,tickMin:f.sub(new ze(h).mul(d)),tickMax:f.add(new ze(p).mul(d))})},WC=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",d=Math.max(i,2),[f,h]=t4([r,n]);if(f===-1/0||h===1/0){var p=h===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),h];return r>n?p.reverse():p}if(f===h)return XK(f,i,o);var g=l==="snap125"?r4:Zj,{step:y,tickMin:x,tickMax:b}=n4(f,h,d,o,0,g),w=e4(x,b.add(new ze(.1).mul(y)),y);return r>n?w.reverse():w},ZC=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",[d,f]=t4([n,i]);if(d===-1/0||f===1/0)return[n,i];if(d===f)return[d];var h=l==="snap125"?r4:Zj,p=Math.max(r,2),g=h(new ze(f).sub(d).div(p-1),o,0),y=[...e4(new ze(d),new ze(f),g),f];return o===!1&&(y=y.map(x=>Math.round(x))),n>i?y.reverse():y},a4=e=>e.rootProps.maxBarSize,WK=e=>e.rootProps.barGap,i4=e=>e.rootProps.barCategoryGap,ZK=e=>e.rootProps.barSize,Cp=e=>e.rootProps.stackOffset,s4=e=>e.rootProps.reverseStackOrder,Jj=e=>e.options.chartName,ew=e=>e.rootProps.syncId,o4=e=>e.rootProps.syncMethod,tw=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 Pp(e,t,r){if(r!=="auto")return r;if(e!=null)return Qa(e,t)?"category":"number"}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 Sm(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){JK(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 JK(e,t,r){return(t=eG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eG(e){var t=tG(e,"string");return typeof t=="symbol"?t:t+""}function tG(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 eT={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"},tT={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"},rG=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},rw=Q([rG,O3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Pp(t,"angleAxis",eT.type))!==null&&r!==void 0?r:"category";return Sm(Sm({},eT),{},{type:n})}),nG=(e,t)=>e.polarAxis.radiusAxis[t],nw=Q([nG,O3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Pp(t,"radiusAxis",tT.type))!==null&&r!==void 0?r:"category";return Sm(Sm({},tT),{},{type:n})}),Mp=e=>e.polarOptions,aw=Q([Xa,Wa,Vt],AK),l4=Q([Mp,aw],(e,t)=>{if(e!=null)return Bn(e.innerRadius,t,0)}),u4=Q([Mp,aw],(e,t)=>{if(e!=null)return Bn(e.outerRadius,t,t*.8)}),aG=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},c4=Q([Mp],aG);Q([rw,c4],Tp);var d4=Q([aw,l4,u4],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Q([nw,d4],Tp);var f4=Q([We,Mp,l4,u4,Xa,Wa],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:l,cy:d,startAngle:f,endAngle:h}=t;return{cx:Bn(l,i,i/2),cy:Bn(d,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Qt=(e,t)=>t,Rp=(e,t,r)=>r;function iw(e){return e==null?void 0:e.id}function h4(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=r,l=new Map;return e.forEach(d=>{var f,h=(f=d.data)!==null&&f!==void 0?f:n;if(!(h==null||h.length===0)){var p=iw(d);h.forEach((g,y)=>{var x=o==null||i?y:String(Ot(g,o,null)),b=Ot(g,d.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 Dp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var kp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function $p(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function iG(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 sw(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],d=i[1];return l<=d?o>=l&&o<=d:o>=d&&o<=l},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,l)=>{var d=e(o);if(d!=null){if(e.bandwidth&&l!==null&&l!==void 0&&l.position){var f=e.bandwidth();switch(l.position){case"middle":d+=f/2;break;case"end":d+=f;break}}return d}}}}}var sG=(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 oG(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ow(e){let t,r,n;e.length!==2?(t=Xi,r=(d,f)=>Xi(e(d),f),n=(d,f)=>e(d)-f):(t=e===Xi||e===oG?e:lG,r=e,n=e);function i(d,f,h=0,p=d.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(d[g],f)<0?h=g+1:p=g}while(h<p)}return h}function o(d,f,h=0,p=d.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(d[g],f)<=0?h=g+1:p=g}while(h<p)}return h}function l(d,f,h=0,p=d.length){const g=i(d,f,h,p-1);return g>h&&n(d[g-1],f)>-n(d[g],f)?g-1:g}return{left:i,center:l,right:o}}function lG(){return 0}function m4(e){return e===null?NaN:+e}function*uG(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const cG=ow(Xi),Od=cG.right;ow(m4).center;class rT extends Map{constructor(t,r=hG){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(nT(this,t))}has(t){return super.has(nT(this,t))}set(t,r){return super.set(dG(this,t),r)}delete(t){return super.delete(fG(this,t))}}function nT({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function dG({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function fG({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function hG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function mG(e=Xi){if(e===Xi)return p4;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 p4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const pG=Math.sqrt(50),gG=Math.sqrt(10),yG=Math.sqrt(2);function Nm(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>=pG?10:o>=gG?5:o>=yG?2:1;let d,f,h;return i<0?(h=Math.pow(10,-i)/l,d=Math.round(e*h),f=Math.round(t*h),d/h<e&&++d,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*l,d=Math.round(e/h),f=Math.round(t/h),d*h<e&&++d,f*h>t&&--f),f<d&&.5<=r&&r<2?Nm(e,t,r*2):[d,f,h]}function Sb(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?Nm(t,e,r):Nm(e,t,r);if(!(o>=i))return[];const d=o-i+1,f=new Array(d);if(n)if(l<0)for(let h=0;h<d;++h)f[h]=(o-h)/-l;else for(let h=0;h<d;++h)f[h]=(o-h)*l;else if(l<0)for(let h=0;h<d;++h)f[h]=(i+h)/-l;else for(let h=0;h<d;++h)f[h]=(i+h)*l;return f}function Nb(e,t,r){return t=+t,e=+e,r=+r,Nm(e,t,r)[2]}function _b(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Nb(t,e,r):Nb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function aT(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function iT(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function g4(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?p4:mG(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),g=.5*Math.exp(2*p/3),y=.5*Math.sqrt(p*g*(f-g)/f)*(h-f/2<0?-1:1),x=Math.max(r,Math.floor(t-h*g/f+y)),b=Math.min(n,Math.floor(t+(f-h)*g/f+y));g4(e,t,x,b,i)}const o=e[t];let l=r,d=n;for(pc(e,r,t),i(e[n],o)>0&&pc(e,r,n);l<d;){for(pc(e,l,d),++l,--d;i(e[l],o)<0;)++l;for(;i(e[d],o)>0;)--d}i(e[r],o)===0?pc(e,r,d):(++d,pc(e,d,n)),d<=t&&(r=d+1),t<=d&&(n=d-1)}return e}function pc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function vG(e,t,r){if(e=Float64Array.from(uG(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return iT(e);if(t>=1)return aT(e);var n,i=(n-1)*t,o=Math.floor(i),l=aT(g4(e,o).subarray(0,o+1)),d=iT(e.subarray(o+1));return l+(d-l)*(i-o)}}function xG(e,t,r=m4){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),d=+r(e[o+1],o+1,e);return l+(d-l)*(i-o)}}function bG(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 Cn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Za(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 Ob=Symbol("implicit");function lw(){var e=new rT,t=[],r=[],n=Ob;function i(o){let l=e.get(o);if(l===void 0){if(n!==Ob)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 rT;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 lw(t,r).unknown(n)},Cn.apply(i,arguments),i}function uw(){var e=lw().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,l,d=!1,f=0,h=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-f+h*2),d&&(o=Math.floor(o)),b+=(w-b-o*(y-f))*p,l=o*(1-f),d&&(b=Math.round(b),l=Math.round(l));var N=bG(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,d=!0,g()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(y){return arguments.length?(d=!!y,g()):d},e.padding=function(y){return arguments.length?(f=Math.min(1,h=+y),g()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),g()):f},e.paddingOuter=function(y){return arguments.length?(h=+y,g()):h},e.align=function(y){return arguments.length?(p=Math.max(0,Math.min(1,y)),g()):p},e.copy=function(){return uw(t(),[n,i]).round(d).paddingInner(f).paddingOuter(h).align(p)},Cn.apply(g(),arguments)}function y4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return y4(t())},e}function jG(){return y4(uw.apply(null,arguments).paddingInner(1))}function cw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function v4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ed(){}var Xc=.7,_m=1/Xc,Ol="\\s*([+-]?\\d+)\\s*",Wc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wG=/^#([0-9a-f]{3,8})$/,SG=new RegExp(`^rgb\\(${Ol},${Ol},${Ol}\\)$`),NG=new RegExp(`^rgb\\(${oa},${oa},${oa}\\)$`),_G=new RegExp(`^rgba\\(${Ol},${Ol},${Ol},${Wc}\\)$`),OG=new RegExp(`^rgba\\(${oa},${oa},${oa},${Wc}\\)$`),EG=new RegExp(`^hsl\\(${Wc},${oa},${oa}\\)$`),AG=new RegExp(`^hsla\\(${Wc},${oa},${oa},${Wc}\\)$`),sT={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};cw(Ed,Zc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oT,formatHex:oT,formatHex8:CG,formatHsl:TG,formatRgb:lT,toString:lT});function oT(){return this.rgb().formatHex()}function CG(){return this.rgb().formatHex8()}function TG(){return x4(this).formatHsl()}function lT(){return this.rgb().formatRgb()}function Zc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=wG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?uT(t):r===3?new qr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?gh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?gh(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=SG.exec(e))?new qr(t[1],t[2],t[3],1):(t=NG.exec(e))?new qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_G.exec(e))?gh(t[1],t[2],t[3],t[4]):(t=OG.exec(e))?gh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=EG.exec(e))?fT(t[1],t[2]/100,t[3]/100,1):(t=AG.exec(e))?fT(t[1],t[2]/100,t[3]/100,t[4]):sT.hasOwnProperty(e)?uT(sT[e]):e==="transparent"?new qr(NaN,NaN,NaN,0):null}function uT(e){return new qr(e>>16&255,e>>8&255,e&255,1)}function gh(e,t,r,n){return n<=0&&(e=t=r=NaN),new qr(e,t,r,n)}function PG(e){return e instanceof Ed||(e=Zc(e)),e?(e=e.rgb(),new qr(e.r,e.g,e.b,e.opacity)):new qr}function Eb(e,t,r,n){return arguments.length===1?PG(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}cw(qr,Eb,v4(Ed,{brighter(e){return e=e==null?_m:Math.pow(_m,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),Om(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:cT,formatHex:cT,formatHex8:MG,formatRgb:dT,toString:dT}));function cT(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}`}function MG(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}${ks((isNaN(this.opacity)?1:this.opacity)*255)}`}function dT(){const e=Om(this.opacity);return`${e===1?"rgb(":"rgba("}${Js(this.r)}, ${Js(this.g)}, ${Js(this.b)}${e===1?")":`, ${e})`}`}function Om(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 fT(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 x4(e){if(e instanceof In)return new In(e.h,e.s,e.l,e.opacity);if(e instanceof Ed||(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,d=o-i,f=(o+i)/2;return d?(t===o?l=(r-n)/d+(r<n)*6:r===o?l=(n-t)/d+2:l=(t-r)/d+4,d/=f<.5?o+i:2-o-i,l*=60):d=f>0&&f<1?0:l,new In(l,d,f,e.opacity)}function RG(e,t,r,n){return arguments.length===1?x4(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}cw(In,RG,v4(Ed,{brighter(e){return e=e==null?_m:Math.pow(_m,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(Qv(e>=240?e-240:e+120,i,n),Qv(e,i,n),Qv(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new In(hT(this.h),yh(this.s),yh(this.l),Om(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=Om(this.opacity);return`${e===1?"hsl(":"hsla("}${hT(this.h)}, ${yh(this.s)*100}%, ${yh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function hT(e){return e=(e||0)%360,e<0?e+360:e}function yh(e){return Math.max(0,Math.min(1,e||0))}function Qv(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 dw=e=>()=>e;function DG(e,t){return function(r){return e+r*t}}function kG(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 $G(e){return(e=+e)==1?b4:function(t,r){return r-t?kG(t,r,e):dw(isNaN(t)?r:t)}}function b4(e,t){var r=t-e;return r?DG(e,r):dw(isNaN(e)?t:e)}const mT=(function e(t){var r=$G(t);function n(i,o){var l=r((i=Eb(i)).r,(o=Eb(o)).r),d=r(i.g,o.g),f=r(i.b,o.b),h=b4(i.opacity,o.opacity);return function(p){return i.r=l(p),i.g=d(p),i.b=f(p),i.opacity=h(p),i+""}}return n.gamma=e,n})(1);function LG(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 IG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zG(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(d){for(l=0;l<n;++l)o[l]=i[l](d);return o}}function BG(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Em(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function UG(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 Ab=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xv=new RegExp(Ab.source,"g");function qG(e){return function(){return e}}function FG(e){return function(t){return e(t)+""}}function HG(e,t){var r=Ab.lastIndex=Xv.lastIndex=0,n,i,o,l=-1,d=[],f=[];for(e=e+"",t=t+"";(n=Ab.exec(e))&&(i=Xv.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),d[l]?d[l]+=o:d[++l]=o),(n=n[0])===(i=i[0])?d[l]?d[l]+=i:d[++l]=i:(d[++l]=null,f.push({i:l,x:Em(n,i)})),r=Xv.lastIndex;return r<t.length&&(o=t.slice(r),d[l]?d[l]+=o:d[++l]=o),d.length<2?f[0]?FG(f[0].x):qG(t):(t=f.length,function(h){for(var p=0,g;p<t;++p)d[(g=f[p]).i]=g.x(h);return d.join("")})}function su(e,t){var r=typeof t,n;return t==null||r==="boolean"?dw(t):(r==="number"?Em:r==="string"?(n=Zc(t))?(t=n,mT):HG:t instanceof Zc?mT:t instanceof Date?BG:IG(t)?LG:Array.isArray(t)?zG:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?UG:Em)(e,t)}function fw(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function KG(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 d=Math.max(0,Math.min(n-1,Math.floor(l*=n)));return o[d](l-d)}}function GG(e){return function(){return e}}function Am(e){return+e}var pT=[0,1];function _r(e){return e}function Cb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:GG(isNaN(t)?NaN:.5)}function YG(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function VG(e,t,r){var n=e[0],i=e[1],o=t[0],l=t[1];return i<n?(n=Cb(i,n),o=r(l,o)):(n=Cb(n,i),o=r(o,l)),function(d){return o(n(d))}}function QG(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]=Cb(e[l],e[l+1]),o[l]=r(t[l],t[l+1]);return function(d){var f=Od(e,d,1,n)-1;return o[f](i[f](d))}}function Ad(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Lp(){var e=pT,t=pT,r=su,n,i,o,l=_r,d,f,h;function p(){var y=Math.min(e.length,t.length);return l!==_r&&(l=YG(e[0],e[y-1])),d=y>2?QG:VG,f=h=null,g}function g(y){return y==null||isNaN(y=+y)?o:(f||(f=d(e.map(n),t,r)))(n(l(y)))}return g.invert=function(y){return l(i((h||(h=d(t,e.map(n),Em)))(y)))},g.domain=function(y){return arguments.length?(e=Array.from(y,Am),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=fw,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 hw(){return Lp()(_r,_r)}function XG(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Cm(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=Cm(Math.abs(e)),e?e[1]:NaN}function WG(e,t){return function(r,n){for(var i=r.length,o=[],l=0,d=e[0],f=0;i>0&&d>0&&(f+d+1>n&&(d=Math.max(1,n-f)),o.push(r.substring(i-=d,i+d)),!((f+=d+1)>n));)d=e[l=(l+1)%e.length];return o.reverse().join(t)}}function ZG(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var JG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jc(e){if(!(t=JG.exec(e)))throw new Error("invalid format: "+e);var t;return new mw({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=mw.prototype;function mw(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+""}mw.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 eY(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 Tm;function tY(e,t){var r=Cm(e,t);if(!r)return Tm=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Tm=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")+Cm(e,Math.max(0,t+o-1))[0]}function gT(e,t){var r=Cm(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 yT={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:XG,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)=>gT(e*100,t),r:gT,s:tY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vT(e){return e}var xT=Array.prototype.map,bT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rY(e){var t=e.grouping===void 0||e.thousands===void 0?vT:WG(xT.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?vT:ZG(xT.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",d=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,y){g=Jc(g);var x=g.fill,b=g.align,w=g.sign,N=g.symbol,_=g.zero,E=g.width,C=g.comma,A=g.precision,T=g.trim,M=g.type;M==="n"?(C=!0,M="g"):yT[M]||(A===void 0&&(A=12),T=!0,M="g"),(_||x==="0"&&b==="=")&&(_=!0,x="0",b="=");var D=(y&&y.prefix!==void 0?y.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():""),R=(N==="$"?n:/[%p]/.test(M)?l:"")+(y&&y.suffix!==void 0?y.suffix:""),z=yT[M],k=/[defgprs%]/.test(M);A=A===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function H(U){var ae=D,Z=R,G,$,F;if(M==="c")Z=z(U)+Z,U="";else{U=+U;var J=U<0||1/U<0;if(U=isNaN(U)?f:z(Math.abs(U),A),T&&(U=eY(U)),J&&+U==0&&w!=="+"&&(J=!1),ae=(J?w==="("?w:d:w==="-"||w==="("?"":w)+ae,Z=(M==="s"&&!isNaN(U)&&Tm!==void 0?bT[8+Tm/3]:"")+Z+(J&&w==="("?")":""),k){for(G=-1,$=U.length;++G<$;)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}}}C&&!_&&(U=t(U,1/0));var re=ae.length+U.length+Z.length,oe=re<E?new Array(E-re+1).join(x):"";switch(C&&_&&(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=h((g=Jc(g),g.type="f",g),{suffix:bT[8+x/3]});return function(N){return w(b*N)}}return{format:h,formatPrefix:p}}var vh,pw,j4;nY({thousands:",",grouping:[3],currency:["$",""]});function nY(e){return vh=rY(e),pw=vh.format,j4=vh.formatPrefix,vh}function aY(e){return Math.max(0,-Ql(Math.abs(e)))}function iY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ql(t)/3)))*3-Ql(Math.abs(e)))}function sY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ql(t)-Ql(e))+1}function w4(e,t,r,n){var i=_b(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=iY(i,l))&&(n.precision=o),j4(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=sY(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=aY(i))&&(n.precision=o-(n.type==="%")*2);break}}return pw(n)}function ns(e){var t=e.domain;return e.ticks=function(r){var n=t();return Sb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return w4(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],d=n[o],f,h,p=10;for(d<l&&(h=l,l=d,d=h,h=i,i=o,o=h);p-- >0;){if(h=Nb(l,d,r),h===f)return n[i]=l,n[o]=d,t(n);if(h>0)l=Math.floor(l/h)*h,d=Math.ceil(d/h)*h;else if(h<0)l=Math.ceil(l*h)/h,d=Math.floor(d*h)/h;else break;f=h}return e},e}function S4(){var e=hw();return e.copy=function(){return Ad(e,S4())},Cn.apply(e,arguments),ns(e)}function N4(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,Am),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return N4(e).unknown(t)},e=arguments.length?Array.from(e,Am):[0,1],ns(r)}function _4(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 jT(e){return Math.log(e)}function wT(e){return Math.exp(e)}function oY(e){return-Math.log(-e)}function lY(e){return-Math.exp(-e)}function uY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function cY(e){return e===10?uY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function dY(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 ST(e){return(t,r)=>-e(-t,r)}function gw(e){const t=e(jT,wT),r=t.domain;let n=10,i,o;function l(){return i=dY(n),o=cY(n),r()[0]<0?(i=ST(i),o=ST(o),e(oY,lY)):e(jT,wT),t}return t.base=function(d){return arguments.length?(n=+d,l()):n},t.domain=function(d){return arguments.length?(r(d),l()):r()},t.ticks=d=>{const f=r();let h=f[0],p=f[f.length-1];const g=p<h;g&&([h,p]=[p,h]);let y=i(h),x=i(p),b,w;const N=d==null?10:+d;let _=[];if(!(n%1)&&x-y<N){if(y=Math.floor(y),x=Math.ceil(x),h>0){for(;y<=x;++y)for(b=1;b<n;++b)if(w=y<0?b/o(-y):b*o(y),!(w<h)){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<h)){if(w>p)break;_.push(w)}_.length*2<N&&(_=Sb(h,p,N))}else _=Sb(y,x,Math.min(x-y,N)).map(o);return g?_.reverse():_},t.tickFormat=(d,f)=>{if(d==null&&(d=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Jc(f)).precision==null&&(f.trim=!0),f=pw(f)),d===1/0)return f;const h=Math.max(1,n*d/t.ticks().length);return p=>{let g=p/o(Math.round(i(p)));return g*n<n-.5&&(g*=n),g<=h?f(p):""}},t.nice=()=>r(_4(r(),{floor:d=>o(Math.floor(i(d))),ceil:d=>o(Math.ceil(i(d)))})),t}function O4(){const e=gw(Lp()).domain([1,10]);return e.copy=()=>Ad(e,O4()).base(e.base()),Cn.apply(e,arguments),e}function NT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function _T(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yw(e){var t=1,r=e(NT(t),_T(t));return r.constant=function(n){return arguments.length?e(NT(t=+n),_T(t)):t},ns(r)}function E4(){var e=yw(Lp());return e.copy=function(){return Ad(e,E4()).constant(e.constant())},Cn.apply(e,arguments)}function OT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function fY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hY(e){return e<0?-e*e:e*e}function vw(e){var t=e(_r,_r),r=1;function n(){return r===1?e(_r,_r):r===.5?e(fY,hY):e(OT(r),OT(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ns(t)}function xw(){var e=vw(Lp());return e.copy=function(){return Ad(e,xw()).exponent(e.exponent())},Cn.apply(e,arguments),e}function mY(){return xw.apply(null,arguments).exponent(.5)}function ET(e){return Math.sign(e)*e*e}function pY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function A4(){var e=hw(),t=[0,1],r=!1,n;function i(o){var l=pY(e(o));return isNaN(l)?n:r?Math.round(l):l}return i.invert=function(o){return e.invert(ET(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,Am)).map(ET)),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 A4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Cn.apply(i,arguments),ns(i)}function C4(){var e=[],t=[],r=[],n;function i(){var l=0,d=Math.max(1,t.length);for(r=new Array(d-1);++l<d;)r[l-1]=xG(e,l/d);return o}function o(l){return l==null||isNaN(l=+l)?n:t[Od(r,l)]}return o.invertExtent=function(l){var d=t.indexOf(l);return d<0?[NaN,NaN]:[d>0?r[d-1]:e[0],d<r.length?r[d]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let d of l)d!=null&&!isNaN(d=+d)&&e.push(d);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 C4().domain(e).range(t).unknown(n)},Cn.apply(o,arguments)}function T4(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[Od(n,f,0,r)]:o}function d(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,d()):[e,t]},l.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,d()):i.slice()},l.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return n.slice()},l.copy=function(){return T4().domain([e,t]).range(i).unknown(o)},Cn.apply(ns(l),arguments)}function P4(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Od(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 P4().domain(e).range(t).unknown(r)},Cn.apply(i,arguments)}const Wv=new Date,Zv=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),d=i.ceil(o);return o-l<d-o?l:d},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,d)=>{const f=[];if(o=i.ceil(o),d=d==null?1:Math.floor(d),!(o<l)||!(d>0))return f;let h;do f.push(h=new Date(+o)),t(o,d),e(o);while(h<o&&o<l);return f},i.filter=o=>Bt(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,d)=>{if(l>=l)if(d<0)for(;++d<=0;)for(;t(l,-1),!o(l););else for(;--d>=0;)for(;t(l,1),!o(l););}),r&&(i.count=(o,l)=>(Wv.setTime(+o),Zv.setTime(+l),e(Wv),e(Zv),Math.floor(r(Wv,Zv))),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 Pm=Bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pm.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):Pm);Pm.range;const za=1e3,En=za*60,Ba=En*60,Ga=Ba*24,bw=Ga*7,AT=Ga*30,Jv=Ga*365,$s=Bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*za)},(e,t)=>(t-e)/za,e=>e.getUTCSeconds());$s.range;const jw=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getMinutes());jw.range;const ww=Bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCMinutes());ww.range;const Sw=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za-e.getMinutes()*En)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getHours());Sw.range;const Nw=Bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getUTCHours());Nw.range;const Cd=Bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*En)/Ga,e=>e.getDate()-1);Cd.range;const Ip=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ga,e=>e.getUTCDate()-1);Ip.range;const M4=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ga,e=>Math.floor(e/Ga));M4.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)/bw)}const zp=vo(0),Mm=vo(1),gY=vo(2),yY=vo(3),Xl=vo(4),vY=vo(5),xY=vo(6);zp.range;Mm.range;gY.range;yY.range;Xl.range;vY.range;xY.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)/bw)}const Bp=xo(0),Rm=xo(1),bY=xo(2),jY=xo(3),Wl=xo(4),wY=xo(5),SY=xo(6);Bp.range;Rm.range;bY.range;jY.range;Wl.range;wY.range;SY.range;const _w=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());_w.range;const Ow=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());Ow.range;const Ya=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());Ya.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)});Ya.range;const Va=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());Va.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)});Va.range;function R4(e,t,r,n,i,o){const l=[[$s,1,za],[$s,5,5*za],[$s,15,15*za],[$s,30,30*za],[o,1,En],[o,5,5*En],[o,15,15*En],[o,30,30*En],[i,1,Ba],[i,3,3*Ba],[i,6,6*Ba],[i,12,12*Ba],[n,1,Ga],[n,2,2*Ga],[r,1,bw],[t,1,AT],[t,3,3*AT],[e,1,Jv]];function d(h,p,g){const y=p<h;y&&([h,p]=[p,h]);const x=g&&typeof g.range=="function"?g:f(h,p,g),b=x?x.range(h,+p+1):[];return y?b.reverse():b}function f(h,p,g){const y=Math.abs(p-h)/g,x=ow(([,,N])=>N).right(l,y);if(x===l.length)return e.every(_b(h/Jv,p/Jv,g));if(x===0)return Pm.every(Math.max(_b(h,p,g),1));const[b,w]=l[y/l[x-1][2]<l[x][2]/y?x-1:x];return b.every(w)}return[d,f]}const[NY,_Y]=R4(Va,Ow,Bp,M4,Nw,ww),[OY,EY]=R4(Ya,_w,zp,Cd,Sw,jw);function ex(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 tx(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 AY(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,l=e.shortDays,d=e.months,f=e.shortMonths,h=yc(i),p=vc(i),g=yc(o),y=vc(o),x=yc(l),b=vc(l),w=yc(d),N=vc(d),_=yc(f),E=vc(f),C={a:F,A:J,b:re,B:oe,c:null,d:DT,e:DT,f:WY,g:oV,G:uV,H:VY,I:QY,j:XY,L:D4,m:ZY,M:JY,p:L,q:X,Q:LT,s:IT,S:eV,u:tV,U:rV,V:nV,w:aV,W:iV,x:null,X:null,y:sV,Y:lV,Z:cV,"%":$T},A={a:le,A:ue,b:pe,B:xe,c:null,d:kT,e:kT,f:mV,g:NV,G:OV,H:dV,I:fV,j:hV,L:$4,m:pV,M:gV,p:we,q:_e,Q:LT,s:IT,S:yV,u:vV,U:xV,V:bV,w:jV,W:wV,x:null,X:null,y:SV,Y:_V,Z:EV,"%":$T},T={a:k,A:H,b:U,B:ae,c:Z,d:MT,e:MT,f:HY,g:PT,G:TT,H:RT,I:RT,j:BY,L:FY,m:zY,M:UY,p:z,q:IY,Q:GY,s:YY,S:qY,u:RY,U:DY,V:kY,w:MY,W:$Y,x:G,X:$,y:PT,Y:TT,Z:LY,"%":KY};C.x=M(r,C),C.X=M(n,C),C.c=M(t,C),A.x=M(r,A),A.X=M(n,A),A.c=M(t,A);function M(de,te){return function(je){var ce=[],Et=-1,Re=0,At=de.length,Ct,hr,ma;for(je instanceof Date||(je=new Date(+je));++Et<At;)de.charCodeAt(Et)===37&&(ce.push(de.slice(Re,Et)),(hr=CT[Ct=de.charAt(++Et)])!=null?Ct=de.charAt(++Et):hr=Ct==="e"?" ":"0",(ma=te[Ct])&&(Ct=ma(je,hr)),ce.push(Ct),Re=Et+1);return ce.push(de.slice(Re,Et)),ce.join("")}}function D(de,te){return function(je){var ce=gc(1900,void 0,1),Et=R(ce,de,je+="",0),Re,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?(Re=tx(gc(ce.y,0,1)),At=Re.getUTCDay(),Re=At>4||At===0?Rm.ceil(Re):Rm(Re),Re=Ip.offset(Re,(ce.V-1)*7),ce.y=Re.getUTCFullYear(),ce.m=Re.getUTCMonth(),ce.d=Re.getUTCDate()+(ce.w+6)%7):(Re=ex(gc(ce.y,0,1)),At=Re.getDay(),Re=At>4||At===0?Mm.ceil(Re):Mm(Re),Re=Cd.offset(Re,(ce.V-1)*7),ce.y=Re.getFullYear(),ce.m=Re.getMonth(),ce.d=Re.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?tx(gc(ce.y,0,1)).getUTCDay():ex(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,tx(ce)):ex(ce)}}function R(de,te,je,ce){for(var Et=0,Re=te.length,At=je.length,Ct,hr;Et<Re;){if(ce>=At)return-1;if(Ct=te.charCodeAt(Et++),Ct===37){if(Ct=te.charAt(Et++),hr=T[Ct in CT?te.charAt(Et++):Ct],!hr||(ce=hr(de,je,ce))<0)return-1}else if(Ct!=je.charCodeAt(ce++))return-1}return ce}function z(de,te,je){var ce=h.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 R(de,t,te,je)}function G(de,te,je){return R(de,r,te,je)}function $(de,te,je){return R(de,n,te,je)}function F(de){return l[de.getDay()]}function J(de){return o[de.getDay()]}function re(de){return f[de.getMonth()]}function oe(de){return d[de.getMonth()]}function L(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 f[de.getUTCMonth()]}function xe(de){return d[de.getUTCMonth()]}function we(de){return i[+(de.getUTCHours()>=12)]}function _e(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var te=M(de+="",C);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=M(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 CT={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,CY=/^%/,TY=/[\\^$*+?|[\]().{}]/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 PY(e){return e.replace(TY,"\\$&")}function yc(e){return new RegExp("^(?:"+e.map(PY).join("|")+")","i")}function vc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function MY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function RY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function DY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function kY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function $Y(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function TT(e,t,r){var n=Wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function PT(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 LY(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 IY(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 zY(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 MT(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function BY(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 RT(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function UY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function FY(e,t,r){var n=Wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function HY(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 KY(e,t,r){var n=CY.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function GY(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function YY(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function DT(e,t){return Ke(e.getDate(),t,2)}function VY(e,t){return Ke(e.getHours(),t,2)}function QY(e,t){return Ke(e.getHours()%12||12,t,2)}function XY(e,t){return Ke(1+Cd.count(Ya(e),e),t,3)}function D4(e,t){return Ke(e.getMilliseconds(),t,3)}function WY(e,t){return D4(e,t)+"000"}function ZY(e,t){return Ke(e.getMonth()+1,t,2)}function JY(e,t){return Ke(e.getMinutes(),t,2)}function eV(e,t){return Ke(e.getSeconds(),t,2)}function tV(e){var t=e.getDay();return t===0?7:t}function rV(e,t){return Ke(zp.count(Ya(e)-1,e),t,2)}function k4(e){var t=e.getDay();return t>=4||t===0?Xl(e):Xl.ceil(e)}function nV(e,t){return e=k4(e),Ke(Xl.count(Ya(e),e)+(Ya(e).getDay()===4),t,2)}function aV(e){return e.getDay()}function iV(e,t){return Ke(Mm.count(Ya(e)-1,e),t,2)}function sV(e,t){return Ke(e.getFullYear()%100,t,2)}function oV(e,t){return e=k4(e),Ke(e.getFullYear()%100,t,2)}function lV(e,t){return Ke(e.getFullYear()%1e4,t,4)}function uV(e,t){var r=e.getDay();return e=r>=4||r===0?Xl(e):Xl.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function cV(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function kT(e,t){return Ke(e.getUTCDate(),t,2)}function dV(e,t){return Ke(e.getUTCHours(),t,2)}function fV(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function hV(e,t){return Ke(1+Ip.count(Va(e),e),t,3)}function $4(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function mV(e,t){return $4(e,t)+"000"}function pV(e,t){return Ke(e.getUTCMonth()+1,t,2)}function gV(e,t){return Ke(e.getUTCMinutes(),t,2)}function yV(e,t){return Ke(e.getUTCSeconds(),t,2)}function vV(e){var t=e.getUTCDay();return t===0?7:t}function xV(e,t){return Ke(Bp.count(Va(e)-1,e),t,2)}function L4(e){var t=e.getUTCDay();return t>=4||t===0?Wl(e):Wl.ceil(e)}function bV(e,t){return e=L4(e),Ke(Wl.count(Va(e),e)+(Va(e).getUTCDay()===4),t,2)}function jV(e){return e.getUTCDay()}function wV(e,t){return Ke(Rm.count(Va(e)-1,e),t,2)}function SV(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function NV(e,t){return e=L4(e),Ke(e.getUTCFullYear()%100,t,2)}function _V(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function OV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Wl(e):Wl.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function EV(){return"+0000"}function $T(){return"%"}function LT(e){return+e}function IT(e){return Math.floor(+e/1e3)}var fl,I4,z4;AV({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 AV(e){return fl=AY(e),I4=fl.format,fl.parse,z4=fl.utcFormat,fl.utcParse,fl}function CV(e){return new Date(e)}function TV(e){return e instanceof Date?+e:+new Date(+e)}function Ew(e,t,r,n,i,o,l,d,f,h){var p=hw(),g=p.invert,y=p.domain,x=h(".%L"),b=h(":%S"),w=h("%I:%M"),N=h("%I %p"),_=h("%a %d"),E=h("%b %d"),C=h("%B"),A=h("%Y");function T(M){return(f(M)<M?x:d(M)<M?b:l(M)<M?w:o(M)<M?N:n(M)<M?i(M)<M?_:E:r(M)<M?C:A)(M)}return p.invert=function(M){return new Date(g(M))},p.domain=function(M){return arguments.length?y(Array.from(M,TV)):y().map(CV)},p.ticks=function(M){var D=y();return e(D[0],D[D.length-1],M??10)},p.tickFormat=function(M,D){return D==null?T:h(D)},p.nice=function(M){var D=y();return(!M||typeof M.range!="function")&&(M=t(D[0],D[D.length-1],M??10)),M?y(_4(D,M)):p},p.copy=function(){return Ad(p,Ew(e,t,r,n,i,o,l,d,f,h))},p}function PV(){return Cn.apply(Ew(OY,EY,Ya,_w,zp,Cd,Sw,jw,$s,I4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function MV(){return Cn.apply(Ew(NY,_Y,Va,Ow,Bp,Ip,Nw,ww,$s,z4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Up(){var e=0,t=1,r,n,i,o,l=_r,d=!1,f;function h(g){return g==null||isNaN(g=+g)?f:l(i===0?.5:(g=(o(g)-r)*i,d?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t]=g,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(g){return arguments.length?(d=!!g,h):d},h.interpolator=function(g){return arguments.length?(l=g,h):l};function p(g){return function(y){var x,b;return arguments.length?([x,b]=y,l=g(x,b),h):[l(0),l(1)]}}return h.range=p(su),h.rangeRound=p(fw),h.unknown=function(g){return arguments.length?(f=g,h):f},function(g){return o=g,r=g(e),n=g(t),i=r===n?0:1/(n-r),h}}function as(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function B4(){var e=ns(Up()(_r));return e.copy=function(){return as(e,B4())},Za.apply(e,arguments)}function U4(){var e=gw(Up()).domain([1,10]);return e.copy=function(){return as(e,U4()).base(e.base())},Za.apply(e,arguments)}function q4(){var e=yw(Up());return e.copy=function(){return as(e,q4()).constant(e.constant())},Za.apply(e,arguments)}function Aw(){var e=vw(Up());return e.copy=function(){return as(e,Aw()).exponent(e.exponent())},Za.apply(e,arguments)}function RV(){return Aw.apply(null,arguments).exponent(.5)}function F4(){var e=[],t=_r;function r(n){if(n!=null&&!isNaN(n=+n))return t((Od(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)=>vG(e,o/n))},r.copy=function(){return F4(t).domain(e)},Za.apply(r,arguments)}function qp(){var e=0,t=.5,r=1,n=1,i,o,l,d,f,h=_r,p,g=!1,y;function x(w){return isNaN(w=+w)?y:(w=.5+((w=+p(w))-o)*(n*w<n*o?d:f),h(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),d=i===o?0:.5/(o-i),f=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?(h=w,x):h};function b(w){return function(N){var _,E,C;return arguments.length?([_,E,C]=N,h=KG(w,[_,E,C]),x):[h(0),h(.5),h(1)]}}return x.range=b(su),x.rangeRound=b(fw),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),d=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),n=o<i?-1:1,x}}function H4(){var e=ns(qp()(_r));return e.copy=function(){return as(e,H4())},Za.apply(e,arguments)}function K4(){var e=gw(qp()).domain([.1,1,10]);return e.copy=function(){return as(e,K4()).base(e.base())},Za.apply(e,arguments)}function G4(){var e=yw(qp());return e.copy=function(){return as(e,G4()).constant(e.constant())},Za.apply(e,arguments)}function Cw(){var e=vw(qp());return e.copy=function(){return as(e,Cw()).exponent(e.exponent())},Za.apply(e,arguments)}function DV(){return Cw.apply(null,arguments).exponent(.5)}const Y4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:uw,scaleDiverging:H4,scaleDivergingLog:K4,scaleDivergingPow:Cw,scaleDivergingSqrt:DV,scaleDivergingSymlog:G4,scaleIdentity:N4,scaleImplicit:Ob,scaleLinear:S4,scaleLog:O4,scaleOrdinal:lw,scalePoint:jG,scalePow:xw,scaleQuantile:C4,scaleQuantize:T4,scaleRadial:A4,scaleSequential:B4,scaleSequentialLog:U4,scaleSequentialPow:Aw,scaleSequentialQuantile:F4,scaleSequentialSqrt:RV,scaleSequentialSymlog:q4,scaleSqrt:mY,scaleSymlog:E4,scaleThreshold:P4,scaleTime:PV,scaleUtc:MV,tickFormat:w4},Symbol.toStringTag,{value:"Module"}));function kV(e){var t=Y4;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(vd(e));if(r in t&&typeof t[r]=="function")return t[r]()}function zT(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=kV(e);if(n!=null)return n.domain(t).range(r),n}}function Tw(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?zT(e.scale,r,n):zT(t,r,n)}function $V(e){return"scale".concat(vd(e))}function LV(e){return $V(e)in Y4}var V4=(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 LV(n)?n:"point"}};function IV(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 Q4(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,d,f=IV(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(l=n[f-1])!==null&&l!==void 0?l:0,p=(d=n[f])!==null&&d!==void 0?d:0;return Math.abs(o-h)<=Math.abs(o-p)?r[f-1]:r[f]}}}function zV(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):Q4(e,void 0)}function BT(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 Dm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BT(Object(r),!0).forEach(function(n){BV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BV(e,t,r){return(t=UV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UV(e){var t=qV(e,"string");return typeof t=="symbol"?t:t+""}function qV(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 Tb=[0,"auto"],$t={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"},X4=(e,t)=>e.cartesianAxis.xAxis[t],Ja=(e,t)=>{var r=X4(e,t);return r??$t},Lt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Tb,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:jd},W4=(e,t)=>e.cartesianAxis.yAxis[t],ei=(e,t)=>{var r=W4(e,t);return r??Lt},FV={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:""},Pw=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??FV},Cr=(e,t,r)=>{switch(t){case"xAxis":return Ja(e,r);case"yAxis":return ei(e,r);case"zAxis":return Pw(e,r);case"angleAxis":return rw(e,r);case"radiusAxis":return nw(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},HV=(e,t,r)=>{switch(t){case"xAxis":return Ja(e,r);case"yAxis":return ei(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Td=(e,t,r)=>{switch(t){case"xAxis":return Ja(e,r);case"yAxis":return ei(e,r);case"angleAxis":return rw(e,r);case"radiusAxis":return nw(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Z4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function J4(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 Fp=e=>e.graphicalItems.cartesianItems,KV=Q([Qt,Rp],J4),eD=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),ou=Q([Fp,Cr,KV],eD,{memoizeOptions:{resultEqualityCheck:$p}}),tD=Q([ou],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Dp)),rD=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),GV=Q([ou],rD),nD=e=>e.map(t=>t.data).filter(Boolean).flat(1),YV=Q([ou],e=>e.some(t=>!t.data)),aD=Q([ou],nD,{memoizeOptions:{resultEqualityCheck:$p}}),iD=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},Mw=Q([aD,_d],iD),VV=(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})),sD=(e,t,r,n,i,o)=>{var{chartData:l=[],dataStartIndex:d,dataEndIndex:f}=n,h=VV(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=l.slice(d,f+1),g=p.map(y=>({value:Ot(y,t.dataKey)})).filter(y=>y.value!=null);return[...g,...h]}return h},Pd=Q([Mw,Cr,ou,_d,YV,aD],sD);function El(e){if(ua(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function UT(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 QV(e,t){var r=El(e),n=El(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var XV=Q([Pd],e=>e==null?void 0:e.map(t=>t.value).sort(QV));function oD(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function WV(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),d,f;if(Array.isArray(l)?[d,f]=l:d=f=l,!(!Be(d)||!Be(f)))return[n-d,n+f]}))}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),ZV=Q([tD,_d,Ut],h4),lD=(e,t,r,n)=>{var i={},o=t.reduce((l,d)=>{if(d.stackId==null)return l;var f=l[d.stackId];return f==null&&(f=[]),f.push(d),l[d.stackId]=f,l},i);return Object.fromEntries(Object.entries(o).map(l=>{var[d,f]=l,h=n?[...f].reverse():f,p=h.map(iw);return[d,{stackedData:k7(e,p,r),graphicalItems:h}]}))},Pb=Q([ZV,tD,Cp,s4],lD),uD=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(n==null&&r!=="zAxis"){var l=B7(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},JV=Q([Cr],e=>e.allowDataOverflow),Rw=e=>{var t;if(e==null||!("domain"in e))return Tb;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:Tb},cD=Q([Cr],Rw),dD=Q([cD,JV],Y3),eQ=Q([Pb,Hn,Qt,dD],uD,{memoizeOptions:{resultEqualityCheck:kp}}),Dw=e=>e.errorBars,tQ=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>oD(r,n)),km=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),d=Math.max(...o);return[l,d]}},fD=function(t,r,n,i,o){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],d,f;if(n.length>0&&n.forEach(h=>{var p,g=h.data!=null?[...h.data]:l,y=(p=i[h.id])===null||p===void 0?void 0:p.filter(x=>oD(o,x));g.forEach(x=>{var b,w=Ot(x,(b=r.dataKey)!==null&&b!==void 0?b:h.dataKey),N=WV(x,w,y);if(N.length>=2){var _=Math.min(...N),E=Math.max(...N);(d==null||_<d)&&(d=_),(f==null||E>f)&&(f=E)}var C=UT(w);C!=null&&(d=d==null?C[0]:Math.min(d,C[0]),f=f==null?C[1]:Math.max(f,C[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=UT(Ot(h,r.dataKey));p!=null&&(d=d==null?p[0]:Math.min(d,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Be(d)&&Be(f))return[d,f]},rQ=Q([Mw,Cr,GV,Dw,Qt,HK],fD,{memoizeOptions:{resultEqualityCheck:kp}});function nQ(e){var{value:t}=e;if(ua(t)||t instanceof Date)return t}var aQ=(e,t,r)=>{var n=e.map(nQ).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&wR(n))?G3(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},hD=e=>e.referenceElements.dots,lu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),iQ=Q([hD,Qt,Rp],lu),mD=e=>e.referenceElements.areas,sQ=Q([mD,Qt,Rp],lu),pD=e=>e.referenceElements.lines,oQ=Q([pD,Qt,Rp],lu),gD=(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)]}},lQ=Q(iQ,Qt,gD),yD=(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)]}},uQ=Q([sQ,Qt],yD);function cQ(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 dQ(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 vD=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?cQ(n):dQ(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},fQ=Q([oQ,Qt],vD),hQ=Q(lQ,fQ,uQ,(e,t,r)=>km(e,r,t)),xD=(e,t,r,n,i,o,l,d)=>{if(r!=null)return r;var f=l==="vertical"&&d==="xAxis"||l==="horizontal"&&d==="yAxis",h=f?km(n,o,i):km(o,i);return GK(t,h,e.allowDataOverflow)},mQ=Q([Cr,cD,dD,eQ,rQ,hQ,We,Qt],xD,{memoizeOptions:{resultEqualityCheck:kp}}),pQ=[0,1],bD=(e,t,r,n,i,o,l)=>{if(!((e==null||r==null||r.length===0)&&l===void 0)){var{dataKey:d,type:f}=e,h=Qa(t,o);if(h&&d==null){var p;return G3(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?aQ(n,e,h):i==="expand"&&!h?pQ:l}},kw=Q([Cr,We,Mw,Pd,Cp,Qt,mQ],bD),uu=Q([Cr,Z4,Jj],V4),jD=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=Rw(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 WC(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return ZC(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&sa(e))return WC(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&sa(e))return ZC(e,t.tickCount,t.allowDecimals,"adaptive")}}},$w=Q([kw,Td,uu],jD),wD=(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],d=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(l,d),Math.max(f,h)]}return t},gQ=Q([Cr,kw,$w,Qt],wD),yQ=Q(Pd,Cr,(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 d=0;d<n.length-1;d++){var f=n[d],h=n[d+1];if(!(f==null||h==null)){var p=h-f;r=Math.min(r,p)}}return r/l}}),SD=Q(yQ,We,i4,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),d=e*o/2;return d-l-(d-l)/o*l}return 0}),vQ=(e,t,r)=>{var n=Ja(e,t);return n==null||typeof n.padding!="string"?0:SD(e,"xAxis",t,r,n.padding)},xQ=(e,t,r)=>{var n=ei(e,t);return n==null||typeof n.padding!="string"?0:SD(e,"yAxis",t,r,n.padding)},bQ=Q(Ja,vQ,(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}}),jQ=Q(ei,xQ,(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}}),wQ=Q([Vt,bQ,wp,jp,(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]}),SQ=Q([Vt,We,jQ,wp,jp,(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]}),Md=(e,t,r,n)=>{var i;switch(t){case"xAxis":return wQ(e,r,n);case"yAxis":return SQ(e,r,n);case"zAxis":return(i=Pw(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return c4(e);case"radiusAxis":return d4(e,r);default:return}},ND=Q([Cr,Md],Tp),NQ=Q([uu,gQ],sG),Lw=Q([Cr,uu,NQ,ND],Tw),_D=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:o}=r,l=Qa(e,n);if(l&&(i==="number"||o!=="auto"))return t.map(d=>d.value)}},Iw=Q([We,Pd,Td,Qt],_D),Hp=Q([Lw],sw);Q([Lw],zV);Q([Lw,XV],Q4);Q([ou,Dw,Qt],tQ);function OD(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Kp=(e,t)=>t,Gp=(e,t,r)=>r,_Q=Q(xp,Kp,Gp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(OD)),OQ=Q(bp,Kp,Gp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(OD)),ED=(e,t)=>({width:e.width,height:t.height}),EQ=(e,t)=>{var r=typeof t.width=="number"?t.width:jd;return{width:r,height:e.height}},AD=Q(Vt,Ja,ED),AQ=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},CQ=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},TQ=Q(Wa,Vt,_Q,Kp,Gp,(e,t,r,n,i)=>{var o={},l;return r.forEach(d=>{var f=ED(t,d);l==null&&(l=AQ(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[d.id]=l-Number(h)*f.height,l+=(h?-1:1)*f.height}),o}),PQ=Q(Xa,Vt,OQ,Kp,Gp,(e,t,r,n,i)=>{var o={},l;return r.forEach(d=>{var f=EQ(t,d);l==null&&(l=CQ(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[d.id]=l-Number(h)*f.width,l+=(h?-1:1)*f.width}),o}),MQ=(e,t)=>{var r=Ja(e,t);if(r!=null)return TQ(e,r.orientation,r.mirror)},RQ=Q([Vt,Ja,MQ,(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}}}),DQ=(e,t)=>{var r=ei(e,t);if(r!=null)return PQ(e,r.orientation,r.mirror)},kQ=Q([Vt,ei,DQ,(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}}}),CD=Q(Vt,ei,(e,t)=>{var r=typeof t.width=="number"?t.width:jd;return{width:r,height:e.height}}),qT=(e,t,r)=>{switch(t){case"xAxis":return AD(e,r).width;case"yAxis":return CD(e,r).height;default:return}},TD=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=r,d=Qa(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(l&&d&&o==="category"&&i&&wR(h))return f}},zw=Q([We,Pd,Cr,Qt],TD),FT=Q([We,HV,uu,Hp,zw,Iw,Md,$w,Qt],(e,t,r,n,i,o,l,d,f)=>{if(t!=null){var h=Qa(e,f);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:f,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:d,range:l,realScaleType:r,scale:n}}}),$Q=(e,t,r,n,i,o,l,d,f)=>{if(!(t==null||n==null)){var h=Qa(e,f),{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=f==="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,C=n.map(E);return Be(C)?{index:_,coordinate:C+b,value:N,offset:b}:null}).filter(Ur):h&&d?d.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)}},PD=Q([We,Td,uu,Hp,$w,Md,zw,Iw,Qt],$Q),LQ=(e,t,r,n,i,o,l)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var d=Qa(e,l),{tickCount:f}=t,h=0;return h=l==="angleAxis"&&(n==null?void 0:n.length)>=2?Br(n[0]-n[1])*2*h:h,d&&o?o.map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+h,value:p,index:g,offset:h}:null}).filter(Ur):r.ticks?r.ticks(f).map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+h,value:p,index:g,offset:h}:null}).filter(Ur):r.domain().map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+h,value:i?i[p]:p,index:g,offset:h}:null}).filter(Ur)}},Ji=Q([We,Td,Hp,Md,zw,Iw,Qt],LQ),es=Q(Cr,Hp,(e,t)=>{if(!(e==null||t==null))return Dm(Dm({},e),{},{scale:t})}),IQ=Q([Cr,uu,kw,ND],Tw),zQ=Q([IQ],sw);Q((e,t,r)=>Pw(e,r),zQ,(e,t)=>{if(!(e==null||t==null))return Dm(Dm({},e),{},{scale:t})});var BQ=Q([We,xp,bp],(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}}),UQ=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};Q([UQ],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 MD=e=>e.options.defaultTooltipEventType,RD=e=>e.options.validateTooltipEventTypes;function DD(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=MD(e),n=RD(e);return DD(t,r,n)}function qQ(e){return ve(t=>Rd(t,e))}var kD=(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},FQ=e=>e.tooltip.settings,Di={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},HQ={itemInteraction:{click:Di,hover:Di},axisInteraction:{click:Di,hover:Di},keyboardInteraction:Di,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}},$D=br({name:"tooltip",initialState:HQ,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:KQ,replaceTooltipEntrySettings:GQ,removeTooltipEntrySettings:YQ,setTooltipSettingsState:VQ,setActiveMouseOverItemIndex:LD,mouseLeaveItem:QQ,mouseLeaveChart:ID,setActiveClickItemIndex:XQ,setMouseOverAxisIndex:zD,setMouseClickAxisIndex:WQ,setSyncInteraction:_c,setKeyboardInteraction:$m}=$D.actions,ZQ=$D.reducer;function HT(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?HT(Object(r),!0).forEach(function(n){JQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JQ(e,t,r){return(t=eX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eX(e){var t=tX(e,"string");return typeof t=="symbol"?t:t+""}function tX(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 rX(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function nX(e){return e.index!=null}var BD=(e,t,r,n)=>{if(t==null)return Di;var i=rX(e,t,r);if(i==null)return Di;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(nX(i)){if(o)return xh(xh({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return xh(xh({},Di),{},{coordinate:i.coordinate})};function aX(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 iX(e,t){var r=aX(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 sX(e,t,r){if(r==null||t==null)return!0;var n=Ot(e,t);return n==null||!sa(r)?!0:iX(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,d=1/0;t.length>0&&(d=t.length-1);var f=Math.max(l,Math.min(o,d)),h=t[f];return h==null||sX(h,r,n)?String(f):null},UD=(e,t,r,n,i,o,l)=>{if(o!=null){var d=l[0],f=d==null?void 0:d.getPosition(o);if(f!=null)return f;var h=i==null?void 0:i[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},qD=(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 d;return((d=l.settings)===null||d===void 0?void 0:d.graphicalItemId)===i})},FD=e=>e.options.tooltipPayloadSearcher,cu=e=>e.tooltip;function KT(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 GT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KT(Object(r),!0).forEach(function(n){oX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oX(e,t,r){return(t=lX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lX(e){var t=uX(e,"string");return typeof t=="symbol"?t:t+""}function uX(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 cX(e){if(typeof e=="string"||typeof e=="number")return e}function dX(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function fX(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function YT(e){if(typeof e=="string")return e}function hX(e){if(!(e==null||typeof e!="object")){var t="name"in e?cX(e.name):void 0,r="unit"in e?dX(e.unit):void 0,n="dataKey"in e?fX(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?YT(e.color):void 0,l="fill"in e?YT(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:l}}}function mX(e,t){return e??t}var HD=(e,t,r,n,i,o,l)=>{if(!(t==null||o==null)){var{chartData:d,computedData:f,dataStartIndex:h,dataEndIndex:p}=r,g=[];return e.reduce((y,x)=>{var b,{dataDefinedOnItem:w,settings:N}=x,_=mX(w,d),E=Array.isArray(_)?y3(_,h,p):_,C=(b=N==null?void 0:N.dataKey)!==null&&b!==void 0?b:n,A=N==null?void 0:N.nameKey,T;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&l==="axis"?T=SR(E,n,i):T=o(E,t,f,A),Array.isArray(T))T.forEach(D=>{var R,z,k=hX(D),H=k==null?void 0:k.name,U=k==null?void 0:k.dataKey,ae=k==null?void 0:k.payload,Z=GT(GT({},N),{},{name:H,unit:k==null?void 0:k.unit,color:(R=k==null?void 0:k.color)!==null&&R!==void 0?R: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(zA({tooltipEntrySettings:Z,dataKey:U,payload:ae,value:Ot(ae,U),name:H==null?void 0:String(H)}))});else{var M;y.push(zA({tooltipEntrySettings:N,dataKey:C,payload:T,value:Ot(T,C),name:(M=Ot(T,A))!==null&&M!==void 0?M:N==null?void 0:N.name}))}return y},g)}},Bw=Q([Ut,Z4,Jj],V4),pX=Q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),gX=Q([Xt,iu],J4),bo=Q([pX,Ut,gX],eD,{memoizeOptions:{resultEqualityCheck:$p}}),yX=Q([bo],e=>e.filter(Dp)),KD=Q([bo],nD,{memoizeOptions:{resultEqualityCheck:$p}}),vX=Q([bo],e=>e.some(t=>!t.data)),lo=Q([KD,Hn],iD),xX=Q([yX,Hn,Ut],h4),Uw=Q([lo,Ut,bo,Hn,vX,KD],sD),GD=Q([Ut],Rw),bX=Q([Ut],e=>e.allowDataOverflow),YD=Q([GD,bX],Y3),jX=Q([bo],e=>e.filter(Dp)),wX=Q([xX,jX,Cp,s4],lD),SX=Q([wX,Hn,Xt,YD],uD),NX=Q([bo],rD),_X=Q([lo,Ut,NX,Dw,Xt,KK],fD,{memoizeOptions:{resultEqualityCheck:kp}}),OX=Q([hD,Xt,iu],lu),EX=Q([OX,Xt],gD),AX=Q([mD,Xt,iu],lu),CX=Q([AX,Xt],yD),TX=Q([pD,Xt,iu],lu),PX=Q([TX,Xt],vD),MX=Q([EX,PX,CX],km),RX=Q([Ut,GD,YD,SX,_X,MX,We,Xt],xD),Jl=Q([Ut,We,lo,Uw,Cp,Xt,RX],bD),DX=Q([Jl,Ut,Bw],jD),kX=Q([Ut,Jl,DX,Xt],wD),VD=e=>{var t=Xt(e),r=iu(e),n=!1;return Md(e,t,r,n)},QD=Q([Ut,VD],Tp),$X=Q([Ut,Bw,kX,QD],Tw),XD=Q([$X],sw),LX=Q([We,Uw,Ut,Xt],TD),IX=Q([We,Uw,Ut,Xt],_D),zX=(e,t,r,n,i,o,l,d)=>{if(t){var{type:f}=t,h=Qa(e,d);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return g=d==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Br(i[0]-i[1])*2*g:g,h&&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)}}},ti=Q([We,Ut,Bw,XD,VD,LX,IX,Xt],zX),qw=Q([MD,RD,FQ],(e,t,r)=>DD(r.shared,e,t)),WD=e=>e.tooltip.settings.trigger,Fw=e=>e.tooltip.settings.defaultIndex,Dd=Q([cu,qw,WD,Fw],BD),uo=Q([Dd,lo,Zl,Jl],Ec),ZD=Q([ti,uo],kD),JD=Q([Dd],e=>{if(e)return e.dataKey}),BX=Q([Dd],e=>{if(e)return e.graphicalItemId}),ek=Q([cu,qw,WD,Fw],qD),UX=Q([Xa,Wa,We,Vt,ti,Fw,ek],UD),qX=Q([Dd,UX],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),FX=Q([Dd],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),HX=Q([ek,uo,Hn,Zl,ZD,FD,qw],HD),KX=Q([HX],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function VT(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 QT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VT(Object(r),!0).forEach(function(n){GX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VT(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=()=>ve(Ut),XX=()=>{var e=QX(),t=ve(ti),r=ve(XD);return Gl(!e||!r?void 0:QT(QT({},e),{},{scale:r}),t)};function XT(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?XT(Object(r),!0).forEach(function(n){WX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WX(e,t,r){return(t=ZX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZX(e){var t=JX(e,"string");return typeof t=="symbol"?t:t+""}function JX(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 eW=(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}},tW=(e,t,r,n)=>{var i=t.find(h=>h&&h.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 d=i.coordinate,{angle:f}=n;return hl(hl(hl({},n),lr(n.cx,n.cy,d,f)),{},{angle:f,radius:d})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function rW(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 tk=(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 d=0;d<l;d++){var f,h,p,g,y,x=d>0?(f=r[d-1])===null||f===void 0?void 0:f.coordinate:(h=r[l-1])===null||h===void 0?void 0:h.coordinate,b=(p=r[d])===null||p===void 0?void 0:p.coordinate,w=d>=l-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(y=r[d+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 C=w+i[1]-i[0];_[0]=Math.min(b,(C+b)/2),_[1]=Math.max(b,(C+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 T;return(T=r[d])===null||T===void 0?void 0:T.index}}else{var M=Math.min(x,w),D=Math.max(x,w);if(e>(M+b)/2&&e<=(D+b)/2){var R;return(R=r[d])===null||R===void 0?void 0:R.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},nW=()=>ve(Jj),Hw=(e,t)=>t,rk=(e,t,r)=>r,Kw=(e,t,r,n)=>n,aW=Q(ti,e=>lp(e,t=>t.coordinate)),Gw=Q([cu,Hw,rk,Kw],BD),Yw=Q([Gw,lo,Zl,Jl],Ec),iW=(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}},nk=Q([cu,Hw,rk,Kw],qD),Lm=Q([Xa,Wa,We,Vt,ti,Kw,nk],UD),sW=Q([Gw,Lm],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),ak=Q([ti,Yw],kD),oW=Q([nk,Yw,Hn,Zl,ak,FD,Hw],HD),lW=Q([Gw,Yw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),uW=(e,t,r,n,i,o,l)=>{if(!(!e||!r||!n||!i)&&rW(e,l)){var d=U7(e,t),f=tk(d,o,i,r,n),h=eW(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},cW=(e,t,r,n,i,o,l)=>{if(!(!e||!n||!i||!o||!r)){var d=RK(e,r);if(d){var f=q7(d,t),h=tk(f,l,o,n,i),p=tW(t,o,h,d);return{activeIndex:String(h),activeCoordinate:p}}}},dW=(e,t,r,n,i,o,l,d)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?uW(e,t,n,i,o,l,d):cW(e,t,r,n,i,o,l)},fW=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}}),hW=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:iG}});function WT(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 ZT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(r),!0).forEach(function(n){mW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mW(e,t,r){return(t=pW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pW(e){var t=gW(e,"string");return typeof t=="symbol"?t:t+""}function gW(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 yW={},vW={zIndexMap:Object.values(Gt).reduce((e,t)=>ZT(ZT({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),yW)},xW=new Set(Object.values(Gt));function bW(e){return xW.has(e)}var ik=br({name:"zIndex",initialState:vW,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&&!bW(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:jW,unregisterZIndexPortal:rx,registerZIndexPortalElement:wW,unregisterZIndexPortalElement:SW}=ik.actions,NW=ik.reducer;function Tn(e){var{zIndex:t,children:r}=e,n=jF(),i=n&&t!==void 0&&t!==0,o=jr(),l=S.useRef(void 0),d=S.useRef(new Set),f=ct(),h=ve(g=>fW(g,t,o));if(S.useLayoutEffect(()=>{if(!i){var g=d.current;g.forEach(x=>{f(rx({zIndex:x}))}),g.clear(),l.current=void 0;return}if(d.current.has(t)||(f(jW({zIndex:t})),d.current.add(t)),h){l.current=h;var y=d.current;y.forEach(x=>{x!==t&&(f(rx({zIndex:x})),y.delete(x))})}},[f,t,i,h]),S.useLayoutEffect(()=>{var g=d.current;return()=>{g.forEach(y=>{f(rx({zIndex:y}))}),g.clear()}},[f]),!i)return r;var p=h??l.current;return p?Zm.createPortal(r,p):null}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 JT(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 bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JT(Object(r),!0).forEach(function(n){_W(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _W(e,t,r){return(t=OW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OW(e){var t=EW(e,"string");return typeof t=="symbol"?t:t+""}function EW(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 AW(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function CW(e){var t,{coordinate:r,payload:n,index:i,offset:o,tooltipAxisBandSize:l,layout:d,cursor:f,tooltipEventType:h,chartName:p}=e,g=r,y=n,x=i;if(!f||!g||p!=="ScatterChart"&&h!=="axis")return null;var b,w,N;if(p==="ScatterChart")b=g,w=YH,N=Gt.cursorLine;else if(p==="BarChart")b=VH(d,g,o,l),w=q3,N=Gt.cursorRectangle;else if(d==="radial"&&_R(g)){var{cx:_,cy:E,radius:C,startAngle:A,endAngle:T}=F3(g);b={cx:_,cy:E,startAngle:A,endAngle:T,innerRadius:C,outerRadius:C},w=K3,N=Gt.cursorLine}else b={points:LK(d,g,o)},w=L3,N=Gt.cursorLine;var M=typeof f=="object"&&"className"in f?f.className:void 0,D=bh(bh(bh(bh({stroke:"#ccc",pointerEvents:"none"},o),b),yd(f)),{},{payload:y,payloadIndex:x,className:Xe("recharts-tooltip-cursor",M)});return S.createElement(Tn,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},S.createElement(AW,{cursor:f,cursorComp:w,cursorProps:D}))}function TW(e){var t=XX(),r=N3(),n=yo(),i=nW();return t==null||r==null||n==null||i==null?null:S.createElement(CW,Mb({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var sk=S.createContext(null),PW=()=>S.useContext(sk),nx={exports:{}},eP;function MW(){return eP||(eP=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(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,g,y){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,g||f,y),b=r?r+h:h;return f._events[b]?f._events[b].fn?f._events[b]=[f._events[b],x]:f._events[b].push(x):(f._events[b]=x,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function d(){this._events=new n,this._eventsCount=0}d.prototype.eventNames=function(){var h=[],p,g;if(this._eventsCount===0)return h;for(g in p=this._events)t.call(p,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},d.prototype.listeners=function(h){var p=r?r+h:h,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},d.prototype.listenerCount=function(h){var p=r?r+h:h,g=this._events[p];return g?g.fn?1:g.length:0},d.prototype.emit=function(h,p,g,y,x,b){var w=r?r+h:h;if(!this._events[w])return!1;var N=this._events[w],_=arguments.length,E,C;if(N.fn){switch(N.once&&this.removeListener(h,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(C=1,E=new Array(_-1);C<_;C++)E[C-1]=arguments[C];N.fn.apply(N.context,E)}else{var A=N.length,T;for(C=0;C<A;C++)switch(N[C].once&&this.removeListener(h,N[C].fn,void 0,!0),_){case 1:N[C].fn.call(N[C].context);break;case 2:N[C].fn.call(N[C].context,p);break;case 3:N[C].fn.call(N[C].context,p,g);break;case 4:N[C].fn.call(N[C].context,p,g,y);break;default:if(!E)for(T=1,E=new Array(_-1);T<_;T++)E[T-1]=arguments[T];N[C].fn.apply(N[C].context,E)}}return!0},d.prototype.on=function(h,p,g){return o(this,h,p,g,!1)},d.prototype.once=function(h,p,g){return o(this,h,p,g,!0)},d.prototype.removeListener=function(h,p,g,y){var x=r?r+h:h;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},d.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&l(this,p)):(this._events=new n,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=r,d.EventEmitter=d,e.exports=d})(nx)),nx.exports}var RW=MW();const DW=rs(RW);var ed=new DW,Rb="recharts.syncEvent.tooltip",tP="recharts.syncEvent.brush",ok=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!la(r))return e[r]}},kW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},lk=br({name:"options",initialState:kW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),$W=lk.reducer,{createEventEmitter:LW}=lk.actions;function IW(e){return e.tooltip.syncInteraction}var zW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},uk=br({name:"chartData",initialState:zW,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:rP,setDataStartEndIndexes:BW,setComputedData:Lle}=uk.actions,UW=uk.reducer,qW=["x","y"];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 ml(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){FW(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 FW(e,t,r){return(t=HW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HW(e){var t=KW(e,"string");return typeof t=="symbol"?t:t+""}function KW(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 GW(e,t){if(e==null)return{};var r,n,i=YW(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 YW(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 VW(){var e=ve(ew),t=ve(tw),r=ct(),n=ve(o4),i=ve(ti),o=yo(),l=Sp(),d=ve(f=>f.rootProps.className);S.useEffect(()=>{if(e==null)return go;var f=(h,p,g)=>{if(t!==g&&e===h){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=GW(x,qW),{x:_,y:E,width:C,height:A}=p.payload.sourceViewBox,T=ml(ml({},N),{},{x:l.x+(C?(b-_)/C:0)*l.width,y:l.y+(A?(w-E)/A:0)*l.height});r(ml(ml({},p),{},{payload:ml(ml({},p.payload),{},{coordinate:T})}))}else r(p);return}if(i!=null){var M;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},R=n(i,D);M=i[R]}else n==="value"&&(M=i.find($=>String($.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(M==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"?M.coordinate:U,y:o==="horizontal"?ae:M.coordinate},G=_c({active:p.payload.active,coordinate:Z,dataKey:p.payload.dataKey,index:String(M.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(G)}}};return ed.on(Rb,f),()=>{ed.off(Rb,f)}},[d,r,t,e,n,i,o,l])}function QW(){var e=ve(ew),t=ve(tw),r=ct();S.useEffect(()=>{if(e==null)return go;var n=(i,o,l)=>{t!==l&&e===i&&r(BW(o))};return ed.on(tP,n),()=>{ed.off(tP,n)}},[r,t,e])}function XW(){var e=ct();S.useEffect(()=>{e(LW())},[e]),VW(),QW()}function WW(e,t,r,n,i,o){var l=ve(b=>iW(b,e,t)),d=ve(BX),f=ve(tw),h=ve(ew),p=ve(o4),g=ve(IW),y=(g==null?void 0:g.sourceViewBox)!=null,x=Sp();S.useEffect(()=>{if(!y&&h!=null&&f!=null){var b=_c({active:o,coordinate:r,dataKey:l,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:d});ed.emit(Rb,h,b,f)}},[y,r,l,d,i,n,f,h,p,o,x])}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 iP(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){ZW(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 ZW(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=eZ(e,"string");return typeof t=="symbol"?t:t+""}function eZ(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 tZ(e){return e.dataKey}function rZ(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(wH,t)}var sP=[],nZ={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 Vw(e){var t,r,n=fr(e,nZ),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:d,content:f,filterNull:h,isAnimationActive:p,offset:g,payloadUniqBy:y,position:x,reverseDirection:b,useTranslate3d:w,wrapperStyle:N,cursor:_,shared:E,trigger:C,defaultIndex:A,portal:T,axisId:M}=n,D=ct(),R=typeof A=="number"?String(A):A;S.useEffect(()=>{D(VQ({shared:E,trigger:C,axisId:M,active:i,defaultIndex:R}))},[D,E,C,M,i,R]);var z=Sp(),k=$3(),H=qQ(E),{activeIndex:U,isActive:ae}=(t=ve(_e=>lW(_e,H,C,R)))!==null&&t!==void 0?t:{},Z=ve(_e=>oW(_e,H,C,R)),G=ve(_e=>ak(_e,H,C,R)),$=ve(_e=>sW(_e,H,C,R)),F=Z,J=PW(),re=(r=i??ae)!==null&&r!==void 0?r:!1,[oe,L]=UR([F,re]),X=H==="axis"?G:void 0;WW(H,C,$,X,U,re);var le=T??J;if(le==null||z==null||H==null)return null;var ue=F??sP;re||(ue=sP),h&&ue.length&&(ue=$R(ue.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),y,tZ));var pe=ue.length>0,xe=iP(iP({},n),{},{payload:ue,label:X,active:re,activeIndex:U,coordinate:$,accessibilityLayer:k}),we=S.createElement(RH,{allowEscapeViewBox:o,animationDuration:l,animationEasing:d,isAnimationActive:p,active:re,coordinate:$,hasPayload:pe,offset:g,position:x,reverseDirection:b,useTranslate3d:w,viewBox:z,wrapperStyle:N,lastBoundingBox:oe,innerRef:L,hasPortalFromProps:!!T},rZ(f,xe));return S.createElement(S.Fragment,null,Zm.createPortal(we,le),re&&S.createElement(TW,{cursor:_,tooltipEventType:H,coordinate:$,payload:ue,index:U}))}var Qw=e=>null;Qw.displayName="Cell";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)}class oZ{constructor(t){aZ(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 oP(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 lZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oP(Object(r),!0).forEach(function(n){uZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uZ(e,t,r){return(t=cZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cZ(e){var t=dZ(e,"string");return typeof t=="symbol"?t:t+""}function dZ(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 fZ={cacheSize:2e3,enableCache:!0},ck=lZ({},fZ),lP=new oZ(ck.cacheSize),hZ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},uP="recharts_measurement_span";function mZ(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",l=t.letterSpacing||"",d=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(d)}var cP=(e,t)=>{try{var r=document.getElementById(uP);r||(r=document.createElement("span"),r.setAttribute("id",uP),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,hZ,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||Nd.isSsr)return{width:0,height:0};if(!ck.enableCache)return cP(t,r);var n=mZ(t,r),i=lP.get(n);if(i)return i;var o=cP(t,r);return lP.set(n,o),o},dk;function pZ(e,t,r){return(t=gZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gZ(e){var t=yZ(e,"string");return typeof t=="symbol"?t:t+""}function yZ(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 dP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,fP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,vZ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,xZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},jZ=["cm","mm","pt","pc","in","Q","px"];function wZ(e){return jZ.includes(e)}var Sl="NaN";function SZ(e,t){return e*bZ[t]}class sr{static parse(t){var r,[,n,i]=(r=xZ.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!==""&&!vZ.test(r)&&(this.num=NaN,this.unit=""),wZ(r)&&(this.num=SZ(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)}}dk=sr;pZ(sr,"NaN",new dk(NaN,""));function fk(e){if(e==null||e.includes(Sl))return Sl;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,o]=(r=dP.exec(t))!==null&&r!==void 0?r:[],l=sr.parse(n??""),d=sr.parse(o??""),f=i==="*"?l.multiply(d):l.divide(d);if(f.isNaN())return Sl;t=t.replace(dP,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,p,g,y]=(h=fP.exec(t))!==null&&h!==void 0?h:[],x=sr.parse(p??""),b=sr.parse(y??""),w=g==="+"?x.add(b):x.subtract(b);if(w.isNaN())return Sl;t=t.replace(fP,w.toString())}return t}var hP=/\(([^()]*)\)/;function NZ(e){for(var t=e,r;(r=hP.exec(t))!=null;){var[,n]=r;t=t.replace(hP,fk(n))}return t}function _Z(e){var t=e.replace(/\s+/g,"");return t=NZ(t),t=fk(t),t}function OZ(e){try{return _Z(e)}catch{return Sl}}function ax(e){var t=OZ(e.slice(5,-1));return t===Sl?"":t}var EZ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],AZ=["dx","dy","angle","className","breakAll"];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 mP(e,t){if(e==null)return{};var r,n,i=CZ(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 CZ(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 hk=/[ \f\n\r\t\v\u2028\u2029]+/,mk=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];mt(t)||(r?i=t.toString().split(""):i=t.toString().split(hk));var o=i.map(d=>({word:d,width:Ac(d,n).width})),l=r?0:Ac(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function pk(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function TZ(e){return mt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var gk=(e,t,r,n)=>e.reduce((i,o)=>{var{word:l,width:d}=o,f=i[i.length-1];if(f&&d!=null&&(t==null||n||f.width+d+r<Number(t)))f.words.push(l),f.width+=d+r;else{var h={words:[l],width:d};i.push(h)}return i},[]),yk=e=>e.reduce((t,r)=>t.width>r.width?t:r),PZ="…",pP=(e,t,r,n,i,o,l,d)=>{var f=e.slice(0,t),h=mk({breakAll:r,style:n,children:f+PZ});if(!h)return[!1,[]];var p=gk(h.wordsWithComputedWidth,o,l,d),g=p.length>i||yk(p).width>Number(o);return[g,p]},MZ=(e,t,r,n,i)=>{var{maxLines:o,children:l,style:d,breakAll:f}=e,h=ge(o),p=String(l),g=gk(t,n,r,i);if(!h||i)return g;var y=g.length>o||yk(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,[C,A]=pP(p,E,f,d,o,n,r,i),[T]=pP(p,_,f,d,o,n,r,i);if(!C&&!T&&(x=_+1),C&&T&&(b=_-1),!C&&T){N=A;break}w++}return N||g},gP=e=>{var t=mt(e)?[]:e.toString().split(hk);return[{words:t,width:void 0}]},RZ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:l}=e;if((t||r)&&!Nd.isSsr){var d,f,h=mk({breakAll:o,children:n,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:g}=h;d=p,f=g}else return gP(n);return MZ({breakAll:o,children:n,maxLines:l,style:i},d,f,t,!!r)}return gP(n)},vk="#808080",DZ={angle:0,breakAll:!1,capHeight:"0.71em",fill:vk,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Xw=S.forwardRef((e,t)=>{var r=fr(e,DZ),{x:n,y:i,lineHeight:o,capHeight:l,fill:d,scaleToFit:f,textAnchor:h,verticalAnchor:p}=r,g=mP(r,EZ),y=S.useMemo(()=>RZ({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),{dx:x,dy:b,angle:w,className:N,breakAll:_}=g,E=mP(g,AZ);if(!ua(n)||!ua(i)||y.length===0)return null;var C=Number(n)+(ge(x)?x:0),A=Number(i)+(ge(b)?b:0);if(!Be(C)||!Be(A))return null;var T;switch(p){case"start":T=ax("calc(".concat(l,")"));break;case"middle":T=ax("calc(".concat((y.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:T=ax("calc(".concat(y.length-1," * -").concat(o,")"));break}var M=[],D=y[0];if(f&&D!=null){var R=D.width,{width:z}=g;M.push("scale(".concat(ge(z)&&ge(R)?z/R:1,")"))}return w&&M.push("rotate(".concat(w,", ").concat(C,", ").concat(A,")")),M.length&&(E.transform=M.join(" ")),S.createElement("text",Db({},Er(E),{ref:t,x:C,y:A,className:Xe("recharts-text",N),textAnchor:h,fill:d.includes("url")?vk:d}),y.map((k,H)=>{var U=k.words.join(_?"":" ");return S.createElement("tspan",{x:C,dy:H===0?T:o,key:"".concat(U,"-").concat(H)},U)}))});Xw.displayName="Text";function yP(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?yP(Object(r),!0).forEach(function(n){kZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kZ(e,t,r){return(t=$Z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $Z(e){var t=LZ(e,"string");return typeof t=="symbol"?t:t+""}function LZ(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 IZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:o,y:l,height:d,upperWidth:f,lowerWidth:h}=Hj(t),p=o,g=o+(f-h)/2,y=(p+g)/2,x=(f+h)/2,b=p+f/2,w=d>=0?1:-1,N=w*n,_=w>0?"end":"start",E=w>0?"start":"end",C=f>=0?1:-1,A=C*n,T=C>0?"end":"start",M=C>0?"start":"end",D=i;if(r==="top"){var R={x:p+f/2,y:l-N,horizontalAnchor:"middle",verticalAnchor:_};return D&&(R.height=Math.max(l-D.y,0),R.width=f),R}if(r==="bottom"){var z={x:g+h/2,y:l+d+N,horizontalAnchor:"middle",verticalAnchor:E};return D&&(z.height=Math.max(D.y+D.height-(l+d),0),z.width=h),z}if(r==="left"){var k={x:y-A,y:l+d/2,horizontalAnchor:T,verticalAnchor:"middle"};return D&&(k.width=Math.max(k.x-D.x,0),k.height=d),k}if(r==="right"){var H={x:y+x+A,y:l+d/2,horizontalAnchor:M,verticalAnchor:"middle"};return D&&(H.width=Math.max(D.x+D.width-H.x,0),H.height=d),H}var U=D?{width:x,height:d}:{};return r==="insideLeft"?Zn({x:y+A,y:l+d/2,horizontalAnchor:M,verticalAnchor:"middle"},U):r==="insideRight"?Zn({x:y+x-A,y:l+d/2,horizontalAnchor:T,verticalAnchor:"middle"},U):r==="insideTop"?Zn({x:p+f/2,y:l+N,horizontalAnchor:"middle",verticalAnchor:E},U):r==="insideBottom"?Zn({x:g+h/2,y:l+d-N,horizontalAnchor:"middle",verticalAnchor:_},U):r==="insideTopLeft"?Zn({x:p+A,y:l+N,horizontalAnchor:M,verticalAnchor:E},U):r==="insideTopRight"?Zn({x:p+f-A,y:l+N,horizontalAnchor:T,verticalAnchor:E},U):r==="insideBottomLeft"?Zn({x:g+A,y:l+d-N,horizontalAnchor:M,verticalAnchor:_},U):r==="insideBottomRight"?Zn({x:g+h-A,y:l+d-N,horizontalAnchor:T,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,d),horizontalAnchor:"end",verticalAnchor:"end"},U):Zn({x:b,y:l+d/2,horizontalAnchor:"middle",verticalAnchor:"middle"},U)},zZ=["labelRef"],BZ=["content"];function vP(e,t){if(e==null)return{};var r,n,i=UZ(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 UZ(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 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 Oc(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){qZ(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 qZ(e,t,r){return(t=FZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FZ(e){var t=HZ(e,"string");return typeof t=="symbol"?t:t+""}function HZ(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 La(){return La=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},La.apply(null,arguments)}var xk=S.createContext(null),KZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l,children:d}=e,f=S.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l}),[t,r,n,i,o,l]);return S.createElement(xk.Provider,{value:f},d)},bk=()=>{var e=S.useContext(xk),t=Sp();return e||(t?Hj(t):void 0)},GZ=S.createContext(null),YZ=()=>{var e=S.useContext(GZ),t=ve(f4);return e||t},VZ=e=>{var{value:t,formatter:r}=e,n=mt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Ww=e=>e!=null&&typeof e=="function",QZ=(e,t)=>{var r=Br(t-e),n=Math.min(Math.abs(t-e),360);return r*n},XZ=(e,t,r,n,i)=>{var{offset:o,className:l}=e,{cx:d,cy:f,innerRadius:h,outerRadius:p,startAngle:g,endAngle:y,clockWise:x}=i,b=(h+p)/2,w=QZ(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 C=lr(d,f,b,_),A=lr(d,f,b,_+(E?1:-1)*359),T="M".concat(C.x,",").concat(C.y,`
109
+ A`).concat(b,",").concat(b,",0,1,").concat(E?0:1,`,
110
+ `).concat(A.x,",").concat(A.y),M=mt(e.id)?Uc("recharts-radial-line-"):e.id;return S.createElement("text",La({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",l)}),S.createElement("defs",null,S.createElement("path",{id:M,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(M)},r))},WZ=(e,t,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:l,startAngle:d,endAngle:f}=e,h=(d+f)/2;if(r==="outside"){var{x:p,y:g}=lr(n,i,l+t,h);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,h);return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},$h=e=>e!=null&&"cx"in e&&ge(e.cx),ZZ={angle:0,offset:5,zIndex:Gt.label,position:"middle",textBreakAll:!1};function JZ(e){if(!$h(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,ZZ),{viewBox:r,parentViewBox:n,position:i,value:o,children:l,content:d,className:f="",textBreakAll:h,labelRef:p}=t,g=YZ(),y=bk(),x=i==="center"?y:g??y,b,w,N;r==null?b=x:$h(r)?b=r:b=Hj(r);var _=JZ(b);if(!b||mt(o)&&mt(l)&&!S.isValidElement(d)&&typeof d!="function")return null;var E=Oc(Oc({},t),{},{viewBox:b});if(S.isValidElement(d)){var{labelRef:C}=E,A=vP(E,zZ);return S.cloneElement(d,A)}if(typeof d=="function"){var{content:T}=E,M=vP(E,BZ);if(w=S.createElement(d,M),S.isValidElement(w))return w}else w=VZ(t);var D=Er(t);if($h(b)){if(i==="insideStart"||i==="insideEnd"||i==="end")return XZ(t,i,w,D,b);N=WZ(b,t.offset,t.position)}else{if(!_)return null;var R=IZ({viewBox:_,position:i,offset:t.offset,parentViewBox:$h(n)?void 0:n});N=Oc(Oc({x:R.x,y:R.y,textAnchor:R.horizontalAnchor,verticalAnchor:R.verticalAnchor},R.width!==void 0?{width:R.width}:{}),R.height!==void 0?{height:R.height}:{})}return S.createElement(Tn,{zIndex:t.zIndex},S.createElement(Xw,La({ref:p,className:Xe("recharts-label",f)},D,N,{textAnchor:pk(D.textAnchor)?D.textAnchor:N.textAnchor,breakAll:h}),w))}Mi.displayName="Label";var eJ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?S.createElement(Mi,La({key:"label-implicit"},n)):ua(e)?S.createElement(Mi,La({key:"label-implicit",value:e},n)):S.isValidElement(e)?e.type===Mi?S.cloneElement(e,Oc({key:"label-implicit"},n)):S.createElement(Mi,La({key:"label-implicit",content:e},n)):Ww(e)?S.createElement(Mi,La({key:"label-implicit",content:e},n)):e&&typeof e=="object"?S.createElement(Mi,La({},e,{key:"label-implicit"},n)):null};function tJ(e){var{label:t,labelRef:r}=e,n=bk();return eJ(t,n,r)||null}var rJ=["valueAccessor"],nJ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Im(){return Im=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},Im.apply(null,arguments)}function bP(e,t){if(e==null)return{};var r,n,i=aJ(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 aJ(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 iJ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(TZ(t))return t},jk=S.createContext(void 0),wk=jk.Provider,Sk=S.createContext(void 0);Sk.Provider;function sJ(){return S.useContext(jk)}function oJ(){return S.useContext(Sk)}function Lh(e){var{valueAccessor:t=iJ}=e,r=bP(e,rJ),{dataKey:n,clockWise:i,id:o,textBreakAll:l,zIndex:d}=r,f=bP(r,nJ),h=sJ(),p=oJ(),g=h||p;return!g||!g.length?null:S.createElement(Tn,{zIndex:d??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,Im({key:"label-".concat(x)},Er(y),f,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}))})))}Lh.displayName="LabelList";function Nk(e){var{label:t}=e;return t?t===!0?S.createElement(Lh,{key:"labelList-implicit"}):S.isValidElement(t)||Ww(t)?S.createElement(Lh,{key:"labelList-implicit",content:t}):typeof t=="object"?S.createElement(Lh,Im({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function kb(){return kb=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},kb.apply(null,arguments)}var _k=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",kb({},zn(e),Mj(e),{className:o,cx:t,cy:r,r:n})):null},lJ={radiusAxis:{},angleAxis:{}},Ok=br({name:"polarAxis",initialState:lJ,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:Ile,removeRadiusAxis:zle,addAngleAxis:Ble,removeAngleAxis:Ule}=Ok.actions,uJ=Ok.reducer;function cJ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var ix={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 jP;function dJ(){if(jP)return tt;jP=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"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=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 f:case h:case y:return w;default:switch(w=w&&w.$$typeof,w){case l:case d: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=d,tt.Fragment=r,tt.Lazy=g,tt.Memo=p,tt.Portal=t,tt.Profiler=i,tt.StrictMode=n,tt.Suspense=f,tt.SuspenseList=h,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)===d},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)===f},tt.isSuspenseList=function(w){return b(w)===h},tt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===n||w===f||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===l||w.$$typeof===o||w.$$typeof===d||w.$$typeof===x||w.getModuleId!==void 0)},tt.typeOf=b,tt}var wP;function fJ(){return wP||(wP=1,ix.exports=dJ()),ix.exports}var hJ=fJ(),SP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",NP=null,sx=null,Ek=e=>{if(e===NP&&Array.isArray(sx))return sx;var t=[];return S.Children.forEach(e,r=>{mt(r)||(hJ.isFragment(r)?t=t.concat(Ek(r.props.children)):t.push(r))}),sx=t,NP=e,t};function mJ(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>SP(i)):n=[SP(t)],Ek(e).forEach(i=>{var o=Hl(i,"type.displayName")||Hl(i,"type.name");o&&n.indexOf(o)!==-1&&r.push(i)}),r}var Ak=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,ox={},_P;function pJ(){return _P||(_P=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})(ox)),ox}var lx,OP;function gJ(){return OP||(OP=1,lx=pJ().isPlainObject),lx}var yJ=gJ();const vJ=rs(yJ);var EP,AP,CP,TP,PP;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 RP(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){xJ(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 xJ(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=jJ(e,"string");return typeof t=="symbol"?t:t+""}function jJ(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 xc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var DP=(e,t,r,n,i)=>{var o=r-n,l;return l=bt(EP||(EP=xc(["M ",",",""])),e,t),l+=bt(AP||(AP=xc(["L ",",",""])),e+r,t),l+=bt(CP||(CP=xc(["L ",",",""])),e+r-o/2,t+i),l+=bt(TP||(TP=xc(["L ",",",""])),e+r-o/2-n,t+i),l+=bt(PP||(PP=xc(["L ",","," Z"])),e,t),l},wJ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},SJ=e=>{var t=fr(e,wJ),{x:r,y:n,upperWidth:i,lowerWidth:o,height:l,className:d}=t,{animationEasing:f,animationDuration:h,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),C=S.useRef(n),A=Ap(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 T=Xe("recharts-trapezoid",d);if(!g)return S.createElement("g",null,S.createElement("path",zm({},Er(t),{className:T,d:DP(r,n,i,o,l)})));var M=w.current,D=N.current,R=_.current,z=E.current,k=C.current,H="0px ".concat(x===-1?1:x,"px"),U="".concat(x,"px ").concat(x,"px"),ae=I3(["strokeDasharray"],h,f);return S.createElement(Ep,{animationId:A,key:A,canBegin:x>0,duration:h,easing:f,isActive:g,begin:p},Z=>{var G=jt(M,i,Z),$=jt(D,o,Z),F=jt(R,l,Z),J=jt(z,r,Z),re=jt(k,n,Z);y.current&&(w.current=G,N.current=$,_.current=F,E.current=J,C.current=re);var oe=Z>0?{transition:ae,strokeDasharray:U}:{strokeDasharray:H};return S.createElement("path",zm({},Er(t),{className:T,d:DP(J,re,G,$,F),ref:y,style:RP(RP({},oe),t.style)}))})},NJ=["option","shapeType","activeClassName","inActiveClassName"];function _J(e,t){if(e==null)return{};var r,n,i=OJ(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 OJ(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 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 Bm(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){EJ(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 EJ(e,t,r){return(t=AJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AJ(e){var t=CJ(e,"string");return typeof t=="symbol"?t:t+""}function CJ(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 TJ(e,t){return Bm(Bm({},t),e)}function PJ(e,t){return e==="symbols"}function $P(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return S.createElement(q3,r);case"trapezoid":return S.createElement(SJ,r);case"sector":return S.createElement(K3,r);case"symbols":if(PJ(t))return S.createElement(Pj,r);break;case"curve":return S.createElement(L3,r);default:return null}}function MJ(e){return S.isValidElement(e)?e.props:e}function Ck(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=_J(e,NJ),l;if(S.isValidElement(t))l=S.cloneElement(t,Bm(Bm({},o),MJ(t)));else if(typeof t=="function")l=t(o,o.index);else if(vJ(t)&&typeof t!="boolean"){var d=TJ(t,o);l=S.createElement($P,{shapeType:r,elementProps:d})}else{var f=o;l=S.createElement($P,{shapeType:r,elementProps:f})}return o.isActive?S.createElement(sn,{className:n},l):S.createElement(sn,{className:i},l)}var Tk=(e,t,r)=>{var n=ct();return(i,o)=>l=>{e==null||e(i,o,l),n(LD({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},Pk=e=>{var t=ct();return(r,n)=>i=>{e==null||e(r,n,i),t(QQ())}},Mk=(e,t,r)=>{var n=ct();return(i,o)=>l=>{e==null||e(i,o,l),n(XQ({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function Rk(e){var{tooltipEntrySettings:t}=e,r=ct(),n=jr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(KQ(t)):i.current!==t&&r(GQ({prev:i.current,next:t})),i.current=t)},[t,r,n]),S.useLayoutEffect(()=>()=>{i.current&&(r(YQ(i.current)),i.current=null)},[r]),null}function Dk(e){var{legendPayload:t}=e,r=ct(),n=jr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(kF(t)):i.current!==t&&r($F({prev:i.current,next:t})),i.current=t)},[r,n,t]),S.useLayoutEffect(()=>()=>{i.current&&(r(LF(i.current)),i.current=null)},[r]),null}var ux,RJ=()=>{var[e]=S.useState(()=>Uc("uid-"));return e},DJ=(ux=nz.useId)!==null&&ux!==void 0?ux:RJ;function kJ(e,t){var r=DJ();return t||(e?"".concat(e,"-").concat(r):r)}var $J=S.createContext(void 0),kk=e=>{var{id:t,type:r,children:n}=e,i=kJ("recharts-".concat(r),t);return S.createElement($J.Provider,{value:i},n(i))},LJ={cartesianItems:[],polarItems:[]},$k=br({name:"graphicalItems",initialState:LJ,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:IJ,replaceCartesianGraphicalItem:zJ,removeCartesianGraphicalItem:BJ,addPolarGraphicalItem:qle,removePolarGraphicalItem:Fle,replacePolarGraphicalItem:Hle}=$k.actions,UJ=$k.reducer,qJ=e=>{var t=ct(),r=S.useRef(null);return S.useLayoutEffect(()=>{r.current===null?t(IJ(e)):r.current!==e&&t(zJ({prev:r.current,next:e})),r.current=e},[t,e]),S.useLayoutEffect(()=>()=>{r.current&&(t(BJ(r.current)),r.current=null)},[t]),null},Lk=S.memo(qJ),FJ=["points"];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 cx(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){HJ(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 HJ(e,t,r){return(t=KJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KJ(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 Um(){return Um=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},Um.apply(null,arguments)}function YJ(e,t){if(e==null)return{};var r,n,i=VJ(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 VJ(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 QJ(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,d=YJ(o,FJ);return S.createElement(_k,Um({},d,{className:i}))}function XJ(e,t){return e==null?!1:t?!0:e.length===1}function WJ(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:o,baseProps:l,needClip:d,clipPathId:f,zIndex:h=Gt.scatter}=e;if(!XJ(t,r))return null;var p=Ak(r),g=j9(r),y=t.map((b,w)=>{var N,_,E=cx(cx(cx({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(QJ,{key:"dot-".concat(w),option:r,dotProps:E,className:i})}),x={};return d&&f!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),S.createElement(Tn,{zIndex:h},S.createElement(sn,Um({className:n},x),y))}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 zP(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){ZJ(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 ZJ(e,t,r){return(t=JJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JJ(e){var t=eee(e,"string");return typeof t=="symbol"?t:t+""}function eee(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 Ik=0,tee={xAxis:{},yAxis:{},zAxis:{}},zk=br({name:"cartesianAxis",initialState:tee,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 d=[...l,n].slice(-3);e.yAxis[r]=zP(zP({},i),{},{width:n,widthHistory:d})}}}}),{addXAxis:ree,replaceXAxis:nee,removeXAxis:aee,addYAxis:iee,replaceYAxis:see,removeYAxis:oee,addZAxis:Kle,replaceZAxis:Gle,removeZAxis:Yle,updateYAxisWidth:lee}=zk.actions,uee=zk.reducer,cee=Q([Vt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),dee=Q([cee,Xa,Wa],(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)}}),Zw=()=>ve(dee),fee=()=>ve(KX);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 dx(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){hee(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 hee(e,t,r){return(t=mee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mee(e){var t=pee(e,"string");return typeof t=="symbol"?t:t+""}function pee(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 gee=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 d={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},f=dx(dx(dx({},d),yd(i)),Mj(i)),h;return S.isValidElement(i)?h=S.cloneElement(i,f):typeof i=="function"?h=i(f):h=S.createElement(_k,f),S.createElement(sn,{className:"recharts-active-dot",clipPath:l},h)};function yee(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:o,zIndex:l=Gt.activeDot}=e,d=ve(uo),f=fee();if(t==null||f==null)return null;var h=t.find(p=>f.includes(p.payload));return mt(h)?null:S.createElement(Tn,{zIndex:l},S.createElement(gee,{point:h,childIndex:Number(d),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var UP=(e,t,r)=>{var n=r??e;if(!mt(n))return Bn(n,t,0)},vee=(e,t,r)=>{var n={},i=e.filter(Dp),o=e.filter(h=>h.stackId==null),l=i.reduce((h,p)=>{var g=h[p.stackId];return g==null&&(g=[]),g.push(p),h[p.stackId]=g,h},n),d=Object.entries(l).map(h=>{var p,[g,y]=h,x=y.map(w=>w.dataKey),b=UP(t,r,(p=y[0])===null||p===void 0?void 0:p.barSize);return{stackId:g,dataKeys:x,barSize:b}}),f=o.map(h=>{var p=[h.dataKey].filter(y=>y!=null),g=UP(t,r,h.barSize);return{stackId:void 0,dataKeys:p,barSize:g}});return[...d,...f]};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 jh(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){xee(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 xee(e,t,r){return(t=bee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bee(e){var t=jee(e,"string");return typeof t=="symbol"?t:t+""}function jee(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 wee(e,t,r,n,i){var o,l=n.length;if(!(l<1)){var d=Bn(e,r,0,!0),f,h=[];if(Be((o=n[0])===null||o===void 0?void 0:o.barSize)){var p=!1,g=r/l,y=n.reduce((E,C)=>E+(C.barSize||0),0);y+=(l-1)*d,y>=r&&(y-=(l-1)*d,d=0),y>=r&&g>0&&(p=!0,g*=.9,y=l*g);var x=(r-y)/2>>0,b={offset:x-d,size:0};f=n.reduce((E,C)=>{var A,T={stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:b.offset+b.size+d,size:p?g:(A=C.barSize)!==null&&A!==void 0?A:0}},M=[...E,T];return b=T.position,M},h)}else{var w=Bn(t,r,0,!0);r-2*w-(l-1)*d<=0&&(d=0);var N=(r-2*w-(l-1)*d)/l;N>1&&(N>>=0);var _=Be(i)?Math.min(N,i):N;f=n.reduce((E,C,A)=>[...E,{stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:w+(N+d)*A+(N-_)/2,size:_}}],h)}return f}}var See=(e,t,r,n,i,o,l)=>{var d=mt(l)?t:l,f=wee(r,n,i!==o?i:o,e,d);return i!==o&&f!=null&&(f=f.map(h=>jh(jh({},h),{},{position:jh(jh({},h.position),{},{offset:h.position.offset-i/2})}))),f},Nee=(e,t)=>{var r=iw(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)}}}},_ee=(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 Oee(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Be(e.zIndex)?e.zIndex:t}var Eee=e=>{var{chartData:t}=e,r=ct(),n=jr();return S.useEffect(()=>n?()=>{}:(r(rP(t)),()=>{r(rP(void 0))}),[t,r,n]),null},FP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Bk=br({name:"brush",initialState:FP,reducers:{setBrushSettings(e,t){return t.payload==null?FP:t.payload}}}),{setBrushSettings:Vle}=Bk.actions,Aee=Bk.reducer;function Cee(e){return(e%180+180)%180}var Tee=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Cee(i),l=o*Math.PI/180,d=Math.atan(n/r),f=l>d&&l<Math.PI-d?n/Math.sin(l):r/Math.cos(l);return Math.abs(f)},Pee={dots:[],areas:[],lines:[]},Uk=br({name:"referenceElements",initialState:Pee,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:Qle,removeDot:Xle,addArea:Wle,removeArea:Zle,addLine:Jle,removeLine:eue}=Uk.actions,Mee=Uk.reducer,Ree=S.createContext(void 0),Dee=e=>{var{children:t}=e,[r]=S.useState("".concat(Uc("recharts"),"-clip")),n=Zw();if(n==null)return null;var{x:i,y:o,width:l,height:d}=n;return S.createElement(Ree.Provider,{value:r},S.createElement("defs",null,S.createElement("clipPath",{id:r},S.createElement("rect",{x:i,y:o,height:d,width:l}))),t)};function qk(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 kee(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Tee(n,r)}function $ee(e,t,r){var n=r==="width",{x:i,y:o,width:l,height:d}=e;return t===1?{start:n?i:o,end:n?i+l:o+d}:{start:n?i+l:o+d,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 Lee(e,t){return qk(e,t+1)}function Iee(e,t,r,n,i){for(var o=(n||[]).slice(),{start:l,end:d}=t,f=0,h=1,p=l,g=function(){var b=n==null?void 0:n[f];if(b===void 0)return{v:qk(n,h)};var w=f,N,_=()=>(N===void 0&&(N=r(b,w)),N),E=b.coordinate,C=f===0||td(e,E,_,p,d);C||(f=0,p=l,h+=1),C&&(p=E+e*(_()/2+i),f+=h)},y;h<=o.length;)if(y=g(),y)return y.v;return[]}function zee(e,t,r,n,i){var o=(n||[]).slice(),l=o.length;if(l===0)return[];for(var{start:d,end:f}=t,h=1;h<=l;h++){for(var p=(l-1)%h,g=d,y=!0,x=function(){var A=n[w];if(A==null)return 0;var T=w,M,D=()=>(M===void 0&&(M=r(A,T)),M),R=A.coordinate,z=w===p||td(e,R,D,g,f);if(!z)return y=!1,1;z&&(g=R+e*(D()/2+i))},b,w=p;w<l&&(b=x(),!(b!==0&&b===1));w+=h);if(y){for(var N=[],_=p;_<l;_+=h){var E=n[_];E!=null&&N.push(E)}return N}}return[]}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 yr(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){Bee(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 Bee(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=qee(e,"string");return typeof t=="symbol"?t:t+""}function qee(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 Fee(e,t,r,n,i){for(var o=(n||[]).slice(),l=o.length,{start:d}=t,{end:f}=t,h=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-f);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,d,f);E&&(f=b.tickCoord-e*(N()/2+i),o[y]=yr(yr({},b),{},{isShow:!0}))}},p=l-1;p>=0;p--)h(p);return o}function Hee(e,t,r,n,i,o){var l=(n||[]).slice(),d=l.length,{start:f,end:h}=t;if(o){var p=n[d-1];if(p!=null){var g=r(p,d-1),y=e*(p.coordinate+e*g/2-h);if(l[d-1]=p=yr(yr({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate}),p.tickCoord!=null){var x=td(e,p.tickCoord,()=>g,f,h);x&&(h=p.tickCoord-e*(g/2+i),l[d-1]=yr(yr({},p),{},{isShow:!0}))}}}for(var b=o?d-1:d,w=function(E){var C=l[E];if(C==null)return 1;var A=C,T,M=()=>(T===void 0&&(T=r(C,E)),T);if(E===0){var D=e*(A.coordinate-e*M()/2-f);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 R=td(e,A.tickCoord,M,f,h);R&&(f=A.tickCoord+e*(M()/2+i),l[E]=yr(yr({},A),{},{isShow:!0}))}},N=0;N<b;N++)w(N);return l}function Jw(e,t,r){var{tick:n,ticks:i,viewBox:o,minTickGap:l,orientation:d,interval:f,tickFormatter:h,unit:p,angle:g}=e;if(!i||!i.length||!n)return[];if(ge(f)||Nd.isSsr){var y;return(y=Lee(i,ge(f)?f:0))!==null&&y!==void 0?y:[]}var x=[],b=d==="top"||d==="bottom"?"width":"height",w=p&&b==="width"?Ac(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(T,M)=>{var D=typeof h=="function"?h(T.value,M):T.value;return b==="width"?kee(Ac(D,{fontSize:t,letterSpacing:r}),w,g):Ac(D,{fontSize:t,letterSpacing:r})[b]},_=i[0],E=i[1],C=i.length>=2&&_!=null&&E!=null?Br(E.coordinate-_.coordinate):1,A=$ee(o,C,b);return f==="equidistantPreserveStart"?Iee(C,A,N,i,l):f==="equidistantPreserveEnd"?zee(C,A,N,i,l):(f==="preserveStart"||f==="preserveStartEnd"?x=Hee(C,A,N,i,l,f==="preserveStartEnd"):x=Fee(C,A,N,i,l),x.filter(T=>T.isShow))}var Kee=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 d=r?r.getBoundingClientRect().width:0,f=i+o,h=l+f+d+(r?n:0);return Math.round(h)}return 0},Gee={xAxis:{},yAxis:{}},Fk=br({name:"renderedTicks",initialState:Gee,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:Yee,removeRenderedTicks:Vee}=Fk.actions,Qee=Fk.reducer,Xee=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Wee(e,t){if(e==null)return{};var r,n,i=Zee(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 Zee(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 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 xt(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){Jee(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 Jee(e,t,r){return(t=ete(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ete(e){var t=tte(e,"string");return typeof t=="symbol"?t:t+""}function tte(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 Ha={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 rte(e){var{x:t,y:r,width:n,height:i,orientation:o,mirror:l,axisLine:d,otherSvgProps:f}=e;if(!d)return null;var h=xt(xt(xt({},f),zn(d)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!l||o==="bottom"&&l);h=xt(xt({},h),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var g=+(o==="left"&&!l||o==="right"&&l);h=xt(xt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+i})}return S.createElement("line",co({},h,{className:Xe("recharts-cartesian-axis-line",Hl(d,"className"))}))}function nte(e,t,r,n,i,o,l,d,f){var h,p,g,y,x,b,w=d?-1:1,N=e.tickSize||l,_=ge(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,y=r+ +!d*i,g=y-w*N,b=g-w*f,x=_;break;case"left":g=y=e.coordinate,p=t+ +!d*n,h=p-w*N,x=h-w*f,b=_;break;case"right":g=y=e.coordinate,p=t+ +d*n,h=p+w*N,x=h+w*f,b=_;break;default:h=p=e.coordinate,y=r+ +d*i,g=y+w*N,b=g+w*f,x=_;break}return{line:{x1:h,y1:g,x2:p,y2:y},tick:{x,y:b}}}function ate(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function ite(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function ste(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,cJ(t))),i=S.createElement(Xw,co({},r,{className:l}),n)}return i}function ote(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(Yee({ticks:o,axisId:n,axisType:r})),()=>{i(Vee({axisId:n,axisType:r}))}},[i,t,n,r]),null}var lte=S.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:o,tickFormatter:l,unit:d,padding:f,tickTextProps:h,orientation:p,mirror:g,x:y,y:x,width:b,height:w,tickSize:N,tickMargin:_,fontSize:E,letterSpacing:C,getTicksConfig:A,events:T,axisType:M,axisId:D}=e,R=Jw(xt(xt({},A),{},{ticks:r}),E,C),z=zn(A),k=yd(n),H=pk(z.textAnchor)?z.textAnchor:ate(p,g),U=ite(p,g),ae={};typeof i=="object"&&(ae=i);var Z=xt(xt({},z),{},{fill:"none"},ae),G=R.map(J=>xt({entry:J},nte(J,y,x,b,w,p,N,g,_))),$=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,L,{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:R.length,tickFormatter:l,padding:f},h),{},{angle:(oe=(L=h==null?void 0:h.angle)!==null&&L!==void 0?L: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)},op(T,X,re)),n&&S.createElement(ste,{option:n,tickProps:pe,value:"".concat(typeof l=="function"?l(X.value,re):X.value).concat(d||"")}))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(M,"-ticks")},S.createElement(ote,{ticks:R,axisId:D,axisType:M}),F.length>0&&S.createElement(Tn,{zIndex:Gt.label},S.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(M,"-tick-labels"),ref:t},F)),$.length>0&&S.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(M,"-tick-lines")},$))}),ute=S.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:o,hide:l,ticks:d,axisType:f,axisId:h}=e,p=Wee(e,Xee),[g,y]=S.useState(""),[x,b]=S.useState(""),w=S.useRef(null);S.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return Kee({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 C=E[0];if(C){var A=window.getComputedStyle(C),T=A.fontSize,M=A.letterSpacing;(T!==g||M!==x)&&(y(T),b(M))}}},[g,x]);return l||n!=null&&n<=0||i!=null&&i<=0?null:S.createElement(Tn,{zIndex:e.zIndex},S.createElement(sn,{className:Xe("recharts-cartesian-axis",o)},S.createElement(rte,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:zn(e)}),S.createElement(lte,{ref:N,axisType:f,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:d,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),S.createElement(KZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},S.createElement(tJ,{label:e.label,labelRef:e.labelRef}),e.children)))}),e1=S.forwardRef((e,t)=>{var r=fr(e,Ha);return S.createElement(ute,co({},r,{ref:t}))});e1.displayName="CartesianAxis";var cte=["x1","y1","x2","y2","key"],dte=["offset"],fte=["xAxisId","yAxisId"],hte=["xAxisId","yAxisId"];function GP(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?GP(Object(r),!0).forEach(function(n){mte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mte(e,t,r){return(t=pte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pte(e){var t=gte(e,"string");return typeof t=="symbol"?t:t+""}function gte(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 Ls(){return Ls=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},Ls.apply(null,arguments)}function qm(e,t){if(e==null)return{};var r,n,i=yte(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 yte(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 vte=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:o,height:l,ry:d}=e;return S.createElement("rect",{x:n,y:i,ry:d,width:o,height:l,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Hk(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:d,y2:f,key:h}=r,p=qm(r,cte),g=(i=zn(p))!==null&&i!==void 0?i:{},{offset:y}=g,x=qm(g,dte);n=S.createElement("line",Ls({},x,{x1:o,y1:l,x2:d,y2:f,fill:"none",key:h}))}return n}function xte(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,d=qm(e,fte),f=i.map((h,p)=>{var g=vr(vr({},d),{},{x1:t,y1:h,x2:t+r,y2:h,key:"line-".concat(p),index:p});return S.createElement(Hk,{key:"line-".concat(p),option:n,lineItemProps:g})});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function bte(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,d=qm(e,hte),f=i.map((h,p)=>{var g=vr(vr({},d),{},{x1:h,y1:t,x2:h,y2:t+r,key:"line-".concat(p),index:p});return S.createElement(Hk,{option:n,lineItemProps:g,key:"line-".concat(p)})});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function jte(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:o,height:l,horizontalPoints:d,horizontal:f=!0}=e;if(!f||!t||!t.length||d==null)return null;var h=d.map(g=>Math.round(g+i-i)).sort((g,y)=>g-y);i!==h[0]&&h.unshift(0);var p=h.map((g,y)=>{var x=h[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 wte(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:o,width:l,height:d,verticalPoints:f}=e;if(!t||!r||!r.length)return null;var h=f.map(g=>Math.round(g+i-i)).sort((g,y)=>g-y);i!==h[0]&&h.unshift(0);var p=h.map((g,y)=>{var x=h[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:d,stroke:"none",fill:r[N],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Ste=(e,t)=>{var{xAxis:r,width:n,height:i,offset:o}=e;return v3(Jw(vr(vr(vr({},Ha),r),{},{ticks:x3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},Nte=(e,t)=>{var{yAxis:r,width:n,height:i,offset:o}=e;return v3(Jw(vr(vr(vr({},Ha),r),{},{ticks:x3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},_te={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Gt.grid};function Yp(e){var t=Kj(),r=Gj(),n=N3(),i=vr(vr({},fr(e,_te)),{},{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:d,y:f,width:h,height:p,syncWithTicks:g,horizontalValues:y,verticalValues:x}=i,b=jr(),w=ve(z=>FT(z,"xAxis",o,b)),N=ve(z=>FT(z,"yAxis",l,b));if(!ca(h)||!ca(p)||!ge(d)||!ge(f))return null;var _=i.verticalCoordinatesGenerator||Ste,E=i.horizontalCoordinatesGenerator||Nte,{horizontalPoints:C,verticalPoints:A}=i;if((!C||!C.length)&&typeof E=="function"){var T=y&&y.length,M=E({yAxis:N?vr(vr({},N),{},{ticks:T?y:N.ticks}):void 0,width:t??h,height:r??p,offset:n},T?!0:g);hm(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(C=M)}if((!A||!A.length)&&typeof _=="function"){var D=x&&x.length,R=_({xAxis:w?vr(vr({},w),{},{ticks:D?x:w.ticks}):void 0,width:t??h,height:r??p,offset:n},D?!0:g);hm(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof R,"]")),Array.isArray(R)&&(A=R)}return S.createElement(Tn,{zIndex:i.zIndex},S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(vte,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(jte,Ls({},i,{horizontalPoints:C})),S.createElement(wte,Ls({},i,{verticalPoints:A})),S.createElement(xte,Ls({},i,{offset:n,horizontalPoints:C,xAxis:w,yAxis:N})),S.createElement(bte,Ls({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:N}))))}Yp.displayName="CartesianGrid";var Ote={},Kk=br({name:"errorBars",initialState:Ote,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:tue,replaceErrorBar:rue,removeErrorBar:nue}=Kk.actions,Ete=Kk.reducer,Ate=["children"];function Cte(e,t){if(e==null)return{};var r,n,i=Tte(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 Tte(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 Pte={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Mte=S.createContext(Pte);function Gk(e){var{children:t}=e,r=Cte(e,Ate);return S.createElement(Mte.Provider,{value:r},t)}function t1(e,t){var r,n,i=ve(h=>Ja(h,e)),o=ve(h=>ei(h,t)),l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:$t.allowDataOverflow,d=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Lt.allowDataOverflow,f=l||d;return{needClip:f,needClipX:l,needClipY:d}}function Yk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Zw(),{needClipX:o,needClipY:l,needClip:d}=t1(t,r);if(!d||!i)return null;var{x:f,y:h,width:p,height:g}=i;return S.createElement("clipPath",{id:"clipPath-".concat(n)},S.createElement("rect",{x:o?f:f-p/2,y:l?h:h-g/2,width:o?p:p*2,height:l?g:g*2}))}var Vk=(e,t,r,n)=>es(e,"xAxis",t,n),Qk=(e,t,r,n)=>Ji(e,"xAxis",t,n),Xk=(e,t,r,n)=>es(e,"yAxis",r,n),Wk=(e,t,r,n)=>Ji(e,"yAxis",r,n),Rte=Q([We,Vk,Xk,Qk,Wk],(e,t,r,n,i)=>Qa(e,"xAxis")?Gl(t,n,!1):Gl(r,i,!1)),Dte=(e,t,r,n,i)=>i;function kte(e){return e.type==="line"}var $te=Q([Fp,Dte],(e,t)=>e.filter(kte).find(r=>r.id===t)),Lte=Q([We,Vk,Xk,Qk,Wk,$te,Rte,_d],(e,t,r,n,i,o,l,d)=>{var{chartData:f,dataStartIndex:h,dataEndIndex:p}=d;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=f==null?void 0:f.slice(h,p+1),x!=null)return are({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:g,bandSize:l,displayedData:x})}});function Ite(e){var t=yd(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:o}=t,l=Number(i),d=Number(o);return(Number.isNaN(l)||l<0)&&(l=r),(Number.isNaN(d)||d<0)&&(d=n),{r:l,strokeWidth:d}}return{r,strokeWidth:n}}var zte=["id"],Bte=["type","layout","connectNulls","needClip","shape"],Ute=["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 YP(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?YP(Object(r),!0).forEach(function(n){qte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qte(e,t,r){return(t=Fte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fte(e){var t=Hte(e,"string");return typeof t=="symbol"?t:t+""}function Hte(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 r1(e,t){if(e==null)return{};var r,n,i=Kte(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 Kte(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 Gte=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:vp(r,t),payload:e}]},Yte=S.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:o,name:l,hide:d,unit:f,tooltipType:h,id:p}=e,g={dataDefinedOnItem:r,getPosition:go,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:vp(l,t),hide:d,type:h,color:n,unit:f,graphicalItemId:p}};return S.createElement(Rk,{tooltipEntrySettings:g})}),Zk=(e,t)=>"".concat(t,"px ").concat(e,"px");function Vte(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var Qte=(e,t,r)=>{var n=r.reduce((y,x)=>y+x,0);if(!n)return Zk(t,e);for(var i=Math.floor(e/n),o=e%n,l=[],d=0,f=0;d<r.length;f+=(h=r[d])!==null&&h!==void 0?h:0,++d){var h,p=r[d];if(p!=null&&f+p>o){l=[...r.slice(0,d),o-f];break}}var g=l.length%2===0?[0,t]:[t];return[...Vte(r,i),...l,...g].map(y=>"".concat(y,"px")).join(", ")};function Xte(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:o,needClip:l}=n,{id:d}=n,f=r1(n,zte),h=zn(f);return S.createElement(WJ,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:h,needClip:l,clipPathId:t})}function Wte(e){var{showLabels:t,children:r,points:n}=e,i=S.useMemo(()=>n==null?void 0:n.map(o=>{var l,d,f={x:(l=o.x)!==null&&l!==void 0?l:0,y:(d=o.y)!==null&&d!==void 0?d:0,width:0,lowerWidth:0,upperWidth:0,height:0};return na(na({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[n]);return S.createElement(wk,{value:t?i:void 0},r)}function VP(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:o}=e,{type:l,layout:d,connectNulls:f,needClip:h,shape:p}=o,g=r1(o,Bte),y=na(na({},Er(g)),{},{fill:"none",className:"recharts-line-curve",clipPath:h?"url(#clipPath-".concat(t,")"):void 0,points:n,type:l,layout:d,connectNulls:f,strokeDasharray:i??o.strokeDasharray});return S.createElement(S.Fragment,null,(n==null?void 0:n.length)>1&&S.createElement(Ck,rd({shapeType:"curve",option:p},y,{pathRef:r})),S.createElement(Xte,{points:n,clipPathId:t,props:o}))}function Zte(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Jte(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:d,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:g,animateNewValues:y,width:x,height:b,onAnimationEnd:w,onAnimationStart:N}=r,_=i.current,E=Ap(l,"recharts-line-"),C=S.useRef(E),[A,T]=S.useState(!1),M=!A,D=S.useCallback(()=>{typeof w=="function"&&w(),T(!1)},[w]),R=S.useCallback(()=>{typeof N=="function"&&N(),T(!0)},[N]),z=Zte(n.current),k=S.useRef(0);C.current!==E&&(k.current=o.current,C.current=E);var H=k.current;return S.createElement(Wte,{points:l,showLabels:M},r.children,S.createElement(Ep,{animationId:E,begin:h,duration:p,isActive:f,easing:g,onAnimationEnd:D,onAnimationStart:R,key:E},U=>{var ae=jt(H,z+H,U),Z=Math.min(ae,z),G;if(f)if(d){var $="".concat(d).split(/[,\s]+/gim).map(re=>parseFloat(re));G=Qte(Z,z,$)}else G=Zk(z,Z);else G=d==null?void 0:String(d);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 L=Math.floor(oe*F);if(_[L]){var X=_[L];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(VP,{props:r,points:J,clipPathId:t,pathRef:n,strokeDasharray:G})}return S.createElement(VP,{props:r,points:l,clipPathId:t,pathRef:n,strokeDasharray:G})}),S.createElement(Nk,{label:r.label}))}function ere(e){var{clipPathId:t,props:r}=e,n=S.useRef(null),i=S.useRef(0),o=S.useRef(null);return S.createElement(Jte,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:o})}var tre=(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 rre extends S.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:o,yAxisId:l,top:d,left:f,width:h,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:_}=Ite(r),E=Ak(r),C=N*2+_,A=y?"url(#clipPath-".concat(E?"":"dots-").concat(w,")"):void 0;return S.createElement(Tn,{zIndex:x},S.createElement(sn,{className:b},y&&S.createElement("defs",null,S.createElement(Yk,{clipPathId:w,xAxisId:o,yAxisId:l}),!E&&S.createElement("clipPath",{id:"clipPath-dots-".concat(w)},S.createElement("rect",{x:f-C/2,y:d-C/2,width:h+C,height:p+C}))),S.createElement(Gk,{xAxisId:o,yAxisId:l,data:n,dataPointFormatter:tre,errorBarOffset:0},S.createElement(ere,{props:this.props,clipPathId:w}))),S.createElement(yee,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var Jk={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 nre(e){var t=fr(e,Jk),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:d,dot:f,hide:h,isAnimationActive:p,label:g,legendType:y,xAxisId:x,yAxisId:b,id:w}=t,N=r1(t,Ute),{needClip:_}=t1(x,b),E=Zw(),C=yo(),A=jr(),T=ve(k=>Lte(k,x,b,A,w));if(C!=="horizontal"&&C!=="vertical"||T==null||E==null)return null;var{height:M,width:D,x:R,y:z}=E;return S.createElement(rre,rd({},N,{id:w,connectNulls:d,dot:f,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:p,hide:h,label:g,legendType:y,xAxisId:x,yAxisId:b,points:T,layout:C,height:M,width:D,left:R,top:z,needClip:_}))}function are(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:d,displayedData:f}=e;return f.map((h,p)=>{var g=Ot(h,l);if(t==="horizontal"){var y=kA({axis:r,ticks:i,bandSize:d,entry:h,index:p}),x=mt(g)?null:n.scale.map(g);return{x:y,y:x??null,value:g,payload:h}}var b=mt(g)?null:r.scale.map(g),w=kA({axis:n,ticks:o,bandSize:d,entry:h,index:p});return b==null||w==null?null:{x:b,y:w,value:g,payload:h}}).filter(Boolean)}function ire(e){var t=fr(e,Jk),r=jr();return S.createElement(kk,{id:t.id,type:"line"},n=>S.createElement(S.Fragment,null,S.createElement(Dk,{legendPayload:Gte(t)}),S.createElement(Yte,{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(Lk,{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(nre,rd({},t,{id:n}))))}var e5=S.memo(ire,ru);e5.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:Ik}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:Ik}var sre="Invariant failed";function ore(e,t){throw new Error(sre)}function $b(){return $b=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},$b.apply(null,arguments)}function n1(e){return S.createElement(Ck,$b({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var lre=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||ore(),r)}},ure=(e,t,r)=>r,cre=(e,t)=>t,kd=Q([Fp,cre],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),dre=Q([kd],e=>e==null?void 0:e.maxBarSize),fre=(e,t,r,n)=>n,hre=Q([We,Fp,jo,wo,ure],(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")),mre=(e,t,r)=>{var n=We(e),i=jo(e,t),o=wo(e,t);if(!(i==null||o==null))return n==="horizontal"?Pb(e,"yAxis",o,r):Pb(e,"xAxis",i,r)},pre=(e,t)=>{var r=We(e),n=jo(e,t),i=wo(e,t);if(!(n==null||i==null))return r==="horizontal"?qT(e,"xAxis",n):qT(e,"yAxis",i)},gre=Q([hre,ZK,pre],vee),yre=(e,t,r)=>{var n,i,o=kd(e,t);if(o==null)return 0;var l=jo(e,t),d=wo(e,t);if(l==null||d==null)return 0;var f=We(e),h=a4(e),{maxBarSize:p}=o,g=mt(p)?h:p,y,x;return f==="horizontal"?(y=es(e,"xAxis",l,r),x=Ji(e,"xAxis",l,r)):(y=es(e,"yAxis",d,r),x=Ji(e,"yAxis",d,r)),(n=(i=Gl(y,x,!0))!==null&&i!==void 0?i:g)!==null&&n!==void 0?n:0},t5=(e,t,r)=>{var n=We(e),i=jo(e,t),o=wo(e,t);if(!(i==null||o==null)){var l,d;return n==="horizontal"?(l=es(e,"xAxis",i,r),d=Ji(e,"xAxis",i,r)):(l=es(e,"yAxis",o,r),d=Ji(e,"yAxis",o,r)),Gl(l,d)}},vre=Q([gre,a4,WK,i4,yre,t5,dre],See),xre=(e,t,r)=>{var n=jo(e,t);if(n!=null)return es(e,"xAxis",n,r)},bre=(e,t,r)=>{var n=wo(e,t);if(n!=null)return es(e,"yAxis",n,r)},jre=(e,t,r)=>{var n=jo(e,t);if(n!=null)return Ji(e,"xAxis",n,r)},wre=(e,t,r)=>{var n=wo(e,t);if(n!=null)return Ji(e,"yAxis",n,r)},Sre=Q([vre,kd],_ee),Nre=Q([mre,kd],Nee),_re=Q([Vt,Uj,xre,bre,jre,wre,Sre,We,FK,t5,Nre,kd,fre],(e,t,r,n,i,o,l,d,f,h,p,g,y)=>{var{chartData:x,dataStartIndex:b,dataEndIndex:w}=f;if(!(g==null||l==null||t==null||d!=="horizontal"&&d!=="vertical"||r==null||n==null||i==null||o==null||h==null)){var{data:N}=g,_;if(N!=null&&N.length>0?_=N:_=x==null?void 0:x.slice(b,w+1),_!=null)return Jre({layout:d,barSettings:g,pos:l,parentViewBox:t,bandSize:h,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,stackedData:p,displayedData:_,offset:e,cells:y,dataStartIndex:b})}}),Ore=["index"];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 Ere(e,t){if(e==null)return{};var r,n,i=Are(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 Are(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 r5=S.createContext(void 0),Cre=e=>{var t=S.useContext(r5);if(t!=null)return t.stackId;if(e!=null)return $7(e)},Tre=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Pre=e=>{var t=S.useContext(r5);if(t!=null){var{stackId:r}=t;return"url(#".concat(Tre(r,e),")")}},n5=e=>{var{index:t}=e,r=Ere(e,Ore),n=Pre(t);return S.createElement(sn,Lb({className:"recharts-bar-stack-layer",clipPath:n},r))},Mre=["onMouseEnter","onMouseLeave","onClick"],Rre=["value","background","tooltipPosition"],Dre=["id"],kre=["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 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 Nr(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){$re(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 $re(e,t,r){return(t=Lre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lre(e){var t=Ire(e,"string");return typeof t=="symbol"?t:t+""}function Ire(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 Fm(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}var Bre=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:vp(r,t),payload:e}]},Ure=S.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:o,hide:l,unit:d,tooltipType:f,id:h}=e,p={dataDefinedOnItem:void 0,getPosition:go,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:vp(o,t),hide:l,type:f,color:i,unit:d,graphicalItemId:h}};return S.createElement(Rk,{tooltipEntrySettings:p})});function qre(e){var t=ve(uo),{data:r,dataKey:n,background:i,allOtherBarProps:o}=e,{onMouseEnter:l,onMouseLeave:d,onClick:f}=o,h=Fm(o,Mre),p=Tk(l,n,o.id),g=Pk(d),y=Mk(f,n,o.id);if(!i||r==null)return null;var x=yd(i);return S.createElement(Tn,{zIndex:Oee(i,Gt.barBackground)},r.map((b,w)=>{var{value:N,background:_,tooltipPosition:E}=b,C=Fm(b,Rre);if(!_)return null;var A=p(b,w),T=g(b,w),M=y(b,w),D=Nr(Nr(Nr(Nr(Nr({option:i,isActive:String(w)===t},C),{},{fill:"#eee"},_),x),op(h,b,w)),{},{onMouseEnter:A,onMouseLeave:T,onClick:M,dataKey:n,index:w,className:"recharts-bar-background-rectangle"});return S.createElement(n1,ts({key:"background-bar-".concat(w)},D))}))}function Fre(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(wk,{value:t?i:void 0},r)}function Hre(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:o,dataKey:l}=e,d=ve(uo),f=ve(JD),h=r&&String(i.originalDataIndex)===d&&(f==null||l===f),[p,g]=S.useState(!1),[y,x]=S.useState(!1);S.useEffect(()=>{var C;return h?(g(!0),C=requestAnimationFrame(()=>{x(!0)})):x(!1),()=>{cancelAnimationFrame(C)}},[h]);var b=S.useCallback(()=>{h||g(!1)},[h]),w=h&&y,N=h||p,_;h?r===!0?_=t:_=r:_=t;var E=S.createElement(n1,ts({},n,{name:String(n.name)},i,{isActive:w,option:_,index:o,dataKey:l,onTransitionEnd:b}));return N?S.createElement(Tn,{zIndex:Gt.activeBar},S.createElement(n5,{index:i.originalDataIndex},E)):E}function Kre(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:o}=e;return S.createElement(n1,ts({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:o}))}function Gre(e){var t,{data:r,props:n}=e,i=(t=zn(n))!==null&&t!==void 0?t:{},{id:o}=i,l=Fm(i,Dre),{shape:d,dataKey:f,activeBar:h}=n,{onMouseEnter:p,onClick:g,onMouseLeave:y}=n,x=Fm(n,kre),b=Tk(p,f,o),w=Pk(y),N=Mk(g,f,o);return r?S.createElement(S.Fragment,null,r.map((_,E)=>S.createElement(n5,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"},op(x,_,E),{onMouseEnter:b(_,E),onMouseLeave:w(_,E),onClick:N(_,E)}),h?S.createElement(Hre,{shape:d,activeBar:h,baseProps:l,entry:_,index:E,dataKey:f}):S.createElement(Kre,{shape:d,baseProps:l,entry:_,index:E,dataKey:f})))):null}function Yre(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:o,animationBegin:l,animationDuration:d,animationEasing:f,onAnimationEnd:h,onAnimationStart:p}=t,g=r.current,y=Ap(t,"recharts-bar-"),[x,b]=S.useState(!1),w=!x,N=S.useCallback(()=>{typeof h=="function"&&h(),b(!1)},[h]),_=S.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]);return S.createElement(Fre,{showLabels:w,rects:n},S.createElement(Ep,{animationId:y,begin:l,duration:d,isActive:o,easing:f,onAnimationEnd:N,onAnimationStart:_,key:y},E=>{var C=E===1?n:n==null?void 0:n.map((A,T)=>{var M=g&&g[T];if(M)return Nr(Nr({},A),{},{x:jt(M.x,A.x,E),y:jt(M.y,A.y,E),width:jt(M.width,A.width,E),height:jt(M.height,A.height,E)});if(i==="horizontal"){var D=jt(0,A.height,E),R=jt(A.stackedBarStart,A.y,E);return Nr(Nr({},A),{},{y:R,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=C??null),C==null?null:S.createElement(sn,null,S.createElement(Gre,{props:t,data:C}))}),S.createElement(Nk,{label:t.label}),t.children)}function Vre(e){var t=S.useRef(null);return S.createElement(Yre,{previousRectanglesRef:t,props:e})}var a5=0,Qre=(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 Xre extends S.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:o,yAxisId:l,needClip:d,background:f,id:h}=this.props;if(t||r==null)return null;var p=Xe("recharts-bar",i),g=h;return S.createElement(sn,{className:p,id:h},d&&S.createElement("defs",null,S.createElement(Yk,{clipPathId:g,xAxisId:o,yAxisId:l})),S.createElement(sn,{className:"recharts-bar-rectangles",clipPath:d?"url(#clipPath-".concat(g,")"):void 0},S.createElement(qre,{data:r,dataKey:n,background:f,allOtherBarProps:this.props}),S.createElement(Vre,this.props)))}}var Wre={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:a5,xAxisId:0,yAxisId:0,zIndex:Gt.bar};function Zre(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:d,animationDuration:f,animationEasing:h,isAnimationActive:p}=e,{needClip:g}=t1(t,r),y=yo(),x=jr(),b=mJ(e.children,Qw),w=ve(E=>_re(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(Gk,{xAxisId:t,yAxisId:r,data:w,dataPointFormatter:Qre,errorBarOffset:N},S.createElement(Xre,ts({},e,{layout:y,needClip:g,data:w,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:d,animationDuration:f,animationEasing:h,isAnimationActive:p})))}function Jre(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:o,bandSize:l,xAxis:d,yAxis:f,xAxisTicks:h,yAxisTicks:p,stackedData:g,displayedData:y,offset:x,cells:b,parentViewBox:w,dataStartIndex:N}=e,_=t==="horizontal"?f:d,E=g?_.scale.domain():null,C=L7({numericAxis:_}),A=_.scale.map(C);return y.map((T,M)=>{var D,R,z,k,H,U;if(g){var ae=g[M+N];if(ae==null)return null;D=P7(ae,E)}else D=Ot(T,r),Array.isArray(D)||(D=[C,D]);var Z=lre(n,a5)(D[1],M);if(t==="horizontal"){var G,$=f.scale.map(D[0]),F=f.scale.map(D[1]);if($==null||F==null)return null;R=$A({axis:d,ticks:h,bandSize:l,offset:o.offset,entry:T,index:M}),z=(G=F??$)!==null&&G!==void 0?G:void 0,k=o.size;var J=$-F;if(H=la(J)?0:J,U={x:R,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=d.scale.map(D[0]),L=d.scale.map(D[1]);if(oe==null||L==null)return null;if(R=oe,z=$A({axis:f,ticks:p,bandSize:l,offset:o.offset,entry:T,index:M}),k=L-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(R==null||z==null||k==null||H==null||!i&&(k===0||H===0))return null;var le=Nr(Nr({},T),{},{stackedBarStart:A,x:R,y:z,width:k,height:H,value:g?D:D[1],payload:T,background:U,tooltipPosition:{x:R+k/2,y:z+H/2},parentViewBox:w,originalDataIndex:M},b&&b[M]&&b[M].props);return le}).filter(Boolean)}function ene(e){var t=fr(e,Wre),r=Cre(t.stackId),n=jr();return S.createElement(kk,{id:t.id,type:"bar"},i=>S.createElement(S.Fragment,null,S.createElement(Dk,{legendPayload:Bre(t)}),S.createElement(Ure,{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(Lk,{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(Tn,{zIndex:t.zIndex},S.createElement(Zre,ts({},t,{id:i})))))}var a1=S.memo(ene,ru);a1.displayName="Bar";var tne=["domain","range"],rne=["domain","range"];function XP(e,t){if(e==null)return{};var r,n,i=nne(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 nne(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 WP(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 i5(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=XP(e,tne),{domain:o,range:l}=t,d=XP(t,rne);return!WP(r,o)||!WP(n,l)?!1:ru(i,d)}var ane=["type"],ine=["dangerouslySetInnerHTML","ticks","scale"],sne=["id","scale"];function Ib(){return Ib=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},Ib.apply(null,arguments)}function ZP(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 JP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZP(Object(r),!0).forEach(function(n){one(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function one(e,t,r){return(t=lne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lne(e){var t=une(e,"string");return typeof t=="symbol"?t:t+""}function une(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 zb(e,t){if(e==null)return{};var r,n,i=cne(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 cne(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 dne(e){var t=ct(),r=S.useRef(null),n=_3(),{type:i}=e,o=zb(e,ane),l=Pp(n,"xAxis",i),d=S.useMemo(()=>{if(l!=null)return JP(JP({},o),{},{type:l})},[o,l]);return S.useLayoutEffect(()=>{d!=null&&(r.current===null?t(ree(d)):r.current!==d&&t(nee({prev:r.current,next:d})),r.current=d)},[d,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(aee(r.current)),r.current=null)},[t]),null}var fne=e=>{var{xAxisId:t,className:r}=e,n=ve(Uj),i=jr(),o="xAxis",l=ve(_=>PD(_,o,t,i)),d=ve(_=>AD(_,t)),f=ve(_=>RQ(_,t)),h=ve(_=>X4(_,t));if(d==null||f==null||h==null)return null;var{dangerouslySetInnerHTML:p,ticks:g,scale:y}=e,x=zb(e,ine),{id:b,scale:w}=h,N=zb(h,sne);return S.createElement(e1,Ib({},x,N,{x:f.x,y:f.y,width:d.width,height:d.height,className:Xe("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:l,axisType:o,axisId:t}))},hne={allowDataOverflow:$t.allowDataOverflow,allowDecimals:$t.allowDecimals,allowDuplicatedCategory:$t.allowDuplicatedCategory,angle:$t.angle,axisLine:Ha.axisLine,height:$t.height,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:Ha.tickLine,tickSize:Ha.tickSize,type:$t.type,niceTicks:$t.niceTicks,xAxisId:0},mne=e=>{var t=fr(e,hne);return S.createElement(S.Fragment,null,S.createElement(dne,{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(fne,t))},Vp=S.memo(mne,i5);Vp.displayName="XAxis";var pne=["type"],gne=["dangerouslySetInnerHTML","ticks","scale"],yne=["id","scale"];function Bb(){return Bb=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},Bb.apply(null,arguments)}function e2(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 t2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e2(Object(r),!0).forEach(function(n){vne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vne(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=bne(e,"string");return typeof t=="symbol"?t:t+""}function bne(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 Ub(e,t){if(e==null)return{};var r,n,i=jne(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 jne(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 wne(e){var t=ct(),r=S.useRef(null),n=_3(),{type:i}=e,o=Ub(e,pne),l=Pp(n,"yAxis",i),d=S.useMemo(()=>{if(l!=null)return t2(t2({},o),{},{type:l})},[l,o]);return S.useLayoutEffect(()=>{d!=null&&(r.current===null?t(iee(d)):r.current!==d&&t(see({prev:r.current,next:d})),r.current=d)},[d,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(oee(r.current)),r.current=null)},[t]),null}function Sne(e){var{yAxisId:t,className:r,width:n,label:i}=e,o=S.useRef(null),l=S.useRef(null),d=ve(Uj),f=jr(),h=ct(),p="yAxis",g=ve(M=>CD(M,t)),y=ve(M=>kQ(M,t)),x=ve(M=>PD(M,p,t,f)),b=ve(M=>W4(M,t));if(S.useLayoutEffect(()=>{if(!(n!=="auto"||!g||Ww(i)||S.isValidElement(i)||b==null)){var M=o.current;if(M){var D=M.getCalculatedWidth();Math.round(g.width)!==Math.round(D)&&h(lee({id:t,width:D}))}}},[x,g,h,i,t,n,b]),g==null||y==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:N,scale:_}=e,E=Ub(e,gne),{id:C,scale:A}=b,T=Ub(b,yne);return S.createElement(e1,Bb({},E,T,{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:d,ticks:x,axisType:p,axisId:t}))}var Nne={allowDataOverflow:Lt.allowDataOverflow,allowDecimals:Lt.allowDecimals,allowDuplicatedCategory:Lt.allowDuplicatedCategory,angle:Lt.angle,axisLine:Ha.axisLine,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:Ha.tickLine,tickSize:Ha.tickSize,type:Lt.type,niceTicks:Lt.niceTicks,width:Lt.width,yAxisId:0},_ne=e=>{var t=fr(e,Nne);return S.createElement(S.Fragment,null,S.createElement(wne,{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(Sne,t))},Qp=S.memo(_ne,i5);Qp.displayName="YAxis";var One=(e,t)=>t,i1=Q([One,We,f4,Xt,QD,ti,aW,Vt],dW);function Ene(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function s1(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Ene(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=(d,f)=>({relativeX:Math.round((d-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(d=>l(d.clientX,d.clientY)):l(e.clientX,e.clientY)}var s5=on("mouseClick"),o5=bd();o5.startListening({actionCreator:s5,effect:(e,t)=>{var r=e.payload,n=i1(t.getState(),s1(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(WQ({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var qb=on("mouseMove"),l5=bd(),pl=null,_s=null,fx=null;l5.startListening({actionCreator:qb,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),fx=s1(r);var d=()=>{var f=t.getState(),h=Rd(f,f.tooltip.settings.shared);if(!fx){pl=null,_s=null;return}if(h==="axis"){var p=i1(f,fx);(p==null?void 0:p.activeIndex)!=null?t.dispatch(zD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(ID())}pl=null,_s=null};if(!l){d();return}i==="raf"?pl=requestAnimationFrame(d):typeof i=="number"&&_s===null&&(_s=setTimeout(d,i))}});function Ane(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 r2={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},u5=br({name:"rootProps",initialState:r2,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:r2.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}}}),Cne=u5.reducer,{updateOptions:Tne}=u5.actions,Pne=null,Mne={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)},c5=br({name:"polarOptions",initialState:Pne,reducers:Mne}),{updatePolarOptions:aue}=c5.actions,Rne=c5.reducer,d5=on("keyDown"),f5=on("focus"),h5=on("blur"),Xp=bd(),gl=null,Os=null,wh=null;Xp.startListening({actionCreator:d5,effect:(e,t)=>{wh=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 d=t.getState(),f=d.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:h}=d.tooltip,p=wh;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var g=Ec(h,lo(d),Zl(d),Jl(d)),y=g==null?-1:Number(g),x=!Number.isFinite(y)||y<0,b=ti(d),w=lo(d),N=Rd(d,d.tooltip.settings.shared);if(p==="Enter"){if(x)return;var _=Lm(d,N,"hover",String(h.index));t.dispatch($m({active:!h.active,activeIndex:h.index,activeCoordinate:_}));return}var E=BQ(d),C=E==="left-to-right"?1:-1,A=p==="ArrowRight"?1:-1,T;if(x){var M=Zl(d),D=Jl(d),R=A*C,z=Z=>({active:!1,index:String(Z),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(T=-1,R>0){for(var k=0;k<w.length;k++)if(Ec(z(k),w,M,D)!=null){T=k;break}}else for(var H=w.length-1;H>=0;H--)if(Ec(z(H),w,M,D)!=null){T=H;break}if(T<0)return}else{T=y+A*C;var U=(b==null?void 0:b.length)||w.length;if(U===0||T>=U||T<0)return}var ae=Lm(d,N,"hover",String(T));t.dispatch($m({active:!0,activeIndex:T.toString(),activeCoordinate:ae}))}finally{gl=null,Os=null}};if(!o){l();return}n==="raf"?gl=requestAnimationFrame(l):typeof n=="number"&&Os===null&&(l(),wh=null,Os=setTimeout(()=>{wh?l():(Os=null,gl=null)},n))}});Xp.startListening({actionCreator:f5,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),d=Lm(r,l,"hover",String(o));t.dispatch($m({active:!0,activeIndex:o,activeCoordinate:d}))}}}});Xp.startListening({actionCreator:h5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch($m({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function m5(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"),p5=bd(),Sh=new Map,bc=new Map,hx=new Map;p5.startListening({actionCreator:jn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,o=m5(n);hx.set(i,{handler:r,reactEvent:o});var l=Sh.get(i);l!==void 0&&(cancelAnimationFrame(l),Sh.delete(i));var d=t.getState(),{throttleDelay:f,throttledEvents:h}=d.eventSettings,p=h,g=p==="all"||(p==null?void 0:p.includes(i)),y=bc.get(i);y!==void 0&&(typeof f!="number"||!g)&&(clearTimeout(y),bc.delete(i));var x=()=>{var N=hx.get(i);try{if(!N)return;var{handler:_,reactEvent:E}=N,C=t.getState(),A={activeCoordinate:qX(C),activeDataKey:JD(C),activeIndex:uo(C),activeLabel:ZD(C),activeTooltipIndex:uo(C),isTooltipActive:FX(C)};_&&_(A,E)}finally{Sh.delete(i),bc.delete(i),hx.delete(i)}};if(!g){x();return}if(f==="raf"){var b=requestAnimationFrame(x);Sh.set(i,b)}else if(typeof f=="number"){if(!bc.has(i)){x();var w=setTimeout(x,f);bc.set(i,w)}}else x()}}});var Dne=Q([cu],e=>e.tooltipItemPayloads),kne=Q([Dne,(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)}}}),g5=on("touchMove"),y5=bd(),Es=null,Ai=null,n2=null,jc=null;y5.startListening({actionCreator:g5,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){jc=m5(r);var n=t.getState(),{throttleDelay:i,throttledEvents:o}=n.eventSettings,l=o==="all"||o.includes("touchmove");Es!==null&&(cancelAnimationFrame(Es),Es=null),Ai!==null&&(typeof i!="number"||!l)&&(clearTimeout(Ai),Ai=null),n2=Array.from(r.touches).map(f=>s1({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var d=()=>{if(jc!=null){var f=t.getState(),h=Rd(f,f.tooltip.settings.shared);if(h==="axis"){var p,g=(p=n2)===null||p===void 0?void 0:p[0];if(g==null){Es=null,Ai=null;return}var y=i1(f,g);(y==null?void 0:y.activeIndex)!=null&&t.dispatch(zD({activeIndex:y.activeIndex,activeDataKey:void 0,activeCoordinate:y.activeCoordinate}))}else if(h==="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(H7),_=(x=w.getAttribute(K7))!==null&&x!==void 0?x:void 0,E=bo(f).find(T=>T.id===_);if(N==null||E==null||_==null)return;var{dataKey:C}=E,A=kne(f,N,_);t.dispatch(LD({activeDataKey:C,activeIndex:N,activeCoordinate:A,activeGraphicalItemId:_}))}Es=null,Ai=null}};if(!l){d();return}i==="raf"?Es=requestAnimationFrame(d):typeof i=="number"&&Ai===null&&(d(),jc=null,Ai=setTimeout(()=>{jc?d():(Ai=null,Es=null)},i))}}});var v5={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},x5=br({name:"eventSettings",initialState:v5,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:$ne}=x5.actions,Lne=x5.reducer,Ine=FR({brush:Aee,cartesianAxis:uee,chartData:UW,errorBars:Ete,eventSettings:Lne,graphicalItems:UJ,layout:O7,legend:IF,options:$W,polarAxis:uJ,polarOptions:Rne,referenceElements:Mee,renderedTicks:Qee,rootProps:Cne,tooltip:ZQ,zIndex:NW}),zne=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Wq({reducer:Ine,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([o5.middleware,l5.middleware,Xp.middleware,p5.middleware,y5.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(a3({type:"raf"}))},devTools:{serialize:{replacer:Ane},name:"recharts-".concat(r)}})};function Bne(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=jr(),o=S.useRef(null);if(i)return r;o.current==null&&(o.current=zne(t,n));var l=Dj;return S.createElement(eH,{context:l,store:o.current},r)}function Une(e){var{layout:t,margin:r}=e,n=ct(),i=jr();return S.useEffect(()=>{i||(n(S7(t)),n(w7(r)))},[n,i,t,r]),null}var qne=S.memo(Une,ru);function Fne(e){var t=ct();return S.useEffect(()=>{t(Tne(e))},[t,e]),null}var Hne=e=>{var t=ct();return S.useEffect(()=>{t($ne(e))},[t,e]),null},Kne=S.memo(Hne,ru);function a2(e){var{zIndex:t,isPanorama:r}=e,n=S.useRef(null),i=ct();return S.useLayoutEffect(()=>(n.current&&i(wW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(SW({zIndex:t,isPanorama:r}))}),[i,t,r]),S.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function i2(e){var{children:t,isPanorama:r}=e,n=ve(hW);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(a2,{key:l,zIndex:l,isPanorama:r})),t,o.map(l=>S.createElement(a2,{key:l,zIndex:l,isPanorama:r})))}var Gne=["children"];function Yne(e,t){if(e==null)return{};var r,n,i=Vne(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 Vne(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 Hm(){return Hm=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},Hm.apply(null,arguments)}var Qne={width:"100%",height:"100%",display:"block"},Xne=S.forwardRef((e,t)=>{var r=Kj(),n=Gj(),i=$3();if(!ca(r)||!ca(n))return null;var{children:o,otherAttributes:l,title:d,desc:f}=e,h,p;return l!=null&&(typeof l.tabIndex=="number"?h=l.tabIndex:h=i?0:void 0,typeof l.role=="string"?p=l.role:p=i?"application":void 0),S.createElement(Nj,Hm({},l,{title:d,desc:f,role:p,tabIndex:h,width:r,height:n,style:Qne,ref:t}),o)}),Wne=e=>{var{children:t}=e,r=ve(wp);if(!r)return null;var{width:n,height:i,y:o,x:l}=r;return S.createElement(Nj,{width:n,height:i,x:l,y:o},t)},s2=S.forwardRef((e,t)=>{var{children:r}=e,n=Yne(e,Gne),i=jr();return i?S.createElement(Wne,null,S.createElement(i2,{isPanorama:!0},r)):S.createElement(Xne,Hm({ref:t},n),S.createElement(i2,{isPanorama:!1},r))});function Zne(){var e=ct(),[t,r]=S.useState(null),n=ve(F7);return S.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;Be(o)&&o!==n&&e(_7(o))}},[t,e,n]),r}function o2(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 Jne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o2(Object(r),!0).forEach(function(n){eae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eae(e,t,r){return(t=tae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tae(e){var t=rae(e,"string");return typeof t=="symbol"?t:t+""}function rae(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 nae=()=>(XW(),null);function Km(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var aae=S.forwardRef((e,t)=>{var r,n,i=S.useRef(null),[o,l]=S.useState({containerWidth:Km((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Km((n=e.style)===null||n===void 0?void 0:n.height)}),d=S.useCallback((h,p)=>{l(g=>{var y=Math.round(h),x=Math.round(p);return g.containerWidth===y&&g.containerHeight===x?g:{containerWidth:y,containerHeight:x}})},[]),f=S.useCallback(h=>{if(typeof t=="function"&&t(h),i.current!=null&&(i.current.disconnect(),i.current=null),h!=null&&typeof ResizeObserver<"u"){var{width:p,height:g}=h.getBoundingClientRect();d(p,g);var y=b=>{var w=b[0];if(w!=null){var{width:N,height:_}=w.contentRect;d(N,_)}},x=new ResizeObserver(y);x.observe(h),i.current=x}},[t,d]);return S.useEffect(()=>()=>{var h=i.current;h!=null&&h.disconnect()},[d]),S.createElement(S.Fragment,null,S.createElement(wd,{width:o.containerWidth,height:o.containerHeight}),S.createElement("div",Wi({ref:f},e)))}),iae=S.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,o]=S.useState({containerWidth:Km(r),containerHeight:Km(n)}),l=S.useCallback((f,h)=>{o(p=>{var g=Math.round(f),y=Math.round(h);return p.containerWidth===g&&p.containerHeight===y?p:{containerWidth:g,containerHeight:y}})},[]),d=S.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:p}=f.getBoundingClientRect();l(h,p)}},[t,l]);return S.createElement(S.Fragment,null,S.createElement(wd,{width:i.containerWidth,height:i.containerHeight}),S.createElement("div",Wi({ref:d},e)))}),sae=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return S.createElement(S.Fragment,null,S.createElement(wd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))}),oae=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?S.createElement(iae,Wi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?S.createElement(sae,Wi({},e,{width:r,height:n,ref:t})):S.createElement(S.Fragment,null,S.createElement(wd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))});function lae(e){return e?aae:oae}var uae=S.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:o,onContextMenu:l,onDoubleClick:d,onMouseDown:f,onMouseEnter:h,onMouseLeave:p,onMouseMove:g,onMouseUp:y,onTouchEnd:x,onTouchMove:b,onTouchStart:w,style:N,width:_,responsive:E,dispatchTouchEvents:C=!0}=e,A=S.useRef(null),T=ct(),[M,D]=S.useState(null),[R,z]=S.useState(null),k=Zne(),H=qj(),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=>{T(s5(te)),T(jn({handler:o,reactEvent:te}))},[T,o]),$=S.useCallback(te=>{T(qb(te)),T(jn({handler:h,reactEvent:te}))},[T,h]),F=S.useCallback(te=>{T(ID()),T(jn({handler:p,reactEvent:te}))},[T,p]),J=S.useCallback(te=>{T(qb(te)),T(jn({handler:g,reactEvent:te}))},[T,g]),re=S.useCallback(()=>{T(f5())},[T]),oe=S.useCallback(()=>{T(h5())},[T]),L=S.useCallback(te=>{T(d5(te.key))},[T]),X=S.useCallback(te=>{T(jn({handler:l,reactEvent:te}))},[T,l]),le=S.useCallback(te=>{T(jn({handler:d,reactEvent:te}))},[T,d]),ue=S.useCallback(te=>{T(jn({handler:f,reactEvent:te}))},[T,f]),pe=S.useCallback(te=>{T(jn({handler:y,reactEvent:te}))},[T,y]),xe=S.useCallback(te=>{T(jn({handler:w,reactEvent:te}))},[T,w]),we=S.useCallback(te=>{C&&T(g5(te)),T(jn({handler:b,reactEvent:te}))},[T,C,b]),_e=S.useCallback(te=>{T(jn({handler:x,reactEvent:te}))},[T,x]),de=lae(E);return S.createElement(sk.Provider,{value:M},S.createElement(aR.Provider,{value:R},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:Jne({position:"relative",cursor:"default",width:U,height:ae},N),onClick:G,onContextMenu:X,onDoubleClick:le,onFocus:re,onBlur:oe,onKeyDown:L,onMouseDown:ue,onMouseEnter:$,onMouseLeave:F,onMouseMove:J,onMouseUp:pe,onTouchEnd:_e,onTouchMove:we,onTouchStart:xe,ref:Z},S.createElement(nae,null),r)))}),cae=["width","height","responsive","children","className","style","compact","title","desc"];function dae(e,t){if(e==null)return{};var r,n,i=fae(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 fae(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 hae=S.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:o,className:l,style:d,compact:f,title:h,desc:p}=e,g=dae(e,cae),y=zn(g);return f?S.createElement(S.Fragment,null,S.createElement(wd,{width:r,height:n}),S.createElement(s2,{otherAttributes:y,title:h,desc:p},o)):S.createElement(uae,{className:l,style:d,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(s2,{otherAttributes:y,title:h,desc:p,ref:t},S.createElement(Dee,null,o)))});function Fb(){return Fb=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},Fb.apply(null,arguments)}function l2(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 mae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(r),!0).forEach(function(n){pae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pae(e,t,r){return(t=gae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gae(e){var t=yae(e,"string");return typeof t=="symbol"?t:t+""}function yae(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 vae={top:5,right:5,bottom:5,left:5},xae=mae({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:vae,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},v5),b5=S.forwardRef(function(t,r){var n,i=fr(t.categoricalChartProps,xae),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,p={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,eventEmitter:void 0};return S.createElement(Bne,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},S.createElement(Eee,{chartData:h.data}),S.createElement(qne,{layout:i.layout,margin:i.margin}),S.createElement(Kne,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),S.createElement(Fne,{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(hae,Fb({},i,{ref:r})))}),bae=["axis"],jae=S.forwardRef((e,t)=>S.createElement(b5,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:bae,tooltipPayloadSearcher:ok,categoricalChartProps:e,ref:t})),wae=["axis","item"],j5=S.forwardRef((e,t)=>S.createElement(b5,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:wae,tooltipPayloadSearcher:ok,categoricalChartProps:e,ref:t}));const w5="Uncategorized";function S5(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:w5}function Sae(e,t){const r=new Map,n=o=>{const l=r.get(o);if(l)return l;const d={results:[],suites:new Set,children:new Set};return r.set(o,d),d};for(const o of e){const l=S5(o.category),d=o.suite??"Uncategorized",f=Nae(l);for(const h of f){const p=n(h);p.results.push(o),p.suites.add(d)}for(let h=1;h<f.length;h++)n(f[h-1]).children.add(f[h])}const i=new Map([...r.entries()].map(([o,l])=>[o,Eae(o,l,t)]));return[...i.values()].filter(o=>!o.parent).sort(_5).map(o=>N5(o,r,i))}function Nae(e){const t=e.split("/").filter(r=>r.length>0);return t.length===0?[w5]:t.map((r,n)=>t.slice(0,n+1).join("/"))}function _ae(e){const t=e.split("/");return t.length>1?t.slice(0,-1).join("/"):void 0}function Oae(e){return e.split("/").at(-1)??e}function Eae(e,t,r){const n=np(t.results,r),i=_ae(e);return{name:e,label:Oae(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 N5(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(_5).map(o=>N5(o,t,r));return{...e,children:n}}function _5(e,t){return e.name.localeCompare(t.name)}const Ri="",Hb=[{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}],mx=10;function Aae(e,t,r=new Date){const n=Cae(e),i=Pae(e,n),o=Mae(n.flatMap(g=>g.category?kae(g.category):[])),l=o.length>0,d=n.some(g=>g.startedAtMs!==void 0),f=Hb.find(g=>g.value===t.timePeriod)??Hb[0],h=f.windowMs===void 0?void 0:r.getTime()-f.windowMs,p=n.filter(g=>t.experiment&&g.experiment!==t.experiment||t.category&&!$ae(g.category,t.category)?!1:h!==void 0?g.startedAtMs!==void 0&&g.startedAtMs>=h:!0);return{buckets:Rae(p.map(g=>g.score)),experimentOptions:i,categoryOptions:o,totalScores:n.length,filteredScores:p.length,categoryAvailable:l,hasTimestampedScores:d}}function Cae(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>Tae(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=O5(r,t.experiment);return n?[n]:[]}))}function Tae(e){const t=Lae(e.started_at);return e.tests.flatMap(r=>{const n=O5(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function O5(e,t){if(!Number.isFinite(e.score))return;const r=Dae(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function Pae(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 Mae(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 Rae(e){if(e.length===0)return[];const t=Array.from({length:mx},(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*mx),mx-1);t[i].count++}return t}function Dae(e){const t=e==null?void 0:e.trim();return t?S5(t):void 0}function kae(e){const t=e.split("/").filter(r=>r.length>0);return t.map((r,n)=>t.slice(0,n+1).join("/"))}function $ae(e,t){return e!==void 0&&(e===t||e.startsWith(`${t}/`))}function Lae(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"},u2=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function Iae(e){return u2[e%u2.length]}function zae({data:e,projectId:t}){const[r,n]=S.useState(!0),[i,o]=S.useState(""),l=e.targets,d=Ue(t?IM(t,i||void 0):u6(i||void 0)),f=i?d.data:void 0,h=S.useMemo(()=>Kae(e.runs??[]),[e.runs]);return c.jsxs("div",{className:"rounded-lg border border-gray-800",children:[c.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:[c.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Analytics"}),c.jsx("span",{className:"text-xs text-gray-500",children:r?"▸ Show":"▾ Hide"})]}),!r&&c.jsxs("div",{className:"space-y-6 border-t border-gray-800 px-4 py-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("label",{htmlFor:"baseline-select",className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Baseline provider/model"}),c.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:[c.jsx("option",{value:"",children:"Select a baseline…"}),l.map(p=>c.jsx("option",{value:p,children:p},p))]}),i&&d.isLoading&&c.jsx("span",{className:"text-xs text-gray-500",children:"Loading…"})]}),i&&f&&c.jsx(Bae,{data:f,baseline:i}),i&&f&&c.jsx(Uae,{data:f,baseline:i}),c.jsx(qae,{data:e}),h.length>1&&l.length>0&&c.jsx(Gae,{data:h,targets:l}),!i&&c.jsx("p",{className:"text-xs text-gray-500",children:"Select a baseline provider/model above to see gain and delta charts."})]})]})}function o1({active:e,payload:t,label:r}){return!e||!(t!=null&&t.length)?null:c.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-xs shadow-xl",children:[r&&c.jsx("div",{className:"mb-1 font-medium text-gray-300",children:r}),t.map((n,i)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),c.jsxs("span",{className:"text-gray-400",children:[n.name,":"]}),c.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 c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-400",children:e}),t]})}function Bae({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 c.jsx(nd,{title:"Normalized Gain (g)",children:c.jsx("p",{className:"text-xs text-gray-500",children:"No gain data available. Ensure multiple provider/model labels exist."})});const n=r.map(i=>({name:`${i.target} · ${i.experiment}`,g:i.g??0,isNull:i.g===null}));return c.jsx(nd,{title:"Normalized Gain (g)",children:c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:c.jsx(Fj,{width:"100%",height:Math.max(200,n.length*32),children:c.jsxs(j5,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[c.jsx(Yp,{strokeDasharray:"3 3",stroke:_t.gridLine,horizontal:!1}),c.jsx(Vp,{type:"number",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),c.jsx(Qp,{type:"category",dataKey:"name",tick:{fill:_t.labelText,fontSize:11},width:120,axisLine:{stroke:_t.gridLine}}),c.jsx(Vw,{content:c.jsx(o1,{})}),c.jsx(a1,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>c.jsx(Qw,{fill:i.isNull?_t.gray:i.g>0?_t.green:i.g<0?_t.red:_t.gray},i.name))})]})})})})}function Uae({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:c.jsx(nd,{title:"Regressions vs. Baseline",children:c.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("table",{className:"w-full text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Provider/Model"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg Score"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Delta"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"g"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(n=>{var i;return c.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[c.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n.experiment}),c.jsx("td",{className:"px-4 py-3 text-gray-300",children:n.target}),c.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[Math.round(n.avg_score*100),"%"]}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:(i=n.delta)==null?void 0:i.toFixed(3)}),c.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 c2={experiment:Ri,category:Ri,timePeriod:"all"};function qae({data:e}){const[t,r]=S.useState(c2),n=S.useMemo(()=>Aae(e,t),[e,t]);S.useEffect(()=>{r(h=>{const p=!h.experiment||n.experimentOptions.some(x=>x.value===h.experiment),g=!h.category||n.categoryOptions.some(x=>x.value===h.category),y=h.timePeriod==="all"||n.hasTimestampedScores;return p&&g&&y?h:{experiment:p?h.experiment:Ri,category:g?h.category:Ri,timePeriod:y?h.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(h,p)=>{r(g=>({...g,[h]:p}))},o=()=>r(c2),l=t.experiment!==Ri||t.category!==Ri||t.timePeriod!=="all",d=n.totalScores>0,f=Hae(n,t);return c.jsx(nd,{title:"Score Distribution",children:c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 px-3 py-3",children:[c.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[c.jsxs(px,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:h=>i("experiment",h),disabled:n.experimentOptions.length===0,children:[c.jsx("option",{value:Ri,children:"All experiments"}),n.experimentOptions.map(h=>c.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),c.jsxs(px,{id:"score-distribution-category",label:"Category",value:t.category,onChange:h=>i("category",h),disabled:!n.categoryAvailable,help:n.categoryAvailable||!d?void 0:"Category metadata is not present in these compare results.",children:[c.jsx("option",{value:Ri,children:"All categories"}),n.categoryOptions.map(h=>c.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),c.jsx(px,{id:"score-distribution-time",label:"Time period",value:t.timePeriod,onChange:h=>i("timePeriod",h),disabled:!n.hasTimestampedScores,help:n.hasTimestampedScores||!d?void 0:"Recent windows need run timestamps from compare data.",children:Hb.map(h=>c.jsx("option",{value:h.value,children:h.label},h.value))})]}),c.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:[c.jsxs("span",{className:"tabular-nums text-gray-400",children:["Showing ",c.jsx("span",{className:"text-gray-200",children:n.filteredScores})," of"," ",c.jsx("span",{className:"text-gray-200",children:n.totalScores})," scores"]}),l&&c.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?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:c.jsx(Fj,{width:"100%",height:200,children:c.jsxs(j5,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[c.jsx(Yp,{strokeDasharray:"3 3",stroke:_t.gridLine,vertical:!1}),c.jsx(Vp,{dataKey:"range",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),c.jsx(Qp,{tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),c.jsx(Vw,{content:c.jsx(o1,{})}),c.jsx(a1,{dataKey:"count",name:"Tests",fill:_t.cyan,radius:[2,2,0,0]})]})})}):c.jsx(Fae,{message:f})]})})}function px({id:e,label:t,value:r,onChange:n,disabled:i,help:o,children:l}){return c.jsxs("div",{className:"min-w-0 space-y-1",children:[c.jsx("label",{htmlFor:e,className:"block text-xs font-medium uppercase tracking-wider text-gray-500",children:t}),c.jsx("select",{id:e,value:r,disabled:i,onChange:d=>n(d.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&&c.jsx("p",{className:"text-xs leading-5 text-gray-500",children:o})]})}function Fae({message:e}){return c.jsx("div",{className:"rounded-lg border border-dashed border-gray-800 bg-gray-900/20 px-4 py-8 text-center",children:c.jsx("p",{className:"text-sm text-gray-400",children:e})})}function Hae(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 Kae(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,d]of o)i[l]=Math.round(d.scoreSum/d.count*1e3)/1e3;return i})}function Gae({data:e,targets:t}){return c.jsx(nd,{title:"Score Trend Over Time",children:c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:c.jsx(Fj,{width:"100%",height:250,children:c.jsxs(jae,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[c.jsx(Yp,{strokeDasharray:"3 3",stroke:_t.gridLine}),c.jsx(Vp,{dataKey:"date",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),c.jsx(Qp,{domain:[0,1],tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),c.jsx(Vw,{content:c.jsx(o1,{})}),c.jsx(D3,{wrapperStyle:{fontSize:12,color:_t.labelText}}),t.map((r,n)=>c.jsx(e5,{type:"monotone",dataKey:r,stroke:Iae(n),strokeWidth:2,dot:{r:3},connectNulls:!0},r))]})})})})}function Fr({rate:e}){const t=Math.round(e*100);return c.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[c.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${t}%`}}),c.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[t,"%"]})]})}function E5({data:e,isLoading:t,isError:r,error:n,projectId:i,defaultProviderModelDisplayMode:o="all"}){var p;const[l,d]=S.useState("aggregated"),f=((p=e==null?void 0:e.runs)==null?void 0:p.length)??0,h=e&&e.cells.length>0;return c.jsxs("div",{className:"space-y-4",children:[c.jsx(Yae,{mode:l,onModeChange:d,runsCount:f}),t&&c.jsx(gie,{}),!t&&r&&n&&c.jsx(mie,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!h&&c.jsx(pie,{}),!t&&!r&&h&&e&&c.jsxs(c.Fragment,{children:[l==="aggregated"&&c.jsx(Qae,{data:e,projectId:i,defaultProviderModelDisplayMode:o}),l==="per-run"&&c.jsx(eie,{data:e})]})]})}function Yae({mode:e,onModeChange:t,runsCount:r}){return c.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-semibold text-white",children:"Analyze runs"}),c.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Study one experiment against another, or pit individual runs head-to-head."})]}),c.jsx(Vae,{mode:e,onChange:t,runsCount:r})]})}function Vae({mode:e,onChange:t,runsCount:r}){const n=r===0;return c.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:[c.jsx(d2,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),c.jsxs(d2,{active:e==="per-run",onClick:()=>t("per-run"),disabled:n,title:n?"No runs available":void 0,children:["Per run",r>0&&c.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 d2({active:e,onClick:t,disabled:r,title:n,children:i}){return c.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 Qae({data:e,projectId:t,defaultProviderModelDisplayMode:r}){const{experiments:n,targets:i,cells:o}=e,l=S.useMemo(()=>{const f=new Map;for(const h of o)f.set(`${h.experiment}::${h.target}`,h);return f},[o]),d=S.useMemo(()=>(e.runs??[]).some(f=>$d(f).length>1),[e.runs]);return n.length<=1&&i.length<=1?c.jsx(Wp,{headline:"Not enough variation to compare",body:`The aggregated matrix requires at least 2 experiments or 2 provider/model labels. Currently ${n.length} experiment(s) and ${i.length} provider/model label(s).`}):c.jsxs("div",{className:"space-y-3",children:[d&&c.jsx(nie,{data:e,projectId:t,defaultDisplayMode:r}),c.jsx(hie,{}),c.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("table",{className:"w-full text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:c.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Provider/Model ↓ / Experiment →"})}),n.map(f=>c.jsx("th",{className:"px-4 py-3 font-medium text-gray-300",children:f},f))]})}),c.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(f=>c.jsx(Xae,{target:f,experiments:n,cellMap:l},f))})]})}),c.jsx(zae,{data:e,projectId:t})]})}function Xae({target:e,experiments:t,cellMap:r}){return c.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[c.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:e}),t.map(n=>{const i=r.get(`${n}::${e}`);return c.jsx("td",{className:"px-4 py-3",children:i?c.jsx(Wae,{cell:i}):c.jsx(Zae,{})},n)})]})}function Wae({cell:e}){const[t,r]=S.useState(!1),n=Math.round(e.avg_score*100),i=Bc(e),o=ur(e);return c.jsxs("div",{className:"space-y-2",children:[c.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:[c.jsx(Fr,{rate:e.pass_rate}),c.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums text-gray-500",children:[c.jsxs("span",{children:[c.jsx("span",{className:"text-emerald-400",children:e.passed_count}),c.jsx("span",{className:"text-gray-600",children:" / "}),c.jsx("span",{children:i})]}),c.jsx("span",{className:"text-gray-700",children:"·"}),c.jsxs("span",{children:["avg ",n,"%"]}),o>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-gray-700",children:"·"}),c.jsxs("span",{className:"text-amber-400",children:[o," errors"]})]})]})]}),t&&c.jsx(Jae,{tests:e.tests})]})}function Zae(){return c.jsx("div",{className:"text-center text-gray-600",children:"—"})}function Jae({tests:e}){return c.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2",children:[c.jsx("div",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Test cases"}),c.jsx("ul",{className:"space-y-1",children:e.map(t=>{const r=t.execution_status==="execution_error";return c.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[c.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"}`}),c.jsx("span",{className:"flex-1 truncate text-gray-300",title:t.test_id,children:t.test_id}),c.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 eie({data:e}){const t=e.runs??[],[r,n]=S.useState(new Set),[i,o]=S.useState(!1),l=h=>{n(p=>{const g=new Set(p);return g.has(h)?g.delete(h):g.add(h),g})},d=()=>n(new Set),f=S.useMemo(()=>t.filter(h=>r.has(h.run_id)),[t,r]);return t.length===0?c.jsx(Wp,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):i&&f.length>=2?c.jsx(rie,{runs:f,onBack:()=>o(!1)}):c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:c.jsxs("span",{children:[c.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"]})}),c.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("table",{className:"w-full text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Provider/Model"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-800/50",children:t.map(h=>c.jsx(tie,{run:h,checked:r.has(h.run_id),onToggle:()=>l(h.run_id)},h.run_id))})]})}),r.size>0&&c.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:[c.jsxs("div",{className:"text-sm text-gray-300",children:[c.jsx("span",{className:"font-semibold tabular-nums text-cyan-400",children:r.size})," ","selected"]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:d,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"}),c.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,c.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function tie({run:e,checked:t,onToggle:r}){const n=Math.round(e.avg_score*100),i=Bc(e),o=ur(e),l=yie(e.run_id);return c.jsxs("tr",{className:`transition-colors ${t?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[c.jsx("td",{className:"px-3 py-3 align-middle",children:c.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}`})}),c.jsxs("td",{className:"px-4 py-3 align-middle",title:e.run_id,children:[c.jsx("div",{className:"font-medium text-gray-200 tabular-nums",children:l1(e.started_at)}),l&&c.jsx("div",{className:"text-xs text-gray-500",children:l})]}),c.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.experiment}),c.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:c.jsx(sie,{run:e})}),c.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[c.jsx("div",{children:i}),o>0&&c.jsxs("div",{className:"text-xs text-amber-400",children:[o," errors"]})]}),c.jsx("td",{className:"px-4 py-3 align-middle",children:c.jsx(Fr,{rate:e.pass_rate})}),c.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[n,"%"]})]})}function rie({runs:e,onBack:t}){const r=S.useMemo(()=>{const i=new Set,o=[];for(const l of e)for(const d of l.tests)i.has(d.test_id)||(i.add(d.test_id),o.push(d.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 c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.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:[c.jsx("span",{"aria-hidden":!0,children:"←"})," Back to runs"]}),c.jsxs("span",{className:"text-sm text-gray-500",children:[e.length," runs · ",r.length," tests"]})]}),c.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("table",{className:"w-full text-left text-sm",children:[c.jsxs("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:[c.jsxs("tr",{children:[c.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=>c.jsx("th",{className:"px-4 py-3 align-bottom",children:c.jsx(fie,{run:i})},i.run_id))]}),c.jsxs("tr",{className:"border-t border-gray-800/50 bg-gray-900/30",children:[c.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=>c.jsx("th",{className:"px-4 py-2",children:c.jsx(Fr,{rate:i.pass_rate})},i.run_id))]})]}),c.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(i=>c.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[c.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 d=o.get(i),f=e[l].run_id;return d?c.jsx("td",{className:"px-4 py-3",children:c.jsx("div",{className:"flex items-center gap-2",children:d.execution_status==="execution_error"?c.jsxs(c.Fragment,{children:[c.jsx("span",{"aria-hidden":!0,className:"h-1.5 w-1.5 rounded-full bg-amber-400"}),c.jsx("span",{className:"tabular-nums text-amber-400",children:"error"})]}):c.jsxs(c.Fragment,{children:[c.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${d.passed?"bg-emerald-400":"bg-red-400"}`}),c.jsxs("span",{className:`tabular-nums ${d.passed?"text-emerald-400":"text-red-400"}`,children:[Math.round(d.score*100),"%"]})]})})},f):c.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},f)})]},i))})]})})]})}function nie({data:e,projectId:t,defaultDisplayMode:r}){const[n,i]=S.useState(r),o=S.useMemo(()=>(e.runs??[]).find(f=>$d(f).length>1),[e.runs]),l=S.useMemo(()=>o?oie(o):null,[o]),d=S.useMemo(()=>l?n==="all"?l.rows:l.rows.filter(f=>lie(f,l.providerLabels)):[],[n,l]);return!o||!l?null:c.jsxs("section",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-950/40 p-4",children:[c.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-base font-semibold text-white",children:"Provider/model comparison"}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[o.experiment," · ",l1(o.started_at)]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsx(aie,{mode:n,onChange:i}),c.jsx(Fr,{rate:o.pass_rate})]})]}),d.length>0?c.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"sticky left-0 z-10 w-52 bg-gray-900/90 px-4 py-3 font-medium text-gray-400 backdrop-blur",children:"Test case"}),l.providerLabels.map(f=>c.jsx("th",{className:"min-w-[240px] px-4 py-3 font-medium text-gray-300",children:f},f))]})}),c.jsx("tbody",{className:"divide-y divide-gray-800/50",children:d.map(f=>c.jsxs("tr",{className:"align-top transition-colors hover:bg-gray-900/30",children:[c.jsx("td",{className:"sticky left-0 z-10 bg-gray-950/90 px-4 py-3 font-medium text-gray-200 backdrop-blur",children:f.testId}),l.providerLabels.map(h=>c.jsx("td",{className:"px-4 py-3",children:c.jsx(iie,{run:o,result:f.resultsByProvider.get(h),projectId:t})},h))]},f.testId))})]})}):c.jsx(Wp,{headline:"All compared rows match",body:"Switch back to All rows to inspect the full provider/model table."})]})}function aie({mode:e,onChange:t}){return c.jsxs("fieldset",{className:"inline-flex items-center rounded-lg border border-gray-800 bg-gray-900/50 p-1",children:[c.jsx("legend",{className:"sr-only",children:"Provider/model rows"}),c.jsx(f2,{active:e==="all",onClick:()=>t("all"),children:"All"}),c.jsx(f2,{active:e==="differing",onClick:()=>t("differing"),children:"Differing"})]})}function f2({active:e,onClick:t,children:r}){return c.jsx("button",{type:"button","aria-pressed":e,onClick:t,className:`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${e?"bg-gray-800 text-cyan-400 shadow-sm":"text-gray-400 hover:text-gray-200"}`,children:r})}function iie({run:e,result:t,projectId:r}){if(!t)return c.jsx("div",{className:"text-center text-gray-600",children:"—"});const n=t.execution_status==="execution_error",i=n?"error":`${Math.round(t.score*100)}%`;return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${n?"bg-amber-400":t.passed?"bg-emerald-400":"bg-red-400"}`}),c.jsx("span",{className:`tabular-nums ${n?"text-amber-400":t.passed?"text-emerald-400":"text-red-400"}`,children:i}),t.duration_ms!==void 0&&c.jsx("span",{className:"text-xs tabular-nums text-gray-500",children:die(t.duration_ms)})]}),t.answer?c.jsx("pre",{className:"max-h-28 overflow-auto whitespace-pre-wrap rounded-md border border-gray-800 bg-gray-950 px-3 py-2 text-xs leading-relaxed text-gray-300",children:t.answer}):c.jsx("div",{className:"rounded-md border border-gray-800 bg-gray-950 px-3 py-2 text-xs text-gray-500",children:"No answer captured"}),c.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[c.jsx(gx,{run:e,result:t,path:t.answer_path,projectId:r,children:"Answer"}),c.jsx(gx,{run:e,result:t,path:t.grading_path,projectId:r,children:"Grading"}),c.jsx(gx,{run:e,result:t,path:t.transcript_path,projectId:r,children:"Transcript"})]})]})}function gx({run:e,result:t,path:r,projectId:n,children:i}){if(!r)return null;const o=cie(e,t,r,n);return c.jsx("a",{className:"text-cyan-400 transition-colors hover:text-cyan-300",href:o,target:"_blank",rel:"noreferrer",children:i})}function sie({run:e}){const t=$d(e);return t.length<=1?c.jsx(c.Fragment,{children:e.target}):c.jsxs("div",{children:[c.jsxs("div",{children:[t.length," providers"]}),c.jsx("div",{className:"mt-0.5 max-w-[18rem] truncate text-xs text-gray-500",title:t.join(", "),children:t.join(", ")})]})}function $d(e){var r;const t=new Set;for(const n of e.targets??[])n.trim()&&t.add(n);for(const n of e.tests){const i=(r=n.target)==null?void 0:r.trim();i&&t.add(i)}return[...t].sort()}function oie(e){var n;const t=$d(e);if(t.length<=1)return null;const r=new Map;for(const i of e.tests){const o=(n=i.target)==null?void 0:n.trim();if(!o)continue;const l=r.get(i.test_id)??new Map;l.set(o,i),r.set(i.test_id,l)}return{providerLabels:t,rows:[...r.entries()].map(([i,o])=>({testId:i,resultsByProvider:o}))}}function lie(e,t){const r=new Set;for(const n of t)if(r.add(uie(e.resultsByProvider.get(n))),r.size>1)return!0;return!1}function uie(e){return e?JSON.stringify({answer:e.answer??"",output:yx(e,"output"),passed:e.passed,score:e.score,state:e.execution_status??"",error:yx(e,"error"),errorKind:yx(e,"target_error_kind")}):"missing"}function yx(e,t){const r=e[t];return typeof r=="string"?r:""}function cie(e,t,r,n){const i=n?`/api/projects/${encodeURIComponent(n)}/runs`:"/api/runs",o=new URLSearchParams({raw:"1"});return t.result_dir&&o.set("result_dir",t.result_dir),`${i}/${encodeURIComponent(e.run_id)}/evals/${encodeURIComponent(t.test_id)}/files/${encodeURIComponent(r)}?${o.toString()}`}function die(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}function fie({run:e}){return c.jsxs("div",{className:"min-w-[140px] space-y-1",children:[c.jsx("div",{className:"text-sm font-medium text-gray-200 tabular-nums",title:e.run_id,children:l1(e.started_at)}),c.jsxs("div",{className:"text-xs text-gray-500",children:[e.experiment," · ",$d(e).join(", ")||e.target]})]})}function hie(){return c.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[c.jsx(Nh,{className:"bg-emerald-400",label:"80%+"}),c.jsx(Nh,{className:"bg-yellow-400",label:"50–80%"}),c.jsx(Nh,{className:"bg-red-400",label:"< 50%"}),c.jsx(Nh,{className:"bg-gray-700",label:"no data"})]})}function Nh({className:e,label:t}){return c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:`h-2 w-2 rounded-full ${e}`,"aria-hidden":!0}),c.jsx("span",{children:t})]})}function mie({message:e}){return c.jsx("div",{className:"rounded-lg border border-red-900/60 bg-red-950/30 p-4 text-sm text-red-400",children:e})}function pie(){return c.jsx(Wp,{headline:"No comparison data yet",body:"Run evaluations with different experiment and provider/model combinations to populate this view."})}function Wp({headline:e,body:t}){return c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[c.jsx("p",{className:"text-lg text-gray-300",children:e}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:t})]})}function gie(){return c.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:c.jsxs("div",{className:"animate-pulse",children:[c.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:c.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>c.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[c.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}function l1(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 yie(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function vie(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 xie({project:e,canRemove:t=!1,onRemove:r}){const n=Math.round(e.pass_rate*100),i=ur(e),[o,l]=S.useState(!1),[d,f]=S.useState(!1),[h,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 T(D){var z,k;const R=D.target;(z=w.current)!=null&&z.contains(R)||(k=N.current)!=null&&k.contains(R)||l(!1)}function M(D){var R;D.key==="Escape"&&(l(!1),(R=w.current)==null||R.focus())}return document.addEventListener("pointerdown",T),document.addEventListener("keydown",M),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",M)}},[o]),S.useEffect(()=>{var T;d&&((T=_.current)==null||T.focus())},[d]);function E(){l(!1),y(null),f(!0)}async function C(){if(!(!r||h)){p(!0),y(null);try{await r(e)}catch(T){y(T.message),p(!1)}}}function A(){var T;h||(f(!1),y(null),(T=w.current)==null||T.focus())}return c.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:[c.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:[c.jsx("div",{className:"flex items-start justify-between",children:c.jsxs("div",{className:"min-w-0 flex-1 pr-10",children:[c.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:e.id}),c.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:e.path})]})}),c.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),c.jsx("p",{className:"text-lg font-semibold text-white",children:e.run_count})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),c.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}%`:"--"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-gray-500",children:"Errors"}),c.jsx("p",{className:`text-lg font-semibold ${i>0?"text-amber-300":"text-gray-500"}`,children:i})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),c.jsx("p",{className:"text-sm text-gray-300",children:vie(e.last_run)})]})]})]}),t&&r?c.jsxs("div",{className:"absolute right-3 top-3 z-10",children:[c.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(T=>!T),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:c.jsx("span",{"aria-hidden":"true",children:"..."})}),o?c.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:c.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,d?c.jsx("dialog",{ref:_,open:!0,"aria-modal":"true","aria-labelledby":b,tabIndex:-1,onKeyDown:T=>{T.key==="Escape"&&(T.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:c.jsxs("div",{className:"w-full max-w-md overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[c.jsx("div",{className:"border-b border-gray-800 px-4 py-3",children:c.jsx("h2",{id:b,className:"text-lg font-semibold text-white",children:"Remove project?"})}),c.jsxs("div",{className:"space-y-3 p-4",children:[c.jsxs("p",{className:"text-sm text-gray-300",children:["Remove ",c.jsx("span",{className:"font-medium text-white",children:e.id})," from this Dashboard registry."]}),c.jsxs("p",{className:"text-sm text-gray-500",children:["The project folder and files stay on disk at ",e.path,"."]}),g?c.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]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[c.jsx("button",{type:"button",onClick:A,disabled:h,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"}),c.jsx("button",{type:"button",onClick:()=>void C(),disabled:h,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:h?"Removing...":"Remove project"})]})]})}):null]})}function bie(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function jie(e){return(e.split(",").at(-1)??"").trim()}function wie(e,t){const r=jie(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function Sie(e,t){const r=e.split(",");return[...(/,\s*$/.test(e)?r:r.slice(0,-1)).map(d=>d.trim()).filter(Boolean).filter(d=>d!==t),t].join(", ")}function Nie(e,t,r){return t?e:u1(e,r)}function u1(e,t){return e||String(t??Ic)}function _ie({suiteFilter:e,testIds:t,target:r,experiment:n,thresholdInput:i,studioThreshold:o,workers:l}){const d={};e.trim()&&(d.suite_filter=e.trim()),t.length>0&&(d.test_ids=t),r&&(d.target=r),n.trim()&&(d.experiment=n.trim());const f=u1(i,o);return f&&(d.threshold=Number.parseFloat(f)),l&&(d.workers=Number.parseInt(l,10)),d}const vx="default";function So({open:e,onClose:t,projectId:r,prefill:n}){const i=ho(),o=po(),[l,d]=S.useState((n==null?void 0:n.suiteFilter)??""),[f,h]=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(vx),[N,_]=S.useState(""),[E,C]=S.useState(!1),[A,T]=S.useState(""),[M,D]=S.useState(!1),[R,z]=S.useState(null),[k,H]=S.useState(null),[U,ae]=S.useState(!1),[Z,G]=S.useState(null),{data:$}=L6(r),{data:F}=z6(r),{data:J}=yj(R,r),{data:re}=pt(r),oe=S.useMemo(()=>bie(($==null?void 0:$.eval_files)??[]),[$]),L=S.useMemo(()=>wie(oe,l),[oe,l]),X=S.useMemo(()=>(F==null?void 0:F.targets)??[],[F]),le=S.useMemo(()=>u1(N,re==null?void 0:re.threshold),[re==null?void 0:re.threshold,N]),ue=S.useMemo(()=>Nie(N,E,re==null?void 0:re.threshold),[re==null?void 0:re.threshold,N,E]);S.useEffect(()=>{e&&(d((n==null?void 0:n.suiteFilter)??""),g((n==null?void 0:n.testIds)??[]),x((n==null?void 0:n.target)??""),w(vx),h(""),_(""),C(!1),T(""),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(()=>_ie({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}F6(te,r).then(je=>G(je.command)).catch(()=>G(null))},[pe,r]);function xe(){const te=f.trim();te&&!p.includes(te)&&g([...p,te]),h("")}function we(te){g(p.filter(je=>je!==te))}async function _e(){H(null),ae(!0);try{const te=pe(),je=await qM(te,r);z(je.id)}catch(te){H(te.message)}finally{ae(!1)}}if(!e)return null;if(R&&J){let te=function(){t(),o({to:FB(r)})};return c.jsx(h2,{onClose:t,title:"Eval Run",children:c.jsx(Oie,{status:J,onClose:t,onRunInBackground:te,runId:R})})}const de=!!(l.trim()||p.length>0);return c.jsx(h2,{onClose:t,title:"Start",children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),c.jsx("input",{id:"suite-filter",type:"text",value:l,onChange:te=>d(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&&c.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:L.length>0?L.map(te=>c.jsxs("button",{type:"button",onClick:()=>d(je=>Sie(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:[c.jsx("span",{className:"block truncate",children:te.relativePath}),te.category&&c.jsx("span",{className:"block truncate text-[11px] text-gray-600",children:te.category})]},te.relativePath)):c.jsx("div",{className:"px-2 py-1 text-xs text-gray-500",children:"No matching eval files"})})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{id:"test-id-input",type:"text",value:f,onChange:te=>h(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"}),c.jsx("button",{type:"button",onClick:xe,disabled:!f.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&&c.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:p.map(te=>c.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,c.jsx("button",{type:"button",onClick:()=>we(te),className:"text-cyan-400 hover:text-white",children:"×"})]},te))})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Provider Override"}),c.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:[c.jsx("option",{value:"",children:"Use eval's configured provider"}),X.map(te=>c.jsx("option",{value:te,children:te},te))]})]}),c.jsx("div",{className:"rounded-md border border-gray-800 bg-gray-950/40 p-3",children:c.jsxs("div",{children:[c.jsx("label",{htmlFor:"experiment-input",className:"mb-1 block text-xs font-medium text-gray-400",children:"Experiment"}),c.jsx("input",{id:"experiment-input",type:"text",value:b,onChange:te=>w(te.target.value),placeholder:vx,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"})]})}),c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>D(!M),className:"text-sm text-gray-400 hover:text-gray-200",children:[M?"▾":"▸"," Advanced Options"]}),M&&c.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),c.jsx("input",{id:"threshold-input",type:"number",value:ue,onChange:te=>{C(!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"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),c.jsx("input",{id:"workers-input",type:"number",value:A,onChange:te=>T(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&&c.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[c.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),c.jsx("code",{className:"block break-all text-xs text-cyan-300",children:Z})]}),k&&c.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:k}),c.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[c.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"}),c.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 h2({children:e,onClose:t,title:r}){return c.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[c.jsx("h2",{className:"text-lg font-semibold text-white",children:r}),c.jsx("button",{type:"button",onClick:t,className:"text-gray-400 hover:text-white",children:"✕"})]}),c.jsx("div",{className:"px-5 py-4",children:e})]})})}function Oie({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 c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.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&&c.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),c.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:c.jsx("code",{className:"block break-all text-xs text-cyan-300",children:e.command})}),e.stdout&&c.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:c.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:e.stdout.slice(-3e3)})}),e.stderr&&c.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:c.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:e.stderr.slice(-2e3)})}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-xs text-gray-500",children:i?c.jsxs(c.Fragment,{children:["Exit code: ",e.exit_code,e.finished_at&&` · ${new Date(e.finished_at).toLocaleTimeString()}`]}):n&&c.jsx("button",{type:"button",onClick:r,className:"text-xs text-gray-400 hover:text-cyan-400",children:"Run in background"})}),i&&c.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 xx(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 Eie(e){return`${e} local run${e===1?"":"s"} selected`}function Aie(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function Cie(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function Tie(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 Pie(e,t){const r=Tie(e.timestamp),n=e.status==="starting"||e.status==="running",i=jj(e,{includePassRate:!1}),o=i.label,l=ur(e),d=e.test_count,f=Math.max(0,e.test_count-l),h=f>0?e.pass_rate>=t:l===0,p=Math.round(e.pass_rate*f),g=f-p,y=FM(e),x=e.runtime_source?xj(e.runtime_source):void 0,b=e.runtime_source?K6(e.runtime_source):void 0;return{run:e,ts:r,isActive:n,label:o,display:i,errors:l,totalCount:d,qualityCount:f,passing:h,passedCount:p,failedCount:g,experimentNamespace:y,runtimeSourceLabel:x,runtimeSourceTitle:b}}function Zp({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:o,enableCombine:l=!1,remoteBranch:d}){const{data:f}=pt(t),h=ho(),p=(f==null?void 0:f.threshold)??Ic,g=S.useRef(null),y=S.useRef(null),x=S.useRef(!1),[b,w]=S.useState([]),[N,_]=S.useState(null),[E,C]=S.useState(!1),[A,T]=S.useState(!1),M=S.useMemo(()=>e.map($=>Pie($,p)),[p,e]),D=S.useMemo(()=>e.filter($=>l&&!xx($)).map($=>$.filename),[l,e]),R=new Set(b),z=S.useMemo(()=>new Map(e.map($=>[$.filename,$])),[e]);S.useEffect(()=>{i||(x.current=!1)},[i]),S.useEffect(()=>{if(!n||!o)return;const $=[];if(g.current&&$.push(g.current),y.current&&$.push(y.current),$.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 $)F.observe(J);return()=>F.disconnect()},[n,i,o]),S.useEffect(()=>{const $=new Set(D);w(F=>F.filter(J=>$.has(J)))},[D]);async function k(){if(t){await Promise.all([h.invalidateQueries({queryKey:["projects",t,"runs"]}),h.invalidateQueries({queryKey:["projects",t,"tags"]}),h.invalidateQueries({queryKey:["projects",t,"compare"]}),h.invalidateQueries({queryKey:["projects",t,"targets"]})]);return}await Promise.all([h.invalidateQueries({queryKey:["runs"]}),h.invalidateQueries({queryKey:["tags"]}),h.invalidateQueries({queryKey:["compare"]}),h.invalidateQueries({queryKey:["targets"]})])}async function H(){if(b.length<2||E)return;const $=[...b],F=[...new Set($.map(re=>{var oe,L;return((L=(oe=z.get(re))==null?void 0:oe.experiment)==null?void 0:L.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),C(!0);try{let re;try{re=await hE($,"error",t,void 0,J)}catch(oe){if(!(oe instanceof UM)||oe.status!==409)throw oe;const L=oe.duplicates.length;if(!window.confirm(`${L} duplicate (test ID, provider/model) pair${L===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;re=await hE($,"latest",t,void 0,J)}w([]),_({kind:"success",message:Aie($.length,re.display_name),combinedRunId:re.run_id,sourceRunIds:$}),await k()}catch(re){_({kind:"error",message:re.message})}finally{C(!1)}}async function U(){b.length===0||A||await Z(b,"selected")}async function ae(){const $=(N==null?void 0:N.sourceRunIds)??[];$.length===0||A||await Z($,"combined-sources")}async function Z($,F){const J=$.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),T(!0);try{for(const X of $)await D6(X,t);w([]),_({kind:"success",message:Cie(J)}),await k()}catch(X){_({kind:"error",message:X.message})}finally{T(!1)}}}function G($){w(F=>F.includes($)?F.filter(J=>J!==$):[...F,$])}return e.length===0?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:r??c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),c.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",c.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):c.jsxs("div",{className:"space-y-3",children:[l&&c.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:[c.jsxs("div",{className:"min-w-0 space-y-1",children:[c.jsx("p",{className:"text-sm font-medium text-gray-200",children:Eie(b.length)}),c.jsx("p",{className:"text-xs text-gray-500",children:"Select completed local runs to combine or delete. Remote runs stay read-only here."}),N&&c.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:c.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[c.jsx("span",{children:N.message}),N.combinedRunId?t?c.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"}):c.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?c.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]})})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[c.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"}),c.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"})]})]}),c.jsxs("div",{className:"space-y-2 sm:hidden",children:[M.map($=>{const{run:F,ts:J,label:re,display:oe,errors:L,totalCount:X,passedCount:le,failedCount:ue,experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}=$,_e=xx(F),de=!_e&&D.includes(F.filename);return c.jsxs("article",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-3 py-3",children:[c.jsxs("div",{className:"flex items-start gap-3",children:[l&&c.jsx("input",{type:"checkbox",checked:R.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"}),c.jsx(g2,{view:$,className:"mt-1 shrink-0"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx(m2,{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?c.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:oe.title,children:oe.secondary}):null,c.jsx(Die,{experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}),c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[c.jsx(p2,{onRemote:F.on_remote===!0,branch:d}),c.jsx("span",{className:"text-xs text-gray-500",title:J.full,children:J.date})]})]})]}),c.jsxs("dl",{className:"mt-3 grid grid-cols-2 gap-x-3 gap-y-2 border-t border-gray-800/70 pt-3",children:[c.jsx(yl,{label:"Pass Rate",valueClassName:"text-gray-300",children:c.jsx(Fr,{rate:F.pass_rate})}),c.jsx(yl,{label:"Total",valueClassName:"text-gray-300",children:X}),c.jsx(yl,{label:"Passed",valueClassName:"text-emerald-300",children:le}),c.jsx(yl,{label:"Failures",valueClassName:"text-red-400",children:ue>0?ue:c.jsx("span",{className:"text-gray-600",children:"0"})}),c.jsx(yl,{label:"Errors",valueClassName:"text-amber-300",children:L>0?L:c.jsx("span",{className:"text-gray-600",children:"0"})}),c.jsx(yl,{label:"Remote",valueClassName:"text-gray-400",children:F.on_remote===!0?"On remote":"Local only"})]})]},F.filename)}),(n||i)&&c.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..."})]}),c.jsx("div",{className:"hidden max-w-full overflow-x-auto rounded-lg border border-gray-800 sm:block",children:c.jsxs("table",{className:"min-w-[860px] w-full whitespace-nowrap text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:c.jsxs("tr",{children:[l&&c.jsx("th",{className:"w-10 px-4 py-3"}),c.jsx("th",{className:"w-8 px-4 py-3"}),c.jsx("th",{className:"w-[18rem] px-4 py-3 font-medium text-gray-400",children:"Experiment"}),c.jsx("th",{className:"w-[16rem] px-4 py-3 font-medium text-gray-400",children:"Provider/Model"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Remote"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failures"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Errors"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),c.jsxs("tbody",{className:"divide-y divide-gray-800/50",children:[M.map($=>{var je;const{run:F,ts:J,label:re,display:oe,errors:L,totalCount:X,passedCount:le,failedCount:ue,experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}=$,_e=xx(F),de=!_e&&D.includes(F.filename),te=((je=F.target)==null?void 0:je.trim())||oe.primary;return c.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[l&&c.jsx("td",{className:"px-4 py-3",children:c.jsx("input",{type:"checkbox",checked:R.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"})}),c.jsx("td",{className:"px-4 py-3 text-center",children:c.jsx(g2,{view:$})}),c.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-3",children:c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate font-medium text-gray-200",title:`Experiment: ${pe}`,children:pe}),xe?c.jsx("div",{className:"mt-0.5 truncate text-xs text-cyan-300",title:we??xe,children:xe}):null]})}),c.jsx("td",{className:"w-[16rem] max-w-[16rem] px-4 py-3",children:c.jsx("div",{className:"min-w-0",children:c.jsx("div",{className:"flex min-w-0 items-center gap-2",children:c.jsx(m2,{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"})})})}),c.jsx("td",{className:"px-4 py-3",children:c.jsx(p2,{onRemote:F.on_remote===!0,branch:d})}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:le}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:ue>0?ue:c.jsx("span",{className:"text-gray-600",children:"0"})}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:L>0?c.jsx("span",{className:"text-amber-300",children:L}):c.jsx("span",{className:"text-gray-600",children:"0"})}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:X}),c.jsx("td",{className:"px-4 py-3",children:c.jsx(Fr,{rate:F.pass_rate})}),c.jsx("td",{className:"px-4 py-3 text-gray-400",title:J.full,children:J.date})]},F.filename)}),(n||i)&&c.jsx("tr",{ref:g,children:c.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 m2({projectId:e,runId:t,label:r,title:n,className:i}){return e?c.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:i,title:n,children:r}):c.jsx(Ee,{to:"/runs/$runId",params:{runId:t},className:i,title:n,children:r})}function p2({onRemote:e,branch:t}){return e?c.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:[c.jsx(Mie,{}),"Synced"]}):c.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:[c.jsx(Rie,{}),"Local only"]})}function Mie(){return c.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:[c.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"}),c.jsx("path",{d:"m9 14 2 2 4-4"})]})}function Rie(){return c.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:c.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 Die({experimentNamespace:e,runtimeSourceLabel:t,runtimeSourceTitle:r}){return c.jsxs("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 text-[11px]",children:[c.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?c.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 g2({view:e,className:t=""}){return e.isActive?c.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?c.jsx("span",{className:`text-base font-bold text-amber-300 ${t}`,title:"Execution errors",children:"!"}):c.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 c.jsxs("div",{className:"min-w-0",children:[c.jsx("dt",{className:"text-xs text-gray-500",children:e}),c.jsx("dd",{className:`mt-1 min-w-0 text-sm tabular-nums ${t}`,children:r})]})}function A5({remoteStatus:e,syncInFlight:t,onSync:r,projectName:n,syncFeedback:i,onRemoteSummary:o,onConfirmMerge:l,confirmMergeInFlight:d}){var _,E;const f=(e==null?void 0:e.configured)===!0,h=ZB(e,t),p=t===!0||!h.canSync,g=h.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"}[h.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=XB(e,n,o);return c.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-medium text-gray-200",children:"Recent Runs"}),f&&o?c.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:o}):null]}),f?c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${y}`,children:h.label}),r?c.jsx("button",{type:"button",onClick:r,disabled:p,title:h.canSync?void 0:h.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...":h.actionLabel}):null]}):null]}),f?c.jsxs("div",{className:"space-y-2 text-sm",children:[c.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-gray-400",children:N.map(C=>c.jsx("span",{children:C},C))}),c.jsx("p",{className:h.tone==="danger"?"text-red-300":"text-gray-400",children:h.summary}),h.nextAction?c.jsx("p",{className:"text-xs text-gray-500",children:h.nextAction}):null,b>0||w>0?c.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[b>0?c.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?c.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]}):c.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",c.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results"})," to"," ",c.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}),g?c.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:[c.jsx("p",{className:"font-medium text-yellow-300",children:"Pending merge on GitHub"}),c.jsxs("p",{className:"text-yellow-200/90",children:["Local results were pushed to"," ",c.jsx("code",{className:"rounded bg-yellow-950/60 px-1 font-mono text-xs text-yellow-200",children:g.tempBranch})," ","instead of force-pushing"," ",c.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."]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-0.5",children:[g.compareUrl?c.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?c.jsx("button",{type:"button",onClick:l,disabled:d===!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:d?"Resyncing...":"I merged it — resync"}):null]})]}):null,i?c.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?c.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:[c.jsx("p",{className:"font-medium",children:"Remote sync error"}),c.jsx("p",{children:e.last_error}),c.jsx("p",{className:"mt-1 text-xs text-red-200/80",children:dj(e)})]}):null,e!=null&&e.git_diff_summary&&h.state!=="clean"?c.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 C5({projectId:e,tagKey:t,onTagKeyChange:r}){const{data:n}=Ue(e?l6(e):o6),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:d,isLoading:f}=Ue(e?mj(e,l):hj(l)),h=(d==null?void 0:d.groups)??[];return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("label",{htmlFor:"tag-key-select",className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Group by"}),c.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=>c.jsx("option",{value:p,children:Zi(p)},p))})]}),f?c.jsx(kie,{}):h.length===0?c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[c.jsxs("p",{className:"text-lg text-gray-400",children:["No values found for tag `",l,"`"]}),c.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Values will appear here once evaluations are run with a ",c.jsx("code",{children:l})," tag."]})]}):c.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("table",{className:"min-w-[760px] w-full whitespace-nowrap text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:Zi(l)}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Providers"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-800/50",children:h.map(p=>{const g=Bc(p),y=ur(p);return c.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[c.jsx("td",{className:"px-4 py-3",children:e?c.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}):c.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})}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.run_count}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.target_count}),c.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[c.jsx("span",{className:"text-emerald-400",children:p.passed_count}),c.jsx("span",{className:"text-gray-600",children:" / "}),g]}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:y>0?y:c.jsx("span",{className:"text-gray-600",children:"0"})}),c.jsx("td",{className:"px-4 py-3",children:c.jsx(Fr,{rate:p.pass_rate})}),c.jsx("td",{className:"px-4 py-3 text-gray-400",title:y2(p.last_run).full,children:y2(p.last_run).date})]},p.name)})})]})})]})}function y2(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 kie(){return c.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("div",{className:"min-w-[760px] animate-pulse",children:[c.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:c.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>c.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[c.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}const v2="remote::";function $ie(e){return e.startsWith(v2)?e.slice(v2.length):e}function Jp(e){const t=new Map;for(const r of e){const n=$ie(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 T5({projectId:e}={}){var g,y;const[t,r]=S.useState(null),n=Ue(e?M6(e):d6),i=Ue(e?gj(e):fj),o=((g=n.data)==null?void 0:g.targets)??[],l=((y=i.data)==null?void 0:y.runs)??[],d=n.error??i.error,f=n.isLoading||i.isLoading,h=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(!h)return[];const x=new Map;for(const b of l){if((b.target??"default")!==h.name)continue;const N=b.experiment??"default",_=x.get(N)??[];_.push(b),x.set(N,_)}return[...x.entries()].map(([b,w])=>Lie(b,Jp(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,h]);return f?c.jsx(Bie,{}):d?c.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load provider/model labels: ",d.message]}):o.length===0?c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[c.jsx("p",{className:"text-lg text-gray-400",children:"No provider/model labels found"}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Provider/model labels will appear here once evaluations have run."})]}):h?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-3",children:[c.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 providers"}),c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:c.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-semibold text-white",children:h.name}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[h.run_count," run",h.run_count===1?"":"s"," ·"," ",h.experiment_count," experiment",h.experiment_count===1?"":"s"," ·"," ",c.jsx("span",{className:"text-emerald-400",children:h.passed_count}),c.jsx("span",{className:"text-gray-600",children:" / "}),Bc(h)," evals passed",ur(h)>0&&c.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",ur(h)," execution errors"]})]})]}),c.jsx("div",{className:"w-full max-w-52",children:c.jsx(Fr,{rate:h.pass_rate})})]})})]}),p.length===0?c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[c.jsx("p",{className:"text-lg text-gray-400",children:"No runs found for this provider/model label"}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This provider/model summary exists, but there are no matching runs to group by experiment."})]}):c.jsx("div",{className:"space-y-6",children:p.map(x=>c.jsxs("section",{className:"space-y-3",children:[c.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:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-medium text-gray-200",children:Iie(x.name)}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[x.runs.length," run",x.runs.length===1?"":"s"," ·"," ",c.jsx("span",{className:"text-emerald-400",children:x.passedCount}),c.jsx("span",{className:"text-gray-600",children:" / "}),x.qualityCount," evals passed",x.executionErrorCount>0&&c.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",x.executionErrorCount," execution errors"]}),x.latestTimestamp&&c.jsxs("span",{className:"ml-2 text-gray-500",children:["· Last run ",zie(x.latestTimestamp)]})]})]}),c.jsx("div",{className:"w-full max-w-52",children:c.jsx(Fr,{rate:x.passRate})})]}),c.jsx(Zp,{runs:x.runs,projectId:e})]},x.name))})]}):c.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:c.jsxs("table",{className:"min-w-[720px] w-full whitespace-nowrap text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Provider/Model"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),c.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),c.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-800/50",children:o.map(x=>{const b=Bc(x),w=ur(x);return c.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[c.jsx("td",{className:"px-4 py-3",children:c.jsx("button",{type:"button",onClick:()=>r(x.name),className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.name})}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.run_count}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.experiment_count}),c.jsx("td",{className:"px-4 py-3",children:c.jsx(Fr,{rate:x.pass_rate})}),c.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[c.jsx("span",{className:"text-emerald-400",children:x.passed_count}),c.jsx("span",{className:"text-gray-600",children:" / "}),c.jsx("span",{children:b})]}),c.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:w>0?w:c.jsx("span",{className:"text-gray-600",children:"0"})})]},x.name)})})]})})}function Lie(e,t){let r=0,n=0,i=0,o=0,l=null;for(const d of t){const f=ur(d),h=Math.max(0,d.test_count-f);r+=d.test_count,n+=h,o+=f,i+=Math.round(d.pass_rate*h),d.timestamp&&(!l||d.timestamp>l)&&(l=d.timestamp)}return{name:e,runs:t,latestTimestamp:l,evalCount:r,qualityCount:n,passedCount:i,executionErrorCount:o,passRate:n>0?i/n:0}}function Iie(e){return e==="default"?"Default experiment":e}function zie(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 Bie(){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[c.jsx("div",{className:"h-6 w-40 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"mt-3 h-4 w-72 animate-pulse rounded bg-gray-800"})]}),c.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:c.jsxs("div",{className:"animate-pulse",children:[c.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:c.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>c.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[c.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),c.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},e))]})}),c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[c.jsx("div",{className:"h-5 w-48 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"mt-3 h-4 w-56 animate-pulse rounded bg-gray-800"})]})]})}const x2=[{id:"runs",label:"🏃 Recent Runs"},{id:"tags",label:"🏷️ Tags"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Providers"}],Uie=dr("/")({component:qie});function qie(){const e=po(),n=oj().location.search.tab,{data:i,isLoading:o}=pj(),{data:l,isLoading:d}=pt(),f=(i==null?void 0:i.projects)??[],[h,p]=S.useState(void 0);S.useEffect(()=>{if(o||d)return;const y=l==null?void 0:l.current_project_id;if(!y){p(null);return}const x=UB(y),b=typeof window<"u"&&window.sessionStorage.getItem(x)==="1",w=HB(f.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,d,f,o]);const g=KB(f.map(y=>y.id),l==null?void 0:l.project_dashboard,h??void 0,n);return S.useEffect(()=>{g.kind==="redirect"&&g.redirectPath&&e({to:g.redirectPath,replace:!0})},[g,e]),o||d||h===void 0?c.jsx(Kb,{}):g.kind==="redirect"?c.jsx(Kb,{}):g.kind==="dashboard"?c.jsx(Fie,{}):c.jsx(Hie,{})}function Fie(){const{data:e}=pj(),{data:t}=pt(),r=ho(),[n,i]=S.useState(!1),[o,l]=S.useState(!1),[d,f]=S.useState(null),h=(e==null?void 0:e.projects)??[],p=(t==null?void 0:t.read_only)===!0;async function g(y){await _6(y.id),r.setQueryData(["projects"],x=>x&&{projects:x.projects.filter(b=>b.id!==y.id)}),f(`Project removed from Dashboard: ${y.id}. Files were left on disk.`),r.invalidateQueries({queryKey:["projects"]})}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Projects"}),c.jsx("div",{className:"flex gap-2",children:!p&&c.jsxs(c.Fragment,{children:[c.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"}),c.jsx("button",{type:"button",onClick:()=>{f(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"})]})})]}),d&&c.jsx("div",{className:"rounded-lg border border-cyan-900/60 bg-cyan-950/30 p-3 text-sm text-cyan-300",children:d}),h.length===0?c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-8 text-center",children:[c.jsx("p",{className:"text-lg text-gray-300",children:"No projects registered yet."}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Add a project path to start browsing runs, tags, analytics, and providers."})]}):c.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:h.map(y=>c.jsx(xie,{project:y,canRemove:!p,onRemove:g},y.id))}),!p&&c.jsx(So,{open:o,onClose:()=>l(!1)}),!p&&c.jsx(y9,{open:n,onClose:()=>i(!1),onAdded:y=>{f(`Project registered: ${y.id}`),r.invalidateQueries({queryKey:["projects"]})}})]})}function Hie(){var ae;const t=oj().location.search,r=t.tab,n=(ae=t.key)!=null&&ae.trim()?t.key:jl,i=po(),o=ho(),{data:l,isLoading:d,error:f,hasNextPage:h,fetchNextPage:p,isFetchingNextPage:g}=v6(),{data:y}=tp(),{data:x}=pt(),[b,w]=S.useState(!1),[N,_]=S.useState(!1),[E,C]=S.useState(!1),[A,T]=S.useState(null),M=(x==null?void 0:x.read_only)===!0,D=x2.some(Z=>Z.id===r)?r:"runs",R=Jp((l==null?void 0:l.runs)??[]),z=R.filter(Z=>Z.on_remote===!0).length,k=(y==null?void 0:y.configured)===!0?RM(z,R.length,y.branch):void 0;async function H(){_(!0),T(null);try{const Z=await zM();o.setQueryData(Lc().queryKey,Z),T(Gh(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){T(Yh(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(()=>T(null),7e3);return()=>window.clearTimeout(Z)},[A]);async function U(){C(!0),T(null);try{const Z=await BM();o.setQueryData(Lc().queryKey,Z),T(Gh(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){T(Yh(Z,y)),o.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{C(!1)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(x==null?void 0:x.project_name)&&c.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:x.project_name})]}),!M&&c.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"})]}),c.jsx("div",{className:"border-b border-gray-800",children:c.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:x2.map(Z=>c.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"&&c.jsx(Gie,{runs:R,isLoading:d,error:f,remoteStatus:y,syncInFlight:N,syncFeedback:A,onSyncRemote:H,onConfirmMerge:U,confirmMergeInFlight:E,projectName:x==null?void 0:x.project_name,onRemoteSummary:k,hasNextPage:h,isFetchingNextPage:g,onLoadMore:()=>void p(),readOnly:M}),D==="tags"&&c.jsx(C5,{tagKey:n,onTagKeyChange:Z=>i({to:"/",search:{tab:"tags",key:Z}})}),D==="analytics"&&c.jsx(Kie,{readOnly:M}),D==="targets"&&c.jsx(T5,{}),!M&&c.jsx(So,{open:b,onClose:()=>w(!1)})]})}function Kie({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=x6();return c.jsx(E5,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function Gie({runs:e,isLoading:t,error:r,remoteStatus:n,syncInFlight:i,syncFeedback:o,onSyncRemote:l,onConfirmMerge:d,confirmMergeInFlight:f,projectName:h,onRemoteSummary:p,hasNextPage:g,isFetchingNextPage:y,onLoadMore:x,readOnly:b}){return t?c.jsx(Kb,{}):r?c.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]}):c.jsxs("div",{className:"space-y-4",children:[c.jsx(Yie,{}),c.jsx(A5,{remoteStatus:n,syncInFlight:i,onSync:l,projectName:h,syncFeedback:o,onRemoteSummary:p,onConfirmMerge:d,confirmMergeInFlight:f}),c.jsx(Zp,{runs:e,enableCombine:!b,remoteBranch:n==null?void 0:n.branch,hasNextPage:g,isFetchingNextPage:y,onLoadMore:x})]})}function Yie(){const{data:e}=vj(),t=((e==null?void 0:e.runs)??[]).filter(r=>r.status==="starting"||r.status==="running");return t.length===0?null:c.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[c.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:c.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),c.jsx("ul",{className:"divide-y divide-gray-800/50",children:t.map(r=>c.jsxs("li",{className:"flex items-center justify-between px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[c.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),c.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:r.id}),c.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(r.started_at).toLocaleTimeString()})]}),c.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 Kb(){return c.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(e=>c.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},e))})}function P5(e){return e==="finished"||e==="failed"}function Vie(e,t){return t||!e?!1:!P5(e)}function Qie(e,t,r,n){return t||n&&!P5(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function Xie(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 Wie(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 M5({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:o,plannedTestCount:l,runStatus:d}){const f=po(),h=S.useRef(null),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState(!1),N=Qie(e,o,l,d),_=!!t&&!!r,C=Wie({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 T(D){h.current&&!h.current.contains(D.target)&&w(!1)}function M(D){D.key==="Escape"&&w(!1)}return document.addEventListener("pointerdown",T),document.addEventListener("keydown",M),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",M)}},[b]),!N)return null;async function A(T){if(!(!_||!t||!r)){w(!1),g(T),x(null);try{const M=Xie({mode:T,runDir:t,suiteFilter:r,target:n}),D=await qM(M,i);f(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:D.id}}:{to:"/jobs/$runId",params:{runId:D.id}})}catch(M){x(M instanceof Error?M.message:"Failed to launch resume"),g(null)}}}return c.jsxs("div",{className:"flex flex-col items-end gap-1",ref:h,children:[c.jsxs("div",{className:"relative",children:[c.jsx("button",{type:"button",onClick:()=>w(T=>!T),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&&c.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:C.map(T=>c.jsx("button",{type:"button",role:"menuitem",onClick:()=>void A(T.mode),disabled:T.disabled,title:T.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":T.testId,children:T.label},T.mode))})]}),y&&c.jsx("p",{className:"text-xs text-red-400",children:y})]})}function R5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function D5(e){return typeof e=="string"&&e.trim().length>0?e.trim():void 0}function Zie(e){const t=D5(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 Jie(e){const t=D5(e.provider);return t===void 0||t.toLowerCase()==="phoenix"}function ese(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 tse(e){const t=e,r=R5(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,ese(r)]}function rse(e){for(const t of e)for(const r of tse(t)){if(!R5(r)||!Jie(r))continue;const n=Zie(r.ui_url??r.uiUrl??r.url??r.href);if(n)return n}}const k5=[{id:"all",label:"All"},{id:"passing",label:"Passing"},{id:"failing",label:"Failing"},{id:"errors",label:"Errors"},{id:"grader_errors",label:"Grader errors"}],$5="all",L5="all";function zt(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function b2(e){return[...new Set([...e].filter(t=>t.trim().length>0))].sort((t,r)=>t.localeCompare(r))}function I5(e,t){return zt(e.name)??zt(e.type)??`Grader ${t+1}`}function z5(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=>z5(i,t)))??!1}function B5(e){if(!e||e.length===0)return[];const t=[];return e.forEach((r,n)=>{t.push(I5(r,n),r.type??"",r.verdict??"");for(const i of r.assertions??[])t.push(i.text,i.evidence??"");t.push(...B5(r.scores))}),t.filter(r=>r.length>0)}function Gb(e){return!e||e.length===0?[]:e.flatMap(t=>[...t.assertions??[],...Gb(t.scores)])}function nse(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 ase(e){const t=new Map;return e==null||e.forEach((r,n)=>{const i=I5(r,n);t.has(i)||t.set(i,r)}),t}function ise(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 bx(e){return e.filter(t=>typeof t=="number"&&Number.isFinite(t))}function Ih(e){return e.samples??e.attempts??e.trials??[]}function sse(e,t){return e.status==="passed"?!0:e.status==="failed"||e.status==="skipped"?!1:e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function ose(e){return[e.metrics_path,e.timing_path,e.grading_path,e.transcript_path,e.answer_path].filter(Boolean).length}function lse(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 use(e){const t=zt(e.target)??"default",r=zt(e.targetUsed);return r&&r!==t?`${t} -> ${r}`:t}function cse(e){return zt(e.eval_path)??zt(e.suite)}function dse(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 fse(e,t,r){var N;const n=JM(e),i=!n&&e.score>=r,o=n?"error":i?"passing":"failing",l=ase(e.scores),d=[...l.keys()],f=((N=e.scores)==null?void 0:N.some(_=>z5(_,r)))??!1,h=lse(e),p=use(e),g=cse(e),y=zt(e.suite),x=zt(e.category),b=ise(e),w=[e.testId,p,h??"",g??"",y??"",x??"",e.executionStatus??"",e.error??"",...B5(e.scores),...(e.assertions??[]).flatMap(_=>[_.text,_.evidence??""])];return{key:dse(e,t),result:e,index:t,testId:e.testId,status:o,statusLabel:n?"Error":i?"Passing":"Failing",passing:i,executionError:n,graderError:f,targetLabel:p,...h&&{modelLabel:h},...g&&{evalLabel:g},...x&&{categoryLabel:x},...b!==void 0&&{tokenTotal:b},graderNames:d,graderScores:l,searchText:w.join(" ").toLowerCase()}}function hse(e,t){const r=Ih(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=>sse(g,t)).length,i=r.filter(g=>g.execution_status==="execution_error").length,o=bx(r.map(g=>g.duration_ms)),l=bx(r.map(g=>g.score)),d=bx(r.map(g=>g.total_tool_calls)),f=r.reduce((g,y)=>g+ose(y),0),h=nse([...e.result.assertions??[],...Gb(e.result.scores),...r.flatMap(g=>[...g.assertions??[],...Gb(g.scores)])]),p=h.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:h.length,passedAssertions:p,...h.length>0&&{assertionPassRate:p/h.length},...o.length>0&&{meanDurationMs:o.reduce((g,y)=>g+y,0)/o.length},...d.length>0&&{totalToolCalls:d.reduce((g,y)=>g+y,0)},artifactCount:f}}function mse(e,t){const r=e.some(h=>Ih(h.result).length>1),n=e.some(h=>h.evalLabel),i=e.some(h=>h.categoryLabel),o=e.some(h=>h.result.durationMs!=null||Ih(h.result).some(p=>p.duration_ms!=null)),l=e.some(h=>h.result.costUsd!=null||h.tokenTotal!=null||Ih(h.result).some(p=>p.cost_usd!=null||p.total_tokens!=null||p.token_usage!=null)),d=e.some(h=>h.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:"Provider/Model",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}]:[],...d?[{id:"error",label:"Error",kind:"base",defaultVisible:!1}]:[],...t.map(h=>({id:`grader:${h}`,label:h,kind:"grader",defaultVisible:!0}))]}function pse(e){return e==="scorer_errors"?"grader_errors":k5.some(t=>t.id===e)?e:"all"}function gse(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 yse(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 vse(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?yse(o,t):gse(t),d=e!=null&&e.target&&r.includes(e.target)?e.target:$5,f=(e==null?void 0:e.grader)??(e==null?void 0:e.scorer),h=f&&n.includes(f)?f:L5;return{view:pse(e==null?void 0:e.view),search:((g=e==null?void 0:e.search)==null?void 0:g.trim())??"",target:d,grader:h,visibleColumnIds:l}}function xse(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 bse(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 jse(e){const t=e.results.map((y,x)=>fse(y,x,e.passThreshold)),r=b2(t.map(y=>y.targetLabel)),n=b2(t.flatMap(y=>y.graderNames)),i=mse(t,n),o=vse(e.state,i,r,n),l=o.search.toLowerCase(),d=new Set(o.visibleColumnIds),f=t.filter(y=>!(!xse(y,o.view)||o.target!==$5&&y.targetLabel!==o.target||o.grader!==L5&&!y.graderScores.has(o.grader)||l&&!y.searchText.includes(l))),h=t.map(y=>hse(y,e.passThreshold)).filter(y=>!!y),p=new Set(f.map(y=>y.key)),g=h.filter(y=>p.has(y.row.key));return{rows:t,filteredRows:f,repeatGroups:h,filteredRepeatGroups:g,columns:i,visibleColumns:i.filter(y=>d.has(y.id)),state:o,targetOptions:r,graderOptions:n,viewCounts:bse(t)}}function wse(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 Sse(e){if(e.type==="file")return e.storage==="git"&&e.ref?e.ref:e.storage&&e.storage!=="local"?e.storage:void 0}function U5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...U5(r.children)));return t}function q5({node:e,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o=0}){const l=e.type==="dir",d=n.has(e.path),f=t===e.path,h=Sse(e);return c.jsxs("div",{children:[c.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 ${f?"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:[c.jsx("span",{className:"flex-shrink-0 text-xs",children:l?d?"📂":"📁":wse(e.name)}),c.jsx("span",{className:"truncate",children:e.name}),h&&c.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:h})]}),l&&d&&e.children&&c.jsx("div",{children:e.children.map(p=>c.jsx(q5,{node:p,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o+1},p.path))})]})}function Nse({files:e,selectedPath:t,onSelect:r}){const[n,i]=S.useState(()=>new Set(U5(e))),o=l=>{i(d=>{const f=new Set(d);return f.has(l)?f.delete(l):f.add(l),f})};return c.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&&c.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),e.map(l=>c.jsx(q5,{node:l,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:o},l.path))]})}const _se="modulepreload",Ose=function(e){return"/"+e},j2={},Ese=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let l=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));i=l(r.map(h=>{if(h=Ose(h),h in j2)return;j2[h]=!0;const p=h.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":_se,p||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),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 ${h}`)))})}))}function o(l){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=l,window.dispatchEvent(d),!d.defaultPrevented)throw l}return i.then(l=>{for(const d of l||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})},Ase=S.lazy(()=>Ese(()=>import("./index-BfqOlLOF.js"),[]));function Cse({value:e,language:t="json",height:r="400px"}){return c.jsx(S.Suspense,{fallback:c.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:c.jsx(Ase,{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="",showLabel:r=!0}){const n=Math.round(Math.max(0,Math.min(1,e))*100),i=n>=80?"from-cyan-300 via-sky-400 to-blue-500":n>=50?"from-amber-300 via-orange-400 to-red-400":"from-red-400 via-rose-500 to-fuchsia-500";return c.jsxs("div",{className:`flex items-center gap-3 ${t}`,children:[c.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800/90 ring-1 ring-white/5",children:c.jsx("div",{className:`h-full rounded-full bg-gradient-to-r ${i} transition-all duration-300`,style:{width:`${n}%`}})}),r?c.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-200",children:[n,"%"]}):null]})}const Tse={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 Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Pse(e){return!Hr(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 w2(e){return Hr(e)&&e.v===1&&typeof e.agent=="string"&&(e.type==="system"||e.type==="user"||e.type==="assistant")&&Array.isArray(e.content)}function Mse(e){const t=Hr(e.result)?e.result:void 0,r=Rse(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 Rse(e,t){const r=Hr(e),n=Hr(t);if(r&&n)return{...e,result:t};if(r)return e;if(n)return t}function S2(e,t,r){const n=e.content,i=n.filter(f=>Hr(f)&&f.type==="tool_use").map(Mse),o=typeof e.input_tokens=="number"?e.input_tokens:void 0,l=typeof e.output_tokens=="number"?e.output_tokens:void 0,d=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:d,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 F5(e){const t=e.trim();if(t.startsWith("{"))try{const i=JSON.parse(t);if(Hr(i)&&Array.isArray(i.turns)){const o=typeof i.target=="string"?i.target:void 0,l=Hr(i.metadata)&&typeof i.metadata.test_id=="string"?i.metadata.test_id:void 0;return{entries:i.turns.flatMap((f,h)=>w2(f)?[S2(f,h,{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(w2(l)){r.push(S2(l,r.length));continue}if(!Pse(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 Gm(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function Dse(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function c1(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 H5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function kse(e){if(Array.isArray(e)){const t=e.map(r=>{if(Hr(r)&&r.type==="text"&&typeof r.text=="string")return r.text;if(Hr(r)&&r.type==="thinking"&&typeof r.text=="string")return`Thinking:
120
+ ${r.text}`;if(Hr(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 H5(e)}function ad(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function Yb(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function K5(e,t){const r=e[t];return Hr(r)?r:void 0}function $se(e,t){const r=K5(e,"function");return ad(e,["tool","name","tool_name"])??(r?ad(r,["name"]):void 0)??`Tool ${t+1}`}function Lse(e){const t=K5(e,"function");return Yb(e,["input","arguments","args","parameters"])??(t?Yb(t,["arguments"]):void 0)}function Ise(e){return Yb(e,["output","result","content"])}function zse(e,t){return`${e.message_index}-${e.role}-${t}`}function Bse(e){return[...e].sort((t,r)=>t.message_index-r.message_index).map((t,r)=>{const n=Tse[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=zse(t,r),o=(Array.isArray(t.tool_calls)?t.tool_calls.filter(Hr):[]).map((l,d)=>{const f=ad(l,["id","call_id","tool_call_id"]);return{id:`${i}-tool-${f??d}`,call:l,index:d,name:$se(l,d),status:ad(l,["status"]),duration:typeof l.duration_ms=="number"?Gm(l.duration_ms):void 0}});return{id:i,anchorId:`message-${r+1}`,line:t,ordinal:r,roleStyle:n,content:kse(t.content),duration:Gm(t.duration_ms),tokenUsage:c1(t.token_usage),toolCalls:o}})}function N2(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 Use(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 qse(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 Fse(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function Is({label:e,value:t,tone:r="default"}){return Fse(t)?c.jsxs("div",{className:"min-w-0 space-y-1",children:[c.jsx("div",{className:r==="error"?"text-xs font-medium text-red-300":"text-xs font-medium text-gray-400",children:e}),c.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:c.jsx("code",{children:H5(t)})})]}):null}function ir({children:e}){return c.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 _h({href:e,children:t,download:r=!1}){return e?c.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 jx({path:e,onOpenFile:t,children:r}){return!e||!t?null:c.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 Hse({toolCall:e,expanded:t,onToggle:r}){const{call:n,index:i,name:o,status:l,duration:d}=e,f=ad(n,["id","call_id","tool_call_id"]),h=Hr(n.metadata)?n.metadata:void 0;return c.jsxs("details",{className:"min-w-0 rounded-md border border-gray-800 bg-gray-950/80 p-3",open:t,"data-testid":`tool-call-${f??i}`,"data-expanded":t?"true":"false",onToggle:p=>r(e.id,p.currentTarget.open),children:[c.jsx("summary",{className:"min-w-0 cursor-pointer list-none text-sm font-medium text-gray-200",children:c.jsxs("span",{className:"inline-flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("span",{className:"text-xs text-gray-500",children:t?"-":"+"}),c.jsx("span",{children:"Tool call"}),c.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&&c.jsx("span",{className:"text-xs text-gray-500",children:l}),d&&c.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:d})]})}),c.jsxs("div",{className:"mt-3 min-w-0 space-y-3",children:[c.jsxs("div",{className:"flex flex-wrap gap-2",children:[f&&c.jsxs(ir,{children:["id: ",f]}),d&&c.jsxs(ir,{children:["duration: ",d]}),l&&c.jsxs(ir,{children:["status: ",l]})]}),c.jsx(Is,{label:"Arguments",value:Lse(n)}),c.jsx(Is,{label:"Result",value:Ise(n)}),c.jsx(Is,{label:"Error",value:n.error,tone:"error"}),c.jsx(Is,{label:"Metadata",value:h})]})]})}function Kse({line:e}){const t=Gm(e.duration_ms),r=c1(e.token_usage);return c.jsxs("details",{className:"min-w-0 rounded-md border border-amber-900/50 bg-gray-950/60 p-3",children:[c.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-amber-300",children:[e.name?`Tool result · ${e.name}`:"Tool result",t&&c.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:t})]}),c.jsxs("div",{className:"mt-3 min-w-0 space-y-3",children:[c.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&c.jsxs(ir,{children:["name: ",e.name]}),t&&c.jsxs(ir,{children:["duration: ",t]}),r&&c.jsxs(ir,{children:["tokens: ",r]})]}),c.jsx(Is,{label:"Result",value:e.content}),c.jsx(Is,{label:"Metadata",value:e.metadata})]})]})}function Gse({message:e,expanded:t,expandedToolIds:r,onToggleMessage:n,onToggleTool:i}){const{line:o,ordinal:l,roleStyle:d,content:f,duration:h,tokenUsage:p,toolCalls:g}=e;return c.jsxs("details",{id:e.anchorId,className:`min-w-0 scroll-mt-6 rounded-lg border ${d.container}`,open:t,"data-testid":`message-row-${l+1}`,"data-expanded":t?"true":"false",onToggle:y=>n(e.id,y.currentTarget.open),children:[c.jsx("summary",{className:"min-w-0 cursor-pointer list-none px-4 py-3",children:c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("span",{className:"text-xs text-gray-500",children:t?"-":"+"}),c.jsx("span",{className:`rounded-md border px-2 py-0.5 text-xs font-medium ${d.badge}`,children:d.label}),o.name&&c.jsx("span",{className:`truncate text-sm font-medium ${d.accent}`,children:o.name}),g.length>0&&c.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"]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-500",children:[c.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&&c.jsx("span",{children:o.start_time}),h&&c.jsx("span",{className:"tabular-nums",children:h}),p&&c.jsx("span",{children:p})]})]})}),c.jsxs("div",{className:"space-y-3 border-t border-gray-800/70 px-4 py-3",children:[o.role==="tool"||o.role==="function"?c.jsx(Kse,{line:o}):f.trim().length>0?c.jsx("pre",{className:"max-w-full whitespace-pre-wrap break-words text-sm leading-6 text-gray-200",children:f}):c.jsx("p",{className:"text-sm text-gray-500",children:"No message content recorded."}),g.length>0&&c.jsx("div",{className:"space-y-2",children:g.map(y=>c.jsx(Hse,{toolCall:y,expanded:r.has(y.id),onToggle:i},y.id))}),o.metadata&&o.role!=="tool"&&o.role!=="function"&&c.jsxs("details",{className:"min-w-0 rounded-md border border-gray-800 bg-gray-950/60 p-3",children:[c.jsx("summary",{className:"cursor-pointer text-xs font-medium text-gray-400",children:"Message metadata"}),c.jsx("div",{className:"mt-3",children:c.jsx(Is,{label:"Metadata",value:o.metadata})})]})]})]})}function Yse({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=Gm(r==null?void 0:r.transcript_duration_ms),d=c1(r==null?void 0:r.transcript_token_usage),f=Dse(r==null?void 0:r.transcript_cost_usd),h=Use(e),p=qse(e);return c.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[c.jsxs(ir,{children:[e.length," messages"]}),Array.from(h.entries()).map(([w,N])=>c.jsxs(ir,{children:[w,": ",N]},w)),p.total>0&&c.jsxs(ir,{children:[p.total," tool calls"]}),Array.from(p.byName.entries()).map(([w,N])=>c.jsxs(ir,{children:[w,": ",N]},w)),n&&c.jsxs(ir,{children:["provider: ",n]}),i&&c.jsxs(ir,{children:["model: ",i]}),o&&c.jsxs(ir,{children:["session: ",o]}),l&&c.jsxs(ir,{children:["duration: ",l]}),d&&c.jsxs(ir,{children:["tokens: ",d]}),f&&c.jsxs(ir,{children:["cost: ",f]}),t&&c.jsx(ir,{children:t})]})}function Vse(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 Oh({active:e,count:t,children:r,onClick:n}){return c.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,c.jsx("span",{className:"ml-2 text-xs text-gray-500",children:t})]})}function G5({entries:e,finalAnswer:t,answerPath:r,transcriptPath:n,transcriptRawPath:i,answerHref:o,transcriptHref:l,transcriptDownloadHref:d,transcriptRawHref:f,onOpenFile:h}){const p=S.useMemo(()=>Bse(e),[e]),[g,y]=S.useState(()=>N2(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]),C=S.useMemo(()=>Vse(p,w),[p,w]),A=p.filter(k=>k.line.role!=="tool"&&k.line.role!=="function").length,T=p.filter(k=>k.line.role==="tool"||k.line.role==="function").length,M=p.filter(k=>k.toolCalls.length>0).length;S.useEffect(()=>{y(N2(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 R(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 c.jsxs("div",{className:"min-w-0 space-y-4",children:[_&&c.jsxs("section",{className:"min-w-0 rounded-lg border border-emerald-900/50 bg-emerald-950/20 p-4",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"text-sm font-medium text-emerald-300",children:"Final answer"}),c.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Highlighted from canonical ",c.jsx("code",{children:"outputs/answer.md"}),"; transcript context stays below."]})]}),c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx(jx,{path:r,onOpenFile:h,children:"Open answer.md in Files"}),c.jsx(_h,{href:o,children:"Open answer.md"})]})]}),c.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."})]}),c.jsx("section",{className:"min-w-0 rounded-lg border border-gray-800 bg-gray-900 p-4",children:c.jsxs("div",{className:"flex min-w-0 flex-wrap items-start justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0 space-y-2",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Transcript timeline"}),c.jsx(Yse,{messages:p,transcriptPath:n})]}),c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx(jx,{path:n,onOpenFile:h,children:"Open transcript.json in Files"}),c.jsx(_h,{href:l,children:"Open normalized JSON"}),c.jsx(_h,{href:d,download:!0,children:"Download normalized JSON"}),c.jsx(jx,{path:i,onOpenFile:h,children:"Open transcript-raw.jsonl in Files"}),c.jsx(_h,{href:f,children:"Open raw JSONL"}),!i&&c.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"})]})]})}),c.jsx("section",{className:"min-w-0 rounded-lg border border-gray-800 bg-gray-900 p-3",children:c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[c.jsx(Oh,{active:w==="all",count:p.length,onClick:()=>N("all"),children:"All"}),c.jsx(Oh,{active:w==="messages",count:A,onClick:()=>N("messages"),children:"Messages"}),c.jsx(Oh,{active:w==="with-tools",count:M,onClick:()=>N("with-tools"),children:"Has tools"}),c.jsx(Oh,{active:w==="tool-results",count:T,onClick:()=>N("tool-results"),children:"Tool results"})]}),E.length>0&&c.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[c.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"}),c.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"})]})]})}),c.jsx("div",{className:"space-y-3",children:C.map(k=>c.jsx(Gse,{message:k,expanded:g.has(k.id),expandedToolIds:x,onToggleMessage:D,onToggleTool:R},k.id))})]})}function Y5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=Y5(t.children);if(r)return r}}return null}function d1(e,t=0){return e.sample_path??e.attempt_path??e.run_path??`sample-${t+1}`}function Qse(e,t=0){return typeof e.sample_index=="number"?e.sample_index:typeof e.attempt=="number"?e.attempt+1:t+1}function V5(e,t=0){const r=`Attempt ${Qse(e,t)}`;return typeof e.retry_index=="number"&&e.retry_index>0?`${r} retry ${e.retry_index}`:r}function Xse(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 Q5(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 Wse(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function Zse(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function Jse(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 f1({eval:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i=null,initialTab:o="checks",initialSelectedFilePath:l=null,onSelectTrial:d}){const[f,h]=S.useState(o),[p,g]=S.useState(l),y=i?Jse(e,i):e,x=n!=null&&i==null;S.useEffect(()=>{h(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),h("files")};return c.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[c.jsx("div",{className:"min-w-0 border-b border-gray-800",children:c.jsx("div",{className:"av-scrollbar-none flex min-w-0 gap-1 overflow-x-auto px-4",children:b.map(N=>c.jsx("button",{type:"button",onClick:()=>h(N.id),className:`px-4 py-2 text-sm font-medium transition-colors ${f===N.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:N.label},N.id))})}),c.jsxs("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden",children:[f==="checks"&&c.jsx("div",{className:"min-w-0 overflow-auto p-4",children:x?c.jsx(aoe,{result:e,group:n,onSelectTrial:d}):i?c.jsx(O2,{result:y,trial:i,runId:t,projectId:r,onOpenFile:w}):y.grading_path?c.jsx(O2,{result:y,runId:t,projectId:r,onOpenFile:w}):c.jsx(W5,{result:y,projectId:r})}),f==="files"&&c.jsx("div",{className:"h-full min-h-0 p-4",children:c.jsx(xoe,{result:y,runId:t,projectId:r,selectedPath:p,onSelectedPathChange:g})}),f==="transcript"&&c.jsx("div",{className:"min-w-0 overflow-auto p-4",children:x?c.jsx(goe,{result:e,group:n,runId:t,projectId:r,onSelectTrial:d}):i?c.jsx(yoe,{result:y,trial:i,runId:t,projectId:r,onOpenFile:w}):c.jsx(voe,{result:y,runId:t,projectId:r,onOpenFile:w})}),f==="source"&&c.jsx("div",{className:"min-w-0 overflow-auto p-4",children:c.jsx(roe,{result:y})})]})]})}function eoe(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 en({label:e,value:t}){return t===void 0||t===""?null:c.jsxs("div",{className:"min-w-0",children:[c.jsx("dt",{className:"text-xs font-medium uppercase text-gray-500",children:e}),c.jsx("dd",{className:"mt-1 break-words font-mono text-sm text-gray-200",children:String(t)})]})}function X5({file:e}){var r,n;const t=eoe(e.size_bytes);return c.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[c.jsx(en,{label:"Path",value:e.display_path}),c.jsx(en,{label:"SHA-256",value:e.content_sha256}),c.jsx(en,{label:"Size",value:t}),c.jsx(en,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function Cc({value:e,language:t}){return c.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:c.jsx("code",{"data-language":t,children:e})})}function toe({file:e}){const t=`${e.kind}${e.grader_name?` · ${e.grader_name}`:""}`;return c.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",open:!1,children:[c.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[c.jsx("span",{children:t}),c.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:e.display_path})]}),c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsx(X5,{file:e}),e.command&&e.command.length>0&&c.jsx(Cc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&c.jsx(Cc,{value:e.content})]})]})}function roe({result:e}){var r,n,i;const t=e.source_traceability;return!t||t.status!=="captured"?c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-950/80 p-4 ring-1 ring-white/5",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source metadata"}),c.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."})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-300",children:"Traceability"}),c.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[c.jsx(en,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),c.jsx(en,{label:"Eval",value:e.eval_path}),c.jsx(en,{label:"Test ID",value:t.test_id??e.testId}),c.jsx(en,{label:"Legacy suite",value:e.suite}),c.jsx(en,{label:"Category",value:e.category}),c.jsx(en,{label:"Provider/Model",value:e.target})]})]}),((n=t.source_test)==null?void 0:n.yaml)&&c.jsxs("section",{className:"space-y-3",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source Test"}),c.jsx(Cc,{value:t.source_test.yaml,language:"yaml"})]}),((i=t.eval_file)==null?void 0:i.content)&&c.jsxs("section",{className:"space-y-3",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Eval File Snapshot"}),c.jsx(X5,{file:t.eval_file}),c.jsx(Cc,{value:t.eval_file.content,language:"yaml"})]}),t.graders&&t.graders.length>0&&c.jsxs("section",{className:"space-y-3",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Graders"}),c.jsx("div",{className:"space-y-3",children:t.graders.map(o=>c.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",children:[c.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[o.name,c.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:o.type})]}),c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsxs("dl",{className:"grid gap-3 md:grid-cols-3",children:[c.jsx(en,{label:"Weight",value:o.weight}),c.jsx(en,{label:"Required",value:o.required}),c.jsx(en,{label:"Min score",value:o.min_score})]}),c.jsx(Cc,{value:JSON.stringify(o.definition,null,2),language:"json"})]})]},`${o.name}-${o.type}`))})]}),t.referenced_files&&t.referenced_files.length>0&&c.jsxs("section",{className:"space-y-3",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Referenced Files"}),c.jsx("div",{className:"space-y-3",children:t.referenced_files.map((o,l)=>c.jsx(toe,{file:o},`${o.kind}-${o.display_path}-${o.grader_name??""}-${l}`))})]})]})}function _2({assertion:e}){return c.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:[c.jsx("span",{className:`mt-0.5 text-lg ${e.passed?"text-emerald-400":"text-red-400"}`,children:e.passed?"✓":"✗"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("p",{className:"text-sm text-gray-200",children:[e.text,e.durationMs!=null&&c.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(e.durationMs/1e3).toFixed(1),"s)"]})]}),e.evidence&&c.jsx("p",{className:"mt-1 text-xs text-gray-400",children:e.evidence})]})]})}function W5({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,d=e.assertions??[],f=[];e.error&&f.push(e.error),(e.executionStatus==="error"||e.executionStatus==="failed")&&f.push(`Execution status: ${e.executionStatus}`);const h=l?o.flatMap(p=>p.assertions):d;for(const p of h.filter(g=>!g.passed)){const g=p.evidence?`${p.text}: ${p.evidence}`:p.text;f.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);f.push(`[${p.name??p.type??"evaluator"}] ${g}`)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-950/80 p-4 ring-1 ring-white/5",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),c.jsx("div",{className:"flex-1",children:c.jsx(fo,{score:e.score})})]})}),e.scores&&e.scores.length>0&&c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Grader Scores"}),c.jsx("div",{className:"space-y-3",children:e.scores.map((p,g)=>c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:p.name??p.type??`Score ${g+1}`}),c.jsx("div",{className:"flex-1",children:c.jsx(fo,{score:p.score})})]},`${p.name??p.type??g}`))})]}),l?c.jsx("div",{className:"space-y-6",children:o.map((p,g)=>{const y=p.name??p.type??`Grader ${g+1}`;return c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:y}),p.assertions.map((x,b)=>c.jsx(_2,{assertion:x},`${x.text}-${b}`))]},`${p.name??p.type??g}`)})}):d.length>0?c.jsx("div",{className:"space-y-2",children:d.map((p,g)=>c.jsx(_2,{assertion:p},`${p.text}-${g}`))}):c.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),i&&f.length>0&&c.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[c.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),c.jsx("div",{className:"space-y-2",children:f.map(p=>c.jsx("p",{className:"text-sm text-gray-300",children:p},p))})]})]})}function ki({label:e,value:t}){return c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-950/80 p-3 ring-1 ring-white/5",children:[c.jsx("div",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:e}),c.jsx("div",{className:"mt-1 font-mono text-sm text-gray-100",children:t??"-"})]})}function noe({trial:e,index:t,onSelectTrial:r}){const n=d1(e,t),i=V5(e,t);return c.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:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("span",{className:"font-medium text-gray-200",children:i}),c.jsx("span",{className:"rounded-md border border-gray-800 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:n})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-gray-500",children:[c.jsxs("span",{children:[eo(e.score)," score"]}),c.jsx("span",{children:e.verdict??"unknown"}),e.duration_ms!=null?c.jsx("span",{children:Q5(e.duration_ms)}):null,e.total_tool_calls!=null?c.jsxs("span",{children:[e.total_tool_calls," tool calls"]}):null]})]}),c.jsxs("div",{className:"flex flex-wrap gap-2 md:justify-end",children:[c.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"}),c.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 aoe({result:e,group:t,onSelectTrial:r}){return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsxs("p",{className:"mb-3 text-sm text-gray-400",children:["Aggregate across ",t.trialCount," attempts for this test case."]}),c.jsxs("div",{className:"grid gap-3 md:grid-cols-4",children:[c.jsx(ki,{label:"Attempt success",value:eo(t.passRate)}),c.jsx(ki,{label:"Mean score",value:eo(t.meanScore)}),c.jsx(ki,{label:"Attempts passed",value:`${t.passedTrials}/${t.trialCount}`}),c.jsx(ki,{label:"Assertion pass",value:eo(t.assertionPassRate)}),t.executionErrorTrials>0?c.jsx(ki,{label:"Execution errors",value:String(t.executionErrorTrials)}):null]})]}),e.scores&&e.scores.length>0?c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Aggregate Grader Scores"}),c.jsx("div",{className:"space-y-3",children:e.scores.map((n,i)=>c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:n.name??n.type??`Score ${i+1}`}),c.jsx("div",{className:"flex-1",children:c.jsx(fo,{score:n.score})})]},`${n.name??n.type??i}`))})]}):null,c.jsxs("section",{className:"space-y-3",children:[c.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Attempts"}),t.trials.map((n,i)=>c.jsx(noe,{trial:n,index:i,onSelectTrial:r},d1(n,i)))]})]})}function Ym(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function ioe(e,t){const r=e[t];return typeof r=="string"&&r.trim().length>0?r:void 0}function soe(e,t){const r=e[t];return typeof r=="number"&&Number.isFinite(r)?r:void 0}function ooe(e,t){const r=e[t];return typeof r=="boolean"?r:void 0}function loe(e){if(!Ym(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 uoe(e){if(Ym(e))return Object.keys(e).length>0?e:void 0}function Z5(e){if(!Ym(e))return null;const t=Array.isArray(e.component_results)?e.component_results.flatMap(i=>{const o=Z5(i);return o?[o]:[]}):[],r=loe(e.named_scores),n=Ym(e.metadata)&&Object.keys(e.metadata).length>0?e.metadata:void 0;return{pass:ooe(e,"pass"),score:soe(e,"score"),reason:ioe(e,"reason"),assertion:uoe(e.assertion),namedScores:r,metadata:n,componentResults:t}}function coe(e){if(!e)return null;try{const t=Z5(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 doe(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)}function J5(e){return e===!0?"Pass":e===!1?"Fail":"Unknown"}function e$(e){return e===!0?"border-emerald-800/60 bg-emerald-950/30 text-emerald-200":e===!1?"border-red-700/70 bg-red-950/40 text-red-200":"border-gray-700 bg-gray-950/70 text-gray-300"}function t$(e){return e===!0?"border-emerald-900/50 bg-emerald-950/15":e===!1?"border-red-900/60 bg-red-950/15":"border-gray-800 bg-gray-900/70"}function foe(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: ${doe(e.value)}`),{title:r,details:n}}function r$({scores:e}){return!e||Object.keys(e).length===0?null:c.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:Object.entries(e).map(([t,r])=>{const n=r>=.8?"text-emerald-300":r>=.5?"text-amber-300":"text-red-300";return c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-950/70 p-3 ring-1 ring-white/5",children:[c.jsx("div",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:t}),c.jsx("div",{className:`mt-1 font-mono text-sm ${n}`,children:eo(r)})]},t)})})}function n$({metadata:e}){return!e||Object.keys(e).length===0?null:c.jsxs("details",{className:"rounded-lg border border-gray-800 bg-gray-950/80 p-3",children:[c.jsx("summary",{className:"cursor-pointer text-sm font-medium text-gray-300",children:"Metadata"}),c.jsx("pre",{className:"mt-3 max-h-64 overflow-auto text-xs text-gray-300",children:JSON.stringify(e,null,2)})]})}function a$({score:e}){return e==null?c.jsx("div",{className:"h-2 rounded-full bg-gray-800"}):c.jsx(fo,{score:e,showLabel:!1})}function hoe({result:e}){return c.jsxs("div",{className:`space-y-4 rounded-lg border p-4 ring-1 ring-white/5 ${t$(e.pass)}`,children:[c.jsxs("div",{className:"grid gap-3 md:grid-cols-[minmax(9rem,12rem)_1fr] md:items-center",children:[c.jsx("div",{className:`rounded-lg border px-3 py-2 text-sm font-semibold ${e$(e.pass)}`,children:J5(e.pass)}),c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3 text-xs text-gray-500",children:[c.jsx("span",{children:"Aggregate score"}),c.jsx("span",{className:"font-mono text-gray-300",children:eo(e.score)})]}),c.jsx(a$,{score:e.score})]})]}),e.reason?c.jsx("p",{className:"text-sm text-gray-200",children:e.reason}):null,c.jsx(r$,{scores:e.namedScores}),c.jsx(n$,{metadata:e.metadata})]})}function moe({components:e}){return e.length===0?null:c.jsxs("section",{className:"space-y-3",children:[c.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Component Results"}),c.jsx("div",{className:"space-y-2",children:e.map((t,r)=>c.jsx(i$,{component:t,index:r,depth:0},`${t.reason??"component"}-${r}`))})]})}function poe({result:e}){return c.jsxs("div",{className:"space-y-6",children:[c.jsx(hoe,{result:e}),c.jsx(moe,{components:e.componentResults})]})}function i$({component:e,index:t,depth:r}){const n=foe(e.assertion,`Component ${t+1}`),i=e.componentResults.length>0,o=c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"grid gap-3 md:grid-cols-[minmax(10rem,1fr)_minmax(8rem,12rem)] md:items-center",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("span",{className:"font-medium text-gray-100",children:n.title}),c.jsx("span",{className:`rounded-md border px-1.5 py-0.5 text-[11px] font-medium ${e$(e.pass)}`,children:J5(e.pass)})]}),n.details.length>0?c.jsx("div",{className:"mt-1 flex flex-wrap gap-2 text-xs text-gray-500",children:n.details.map(l=>c.jsx("span",{children:l},l))}):null]}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"mb-1 text-right font-mono text-xs text-gray-400",children:eo(e.score)}),c.jsx(a$,{score:e.score})]})]}),e.reason?c.jsx("p",{className:"mt-1 text-sm text-gray-200",children:e.reason}):null]});return c.jsxs("details",{open:r===0,className:`rounded-lg border p-3 ring-1 ring-white/5 ${t$(e.pass)}`,style:{marginLeft:r>0?`${Math.min(r,4)*1}rem`:void 0},children:[c.jsxs("summary",{className:"flex cursor-pointer list-none items-start gap-3",children:[c.jsx("span",{className:"mt-1 text-xs text-gray-500",children:i?"v":"-"}),o]}),e.namedScores||e.metadata?c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsx(r$,{scores:e.namedScores}),c.jsx(n$,{metadata:e.metadata})]}):null,i?c.jsx("div",{className:"mt-3 space-y-2",children:e.componentResults.map((l,d)=>c.jsx(i$,{component:l,index:d,depth:r+1},`${l.reason??"component"}-${d}`))}):null]})}function O2({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,d=e.testId,{data:f,isLoading:h}=n&&o?Ue(Qh(n,r,d,o,l)):Vh(r,d,o??"",l),p=coe(f==null?void 0:f.content);return o?c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("span",{className:"text-sm font-medium text-gray-400",children:t?"Attempt score":"Overall score"}),c.jsx("div",{className:"flex-1",children:c.jsx(fo,{score:e.score})})]})}),t?c.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[c.jsx(ki,{label:"Duration",value:Q5(t.duration_ms)}),c.jsx(ki,{label:"Cost",value:Wse(t.cost_usd)}),c.jsx(ki,{label:"Tokens",value:Zse(Xse(t))})]}):null,c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-400",children:"Grading"}),c.jsx("button",{type:"button",onClick:()=>i(o),className:"rounded-md border border-gray-700 bg-gray-950/80 px-3 py-1.5 text-xs text-gray-300 transition-colors hover:border-cyan-800/70 hover:text-cyan-200",children:"Open grading JSON"})]}),h?c.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading grading artifact..."}):null,p!=null&&p.error?c.jsx("p",{className:"mt-3 text-sm text-red-300",children:p.error}):null,!h&&!p?c.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"No grading artifact content available."}):null]}),p!=null&&p.result?c.jsx(poe,{result:p.result}):null]}):c.jsx(W5,{result:e,projectId:n})}function s$(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&s$(r.children,t))return!0;return!1}function goe({result:e,group:t,runId:r,projectId:n,onSelectTrial:i}){return c.jsxs("section",{className:"space-y-3",children:[c.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Attempt transcripts"}),t.trials.map((o,l)=>{const d=d1(o,l),f=V5(o,l),h=o.transcript_path,p=h?_n({projectId:n,runId:r,evalId:e.testId,filePath:h,resultDir:e.result_dir,raw:!0}):void 0;return c.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:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("span",{className:"font-medium text-gray-200",children:f}),c.jsx("span",{className:"rounded-md border border-gray-800 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:d})]}),c.jsx("div",{className:"mt-1 truncate font-mono text-xs text-gray-500",title:h,children:h??"No transcript artifact"})]}),c.jsxs("div",{className:"flex flex-wrap gap-2 md:justify-end",children:[c.jsx("button",{type:"button",onClick:()=>i==null?void 0:i(o,"transcript"),disabled:!h,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?c.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]})]},d)})]})}function yoe({result:e,trial:t,runId:r,projectId:n,onOpenFile:i}){const o=e.testId,l=e.result_dir,d=t.transcript_path,f=t.transcript_raw_path,h=t.answer_path,{data:p,isLoading:g}=n&&d?Ue(Qh(n,r,o,d,l)):Vh(r,o,d??"",l),{data:y}=n&&h?Ue(Qh(n,r,o,h,l)):Vh(r,o,h??"",l),x=(p==null?void 0:p.content)??"",b=S.useMemo(()=>F5(x),[x]);if(!d)return c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This attempt does not include a transcript artifact."})]});if(g)return c.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 c.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),c.jsx("p",{className:"mt-2 text-sm text-gray-300",children:b.error}),c.jsx("button",{type:"button",onClick:()=>i(d),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 c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),c.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[c.jsx("code",{children:d})," exists but contains no JSONL rows."]})]});const w=h?_n({projectId:n,runId:r,evalId:o,filePath:h,resultDir:l,raw:!0}):void 0,N=_n({projectId:n,runId:r,evalId:o,filePath:d,resultDir:l,raw:!0}),_=_n({projectId:n,runId:r,evalId:o,filePath:d,resultDir:l,download:!0}),E=f?_n({projectId:n,runId:r,evalId:o,filePath:f,resultDir:l,raw:!0}):void 0;return c.jsx(G5,{entries:b.entries,finalAnswer:h?(y==null?void 0:y.content)??e.output:void 0,answerPath:h,transcriptPath:d,transcriptRawPath:f,answerHref:w,transcriptHref:N,transcriptDownloadHref:_,transcriptRawHref:E,onOpenFile:i})}function voe({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,o=e.result_dir,{data:l,isLoading:d,error:f}=r?Ue(P6(r,t,i,o)):j6(t,i,o),h=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(()=>F5(y),[y]);if(d)return c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifact..."});if(f)return c.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be loaded"}),c.jsx("p",{className:"mt-2 text-sm text-gray-300",children:f.message})]});if(!l||l.status==="missing")return c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),c.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 c.jsxs("div",{className:"rounded-lg border border-amber-900/50 bg-amber-950/20 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-amber-300",children:l.status==="dangling"?"Transcript artifact unavailable":"Transcript pointer unsupported"}),c.jsx("p",{className:"mt-2 text-sm text-gray-300",children:l.message??"The transcript artifact could not be resolved."}),h?c.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:h}):null,l.pointer?c.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:l.pointer}):null]});if(x.error)return c.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),c.jsx("p",{className:"mt-2 text-sm text-gray-300",children:x.error}),c.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:h?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>n(h),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"}),c.jsx("a",{href:_n({projectId:r,runId:t,evalId:i,filePath:h,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 c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),c.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[c.jsx("code",{children:h})," 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=h?_n({projectId:r,runId:t,evalId:i,filePath:h,resultDir:o,raw:!0}):void 0,N=h?_n({projectId:r,runId:t,evalId:i,filePath:h,resultDir:o,download:!0}):void 0,_=p?_n({projectId:r,runId:t,evalId:i,filePath:p,resultDir:o,raw:!0}):void 0;return c.jsx(G5,{entries:x.entries,finalAnswer:g?l.answer_content??e.output:void 0,answerPath:g,transcriptPath:h,transcriptRawPath:p,answerHref:b,transcriptHref:w,transcriptDownloadHref:N,transcriptRawHref:_,onOpenFile:n})}function xoe({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const o=e.testId,l=e.result_dir,{data:d}=r?Ue(T6(r,t,o,l)):b6(t,o,l),f=(d==null?void 0:d.files)??[],[h,p]=S.useState(null),[g,y]=S.useState(!1),x=n??h,b=s$(f,x)?x:f.length>0?Y5(f):null,{data:w,isLoading:N}=r?Ue(Qh(r,t,o,b??"",l)):Vh(t,o,b??"",l);if(f.length===0)return c.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 c.jsxs("div",{className:"relative flex h-full min-h-0 min-w-0 gap-4 overflow-hidden",children:[c.jsx("div",{className:`${g?"block":"hidden"} min-h-0 w-full overflow-auto md:block md:w-auto`,children:c.jsx(Nse,{files:f,selectedPath:b,onSelect:C=>{p(C),i(C),y(!1)}})}),c.jsx("div",{className:`${g?"hidden":"block"} h-full min-h-0 min-w-0 flex-1 overflow-hidden md:block`,children:c.jsx(Cse,{value:_,language:E,height:"100%"})}),c.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?c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"📄"}),c.jsx("span",{children:"Content"})]}):c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"📁"}),c.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"},boe="✓",joe="✗";function wx(){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 woe(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 E2(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(Nt.detail)}function Eh(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 id(e){return`${Math.round(e*100)}%`}function h1(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 o$(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function l$(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function Soe(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 u$(e){return e.total_tokens??Soe(e.token_usage)}function Vm(e,t=0){return e.sample_path??e.attempt_path??e.run_path??`sample-${t+1}`}function Noe(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 _oe(e){return e>=.8?"text-emerald-300":e>=.5?"text-yellow-300":"text-red-300"}function c$(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(c$))??!1}function m1({results:e,runId:t,projectId:r,passThreshold:n,title:i="Results",emptyMessage:o}){const[l,d]=S.useState(()=>wx()),[f,h]=S.useState(()=>E2()),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState("checks"),[N,_]=S.useState(()=>new Set),E=S.useMemo(()=>jse({results:e,passThreshold:n,state:l}),[n,e,l]),C=new Set(E.state.visibleColumnIds),A=f!=null?E.filteredRows.find(G=>G.key===f)??null:null,T=S.useMemo(()=>new Map(E.repeatGroups.map(G=>[G.row.key,G])),[E.repeatGroups]),M=A?T.get(A.key):void 0,D=M&&p?M.trials.find((G,$)=>Vm(G,$)===p)??null:null;S.useEffect(()=>{const G=()=>{d(wx()),h(E2()),g(null),x(null),w("checks")};return window.addEventListener("popstate",G),()=>window.removeEventListener("popstate",G)},[]),S.useEffect(()=>{!f||A||(Eh(null),h(null))},[A,f]);function R(G){const $={...E.state,...G};woe($),d(wx())}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 $=G.toString(),F=`${window.location.pathname}${$?`?${$}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",F),d({}),h(null),g(null),x(null),w("checks")}function k(G){const $=new Set(E.state.visibleColumnIds);$.has(G)?$.delete(G):$.add(G),R({visibleColumnIds:[...$]})}function H(G){Eh(G),h(G),g(null),x(null),w("checks")}function U(G,$,F="checks"){Eh(G),h(G),g(Vm($)),w(F),x(Coe($))}function ae(){Eh(null),h(null),g(null),x(null),w("checks")}function Z(G){_($=>{const F=new Set($);return F.has(G)?F.delete(G):F.add(G),F})}return e.length===0?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:o??c.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"})}):c.jsxs("section",{className:"space-y-3",children:[c.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-baseline sm:justify-between",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-400",children:i}),c.jsxs("p",{className:"text-xs text-gray-500",children:[E.filteredRows.length," of ",E.rows.length," rows"]})]}),c.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-950/80 p-3 ring-1 ring-white/5",children:[c.jsx("div",{className:"flex flex-wrap gap-2",children:k5.map(G=>c.jsxs("button",{type:"button",onClick:()=>R({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-700/70 bg-cyan-950/40 text-cyan-200":"border-gray-800 bg-gray-950/80 text-gray-400 hover:border-gray-600 hover:bg-gray-900/70 hover:text-gray-100"}`,children:[c.jsx("span",{children:G.label}),c.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:E.viewCounts[G.id]})]},G.id))}),c.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(220px,1fr)_minmax(150px,220px)_minmax(150px,220px)_auto_auto]",children:[c.jsxs("label",{className:"min-w-0",children:[c.jsx("span",{className:"sr-only",children:"Search results"}),c.jsx("input",{type:"search",value:E.state.search,onChange:G=>R({search:G.target.value}),placeholder:"Search tests, providers, models, 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"})]}),c.jsxs("label",{children:[c.jsx("span",{className:"sr-only",children:"Filter by provider/model"}),c.jsxs("select",{value:E.state.target,onChange:G=>R({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:[c.jsx("option",{value:"all",children:"All provider/model labels"}),E.targetOptions.map(G=>c.jsx("option",{value:G,children:G},G))]})]}),c.jsxs("label",{children:[c.jsx("span",{className:"sr-only",children:"Filter by grader"}),c.jsxs("select",{value:E.state.grader,onChange:G=>R({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:[c.jsx("option",{value:"all",children:"All graders"}),E.graderOptions.map(G=>c.jsx("option",{value:G,children:G},G))]})]}),c.jsxs("details",{className:"group relative",children:[c.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"}),c.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:[c.jsx("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Columns"}),c.jsx("div",{className:"max-h-72 space-y-2 overflow-auto pr-1",children:E.columns.map(G=>c.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[c.jsx("input",{type:"checkbox",checked:C.has(G.id),onChange:()=>k(G.id),className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500"}),c.jsx("span",{className:"min-w-0 truncate",title:G.label,children:G.label})]},G.id))})]})]}),c.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"})]})]}),c.jsxs("div",{className:A?"grid min-w-0 max-w-full gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(360px,42rem)]":"",children:[c.jsx("div",{className:"min-w-0",children:E.filteredRows.length===0?c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[c.jsx("p",{className:"text-lg text-gray-400",children:"No matching evaluations"}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Adjust the result filters or display preset."})]}):c.jsx(Ooe,{rows:E.filteredRows,visibleColumns:E.visibleColumns,passThreshold:n,selectedRowKey:f,selectedTrialPath:p,repeatGroupsByRowKey:T,expandedRepeatRows:N,onToggleRepeatGroup:Z,onOpenDetail:H,onOpenTrialDetail:U})}),A&&c.jsx(Uoe,{row:A,runId:t,projectId:r,repeatGroup:M,selectedTrial:D,selectedTrialPath:p,initialTab:b,initialFilePath:y,onOpenTrialDetail:(G,$)=>U(A.key,G,$),onClose:ae})]})]})}function Ooe({rows:e,visibleColumns:t,passThreshold:r,selectedRowKey:n,selectedTrialPath:i,repeatGroupsByRowKey:o,expandedRepeatRows:l,onToggleRepeatGroup:d,onOpenDetail:f,onOpenTrialDetail:h}){return c.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800 bg-gray-950/80 ring-1 ring-white/5",children:c.jsxs("table",{className:"w-full whitespace-nowrap text-left text-sm",style:{minWidth:`${Loe(t)}px`},children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/80",children:c.jsx("tr",{children:t.map(p=>c.jsx("th",{className:Ioe(p.id),title:p.label,children:c.jsx("span",{className:$oe(p.id)?"sr-only":"block max-w-48 truncate",children:p.label})},p.id))})}),c.jsx("tbody",{className:"divide-y divide-gray-800/70",children:e.map(p=>{const g=o.get(p.key),y=n===p.key&&!i,x=g?l.has(p.key):!1;return c.jsxs(S.Fragment,{children:[c.jsx("tr",{className:`cursor-pointer transition-colors ${y?"bg-cyan-950/30 ring-1 ring-inset ring-cyan-800/60":p.status==="failing"?"bg-red-950/10 hover:bg-red-950/20":"hover:bg-gray-900/50"} ${g?"bg-gray-950/30":""}`,onClick:()=>f(p.key),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f(p.key))},tabIndex:0,"aria-selected":y,children:t.map(b=>c.jsx("td",{className:A2(b.id,"py-3"),children:c.jsx(zoe,{column:b,row:p,repeatGroup:g,repeatExpanded:x,passThreshold:r,isSelected:y,onToggleRepeatGroup:d})},`${p.key}:${b.id}`))}),g&&x?g.trials.map((b,w)=>{const N=Vm(b,w),_=n===p.key&&i===N;return c.jsx("tr",{className:`cursor-pointer bg-gray-950/60 transition-colors ${_?"bg-cyan-950/20":"hover:bg-gray-900/50"}`,"aria-label":`${p1(b,w)} for ${p.testId}`,onClick:()=>h(p.key,b),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),h(p.key,b))},tabIndex:0,"aria-selected":_,children:t.map(E=>c.jsx("td",{className:A2(E.id,"py-2"),children:c.jsx(Toe,{column:E,row:p,trial:b,index:w,passThreshold:r})},`${p.key}:${N}:${E.id}`))},`${p.key}:${N}`)}):null]},p.key)})})]})})}function Eoe(e,t){return e.status==="passed"?!0:e.status==="failed"||e.status==="skipped"?!1:e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function Aoe(e,t=0){return typeof e.sample=="number"?e.sample:typeof e.sample_index=="number"?e.sample_index+1:typeof e.attempt=="number"?e.attempt+1:t+1}function p1(e,t=0){const r=`Attempt ${Aoe(e,t)}`;return typeof e.retry_index=="number"&&e.retry_index>0?`${r} retry ${e.retry_index}`:r}function Coe(e){return e.grading_path??e.metrics_path??e.timing_path??e.transcript_path??e.answer_path??null}function d$(e,t){return e?t?`[provider:${t}] ${e}`:e:t?`Provider error: ${t}`:void 0}function f$(e){var t,r,n,i;return e.target_error_kind??((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 Toe({column:e,row:t,trial:r,index:n,passThreshold:i}){const o=Eoe(r,i),l=r.execution_status==="execution_error",d=l?"error":o?"passing":"failing",f=l?"Error":o?"Passing":"Failing",h=p1(r,n),p=Vm(r,n);switch(e.id){case"status":return c.jsx(g1,{status:d,label:f});case"expander":return c.jsx("span",{"aria-hidden":"true",className:"mx-auto block h-7 w-px bg-gray-800"});case"test":return c.jsx(Poe,{label:h,artifactLabel:p,parentTestId:t.testId,trial:r});case"target":return c.jsx(m$,{target:t.targetLabel,tone:"text-gray-500"});case"score":return c.jsx(Fr,{rate:r.score??0});case"eval":return c.jsx(Al,{value:t.evalLabel,tone:"text-gray-500"});case"category":return c.jsx(Al,{value:t.categoryLabel,tone:"text-gray-500"});case"duration":return c.jsx("span",{className:"text-gray-500",children:h1(r.duration_ms)});case"cost_tokens":return c.jsx(Koe,{trial:r});case"review":return c.jsx("span",{className:"text-gray-700",children:"-"});case"error":return c.jsx(Al,{value:d$(r.error,f$(r)),tone:"text-red-300"});default:return c.jsx("span",{className:"text-gray-700",children:"-"})}}function Poe({label:e,artifactLabel:t,parentTestId:r,trial:n}){return c.jsxs("div",{className:"max-w-[28rem] min-w-0 border-l border-gray-800 pl-3",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.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"}),c.jsx("span",{className:"truncate font-medium text-gray-300",title:e,children:e})]}),c.jsxs("div",{className:"mt-0.5 truncate text-xs text-gray-600",title:`${r} · ${t}`,children:["Under ",r," · ",t]}),c.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?c.jsxs("span",{children:[n.total_tool_calls," tool calls"]}):null}),n.error?c.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:n.error,children:n.error}):null]})}function g1({status:e,label:t}){const r=e==="passing",n=e==="error"||e==="partial",i=r?boe:joe,o=r?"border-emerald-900/60 bg-emerald-950/30 text-emerald-300":n?"border-amber-900/60 bg-amber-950/30 text-amber-300":"border-red-800/70 bg-red-950/40 text-red-300";return c.jsx("span",{className:`inline-flex h-6 w-6 items-center justify-center rounded-md border text-base font-semibold ${o}`,title:t,children:i})}function Moe({group:e,passThreshold:t}){const n=e.passRate>=t?"passing":e.passedTrials>0?"partial":"failing";return c.jsx(g1,{status:n,label:`${e.passedTrials}/${e.trialCount} attempts passed`})}function Roe({group:e}){const t=e.passedTrials===e.trialCount?"Stable pass":e.passedTrials===0?"Stable fail":"Flaky",r=[`${e.passedTrials}/${e.trialCount} attempts passed`,`${id(e.passRate)} success`,`${id(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 c.jsxs("div",{className:"mt-1 flex max-w-[34rem] flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[c.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"}),c.jsx("span",{className:t==="Stable pass"?"text-emerald-300":t==="Stable fail"?"text-red-300":"text-yellow-300",children:t}),c.jsx("span",{className:"min-w-0 truncate text-gray-500",title:r.join(" · "),children:r.join(" · ")})]})}function Doe({group:e}){return c.jsxs("div",{className:"flex min-w-0 flex-col items-end gap-1",children:[c.jsx(Fr,{rate:e.passRate}),c.jsx("div",{className:"text-xs text-gray-500",children:"Attempt success"}),c.jsxs("div",{className:"text-xs tabular-nums text-gray-600",title:`Mean score ${id(e.meanScore)}`,children:["Mean score ",id(e.meanScore)]})]})}function koe({group:e,row:t}){return c.jsxs("span",{className:"text-gray-400",children:["Avg ",h1(e.meanDurationMs??t.result.durationMs)]})}function h$(e){return["duration","cost_tokens"].includes(e)||e.startsWith("grader:")}function eg(e){return e==="status"||e==="expander"}function $oe(e){return eg(e)}function Loe(e){const t=e.reduce((r,n)=>r+(eg(n.id)?44:136),0);return Math.max(760,t)}function Ioe(e){return eg(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 ${h$(e)?"text-right":""}`}function A2(e,t){return eg(e)?`w-11 min-w-11 max-w-11 px-2 ${t} text-center align-middle`:`px-4 ${t} align-middle ${h$(e)?"text-right tabular-nums":""}`}function zoe({column:e,row:t,repeatGroup:r,repeatExpanded:n,passThreshold:i,isSelected:o,onToggleRepeatGroup:l}){if(e.id.startsWith("grader:")){const d=e.id.slice(7);return c.jsx(Goe,{score:t.graderScores.get(d),passThreshold:i})}switch(e.id){case"status":return r?c.jsx(Moe,{group:r,passThreshold:i}):c.jsx(g1,{status:t.status,label:t.statusLabel});case"expander":return r?c.jsx(qoe,{row:t,repeatExpanded:n,onToggleRepeatGroup:l}):c.jsx("span",{"aria-hidden":"true",className:"block h-5"});case"test":return c.jsx(Boe,{row:t,repeatGroup:r,isSelected:o});case"target":return c.jsx(m$,{target:t.targetLabel});case"score":return t.executionError?c.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?c.jsx(Doe,{group:r}):c.jsx(Fr,{rate:t.result.score});case"eval":return c.jsx(Al,{value:t.evalLabel});case"category":return c.jsx(Al,{value:t.categoryLabel});case"duration":return r?c.jsx(koe,{group:r,row:t}):c.jsx("span",{className:"text-gray-400",children:h1(t.result.durationMs)});case"cost_tokens":return c.jsx(Hoe,{row:t,repeatGroup:r});case"error":return c.jsx(Al,{value:d$(t.result.error,f$(t.result)),tone:"text-red-300"});default:return c.jsx("span",{className:"text-gray-600",children:"-"})}}function Boe({row:e,repeatGroup:t,isSelected:r}){return c.jsxs("div",{className:"max-w-[24rem] min-w-0",children:[c.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?c.jsx(Roe,{group:t}):null,e.result.error?c.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:e.result.error,children:e.result.error}):null]})}function Uoe({row:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i,selectedTrialPath:o,initialTab:l,initialFilePath:d,onOpenTrialDetail:f,onClose:h}){const p=qB(t,e.testId,{projectId:r,resultDir:e.result.result_dir,evalPath:e.result.eval_path}),g=i?`${e.testId} · ${p1(i)}`:e.testId,y=n&&!i,x=`${e.key}:${o??""}:${l}`;return c.jsxs("aside",{ref:Foe,className:"min-w-0 max-w-full overflow-hidden rounded-lg border border-cyan-950/70 bg-gray-950/95 ring-1 ring-white/10 xl:sticky xl:top-4 xl:max-h-[calc(100vh-2rem)]",children:[c.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3 border-b border-gray-800 bg-gray-900/60 px-4 py-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-cyan-500/80",children:"Row detail"}),c.jsx("h4",{className:"mt-1 truncate text-base font-semibold text-white",title:g,children:g}),c.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",title:e.targetLabel,children:[e.targetLabel,e.evalLabel?` · ${e.evalLabel}`:""]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[c.jsx("a",{href:p,className:"rounded-md border border-gray-700 bg-gray-950/80 px-2.5 py-1.5 text-xs text-gray-300 transition-colors hover:border-cyan-800/70 hover:text-cyan-200",children:"Full page"}),c.jsx("button",{type:"button",onClick:h,className:"rounded-md border border-gray-700 bg-gray-950/80 px-2.5 py-1.5 text-xs text-gray-300 transition-colors hover:border-gray-500 hover:text-gray-100",children:"Close"})]})]}),c.jsx("div",{className:"h-[36rem] min-h-[28rem] min-w-0 overflow-hidden xl:h-[calc(100vh-9rem)]",children:c.jsx(f1,{eval:e.result,runId:t,projectId:r,repeatGroup:y?n:void 0,selectedTrial:i,initialTab:l,initialSelectedFilePath:d,onSelectTrial:f},`${e.key}:${o??"aggregate"}:${d??""}`)})]},x)}function m$({target:e,tone:t="text-gray-300"}){return c.jsx("div",{className:`max-w-[14rem] truncate ${t}`,title:e,children:e})}function qoe({row:e,repeatExpanded:t,onToggleRepeatGroup:r}){return c.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 Foe(e){e&&window.requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest",inline:"nearest"})})}function Hoe({row:e,repeatGroup:t}){const r=(t==null?void 0:t.trials.map(h=>h.cost_usd).filter(h=>typeof h=="number"&&Number.isFinite(h)))??[],n=(t==null?void 0:t.trials.map(u$).filter(h=>typeof h=="number"&&Number.isFinite(h)))??[],i=r.length>0?r.reduce((h,p)=>h+p,0):void 0,o=n.length>0?n.reduce((h,p)=>h+p,0):void 0,l=o$(e.result.costUsd??i),d=l$(e.tokenTotal??o),f=Noe(e.result);return!l&&!d?c.jsx("span",{className:"text-gray-600",children:"-"}):c.jsxs("div",{className:"min-w-0 text-right",children:[l?c.jsx("div",{className:"tabular-nums text-gray-300",children:l}):null,d?c.jsx("div",{className:"text-xs tabular-nums text-gray-500",title:f,children:d}):null]})}function Koe({trial:e}){const t=o$(e.cost_usd),r=l$(u$(e));return!t&&!r?c.jsx("span",{className:"text-gray-700",children:"-"}):c.jsxs("div",{className:"min-w-0 text-right",children:[t?c.jsx("div",{className:"tabular-nums text-gray-500",children:t}):null,r?c.jsx("div",{className:"text-xs tabular-nums text-gray-600",children:r}):null]})}function Goe({score:e,passThreshold:t}){if(!e)return c.jsx("span",{className:"text-gray-600",children:"-"});const r=e.score<t||c$(e);return c.jsxs("div",{className:"min-w-0 text-right",children:[c.jsx("div",{className:`tabular-nums ${_oe(e.score)}`,children:id(e.score)}),c.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?c.jsx("span",{className:`block max-w-[14rem] truncate ${t}`,title:e,children:e}):c.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),d=l>=80?"text-cyan-300":l>=60?"text-amber-300":"text-red-300";return c.jsxs("div",{className:"flex flex-wrap items-center gap-5 rounded-lg border border-cyan-950/70 bg-gray-950/80 px-5 py-3 ring-1 ring-white/5",children:[c.jsx(vl,{label:"Pass Rate",value:`${l}%`,accent:d,large:!0}),c.jsx("div",{className:"h-8 w-px bg-cyan-900/50"}),c.jsx(vl,{label:"Passed",value:String(t),accent:"text-emerald-400"}),c.jsx(vl,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&c.jsx(vl,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),c.jsx(vl,{label:"Total",value:String(e)}),o!==void 0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"h-8 w-px bg-cyan-900/50"}),c.jsx(vl,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function vl({label:e,value:t,accent:r,large:n}){return c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{className:"text-xs font-medium text-gray-500",children:e}),c.jsx("span",{className:`tabular-nums font-semibold ${n?"text-2xl":"text-lg"} ${r??"text-gray-100"}`,children:t})]})}function p$({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({}),d=rse(e),f=e.length,h=np(e,i),p=e.reduce((b,w)=>b+(w.costUsd??0),0),g=Sae(e,i),y=g$(g,o),x=b=>{l(w=>({...w,[b]:!w[b]}))};return f===0?c.jsxs("div",{className:"space-y-6",children:[c.jsx(eu,{total:0,passed:0,failed:0,passRate:0}),c.jsx(C2,{href:d}),c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[c.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsx(eu,{total:f,passed:h.passed,failed:h.failed,passRate:h.passRate,executionErrors:h.executionErrors,totalCost:p>0?p:void 0}),c.jsx(C2,{href:d}),c.jsxs("div",{children:[c.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),c.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800 bg-gray-950/80 ring-1 ring-white/5",children:c.jsxs("table",{className:"min-w-[620px] w-full whitespace-nowrap text-left text-sm",children:[c.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/80",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),c.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),c.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),c.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failures"}),c.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Execution Errors"}),c.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-800/70",children:y.map(b=>{const w=o[b.name]===!0;return c.jsxs("tr",{className:"transition-colors hover:bg-gray-900/50",children:[c.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-2.5 font-medium text-gray-200",children:c.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:"inline-block h-4 shrink-0",style:{width:`${b.depth*16}px`}}),b.childCount>0?c.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?"-":"+"}):c.jsx("span",{className:"h-5 w-5 shrink-0"}),r?c.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}):c.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?c.jsx("span",{className:"truncate text-xs font-normal text-gray-500",children:b.name}):null,b.childCount>0?c.jsx("span",{className:"shrink-0 text-xs font-normal text-gray-500",children:b.childCount}):null]})}),c.jsx("td",{className:"px-4 py-2.5",children:c.jsx(Fr,{rate:b.total-b.executionErrors>0?b.passed/(b.total-b.executionErrors):0})}),c.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:b.passed}),c.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:b.failed>0?b.failed:c.jsx("span",{className:"text-gray-600",children:"0"})}),c.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-amber-400",children:b.executionErrors>0?b.executionErrors:c.jsx("span",{className:"text-gray-600",children:"0"})}),c.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:b.total})]},b.name)})})]})})]}),c.jsx(m1,{results:e,runId:t,projectId:r,passThreshold:i,title:"All Evals"}),c.jsx(Yoe,{runId:t,projectId:r})]})}function g$(e,t){return e.flatMap(r=>[r,...t[r.name]?g$(r.children,t):[]])}function C2({href:e}){return e?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-medium text-gray-200",children:"External trace"}),c.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Phoenix"})]}),c.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 Yoe({runId:e,projectId:t}){const[r,n]=S.useState(!1),{data:i,isLoading:o,error:l}=s6(e,t);return!o&&!l&&i==null?null:c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>n(d=>!d),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:[c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{"aria-hidden":"true",children:r?"▾":"▸"}),"Run Log"]}),c.jsx("span",{className:"text-xs text-gray-500",children:o?"Loading…":l?"Failed to load":i?`${i.length} chars`:""})]}),r&&c.jsx("div",{className:"mt-2 overflow-hidden rounded-lg border border-gray-800 bg-black",children:l?c.jsxs("div",{className:"p-4 text-sm text-red-400",children:["Failed to load run log: ",l.message]}):c.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 tg({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 c.jsxs(c.Fragment,{children:[c.jsx("span",{className:`text-sm font-medium ${n}`,children:e.charAt(0).toUpperCase()+e.slice(1)}),!t&&c.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]})}function rg({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,o]=S.useState(!1),[l,d]=S.useState(null);if(!Vie(t,r))return null;async function f(){o(!0),d(null);try{await B6(e,n)}catch(h){d(h instanceof Error?h.message:"Failed to stop run"),o(!1)}}return c.jsxs("div",{className:"flex flex-col items-end gap-1",children:[c.jsx("button",{type:"button",onClick:f,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…":c.jsxs(c.Fragment,{children:[c.jsx("span",{"aria-hidden":"true",className:"inline-block h-2.5 w-2.5 rounded-[1px] bg-current"}),"Stop"]})}),l&&c.jsx("p",{className:"text-xs text-red-400",children:l})]})}const y$=dr("/runs/$runId")({component:Voe});function Voe(){var w;const{runId:e}=y$.useParams(),{data:t,isLoading:r,error:n}=pd(e),{data:i}=pt(),{data:o}=tp(),[l,d]=S.useState(!1),f=(i==null?void 0:i.read_only)===!0;if(r)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(N=>c.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},N))})]});if(n)return c.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 h=(w=t==null?void 0:t.results)==null?void 0:w[0],p=h==null?void 0:h.target,g=p?{target:p}:void 0,y=t==null?void 0:t.status,x=y==="starting"||y==="running",b=KM({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 c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:b.heading,children:b.heading}),b.sourceBadge?c.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?c.jsx("p",{className:"mt-1 text-sm text-gray-500",children:b.meta}):null,b.sourceContext.length>0?c.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:b.sourceContext.map(N=>c.jsxs("span",{children:[c.jsxs("span",{className:"text-gray-600",children:[N.label,":"]})," ",N.value]},`${N.label}:${N.value}`))}):null]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!f&&x?c.jsx(rg,{runId:e,status:y,isReadOnly:f}):c.jsx(M5,{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:f,plannedTestCount:t==null?void 0:t.planned_test_count,runStatus:y}),y&&c.jsx(tg,{status:y}),!f&&!x&&c.jsx("button",{type:"button",onClick:()=>d(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"Start"})]})]}),c.jsx(p$,{results:(t==null?void 0:t.results)??[],runId:e}),!f&&c.jsx(So,{open:l,onClose:()=>d(!1),prefill:g})]})}const Sx=[{id:"runs",label:"🏃 Recent Runs",title:"Recent Runs"},{id:"tags",label:"🏷️ Tags",title:"Tags"},{id:"analytics",label:"📊 Analytics",title:"Analytics"},{id:"targets",label:"🤖 Providers",title:"Providers"}],v$=dr("/projects/$projectId")({component:Qoe});function Qoe(){var x,b;const{projectId:e}=v$.useParams(),r=oj().location.search,n=r.tab,i=(x=r.key)!=null&&x.trim()?r.key:jl,o=po(),[l,d]=S.useState(!1),{data:f}=pt(e),h=(f==null?void 0:f.read_only)===!0,p=e,g=Sx.some(w=>w.id===n)?n:"runs",y=((b=Sx.find(w=>w.id===g))==null?void 0:b.title)??"Recent Runs";return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:y}),!h&&c.jsx("button",{type:"button",onClick:()=>d(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"Start"})]}),c.jsx("div",{className:"border-b border-gray-800 sm:overflow-x-auto",children:c.jsx("div",{className:"flex flex-wrap gap-1 sm:min-w-max sm:flex-nowrap",children:Sx.map(w=>c.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"&&c.jsx(Xoe,{projectId:e,projectName:p,readOnly:h}),g==="tags"&&c.jsx(C5,{projectId:e,tagKey:i,onTagKeyChange:w=>o({to:"/projects/$projectId",params:{projectId:e},search:{tab:"tags",key:w}})}),g==="analytics"&&c.jsx(Woe,{projectId:e,readOnly:h}),g==="targets"&&c.jsx(T5,{projectId:e}),!h&&c.jsx(So,{open:l,onClose:()=>d(!1),projectId:e})]})}function Xoe({projectId:e,projectName:t,readOnly:r}){const n=ho(),{data:i,isLoading:o,error:l,hasNextPage:d,fetchNextPage:f,isFetchingNextPage:h}=A6(e),{data:p}=vj(e),{data:g}=tp(e),[y,x]=S.useState(!1),[b,w]=S.useState(!1),[N,_]=S.useState(null),E=((p==null?void 0:p.runs)??[]).filter(R=>R.status==="starting"||R.status==="running"),C=Jp((i==null?void 0:i.runs)??[]),A=C.filter(R=>R.on_remote===!0).length,T=(g==null?void 0:g.configured)===!0?RM(A,C.length,g.branch):void 0;async function M(){x(!0),_(null);try{const R=await zM(e);n.setQueryData(Lc(e).queryKey,R);const z=Gh(R);_(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(R){_(Yh(R,g)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{x(!1)}}async function D(){w(!0),_(null);try{const R=await BM(e);n.setQueryData(Lc(e).queryKey,R),_(Gh(R)),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(R){_(Yh(R,g)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{w(!1)}}return S.useEffect(()=>{if((N==null?void 0:N.kind)!=="success")return;const R=window.setTimeout(()=>_(null),7e3);return()=>window.clearTimeout(R)},[N]),o?c.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(R=>c.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},R))}):l?c.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]}):c.jsxs("div",{className:"space-y-4",children:[E.length>0&&c.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[c.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:c.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),c.jsx("ul",{className:"divide-y divide-gray-800/50",children:E.map(R=>c.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[c.jsxs("div",{className:"min-w-0 flex items-center gap-3",children:[c.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),c.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:R.id}),c.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(R.started_at).toLocaleTimeString()})]}),c.jsx(Ee,{to:"/projects/$projectId/jobs/$runId",params:{projectId:e,runId:R.id},className:"flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},R.id))})]}),c.jsx(A5,{remoteStatus:g,syncInFlight:y,onSync:M,projectName:t,syncFeedback:N,onRemoteSummary:T,onConfirmMerge:D,confirmMergeInFlight:b}),c.jsx(Zp,{runs:C,projectId:e,enableCombine:!r,remoteBranch:g==null?void 0:g.branch,hasNextPage:d,isFetchingNextPage:h,onLoadMore:()=>void f()})]})}function Woe({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:o}=Ue(IM(e));return c.jsx(E5,{data:r,isLoading:n,isError:i,error:o,projectId:e,readOnly:t})}const x$=dr("/jobs/$runId")({component:Zoe});function Zoe(){const{runId:e}=x$.useParams(),{data:t,isLoading:r,error:n}=yj(e),{data:i}=pt(),o=(i==null?void 0:i.read_only)===!0;if(r)return c.jsxs("div",{className:"space-y-4",children:[c.jsx(Nx,{}),c.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(n||!t)return c.jsxs("div",{className:"space-y-4",children:[c.jsx(Nx,{}),c.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 c.jsxs("div",{className:"space-y-4",children:[c.jsx(Nx,{}),c.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:e}),c.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(t.started_at).toLocaleString(),t.finished_at&&c.jsxs(c.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"]})]})]}),c.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[c.jsx(rg,{runId:e,status:t.status,isReadOnly:o}),c.jsx(tg,{status:t.status})]})]}),c.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[c.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),c.jsx("code",{className:"break-all text-xs text-cyan-300",children:t.command})]}),t.stdout?c.jsxs("div",{children:[c.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),c.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:t.stdout})})]}):!l&&c.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[c.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&&c.jsxs("div",{children:[c.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),c.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:t.stderr})})]}),l&&c.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",c.jsx("span",{className:t.exit_code===0?"text-emerald-400":"text-red-400",children:t.exit_code})]})]})}function Nx(){return c.jsx(Ee,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const Joe=dr("/experiments/$experimentName")({beforeLoad:({params:e})=>{throw rj({to:"/tags/$key/$value",params:{key:"experiment",value:e.experimentName}})}});function ele(e){return`(no ${e})`}function tle(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===""?ele(t):r}function b$({tagKey:e,tagValue:t,projectId:r}){var x;const{data:n,isLoading:i}=Ue(r?mj(r,e):hj(e)),{data:o,isLoading:l}=Ue(r?gj(r):fj);if(i||l)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(b=>c.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},b))})]});const f=(x=n==null?void 0:n.groups)==null?void 0:x.find(b=>b.name===t),h=Jp(((o==null?void 0:o.runs)??[]).filter(b=>tle(b,e)===t)),p=(f==null?void 0:f.pass_rate)??0,g=h.length,y=(f==null?void 0:f.target_count)??0;return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:Zi(e)}),c.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[g," run",g!==1?"s":""," · ",y," provider/model label",y!==1?"s":"",(f==null?void 0:f.last_run)&&c.jsxs("span",{className:"ml-2",children:["· Last run: ",T2(f.last_run)]})]})]}),f&&c.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[c.jsx(Ah,{label:"Runs",value:String(g)}),c.jsx(Ah,{label:"Providers",value:String(y)}),c.jsx(Ah,{label:"Pass Rate",value:`${Math.round(p*100)}%`,accent:"text-cyan-400"}),c.jsx(Ah,{label:"Last Run",value:T2(f.last_run)})]}),c.jsxs("div",{children:[c.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),c.jsx(Zp,{runs:h,projectId:r,emptyMessage:c.jsxs("div",{children:[c.jsxs("p",{className:"text-lg text-gray-400",children:["No evaluation runs found for ",Zi(e)," ",c.jsx("code",{children:t}),"."]}),c.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Runs will appear here once this value has execution results."})]})})]})]})}function Ah({label:e,value:t,accent:r}){return c.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[c.jsx("p",{className:"text-sm text-gray-400",children:e}),c.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${r??"text-white"}`,children:t})]})}function T2(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 j$=dr("/tags/$key/$value")({component:rle});function rle(){const{key:e,value:t}=j$.useParams();return c.jsx(b$,{tagKey:e,tagValue:t})}const w$=dr("/evals/$runId/$evalId")({component:nle});function nle(){const{runId:e,evalId:t}=w$.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}=pd(e),{data:d}=pt(),[f,h]=S.useState(!1),p=(d==null?void 0:d.read_only)===!0;if(o)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(l)return c.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=>ep(b,t,{resultDir:r,evalPath:n}));if(!g)return c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:c.jsxs("p",{className:"text-gray-400",children:["Eval ",c.jsx("code",{className:"text-cyan-400",children:t})," not found in run"," ",c.jsx("code",{className:"text-cyan-400",children:e}),"."]})});const y=(d==null?void 0:d.threshold)??(d==null?void 0:d.pass_threshold)??.8,x=to(g.score,y)&&g.executionStatus!=="error"&&g.executionStatus!=="failed";return c.jsxs("div",{className:"flex h-full flex-col gap-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"break-words text-sm text-gray-400",children:["Run: ",e," / Eval: ",g.eval_path??t]}),c.jsxs("h1",{className:"mt-1 flex min-w-0 items-start gap-2 break-words text-2xl font-semibold text-white",children:[c.jsx("span",{className:`shrink-0 text-2xl font-bold leading-none ${x?"text-emerald-400":"text-red-400"}`,children:x?"✓":"✗"}),c.jsx("span",{className:"min-w-0",children:t})]})]}),!p&&c.jsxs("button",{type:"button",onClick:()=>h(!0),className:"inline-flex shrink-0 items-center gap-1 self-start whitespace-nowrap rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:[c.jsx("span",{"aria-hidden":"true",children:"▶"}),c.jsx("span",{children:"Run this Test"})]})]}),c.jsx(f1,{eval:g,runId:e}),!p&&c.jsx(So,{open:f,onClose:()=>h(!1),prefill:{testIds:[t],target:g.target}})]})}const S$=dr("/runs/$runId_/suite/$suite")({component:ale});function ale(){const{runId:e,suite:t}=S$.useParams(),{data:r,isLoading:n,error:i}=pd(e),{data:o}=pt(),l=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;if(n)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(g=>c.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},g))})]});if(i)return c.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 d=((r==null?void 0:r.results)??[]).filter(g=>(g.suite??"Uncategorized")===t),f=d.length,h=np(d,l),p=d.reduce((g,y)=>g+(y.costUsd??0),0);return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",e]})]}),c.jsx(eu,{total:f,passed:h.passed,failed:h.failed,passRate:h.passRate,executionErrors:h.executionErrors,totalCost:p>0?p:void 0}),f===0?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:c.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):c.jsx(m1,{results:d,runId:e,passThreshold:l,title:"Suite Evals"})]})}const N$=dr("/runs/$runId_/category/$category")({component:ile});function ile(){const{runId:e,category:t}=N$.useParams(),{data:r,isLoading:n,error:i}=$M(e,t);if(n)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>c.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(i)return c.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),d=o.reduce((y,x)=>y+x.passed,0),f=o.reduce((y,x)=>y+x.failed,0),h=o.reduce((y,x)=>y+ur(x),0),p=l-h,g=p>0?d/p:0;return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",e]})]}),c.jsx(eu,{total:l,passed:d,failed:f,passRate:g,executionErrors:h}),o.length===0?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:c.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),c.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:o.map(y=>c.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:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:y.name}),c.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[y.passed,"/",eR(y)]})]}),c.jsx("div",{className:"mt-2",children:c.jsx(fo,{score:y.avg_score})}),c.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[c.jsxs("span",{className:"text-emerald-400",children:[y.passed," passed"]}),y.failed>0&&c.jsxs("span",{className:"text-red-400",children:[y.failed," failed"]}),ur(y)>0&&c.jsxs("span",{className:"text-amber-400",children:[ur(y)," execution errors"]})]})]},y.name))})]})]})}const _$=dr("/projects/$projectId_/runs/$runId")({component:sle});function sle(){var N;const{projectId:e,runId:t}=_$.useParams(),{data:r,isLoading:n,error:i}=gd(e,t),{data:o}=pt(e),{data:l}=tp(e),[d,f]=S.useState(!1),h=(o==null?void 0:o.read_only)===!0;if(n)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(_=>c.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},_))})]});if(i)return c.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=KM({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 c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:w.heading,children:w.heading}),w.sourceBadge?c.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?c.jsx("p",{className:"mt-1 text-sm text-gray-500",children:w.meta}):null,w.sourceContext.length>0?c.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:w.sourceContext.map(_=>c.jsxs("span",{children:[c.jsxs("span",{className:"text-gray-600",children:[_.label,":"]})," ",_.value]},`${_.label}:${_.value}`))}):null]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!h&&b?c.jsx(rg,{runId:t,status:x,isReadOnly:h,projectId:e}):c.jsx(M5,{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:h,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:x}),x&&c.jsx(tg,{status:x}),!h&&!b&&c.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:"Start"})]})]}),c.jsx(p$,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!h&&c.jsx(So,{open:d,onClose:()=>f(!1),projectId:e,prefill:y})]})}const O$=dr("/projects/$projectId_/jobs/$runId")({component:ole});function ole(){const{projectId:e,runId:t}=O$.useParams(),{data:r,isLoading:n,error:i}=yj(t,e),{data:o}=pt(e),l=(o==null?void 0:o.read_only)===!0;if(n)return c.jsxs("div",{className:"space-y-4",children:[c.jsx(_x,{projectId:e}),c.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(i||!r)return c.jsxs("div",{className:"space-y-4",children:[c.jsx(_x,{projectId:e}),c.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 d=r.status==="finished"||r.status==="failed";return c.jsxs("div",{className:"space-y-4",children:[c.jsx(_x,{projectId:e}),c.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:t}),c.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(r.started_at).toLocaleString(),r.finished_at&&c.jsxs(c.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"]})]})]}),c.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[c.jsx(rg,{runId:t,status:r.status,isReadOnly:l,projectId:e}),c.jsx(tg,{status:r.status})]})]}),c.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[c.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),c.jsx("code",{className:"break-all text-xs text-cyan-300",children:r.command})]}),r.stdout?c.jsxs("div",{children:[c.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),c.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:r.stdout})})]}):!d&&c.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[c.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&&c.jsxs("div",{children:[c.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),c.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:r.stderr})})]}),d&&c.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",c.jsx("span",{className:r.exit_code===0?"text-emerald-400":"text-red-400",children:r.exit_code})]})]})}function _x({projectId:e}){return c.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 lle=dr("/projects/$projectId_/experiments/$experimentName")({beforeLoad:({params:e})=>{throw rj({to:"/projects/$projectId/tags/$key/$value",params:{projectId:e.projectId,key:"experiment",value:e.experimentName}})}}),E$=dr("/projects/$projectId_/tags/$key/$value")({component:ule});function ule(){const{projectId:e,key:t,value:r}=E$.useParams();return c.jsx(b$,{tagKey:t,tagValue:r,projectId:e})}const A$=dr("/projects/$projectId_/evals/$runId/$evalId")({component:cle});function cle(){const{projectId:e,runId:t,evalId:r}=A$.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:d}=gd(e,t),{data:f}=pt(e),[h,p]=S.useState(!1),g=(f==null?void 0:f.read_only)===!0;if(l)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(d)return c.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",d.message]});const y=o==null?void 0:o.results.find(w=>ep(w,r,{resultDir:n,evalPath:i}));if(!y)return c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:c.jsxs("p",{className:"text-gray-400",children:["Eval ",c.jsx("code",{className:"text-cyan-400",children:r})," not found in run"," ",c.jsx("code",{className:"text-cyan-400",children:t}),"."]})});const x=(f==null?void 0:f.threshold)??(f==null?void 0:f.pass_threshold)??.8,b=to(y.score,x)&&y.executionStatus!=="error"&&y.executionStatus!=="failed";return c.jsxs("div",{className:"flex h-full flex-col gap-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"break-words text-sm text-gray-400",children:["Run: ",t," / Eval: ",y.eval_path??r]}),c.jsxs("h1",{className:"mt-1 flex min-w-0 items-start gap-2 break-words text-2xl font-semibold text-white",children:[c.jsx("span",{className:`shrink-0 text-2xl font-bold leading-none ${b?"text-emerald-400":"text-red-400"}`,children:b?"✓":"✗"}),c.jsx("span",{className:"min-w-0",children:r})]})]}),!g&&c.jsxs("button",{type:"button",onClick:()=>p(!0),className:"inline-flex shrink-0 items-center gap-1 self-start whitespace-nowrap rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:[c.jsx("span",{"aria-hidden":"true",children:"▶"}),c.jsx("span",{children:"Run this Test"})]})]}),c.jsx(f1,{eval:y,runId:t,projectId:e}),!g&&c.jsx(So,{open:h,onClose:()=>p(!1),projectId:e,prefill:{testIds:[r],target:y.target}})]})}const C$=dr("/projects/$projectId_/runs/$runId_/suite/$suite")({component:dle});function dle(){const{projectId:e,runId:t,suite:r}=C$.useParams(),{data:n,isLoading:i,error:o}=gd(e,t),{data:l}=pt(e),d=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8;if(i)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>c.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(o)return c.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 f=((n==null?void 0:n.results)??[]).filter(y=>(y.suite??"Uncategorized")===r),h=f.length,p=np(f,d),g=f.reduce((y,x)=>y+(x.costUsd??0),0);return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",t]})]}),c.jsx(eu,{total:h,passed:p.passed,failed:p.failed,passRate:p.passRate,executionErrors:p.executionErrors,totalCost:g>0?g:void 0}),h===0?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:c.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):c.jsx(m1,{results:f,runId:t,projectId:e,passThreshold:d,title:"Suite Evals"})]})}const T$=dr("/projects/$projectId_/runs/$runId_/category/$category")({component:fle});function fle(){const{projectId:e,runId:t,category:r}=T$.useParams(),{data:n,isLoading:i,error:o}=Ue(LM(e,t,r));if(i)return c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),c.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(x=>c.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});if(o)return c.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)??[],d=l.reduce((x,b)=>x+b.total,0),f=l.reduce((x,b)=>x+b.passed,0),h=l.reduce((x,b)=>x+b.failed,0),p=l.reduce((x,b)=>x+ur(b),0),g=d-p,y=g>0?f/g:0;return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),c.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",t]})]}),c.jsx(eu,{total:d,passed:f,failed:h,passRate:y,executionErrors:p}),l.length===0?c.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:c.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),c.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:l.map(x=>c.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:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:x.name}),c.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[x.passed,"/",eR(x)]})]}),c.jsx("div",{className:"mt-2",children:c.jsx(fo,{score:x.avg_score})}),c.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[c.jsxs("span",{className:"text-emerald-400",children:[x.passed," passed"]}),x.failed>0&&c.jsxs("span",{className:"text-red-400",children:[x.failed," failed"]}),ur(x)>0&&c.jsxs("span",{className:"text-amber-400",children:[ur(x)," execution errors"]})]})]},x.name))})]})]})}const hle=p9.update({id:"/settings",path:"/settings",getParentRoute:()=>Yt}),mle=Uie.update({id:"/",path:"/",getParentRoute:()=>Yt}),ple=y$.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>Yt}),gle=v$.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>Yt}),yle=x$.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>Yt}),vle=Joe.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>Yt}),xle=j$.update({id:"/tags/$key/$value",path:"/tags/$key/$value",getParentRoute:()=>Yt}),ble=w$.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>Yt}),jle=S$.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>Yt}),wle=N$.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>Yt}),Sle=_$.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>Yt}),Nle=O$.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>Yt}),_le=lle.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>Yt}),Ole=E$.update({id:"/projects/$projectId_/tags/$key/$value",path:"/projects/$projectId/tags/$key/$value",getParentRoute:()=>Yt}),Ele=A$.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>Yt}),Ale=C$.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>Yt}),Cle=T$.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>Yt}),Tle={IndexRoute:mle,SettingsRoute:hle,ExperimentsExperimentNameRoute:vle,JobsRunIdRoute:yle,ProjectsProjectIdRoute:gle,RunsRunIdRoute:ple,EvalsRunIdEvalIdRoute:ble,TagsKeyValueRoute:xle,ProjectsProjectIdExperimentsExperimentNameRoute:_le,ProjectsProjectIdJobsRunIdRoute:Nle,ProjectsProjectIdRunsRunIdRoute:Sle,RunsRunIdCategoryCategoryRoute:wle,RunsRunIdSuiteSuiteRoute:jle,ProjectsProjectIdEvalsRunIdEvalIdRoute:Ele,ProjectsProjectIdTagsKeyValueRoute:Ole,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:Cle,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:Ale},Ple=Yt._addFileChildren(Tle)._addFileTypes(),Mle=new kz({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),Rle=$B({routeTree:Ple}),P$=document.getElementById("root");if(!P$)throw new Error("Root element not found");uz.createRoot(P$).render(c.jsx(S.StrictMode,{children:c.jsx($z,{client:Mle,children:c.jsx(zB,{router:Rle})})}));export{Ul as W,S as r};