@dudousxd/nestjs-telescope-ui 4.3.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/telescope-client.d.ts +25 -19
- package/dist/client/telescope-client.d.ts.map +1 -1
- package/dist/client/telescope-client.js +14 -18
- package/dist/client/telescope-client.js.map +1 -1
- package/dist/client/types.d.ts +37 -11
- package/dist/client/types.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-renderer.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-renderer.js +11 -10
- package/dist/react/components/extensions/panel-renderer.js.map +1 -1
- package/dist/react/components/extensions/table-query.d.ts +23 -18
- package/dist/react/components/extensions/table-query.d.ts.map +1 -1
- package/dist/react/components/extensions/table-query.js +27 -21
- package/dist/react/components/extensions/table-query.js.map +1 -1
- package/dist/react/components/queues/JobTable.js +0 -0
- package/dist/react/components/queues/JobTable.js.map +1 -1
- package/dist/react/components/tag-autocomplete.js +1 -1
- package/dist/react/components/tag-autocomplete.js.map +1 -1
- package/dist/react/use-telescope-queries.d.ts +14 -35
- package/dist/react/use-telescope-queries.d.ts.map +1 -1
- package/dist/react/use-telescope-queries.js +17 -18
- package/dist/react/use-telescope-queries.js.map +1 -1
- package/dist/spa/assets/index-Ch_AS35X.js +228 -0
- package/dist/spa/index.html +1 -1
- package/package.json +3 -3
- package/dist/spa/assets/index-B5IIRiHt.js +0 -228
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
var nV=Object.defineProperty;var __=e=>{throw TypeError(e)};var rV=(e,t,n)=>t in e?nV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Be=(e,t,n)=>rV(e,typeof t!="symbol"?t+"":t,n),G0=(e,t,n)=>t.has(e)||__("Cannot "+n);var F=(e,t,n)=>(G0(e,t,"read from private field"),n?n.call(e):t.get(e)),Te=(e,t,n)=>t.has(e)?__("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),me=(e,t,n,r)=>(G0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),He=(e,t,n)=>(G0(e,t,"access private method"),n);var Gm=(e,t,n,r)=>({set _(i){me(e,t,i,n)},get _(){return F(e,t,r)}});function iV(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[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"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Km=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pk={exports:{}},Bb={};/**
|
|
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 aV=Symbol.for("react.transitional.element"),oV=Symbol.for("react.fragment");function hk(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:aV,type:e,key:r,ref:t!==void 0?t:null,props:n}}Bb.Fragment=oV;Bb.jsx=hk;Bb.jsxs=hk;pk.exports=Bb;var c=pk.exports,mk={exports:{}},ze={};/**
|
|
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 BE=Symbol.for("react.transitional.element"),sV=Symbol.for("react.portal"),lV=Symbol.for("react.fragment"),uV=Symbol.for("react.strict_mode"),cV=Symbol.for("react.profiler"),fV=Symbol.for("react.consumer"),dV=Symbol.for("react.context"),pV=Symbol.for("react.forward_ref"),hV=Symbol.for("react.suspense"),mV=Symbol.for("react.memo"),gk=Symbol.for("react.lazy"),gV=Symbol.for("react.activity"),vV=Symbol.for("react.view_transition"),N_=Symbol.iterator;function yV(e){return e===null||typeof e!="object"?null:(e=N_&&e[N_]||e["@@iterator"],typeof e=="function"?e:null)}var vk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yk=Object.assign,bk={};function od(e,t,n){this.props=e,this.context=t,this.refs=bk,this.updater=n||vk}od.prototype.isReactComponent={};od.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};od.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xk(){}xk.prototype=od.prototype;function zE(e,t,n){this.props=e,this.context=t,this.refs=bk,this.updater=n||vk}var FE=zE.prototype=new xk;FE.constructor=zE;yk(FE,od.prototype);FE.isPureReactComponent=!0;var R_=Array.isArray;function L1(){}var It={H:null,A:null,T:null,S:null},wk=Object.prototype.hasOwnProperty;function UE(e,t,n){var r=n.ref;return{$$typeof:BE,type:e,key:t,ref:r!==void 0?r:null,props:n}}function bV(e,t){return UE(e.type,t,e.props)}function HE(e){return typeof e=="object"&&e!==null&&e.$$typeof===BE}function xV(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var M_=/\/+/g;function K0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xV(""+e.key):t.toString(36)}function wV(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(L1,L1):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ju(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case BE:case sV:o=!0;break;case gk:return o=e._init,Ju(o(e._payload),t,n,r,i)}}if(o)return i=i(e),o=r===""?"."+K0(e,0):r,R_(i)?(n="",o!=null&&(n=o.replace(M_,"$&/")+"/"),Ju(i,t,n,"",function(u){return u})):i!=null&&(HE(i)&&(i=bV(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(M_,"$&/")+"/")+o)),t.push(i)),1;o=0;var s=r===""?".":r+":";if(R_(e))for(var l=0;l<e.length;l++)r=e[l],a=s+K0(r,l),o+=Ju(r,t,n,a,i);else if(l=yV(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,a=s+K0(r,l++),o+=Ju(r,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Ju(wV(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function Ym(e,t,n){if(e==null)return e;var r=[],i=0;return Ju(e,r,"","",function(a){return t.call(n,a,i++)}),r}function SV(e){if(e._status===-1){var t=e._result,n=t();n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r))},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r,n.status===void 0&&(n.status="rejected",n.reason=r))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var P_=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Sk(e){var t=It.T,n={};n.types=t!==null?t.types:null,It.T=n;try{var r=e(),i=It.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(L1,P_)}catch(a){P_(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),It.T=t}}function Ok(e){var t=It.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else Sk(Ok.bind(null,e))}var OV={map:Ym,forEach:function(e,t,n){Ym(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ym(e,function(){t++}),t},toArray:function(e){return Ym(e,function(t){return t})||[]},only:function(e){if(!HE(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ze.Activity=gV;ze.Children=OV;ze.Component=od;ze.Fragment=lV;ze.Profiler=cV;ze.PureComponent=zE;ze.StrictMode=uV;ze.Suspense=hV;ze.ViewTransition=vV;ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=It;ze.__COMPILER_RUNTIME={__proto__:null,c:function(e){return It.H.useMemoCache(e)}};ze.addTransitionType=Ok;ze.cache=function(e){return function(){return e.apply(null,arguments)}};ze.cacheSignal=function(){return null};ze.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=yk({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!wk.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return UE(e.type,i,r)};ze.createContext=function(e){return e={$$typeof:dV,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:fV,_context:e},e};ze.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=""+t.key),t)wk.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return UE(e,a,i)};ze.createRef=function(){return{current:null}};ze.forwardRef=function(e){return{$$typeof:pV,render:e}};ze.isValidElement=HE;ze.lazy=function(e){return{$$typeof:gk,_payload:{_status:-1,_result:e},_init:SV}};ze.memo=function(e,t){return{$$typeof:mV,type:e,compare:t===void 0?null:t}};ze.startTransition=Sk;ze.unstable_useCacheRefresh=function(){return It.H.useCacheRefresh()};ze.use=function(e){return It.H.use(e)};ze.useActionState=function(e,t,n){return It.H.useActionState(e,t,n)};ze.useCallback=function(e,t){return It.H.useCallback(e,t)};ze.useContext=function(e){return It.H.useContext(e)};ze.useDebugValue=function(){};ze.useDeferredValue=function(e,t){return It.H.useDeferredValue(e,t)};ze.useEffect=function(e,t){return It.H.useEffect(e,t)};ze.useEffectEvent=function(e){return It.H.useEffectEvent(e)};ze.useId=function(){return It.H.useId()};ze.useImperativeHandle=function(e,t,n){return It.H.useImperativeHandle(e,t,n)};ze.useInsertionEffect=function(e,t){return It.H.useInsertionEffect(e,t)};ze.useLayoutEffect=function(e,t){return It.H.useLayoutEffect(e,t)};ze.useMemo=function(e,t){return It.H.useMemo(e,t)};ze.useOptimistic=function(e,t){return It.H.useOptimistic(e,t)};ze.useReducer=function(e,t,n){return It.H.useReducer(e,t,n)};ze.useRef=function(e){return It.H.useRef(e)};ze.useState=function(e){return It.H.useState(e)};ze.useSyncExternalStore=function(e,t,n){return It.H.useSyncExternalStore(e,t,n)};ze.useTransition=function(){return It.H.useTransition()};ze.version="19.3.1";mk.exports=ze;var x=mk.exports;const z=vt(x),zb=iV({__proto__:null,default:z},[x]);var jk={exports:{}},Fb={},Ek={exports:{}},Tk={};/**
|
|
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
|
+
*/(function(e){function t(R,B){var L=R.length;R.push(B);e:for(;0<L;){var k=L-1>>>1,I=R[k];if(0<i(I,B))R[k]=B,R[L]=I,L=k;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var B=R[0],L=R.pop();if(L!==B){R[0]=L;e:for(var k=0,I=R.length,V=I>>>1;k<V;){var M=2*(k+1)-1,H=R[M],G=M+1,U=R[G];if(0>i(H,L))G<I&&0>i(U,H)?(R[k]=U,R[G]=L,k=G):(R[k]=H,R[M]=L,k=M);else if(G<I&&0>i(U,L))R[k]=U,R[G]=L,k=G;else break e}}return B}function i(R,B){var L=R.sortIndex-B.sortIndex;return L!==0?L:R.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],f=1,d=null,p=3,h=!1,y=!1,m=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function S(R){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=R)r(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(u)}}function O(R){if(m=!1,S(R),!y)if(n(l)!==null)y=!0,j||(j=!0,$());else{var B=n(u);B!==null&&P(O,B.startTime-R)}}var j=!1,E=-1,T=5,A=-1;function C(){return g?!0:!(e.unstable_now()-A<T)}function _(){if(g=!1,j){var R=e.unstable_now();A=R;var B=!0;try{e:{y=!1,m&&(m=!1,v(E),E=-1),h=!0;var L=p;try{t:{for(S(R),d=n(l);d!==null&&!(d.expirationTime>R&&C());){var k=d.callback;if(typeof k=="function"){d.callback=null,p=d.priorityLevel;var I=k(d.expirationTime<=R);if(R=e.unstable_now(),typeof I=="function"){d.callback=I,S(R),B=!0;break t}d===n(l)&&r(l),S(R)}else r(l);d=n(l)}if(d!==null)B=!0;else{var V=n(u);V!==null&&P(O,V.startTime-R),B=!1}}break e}finally{d=null,p=L,h=!1}B=void 0}}finally{B?$():j=!1}}}var $;if(typeof w=="function")$=function(){w(_)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,N=D.port2;D.port1.onmessage=_,$=function(){N.postMessage(null)}}else $=function(){b(_,0)};function P(R,B){E=b(function(){R(e.unstable_now())},B)}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(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var L=p;p=B;try{return R()}finally{p=L}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(R,B){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var L=p;p=R;try{return B()}finally{p=L}},e.unstable_scheduleCallback=function(R,B,L){var k=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?k+L:k):L=k,R){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=L+I,R={id:f++,callback:B,priorityLevel:R,startTime:L,expirationTime:I,sortIndex:-1},L>k?(R.sortIndex=L,t(u,R),n(l)===null&&R===n(u)&&(m?(v(E),E=-1):m=!0,P(O,L-k))):(R.sortIndex=I,t(l,R),y||h||(y=!0,j||(j=!0,$()))),R},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(R){var B=p;return function(){var L=p;p=B;try{return R.apply(this,arguments)}finally{p=L}}}})(Tk);Ek.exports=Tk;var jV=Ek.exports,Ak={exports:{}},sr={};/**
|
|
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 EV=x;function Ck(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Uo(){}var xr={d:{f:Uo,r:function(){throw Error(Ck(522))},D:Uo,C:Uo,L:Uo,m:Uo,X:Uo,S:Uo,M:Uo},p:0,findDOMNode:null},TV=Symbol.for("react.portal"),AV=Symbol.for("react.recoverable"),$_=Symbol.for("react.optimistic_key");function CV(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:TV,key:r==null?null:r===$_?$_:""+r,children:e,containerInfo:t,implementation:n}}var jp=EV.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Ub(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}sr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=xr;sr.browser=function(e){return{$$typeof:AV,_reason:e}};sr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Ck(299));return CV(e,t,null,n)};sr.flushSync=function(e){var t=jp.T,n=xr.p;try{if(jp.T=null,xr.p=2,e)return e()}finally{jp.T=t,xr.p=n,xr.d.f()}};sr.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,xr.d.C(e,t))};sr.prefetchDNS=function(e){typeof e=="string"&&xr.d.D(e)};sr.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Ub(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?xr.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:a}):n==="script"&&xr.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};sr.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Ub(t.as,t.crossOrigin);xr.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&xr.d.M(e)};sr.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Ub(n,t.crossOrigin);xr.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};sr.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Ub(t.as,t.crossOrigin);xr.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else xr.d.m(e)};sr.requestFormReset=function(e){xr.d.r(e)};sr.unstable_batchedUpdates=function(e,t){return e(t)};sr.useFormState=function(e,t,n){return jp.H.useFormState(e,t,n)};sr.useFormStatus=function(){return jp.H.useHostTransitionStatus()};sr.version="19.3.1";function _k(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_k)}catch(e){console.error(e)}}_k(),Ak.exports=sr;var Ni=Ak.exports;const _V=vt(Ni);/**
|
|
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 On=jV,Nk=x,NV=Ni;function ne(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Rk(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function fm(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function Mk(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Pk(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function D_(e){if(fm(e)!==e)throw Error(ne(188))}function RV(e){var t=e.alternate;if(!t){if(t=fm(e),t===null)throw Error(ne(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return D_(i),e;if(a===r)return D_(i),t;a=a.sibling}throw Error(ne(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(ne(189))}}if(n.alternate!==r)throw Error(ne(190))}if(n.tag!==3)throw Error(ne(188));return n.stateNode.current===n?e:t}function $k(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=$k(e),t!==null)return t;e=e.sibling}return null}function kr(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&kr(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function Su(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function I_(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function Dk(e){var t=[null,null],n=Su(e);return n===null||Ik(t,e,n.child,{foundSelf:!1}),t}function Ik(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&Ik(e,t,n.child,r))return!0;n=n.sibling}return!1}function wn(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(ne(559))}}var oc=null,B1=null;function MV(e,t,n){return e===n?!0:e===t?(oc=e,!0):!1}function PV(e,t,n){return e===n?(B1=e,!1):e===t?(B1!==null&&(oc=e),!0):!1}function k_(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function z1(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Rt=Object.assign,$V=Symbol.for("react.element"),Xm=Symbol.for("react.transitional.element"),fp=Symbol.for("react.portal"),sc=Symbol.for("react.fragment"),kk=Symbol.for("react.strict_mode"),F1=Symbol.for("react.profiler"),Lk=Symbol.for("react.consumer"),da=Symbol.for("react.context"),qE=Symbol.for("react.forward_ref"),U1=Symbol.for("react.suspense"),H1=Symbol.for("react.suspense_list"),VE=Symbol.for("react.memo"),Wo=Symbol.for("react.lazy"),q1=Symbol.for("react.activity"),DV=Symbol.for("react.legacy_hidden"),IV=Symbol.for("react.memo_cache_sentinel"),V1=Symbol.for("react.view_transition"),kV=Symbol.for("react.recoverable"),L_=Symbol.iterator;function Fd(e){return e===null||typeof e!="object"?null:(e=L_&&e[L_]||e["@@iterator"],typeof e=="function"?e:null)}var LV=Symbol.for("react.client.reference");function G1(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===LV?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sc:return"Fragment";case F1:return"Profiler";case kk:return"StrictMode";case U1:return"Suspense";case H1:return"SuspenseList";case q1:return"Activity";case V1:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case fp:return"Portal";case da:return e.displayName||"Context";case Lk:return(e._context.displayName||"Context")+".Consumer";case qE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case VE:return t=e.displayName||null,t!==null?t:G1(e.type)||"Memo";case Wo:t=e._payload,e=e._init;try{return G1(e(t))}catch{}}return null}var dp=Array.isArray,Pe=Nk.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pt=NV.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fl={pending:!1,data:null,method:null,action:null},K1=[],lc=-1;function _a(e){return{current:e}}function Vn(e){0>lc||(e.current=K1[lc],K1[lc]=null,lc--)}function kt(e,t){lc++,K1[lc]=e.current,e.current=t}var ba=_a(null),Xp=_a(null),bs=_a(null),$v=_a(null);function Dv(e,t){switch(kt(bs,t),kt(Xp,e),kt(ba,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?QN(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=QN(t),e=o5(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Vn(ba),kt(ba,e)}function uf(){Vn(ba),Vn(Xp),Vn(bs)}function Y1(e){var t=e.memoizedState;t!==null&&(bf._currentValue=t.memoizedState,kt($v,e)),t=ba.current;var n=o5(t,e.type);t!==n&&(kt(Xp,e),kt(ba,n))}function Iv(e){Xp.current===e&&(Vn(ba),Vn(Xp)),$v.current===e&&(Vn($v),bf._currentValue=Fl)}var Y0,B_;function Vo(e){if(Y0===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Y0=t&&t[1]||"",B_=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Y0+e+B_}var X0=!1;function W0(e,t){if(!e||X0)return"";X0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(y){var p=y}Reflect.construct(e,[],d)}else{try{d.call()}catch(y){p=y}d=!1;try{var h=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),d=!0,new e}finally{d&&(h!==void 0?Object.defineProperty(e.prototype,"props",h):delete e.prototype.props)}}}else{try{throw Error()}catch(y){p=y}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(y){if(y&&p&&typeof y.stack=="string")return[y.stack,p.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var l=o.split(`
|
|
44
|
+
`),u=s.split(`
|
|
45
|
+
`);for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===u.length)for(r=l.length-1,i=u.length-1;1<=r&&0<=i&&l[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==u[i]){if(r!==1||i!==1)do if(r--,i--,0>i||l[r]!==u[i]){var f=`
|
|
46
|
+
`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=i);break}}}finally{X0=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Vo(n):""}function BV(e,t){switch(e.tag){case 26:case 27:case 5:return Vo(e.type);case 16:return Vo("Lazy");case 13:return e.child!==t&&t!==null?Vo("Suspense Fallback"):Vo("Suspense");case 19:return Vo("SuspenseList");case 0:case 15:return W0(e.type,!1);case 11:return W0(e.type.render,!1);case 1:return W0(e.type,!0);case 31:return Vo("Activity");case 30:return Vo("ViewTransition");default:return""}}function z_(e){try{var t="",n=null;do t+=BV(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var X1=Object.prototype.hasOwnProperty,GE=On.unstable_scheduleCallback,Q0=On.unstable_cancelCallback,zV=On.unstable_shouldYield,FV=On.unstable_requestPaint,Qr=On.unstable_now,UV=On.unstable_getCurrentPriorityLevel,Bk=On.unstable_ImmediatePriority,zk=On.unstable_UserBlockingPriority,kv=On.unstable_NormalPriority,HV=On.unstable_LowPriority,Fk=On.unstable_IdlePriority,qV=On.log,VV=On.unstable_setDisableYieldValue,dm=null,Zr=null;function us(e){if(typeof qV=="function"&&VV(e),Zr&&typeof Zr.setStrictMode=="function")try{Zr.setStrictMode(dm,e)}catch{}}var Jr=Math.clz32?Math.clz32:YV,GV=Math.log,KV=Math.LN2;function YV(e){return e>>>=0,e===0?32:31-(GV(e)/KV|0)|0}var Wm=256,Qm=262144,Zm=4194304;function ml(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Hb(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s!==0?(r=s&~a,r!==0?i=ml(r):(o&=s,o!==0?i=ml(o):n||(n=s&~e,n!==0&&(i=ml(n))))):(s=r&~a,s!==0?i=ml(s):o!==0?i=ml(o):n||(n=r&~e,n!==0&&(i=ml(n)))),i===0?0:t!==0&&t!==i&&!(t&a)&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function pm(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Uk(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Jr(n),i=1<<r;t|=e[r],n&=~i}return t}function XV(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hk(){var e=Zm;return Zm<<=1,!(Zm&62914560)&&(Zm=4194304),e}function Z0(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hm(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function WV(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var f=31-Jr(n),d=1<<f;s[f]=0,l[f]=-1;var p=u[f];if(p!==null)for(u[f]=null,f=0;f<p.length;f++){var h=p[f];h!==null&&(h.lane&=-536870913)}n&=~d}r!==0&&qk(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function qk(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Jr(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Vk(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Jr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Gk(e,t){var n=t&-t;return n=n&42?1:KE(n),n&(e.suspendedLanes|t)?0:n}function KE(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function YE(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Kk(){var e=pt.p;return e!==0?e:(e=window.event,e===void 0?32:A5(e.type))}function F_(e,t){var n=pt.p;try{return pt.p=e,t()}finally{pt.p=n}}var To=Math.random().toString(36).slice(2),Hn="__reactFiber$"+To,Lr="__reactProps$"+To,sd="__reactContainer$"+To,U_="__reactEvents$"+To,QV="__reactListeners$"+To,ZV="__reactHandles$"+To,H_="__reactResources$"+To,mm="__reactMarker$"+To,Lv="__reactLoad$"+To;function qb(e){delete e[Hn],delete e[Lr],delete e[QV],delete e[ZV]}function Sl(e){var t;if(t=e[Hn])return t;for(var n=e.parentNode;n;){if(t=n[sd]||n[Hn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=aR(e);e!==null;){if(n=e[Hn])return n;e=aR(e)}return t}e=n,n=e.parentNode}return null}function ld(e){if(e=e[Hn]||e[sd]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pp(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(ne(33))}function Ec(e){var t=e[H_];return t||(t=e[H_]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nn(e){e[mm]=!0}function Yk(e){e[Lv]=void 0}var Xk=new Set,Wk={};function Ou(e,t){cf(e,t),cf(e+"Capture",t)}function cf(e,t){for(Wk[e]=t,e=0;e<t.length;e++)Xk.add(t[e])}var JV=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]*$"),q_={},V_={};function eG(e){return X1.call(V_,e)?!0:X1.call(q_,e)?!1:JV.test(e)?V_[e]=!0:(q_[e]=!0,!1)}var lt=!1;function G_(){var e=lt;return lt=!1,e}function rv(e,t,n){if(eG(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Jm(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function ka(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Vr(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tG(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function W1(e){if(!e._valueTracker){var t=Qk(e)?"checked":"value";e._valueTracker=tG(e,t,""+e[t])}}function Zk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Qk(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}var nG=/[\n"\\]/g;function bi(e){return e.replace(nG,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Q1(e,t,n,r,i,a,o,s){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vr(t)):e.value!==""+Vr(t)&&(e.value=""+Vr(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?o==="number"&&e.value==t?J0(e,Vr(e.value)):J0(e,Vr(t)):n!=null?J0(e,Vr(n)):r!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Vr(s):e.removeAttribute("name")}function Jk(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){W1(e);return}n=n!=null?""+Vr(n):"",t=t!=null?""+Vr(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r=r??i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),W1(e)}function J0(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Tc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function eL(e,t,n){if(t!=null&&(t=""+Vr(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Vr(n):""}function tL(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(ne(92));if(dp(r)){if(1<r.length)throw Error(ne(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Vr(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),W1(e)}function ff(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rG=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 K_(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||rG.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function nL(e,t,n){if(t!=null&&typeof t!="object")throw Error(ne(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="",lt=!0);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&(K_(e,i,r),lt=!0)}else for(var a in t)t.hasOwnProperty(a)&&K_(e,a,t[a])}function XE(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var iG=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"],["maskType","mask-type"],["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"]]),aG=/^[\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 iv(e){return aG.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function pa(){}var Z1=null;function WE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uc=null,Ac=null;function Y_(e){var t=ld(e);if(t&&(e=t.stateNode)){var n=e[Lr]||null;e:switch(e=t.stateNode,t.type){case"input":if(Q1(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+bi(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Lr]||null;if(!i)throw Error(ne(90));Q1(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Zk(r)}break e;case"textarea":eL(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Tc(e,!!n.multiple,t,!1)}}}var ew=!1;function rL(e,t,n){if(ew)return e(t,n);ew=!0;try{var r=e(t);return r}finally{if(ew=!1,(uc!==null||Ac!==null)&&(ix(),uc&&(t=uc,e=Ac,Ac=uc=null,Y_(t),e)))for(t=0;t<e.length;t++)Y_(e[t])}}function Wp(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Lr]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ne(231,t,typeof n));return n}var fo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),J1=!1;if(fo)try{var Ud={};Object.defineProperty(Ud,"passive",{get:function(){J1=!0}}),window.addEventListener("test",Ud,Ud),window.removeEventListener("test",Ud,Ud)}catch{J1=!1}var cs=null,QE=null,av=null;function iL(){if(av)return av;var e,t=QE,n=t.length,r,i="value"in cs?cs.value:cs.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return av=i.slice(e,1<r?1-r:void 0)}function ov(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function eg(){return!0}function X_(){return!1}function Or(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?eg:X_,this.isPropagationStopped=X_,this}return Rt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=eg)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=eg)},persist:function(){},isPersistent:eg}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vb=Or(qs),gm=Rt({},qs,{view:0,detail:0}),oG=Or(gm),tw,nw,Hd,Gb=Rt({},gm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ZE,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hd&&(Hd&&e.type==="mousemove"?(tw=e.screenX-Hd.screenX,nw=e.screenY-Hd.screenY):nw=tw=0,Hd=e),tw)},movementY:function(e){return"movementY"in e?e.movementY:nw}}),W_=Or(Gb),sG=Rt({},Gb,{dataTransfer:0}),lG=Or(sG),uG=Rt({},gm,{relatedTarget:0}),rw=Or(uG),cG=Rt({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),fG=Or(cG),dG=Rt({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pG=Or(dG),hG=Rt({},qs,{data:0}),Q_=Or(hG),mG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gG={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"},vG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yG(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vG[e])?!!t[e]:!1}function ZE(){return yG}var bG=Rt({},gm,{key:function(e){if(e.key){var t=mG[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ov(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gG[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ZE,charCode:function(e){return e.type==="keypress"?ov(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ov(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xG=Or(bG),wG=Rt({},Gb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Z_=Or(wG),SG=Rt({},qs,{submitter:0}),OG=Or(SG),jG=Rt({},gm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ZE}),EG=Or(jG),TG=Rt({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),AG=Or(TG),CG=Rt({},Gb,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_G=Or(CG),NG=Rt({},qs,{newState:0,oldState:0,source:0}),RG=Or(NG),MG=[9,13,27,32],JE=fo&&"CompositionEvent"in window,Ep=null;fo&&"documentMode"in document&&(Ep=document.documentMode);var PG=fo&&"TextEvent"in window&&!Ep,aL=fo&&(!JE||Ep&&8<Ep&&11>=Ep),J_=" ",eN=!1;function oL(e,t){switch(e){case"keyup":return MG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cc=!1;function $G(e,t){switch(e){case"compositionend":return sL(t);case"keypress":return t.which!==32?null:(eN=!0,J_);case"textInput":return e=t.data,e===J_&&eN?null:e;default:return null}}function DG(e,t){if(cc)return e==="compositionend"||!JE&&oL(e,t)?(e=iL(),av=QE=cs=null,cc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return aL&&t.locale!=="ko"?null:t.data;default:return null}}var IG={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 tN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!IG[e.type]:t==="textarea"}function lL(e,t,n,r){uc?Ac?Ac.push(r):Ac=[r]:uc=r,t=oy(t,"onChange"),0<t.length&&(n=new Vb("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Tp=null,Qp=null;function kG(e){r5(e,0)}function Kb(e){var t=pp(e);if(Zk(t))return e}function nN(e,t){if(e==="change")return t}var uL=!1;if(fo){var iw;if(fo){var aw="oninput"in document;if(!aw){var rN=document.createElement("div");rN.setAttribute("oninput","return;"),aw=typeof rN.oninput=="function"}iw=aw}else iw=!1;uL=iw&&(!document.documentMode||9<document.documentMode)}function iN(){Tp&&(Tp.detachEvent("onpropertychange",cL),Qp=Tp=null)}function cL(e){if(e.propertyName==="value"&&Kb(Qp)){var t=[];lL(t,Qp,e,WE(e)),rL(kG,t)}}function LG(e,t,n){e==="focusin"?(iN(),Tp=t,Qp=n,Tp.attachEvent("onpropertychange",cL)):e==="focusout"&&iN()}function BG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kb(Qp)}function zG(e,t){if(e==="click")return Kb(t)}function FG(e,t){if(e==="input"||e==="change")return Kb(t)}function UG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ri=typeof Object.is=="function"?Object.is:UG;function Zp(e,t){if(ri(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!X1.call(t,i)||!ri(e[i],t[i]))return!1}return!0}function eS(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function aN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function oN(e,t){var n=aN(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=aN(n)}}function fL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dL(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=eS(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=eS(e.document)}return t}function eT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var HG=fo&&"documentMode"in document&&11>=document.documentMode,fc=null,tS=null,Ap=null,nS=!1;function sN(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nS||fc==null||fc!==eS(r)||(r=fc,"selectionStart"in r&&eT(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ap&&Zp(Ap,r)||(Ap=r,r=oy(tS,"onSelect"),0<r.length&&(t=new Vb("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fc)))}function ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var dc={animationend:ll("Animation","AnimationEnd"),animationiteration:ll("Animation","AnimationIteration"),animationstart:ll("Animation","AnimationStart"),transitionrun:ll("Transition","TransitionRun"),transitionstart:ll("Transition","TransitionStart"),transitioncancel:ll("Transition","TransitionCancel"),transitionend:ll("Transition","TransitionEnd")},ow={},pL={};fo&&(pL=document.createElement("div").style,"AnimationEvent"in window||(delete dc.animationend.animation,delete dc.animationiteration.animation,delete dc.animationstart.animation),"TransitionEvent"in window||delete dc.transitionend.transition);function ju(e){if(ow[e])return ow[e];if(!dc[e])return e;var t=dc[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in pL)return ow[e]=t[n];return e}var hL=ju("animationend"),mL=ju("animationiteration"),gL=ju("animationstart"),qG=ju("transitionrun"),VG=ju("transitionstart"),GG=ju("transitioncancel"),vL=ju("transitionend"),yL=new Map,rS="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");rS.push("scrollEnd");function Xi(e,t){yL.set(e,t),Ou(t,[e])}var KG=0;function po(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Ui.identifierPrefix;var n=KG++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function lN(e){if(e==null||typeof e=="string")return e;var t=null,n=$c;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i==="none")return"none";t=t==null?i:t+(" "+i)}}return t??e.default}function Ao(e,t){return e=lN(e),t=lN(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Bv=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mi=[],pc=0,tT=0;function Yb(){for(var e=pc,t=tT=pc=0;t<e;){var n=mi[t];mi[t++]=null;var r=mi[t];mi[t++]=null;var i=mi[t];mi[t++]=null;var a=mi[t];if(mi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&bL(n,i,a)}}function Xb(e,t,n,r){mi[pc++]=e,mi[pc++]=t,mi[pc++]=n,mi[pc++]=r,tT|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function nT(e,t,n,r){return Xb(e,t,n,r),zv(e)}function Eu(e,t){return Xb(e,null,null,t),zv(e)}function bL(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Jr(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function zv(e){if(50<kp)throw kp=0,gv=null,Error(ne(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hc={};function YG(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(e,t,n,r){return new YG(e,t,n,r)}function rT(e){return e=e.prototype,!(!e||!e.isReactComponent)}function no(e,t){var n=e.alternate;return n===null?(n=Pr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function xL(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function sv(e,t,n,r,i,a){var o=0;if(r=e,typeof r=="function")rT(r)&&(o=1);else if(typeof r=="string")o=SK(e,n,ba.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(r){case q1:return e=Pr(31,n,t,i),e.elementType=q1,e.lanes=a,e;case sc:return Ul(n.children,i,a,t);case kk:o=8,i|=24;break;case F1:return e=Pr(12,n,t,i|2),e.elementType=F1,e.lanes=a,e;case U1:return e=Pr(13,n,t,i),e.elementType=U1,e.lanes=a,e;case H1:return e=Pr(19,n,t,i),e.elementType=H1,e.lanes=a,e;case DV:case V1:return e=i|32,e=Pr(30,n,t,e),e.elementType=V1,e.lanes=a,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case da:o=10;break e;case Lk:o=9;break e;case qE:o=11;break e;case VE:o=14;break e;case Wo:o=16,r=null;break e}o=29,n=Error(ne(130,e===null?"null":typeof e,"")),r=null}return t=Pr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Ul(e,t,n,r){return e=Pr(7,e,r,t),e.lanes=n,e}function sw(e,t,n){return e=Pr(6,e,null,t),e.lanes=n,e}function wL(e){var t=Pr(18,null,null,0);return t.stateNode=e,t}function lw(e,t,n){return t=Pr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var uN=new WeakMap;function xi(e,t){if(typeof e=="object"&&e!==null){var n=uN.get(e);return n!==void 0?n:(t={value:e,source:t,stack:z_(t)},uN.set(e,t),t)}return{value:e,source:t,stack:z_(t)}}var mc=[],gc=0,Fv=null,Jp=0,vi=[],yi=0,$s=null,ha=1,ma="";function Ga(e,t){mc[gc++]=Jp,mc[gc++]=Fv,Fv=e,Jp=t}function SL(e,t,n){vi[yi++]=ha,vi[yi++]=ma,vi[yi++]=$s,$s=e;var r=ha;e=ma;var i=32-Jr(r)-1;r&=~(1<<i),n+=1;var a=32-Jr(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ha=1<<32-Jr(t)+i|n<<i|r,ma=a+e}else ha=1<<a|n<<i|r,ma=e}function Wb(e){e.return!==null&&(Ga(e,1),SL(e,1,0))}function iT(e){for(;e===Fv;)Fv=mc[--gc],mc[gc]=null,Jp=mc[--gc],mc[gc]=null;for(;e===$s;)$s=vi[--yi],vi[yi]=null,ma=vi[--yi],vi[yi]=null,ha=vi[--yi],vi[yi]=null}function OL(e,t){vi[yi++]=ha,vi[yi++]=ma,vi[yi++]=$s,ha=t.id,ma=t.overflow,$s=e}var Mn=null,Dt=null,Ke=!1,xs=null,wi=!1,iS=Error(ne(519));function Ds(e){var t=Error(ne(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw eh(xi(t,e)),iS}function cN(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Hn]=e,t[Lr]=r,n){case"dialog":Xe("cancel",t),Xe("close",t);break;case"iframe":case"object":case"embed":Xe("load",t);break;case"video":case"audio":for(n=0;n<ih.length;n++)Xe(ih[n],t);break;case"source":Xe("error",t);break;case"img":case"image":case"link":Xe("error",t),Xe("load",t);break;case"details":Xe("toggle",t);break;case"input":Xe("invalid",t),Jk(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Xe("invalid",t);break;case"textarea":Xe("invalid",t),tL(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||a5(t.textContent,n)?(r.popover!=null&&(Xe("beforetoggle",t),Xe("toggle",t)),r.onScroll!=null&&Xe("scroll",t),r.onScrollEnd!=null&&Xe("scrollend",t),r.onClick!=null&&(t.onclick=pa),t=!0):t=!1,t||Ds(e,!0)}function Uv(e){for(Mn=e.return;Mn;)switch(Mn.tag){case 5:case 31:case 13:wi=!1;return;case 27:case 3:wi=!0;return;default:Mn=Mn.return}}function Uu(e){if(e!==Mn)return!1;if(!Ke)return Uv(e),Ke=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||US(e.type,e.memoizedProps)),n=!n),n&&Dt&&Ds(e),Uv(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(317));Dt=iR(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(317));Dt=iR(e)}else t===27?(t=Dt,Vs(e.type)?(e=GS,GS=null,Dt=e):Dt=t):Dt=Mn?Ei(e.stateNode.nextSibling):null;return!0}function Zl(){Dt=Mn=null,Ke=!1}function uw(){var e=xs;return e!==null&&(Nr===null?Nr=e:Nr.push.apply(Nr,e),xs=null),e}function eh(e){xs===null?xs=[e]:xs.push(e)}var aS=_a(null),Tu=null,Qa=null;function fs(e,t,n){kt(aS,t._currentValue),t._currentValue=n}function ro(e){e._currentValue=aS.current,Vn(aS)}function lv(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function oS(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;e:for(;a!==null;){var s=a;a=i;for(var l=0;l<t.length;l++)if(s.context===t[l]){a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),lv(a.return,n,e),r||(o=null);break e}a=s.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),lv(o,n,e),o=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),lv(i.return,n,e),o=i.child,o=o!==null?o.sibling:null):o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function Jl(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(ne(387));if(o=o.memoizedProps,o!==null){var s=i.type;ri(i.pendingProps.value,o.value)||(e!==null?e.push(s):e=[s])}}else if(i===$v.current){if(o=i.alternate,o===null)throw Error(ne(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(bf):e=[bf])}i=i.return}return e!==null&&oS(t,e,n,r),t.flags|=262144,e!==null}function Hv(e){for(e=e.firstContext;e!==null;){if(!ri(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function eu(e){Tu=e,Qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qn(e){return jL(Tu,e)}function tg(e,t){return Tu===null&&eu(e),jL(e,t)}function jL(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Qa===null){if(e===null)throw Error(ne(308));Qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qa=Qa.next=t;return n}var XG=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},WG=On.unstable_scheduleCallback,QG=On.unstable_NormalPriority,sn={$$typeof:da,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aT(){return{controller:new XG,data:new Map,refCount:0}}function vm(e){e.refCount--,e.refCount===0&&WG(QG,function(){e.controller.abort()})}function fN(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var hp=null;function ZG(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Cp=null,sS=0,tu=0,Cc=null;function JG(e,t){if(Cp===null){var n=Cp=[];sS=0,tu=PT(),Cc={status:"pending",value:void 0,then:function(r){n.push(r)}}}return sS++,t.then(dN,dN),t}function dN(){if(--sS===0&&(hp=null,Cp!==null)){Cc!==null&&(Cc.status="fulfilled");var e=Cp;Cp=null,tu=0,Cc=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function e9(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var pN=Pe.S;Pe.S=function(e,t){if(U3=Qr(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&JG(e,t),hp!==null)for(var n=gf;n!==null;)fN(n,hp),n=n.next;if(n=e.types,n!==null){for(var r=gf;r!==null;)fN(r,n),r=r.next;if(tu!==0){r=hp,r===null&&(r=hp=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}pN!==null&&pN(e,t)};var Hl=_a(null);function oT(){var e=Hl.current;return e!==null?e:_t.pooledCache}function uv(e,t){t===null?kt(Hl,Hl.current):kt(Hl,t.pool)}function EL(){var e=oT();return e===null?null:{parent:sn._currentValue,pool:e}}var ud=Error(ne(460)),sT=Error(ne(474)),Qb=Error(ne(542)),qv={then:function(){}};function hN(e){return e=e.status,e==="fulfilled"||e==="rejected"}function TL(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pa,pa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gN(e),e===void 0&&!("reason"in t)?Error(ne(600)):e;default:if(typeof t.status=="string")t.then(pa,pa);else{if(e=_t,e!==null&&100<e.shellSuspendCounter)throw Error(ne(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gN(e),e}throw ql=t,ud}}function gl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ql=n,ud):n}}var ql=null;function mN(){if(ql===null)throw Error(ne(459));var e=ql;return ql=null,e}function gN(e){if(e===ud||e===Qb)throw Error(ne(483))}var _c=null,th=0;function ng(e){var t=th;return th+=1,_c===null&&(_c=[]),TL(_c,e,t)}function Ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rg(e,t){throw t.$$typeof===$V?Error(ne(525)):(e=Object.prototype.toString.call(t),Error(ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function AL(e){function t(b,v){if(e){var w=b.deletions;w===null?(b.deletions=[v],b.flags|=16):w.push(v)}}function n(b,v){if(!e)return null;for(;v!==null;)t(b,v),v=v.sibling;return null}function r(b){for(var v=new Map;b!==null;)b.key===null?v.set(b.index,b):v.set(b.key,b),b=b.sibling;return v}function i(b,v){return b=no(b,v),b.index=0,b.sibling=null,b}function a(b,v,w){return b.index=w,e?(w=b.alternate,w!==null?(w=w.index,w<v?(b.flags|=2,v):w):(b.flags|=134217730,v)):(b.flags|=1048576,v)}function o(b){return e&&b.alternate===null&&(b.flags|=134217730),b}function s(b,v,w,S){return v===null||v.tag!==6?(v=sw(w,b.mode,S),v.return=b,v):(v=i(v,w),v.return=b,v)}function l(b,v,w,S){var O=w.type;return O===sc?(b=f(b,v,w.props.children,S,w.key),Ho(b,w),b):v!==null&&(v.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Wo&&gl(O)===v.type)?(v=i(v,w.props),Ho(v,w),v.return=b,v):(v=sv(w.type,w.key,w.props,null,b.mode,S),Ho(v,w),v.return=b,v)}function u(b,v,w,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=lw(w,b.mode,S),v.return=b,v):(v=i(v,w.children||[]),v.return=b,v)}function f(b,v,w,S,O){return v===null||v.tag!==7?(v=Ul(w,b.mode,S,O),v.return=b,v):(v=i(v,w),v.return=b,v)}function d(b,v,w){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=sw(""+v,b.mode,w),v.return=b,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Xm:return w=sv(v.type,v.key,v.props,null,b.mode,w),Ho(w,v),w.return=b,w;case fp:return v=lw(v,b.mode,w),v.return=b,v;case Wo:return v=gl(v),d(b,v,w)}if(dp(v)||Fd(v))return v=Ul(v,b.mode,w,null),v.return=b,v;if(typeof v.then=="function")return d(b,ng(v),w);if(v.$$typeof===da)return d(b,tg(b,v),w);rg(b,v)}return null}function p(b,v,w,S){var O=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return O!==null?null:s(b,v,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Xm:return w.key===O?l(b,v,w,S):null;case fp:return w.key===O?u(b,v,w,S):null;case Wo:return w=gl(w),p(b,v,w,S)}if(dp(w)||Fd(w))return O!==null?null:f(b,v,w,S,null);if(typeof w.then=="function")return p(b,v,ng(w),S);if(w.$$typeof===da)return p(b,v,tg(b,w),S);rg(b,w)}return null}function h(b,v,w,S,O){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return b=b.get(w)||null,s(v,b,""+S,O);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Xm:return b=b.get(S.key===null?w:S.key)||null,l(v,b,S,O);case fp:return b=b.get(S.key===null?w:S.key)||null,u(v,b,S,O);case Wo:return S=gl(S),h(b,v,w,S,O)}if(dp(S)||Fd(S))return b=b.get(w)||null,f(v,b,S,O,null);if(typeof S.then=="function")return h(b,v,w,ng(S),O);if(S.$$typeof===da)return h(b,v,w,tg(v,S),O);rg(v,S)}return null}function y(b,v,w,S){for(var O=null,j=null,E=v,T=v=0,A=null;E!==null&&T<w.length;T++){E.index>T?(A=E,E=null):A=E.sibling;var C=p(b,E,w[T],S);if(C===null){E===null&&(E=A);break}e&&E&&C.alternate===null&&t(b,E),v=a(C,v,T),j===null?O=C:j.sibling=C,j=C,E=A}if(T===w.length)return n(b,E),Ke&&Ga(b,T),O;if(E===null){for(;T<w.length;T++)E=d(b,w[T],S),E!==null&&(v=a(E,v,T),j===null?O=E:j.sibling=E,j=E);return Ke&&Ga(b,T),O}for(E=r(E);T<w.length;T++)A=h(E,b,T,w[T],S),A!==null&&(e&&(C=A.alternate,C!==null&&E.delete(C.key===null?T:C.key)),v=a(A,v,T),j===null?O=A:j.sibling=A,j=A);return e&&E.forEach(function(_){return t(b,_)}),Ke&&Ga(b,T),O}function m(b,v,w,S){if(w==null)throw Error(ne(151));for(var O=null,j=null,E=v,T=v=0,A=null,C=w.next();E!==null&&!C.done;T++,C=w.next()){E.index>T?(A=E,E=null):A=E.sibling;var _=p(b,E,C.value,S);if(_===null){E===null&&(E=A);break}e&&E&&_.alternate===null&&t(b,E),v=a(_,v,T),j===null?O=_:j.sibling=_,j=_,E=A}if(C.done)return n(b,E),Ke&&Ga(b,T),O;if(E===null){for(;!C.done;T++,C=w.next())C=d(b,C.value,S),C!==null&&(v=a(C,v,T),j===null?O=C:j.sibling=C,j=C);return Ke&&Ga(b,T),O}for(E=r(E);!C.done;T++,C=w.next())C=h(E,b,T,C.value,S),C!==null&&(e&&(A=C.alternate,A!==null&&E.delete(A.key===null?T:A.key)),v=a(C,v,T),j===null?O=C:j.sibling=C,j=C);return e&&E.forEach(function($){return t(b,$)}),Ke&&Ga(b,T),O}function g(b,v,w,S){if(typeof w=="object"&&w!==null&&w.type===sc&&w.key===null&&w.props.ref===void 0&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Xm:e:{for(var O=w.key;v!==null;){if(v.key===O){if(O=w.type,O===sc){if(v.tag===7){n(b,v.sibling),S=i(v,w.props.children),Ho(S,w),S.return=b,b=S;break e}}else if(v.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Wo&&gl(O)===v.type){n(b,v.sibling),S=i(v,w.props),Ho(S,w),S.return=b,b=S;break e}n(b,v);break}else t(b,v);v=v.sibling}w.type===sc?(S=Ul(w.props.children,b.mode,S,w.key),Ho(S,w),S.return=b,b=S):(S=sv(w.type,w.key,w.props,null,b.mode,S),Ho(S,w),S.return=b,b=S)}return o(b);case fp:e:{for(O=w.key;v!==null;){if(v.key===O)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(b,v.sibling),S=i(v,w.children||[]),S.return=b,b=S;break e}else{n(b,v);break}else t(b,v);v=v.sibling}S=lw(w,b.mode,S),S.return=b,b=S}return o(b);case Wo:return w=gl(w),g(b,v,w,S)}if(dp(w))return y(b,v,w,S);if(Fd(w)){if(O=Fd(w),typeof O!="function")throw Error(ne(150));return w=O.call(w),m(b,v,w,S)}if(typeof w.then=="function")return g(b,v,ng(w),S);if(w.$$typeof===da)return g(b,v,tg(b,w),S);rg(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,v!==null&&v.tag===6?(n(b,v.sibling),S=i(v,w),S.return=b,b=S):(n(b,v),S=sw(w,b.mode,S),S.return=b,b=S),o(b)):n(b,v)}return function(b,v,w,S){try{th=0;var O=g(b,v,w,S);return _c=null,O}catch(E){if(E===ud||E===Qb)throw E;var j=Pr(29,E,null,b.mode);return j.lanes=S,j.return=b,j}finally{}}}var nu=AL(!0),CL=AL(!1),Qo=!1;function lT(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ws(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ss(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ft&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=zv(e),bL(e,null,n),t}return Xb(e,r,t,n),zv(e)}function _p(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vk(e,n)}}function cw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uS=!1;function Np(){if(uS){var e=Cc;if(e!==null)throw e}}function Rp(e,t,n,r){uS=!1;var i=e.updateQueue;Qo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(a!==null){var d=i.baseState;o=0,f=u=l=null,s=a;do{var p=s.lane&-536870913,h=p!==s.lane;if(h?(Je&p)===p:(r&p)===p){p!==0&&p===tu&&(uS=!0),f!==null&&(f=f.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var y=e,m=s;p=t;var g=n;switch(m.tag){case 1:if(y=m.payload,typeof y=="function"){d=y.call(g,d,p);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,p=typeof y=="function"?y.call(g,d,p):y,p==null)break e;d=Rt({},d,p);break e;case 2:Qo=!0}}p=s.callback,p!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[p]:h.push(p))}else h={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=h,l=d):f=f.next=h,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);f===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,a===null&&(i.shared.lanes=0),Ls|=o,e.lanes=o,e.memoizedState=d}}function _L(e,t){if(typeof e!="function")throw Error(ne(191,e));e.call(t)}function NL(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)_L(n[e],t)}var Is=_a(null),Vv=_a(0);function vN(e,t){e=vo,kt(Vv,e),kt(Is,t),vo=e|t.baseLanes}function cS(){kt(Vv,vo),kt(Is,Is.current)}function uT(){vo=Vv.current,Vn(Is),Vn(Vv)}var Xn=_a(null),ar=null;function Os(e){var t=e.alternate;kt(Gn,Gn.current&1),kt(Xn,e),ar===null&&(t===null||Is.current!==null||t.memoizedState!==null)&&(ar=e)}function fS(e){kt(Gn,Gn.current),kt(Xn,e),ar===null&&(ar=e)}function RL(e){e.tag===22?(kt(Gn,Gn.current),kt(Xn,e),ar===null&&(ar=e)):js()}function js(){kt(Gn,Gn.current),kt(Xn,Xn.current)}function Gr(e){Vn(Xn),ar===e&&(ar=null),Vn(Gn)}var Gn=_a(0);function nh(e,t){kt(Xn,Xn.current),kt(Gn,t)}function cT(e){Vn(Gn),Vn(Xn),ar===e&&(ar=null)}function Gv(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||VS(n)||kT(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,qe=null,jt=null,on=null,Kv=!1,Nc=!1,ru=!1,Yv=0,rh=0,Rc=null,t9=0;function Qt(){throw Error(ne(321))}function fT(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ri(e[n],t[n]))return!1;return!0}function dT(e,t,n,r,i,a){return ho=a,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pe.H=e===null||e.memoizedState===null?l3:u3,ru=!1,a=n(r,i),ru=!1,Nc&&(a=PL(t,n,r,i)),ML(e),a}function ML(e){Pe.H=Xv;var t=jt!==null&&jt.next!==null;if(ho=0,on=jt=qe=null,Kv=!1,rh=0,Rc=null,t)throw Error(ne(300));e===null||un||(e=e.dependencies,e!==null&&Hv(e)&&(un=!0))}function PL(e,t,n,r){qe=e;var i=0;do{if(Nc&&(Rc=null),rh=0,Nc=!1,25<=i)throw Error(ne(301));if(i+=1,on=jt=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}Pe.H=u9,a=t(n,r)}while(Nc);return a}function n9(){var e=Pe.H,t=e.useState()[0];return t=typeof t.then=="function"?ym(t):t,e=e.useState()[0],(jt!==null?jt.memoizedState:null)!==e&&(qe.flags|=1024),t}function pT(){var e=Yv!==0;return Yv=0,e}function hT(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function mT(e){if(Kv){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Kv=!1}ho=0,on=jt=qe=null,Nc=!1,rh=Yv=0,Rc=null}function vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?qe.memoizedState=on=e:on=on.next=e,on}function rn(){if(jt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=jt.next;var t=on===null?qe.memoizedState:on.next;if(t!==null)on=t,jt=e;else{if(e===null)throw qe.alternate===null?Error(ne(467)):Error(ne(310));jt=e,e={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},on===null?qe.memoizedState=on=e:on=on.next=e}return on}function Zb(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ym(e){var t=rh;return rh+=1,Rc===null&&(Rc=[]),e=TL(Rc,e,t),t=qe,(on===null?t.memoizedState:on.next)===null&&(t=t.alternate,Pe.H=t===null||t.memoizedState===null?l3:u3),e}function Jb(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ym(e);if(e.$$typeof===kV)return;if(e.$$typeof===da)return qn(e)}throw Error(ne(438,String(e)))}function gT(e){var t=null,n=qe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=qe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Zb(),qe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=IV;return t.index++,n}function mo(e,t){return typeof t=="function"?t(e):t}function cv(e){var t=rn();return vT(t,jt,e)}function vT(e,t,n){var r=e.queue;if(r===null)throw Error(ne(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var s=o=null,l=null,u=t,f=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Je&d)===d:(ho&d)===d){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===tu&&(f=!0);else if((ho&p)===p){u=u.next,p===tu&&(f=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=d,o=a):l=l.next=d,qe.lanes|=p,Ls|=p;d=u.action,ru&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else p={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=p,o=a):l=l.next=p,qe.lanes|=d,Ls|=d;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=s,!ri(a,e.memoizedState)&&(un=!0,f&&(n=Cc,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function fw(e){var t=rn(),n=t.queue;if(n===null)throw Error(ne(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);ri(a,t.memoizedState)||(un=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function $L(e,t,n){var r=qe,i=rn(),a=Ke;if(a){if(n===void 0)throw Error(ne(407));n=n()}else n=t();var o=!ri((jt||i).memoizedState,n);if(o&&(i.memoizedState=n,un=!0),i=i.queue,yT(kL.bind(null,r,i,e),[e]),e=i.getSnapshot!==t||o||on!==null&&(on.memoizedState.tag&1)!==0,df(e?9:8,{destroy:void 0},IL.bind(null,r,i,n,t),null),e){if(r.flags|=2048,_t===null)throw Error(ne(349));a||ho&127||DL(r,t,n)}return n}function DL(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t=Zb(),qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function IL(e,t,n,r){t.value=n,t.getSnapshot=r,LL(t)&&BL(e)}function kL(e,t,n){return n(function(){LL(t)&&BL(e)})}function LL(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ri(e,n)}catch{return!0}}function BL(e){var t=Eu(e,2);t!==null&&Dr(t,e,2)}function dS(e){var t=vr();if(typeof e=="function"){var n=e;if(e=n(),ru){us(!0);try{n()}finally{us(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:e},t}function zL(e,t,n,r){return e.baseState=n,vT(e,jt,typeof r=="function"?r:mo)}function r9(e,t,n,r,i){if(tx(e))throw Error(ne(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){a.listeners.push(o)}};Pe.T!==null?n(!0):a.isTransition=!1,r(a),n=t.pending,n===null?(a.next=t.pending=a,FL(t,a)):(a.next=n.next,t.pending=n.next=a)}}function FL(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=Pe.T,o={};o.types=a!==null?a.types:null,Pe.T=o;try{var s=n(i,r),l=Pe.S;l!==null&&l(o,s),yN(e,t,s)}catch(u){pS(e,t,u)}finally{a!==null&&o.types!==null&&(a.types=o.types),Pe.T=a}}else try{a=n(i,r),yN(e,t,a)}catch(u){pS(e,t,u)}}function yN(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){bN(e,t,r)},function(r){return pS(e,t,r)}):bN(e,t,n)}function bN(e,t,n){t.status="fulfilled",t.value=n,UL(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,FL(e,n)))}function pS(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,UL(t),t=t.next;while(t!==r)}e.action=null}function UL(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function HL(e,t){return t}function xN(e,t){if(Ke){var n=_t.formState;if(n!==null){e:{var r=qe;if(Ke){if(Dt){t:{for(var i=Dt,a=wi;i.nodeType!==8;){if(!a){i=null;break t}if(i=Ei(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){Dt=Ei(i.nextSibling),r=i.data==="F!";break e}}Ds(r)}r=!1}r&&(t=n[0])}}return n=vr(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:HL,lastRenderedState:t},n.queue=r,n=a3.bind(null,qe,r),r.dispatch=n,r=dS(!1),a=ST.bind(null,qe,!1,r.queue),r=vr(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=r9.bind(null,qe,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function wN(e){var t=rn();return qL(t,jt,e)}function qL(e,t,n){if(t=vT(e,t,HL)[0],e=cv(mo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ym(t)}catch(o){throw o===ud?Qb:o}else r=t;t=rn();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(qe.flags|=2048,df(9,{destroy:void 0},i9.bind(null,i,n),null)),[r,a,e]}function i9(e,t){e.action=t}function SN(e){var t=rn(),n=jt;if(n!==null)return qL(t,n,e);rn(),t=t.memoizedState,n=rn();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function df(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Zb(),qe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function VL(){return rn().memoizedState}function fv(e,t,n,r){var i=vr();qe.flags|=e,i.memoizedState=df(1|t,{destroy:void 0},n,r===void 0?null:r)}function ex(e,t,n,r){var i=rn();r=r===void 0?null:r;var a=i.memoizedState.inst;jt!==null&&r!==null&&fT(r,jt.memoizedState.deps)?i.memoizedState=df(t,a,n,r):(qe.flags|=e,i.memoizedState=df(1|t,a,n,r))}function ON(e,t){fv(8390656,8,e,t)}function yT(e,t){ex(2048,8,e,t)}function a9(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Zb(),qe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function GL(e){var t=rn().memoizedState;return a9({ref:t,nextImpl:e}),function(){if(ft&2)throw Error(ne(440));return t.impl.apply(void 0,arguments)}}function KL(e,t){return ex(4,2,e,t)}function YL(e,t){return ex(4,4,e,t)}function XL(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function WL(e,t,n){n=n!=null?n.concat([e]):null,ex(4,4,XL.bind(null,t,e),n)}function bT(){}function QL(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&fT(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ZL(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&fT(t,r[1]))return r[0];if(r=e(),ru){us(!0);try{e()}finally{us(!1)}}return n.memoizedState=[r,t],r}function xT(e,t,n){return n===void 0||ho&1073741824&&!(Je&261930)?e.memoizedState=t:(e.memoizedState=n,e=q3(),qe.lanes|=e,Ls|=e,n)}function JL(e,t,n,r){return ri(n,t)?n:Is.current!==null?(e=xT(e,n,r),ri(e,t)||(un=!0),e):!(ho&106)||ho&1073741824&&!(Je&261930)?(un=!0,e.memoizedState=n):(e=q3(),qe.lanes|=e,Ls|=e,t)}function e3(e,t,n,r,i){var a=pt.p;pt.p=a!==0&&8>a?a:8;var o=Pe.T,s={};s.types=o!==null?o.types:null,Pe.T=s,ST(e,!1,t,n);try{var l=i(),u=Pe.S;if(u!==null&&u(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=e9(l,r);Mp(e,t,f,ei(e))}else Mp(e,t,r,ei(e))}catch(d){Mp(e,t,{then:function(){},status:"rejected",reason:d},ei())}finally{pt.p=a,o!==null&&s.types!==null&&(o.types=s.types),Pe.T=o}}function o9(){}function hS(e,t,n,r){if(e.tag!==5)throw Error(ne(476));var i=t3(e).queue;e3(e,i,t,Fl,n===null?o9:function(){return n3(e),n(r)})}function t3(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fl,baseState:Fl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:Fl},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function n3(e){var t=t3(e);t.next===null&&(t=e.alternate.memoizedState),Mp(e,t.next.queue,{},ei())}function wT(){return qn(bf)}function r3(){return rn().memoizedState}function i3(){return rn().memoizedState}function s9(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=ei();e=ws(n);var r=Ss(t,e,n);r!==null&&(Dr(r,t,n),_p(r,t,n)),t={cache:aT()},e.payload=t;return}t=t.return}}function l9(e,t,n){var r=ei();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tx(e)?o3(t,n):(n=nT(e,t,n,r),n!==null&&(Dr(n,e,r),s3(n,t,r)))}function a3(e,t,n){var r=ei();Mp(e,t,n,r)}function Mp(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(tx(e))o3(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ri(s,o))return Xb(e,t,i,0),_t===null&&Yb(),!1}catch{}finally{}if(n=nT(e,t,i,r),n!==null)return Dr(n,e,r),s3(n,t,r),!0}return!1}function ST(e,t,n,r){if(r={lane:2,revertLane:PT(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},tx(e)){if(t)throw Error(ne(479))}else t=nT(e,n,r,2),t!==null&&Dr(t,e,2)}function tx(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function o3(e,t){Nc=Kv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function s3(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vk(e,n)}}var Xv={readContext:qn,use:Jb,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt,useEffectEvent:Qt},l3={readContext:qn,use:Jb,useCallback:function(e,t){return vr().memoizedState=[e,t===void 0?null:t],e},useContext:qn,useEffect:ON,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,fv(4194308,4,XL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fv(4194308,4,e,t)},useInsertionEffect:function(e,t){fv(4,2,e,t)},useMemo:function(e,t){var n=vr();t=t===void 0?null:t;var r=e();if(ru){us(!0);try{e()}finally{us(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=vr();if(n!==void 0){var i=n(t);if(ru){us(!0);try{n(t)}finally{us(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=l9.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=vr();return e={current:e},t.memoizedState=e},useState:function(e){e=dS(e);var t=e.queue,n=a3.bind(null,qe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bT,useDeferredValue:function(e,t){var n=vr();return xT(n,e,t)},useTransition:function(){var e=dS(!1);return e=e3.bind(null,qe,e.queue,!0,!1),vr().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=qe,i=vr();if(Ke){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),_t===null)throw Error(ne(349));Je&127||DL(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ON(kL.bind(null,r,a,e),[e]),r.flags|=2048,df(9,{destroy:void 0},IL.bind(null,r,a,n,t),null),n},useId:function(){var e=vr(),t=_t.identifierPrefix;if(Ke){var n=ma,r=ha;n=(r&~(1<<32-Jr(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Yv++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=t9++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wT,useFormState:xN,useActionState:xN,useOptimistic:function(e){var t=vr();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ST.bind(null,qe,!0,n),n.dispatch=t,[e,t]},useMemoCache:gT,useCacheRefresh:function(){return vr().memoizedState=s9.bind(null,qe)},useEffectEvent:function(e){var t=vr(),n={impl:e};return t.memoizedState=n,function(){if(ft&2)throw Error(ne(440));return n.impl.apply(void 0,arguments)}}},u3={readContext:qn,use:Jb,useCallback:QL,useContext:qn,useEffect:yT,useImperativeHandle:WL,useInsertionEffect:KL,useLayoutEffect:YL,useMemo:ZL,useReducer:cv,useRef:VL,useState:function(){return cv(mo)},useDebugValue:bT,useDeferredValue:function(e,t){var n=rn();return JL(n,jt.memoizedState,e,t)},useTransition:function(){var e=cv(mo)[0],t=rn().memoizedState;return[typeof e=="boolean"?e:ym(e),t]},useSyncExternalStore:$L,useId:r3,useHostTransitionStatus:wT,useFormState:wN,useActionState:wN,useOptimistic:function(e,t){var n=rn();return zL(n,jt,e,t)},useMemoCache:gT,useCacheRefresh:i3,useEffectEvent:GL},u9={readContext:qn,use:Jb,useCallback:QL,useContext:qn,useEffect:yT,useImperativeHandle:WL,useInsertionEffect:KL,useLayoutEffect:YL,useMemo:ZL,useReducer:fw,useRef:VL,useState:function(){return fw(mo)},useDebugValue:bT,useDeferredValue:function(e,t){var n=rn();return jt===null?xT(n,e,t):JL(n,jt.memoizedState,e,t)},useTransition:function(){var e=fw(mo)[0],t=rn().memoizedState;return[typeof e=="boolean"?e:ym(e),t]},useSyncExternalStore:$L,useId:r3,useHostTransitionStatus:wT,useFormState:SN,useActionState:SN,useOptimistic:function(e,t){var n=rn();return jt!==null?zL(n,jt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:gT,useCacheRefresh:i3,useEffectEvent:GL};function dw(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Rt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var mS={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ei(),i=ws(r);i.payload=t,n!=null&&(i.callback=n),t=Ss(e,i,r),t!==null&&(Dr(t,e,r),_p(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ei(),i=ws(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ss(e,i,r),t!==null&&(Dr(t,e,r),_p(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ei(),r=ws(n);r.tag=2,t!=null&&(r.callback=t),t=Ss(e,r,n),t!==null&&(Dr(t,e,n),_p(t,e,n))}};function jN(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Zp(n,r)||!Zp(i,a):!0}function EN(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mS.enqueueReplaceState(t,t.state,null)}function iu(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Rt({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function c3(e){Bv(e)}function f3(e){console.error(e)}function d3(e){Bv(e)}function Wv(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function TN(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function gS(e,t,n){return n=ws(n),n.tag=3,n.payload={element:null},n.callback=function(){Wv(e,t)},n}function p3(e){return e=ws(e),e.tag=3,e}function h3(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){TN(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){TN(t,n,r),typeof i!="function"&&(Es===null?Es=new Set([this]):Es.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function c9(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Jl(t,n,i,!0),n=Xn.current,n!==null){switch(n.tag){case 31:case 13:case 19:return ar===null?iy():n.alternate===null&&Jt===0&&(Jt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===qv?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),bw(e,r,i)),!1;case 22:return n.flags|=65536,r===qv?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),bw(e,r,i)),!1}throw Error(ne(435,n.tag))}return bw(e,r,i),iy(),!1}if(Ke)return t=Xn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==iS&&(e=Error(ne(422),{cause:r}),eh(xi(e,n)))):(r!==iS&&(t=Error(ne(423),{cause:r}),eh(xi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=xi(r,n),i=gS(e.stateNode,r,i),cw(e,i),Jt!==4&&(Jt=2)),!1;var a=Error(ne(520),{cause:r});if(a=xi(a,n),Ip===null?Ip=[a]:Ip.push(a),Jt!==4&&(Jt=2),t===null)return!0;r=xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=gS(n.stateNode,r,e),cw(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Es===null||!Es.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=p3(i),h3(i,e,n,r),cw(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var OT=Error(ne(461)),un=!1;function yn(e,t,n,r){t.child=e===null?CL(t,null,n,r):nu(t,e.child,n,r)}function AN(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var o={};for(var s in r)s!=="ref"&&(o[s]=r[s])}else o=r;return eu(t),r=dT(e,t,n,o,a,i),s=pT(),e!==null&&!un?(hT(e,t,i),go(e,t,i)):(Ke&&s&&Wb(t),t.flags|=1,yn(e,t,r,i),t.child)}function CN(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!rT(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,m3(e,t,a,r,i)):(e=sv(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ET(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Zp,n(o,r)&&e.ref===t.ref)return go(e,t,i)}return t.flags|=1,e=no(a,r),e.ref=t.ref,e.return=t,t.child=e}function m3(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Zp(a,r)&&e.ref===t.ref)if(un=!1,t.pendingProps=r=a,ET(e,i))e.flags&131072&&(un=!0);else return t.lanes=e.lanes,go(e,t,i)}return vS(e,t,n,r,i)}function g3(e,t,n,r){var i=r.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(a=a!==null?a.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return _N(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&uv(t,a!==null?a.cachePool:null),a!==null?vN(t,a):cS(),RL(t);else return r=t.lanes=536870912,_N(e,t,a!==null?a.baseLanes|n:n,n,r)}else a!==null?(uv(t,a.cachePool),vN(t,a),js(),t.memoizedState=null):(e!==null&&uv(t,null),cS(),js());return yn(e,t,i,n),t.child}function Pp(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _N(e,t,n,r,i){var a=oT();return a=a===null?null:{parent:sn._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&uv(t,null),cS(),RL(t),e!==null&&Jl(e,t,r,!0),t.childLanes=i,null}function dv(e,t){return t=nx({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function NN(e,t,n){return nu(t,e.child,null,n),e=dv(t,t.pendingProps),e.flags|=2,Gr(t),t.memoizedState=null,e}function f9(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ke){if(r.mode==="hidden")return e=dv(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Pp(null,e);if(fS(t),(e=Dt)?(e=m5(e,wi),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$s!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},n=wL(e),n.return=t,t.child=n,Mn=t,Dt=null)):e=null,e===null)throw Ds(t);return t.lanes=536870912,null}return dv(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(fS(t),i)if(t.flags&256)t.flags&=-257,t=NN(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(ne(558));else if(un||Jl(e,t,n,!1),i=(n&e.childLanes)!==0,un||i){if(Is.current===null){if(r=_t,r!==null&&(o=Gk(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,Eu(e,o),Dr(r,e,o),OT;iy()}t=NN(e,t,n)}else e=a.treeContext,Dt=Ei(o.nextSibling),Mn=t,Ke=!0,xs=null,wi=!1,e!==null&&OL(t,e),t=dv(t,r),t.flags|=134221824;return t}return e=no(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ec(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(ne(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function vS(e,t,n,r,i){return eu(t),n=dT(e,t,n,r,void 0,i),r=pT(),e!==null&&!un?(hT(e,t,i),go(e,t,i)):(Ke&&r&&Wb(t),t.flags|=1,yn(e,t,n,i),t.child)}function RN(e,t,n,r,i,a){return eu(t),t.updateQueue=null,n=PL(t,r,n,i),ML(e),r=pT(),e!==null&&!un?(hT(e,t,a),go(e,t,a)):(Ke&&r&&Wb(t),t.flags|=1,yn(e,t,n,a),t.child)}function MN(e,t,n,r,i){if(eu(t),t.stateNode===null){var a=hc,o=n.contextType;typeof o=="object"&&o!==null&&(a=qn(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=mS,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},lT(t),o=n.contextType,a.context=typeof o=="object"&&o!==null?qn(o):hc,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(dw(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(o=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),o!==a.state&&mS.enqueueReplaceState(a,a.state,null),Rp(t,r,a,i),Np(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,l=iu(n,s);a.props=l;var u=a.context,f=n.contextType;o=hc,typeof f=="object"&&f!==null&&(o=qn(f));var d=n.getDerivedStateFromProps;f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s||u!==o)&&EN(t,a,r,o),Qo=!1;var p=t.memoizedState;a.state=p,Rp(t,r,a,i),Np(),u=t.memoizedState,s||p!==u||Qo?(typeof d=="function"&&(dw(t,n,d,r),u=t.memoizedState),(l=Qo||jN(t,n,l,r,p,u,o))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=o,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,lS(e,t),o=t.memoizedProps,f=iu(n,o),a.props=f,d=t.pendingProps,p=a.context,u=n.contextType,l=hc,typeof u=="object"&&u!==null&&(l=qn(u)),s=n.getDerivedStateFromProps,(u=typeof s=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||p!==l)&&EN(t,a,r,l),Qo=!1,p=t.memoizedState,a.state=p,Rp(t,r,a,i),Np();var h=t.memoizedState;o!==d||p!==h||Qo||e!==null&&e.dependencies!==null&&Hv(e.dependencies)?(typeof s=="function"&&(dw(t,n,s,r),h=t.memoizedState),(f=Qo||jN(t,n,f,r,p,h,l)||e!==null&&e.dependencies!==null&&Hv(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,h,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,h,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=f):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ec(e,t),r=(t.flags&128)!==0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&r?(t.child=nu(t,e.child,null,i),t.child=nu(t,null,n,i)):yn(e,t,n,i),t.memoizedState=a.state,e=t.child):e=go(e,t,i),e}function PN(e,t,n,r){return Zl(),t.flags|=256,yn(e,t,n,r),t.child}var yS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bS(e){return{baseLanes:e,cachePool:EL()}}function xS(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Xr),e}function v3(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(Gn.current&2)!==0),o&&(i=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ke){if(i?Os(t):js(),(e=Dt)?(e=m5(e,wi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$s!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},n=wL(e),n.return=t,t.child=n,Mn=t,Dt=null)):e=null,e===null)throw Ds(t);return kT(e)?t.lanes=32:t.lanes=536870912,null}return a=r.children,r=r.fallback,i?(js(),i=t.mode,a=nx({mode:"hidden",children:a},i),r=Ul(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=bS(n),r.childLanes=xS(e,o,n),t.memoizedState=yS,Pp(null,r)):(Os(t),jT(t,a))}var s=e.memoizedState;if(s!==null){var l=s.dehydrated;if(l!==null)return d9(e,t,a,o,r,l,s,n)}return i?(js(),i=r.fallback,a=t.mode,s=e.child,l=s.sibling,r=no(s,{mode:"hidden",children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,l!==null?i=no(l,i):(i=Ul(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,Pp(null,r),r=t.child,i=e.child.memoizedState,i===null?i=bS(n):(a=i.cachePool,a!==null?(s=sn._currentValue,a=a.parent!==s?{parent:s,pool:s}:a):a=EL(),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=xS(e,o,n),t.memoizedState=yS,Pp(e.child,r)):(Os(t),n=e.child,e=n.sibling,n=no(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function jT(e,t){return t=nx({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function nx(e,t){return e=Pr(22,e,null,t),e.lanes=0,e}function ig(e,t,n){return nu(t,e.child,null,n),e=jT(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function d9(e,t,n,r,i,a,o,s){if(n)return t.flags&256?(Os(t),t.flags&=-257,ig(e,t,s)):t.memoizedState!==null?(js(),t.child=e.child,t.flags|=128,null):(js(),a=i.fallback,o=t.mode,i=nx({mode:"visible",children:i.children},o),a=Ul(a,o,s,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,nu(t,e.child,null,s),i=t.child,i.memoizedState=bS(s),i.childLanes=xS(e,r,s),t.memoizedState=yS,Pp(null,i));if(Os(t),kT(a)){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==""&&(i=Error(ne(419)),i.stack="",i.digest=r,eh({value:i,source:null,stack:null})),ig(e,t,s)}if(un||Jl(e,t,s,!1),r=(s&e.childLanes)!==0,un||r){if(Is.current!==null)return ig(e,t,s);if(r=_t,r!==null&&(i=Gk(r,s),i!==0&&i!==o.retryLane))throw o.retryLane=i,Eu(e,i),Dr(r,e,i),OT;return VS(a)||iy(),ig(e,t,s)}return VS(a)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,Dt=Ei(a.nextSibling),Mn=t,Ke=!0,xs=null,wi=!1,e!==null&&OL(t,e),t=jT(t,i.children),t.flags|=134221824,t)}function $N(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),lv(e.return,t,n)}function DN(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Gv(n)===null&&(t=e),e=e.sibling}return t}function ag(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function pw(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function wS(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Gn.current;if(t.flags&128)return nh(t,o),null;var s=(o&2)!==0;if(s?(o=o&1|2,t.flags|=128):o&=1,nh(t,o),i==="backwards"&&e!==null?(pw(e),yn(e,t,r,n),pw(e)):yn(e,t,r,n),r=Ke?Jp:0,!s&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$N(e,n,t);else if(e.tag===19)$N(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"backwards":n=DN(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,pw(t)),ag(t,!0,i,null,a,r);break;case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Gv(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ag(t,!0,n,null,a,r);break;case"together":ag(t,!1,null,null,void 0,r);break;case"independent":t.memoizedState=null;break;default:n=DN(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ag(t,!1,i,n,a,r)}return t.child}function IN(e,t,n){var r=t.pendingProps;return fs(t,t.type,r.value),yn(e,t,r.children,n),t.child}function go(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ls|=t.lanes,!(n&t.childLanes))if(e!==null){if(Jl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(ne(153));if(t.child!==null){for(e=t.child,n=no(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=no(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ET(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Hv(e)))}function p9(e,t,n){switch(t.tag){case 3:Dv(t,t.stateNode.containerInfo),fs(t,sn,e.memoizedState.cache),Zl();break;case 27:case 5:Y1(t);break;case 4:Dv(t,t.stateNode.containerInfo);break;case 10:fs(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fS(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Os(t),t.flags|=128,null;r=Jl(e,t,n,!1);var i=t.child.childLanes;return r||n&i?v3(e,t,n):(Os(t),e=go(e,t,n),e!==null?e.sibling:null)}Os(t);break;case 19:if(t.flags&128)return wS(e,t,n);if(i=(e.flags&128)!==0,r=(n&t.childLanes)!==0,r||(Jl(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return wS(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),nh(t,Gn.current),r)break;return null;case 22:return t.lanes=0,g3(e,t,n,t.pendingProps);case 24:fs(t,sn,e.memoizedState.cache)}return go(e,t,n)}function y3(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)un=!0;else{if(!ET(e,n)&&!(t.flags&128))return un=!1,p9(e,t,n);un=!!(e.flags&131072)}else un=!1,Ke&&t.flags&1048576&&SL(t,Jp,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=gl(t.elementType),t.type=e,typeof e=="function")rT(e)?(r=iu(e,r),t.tag=1,t=MN(null,t,e,r,n)):(t.tag=0,t=vS(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===qE){t.tag=11,t=AN(null,t,e,r,n);break e}else if(i===VE){t.tag=14,t=CN(null,t,e,r,n);break e}else if(i===da){t.tag=10,t.type=e,t=IN(null,t,n);break e}}throw t=G1(e)||e,Error(ne(306,t,""))}}return t;case 0:return vS(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=iu(r,t.pendingProps),MN(e,t,r,i,n);case 3:e:{if(Dv(t,t.stateNode.containerInfo),e===null)throw Error(ne(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,lS(e,t),Rp(t,r,null,n);var o=t.memoizedState;if(r=o.cache,fs(t,sn,r),r!==a.cache&&oS(t,[sn],n,!0),Np(),r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=PN(e,t,r,n);break e}else if(r!==i){i=xi(Error(ne(424)),t),eh(i),t=PN(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Dt=Ei(e.firstChild),Mn=t,Ke=!0,xs=null,wi=!0,n=CL(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Zl(),r===i){t=go(e,t,n);break e}yn(e,t,r,n)}t=t.child}return t;case 26:return ec(e,t),e===null?(n=sR(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ke||(t.stateNode=s5(t.type,t.pendingProps,bs.current,t)):t.memoizedState=sR(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Y1(t),e===null&&Ke&&(r=t.stateNode=g5(t.type,t.pendingProps,bs.current),Mn=t,wi=!0,i=Dt,Vs(t.type)?(GS=i,Dt=Ei(r.firstChild)):Dt=i),yn(e,t,t.pendingProps.children,n),ec(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ke&&((i=r=Dt)&&(r=sK(r,t.type,t.pendingProps,wi),r!==null?(t.stateNode=r,Mn=t,Dt=Ei(r.firstChild),wi=!1,i=!0):i=!1),i||Ds(t)),Y1(t),i=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,r=a.children,US(i,a)?r=null:o!==null&&US(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=dT(e,t,n9,null,null,n),bf._currentValue=i),ec(e,t),yn(e,t,r,n),t.child;case 6:return e===null&&Ke&&((e=n=Dt)&&(n=lK(n,t.pendingProps,wi),n!==null?(t.stateNode=n,Mn=t,Dt=null,e=!0):e=!1),e||Ds(t)),null;case 13:return v3(e,t,n);case 4:return Dv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nu(t,null,r,n):yn(e,t,r,n),t.child;case 11:return AN(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,ec(e,t),yn(e,t,r,n),t.child;case 8:return yn(e,t,t.pendingProps.children,n),t.child;case 12:return yn(e,t,t.pendingProps.children,n),t.child;case 10:return IN(e,t,n);case 9:return i=t.type._context,r=t.pendingProps.children,eu(t),i=qn(i),r=r(i),t.flags|=1,yn(e,t,r,n),t.child;case 14:return CN(e,t,t.type,t.pendingProps,n);case 15:return m3(e,t,t.type,t.pendingProps,n);case 19:return wS(e,t,n);case 31:return f9(e,t,n);case 22:return g3(e,t,n,t.pendingProps);case 24:return eu(t),r=qn(sn),e===null?(i=oT(),i===null&&(i=_t,a=aT(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},lT(t),fs(t,sn,i)):(e.lanes&n&&(lS(e,t),Rp(t,null,null,n),Np()),i=e.memoizedState,a=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),fs(t,sn,r)):(r=a.cache,fs(t,sn,r),r!==i.cache&&oS(t,[sn],n,!0))),yn(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!=="auto"?t.flags|=e===null?18882560:18874368:Ke&&Wb(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:ec(e,t),yn(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(ne(156,t.tag))}function La(e){e.flags|=4}function hw(e,t,n,r,i){var a;if((a=(e.mode&32)!==0)&&(a=n===null?cR(t,r):cR(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(K3())e.flags|=8192;else throw ql=qv,sT}else e.flags&=-16777217}function kN(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!x5(t))if(K3())e.flags|=8192;else throw ql=qv,sT}function og(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hk():536870912,e.lanes|=t,pf|=t)}function qd(e,t){if(!Ke)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function h9(e,t,n){var r=t.pendingProps;switch(iT(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(t),null;case 1:return Mt(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ro(sn),uf(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Uu(t)?La(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,uw())),Mt(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(La(t),a!==null?(Mt(t),kN(t,a)):(Mt(t),hw(t,i,null,r,n))):a?a!==e.memoizedState?(La(t),Mt(t),kN(t,a)):(Mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&La(t),Mt(t),hw(t,i,e,r,n)),null;case 27:if(Iv(t),n=bs.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&La(t);else{if(!r){if(t.stateNode===null)throw Error(ne(166));return Mt(t),t.subtreeFlags&=-33554433,null}e=ba.current,Uu(t)?cN(t):(e=g5(i,r,n),t.stateNode=e,La(t))}return Mt(t),t.subtreeFlags&=-33554433,null;case 5:if(Iv(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&La(t);else{if(!r){if(t.stateNode===null)throw Error(ne(166));return Mt(t),t.subtreeFlags&=-33554433,null}if(a=ba.current,Uu(t))cN(t);else{var o=oh(bs.current);switch(a){case 1:a=o.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=o.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=o.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof r.is=="string"?o.createElement("select",{is:r.is}):o.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is=="string"?o.createElement(i,{is:r.is}):o.createElement(i)}}a[Hn]=t,a[Lr]=r;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;e:switch(Kn(a,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&La(t)}}return Mt(t),t.subtreeFlags&=-33554433,hw(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&La(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ne(166));if(e=bs.current,Uu(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Mn,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Hn]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||a5(e.nodeValue,n)),e||Ds(t,!0)}else e=oh(e).createTextNode(r),e[Hn]=t,t.stateNode=e}return Mt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Uu(t),n!==null){if(e===null){if(!r)throw Error(ne(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(557));e[Hn]=t}else Zl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mt(t),e=!1}else n=uw(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Gr(t),t):(Gr(t),null);if(t.flags&128)throw Error(ne(558))}return Mt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Uu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(ne(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ne(317));i[Hn]=t}else Zl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mt(t),i=!1}else i=uw(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Gr(t),t):(Gr(t),null)}return Gr(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),og(t,t.updateQueue),Mt(t),null);case 4:return uf(),e===null&&$T(t.stateNode.containerInfo),t.flags|=67108864,Mt(t),null;case 10:return ro(t.type),Mt(t),null;case 19:if(cT(t),r=t.memoizedState,r===null)return Mt(t),null;if(i=(t.flags&128)!==0,a=r.rendering,a===null)if(i)qd(r,!1);else{if(Jt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Gv(e),a!==null){for(t.flags|=128,qd(r,!1),e=a.updateQueue,t.updateQueue=e,og(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)xL(n,e),n=n.sibling;return nh(t,Gn.current&1|2),Ke&&Ga(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Qr()>ny&&(t.flags|=128,i=!0,qd(r,!1),t.lanes=4194304)}else{if(!i)if(e=Gv(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,og(t,e),qd(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!a.alternate&&!Ke)return Mt(t),null}else 2*Qr()-r.renderingStartTime>ny&&n!==536870912&&(t.flags|=128,i=!0,qd(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e!==null?e.sibling=a:t.child=a,r.last=a)}if(r.tail!==null){e=r.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Qr(),e.sibling=null,a=Gn.current,a=i?a&1|2:a&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!n||Ke?nh(t,a):(n=a,kt(Xn,t),kt(Gn,n),ar===null&&(ar=t)),Ke&&Ga(t,r.treeForkCount),e}return Mt(t),null;case 22:case 23:return Gr(t),uT(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mt(t),t.subtreeFlags&6&&(t.flags|=8192)):Mt(t),n=t.updateQueue,n!==null&&og(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Vn(Hl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ro(sn),Mt(t),null;case 25:return null;case 30:return t.flags|=33554432,Mt(t),null}throw Error(ne(156,t.tag))}function m9(e,t){switch(iT(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ro(sn),uf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Iv(t),null;case 31:if(t.memoizedState!==null){if(Gr(t),t.alternate===null)throw Error(ne(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return cT(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return uf(),null;case 10:return ro(t.type),null;case 22:case 23:return Gr(t),uT(),e!==null&&Vn(Hl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ro(sn),null;case 25:return null;default:return null}}function b3(e,t){switch(iT(t),t.tag){case 3:ro(sn),uf();break;case 26:case 27:case 5:Iv(t);break;case 4:uf();break;case 31:t.memoizedState!==null&&Gr(t);break;case 13:Gr(t);break;case 19:cT(t);break;case 10:ro(t.type);break;case 22:case 23:Gr(t),uT(),e!==null&&Vn(Hl);break;case 24:ro(sn)}}function bm(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(s){xt(t,t.return,s)}}function ks(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var l=n,u=s;try{u()}catch(f){xt(i,l,f)}}}r=r.next}while(r!==a)}}catch(f){xt(t,t.return,f)}}function x3(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{NL(t,n)}catch(r){xt(e,e.return,r)}}}function w3(e,t,n){n.props=iu(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){xt(e,t,r)}}function ua(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=po(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=c5(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new ai(e);kr(e.child,!1,aK,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(s){xt(e,t,s)}}function Fn(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){xt(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){xt(e,t,i)}else n.current=null}function Qv(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)h5(e.stateNode,t[n])}function LN(e){for(var t=e.return;t!==null&&(AT(t)&&h5(e.stateNode,t.stateNode),!TT(t));)t=t.return}function $p(e){for(var t=e.return;t!==null&&(AT(t)&&oK(e.stateNode,t.stateNode),!TT(t));)t=t.return}function TT(e){return e.tag===5||e.tag===3||e.tag===27}function AT(e){return e&&e.tag===7&&e.stateNode!==null}function SS(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){xt(e,e.return,i)}}function mw(e,t,n){try{var r=e.stateNode;F9(r,e.type,n,t),r[Lr]=t}catch(i){xt(e,e.return,i)}}function S3(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vs(e.type)||e.tag===4}function gw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||S3(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Vs(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function OS(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pa)),Qv(e,r),lt=!0;else if(i!==4&&(i===27&&(Qv(e,r),r=null,Vs(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(OS(e,t,n,r),e=e.sibling;e!==null;)OS(e,t,n,r),e=e.sibling}function Zv(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Qv(e,r),lt=!0;else if(i!==4&&(i===27&&(Qv(e,r),r=null,Vs(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Zv(e,t,n,r),e=e.sibling;e!==null;)Zv(e,t,n,r),e=e.sibling}function O3(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kn(t,r,n),t[Hn]=e,t[Lr]=n}catch(a){xt(e,e.return,a)}}var Jv=!1,Kr=null;function BN(e){(e.tag===30||e.subtreeFlags&33554432)&&(Jv=!0)}var ca=null;function zN(){var e=ca;return ca=null,e}var Mr=0;function cd(e,t,n,r,i){return Mr=0,j3(e.child,t,n,r,i)}function j3(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=HS(o);r.push(s),s.view&&(a=!0)}else a||HS(o).view&&(a=!0);Jv=!0,l5(o,Mr===0?t:t+"_"+Mr,n),Mr++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||j3(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Ta(e,t){for(;e!==null;)e.tag===5?u5(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Ta(e.child,t)),e=e.sibling}function pv(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(pv(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(ne(544));var n=t.name;t=Ao(t.default,t.share),t!=="none"&&(cd(e,n,t,null,!1)||Ta(e.child,!1))}e=e.sibling}}function jS(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=po(r,n),a=Ao(r.default,n.paired?r.share:r.enter);a!=="none"?cd(e,i,a,null,!1)?(pv(e),n.paired||t||hf(e,r.onEnter)):Ta(e.child,!1):pv(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)jS(e,t),e=e.sibling;else pv(e)}function ES(e){if(Kr!==null&&Kr.size!==0){var t=Kr;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!=="auto"){var i=t.get(r);if(i!==void 0){var a=Ao(n.default,n.share);if(a!=="none"&&(cd(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,hf(e,n.onShare)):Ta(e.child,!1)),t.delete(r),t.size===0)break}}}ES(e)}e=e.sibling}}}function TS(e){if(e.tag===30){var t=e.memoizedProps,n=po(t,e.stateNode),r=Kr!==null?Kr.get(n):void 0,i=Ao(t.default,r!==void 0?t.share:t.exit);i!=="none"&&(cd(e,n,i,null,!1)?r!==void 0?(i=e.stateNode,r.paired=i,i.paired=r,Kr.delete(n),hf(e,t.onShare)):hf(e,t.onExit):Ta(e.child,!1)),Kr!==null&&ES(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)TS(e),e=e.sibling;else Kr!==null&&ES(e)}function E3(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=po(t,e.stateNode);t=Ao(t.default,t.update),e.flags&=-5,t!=="none"&&cd(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&E3(e);e=e.sibling}}function AS(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Ta(e.child,!1))}AS(e)}e=e.sibling}}function hv(e){if(e.tag===30)e.stateNode.paired=null,Ta(e.child,!1),AS(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)hv(e),e=e.sibling;else AS(e)}function T3(e){for(e=e.child;e!==null;)e.tag===30?Ta(e.child,!1):e.subtreeFlags&33554432&&T3(e),e=e.sibling}function CT(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var l=t.stateNode;if(a!==null&&Mr<a.length){var u=a[Mr],f=HS(l);(u.view||f.view)&&(s=!0);var d;if(d=(e.flags&4)===0)if(f.clip)d=!0;else{d=u.rect;var p=f.rect;d=d.y!==p.y||d.x!==p.x||d.height!==p.height||d.width!==p.width}d&&(e.flags|=4),f.abs?f=!u.abs:(u=u.rect,f=f.rect,f=u.height!==f.height||u.width!==f.width),f&&(e.flags|=32)}else e.flags|=32;e.flags&4&&l5(l,Mr===0?n:n+"_"+Mr,i),s&&e.flags&4||(ca===null&&(ca=[]),ca.push(l,Mr===0?r:r+"_"+Mr,t.memoizedProps)),Mr++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:CT(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function A3(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=po(n,r),a=Ao(n.default,n.update),o;o=e.memoizedState,e.memoizedState=null,r=e;var s=e.child;Mr=0,i=CT(r,s,i,i,a,o,!1),e.flags&4&&i&&hf(e,n.onUpdate)}else e.subtreeFlags&33554432&&A3(e);e=e.sibling}}var An=!1,gt=!1,Ji=!1,vw=!1,FN=typeof WeakSet=="function"?WeakSet:Set,_n=null,ea=!1,mp=!1,ey=!1,CS=!1;function g9(e,t,n){if(e=e.containerInfo,zS=xf,e=dL(e),eT(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,u=-1,f=0,d=0,p=e,h=null;t:for(;;){for(var y;p!==r||a!==0&&p.nodeType!==3||(l=s+a),p!==o||i!==0&&p.nodeType!==3||(u=s+i),p.nodeType===3&&(s+=p.nodeValue.length),(y=p.firstChild)!==null;)h=p,p=y;for(;;){if(p===e)break t;if(h===r&&++f===a&&(l=s),h===o&&++d===i&&(u=s),(y=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=y}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(FS={focusedElem:e,selectionRange:r},xf=!1,n=(n&335544064)===n,_n=t,t=n?9270:1024;_n!==null;){if(e=_n,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&TS(r[a]);if(e.alternate===null&&e.flags&2)n&&BN(e),sg(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&TS(r),sg(n);continue}else if(r!==null&&r.memoizedState!==null){n&&BN(e),sg(n);continue}}r=e.child,e.subtreeFlags&t&&r!==null?(r.return=e,_n=r):(n&&E3(e),sg(n))}}Kr=null}function sg(e){for(;_n!==null;){var t=_n,n=e,r=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(i&1024&&r!==null){n=void 0,i=r.memoizedProps,r=r.memoizedState;var a=t.stateNode;try{var o=iu(t.type,i);n=a.getSnapshotBeforeUpdate(o,r),a.__reactInternalSnapshotBeforeUpdate=n}catch(s){xt(t,t.return,s)}}break;case 3:if(i&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)qS(r);else if(n===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":qS(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=po(r.memoizedProps,r.stateNode),i=t.memoizedProps,i=Ao(i.default,i.update),i!=="none"&&cd(r,n,i,r.memoizedState=[],!0));break;default:if(i&1024)throw Error(ne(163))}if(r=t.sibling,r!==null){r.return=t.return,_n=r;break}_n=t.return}}function C3(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ta(e,n),r&4&&bm(5,n);break;case 1:if(ta(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){xt(n,n.return,o)}else{var i=iu(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){xt(n,n.return,o)}}r&64&&x3(n),r&512&&ua(n,n.return);break;case 3:if(ta(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{NL(e,t)}catch(o){xt(n,n.return,o)}}break;case 27:t===null&&r&4&&O3(n);case 26:case 5:ta(e,n),t===null&&r&4&&SS(n),r&512&&ua(n,n.return);break;case 12:ta(e,n);break;case 31:ta(e,n),r&4&&M3(e,n);break;case 13:ta(e,n),r&4&&P3(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=C9.bind(null,n),uK(e,n))));break;case 22:if(r=n.memoizedState!==null||An,!r){var a=t!==null&&t.memoizedState!==null||gt;t=An,i=gt,An=r,(gt=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Di(e,n,r)):ta(e,n),An=t,gt=i}break;case 30:ta(e,n),r&512&&ua(n,n.return);break;case 7:r&512&&ua(n,n.return);default:ta(e,n)}}function _S(e,t){for(e=e.child;e!==null;)_3(e,t),e=e.sibling}function _3(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null;i.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(l){xt(e,e.return,l)}NS(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,lt=!0}catch(l){xt(e,e.return,l)}break;case 18:try{var s=e.stateNode;t?tR(s,!0):tR(e.stateNode,!1)}catch(l){xt(e,e.return,l)}break;case 22:case 23:e.memoizedState===null&&_S(e,t);break;default:_S(e,t)}}function NS(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,r=t;switch(n.tag){case 4:_3(n,r);break e;case 22:n.memoizedState===null&&NS(n,r);break e;default:NS(n,r)}}e=e.sibling}}function N3(e){var t=e.alternate;t!==null&&(e.alternate=null,N3(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qb(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ft=null,_r=!1;function Pi(e,t,n){for(n=n.child;n!==null;)R3(e,t,n),n=n.sibling}function R3(e,t,n){if(Zr&&typeof Zr.onCommitFiberUnmount=="function")try{Zr.onCommitFiberUnmount(dm,n)}catch{}switch(n.tag){case 26:gt||Fn(n,t),Pi(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!gt&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:gt||Fn(n,t),$p(n);var r=Ft,i=_r;Vs(n.type)&&(Ft=n.stateNode,_r=!1),Pi(e,t,n),v5(n.stateNode,n.type,n.memoizedProps),Ft=r,_r=i;break;case 5:gt||Fn(n,t),$p(n);case 6:if(n.tag===6&&$p(n),r=Ft,i=_r,Ft=null,Pi(e,t,n),Ft=r,_r=i,Ft!==null)if(_r)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(n.stateNode),lt=!0}catch(a){xt(n,t,a)}else try{Ft.removeChild(n.stateNode),lt=!0}catch(a){xt(n,t,a)}break;case 18:Ft!==null&&(_r?(e=Ft,eR(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),wf(e)):eR(Ft,n.stateNode));break;case 4:r=Ft,i=_r,Ft=n.stateNode.containerInfo,_r=!0,Pi(e,t,n),Ft=r,_r=i;break;case 0:case 11:case 14:case 15:ks(2,n,t),gt||ks(4,n,t),Pi(e,t,n);break;case 1:gt||(Fn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&w3(n,t,r)),Pi(e,t,n);break;case 21:Pi(e,t,n);break;case 22:gt=(r=gt)||n.memoizedState!==null,Pi(e,t,n),gt=r;break;case 30:Fn(n,t),Pi(e,t,n);break;case 7:gt||Fn(n,t),Pi(e,t,n);break;default:Pi(e,t,n)}}function M3(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wf(e)}catch(n){xt(t,t.return,n)}}}function P3(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wf(e)}catch(n){xt(t,t.return,n)}}function v9(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new FN),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new FN),t;default:throw Error(ne(435,e.tag))}}function lg(e,t){var n=v9(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=_9.bind(null,e,r);r.then(i,i)}})}function pr(e,t,n){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i],o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 27:if(Vs(l.type)){Ft=l.stateNode,_r=!1;break e}break;case 5:Ft=l.stateNode,_r=!1;break e;case 3:case 4:Ft=l.stateNode.containerInfo,_r=!0;break e}l=l.return}if(Ft===null)throw Error(ne(160));R3(o,s,a),Ft=null,_r=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)$3(t,e,n),t=t.sibling}var Li=null;function $3(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(r=e.updateQueue,r=r!==null?r.events:null,r!==null))for(var a=0;a<r.length;a++){var o=r[a];o.ref.impl=o.nextImpl}pr(t,e,n),hr(e),i&4&&(ks(3,e,e.return),bm(3,e),ks(5,e,e.return));break;case 1:pr(t,e,n),hr(e),i&512&&(gt||r===null||Fn(r,r.return)),i&64&&An&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(a=Li,pr(t,e,n),hr(e),i&512&&(gt||r===null||Fn(r,r.return)),i&4)if(i=r!==null?r.memoizedState:null,n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null)if(An)e.stateNode=s5(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,i=a.ownerDocument||a;t:switch(t){case"title":r=i.getElementsByTagName("title")[0],(!r||r[mm]||r[Hn]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(t),i.head.insertBefore(r,i.querySelector("head > title"))),Kn(r,t,n),r[Hn]=e,Nn(r),t=r;break e;case"link":if(a=uR("link","href",i).get(t+(n.href||""))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break t}}r=i.createElement(t),Kn(r,t,n),i.head.appendChild(r);break;case"meta":if(a=uR("meta","content",i).get(t+(n.content||""))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(o,1);break t}}r=i.createElement(t),Kn(r,t,n),i.head.appendChild(r);break;default:throw Error(ne(468,t))}r[Hn]=e,Nn(r),t=r}e.stateNode=t}else An||KS(a,e.type,e.stateNode);else e.stateNode=lR(a,n,e.memoizedProps);else i!==n?(i===null?(t=r.stateNode,t===null||gt||t.parentNode.removeChild(t)):i.count--,n===null?An||KS(a,e.type,e.stateNode):lR(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&mw(e,e.memoizedProps,r.memoizedProps);break;case 27:pr(t,e,n),hr(e),i&512&&(gt||r===null||Fn(r,r.return)),r!==null&&i&4&&mw(e,e.memoizedProps,r.memoizedProps);break;case 5:if(a=Ji,Ji=!1,pr(t,e,n),Ji=a,hr(e),i&512&&(gt||r===null||Fn(r,r.return)),e.flags&32){t=e.stateNode;try{ff(t,""),lt=!0}catch(f){xt(e,e.return,f)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,mw(e,t,r!==null?r.memoizedProps:t)),i&1024&&(vw=!0);break;case 6:if(pr(t,e,n),hr(e),i&4){if(e.stateNode===null)throw Error(ne(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,lt=!0}catch(f){xt(e,e.return,f)}}break;case 3:if(lt=!1,yv=null,a=Li,Li=sh(t.containerInfo),pr(t,e,n),Li=a,hr(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{wf(t.containerInfo)}catch(f){xt(e,e.return,f)}vw&&(vw=!1,D3(e)),lt=!1;break;case 4:i=Ji,Ji=An,r=G_(),a=Li,Li=sh(e.stateNode.containerInfo),pr(t,e,n),hr(e),Li=a,lt&&mp&&(ey=!0),lt=r,Ji=i;break;case 12:pr(t,e,n),hr(e);break;case 31:pr(t,e,n),hr(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,lg(e,t)));break;case 13:pr(t,e,n),hr(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(rx=Qr()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,lg(e,t)));break;case 22:a=e.memoizedState!==null,o=r!==null&&r.memoizedState!==null;var s=An,l=gt,u=Ji;An=s||a,Ji=u||a,gt=l||o,pr(t,e,n),gt=l,Ji=u,An=s,hr(e),i&8192&&(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,!a||r===null||o||An||gt||(t=o||gt,n=An,r=gt,An=a||An,gt=t,Go(e,2),An=n,gt=r),!a&&Ji||_S(e,a)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,lg(e,n))));break;case 19:pr(t,e,n),hr(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,lg(e,t)));break;case 30:i&512&&(gt||r===null||Fn(r,r.return)),i=G_(),a=mp,o=(n&335544064)===n,s=e.memoizedProps,mp=o&&Ao(s.default,s.update)!=="none",pr(t,e,n),hr(e),o&&r!==null&<&&(e.flags|=4),mp=a,lt=i;break;case 21:break;case 7:i&512&&(gt||r===null||Fn(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:pr(t,e,n),hr(e)}}function hr(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(S3(r)){n=r;break}r=r.return}r=null;for(var i=e.return;i!==null;){if(AT(i)){var a=i.stateNode;r===null?r=[a]:r.push(a)}if(TT(i))break;i=i.return}var o=r;if(n==null)throw Error(ne(160));switch(n.tag){case 27:var s=n.stateNode,l=gw(e);Zv(e,l,s,o);break;case 5:var u=n.stateNode;n.flags&32&&(ff(u,""),n.flags&=-33);var f=gw(e);Zv(e,f,u,o);break;case 3:case 4:var d=n.stateNode.containerInfo,p=gw(e);OS(e,p,d,o);break;default:throw Error(ne(161))}}catch(h){xt(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function D3(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;D3(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,xf=!0,t.reset(),xf=!1),e=e.sibling}}function Hu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)I3(t,e),t=t.sibling;else A3(t)}function I3(e,t){var n=e.alternate;if(n===null)jS(e,!1);else switch(e.tag){case 3:if(CS=ea=!1,zN(),Hu(t,e),!ea&&!ey){if(e=ca,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];u5(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+i+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),CS=!0}ca=null;break;case 5:Hu(t,e);break;case 4:r=ea,ea=!1,Hu(t,e),ea&&(ey=!0),ea=r;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?jS(e,!1):Hu(t,e));break;case 30:r=ea,i=zN(),ea=!1,Hu(t,e),ea&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=po(a,o),o=po(n.memoizedProps,o);var s=Ao(a.default,a.update);s==="none"?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Mr=0,t=CT(e,n,t,o,s,a,!0),Mr!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(hf(e,e.memoizedProps.onUpdate),ca=i):i!==null&&(i.push.apply(i,ca),ca=i),ea=e.flags&32?!0:r;break;default:Hu(t,e)}}function ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)C3(e,t.alternate,t),t=t.sibling}function Go(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:ks(4,n,n.return),Go(n,r);break;case 1:Fn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&w3(n,n.return,i),Go(n,r);break;case 27:r&2&&v5(n.stateNode,n.type,n.memoizedProps);case 5:Fn(n,n.return),n.tag!==5&&n.tag!==27||$p(n),Go(n,r);break;case 6:$p(n);break;case 26:Fn(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||gt||i.parentNode.removeChild(i),Go(n,r);break;case 22:n.memoizedState===null&&Go(n,r);break;case 30:Fn(n,n.return),Go(n,r);break;case 7:Fn(n,n.return);default:Go(n,r)}e=e.sibling}}function Di(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=(n&1)!==0;switch(a.tag){case 0:case 11:case 15:Di(i,a,n),bm(4,a);break;case 1:if(Di(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(f){xt(r,r.return,f)}if(r=a,i=r.updateQueue,i!==null){var l=r.stateNode;try{var u=i.shared.hiddenCallbacks;if(u!==null)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)_L(u[i],l)}catch(f){xt(r,r.return,f)}}s&&o&64&&x3(a),ua(a,a.return);break;case 27:n&2&&O3(a);case 5:a.tag!==5&&a.tag!==27||LN(a),Di(i,a,n),s&&r===null&&o&4&&SS(a),ua(a,a.return);break;case 6:LN(a);break;case 26:l=a.stateNode,a.memoizedState!==null||l===null||An||KS(sh(l.ownerDocument),a.type,l),Di(i,a,n),s&&r===null&&o&4&&SS(a),ua(a,a.return);break;case 12:Di(i,a,n);break;case 31:Di(i,a,n),s&&o&4&&M3(i,a);break;case 13:Di(i,a,n),s&&o&4&&P3(i,a);break;case 22:a.memoizedState===null&&Di(i,a,n),ua(a,a.return);break;case 30:Di(i,a,n),ua(a,a.return);break;case 7:ua(a,a.return);default:Di(i,a,n)}t=t.sibling}}function _T(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&vm(n))}function NT(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vm(e))}function ui(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)k3(e,t,n,r),t=t.sibling;else i&&T3(t)}function k3(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&hv(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:ui(e,t,n,r),a&2048&&bm(9,t);break;case 1:ui(e,t,n,r);break;case 3:ui(e,t,n,r),i&&CS&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&vm(a)));break;case 12:if(a&2048){ui(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,l=o.onPostCommit;typeof l=="function"&&l(s,t.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(u){xt(t,t.return,u)}}else ui(e,t,n,r);break;case 31:ui(e,t,n,r);break;case 13:ui(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState!==null?(i&&s!==null&&s.memoizedState===null&&hv(s),o._visibility&2?ui(e,t,n,r):Dp(e,t)):(i&&s!==null&&s.memoizedState!==null&&hv(t),o._visibility&2?ui(e,t,n,r):(o._visibility|=2,tc(e,t,n,r,(t.subtreeFlags&10256)!==0||!1))),a&2048&&_T(s,t);break;case 24:ui(e,t,n,r),a&2048&&NT(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Ta(a.child,!0),Ta(t.child,!0))),ui(e,t,n,r);break;default:ui(e,t,n,r)}}function tc(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,o=t,s=n,l=r,u=o.flags;switch(o.tag){case 0:case 11:case 15:tc(a,o,s,l,i),bm(8,o);break;case 23:break;case 22:var f=o.stateNode;o.memoizedState!==null?f._visibility&2?tc(a,o,s,l,i):Dp(a,o):(f._visibility|=2,tc(a,o,s,l,i)),i&&u&2048&&_T(o.alternate,o);break;case 24:tc(a,o,s,l,i),i&&u&2048&&NT(o.alternate,o);break;default:tc(a,o,s,l,i)}t=t.sibling}}function Dp(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Dp(n,r),i&2048&&_T(r.alternate,r);break;case 24:Dp(n,r),i&2048&&NT(r.alternate,r);break;default:Dp(n,r)}t=t.sibling}}var vl=8192;function ul(e,t,n){if(e.subtreeFlags&vl)for(e=e.child;e!==null;)L3(e,t,n),e=e.sibling}function L3(e,t,n){switch(e.tag){case 26:ul(e,t,n),e.flags&vl&&(e.memoizedState!==null?OK(n,Li,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&fR(n,e)));break;case 5:ul(e,t,n),e.flags&vl&&(e=e.stateNode,(t&335544128)===t&&fR(n,e));break;case 3:case 4:var r=Li;Li=sh(e.stateNode.containerInfo),ul(e,t,n),Li=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=vl,vl=16777216,ul(e,t,n),vl=r):ul(e,t,n));break;case 30:if(e.flags&vl&&(r=e.memoizedProps.name,r!=null&&r!=="auto")){var i=e.stateNode;i.paired=null,Kr===null&&(Kr=new Map),Kr.set(r,i)}ul(e,t,n);break;default:ul(e,t,n)}}function B3(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_n=r,F3(r,e)}B3(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)z3(e),e=e.sibling}function z3(e){switch(e.tag){case 0:case 11:case 15:Vd(e),e.flags&2048&&ks(9,e,e.return);break;case 3:Vd(e);break;case 12:Vd(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mv(e)):Vd(e);break;default:Vd(e)}}function mv(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_n=r,F3(r,e)}B3(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ks(8,t,t.return),mv(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,mv(t));break;default:mv(t)}e=e.sibling}}function F3(e,t){for(;_n!==null;){var n=_n;switch(n.tag){case 0:case 11:case 15:ks(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:vm(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,_n=r;else e:for(n=e;_n!==null;){r=_n;var i=r.sibling,a=r.return;if(N3(r),r===n){_n=null;break e}if(i!==null){i.return=a,_n=i;break e}_n=a}}}var y9={getCacheForType:function(e){var t=qn(sn),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qn(sn).controller.signal}},b9=typeof WeakMap=="function"?WeakMap:Map,ft=0,_t=null,We=null,Je=0,yt=0,Hr=null,ds=!1,fd=!1,RT=!1,vo=0,Jt=0,Ls=0,Vl=0,ty=0,Xr=0,pf=0,Ip=null,Nr=null,RS=!1,rx=0,U3=0,ny=1/0,ry=null,Es=null,Xt=0,Ui=null,au=null,xa=0,MS=0,PS=null,H3=null,Mc=null,Pc=null,$c=null,kp=0,gv=null;function ei(){return ft&2&&Je!==0?Je&-Je:Pe.T!==null?PT():Kk()}function q3(){if(Xr===0)if(!(Je&536870912)||Ke){var e=Qm;Qm<<=1,!(Qm&3932160)&&(Qm=262144),Xr=e}else Xr=536870912;return e=Xn.current,e!==null&&(e.flags|=32),Xr}function hf(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=c5(po(e.memoizedProps,n))),Pc===null&&(Pc=[]),Pc.push(t.bind(null,r))}}function Dr(e,t,n){(e===_t&&(yt===2||yt===9)||e.cancelPendingCommit!==null)&&(mf(e,0),ps(e,Je,Xr,!1)),hm(e,n),(!(ft&2)||e!==_t)&&(e===_t&&(!(ft&2)&&(Vl|=n),Jt===4&&ps(e,Je,Xr,!1)),Na(e))}function V3(e,t,n){if(ft&6)throw Error(ne(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||pm(e,t),i=r?S9(e,t):yw(e,t,!0),a=r;do{if(i===0){fd&&!r&&ps(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!x9(n)){i=yw(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var s=e;i=Ip;var l=s.current.memoizedState.isDehydrated;if(l&&(mf(s,o).flags|=256),o=yw(s,o,!1),o!==2&&o!==6){if(RT&&!l){s.errorRecoveryDisabledLanes|=a,Vl|=a,i=4;break e}a=Nr,Nr=i,a!==null&&(Nr===null?Nr=a:Nr.push.apply(Nr,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){mf(e,0),ps(e,t,0,!0);break}e:{switch(r=e,a=i,a){case 0:case 1:throw Error(ne(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ps(r,t,Xr,!ds);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(ne(329))}if((t&62914560)===t&&(i=rx+300-Qr(),10<i)){if(ps(r,t,Xr,!ds),Hb(r,0,!0)!==0)break e;xa=t,r.timeoutHandle=DT(UN.bind(null,r,n,Nr,ry,RS,t,Xr,Vl,pf,ds,a,"Throttled",-0,0),i);break e}UN(r,n,Nr,ry,RS,t,Xr,Vl,pf,ds,a,null,-0,0)}}break}while(!0);Na(e)}function UN(e,t,n,r,i,a,o,s,l,u,f,d,p,h){e.timeoutHandle=-1;var y=t.subtreeFlags,m=(a&335544064)===a;if(d=null,(m||y&8192||(y&16785408)===16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pa},Kr=null,L3(t,a,d),m&&(y=d,m=e.containerInfo,m=(m.nodeType===9?m:m.ownerDocument).__reactViewTransition,m!=null&&(y.count++,y.waitingForViewTransition=!0,y=lh.bind(y),m.finished.then(y,y))),y=(a&62914560)===a?rx-Qr():(a&4194048)===a?U3-Qr():0,y=jK(d,y),y!==null)){xa=a,e.cancelPendingCommit=y(qN.bind(null,e,t,a,n,r,i,o,s,l,u,f,d,null,p,h)),ps(e,a,o,!u);return}qN(e,t,a,n,r,i,o,s,l,u,f,d)}function x9(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ri(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ps(e,t,n,r){t=Uk(e,t),t&=~ty,t&=~Vl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Jr(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&qk(e,n,t)}function ix(){return ft&6?!0:(xm(0),!1)}function MT(){if(We!==null){if(yt===0)var e=We.return;else e=We,Qa=Tu=null,mT(e),_c=null,th=0,e=We;for(;e!==null;)b3(e.alternate,e),e=e.return;We=null}}function mf(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,q9(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xa=0,MT(),_t=e,We=n=no(e.current,null),Je=t,yt=0,Hr=null,ds=!1,fd=pm(e,t),RT=!1,pf=Xr=ty=Vl=Ls=Jt=0,Nr=Ip=null,RS=!1,vo=Uk(e,t),Yb(),n}function G3(e,t){qe=null,Pe.H=Xv,t===ud||t===Qb?(t=mN(),yt=3):t===sT?(t=mN(),yt=4):yt=t===OT?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Hr=t,We===null&&(Jt=1,Wv(e,xi(t,e.current)))}function K3(){var e=Xn.current;return e===null?!0:(Je&4194048)===Je?ar===null:(Je&62914560)===Je||Je&536870912?e===ar:!1}function Y3(){var e=Pe.H;return Pe.H=Xv,e===null?Xv:e}function X3(){var e=Pe.A;return Pe.A=y9,e}function iy(){Jt=4,ds||(Je&4194048)!==Je&&Xn.current!==null||(fd=!0),!(Ls&134217727)&&!(Vl&134217727)||_t===null||ps(_t,Je,Xr,!1)}function yw(e,t,n){var r=ft;ft|=2;var i=Y3(),a=X3();(_t!==e||Je!==t)&&(ry=null,mf(e,t)),t=!1;var o=Jt;e:do try{if(yt!==0&&We!==null){var s=We,l=Hr;switch(yt){case 8:MT(),o=6;break e;case 3:case 2:case 9:case 6:Xn.current===null&&(t=!0);var u=yt;if(yt=0,Hr=null,vc(e,s,l,u),n&&fd){o=0;break e}break;default:u=yt,yt=0,Hr=null,vc(e,s,l,u)}}w9(),o=Jt;break}catch(f){G3(e,f)}while(!0);return t&&e.shellSuspendCounter++,Qa=Tu=null,ft=r,Pe.H=i,Pe.A=a,We===null&&(_t=null,Je=0,Yb()),o}function w9(){for(;We!==null;)W3(We)}function S9(e,t){var n=ft;ft|=2;var r=Y3(),i=X3();_t!==e||Je!==t?(ry=null,ny=Qr()+500,mf(e,t)):fd=pm(e,t);e:do try{if(yt!==0&&We!==null){t=We;var a=Hr;t:switch(yt){case 1:yt=0,Hr=null,vc(e,t,a,1);break;case 2:case 9:if(hN(a)){yt=0,Hr=null,HN(t);break}t=function(){yt!==2&&yt!==9||_t!==e||(yt=7),Na(e)},a.then(t,t);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:hN(a)?(yt=0,Hr=null,HN(t)):(yt=0,Hr=null,vc(e,t,a,7));break;case 5:var o=null;switch(We.tag){case 26:o=We.memoizedState;case 5:case 27:var s=We;if(o?x5(o):s.stateNode.complete){yt=0,Hr=null;var l=s.sibling;if(l!==null)We=l;else{var u=s.return;u!==null?(We=u,ax(u)):We=null}break t}}yt=0,Hr=null,vc(e,t,a,5);break;case 6:yt=0,Hr=null,vc(e,t,a,6);break;case 8:MT(),Jt=6;break e;default:throw Error(ne(462))}}O9();break}catch(f){G3(e,f)}while(!0);return Qa=Tu=null,Pe.H=r,Pe.A=i,ft=n,We!==null?0:(_t=null,Je=0,Yb(),Jt)}function O9(){for(;We!==null&&!zV();)W3(We)}function W3(e){var t=y3(e.alternate,e,vo);e.memoizedProps=e.pendingProps,t===null?ax(e):We=t}function HN(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=RN(n,t,t.pendingProps,t.type,void 0,Je);break;case 11:t=RN(n,t,t.pendingProps,t.type.render,t.ref,Je);break;case 5:mT(t);var r=t;r===Mn&&(Ke?(Uv(r),r.tag===5&&r.stateNode!=null&&(Dt=r.stateNode)):(Uv(r),Ke=!0));default:b3(n,t),t=We=xL(t,vo),t=y3(n,t,vo)}e.memoizedProps=e.pendingProps,t===null?ax(e):We=t}function vc(e,t,n,r){Qa=Tu=null,mT(t),_c=null,th=0;var i=t.return;try{if(c9(e,i,t,n,Je)){Jt=1,Wv(e,xi(n,e.current)),We=null;return}}catch(a){if(i!==null)throw We=i,a;Jt=1,Wv(e,xi(n,e.current)),We=null;return}t.flags&32768?(Ke||r===1?e=!0:fd||Je&536870912?e=!1:(ds=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Q3(t,e)):ax(t)}function ax(e){var t=e;do{if(t.flags&32768){Q3(t,ds);return}e=t.return;var n=h9(t.alternate,t,vo);if(n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Jt===0&&(Jt=5)}function Q3(e,t){do{var n=m9(e.alternate,e);if(n!==null){n.flags&=32767,We=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=n}while(e!==null);Jt=6,We=null}function qN(e,t,n,r,i,a,o,s,l,u,f,d){e.cancelPendingCommit=null;do ox();while(Xt!==0);if(ft&6)throw Error(ne(327));if(t!==null){if(t===e.current)throw Error(ne(177));e===_t&&(We=_t=null,Je=0),au=t,Ui=e,xa=n,PS=i,H3=r,j9(e,t,n,o,s,l,d)}}function j9(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(MS=s,s|=tT,WV(e,n,s,r,i,a),Pc=null,(n&335544064)===n?($c=ZG(e),r=10262):($c=null,r=10256),t.subtreeFlags&r||t.flags&r?(e.callbackNode=null,e.callbackPriority=0,N9(kv,function(){return kS(),null})):(e.callbackNode=null,e.callbackPriority=0),Jv=!1,r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=Pe.T,Pe.T=null,i=pt.p,pt.p=2,a=ft,ft|=4;try{g9(e,t,n)}finally{ft=a,pt.p=i,Pe.T=r}}Xt=1,Jv?Mc=W9(o,e.containerInfo,$c,$S,DS,T9,IS,kS,E9):($S(),DS(),IS())}function E9(e){if(Xt!==0){var t=Ui.onRecoverableError;t(e,{componentStack:null})}}function T9(){Xt===3&&(Xt=0,I3(au,Ui),Xt=4)}function $S(){if(Xt===1){Xt=0;var e=Ui,t=au,n=xa,r=(t.flags&13878)!==0;if(t.subtreeFlags&13878||r){r=Pe.T,Pe.T=null;var i=pt.p;pt.p=2;var a=ft;ft|=4;try{mp=ey=!1,$3(t,e,n),n=FS;var o=dL(e.containerInfo),s=n.focusedElem,l=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&fL(s.ownerDocument.documentElement,s)){if(l!==null&&eT(s)){var u=l.start,f=l.end;if(f===void 0&&(f=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(f,s.value.length);else{var d=s.ownerDocument||document,p=d&&d.defaultView||window;if(p.getSelection){var h=p.getSelection(),y=s.textContent.length,m=Math.min(l.start,y),g=l.end===void 0?m:Math.min(l.end,y);!h.extend&&m>g&&(o=g,g=m,m=o);var b=oN(s,m),v=oN(s,g);if(b&&v&&(h.rangeCount!==1||h.anchorNode!==b.node||h.anchorOffset!==b.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var w=d.createRange();w.setStart(b.node,b.offset),h.removeAllRanges(),m>g?(h.addRange(w),h.extend(v.node,v.offset)):(w.setEnd(v.node,v.offset),h.addRange(w))}}}}for(d=[],h=s;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<d.length;s++){var S=d[s];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}xf=!!zS,FS=zS=null}finally{ft=a,pt.p=i,Pe.T=r}}e.current=t,Xt=2}}function DS(){if(Xt===2){Xt=0;var e=Ui,t=au,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=Pe.T,Pe.T=null;var r=pt.p;pt.p=2;var i=ft;ft|=4;try{C3(e,t.alternate,t)}finally{ft=i,pt.p=r,Pe.T=n}}Xt=3}}function IS(){if(Xt===4||Xt===3){Xt=0;var e=Mc;Mc=null,FV();var t=Ui,n=au,r=xa,i=H3,a=(r&335544064)===r?10262:10256;if(n.subtreeFlags&a||n.flags&a?Xt=5:(Xt=0,au=Ui=null,Z3(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Es=null),YE(r),n=n.stateNode,Zr&&typeof Zr.onCommitFiberRoot=="function")try{Zr.onCommitFiberRoot(dm,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=Pe.T,a=pt.p,pt.p=2,Pe.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var l=i[s];o(l.value,{componentStack:l.stack})}}finally{Pe.T=n,pt.p=a}}if(i=Pc,o=$c,$c=null,i!==null&&(Pc=null,o===null&&(o=[]),e!==null))for(l=0;l<i.length;l++)n=(0,i[l])(o),n!==void 0&&e.finished.finally(n);xa&3&&ox(),Na(t),a=t.pendingLanes,r&261930&&a&42?t===gv?kp++:(kp=0,gv=t):(kp=0,gv=null),xm(0)}}function Z3(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vm(t)))}function ox(){return Mc!==null&&(Mc.skipTransition(),Mc=null),$S(),DS(),IS(),kS()}function kS(){if(Xt!==5)return!1;var e=Ui,t=MS;MS=0;var n=YE(xa),r=Pe.T,i=pt.p;try{pt.p=32>n?32:n,Pe.T=null,n=PS,PS=null;var a=Ui,o=xa;if(Xt=0,au=Ui=null,xa=0,ft&6)throw Error(ne(331));var s=ft;if(ft|=4,z3(a.current),k3(a,a.current,o,n),ft=s,xm(0,!1),Zr&&typeof Zr.onPostCommitFiberRoot=="function")try{Zr.onPostCommitFiberRoot(dm,a)}catch{}return!0}finally{pt.p=i,Pe.T=r,Z3(e,t)}}function VN(e,t,n){t=xi(n,t),t=gS(e.stateNode,t,2),e=Ss(e,t,2),e!==null&&(hm(e,2),Na(e))}function xt(e,t,n){if(e.tag===3)VN(e,e,n);else for(;t!==null;){if(t.tag===3){VN(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Es===null||!Es.has(r))){e=xi(n,e),n=p3(2),r=Ss(t,n,2),r!==null&&(h3(n,r,t,e),hm(r,2),Na(r));break}}t=t.return}}function bw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new b9;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(RT=!0,i.add(n),e=A9.bind(null,e,t,n),t.then(e,e))}function A9(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,_t===e&&(Je&n)===n&&(Jt===4||Jt===3&&(Je&62914560)===Je&&300>Qr()-rx?ft&2?ty|=n:mf(e,0):ty|=n,pf===Je&&(pf=0)),Na(e)}function J3(e,t){t===0&&(t=Hk()),e=Eu(e,t),e!==null&&(hm(e,t),Na(e))}function C9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),J3(e,n)}function _9(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(ne(314))}r!==null&&r.delete(t),J3(e,n)}function N9(e,t){return GE(e,t)}var gf=null,nc=null,LS=!1,ay=!1,xw=!1,hs=0;function Na(e){e!==nc&&e.next===null&&(nc===null?gf=nc=e:nc=nc.next=e),ay=!0,LS||(LS=!0,M9())}function xm(e,t){if(!xw&&ay){xw=!0;do for(var n=!1,r=gf;r!==null;){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Jr(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,GN(r,a))}else a=Je,a=Hb(r,r===_t?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pm(r,a)||(n=!0,GN(r,a));r=r.next}while(n);xw=!1}}function R9(){e5()}function e5(){ay=LS=!1;var e=0;hs!==0&&H9()&&(e=hs);for(var t=Qr(),n=null,r=gf;r!==null;){var i=r.next,a=t5(r,t);a===0?(r.next=null,n===null?gf=i:n.next=i,i===null&&(nc=n)):(n=r,(e!==0||a&3)&&(ay=!0)),r=i}Xt!==0&&Xt!==5||xm(e),hs!==0&&(hs=0)}function t5(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Jr(a),s=1<<o,l=i[o];l===-1?(!(s&n)||s&r)&&(i[o]=XV(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}if(t=_t,n=Je,n=Hb(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(yt===2||yt===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Q0(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||pm(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Q0(r),YE(n)){case 2:case 8:n=zk;break;case 32:n=kv;break;case 268435456:n=Fk;break;default:n=kv}return r=n5.bind(null,e),n=GE(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Q0(r),e.callbackPriority=2,e.callbackNode=null,2}function n5(e,t){if(Xt!==0&&Xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ox()&&e.callbackNode!==n)return null;var r=Je;return r=Hb(e,e===_t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(V3(e,r,t),t5(e,Qr()),e.callbackNode!=null&&e.callbackNode===n?n5.bind(null,e):null)}function GN(e,t){if(ox())return null;V3(e,t,!0)}function M9(){V9(function(){ft&6?GE(Bk,R9):e5()})}function PT(){if(hs===0){var e=tu;e===0&&(e=Wm,Wm<<=1,!(Wm&261888)&&(Wm=256)),hs=e}return hs}function KN(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:iv(e)}function P9(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var a=KN((i[Lr]||null).action),o=r.submitter;o&&(t=(t=o[Lr]||null)?KN(t.formAction):o.getAttribute("formAction"),t!==null&&(a=t,o=null));var s=new Vb("action","action",null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(hs!==0){var l=new FormData(i,o);hS(n,{pending:!0,data:l,method:i.method,action:a},null,l)}}else typeof a=="function"&&(s.preventDefault(),l=new FormData(i,o),hS(n,{pending:!0,data:l,method:i.method,action:a},a,l))},currentTarget:i}]})}}for(var ww=0;ww<rS.length;ww++){var Sw=rS[ww],$9=Sw.toLowerCase(),D9=Sw[0].toUpperCase()+Sw.slice(1);Xi($9,"on"+D9)}Xi(hL,"onAnimationEnd");Xi(mL,"onAnimationIteration");Xi(gL,"onAnimationStart");Xi("dblclick","onDoubleClick");Xi("focusin","onFocus");Xi("focusout","onBlur");Xi(qG,"onTransitionRun");Xi(VG,"onTransitionStart");Xi(GG,"onTransitionCancel");Xi(vL,"onTransitionEnd");cf("onMouseEnter",["mouseout","mouseover"]);cf("onMouseLeave",["mouseout","mouseover"]);cf("onPointerEnter",["pointerout","pointerover"]);cf("onPointerLeave",["pointerout","pointerover"]);Ou("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ou("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ou("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ou("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ou("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ou("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ih="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(" "),I9=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ih));function r5(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;a=s,i.currentTarget=u;try{a(i)}catch(f){Bv(f)}i.currentTarget=null,a=l}else for(o=0;o<r.length;o++){if(s=r[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;a=s,i.currentTarget=u;try{a(i)}catch(f){Bv(f)}i.currentTarget=null,a=l}}}}function Xe(e,t){var n=t[U_];n===void 0&&(n=t[U_]=new Set);var r=e+"__bubble";n.has(r)||(i5(t,e,2,!1),n.add(r))}function Ow(e,t,n){var r=0;t&&(r|=4),i5(n,e,r,t)}var ug="_reactListening"+Math.random().toString(36).slice(2);function $T(e){if(!e[ug]){e[ug]=!0,Xk.forEach(function(n){n!=="selectionchange"&&(I9.has(n)||Ow(n,!1,e),Ow(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ug]||(t[ug]=!0,Ow("selectionchange",!1,t))}}function i5(e,t,n,r){switch(A5(t)){case 2:var i=CK;break;case 8:i=_K;break;default:i=FT}n=i.bind(null,t,n,e),i=void 0,!J1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function jw(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=Sl(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue e}s=s.parentNode}}r=r.return}rL(function(){var u=a,f=WE(n),d=[];e:{var p=yL.get(e);if(p!==void 0){var h=Vb,y=e;switch(e){case"keypress":if(ov(n)===0)break e;case"keydown":case"keyup":h=xG;break;case"focusin":y="focus",h=rw;break;case"focusout":y="blur",h=rw;break;case"beforeblur":case"afterblur":h=rw;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=W_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=lG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=EG;break;case hL:case mL:case gL:h=fG;break;case vL:h=AG;break;case"scroll":case"scrollend":h=oG;break;case"wheel":h=_G;break;case"copy":case"cut":case"paste":h=pG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Z_;break;case"submit":h=OG;break;case"toggle":case"beforetoggle":h=RG}var m=(t&4)!==0,g=!m&&(e==="scroll"||e==="scrollend"),b=m?p!==null?p+"Capture":null:p;m=[];for(var v=u,w;v!==null;){var S=v;if(w=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||w===null||b===null||(S=Wp(v,b),S!=null&&m.push(ah(v,S,w))),g)break;v=v.return}0<m.length&&(p=new h(p,y,null,n,f),d.push({event:p,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Z1&&(y=n.relatedTarget||n.fromElement)&&(Sl(y)||y[sd]))break e;(p||h)&&(y=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?Sl(h):null,h!==null&&(g=fm(h),m=h.tag,h!==g||m!==5&&m!==27&&m!==6)&&(h=null)):(p=null,h=u),p!==h&&(m=W_,S="onMouseLeave",b="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=Z_,S="onPointerLeave",b="onPointerEnter",v="pointer"),g=p==null?y:pp(p),w=h==null?y:pp(h),y=new m(S,v+"leave",p,n,f),y.target=g,y.relatedTarget=w,S=null,Sl(f)===u&&(m=new m(b,v+"enter",h,n,f),m.target=w,m.relatedTarget=g,S=m),g=S,m=p&&h?z1(p,h,k9):null,p!==null&&YN(d,y,p,m,!1),h!==null&&g!==null&&YN(d,g,h,m,!0)))}e:{if(p=u?pp(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var O=nN;else if(tN(p))if(uL)O=FG;else{O=BG;var j=LG}else h=p.nodeName,!h||h.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?u&&XE(u.elementType)&&(O=nN):O=zG;if(O&&(O=O(e,u))){lL(d,O,n,f);break e}j&&j(e,p,u)}switch(j=u?pp(u):window,e){case"focusin":(tN(j)||j.contentEditable==="true")&&(fc=j,tS=u,Ap=null);break;case"focusout":Ap=tS=fc=null;break;case"mousedown":nS=!0;break;case"contextmenu":case"mouseup":case"dragend":nS=!1,sN(d,n,f);break;case"selectionchange":if(HG)break;case"keydown":case"keyup":sN(d,n,f)}var E;if(JE)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else cc?oL(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(aL&&n.locale!=="ko"&&(cc||T!=="onCompositionStart"?T==="onCompositionEnd"&&cc&&(E=iL()):(cs=f,QE="value"in cs?cs.value:cs.textContent,cc=!0)),j=oy(u,T),0<j.length&&(T=new Q_(T,e,null,n,f),d.push({event:T,listeners:j}),E?T.data=E:(E=sL(n),E!==null&&(T.data=E)))),(E=PG?$G(e,n):DG(e,n))&&(T=oy(u,"onBeforeInput"),0<T.length&&(j=new Q_("onBeforeInput","beforeinput",null,n,f),d.push({event:j,listeners:T}),j.data=E)),P9(d,e,u,n,f)}r5(d,t)})}function ah(e,t,n){return{instance:e,listener:t,currentTarget:n}}function oy(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Wp(e,n),i!=null&&r.unshift(ah(e,i,a)),i=Wp(e,t),i!=null&&r.push(ah(e,i,a))),e.tag===3)return r;e=e.return}return[]}function k9(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function YN(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(s=s.tag,l!==null&&l===r)break;s!==5&&s!==26&&s!==27||u===null||(l=u,i?(u=Wp(n,a),u!=null&&o.unshift(ah(n,u,l))):i||(u=Wp(n,a),u!=null&&o.push(ah(n,u,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var L9=/\r\n?/g,B9=/\u0000|\uFFFD/g;function XN(e){return(typeof e=="string"?e:""+e).replace(L9,`
|
|
49
|
+
`).replace(B9,"")}function a5(e,t){return t=XN(t),XN(e)===t}function bt(e,t,n,r,i,a){switch(n){case"children":if(typeof r=="string")t==="body"||t==="textarea"&&r===""||ff(e,r);else if(typeof r=="number"||typeof r=="bigint")t!=="body"&&ff(e,""+r);else return;break;case"className":Jm(e,"class",r);break;case"tabIndex":Jm(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Jm(e,n,r);break;case"style":nL(e,r,a);return;case"data":if(t!=="object"){Jm(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=iv(r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"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 a=="function"&&(n==="formAction"?(t!=="input"&&bt(e,t,"name",i.name,i,null),bt(e,t,"formEncType",i.formEncType,i,null),bt(e,t,"formMethod",i.formMethod,i,null),bt(e,t,"formTarget",i.formTarget,i,null)):(bt(e,t,"encType",i.encType,i,null),bt(e,t,"method",i.method,i,null),bt(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=iv(r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=pa);return;case"onScroll":r!=null&&Xe("scroll",e);return;case"onScrollEnd":r!=null&&Xe("scrollend",e);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(ne(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(ne(60));(a!=null?a.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=iv(r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Xe("beforetoggle",e),Xe("toggle",e),rv(e,"popover",r);break;case"xlinkActuate":ka(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ka(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ka(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ka(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ka(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ka(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ka(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ka(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ka(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":rv(e,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=iG.get(n)||n,rv(e,n,r);else return}lt=!0}function BS(e,t,n,r,i,a){switch(n){case"style":nL(e,r,a);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(ne(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(ne(60));(a!=null?a.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof r=="string")ff(e,r);else if(typeof r=="number"||typeof r=="bigint")ff(e,""+r);else return;break;case"onScroll":r!=null&&Xe("scroll",e);return;case"onScrollEnd":r!=null&&Xe("scrollend",e);return;case"onClick":r!=null&&(e.onclick=pa);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Wk.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),a=n.slice(2,i?n.length-7:void 0),t=e[Lr]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(a,t,i),typeof r=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(a,r,i);break e}lt=!0,n in e?e[n]=r:r===!0?e.setAttribute(n,""):rv(e,n,r)}return}lt=!0}function Kn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",e),Xe("load",e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(ne(137,t));default:bt(e,t,a,o,n,null)}}i&&bt(e,t,"srcSet",n.srcSet,n,null),r&&bt(e,t,"src",n.src,n,null);return;case"input":Xe("invalid",e);var s=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":i=f;break;case"type":o=f;break;case"checked":l=f;break;case"defaultChecked":u=f;break;case"value":a=f;break;case"defaultValue":s=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(ne(137,t));break;default:bt(e,t,r,f,n,null)}}Jk(e,a,s,l,u,o,i,!1);return;case"select":Xe("invalid",e),r=o=a=null;for(i in n)if(n.hasOwnProperty(i)&&(s=n[i],s!=null))switch(i){case"value":a=s;break;case"defaultValue":o=s;break;case"multiple":r=s;default:bt(e,t,i,s,n,null)}t=a,n=o,e.multiple=!!r,t!=null?Tc(e,!!r,t,!1):n!=null&&Tc(e,!!r,n,!0);return;case"textarea":Xe("invalid",e),a=i=r=null;for(o in n)if(n.hasOwnProperty(o)&&(s=n[o],s!=null))switch(o){case"value":r=s;break;case"defaultValue":i=s;break;case"children":a=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(ne(91));break;default:bt(e,t,o,s,n,null)}tL(e,r,i,a);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:bt(e,t,l,r,n,null)}return;case"dialog":Xe("beforetoggle",e),Xe("toggle",e),Xe("cancel",e),Xe("close",e);break;case"iframe":case"object":Xe("load",e);break;case"video":case"audio":for(r=0;r<ih.length;r++)Xe(ih[r],e);break;case"image":Xe("error",e),Xe("load",e);break;case"details":Xe("toggle",e);break;case"embed":case"source":case"link":Xe("error",e),Xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(ne(137,t));default:bt(e,t,u,r,n,null)}return;default:if(XE(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&BS(e,t,f,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&bt(e,t,s,r,n,null))}var z9={};function F9(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,o=null,s=null,l=null,u=null,f=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(h)||bt(e,t,h,null,r,d)}}for(var p in r){var h=r[p];if(d=n[p],r.hasOwnProperty(p)&&(h!=null||d!=null))switch(p){case"type":h!==d&&(lt=!0),a=h;break;case"name":h!==d&&(lt=!0),i=h;break;case"checked":h!==d&&(lt=!0),u=h;break;case"defaultChecked":h!==d&&(lt=!0),f=h;break;case"value":h!==d&&(lt=!0),o=h;break;case"defaultValue":h!==d&&(lt=!0),s=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(ne(137,t));break;default:h!==d&&bt(e,t,p,h,r,d)}}Q1(e,o,s,l,u,f,a,i);return;case"select":h=o=s=p=null;for(a in n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(a)||bt(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case"value":a!==l&&(lt=!0),p=a;break;case"defaultValue":a!==l&&(lt=!0),s=a;break;case"multiple":a!==l&&(lt=!0),o=a;default:a!==l&&bt(e,t,i,a,r,l)}t=s,n=o,r=h,p!=null?Tc(e,!!n,p,!1):!!r!=!!n&&(t!=null?Tc(e,!!n,t,!0):Tc(e,!!n,n?[]:"",!1));return;case"textarea":h=p=null;for(s in n)if(i=n[s],n.hasOwnProperty(s)&&i!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:bt(e,t,s,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case"value":i!==a&&(lt=!0),p=i;break;case"defaultValue":i!==a&&(lt=!0),h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(ne(91));break;default:i!==a&&bt(e,t,o,i,r,a)}eL(e,p,h);return;case"option":for(var y in n)if(p=n[y],n.hasOwnProperty(y)&&p!=null&&!r.hasOwnProperty(y))switch(y){case"selected":e.selected=!1;break;default:bt(e,t,y,null,r,p)}for(l in r)if(p=r[l],h=n[l],r.hasOwnProperty(l)&&p!==h&&(p!=null||h!=null))switch(l){case"selected":p!==h&&(lt=!0),e.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:bt(e,t,l,p,r,h)}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 m in n)p=n[m],n.hasOwnProperty(m)&&p!=null&&!r.hasOwnProperty(m)&&bt(e,t,m,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(p!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(ne(137,t));break;default:bt(e,t,u,p,r,h)}return;default:if(XE(t)){for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!==void 0&&!r.hasOwnProperty(g)&&BS(e,t,g,void 0,r,p);for(f in r)p=r[f],h=n[f],!r.hasOwnProperty(f)||p===h||p===void 0&&h===void 0||BS(e,t,f,p,r,h);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&p!=null&&!r.hasOwnProperty(b)&&bt(e,t,b,null,r,p);for(d in r)p=r[d],h=n[d],!r.hasOwnProperty(d)||p===h||p==null&&h==null||bt(e,t,d,p,r,h)}function WN(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function U9(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&WN(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],u=l.startTime;if(u>s)break;var f=l.transferSize,d=l.initiatorType;f&&WN(d)&&(l=l.responseEnd,o+=f*(l<s?1:(s-u)/(l-u)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var zS=null,FS=null;function oh(e){return e.nodeType===9?e:e.ownerDocument}function QN(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function o5(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function s5(e,t,n,r){return n=oh(n).createElement(e),n[Hn]=r,n[Lr]=t,Kn(n,e,t),Nn(n),n}function US(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ew=null;function H9(){var e=window.event;return e&&e.type==="popstate"?e===Ew?!1:(Ew=e,!0):(Ew=null,!1)}var DT=typeof setTimeout=="function"?setTimeout:void 0,q9=typeof clearTimeout=="function"?clearTimeout:void 0,ZN=typeof Promise=="function"?Promise:void 0,JN=typeof requestAnimationFrame=="function"?requestAnimationFrame:DT,V9=typeof queueMicrotask=="function"?queueMicrotask:typeof ZN<"u"?function(e){return ZN.resolve(null).then(e).catch(G9)}:DT;function G9(e){setTimeout(function(){throw e})}function Vs(e){return e==="head"}function eR(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(i),wf(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Aw(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Aw(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mm]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=o}}else n==="body"&&Aw(e.ownerDocument.body);n=i}while(n);wf(t)}function tR(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function l5(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function u5(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function K9(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function HS(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return K9(t,n,e)}function Y9(e){return e.documentElement.clientHeight}function X9(e){this.addEventListener("load",e),this.addEventListener("error",e)}function W9(e,t,n,r,i,a,o,s,l){var u=t.nodeType===9?t:t.ownerDocument;try{var f=u.startViewTransition({update:function(){var p=u.defaultView,h=p.navigation&&p.navigation.transition,y=u.fonts.status;r();var m=[];if(y==="loaded"&&(Y9(u),u.fonts.status==="loading"&&m.push(u.fonts.ready)),y=m.length,e!==null)for(var g=e.suspenseyImages,b=0,v=0;v<g.length;v++){var w=g[v];if(!w.complete){var S=w.getBoundingClientRect();if(0<S.bottom&&0<S.right&&S.top<p.innerHeight&&S.left<p.innerWidth){if(b+=w5(w),b>bv){m.length=y;break}w=new Promise(X9.bind(w)),m.push(w)}}}if(0<m.length)return p=Promise.race([Promise.all(m),new Promise(function(O){return setTimeout(O,500)})]).then(i,i),(h?Promise.allSettled([h.finished,p]):p).then(a,a);if(i(),h)return h.finished.then(a,a);a()},types:n});u.__reactViewTransition=f;var d=[];return f.ready.then(function(){for(var p=u.documentElement.getAnimations({subtree:!0}),h=0;h<p.length;h++){var y=p[h],m=y.effect,g=m.pseudoElement;if(g!=null&&g.startsWith("::view-transition")){d.push(y),y=m.getKeyframes();for(var b=g=void 0,v=!0,w=0;w<y.length;w++){var S=y[w],O=S.width;if(g===void 0)g=O;else if(g!==O){v=!1;break}if(O=S.height,b===void 0)b=O;else if(b!==O){v=!1;break}delete S.width,delete S.height,S.transform==="none"&&delete S.transform}v&&g!==void 0&&b!==void 0&&(m.setKeyframes(y),v=getComputedStyle(m.target,m.pseudoElement),v.width!==g||v.height!==b)&&(v=y[0],v.width=g,v.height=b,v=y[y.length-1],v.width=g,v.height=b,m.setKeyframes(y))}}o()},function(p){u.__reactViewTransition===f&&(u.__reactViewTransition=null);try{if(typeof p=="object"&&p!==null)switch(p.name){case"InvalidStateError":(p.message==="View transition was skipped because document visibility state is hidden."||p.message==="Skipping view transition because document visibility state has become hidden."||p.message==="Skipping view transition because viewport size changed."||p.message==="Transition was aborted because of invalid state")&&(p=null)}p!==null&&l(p)}finally{r(),i(),o()}}),f.finished.finally(function(){for(var p=0;p<d.length;p++)d[p].cancel();u.__reactViewTransition===f&&(u.__reactViewTransition=null),s()}),f}catch{return r(),i(),o(),null}}function Ol(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Ol.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Rt({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Ol.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r};Ol.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function c5(e){return{name:e,group:new Ol("group",e),imagePair:new Ol("image-pair",e),old:new Ol("old",e),new:new Ol("new",e)}}function ai(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}ai.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!="boolean"&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(f5(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(s=function(l){o.removeEventListener(e,t,n),typeof t=="function"?t.call(this,l):t.handleEvent(l)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener("abort",i,{once:!0}),i=r.removeEventListener.bind(r,"abort",i)),r=vf(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),kr(this._fragmentFiber.child,!1,Q9,e,s,r)}this._eventListeners=a}};function Q9(e,t,n,r){return wn(e).addEventListener(t,n,r),!1}ai.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=f5(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=vf(i.optionsOrUseCapture),kr(this._fragmentFiber.child,!1,Z9,e,n,i),r.splice(t,1),a!==null&&a()}};function Z9(e,t,n,r){return wn(e).removeEventListener(t,n,r),!1}function vf(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function nR(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function f5(e,t,n,r){if(e.length===0)return-1;r=nR(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&nR(a.optionsOrUseCapture)===r)return i}return-1}ai.prototype.dispatchEvent=function(e){var t=Su(this._fragmentFiber);if(t===null)return!0;t=wn(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,vf(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,vf(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)};ai.prototype.focus=function(e){kr(this._fragmentFiber.child,!0,d5,e,void 0,void 0)};function d5(e,t){return e.tag===6?!1:(e=wn(e),cK(e,t))}ai.prototype.focusLast=function(e){var t=[];kr(this._fragmentFiber.child,!0,IT,t,void 0,void 0);for(var n=t.length-1;0<=n&&!d5(t[n],e);n--);};function IT(e,t){return t.push(e),!1}ai.prototype.blur=function(){var e=Su(this._fragmentFiber);e!==null&&(e=wn(e),e=oh(e).activeElement,e!==null&&kr(this._fragmentFiber.child,!1,J9,e,void 0,void 0))};function J9(e,t){return e.tag===6?!1:(e=wn(e),e===t||e.contains(t)?(t.blur(),!0):!1)}ai.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),kr(this._fragmentFiber.child,!1,eK,e,void 0,void 0)};function eK(e,t){return e.tag===6||(e=wn(e),t.observe(e)),!1}ai.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),kr(this._fragmentFiber.child,!1,tK,e,void 0,void 0);for(var n=t=0;n<Fi.length;n++){var r=Fi[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Fi[t++]=r}Fi.length=t}};function tK(e,t){return e.tag===6||(e=wn(e),t.unobserve(e)),!1}var Fi=[],Tw=!1;function nK(e,t,n){Fi.push({fragmentInstance:e,observer:t,instance:n}),Tw||(Tw=!0,fK(function(){Tw=!1;var r=Fi;Fi=[];for(var i=0;i<r.length;i++){var a=r[i];a.observer.unobserve(a.instance)}}))}ai.prototype.getClientRects=function(){var e=[];return kr(this._fragmentFiber.child,!1,rK,e,void 0,void 0),e};function rK(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=wn(e),t.push.apply(t,e.getClientRects());return!1}ai.prototype.getRootNode=function(e){var t=Su(this._fragmentFiber);return t===null?this:wn(t).getRootNode(e)};ai.prototype.compareDocumentPosition=function(e){var t=Su(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];kr(this._fragmentFiber.child,!1,IT,n,void 0,void 0);var r=wn(t);if(n.length===0){if(n=r,I_(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=Dk(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=wn(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=wn(n[0]),i=wn(n[n.length-1]);var a=I_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),l=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||l||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||iK(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function iK(e,t,n,r,i){var a=Sl(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)e:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break e}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;e:{for(a=t,t=Su(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break e}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=z1(n,a,k_),t===null?t=!1:(kr(t,!0,MV,a,n),a=oc,oc=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=z1(r,a,k_),t===null?t=!1:(kr(t,!0,PV,a,r),a=oc,B1=oc=null,t=a!==null)),t):!1}function rR(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}ai.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(ne(566));var t=[];kr(this._fragmentFiber.child,!1,IT,t,void 0,void 0);var n=e!==!1;if(t.length===0){var r=Dk(this._fragmentFiber);if(r=n?r[1]||r[0]||Su(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=wn(r),rR(e,n);return}if(r=wn(r),r.nodeType!==9){if(r.nodeType===11){n="host"in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var i=t[r];i.tag===6?(i=wn(i),rR(i,n)):wn(i).scrollIntoView(e),r+=n?-1:1}};function aK(e,t){return e=wn(e),p5(e,t),!1}function p5(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function h5(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,vf(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){for(var o=0,s=0;s<Fi.length;s++){var l=Fi[s];(l.fragmentInstance!==t||l.observer!==a||l.instance!==e)&&(Fi[o++]=l)}Fi.length=o,a.observe(e)}),p5(e,t))}function oK(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,vf(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){typeof a.rootMargin=="string"?nK(t,a,e):a.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function qS(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":qS(n),qb(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function sK(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[mm])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Ei(e.nextSibling),e===null)break}return null}function lK(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ei(e.nextSibling),e===null))return null;return e}function m5(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ei(e.nextSibling),e===null))return null;return e}function VS(e){return e.data==="$?"||e.data==="$~"}function kT(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function uK(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Ei(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var GS=null;function iR(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ei(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function aR(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function cK(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return r}function fK(e){JN(function(){JN(function(t){return e(t)})})}function g5(e,t,n){switch(t=oh(n),e){case"html":if(e=t.documentElement,!e)throw Error(ne(452));return e;case"head":if(e=t.head,!e)throw Error(ne(453));return e;case"body":if(e=t.body,!e)throw Error(ne(454));return e;default:throw Error(ne(451))}}function v5(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&bt(e,t,r,null,z9,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===pa&&(e.onclick=null),qb(e)}function Aw(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qb(e)}var Ti=new Map,oR=new Set;function sh(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Co=pt.d;pt.d={f:dK,r:pK,D:hK,C:mK,L:gK,m:vK,X:bK,S:yK,M:xK};function dK(){var e=Co.f(),t=ix();return e||t}function pK(e){var t=ld(e);t!==null&&t.tag===5&&t.type==="form"?n3(t):Co.r(e)}var dd=typeof document>"u"?null:document;function y5(e,t,n){var r=dd;if(r&&typeof t=="string"&&t){var i=bi(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),oR.has(i)||(oR.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),Kn(t,"link",e),Nn(t),r.head.appendChild(t)))}}function hK(e){Co.D(e),y5("dns-prefetch",e,null)}function mK(e,t){Co.C(e,t),y5("preconnect",e,t)}function gK(e,t,n){Co.L(e,t,n);var r=dd;if(r&&e&&t){var i='link[rel="preload"][as="'+bi(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+bi(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+bi(n.imageSizes)+'"]')):i+='[href="'+bi(e)+'"]';var a=i;switch(t){case"style":a=yf(e);break;case"script":a=pd(e)}if(!(Ti.has(a)||(e=Rt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ti.set(a,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(wm(a))||t==="script"&&r.querySelector(Sm(a))))){var o=r.createElement("link");Kn(o,"link",e),t==="style"&&(o[Lv]=!0,o.onload=o.onerror=function(){Yk(o)}),Nn(o),r.head.appendChild(o)}}}function vK(e,t){Co.m(e,t);var n=dd;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+bi(r)+'"][href="'+bi(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=pd(e)}if(!Ti.has(a)&&(e=Rt({rel:"modulepreload",href:e},t),Ti.set(a,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Sm(a)))return}r=n.createElement("link"),Kn(r,"link",e),Nn(r),n.head.appendChild(r)}}}function yK(e,t,n){Co.S(e,t,n);var r=dd;if(r&&e){var i=Ec(r).hoistableStyles,a=yf(e);t=t||"default";var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(wm(a)))s.loading=5;else{e=Rt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ti.get(a))&<(e,n);var l=o=r.createElement("link");Nn(l),Kn(l,"link",e),l._p=new Promise(function(u,f){l.onload=u,l.onerror=f}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,vv(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:s},i.set(a,o)}}}function bK(e,t){Co.X(e,t);var n=dd;if(n&&e){var r=Ec(n).hoistableScripts,i=pd(e),a=r.get(i);a||(a=n.querySelector(Sm(i)),a||(e=Rt({src:e,async:!0},t),(t=Ti.get(i))&&BT(e,t),a=n.createElement("script"),Nn(a),Kn(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function xK(e,t){Co.M(e,t);var n=dd;if(n&&e){var r=Ec(n).hoistableScripts,i=pd(e),a=r.get(i);a||(a=n.querySelector(Sm(i)),a||(e=Rt({src:e,async:!0,type:"module"},t),(t=Ti.get(i))&&BT(e,t),a=n.createElement("script"),Nn(a),Kn(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function sR(e,t,n,r){var i=(i=bs.current)?sh(i):null;if(!i)throw Error(ne(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=yf(n.href),t=Ec(i).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=yf(n.href);var a=Ec(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(wm(e)))?a._p||(o.instance=a,o.state.loading=5):(a=Ti.get(e),a||(a={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ti.set(e,a)),wK(i,e,a,o.state))),t&&r===null)throw Error(ne(528,""));return o}if(t&&r!==null)throw Error(ne(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=pd(n),t=Ec(i).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(ne(444,e))}}function yf(e){return'href="'+bi(e)+'"'}function wm(e){return'link[rel="stylesheet"]['+e+"]"}function b5(e){return Rt({},e,{"data-precedence":e.precedence,precedence:null})}function wK(e,t,n,r){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Lv]!==!0){r.loading=1;return}}else t=e.createElement("link"),t[Lv]=!0,t.onload=t.onerror=Yk.bind(null,t),Kn(t,"link",n),Nn(t),e.head.appendChild(t);r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2})}function pd(e){return'[src="'+bi(e)+'"]'}function Sm(e){return"script[async]"+e}function lR(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+bi(n.href)+'"]');if(r)return t.instance=r,Nn(r),r;var i=Rt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Nn(r),Kn(r,"style",i),vv(r,n.precedence,e),t.instance=r;case"stylesheet":i=yf(n.href);var a=e.querySelector(wm(i));if(a)return t.state.loading|=4,t.instance=a,Nn(a),a;r=b5(n),(i=Ti.get(i))&<(r,i),a=(e.ownerDocument||e).createElement("link"),Nn(a);var o=a;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Kn(a,"link",r),t.state.loading|=4,vv(a,n.precedence,e),t.instance=a;case"script":return a=pd(n.src),(i=e.querySelector(Sm(a)))?(t.instance=i,Nn(i),i):(r=n,(i=Ti.get(a))&&(r=Rt({},n),BT(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),Nn(i),Kn(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(ne(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,vv(r,n.precedence,e));return t.instance}function vv(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function LT(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function BT(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var yv=null;function uR(e,t,n){if(yv===null){var r=new Map,i=yv=new Map;i.set(n,r)}else i=yv,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mm]||a[Hn]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var o=a.getAttribute(t)||"";o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function KS(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function SK(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function cR(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function x5(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function w5(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function fR(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=w5(t),e.suspenseyImages.push(t)),e=EK.bind(e),t.decode().then(e,e))}function OK(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var i=yf(r.href),a=t.querySelector(wm(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=lh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nn(a);return}a=t.ownerDocument||t,r=b5(r),(i=Ti.get(i))&<(r,i),a=a.createElement("link"),Nn(a);var o=a;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Kn(a,"link",r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=lh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var bv=0;function jK(e,t){return e.stylesheets&&e.count===0&&xv(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&xv(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&bv===0&&(bv=62500*U9());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xv(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>bv?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function S5(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)xv(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function lh(){this.count--,S5(this)}function EK(){this.imgCount--,S5(this)}var sy=null;function xv(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sy=new Map,t.forEach(TK,e),sy=null,lh.call(e))}function TK(e,t){if(!(t.state.loading&4)){var n=sy.get(e);if(n)var r=n.get(null);else{n=new Map,sy.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var o=i[a];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute("data-precedence"),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=lh.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var bf={$$typeof:da,Provider:null,Consumer:null,_currentValue:Fl,_currentValue2:Fl,_threadCount:0};function AK(e,t,n,r,i,a,o,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Z0(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Z0(0),this.hiddenUpdates=Z0(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function O5(e,t,n,r,i,a,o,s,l,u,f,d){return e=new AK(e,t,n,o,l,u,f,d,s),t=1,a===!0&&(t|=24),a=Pr(3,null,null,t),e.current=a,a.stateNode=e,t=aT(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},lT(a),e}function j5(e){return e?(e=hc,e):hc}function E5(e,t,n,r,i,a){i=j5(i),r.context===null?r.context=i:r.pendingContext=i,r=ws(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ss(e,r,t),n!==null&&(Dr(n,e,t),_p(n,e,t))}function dR(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zT(e,t){dR(e,t),(e=e.alternate)&&dR(e,t)}function T5(e){if(e.tag===13||e.tag===31){var t=Eu(e,67108864);t!==null&&Dr(t,e,67108864),zT(e,67108864)}}function pR(e){if(e.tag===13||e.tag===31){var t=ei();t=KE(t);var n=Eu(e,t);n!==null&&Dr(n,e,t),zT(e,t)}}var xf=!0;function CK(e,t,n,r){var i=Pe.T;Pe.T=null;var a=pt.p;try{pt.p=2,FT(e,t,n,r)}finally{pt.p=a,Pe.T=i}}function _K(e,t,n,r){var i=Pe.T;Pe.T=null;var a=pt.p;try{pt.p=8,FT(e,t,n,r)}finally{pt.p=a,Pe.T=i}}function FT(e,t,n,r){if(xf){var i=YS(r);if(i===null)jw(e,t,r,ly,n),hR(e,r);else if(RK(i,e,t,n,r))r.stopPropagation();else if(hR(e,r),t&4&&-1<NK.indexOf(e)){for(;i!==null;){var a=ld(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ml(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-Jr(o);s.entanglements[1]|=l,o&=~l}Na(a),!(ft&6)&&(ny=Qr()+500,xm(0))}}break;case 31:case 13:s=Eu(a,2),s!==null&&Dr(s,a,2),ix(),zT(a,2)}if(a=YS(r),a===null&&jw(e,t,r,ly,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else jw(e,t,r,null,n)}}function YS(e){return e=WE(e),UT(e)}var ly=null;function UT(e){if(ly=null,e=Sl(e),e!==null){var t=fm(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Mk(t),e!==null)return e;e=null}else if(n===31){if(e=Pk(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ly=e,null}function A5(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(UV()){case Bk:return 2;case zk:return 8;case kv:case HV:return 32;case Fk:return 268435456;default:return 32}default:return 32}}var XS=!1,Ts=null,As=null,Cs=null,uh=new Map,ch=new Map,Jo=[],NK="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 hR(e,t){switch(e){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":As=null;break;case"mouseover":case"mouseout":Cs=null;break;case"pointerover":case"pointerout":uh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ch.delete(t.pointerId)}}function Gd(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ld(t),t!==null&&T5(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function RK(e,t,n,r,i){switch(t){case"focusin":return Ts=Gd(Ts,e,t,n,r,i),!0;case"dragenter":return As=Gd(As,e,t,n,r,i),!0;case"mouseover":return Cs=Gd(Cs,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return uh.set(a,Gd(uh.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,ch.set(a,Gd(ch.get(a)||null,e,t,n,r,i)),!0}return!1}function C5(e){var t=Sl(e.target);if(t!==null){var n=fm(t);if(n!==null){if(t=n.tag,t===13){if(t=Mk(n),t!==null){e.blockedOn=t,F_(e.priority,function(){pR(n)});return}}else if(t===31){if(t=Pk(n),t!==null){e.blockedOn=t,F_(e.priority,function(){pR(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wv(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=YS(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Z1=r,n.target.dispatchEvent(r),Z1=null}else return t=ld(n),t!==null&&T5(t),e.blockedOn=n,!1;t.shift()}return!0}function mR(e,t,n){wv(e)&&n.delete(t)}function MK(){XS=!1,Ts!==null&&wv(Ts)&&(Ts=null),As!==null&&wv(As)&&(As=null),Cs!==null&&wv(Cs)&&(Cs=null),uh.forEach(mR),ch.forEach(mR)}function cg(e,t){e.blockedOn===t&&(e.blockedOn=null,XS||(XS=!0,On.unstable_scheduleCallback(On.unstable_NormalPriority,MK)))}var fg=null;function gR(e){fg!==e&&(fg=e,On.unstable_scheduleCallback(On.unstable_NormalPriority,function(){fg===e&&(fg=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if(UT(r||n)===null)continue;break}var a=ld(n);a!==null&&(e.splice(t,3),t-=3,hS(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function wf(e){function t(l){return cg(l,e)}Ts!==null&&cg(Ts,e),As!==null&&cg(As,e),Cs!==null&&cg(Cs,e),uh.forEach(t),ch.forEach(t);for(var n=0;n<Jo.length;n++){var r=Jo[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Jo.length&&(n=Jo[0],n.blockedOn===null);)C5(n),n.blockedOn===null&&Jo.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Lr]||null;if(typeof a=="function")o||gR(n);else if(o){var s=null;if(a&&a.hasAttribute("formAction")){if(i=a,o=a[Lr]||null)s=o.formAction;else if(UT(i)!==null)continue}else s=o.action;typeof s=="function"?n[r+1]=s:(n.splice(r,3),r-=3),gR(n)}}}function _5(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(o){return i=o})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function HT(e){this._internalRoot=e}sx.prototype.render=HT.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ne(409));var n=t.current,r=ei();E5(n,r,e,t,null,null)};sx.prototype.unmount=HT.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;E5(e.current,2,null,e,null,null),ix(),t[sd]=null}};function sx(e){this._internalRoot=e}sx.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kk();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jo.length&&t!==0&&t<Jo[n].priority;n++);Jo.splice(n,0,e),n===0&&C5(e)}};var vR=Nk.version;if(vR!=="19.3.1")throw Error(ne(527,vR,"19.3.1"));pt.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ne(188)):(e=Object.keys(e).join(","),Error(ne(268,e)));return e=RV(t),e=e!==null?$k(e):null,e=e===null?null:e.stateNode,e};var PK={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:Pe,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dg.isDisabled&&dg.supportsFiber)try{dm=dg.inject(PK),Zr=dg}catch{}}Fb.createRoot=function(e,t){if(!Rk(e))throw Error(ne(299));var n=!1,r="",i=c3,a=f3,o=d3;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=O5(e,1,!1,null,null,n,r,null,i,a,o,_5),e[sd]=t.current,$T(e),new HT(t)};Fb.hydrateRoot=function(e,t,n){if(!Rk(e))throw Error(ne(299));var r=!1,i="",a=c3,o=f3,s=d3,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(l=n.formState)),t=O5(e,1,!0,t,n??null,r,i,l,a,o,s,_5),t.context=j5(null),n=t.current,r=ei(),r=KE(r),i=ws(r),i.callback=null,Ss(n,i,r),n=r,t.current.lanes=n,hm(t,n),Na(t),e[sd]=t.current,$T(e),new sx(t)};Fb.version="19.3.1";function N5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(N5)}catch(e){console.error(e)}}N5(),jk.exports=Fb;var $K=jk.exports;const R5=x.createContext(void 0),_o=e=>{const t=x.useContext(R5);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DK=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(R5.Provider,{value:e,children:t})),IK={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var ts,LE,tk,kK=(tk=class{constructor(){Te(this,ts,IK);Te(this,LE,!1)}setTimeoutProvider(e){me(this,ts,e)}setTimeout(e,t){return F(this,ts).setTimeout(e,t)}clearTimeout(e){F(this,ts).clearTimeout(e)}setInterval(e,t){return F(this,ts).setInterval(e,t)}clearInterval(e){F(this,ts).clearInterval(e)}},ts=new WeakMap,LE=new WeakMap,tk);const jl=new kK;function LK(e){setTimeout(e,0)}const BK=typeof window>"u"||"Deno"in globalThis;function yr(){}function zK(e,t){return typeof e=="function"?e(t):e}function M5(e){return typeof e=="number"&&e>=0&&e!==1/0}function P5(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ut(e,t){return typeof e=="function"?e(t):e}function yR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==qT(o,t.options))return!1}else if(!Sf(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function bR(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ou(t.options.mutationKey)!==ou(a))return!1}else if(!Sf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function qT(e,t){return((t==null?void 0:t.queryKeyHashFn)||ou)(e)}function ou(e){return JSON.stringify(e,(t,n)=>WS(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Sf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let r=0;r<t.length;r++)if(!Sf(e[r],t[r]))return!1;return!0}const n=Object.keys(t);for(const r of n)if(!Sf(e[r],t[r]))return!1;return!0}return!1}const FK=Object.prototype.hasOwnProperty;function $5(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=xR(e)&&xR(t);if(!r&&!(WS(e)&&WS(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u<o;u++){const f=r?u:a[u],d=e[f],p=t[f];if(d===p){s[f]=d,(r?u<i:FK.call(e,f))&&l++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){s[f]=p;continue}const h=$5(d,p,n+1);s[f]=h,h===d&&l++}return i===o&&l===i?e:s}function Sv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function xR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function WS(e){if(!wR(e))return!1;const t=Object.getPrototypeOf(e),n=t==null?void 0:t.constructor;if(n===void 0)return!0;if(typeof n!="function")return!1;const r=n.prototype;return!(!wR(r)||!r.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function wR(e){return Object.prototype.toString.call(e)==="[object Object]"}function UK(e){return new Promise(t=>{jl.setTimeout(t,e)})}function QS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$5(e,t):t}function HK(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function qK(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}const VT=Symbol();function D5(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===VT?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function GT(e,t){return typeof e=="function"?e(...t):!!e}function VK(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}let GK=()=>BK;const KT=()=>GK();var hd=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(){}},Ml,ns,Xc,nk,KK=(nk=class extends hd{constructor(){super();Te(this,Ml);Te(this,ns);Te(this,Xc);me(this,Xc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,ns)||this.setEventListener(F(this,Xc))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,ns))==null||t.call(this),me(this,ns,void 0))}setEventListener(t){var n;me(this,Xc,t),(n=F(this,ns))==null||n.call(this),me(this,ns,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,Ml)!==t&&(me(this,Ml,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,Ml)=="boolean"?F(this,Ml):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ml=new WeakMap,ns=new WeakMap,Xc=new WeakMap,nk);const YT=new KK,YK=LK;function XK(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=YK;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}const xn=XK();var Wc,rs,Qc,rk,WK=(rk=class extends hd{constructor(){super();Te(this,Wc,!0);Te(this,rs);Te(this,Qc);me(this,Qc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,rs)||this.setEventListener(F(this,Qc))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,rs))==null||t.call(this),me(this,rs,void 0))}setEventListener(t){var n;me(this,Qc,t),(n=F(this,rs))==null||n.call(this),me(this,rs,t(this.setOnline.bind(this)))}setOnline(t){F(this,Wc)!==t&&(me(this,Wc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return F(this,Wc)}},Wc=new WeakMap,rs=new WeakMap,Qc=new WeakMap,rk);const uy=new WK;function QK(e){return Math.min(1e3*2**e,3e4)}function I5(e){return(e??"online")==="online"?uy.isOnline():!0}var ZS=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function k5(e){let t=!1,n=0,r,i="pending",a,o;const s=new Promise((v,w)=>{a=v,o=w});s.catch(yr);const l=()=>i!=="pending",u=v=>{var w;if(!l()){const S=new ZS(v);m(S),(w=e.onCancel)==null||w.call(e,S)}},f=()=>{t=!0},d=()=>{t=!1},p=()=>YT.isFocused()&&(e.networkMode==="always"||uy.isOnline())&&e.canRun(),h=()=>I5(e.networkMode)&&e.canRun(),y=v=>{l()||(r==null||r(),i="resolved",a(v))},m=v=>{l()||(r==null||r(),i="rejected",o(v))},g=()=>new Promise(v=>{var w;r=S=>{(l()||p())&&v(S)},(w=e.onPause)==null||w.call(e)}).then(()=>{var v;r=void 0,l()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(l())return;let v;const w=n===0?e.initialPromise:void 0;try{v=w??e.fn()}catch(S){v=Promise.reject(S)}Promise.resolve(v).then(y).catch(S=>{var A;if(l())return;const O=e.retry??(KT()?0:3),j=e.retryDelay??QK,E=typeof j=="function"?j(n,S):j,T=O===!0||typeof O=="number"&&n<O||typeof O=="function"&&O(n,S);if(t||!T){m(S);return}n++,(A=e.onFail)==null||A.call(e,n,S),UK(E).then(()=>p()?void 0:g()).then(()=>{t?m(S):b()})})};return{promise:s,status:()=>i,cancel:u,continue:()=>(r==null||r(),s),cancelRetry:f,continueRetry:d,canStart:h,start:()=>(h()?b():g().then(b),s)}}var Pl,ik,L5=(ik=class{constructor(){Te(this,Pl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),M5(this.gcTime)&&me(this,Pl,jl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(KT()?1/0:3e5))}clearGcTimeout(){F(this,Pl)!==void 0&&(jl.clearTimeout(F(this,Pl)),me(this,Pl,void 0))}},Pl=new WeakMap,ik);function ZK(e){return{onFetch:(t,n)=>{var f,d,p,h,y;const r=t.options,i=(p=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=w=>{VK(w,()=>t.signal,()=>m=!0)},b=D5(t.options,t.fetchOptions),v=async(w,S,O)=>{if(m)return Promise.reject(t.signal.reason);if(S==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:S,direction:O?"backward":"forward",meta:t.options.meta};return g(_),_})(),T=await b(E),{maxPages:A}=t.options,C=O?qK:HK;return{pages:C(w.pages,T,A),pageParams:C(w.pageParams,S,A)}};if(i&&a.length){const w=i==="backward",S=w?B5:JS,O={pages:a,pageParams:o};s=await v(O,S(r,O),w)}else{const w=e??a.length;do{const S=l===0?o[0]??r.initialPageParam:JS(r,s);if(l>0&&S==null)break;s=await v(s,S),l++}while(l<w)}return s};t.options.persister?t.fetchFn=()=>{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function JS(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function B5(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function JK(e,t){return t?JS(e,t)!=null:!1}function e7(e,t){return!t||!e.getPreviousPageParam?!1:B5(e,t)!=null}var Zc,$l,Jc,hi,Dl,vn,om,Il,Ii,Ua,ak,t7=(ak=class extends L5{constructor(t){super();Te(this,Ii);Te(this,Zc);Te(this,$l);Te(this,Jc);Te(this,hi);Te(this,Dl);Te(this,vn);Te(this,om);Te(this,Il);me(this,Il,!1),me(this,om,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,Dl,t.client),me(this,hi,F(this,Dl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,$l,OR(this.options)),this.state=t.state??F(this,$l),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return F(this,Zc)}get promise(){var t;return(t=F(this,vn))==null?void 0:t.promise}setOptions(t){if(this.options={...F(this,om),...t},t!=null&&t._type&&me(this,Zc,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=OR(this.options);n.data!==void 0&&(this.setState(SR(n.data,n.dataUpdatedAt)),me(this,$l,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,hi).remove(this)}setData(t,n){const r=QS(this.state.data,t,this.options);return He(this,Ii,Ua).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){He(this,Ii,Ua).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=F(this,vn))==null?void 0:r.promise;return(i=F(this,vn))==null||i.cancel(t),n?n.then(yr).catch(yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return F(this,$l)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ut(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===VT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ut(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:!P5(this.state.dataUpdatedAt,t)}onFocus(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||t.refetch({cancelRefetch:!1}),(n=F(this,vn))==null||n.continue()}onOnline(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||t.refetch({cancelRefetch:!1}),(n=F(this,vn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,hi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&(this.observers.splice(n,1),this.observers.length||(F(this,vn)&&(F(this,Il)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?F(this,vn).cancel({revert:!0}):F(this,vn).cancelRetry()),this.scheduleGc()),F(this,hi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,Ii,Ua).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,d,p,h,y,m,g,b,v,w,S;if(this.state.fetchStatus!=="idle"&&((u=F(this,vn))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,vn))return F(this,vn).continueRetry(),F(this,vn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(j=>j.options.queryFn);O&&this.setOptions(O.options)}const r=new AbortController,i=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(me(this,Il,!0),r.signal)})},a=()=>{const O=D5(this.options,n),E=(()=>{const T={client:F(this,Dl),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return me(this,Il,!1),this.options.persister?this.options.persister(O,E,this):O(E)},s=(()=>{const O={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,Dl),state:this.state,fetchFn:a};return i(O),O})();(f=F(this,Zc)==="infinite"?ZK(this.options.pages):this.options.behavior)==null||f.onFetch(s,this),me(this,Jc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&He(this,Ii,Ua).call(this,{type:"fetch",meta:(p=s.fetchOptions)==null?void 0:p.meta});const l=me(this,vn,k5({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:O=>{O instanceof ZS&&O.revert&&this.setState({...F(this,Jc),fetchStatus:"idle"}),r.abort()},onFail:(O,j)=>{He(this,Ii,Ua).call(this,{type:"failed",failureCount:O,error:j})},onPause:()=>{He(this,Ii,Ua).call(this,{type:"pause"})},onContinue:()=>{He(this,Ii,Ua).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const O=await l.start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(y=(h=F(this,hi).config).onSuccess)==null||y.call(h,O,this),(g=(m=F(this,hi).config).onSettled)==null||g.call(m,O,this.state.error,this),O}catch(O){if(O instanceof ZS){if(O.silent)return F(this,vn).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw He(this,Ii,Ua).call(this,{type:"error",error:O}),(v=(b=F(this,hi).config).onError)==null||v.call(b,O,this),(S=(w=F(this,hi).config).onSettled)==null||S.call(w,this.state.data,O,this),O}finally{F(this,vn)===l&&me(this,vn,void 0),this.scheduleGc()}}},Zc=new WeakMap,$l=new WeakMap,Jc=new WeakMap,hi=new WeakMap,Dl=new WeakMap,vn=new WeakMap,om=new WeakMap,Il=new WeakMap,Ii=new WeakSet,Ua=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...z5(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...SR(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return me(this,Jc,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),xn.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),F(this,hi).notify({query:this,type:"updated",action:t})})},ak);function z5(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I5(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function SR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function OR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var mr,et,sm,gr,kl,ef,Ka,lm,tf,nf,Ll,Bl,is,rf,dt,gp,eO,tO,nO,rO,iO,aO,oO,sO,ok,F5=(ok=class extends hd{constructor(t,n){super();Te(this,dt);Te(this,mr);Te(this,et);Te(this,sm);Te(this,gr);Te(this,kl);Te(this,ef);Te(this,Ka);Te(this,lm);Te(this,tf);Te(this,nf);Te(this,Ll);Te(this,Bl);Te(this,is);Te(this,rf,new Set);this.options=n,me(this,mr,t),me(this,Ka,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,et).addObserver(this),jR(F(this,et),this.options)?He(this,dt,gp).call(this):this.updateResult(),He(this,dt,iO).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lO(F(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lO(F(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,dt,aO).call(this),He(this,dt,oO).call(this),F(this,et).removeObserver(this)}setOptions(t){const n=this.options,r=F(this,et);if(this.options=F(this,mr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,F(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,dt,sO).call(this),F(this,et).setOptions(this.options),n._defaulted&&!Sv(this.options,n)&&F(this,mr).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,et),observer:this});const i=this.hasListeners();i&&ER(F(this,et),r,this.options,n)&&He(this,dt,gp).call(this),this.updateResult(),i&&(F(this,et)!==r||Ut(this.options.enabled,F(this,et))!==Ut(n.enabled,F(this,et))||Ut(this.options.staleTime,F(this,et))!==Ut(n.staleTime,F(this,et)))&&He(this,dt,tO).call(this);const a=He(this,dt,nO).call(this);i&&(F(this,et)!==r||Ut(this.options.enabled,F(this,et))!==Ut(n.enabled,F(this,et))||a!==F(this,is))&&He(this,dt,rO).call(this,a)}getOptimisticResult(t){const n=F(this,mr).getQueryCache().build(F(this,mr),t),r=this.createResult(n,t);return Sv(this.getCurrentResult(),r)||(me(this,gr,r),me(this,ef,this.options),me(this,kl,F(this,et).state)),r}getCurrentResult(){return F(this,gr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){F(this,rf).add(t)}getCurrentQuery(){return F(this,et)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,mr).defaultQueryOptions(t),r=F(this,mr).getQueryCache().build(F(this,mr),n);let i=()=>{},a;const o=new Promise(s=>{a=s,i=F(this,mr).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===r.queryHash&&r.state.data!==void 0&&(i(),s(this.createResult(r,n)))})});return Promise.race([r.fetch().then(()=>{const s=this.createResult(r,n);return a==null||a(s),s}).finally(()=>{i()}),o])}fetch(t){return He(this,dt,gp).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,gr)))}createResult(t,n){var j;const r=F(this,et),i=this.options,a=F(this,gr),o=F(this,kl),s=F(this,ef),l=t!==r?t.state:F(this,sm),{state:u}=t;let f={...u},d=!1,p;if(n._optimisticResults){const E=this.hasListeners(),T=!E&&jR(t,n),A=E&&ER(t,r,n,i);(T||A)&&(f={...f,...z5(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:h,errorUpdatedAt:y,status:m}=f;p=f.data;let g=!1;if(n.placeholderData!==void 0&&p===void 0&&m==="pending"){let E;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(E=a.data,g=!0):E=typeof n.placeholderData=="function"?n.placeholderData((j=F(this,nf))==null?void 0:j.state.data,F(this,nf)):n.placeholderData,E!==void 0&&(m="success",p=QS(a==null?void 0:a.data,E,n),d=!0)}if(n.select&&p!==void 0&&!g)if(a&&p===(o==null?void 0:o.data)&&n.select===F(this,lm))p=F(this,tf);else try{me(this,lm,n.select),p=n.select(p),p=QS(a==null?void 0:a.data,p,n),me(this,tf,p),me(this,Ka,null)}catch(E){me(this,Ka,E)}else p===void 0&&me(this,Ka,null);F(this,Ka)&&(h=F(this,Ka),p=F(this,tf),y=Date.now(),m="error",d=!1);const b=f.fetchStatus==="fetching",v=m==="pending",w=m==="error",S=v&&b,O=p!==void 0;return{status:m,fetchStatus:f.fetchStatus,isPending:v,isSuccess:m==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!v,isLoadingError:w&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&O,isStale:XT(t,n),refetch:this.refetch,isEnabled:Ut(n.enabled,t)!==!1}}updateResult(){const t=F(this,gr),n=this.createResult(F(this,et),this.options);if(me(this,kl,F(this,et).state),me(this,ef,this.options),F(this,kl).data!==void 0&&me(this,nf,F(this,et)),Sv(n,t))return;me(this,gr,n);const i=(()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!F(this,rf).size)return!0;const s=new Set(o??F(this,rf));return this.options.throwOnError&&s.add("error"),Object.keys(F(this,gr)).some(l=>{const u=l;return F(this,gr)[u]!==t[u]&&s.has(u)})})();xn.batch(()=>{i&&this.listeners.forEach(a=>{a(F(this,gr))}),F(this,mr).getQueryCache().notify({query:F(this,et),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,dt,iO).call(this)}},mr=new WeakMap,et=new WeakMap,sm=new WeakMap,gr=new WeakMap,kl=new WeakMap,ef=new WeakMap,Ka=new WeakMap,lm=new WeakMap,tf=new WeakMap,nf=new WeakMap,Ll=new WeakMap,Bl=new WeakMap,is=new WeakMap,rf=new WeakMap,dt=new WeakSet,gp=function(t){He(this,dt,sO).call(this);let n=F(this,et).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(yr)),n},eO=function(t){return!KT()&&Ut(this.options.enabled,F(this,et))!==!1&&M5(t)},tO=function(){He(this,dt,aO).call(this);const t=Ut(this.options.staleTime,F(this,et));if(F(this,gr).isStale||!He(this,dt,eO).call(this,t))return;const n=P5(F(this,gr).dataUpdatedAt,t)+1;me(this,Ll,jl.setTimeout(()=>{F(this,gr).isStale||this.updateResult()},n))},nO=function(){return Ut(this.options.refetchInterval,F(this,et))??!1},rO=function(t){He(this,dt,oO).call(this),me(this,is,t),!(F(this,is)===0||!He(this,dt,eO).call(this,F(this,is)))&&me(this,Bl,jl.setInterval(()=>{(this.options.refetchIntervalInBackground||YT.isFocused())&&He(this,dt,gp).call(this)},F(this,is)))},iO=function(){He(this,dt,tO).call(this),He(this,dt,rO).call(this,He(this,dt,nO).call(this))},aO=function(){F(this,Ll)!==void 0&&(jl.clearTimeout(F(this,Ll)),me(this,Ll,void 0))},oO=function(){F(this,Bl)!==void 0&&(jl.clearInterval(F(this,Bl)),me(this,Bl,void 0))},sO=function(){const t=F(this,mr).getQueryCache().build(F(this,mr),this.options);if(t===F(this,et))return;const n=F(this,et);me(this,et,t),me(this,sm,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ok);function n7(e,t){return Ut(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ut(t.retryOnMount,e)===!1)}function jR(e,t){return n7(e,t)||e.state.data!==void 0&&lO(e,t,t.refetchOnMount)}function lO(e,t,n){if(Ut(t.enabled,e)!==!1&&Ut(t.staleTime,e)!=="static"){const r=Ut(n,e);return r==="always"||r!==!1&&XT(e,t)}return!1}function ER(e,t,n,r){return(e!==t||Ut(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&XT(e,n)}function XT(e,t){return Ut(t.enabled,e)!==!1&&e.isStaleByTime(Ut(t.staleTime,e))}var r7=class extends F5{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",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 h,y;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,l=(y=(h=n.fetchMeta)==null?void 0:h.fetchMore)==null?void 0:y.direction,u=o&&l==="forward",f=i&&l==="forward",d=o&&l==="backward",p=i&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:JK(t,n.data),hasPreviousPage:e7(t,n.data),isFetchNextPageError:u,isFetchingNextPage:f,isFetchPreviousPageError:d,isFetchingPreviousPage:p,isRefetchError:s&&!u&&!d,isRefetching:a&&!f&&!p}}},um,oa,Zn,zl,sa,Ko,sk,i7=(sk=class extends L5{constructor(t){super();Te(this,sa);Te(this,um);Te(this,oa);Te(this,Zn);Te(this,zl);me(this,um,t.client),this.mutationId=t.mutationId,me(this,Zn,t.mutationCache),me(this,oa,[]),this.state=t.state||U5(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,oa).includes(t)||(F(this,oa).push(t),this.clearGcTimeout(),F(this,Zn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,oa,F(this,oa).filter(n=>n!==t)),this.scheduleGc(),F(this,Zn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,oa).length||(this.state.status==="pending"?this.scheduleGc():F(this,Zn).remove(this))}continue(){var t;return((t=F(this,zl))==null?void 0:t.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){var s,l,u,f,d,p,h,y,m,g,b,v,w,S,O,j,E,T;const n=()=>{He(this,sa,Ko).call(this,{type:"continue"})},r={client:F(this,um),meta:this.options.meta,mutationKey:this.options.mutationKey},i=me(this,zl,k5({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,C)=>{He(this,sa,Ko).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{He(this,sa,Ko).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,Zn).canRun(this)})),a=this.state.status==="pending",o=!i.canStart();try{if(a)n();else{He(this,sa,Ko).call(this,{type:"pending",variables:t,isPaused:o}),F(this,Zn).config.onMutate&&await F(this,Zn).config.onMutate(t,this,r);const C=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));C!==this.state.context&&He(this,sa,Ko).call(this,{type:"pending",context:C,variables:t,isPaused:o})}const A=await i.start();return await((f=(u=F(this,Zn).config).onSuccess)==null?void 0:f.call(u,A,t,this.state.context,this,r)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,A,t,this.state.context,r)),await((y=(h=F(this,Zn).config).onSettled)==null?void 0:y.call(h,A,null,this.state.variables,this.state.context,this,r)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,A,null,t,this.state.context,r)),He(this,sa,Ko).call(this,{type:"success",data:A}),A}catch(A){try{await((v=(b=F(this,Zn).config).onError)==null?void 0:v.call(b,A,t,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((S=(w=this.options).onError)==null?void 0:S.call(w,A,t,this.state.context,r))}catch(C){Promise.reject(C)}try{await((j=(O=F(this,Zn).config).onSettled)==null?void 0:j.call(O,void 0,A,this.state.variables,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,A,t,this.state.context,r))}catch(C){Promise.reject(C)}throw He(this,sa,Ko).call(this,{type:"error",error:A}),A}finally{F(this,zl)===i&&me(this,zl,void 0),F(this,Zn).runNext(this)}}},um=new WeakMap,oa=new WeakMap,Zn=new WeakMap,zl=new WeakMap,sa=new WeakSet,Ko=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),xn.batch(()=>{F(this,oa).forEach(r=>{r.onMutationUpdate(t)}),F(this,Zn).notify({mutation:this,type:"updated",action:t})})},sk);function U5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ya,ki,cm,lk,a7=(lk=class extends hd{constructor(t={}){super();Te(this,Ya);Te(this,ki);Te(this,cm);this.config=t,me(this,Ya,new Set),me(this,ki,new Map),me(this,cm,0)}build(t,n,r){const i=new i7({client:t,mutationCache:this,mutationId:++Gm(this,cm)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){F(this,Ya).add(t);const n=pg(t);if(typeof n=="string"){const r=F(this,ki).get(n);r?r.push(t):F(this,ki).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,Ya).delete(t)){const n=pg(t);if(typeof n=="string"){const r=F(this,ki).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&F(this,ki).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=pg(t);if(typeof n=="string"){const i=(r=F(this,ki).get(n))==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=pg(t);return typeof n=="string"?((i=(r=F(this,ki).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused))==null?void 0:i.continue())??Promise.resolve():Promise.resolve()}clear(){xn.batch(()=>{F(this,Ya).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,Ya).clear(),F(this,ki).clear()})}getAll(){return Array.from(F(this,Ya))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>bR(n,r))}findAll(t={}){return this.getAll().filter(n=>bR(t,n))}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return xn.batch(()=>Promise.all(t.map(n=>n.continue().catch(yr))))}},Ya=new WeakMap,ki=new WeakMap,cm=new WeakMap,lk);function pg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Xa,as,Jn,Wa,ya,vp,uO,uk,o7=(uk=class extends hd{constructor(n,r){super();Te(this,ya);Te(this,Xa);Te(this,as);Te(this,Jn);Te(this,Wa);me(this,Xa,n),this.setOptions(r),this.bindMethods(),He(this,ya,vp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=F(this,Xa).defaultMutationOptions(n),Sv(this.options,r)||F(this,Xa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,Jn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ou(r.mutationKey)!==ou(this.options.mutationKey)?this.reset():((i=F(this,Jn))==null?void 0:i.state.status)==="pending"&&F(this,Jn).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&F(this,Jn)&&(F(this,Jn).addObserver(this),He(this,ya,vp).call(this))}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,Jn))==null||n.removeObserver(this)}onMutationUpdate(n){He(this,ya,vp).call(this),He(this,ya,uO).call(this,n)}getCurrentResult(){return F(this,as)}reset(){var n;(n=F(this,Jn))==null||n.removeObserver(this),me(this,Jn,void 0),He(this,ya,vp).call(this),He(this,ya,uO).call(this)}mutate(n,r){var i;return me(this,Wa,r),(i=F(this,Jn))==null||i.removeObserver(this),me(this,Jn,F(this,Xa).getMutationCache().build(F(this,Xa),this.options)),F(this,Jn).addObserver(this),F(this,Jn).execute(n)}},Xa=new WeakMap,as=new WeakMap,Jn=new WeakMap,Wa=new WeakMap,ya=new WeakSet,vp=function(){var r;const n=((r=F(this,Jn))==null?void 0:r.state)??U5();me(this,as,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},uO=function(n){xn.batch(()=>{var r,i,a,o,s,l,u,f;if(F(this,Wa)&&this.hasListeners()){const d=F(this,as).variables,p=F(this,as).context,h={client:F(this,Xa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=F(this,Wa)).onSuccess)==null||i.call(r,n.data,d,p,h)}catch(y){Promise.reject(y)}try{(o=(a=F(this,Wa)).onSettled)==null||o.call(a,n.data,null,d,p,h)}catch(y){Promise.reject(y)}}else if((n==null?void 0:n.type)==="error"){try{(l=(s=F(this,Wa)).onError)==null||l.call(s,n.error,d,p,h)}catch(y){Promise.reject(y)}try{(f=(u=F(this,Wa)).onSettled)==null||f.call(u,void 0,n.error,d,p,h)}catch(y){Promise.reject(y)}}}this.listeners.forEach(d=>{d(F(this,as))})})},uk),la,ck,s7=(ck=class extends hd{constructor(t={}){super();Te(this,la);this.config=t,me(this,la,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??qT(i,n);let o=this.get(a);return o||(o=new t7({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){F(this,la).has(t.queryHash)||(F(this,la).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,la).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,la).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){xn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,la).get(t)}getAll(){return[...F(this,la).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yR(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>yR(t,r)):n}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){xn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){xn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},la=new WeakMap,ck),Yt,os,ss,af,of,ls,sf,lf,fk,l7=(fk=class{constructor(e={}){Te(this,Yt);Te(this,os);Te(this,ss);Te(this,af);Te(this,of);Te(this,ls);Te(this,sf);Te(this,lf);me(this,Yt,e.queryCache||new s7),me(this,os,e.mutationCache||new a7),me(this,ss,e.defaultOptions||{}),me(this,af,new Map),me(this,of,new Map),me(this,ls,0)}mount(){Gm(this,ls)._++,F(this,ls)===1&&(me(this,sf,YT.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Yt).onFocus())})),me(this,lf,uy.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Yt).onOnline())})))}unmount(){var e,t;Gm(this,ls)._--,F(this,ls)===0&&((e=F(this,sf))==null||e.call(this),me(this,sf,void 0),(t=F(this,lf))==null||t.call(this),me(this,lf,void 0))}isFetching(e){return F(this,Yt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,os).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Yt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Yt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ut(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Yt).findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){var o;const r=this.defaultQueryOptions({queryKey:e}),i=(o=F(this,Yt).get(r.queryHash))==null?void 0:o.state.data,a=zK(t,i);if(a!==void 0)return F(this,Yt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return xn.batch(()=>F(this,Yt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Yt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Yt);xn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Yt);return xn.batch(()=>{const r=n.findAll(e),i=new Set(r);return r.forEach(a=>{a.reset()}),this.refetchQueries({type:"active",predicate:a=>i.has(a)},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},r=xn.batch(()=>F(this,Yt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(yr).catch(yr)}invalidateQueries(e,t={}){return xn.batch(()=>(F(this,Yt).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},r=xn.batch(()=>F(this,Yt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(yr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(yr)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Yt).build(this,t),r=n.isStaleByTime(Ut(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Yt).build(this,t);return n.isStaleByTime(Ut(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yr).catch(yr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yr).catch(yr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return uy.isOnline()?F(this,os).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Yt)}getMutationCache(){return F(this,os)}getDefaultOptions(){return F(this,ss)}setDefaultOptions(e){me(this,ss,e)}setQueryDefaults(e,t){F(this,af).set(ou(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,af).values()],n={};return t.forEach(r=>{Sf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,of).set(ou(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,of).values()],n={};return t.forEach(r=>{Sf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,ss).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qT(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===VT&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,ss).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Yt).clear(),F(this,os).clear()}},Yt=new WeakMap,os=new WeakMap,ss=new WeakMap,af=new WeakMap,of=new WeakMap,ls=new WeakMap,sf=new WeakMap,lf=new WeakMap,fk);const H5=x.createContext(!1),u7=()=>x.useContext(H5);H5.Provider;function c7(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const f7=x.createContext(c7()),d7=()=>x.useContext(f7),p7=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?GT(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},h7=e=>{x.useEffect(()=>{e.clearReset()},[e])},m7=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||GT(n,[e.error,r])),g7=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},v7=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,y7=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function q5(e,t,n){const r=u7(),i=d7(),a=_o(),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":l?"optimistic":void 0,g7(o),p7(o,i,s),h7(i);const[u]=x.useState(()=>new t(a,o)),f=u.getOptimisticResult(o),d=!r&&l;if(x.useSyncExternalStore(x.useCallback(p=>{const h=d?u.subscribe(xn.batchCalls(p)):yr;return u.updateResult(),h},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x.useEffect(()=>{u.setOptions(o)},[o,u]),v7(o,f))throw y7(o,u,i);if(m7({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return o.notifyOnChangeProps?f:u.trackResult(f)}function zt(e,t){return q5(e,F5)}function Au(e,t){const n=_o(),[r]=x.useState(()=>new o7(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(xn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=x.useCallback((...o)=>{r.mutate(o[0],o[1]).catch(yr)},[r]);if(i.error&>(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function b7(e,t){return q5(e,r7)}/**
|
|
50
|
+
* @remix-run/router v1.23.4
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function fh(){return fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fh.apply(null,arguments)}var ms;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ms||(ms={}));const TR="popstate";function x7(e){e===void 0&&(e={});function t(i,a){let{pathname:o="/",search:s="",hash:l=""}=Cu(i.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),cO("",{pathname:o,search:s,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(i,a){let o=i.document.querySelector("base"),s="";if(o&&o.getAttribute("href")){let l=i.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof a=="string"?a:cy(a))}function r(i,a){WT(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(a)+")")}return S7(t,n,r,e)}function en(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function WT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function w7(){return Math.random().toString(36).substr(2,8)}function AR(e,t){return{usr:e.state,key:e.key,idx:t}}function cO(e,t,n,r){return n===void 0&&(n=null),fh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cu(t):t,{state:n,key:t&&t.key||r||w7()})}function cy(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function S7(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=ms.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(fh({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){s=ms.Pop;let g=f(),b=g==null?null:g-u;u=g,l&&l({action:s,location:m.location,delta:b})}function p(g,b){s=ms.Push;let v=cO(m.location,g,b);n&&n(v,g),u=f()+1;let w=AR(v,u),S=m.createHref(v);try{o.pushState(w,"",S)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function h(g,b){s=ms.Replace;let v=cO(m.location,g,b);n&&n(v,g),u=f();let w=AR(v,u),S=m.createHref(v);o.replaceState(w,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function y(g){let b=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof g=="string"?g:cy(g);return v=v.replace(/ $/,"%20"),en(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let m={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(TR,d),l=g,()=>{i.removeEventListener(TR,d),l=null}},createHref(g){return t(i,g)},createURL:y,encodeLocation(g){let b=y(g);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:h,go(g){return o.go(g)}};return m}var CR;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(CR||(CR={}));function O7(e,t,n){return n===void 0&&(n="/"),j7(e,t,n)}function j7(e,t,n,r){let i=typeof t=="string"?Cu(t):t,a=Of(i.pathname||"/",n);if(a==null)return null;let o=V5(e);E7(o);let s=null,l=I7(a);for(let u=0;s==null&&u<o.length;++u)s=$7(o[u],l);return s}function V5(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(en(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=_s([r,l.relativePath]),f=n.concat(l);a.children&&a.children.length>0&&(en(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),V5(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:M7(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of G5(a.path))i(a,o,l)}),t}function G5(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=G5(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function E7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:P7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const T7=/^:[\w-]+$/,A7=3,C7=2,_7=1,N7=10,R7=-2,_R=e=>e==="*";function M7(e,t){let n=e.split("/"),r=n.length;return n.some(_R)&&(r+=R7),t&&(r+=C7),n.filter(i=>!_R(i)).reduce((i,a)=>i+(T7.test(a)?A7:a===""?_7:N7),r)}function P7(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function $7(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let l=r[s],u=s===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=fO({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),p=l.route;if(!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:_s([a,d.pathname]),pathnameBase:B7(_s([a,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(a=_s([a,d.pathnameBase]))}return o}function fO(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=D7(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,f,d)=>{let{paramName:p,isOptional:h}=f;if(p==="*"){let m=s[d]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const y=s[d];return h&&!y?u[p]=void 0:u[p]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function D7(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),WT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function I7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return WT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Of(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function k7(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Cu(e):e,a;return n?(n=X5(n),n.startsWith("/")?a=NR(n.substring(1),"/"):a=NR(n,t)):a=t,{pathname:a,search:z7(r),hash:F7(i)}}function NR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Cw(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function L7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function K5(e,t){let n=L7(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Y5(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Cu(e):(i=fh({},e),en(!i.pathname||!i.pathname.includes("?"),Cw("?","pathname","search",i)),en(!i.pathname||!i.pathname.includes("#"),Cw("#","pathname","hash",i)),en(!i.search||!i.search.includes("#"),Cw("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=k7(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const X5=e=>e.replace(/\/\/+/g,"/"),_s=e=>X5(e.join("/")),B7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,F7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function U7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const W5=["post","put","patch","delete"];new Set(W5);const H7=["get",...W5];new Set(H7);/**
|
|
59
|
+
* React Router v6.30.6
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dh.apply(null,arguments)}const lx=x.createContext(null),Q5=x.createContext(null),Gs=x.createContext(null),ux=x.createContext(null),No=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Z5=x.createContext(null);function J5(e,t){let{relative:n}=t===void 0?{}:t;Om()||en(!1);let{basename:r,navigator:i}=x.useContext(Gs),{hash:a,pathname:o,search:s}=fx(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:_s([r,o])),i.createHref({pathname:l,search:s,hash:a})}function Om(){return x.useContext(ux)!=null}function _u(){return Om()||en(!1),x.useContext(ux).location}function eB(e){x.useContext(Gs).static||x.useLayoutEffect(e)}function Ra(){let{isDataRoute:e}=x.useContext(No);return e?iY():q7()}function q7(){Om()||en(!1);let e=x.useContext(lx),{basename:t,future:n,navigator:r}=x.useContext(Gs),{matches:i}=x.useContext(No),{pathname:a}=_u(),o=JSON.stringify(K5(i,n.v7_relativeSplatPath)),s=x.useRef(!1);return eB(()=>{s.current=!0}),x.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let d=Y5(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:_s([t,d.pathname])),(f.replace?r.replace:r.push)(d,f.state,f)},[t,r,o,a,e])}const V7=x.createContext(null);function G7(e){let t=x.useContext(No).outlet;return t&&x.createElement(V7.Provider,{value:e},t)}function cx(){let{matches:e}=x.useContext(No),t=e[e.length-1];return t?t.params:{}}function fx(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Gs),{matches:i}=x.useContext(No),{pathname:a}=_u(),o=JSON.stringify(K5(i,r.v7_relativeSplatPath));return x.useMemo(()=>Y5(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function K7(e,t){return Y7(e,t)}function Y7(e,t,n,r){Om()||en(!1);let{navigator:i}=x.useContext(Gs),{matches:a}=x.useContext(No),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=_u(),f;if(t){var d;let g=typeof t=="string"?Cu(t):t;l==="/"||(d=g.pathname)!=null&&d.startsWith(l)||en(!1),f=g}else f=u;let p=f.pathname||"/",h=p;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=O7(e,{pathname:h}),m=J7(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:_s([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:_s([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,n,r);return t&&m?x.createElement(ux.Provider,{value:{location:dh({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:ms.Pop}},m):m}function X7(){let e=rY(),t=U7(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const W7=x.createElement(X7,null);class Q7 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(No.Provider,{value:this.props.routeContext},x.createElement(Z5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z7(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(lx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(No.Provider,{value:t},r)}function J7(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);f>=0||en(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let d=o[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:p,errors:h}=n,y=d.route.loader&&p[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,p)=>{let h,y=!1,m=null,g=null;n&&(h=s&&d.route.id?s[d.route.id]:void 0,m=d.route.errorElement||W7,l&&(u<0&&p===0?(aY("route-fallback"),y=!0,g=null):u===p&&(y=!0,g=d.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,p+1)),v=()=>{let w;return h?w=m:y?w=g:d.route.Component?w=x.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=f,x.createElement(Z7,{match:d,routeContext:{outlet:f,matches:b,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?x.createElement(Q7,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var tB=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tB||{}),nB=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(nB||{});function eY(e){let t=x.useContext(lx);return t||en(!1),t}function tY(e){let t=x.useContext(Q5);return t||en(!1),t}function nY(e){let t=x.useContext(No);return t||en(!1),t}function rB(e){let t=nY(),n=t.matches[t.matches.length-1];return n.route.id||en(!1),n.route.id}function rY(){var e;let t=x.useContext(Z5),n=tY(),r=rB();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function iY(){let{router:e}=eY(tB.UseNavigateStable),t=rB(nB.UseNavigateStable),n=x.useRef(!1);return eB(()=>{n.current=!0}),x.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,dh({fromRouteId:t},a)))},[e,t])}const RR={};function aY(e,t,n){RR[e]||(RR[e]=!0)}function oY(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function sY(e){return G7(e.context)}function Bn(e){en(!1)}function lY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ms.Pop,navigator:a,static:o=!1,future:s}=e;Om()&&en(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:a,static:o,future:dh({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof r=="string"&&(r=Cu(r));let{pathname:f="/",search:d="",hash:p="",state:h=null,key:y="default"}=r,m=x.useMemo(()=>{let g=Of(f,l);return g==null?null:{location:{pathname:g,search:d,hash:p,state:h,key:y},navigationType:i}},[l,f,d,p,h,y,i]);return m==null?null:x.createElement(Gs.Provider,{value:u},x.createElement(ux.Provider,{children:n,value:m}))}function uY(e){let{children:t,location:n}=e;return K7(dO(t),n)}new Promise(()=>{});function dO(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let a=[...t,i];if(r.type===x.Fragment){n.push.apply(n,dO(r.props.children,a));return}r.type!==Bn&&en(!1),!r.props.index||!r.props.children||en(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=dO(r.props.children,a)),n.push(o)}),n}/**
|
|
68
|
+
* React Router DOM v6.30.6
|
|
69
|
+
*
|
|
70
|
+
* Copyright (c) Remix Software Inc.
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the MIT license found in the
|
|
73
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
74
|
+
*
|
|
75
|
+
* @license MIT
|
|
76
|
+
*/function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fy.apply(null,arguments)}function iB(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function cY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fY(e,t){return e.button===0&&(!t||t==="_self")&&!cY(e)}function pO(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function dY(e,t){let n=pO(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const pY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hY=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],mY="6";try{window.__reactRouterVersion=mY}catch{}const gY=x.createContext({isTransitioning:!1}),vY="startTransition",MR=zb[vY];function yY(e){let{basename:t,children:n,future:r,window:i}=e,a=x.useRef();a.current==null&&(a.current=x7({window:i,v5Compat:!0}));let o=a.current,[s,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},f=x.useCallback(d=>{u&&MR?MR(()=>l(d)):l(d)},[l,u]);return x.useLayoutEffect(()=>o.listen(f),[o,f]),x.useEffect(()=>oY(r),[r]),x.createElement(lY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const bY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xY=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dy=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:f,viewTransition:d}=t,p=iB(t,pY),{basename:h}=x.useContext(Gs),y,m=!1;if(typeof u=="string"&&xY.test(u)&&(y=u,bY))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),O=Of(S.pathname,h);S.origin===w.origin&&O!=null?u=O+S.search+S.hash:m=!0}catch{}let g=J5(u,{relative:i}),b=OY(u,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:d});function v(w){r&&r(w),w.defaultPrevented||b(w)}return x.createElement("a",fy({},p,{href:y||g,onClick:m||a?r:v,ref:n,target:l}))}),wY=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:l,viewTransition:u,children:f}=t,d=iB(t,hY),p=fx(l,{relative:d.relative}),h=_u(),y=x.useContext(Q5),{navigator:m,basename:g}=x.useContext(Gs),b=y!=null&&jY(p)&&u===!0,v=m.encodeLocation?m.encodeLocation(p).pathname:p.pathname,w=h.pathname,S=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,v=v.toLowerCase()),S&&g&&(S=Of(S,g)||S);const O=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let j=w===v||!o&&w.startsWith(v)&&w.charAt(O)==="/",E=S!=null&&(S===v||!o&&S.startsWith(v)&&S.charAt(v.length)==="/"),T={isActive:j,isPending:E,isTransitioning:b},A=j?r:void 0,C;typeof a=="function"?C=a(T):C=[a,j?"active":null,E?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let _=typeof s=="function"?s(T):s;return x.createElement(dy,fy({},d,{"aria-current":A,className:C,ref:n,style:_,to:l,viewTransition:u}),typeof f=="function"?f(T):f)});var hO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(hO||(hO={}));var PR;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(PR||(PR={}));function SY(e){let t=x.useContext(lx);return t||en(!1),t}function OY(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Ra(),u=_u(),f=fx(e,{relative:o});return x.useCallback(d=>{if(fY(d,n)){d.preventDefault();let p=r!==void 0?r:cy(u)===cy(f);l(e,{replace:p,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,f,r,i,n,e,a,o,s])}function aB(e){let t=x.useRef(pO(e)),n=x.useRef(!1),r=_u(),i=x.useMemo(()=>dY(r.search,n.current?null:t.current),[r.search]),a=Ra(),o=x.useCallback((s,l)=>{const u=pO(typeof s=="function"?s(i):s);n.current=!0,a("?"+u,l)},[a,i]);return[i,o]}function jY(e,t){t===void 0&&(t={});let n=x.useContext(gY);n==null&&en(!1);let{basename:r}=SY(hO.useViewTransitionState),i=fx(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Of(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Of(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fO(i.pathname,o)!=null||fO(i.pathname,a)!=null}const mO="telescope:access-denied";async function EY(e){if(e.status!==401&&e.status!==403)return null;const t=typeof e.clone=="function"?e.clone():e,n=await Promise.resolve().then(()=>t.json()).catch(()=>null);if(n===null||typeof n!="object"||!("error"in n))return null;const{error:r}=n;if(r!=="unauthenticated"&&r!=="forbidden")return null;const i=n.redirectTo;return{status:e.status,reason:r,...typeof i=="string"?{redirectTo:i}:{}}}function TY(e){if(!(typeof window>"u")){if(e.redirectTo!==void 0){window.location.assign(e.redirectTo);return}window.dispatchEvent(new CustomEvent(mO,{detail:e}))}}function AY(){var t;const e=typeof window>"u"||(t=window.location)==null?void 0:t.search;return e&&new URLSearchParams(e).get("tenant")||void 0}function CY(e,t){return t===void 0||typeof e!="string"||/[?&]tenant=/.test(e)?e:`${e}${e.includes("?")?"&":"?"}tenant=${encodeURIComponent(t)}`}function _Y(){return`${typeof window<"u"&&window.__TELESCOPE_BASE__||"/telescope"}/api`}function NY(e={}){const t=(e.baseUrl??_Y()).replace(/\/$/,""),n=e.fetch??globalThis.fetch,r=e.onAccessDenied??TY,i=e.tenant??AY,a=async(m,g)=>{const b=await n(CY(m,i()),g),v=await EY(b);return v&&r(v),b};async function o(m,g){let b=`${t}${m}`;if(g){const w=new URLSearchParams;for(const[O,j]of Object.entries(g))j!==void 0&&w.set(O,String(j));const S=w.toString();S&&(b+=`?${S}`)}const v=await a(b);if(!v.ok)throw new Error(`Telescope API ${m} failed: ${v.status}`);return await v.json()}async function s(m,g,b){let v=`${t}${m}`;if(g){const S=new URLSearchParams;for(const[j,E]of Object.entries(g))E!==void 0&&S.set(j,String(E));const O=S.toString();O&&(v+=`?${O}`)}const w=await a(v,{method:"POST",headers:{"Content-Type":"application/json"},...b!==void 0?{body:JSON.stringify(b)}:{}});if(!w.ok)throw new Error(`Telescope API ${m} failed: ${w.status}`);return await w.json()}async function l(m){return a(`${t}${m}`)}async function u(m,g){return a(`${t}${m}`,{method:"POST",headers:{"Content-Type":"application/json"},...g!==void 0?{body:JSON.stringify(g)}:{}})}async function f(m){const g=await u("/queries/explain",{entryId:m});return g.ok?{ok:!0,plan:(await g.json()).plan}:{ok:!1,message:await d(g)}}async function d(m){const g=await m.json().then(b=>b).catch(()=>null);return g!==null&&typeof g=="object"&&"message"in g&&typeof g.message=="string"?g.message:`EXPLAIN failed (${m.status})`}async function p(m,g=!1){const b=g?"?force=true":"",v=await u(`/exceptions/${encodeURIComponent(m)}/diagnose${b}`);if(v.ok){const S=await v.json();return{ok:!0,markdown:S.markdown,cached:S.cached}}return{ok:!1,message:await y(v)}}async function h(m){const g=await l(`/exceptions/${encodeURIComponent(m)}/diagnosis`);return g.status===204||g.status===404||!g.ok?null:{markdown:(await g.json()).markdown,cached:!0}}async function y(m){const g=await m.json().then(b=>b).catch(()=>null);return g!==null&&typeof g=="object"&&"message"in g&&typeof g.message=="string"?g.message:`Diagnosis failed (${m.status})`}return{baseUrl:t,entries:(m={})=>o("/entries",{"filter[type]":m.type,"filter[tag]":m.tag,"filter[traceId]":m.traceId,"filter[batchId]":m.batchId,"filter[familyHash]":m.familyHash,search:m.search,after:m.after,first:m.first}),entry:m=>o(`/entries/${encodeURIComponent(m)}`),pulse:m=>o("/pulse",{window:m}),queues:m=>o("/queues",{window:m}),timeseries:(m={})=>o("/timeseries",{window:m.window,buckets:m.buckets,type:m.type,tag:m.tag}),traces:(m,g)=>o("/traces",{window:m,size:g}),waterfall:m=>o(`/traces/${encodeURIComponent(m)}/waterfall`),stats:(m,g)=>o("/stats",{type:m,window:g}),ai:(m,g)=>o("/ai",{window:m,buckets:g==null?void 0:g.buckets,top:g==null?void 0:g.top,size:g==null?void 0:g.size}),tags:(m,g)=>{var b;return o("/tags",{"filter[tag][startsWith]":m||void 0,search:((b=g==null?void 0:g.search)==null?void 0:b.trim())||void 0,after:g==null?void 0:g.after,first:g==null?void 0:g.first})},meta:()=>o("/meta"),tenancy:async m=>{const g=m!=null&&m.trim()?`?search=${encodeURIComponent(m.trim())}`:"",b=await l(`/tenancy${g}`);if(b.status===404)return{enabled:!1};if(!b.ok)throw new Error(`Telescope API /tenancy failed: ${b.status}`);return await b.json()},extData:(m,g,b)=>{const v=b&&Object.keys(b).length?`?${new URLSearchParams(b).toString()}`:"";return o(`/ext/${encodeURIComponent(m)}/data/${encodeURIComponent(g)}${v}`)},extAction:async(m,g,b)=>{const v=`/ext/${encodeURIComponent(m)}/actions/${encodeURIComponent(g)}`,w=await a(`${t}${v}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirmed:!0,input:b})});if(!w.ok){const S=await w.json().catch(()=>null),O=typeof(S==null?void 0:S.message)=="string"?S.message:`${w.status}`;throw new Error(O)}return await w.json()},serverStats:()=>o("/server-stats"),serverStatsHistory:()=>o("/server-stats/history"),health:()=>o("/health"),retention:()=>o("/retention"),prunes:()=>o("/prunes"),prune:()=>s("/retention/prune"),explain:f,diagnose:p,cachedDiagnosis:h,profilerStatus:()=>o("/profiles/status"),profiles:(m={})=>o("/profiles",{after:m.after,first:m.first}),profile:m=>o(`/profiles/${encodeURIComponent(m)}`),armProfile:(m,g)=>s("/profiles/arm",void 0,{count:m,...g?{label:g}:{}}),liveQueues:()=>o("/queues/live"),schedulesLive:()=>o("/schedules/live"),queueCounts:(m,g)=>o(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/counts`),queueJobs:(m,g,b,v={})=>o(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/jobs`,{"filter[state]":b,after:v.after,first:v.first}),queueJob:(m,g,b)=>o(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/jobs/${encodeURIComponent(b)}`),queueJobAction:(m,g,b,v)=>s(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/jobs/${encodeURIComponent(b)}/${encodeURIComponent(v)}`),queueAction:(m,g,b,v={})=>s(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/actions/${encodeURIComponent(b)}`,{state:v.state}),queueEnqueue:(m,g,b)=>s(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/enqueue`,void 0,b)}}const QT=x.createContext(null),oB=x.createContext(null);function RY({client:e,children:t}){const n=e??NY(),[r,i]=x.useState(!1),a=x.useMemo(()=>({paused:r,setPaused:i}),[r]);return c.jsx(QT.Provider,{value:n,children:c.jsx(oB.Provider,{value:a,children:t})})}function tt(){const e=x.useContext(QT);if(!e)throw new Error("useTelescopeClient must be used within a TelescopeProvider");return e}function MY(){return x.useContext(QT)}function sB(){const e=x.useContext(oB);if(!e)throw new Error("useLiveTail must be used within a TelescopeProvider");return e}function In(){return sB().paused}const lr=3e3,ZT=2500;function kn(e,t){return t?!1:e}function PY(e,t={},n=!1){return{queryKey:["telescope","entries",t],queryFn:()=>e.entries(t),refetchInterval:kn(lr,n)}}function $Y(e,t){return{queryKey:["telescope","entry",t],queryFn:()=>e.entry(t)}}const DY=50;function IY(e,t="",n=""){return{queryKey:["telescope","tags","page",t,n],queryFn:({pageParam:r})=>e.tags(t===""?void 0:t,{search:n,first:DY,...r!==void 0?{after:r}:{}}),initialPageParam:void 0,getNextPageParam:r=>r.meta.hasNext&&r.meta.nextCursor!==null?r.meta.nextCursor:void 0,staleTime:lr}}function kY(e,t=!1){return{queryKey:["telescope","meta"],queryFn:()=>e.meta(),refetchInterval:kn(lr,t)}}function LY(e,t,n,r){return{queryKey:["telescope","ext-data",t,n,r],queryFn:()=>e.extData(t,n,r)}}function BY(e,t=!1){return{queryKey:["telescope","server-stats"],queryFn:()=>e.serverStats(),refetchInterval:kn(lr,t)}}function zY(e,t=!1){return{queryKey:["telescope","server-stats-history"],queryFn:()=>e.serverStatsHistory(),refetchInterval:kn(lr,t)}}function FY(e,t=!1){return{queryKey:["telescope","health"],queryFn:()=>e.health(),refetchInterval:kn(lr,t)}}function lB(){return["telescope","retention"]}function UY(e,t=!1){return{queryKey:lB(),queryFn:()=>e.retention(),refetchInterval:kn(lr,t)}}function HY(e,t=!1){return{queryKey:["telescope","prunes"],queryFn:()=>e.prunes(),refetchInterval:kn(lr,t)}}function qY(e,t,n=!1){return{queryKey:["telescope","pulse",t],queryFn:()=>e.pulse(t),refetchInterval:kn(lr,n)}}function VY(e,t,n,r=!1){return{queryKey:["telescope","stats",t,n],queryFn:()=>e.stats(t,n),refetchInterval:kn(lr,r)}}function GY(e,t,n=!1){return{queryKey:["telescope","ai",t],queryFn:()=>e.ai(t,{buckets:24,top:8,size:100}),refetchInterval:kn(lr*3,n)}}function KY(e,t,n=!1){return{queryKey:["telescope","queues",t],queryFn:()=>e.queues(t),refetchInterval:kn(lr,n)}}function YY(e,t,n=!1){return{queryKey:["telescope","timeseries",t],queryFn:()=>e.timeseries(t),refetchInterval:kn(lr,n)}}function XY(e,t,n,r=!1){return{queryKey:["telescope","traces",t,n],queryFn:()=>e.traces(t,n),refetchInterval:kn(lr,r)}}function WY(e,t){return{queryKey:["telescope","waterfall",t],queryFn:()=>e.waterfall(t),enabled:t!==""}}function uB(){return["telescope","live-queues"]}function JT(e,t){return["telescope","queue-counts",e,t]}function QY(e,t,n,r={}){return["telescope","queue-jobs",e,t,n,r]}function ZY(e,t,n){return["telescope","queue-job",e,t,n]}function JY(e,t=!1){return{queryKey:uB(),queryFn:()=>e.liveQueues(),refetchInterval:kn(ZT,t)}}function eX(e,t,n,r,i={},a=!1){return{queryKey:QY(t,n,r,i),queryFn:()=>e.queueJobs(t,n,r,i),refetchInterval:kn(ZT,a)}}function tX(e,t,n,r){return{queryKey:ZY(t,n,r),queryFn:()=>e.queueJob(t,n,r)}}function nX(){return["telescope","live-schedules"]}function rX(e,t=!1){return{queryKey:nX(),queryFn:()=>e.schedulesLive(),refetchInterval:kn(ZT,t)}}function cB(){return zt(JY(tt(),In()))}function iX(){return zt(rX(tt(),In()))}function aX(e,t,n,r={}){return zt(eX(tt(),e,t,n,r,In()))}function oX(e,t,n){return zt(tX(tt(),e,t,n))}function sX(){const e=tt(),t=_o();return Au({mutationFn:n=>e.queueJobAction(n.driver,n.queue,n.id,n.action),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:JT(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function fB(){const e=tt(),t=_o();return Au({mutationFn:n=>e.queueAction(n.driver,n.queue,n.action,n.state!==void 0?{state:n.state}:{}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:JT(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function lX(){const e=tt(),t=_o();return Au({mutationFn:n=>e.queueEnqueue(n.driver,n.queue,{...n.name!==void 0?{name:n.name}:{},payload:n.payload}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:uB()}),t.invalidateQueries({queryKey:JT(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function uX(){return zt(UY(tt(),In()))}function cX(){return zt(HY(tt(),In()))}function dB(){const e=tt(),t=_o();return Au({mutationFn:()=>e.prune(),onSuccess:()=>{t.invalidateQueries({queryKey:lB()}),t.invalidateQueries({queryKey:["telescope","prunes"]}),t.invalidateQueries({queryKey:["telescope","entries"]})}})}function fX(){const e=tt();return Au({mutationFn:t=>e.explain(t)})}function dX(){const e=tt();return Au({mutationFn:t=>e.diagnose(t.entryId,t.force??!1)})}function pX(e,t,n){return{queryKey:["telescope","cached-diagnosis",t],queryFn:()=>e.cachedDiagnosis(t),enabled:n}}function hX(e,t){return zt(pX(tt(),e,t))}function pB(e={}){return zt(PY(tt(),e,In()))}function mX(e){return zt($Y(tt(),e))}function Ks(){return zt(kY(tt(),In()))}function gO(e=""){const t=tt();return zt({queryKey:["telescope","tenancy",e],queryFn:()=>t.tenancy?t.tenancy(e):Promise.resolve({enabled:!1}),staleTime:3e4})}function gX(){return zt(BY(tt(),In()))}function vX(){return zt(zY(tt(),In()))}function yX(e,t,n){return zt(LY(tt(),e,t,n))}function bX(){return zt(FY(tt(),In()))}function xX(e="",t=""){return b7(IY(tt(),e,t))}function wX(e,t){return zt(VY(tt(),e,t,In()))}function hB(e){return zt(qY(tt(),e,In()))}function SX(e){return zt(GY(tt(),e,In()))}function mB(e){return zt(KY(tt(),e,In()))}function eA(e){return zt(YY(tt(),e,In()))}function OX(e,t){return zt(XY(tt(),e,t,In()))}function jX(e){return zt(WY(tt(),e))}function EX(e,t=!1){return{queryKey:["telescope","profiler-status"],queryFn:()=>e.profilerStatus(),refetchInterval:kn(lr,t)}}function TX(e,t,n=!1){return{queryKey:["telescope","profiles",t],queryFn:()=>e.profiles({first:t}),refetchInterval:kn(lr,n)}}function AX(e,t){return{queryKey:["telescope","profile",t],queryFn:()=>e.profile(t),enabled:t!==""}}function CX(){return zt(EX(tt(),In()))}function _X(e){return zt(TX(tt(),e,In()))}function NX(e){return zt(AX(tt(),e))}function RX(){const e=tt(),t=_o();return Au({mutationFn:n=>e.armProfile(n.count,n.label),onSuccess:()=>{t.invalidateQueries({queryKey:["telescope","profiler-status"]})}})}function MX(){const e=_o(),t=tt(),[n,r]=x.useState("connecting");return x.useEffect(()=>{if(typeof EventSource>"u"){r("polling");return}const i=`${t.baseUrl}/stream`,a=new EventSource(i);return a.onopen=()=>r("live"),a.onerror=()=>r("polling"),a.onmessage=o=>{try{const s=JSON.parse(o.data);if(s.heartbeat)return;s.types&&s.types.length>0&&(e.invalidateQueries({queryKey:["telescope","ext-data"]}),e.invalidateQueries({queryKey:["telescope","meta"]}))}catch{}},()=>a.close()},[e,t.baseUrl]),{status:n}}const ph=[{id:"request",label:"Requests",dot:"bg-emerald-400"},{id:"query",label:"Queries",dot:"bg-sky-400"},{id:"exception",label:"Exceptions",dot:"bg-red-400"},{id:"client_exception",label:"Client errors",dot:"bg-orange-500"},{id:"job",label:"Jobs",dot:"bg-violet-400"},{id:"durable",label:"Workflows",dot:"bg-purple-400"},{id:"mail",label:"Mail",dot:"bg-pink-400"},{id:"cache",label:"Cache",dot:"bg-teal-400"},{id:"schedule",label:"Schedule",dot:"bg-orange-400",query:{type:"job",tag:"schedule"}},{id:"http_client",label:"HTTP Client",dot:"bg-amber-400"},{id:"dump",label:"Dumps",dot:"bg-fuchsia-400"},{id:"event",label:"Events",dot:"bg-indigo-400"},{id:"log",label:"Logs",dot:"bg-zinc-400"},{id:"model",label:"Models",dot:"bg-lime-400"},{id:"redis",label:"Redis",dot:"bg-rose-400"},{id:"inertia",label:"Inertia",dot:"bg-cyan-400"},{id:"span",label:"Spans",dot:"bg-slate-400"},{id:"resilience",label:"Resilience",dot:"bg-yellow-400"},{id:"workflow",label:"Nest workflows",dot:"bg-purple-300"},{id:"auth",label:"Auth",dot:"bg-red-300"}],PX="bg-zinc-500",dx=Object.fromEntries(ph.map(e=>[e.id,e]));function px(e){var t;return((t=dx[e])==null?void 0:t.dot)??PX}function hh(e){var t;return((t=dx[e])==null?void 0:t.label)??e}function $X(e){return e in dx}function gB(e){var t;return((t=dx[e])==null?void 0:t.query)??{type:e}}const DX=new Set(["request","exception"]);function IX(e){const t=(e??[]).map(r=>({id:r.id,label:r.label,dot:r.dot})),n=new Set(ph.map(r=>r.id));return[...ph,...t.filter(r=>!n.has(r.id))]}function kX(e,t){if(t===void 0)return[...e];const n=new Set(t);return e.filter(r=>{var a;if(DX.has(r.id))return!0;const i=((a=r.query)==null?void 0:a.type)??r.id;return n.has(r.id)||n.has(i)})}function vB(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=vB(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ke(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vB(e))&&(r&&(r+=" "),r+=t);return r}const LX=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},BX=(e,t)=>({classGroupId:e,validator:t}),yB=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),py="-",$R=[],zX="arbitrary..",FX=e=>{const t=HX(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return UX(o);const s=o.split(py),l=s[0]===""&&s.length>1?1:0;return bB(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=r[o],u=n[o];return l?u?LX(u,l):l:u||$R}return n[o]||$R}}},bB=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const u=bB(e,t+1,a);if(u)return u}const o=n.validators;if(o===null)return;const s=t===0?e.join(py):e.slice(t).join(py),l=o.length;for(let u=0;u<l;u++){const f=o[u];if(f.validator(s))return f.classGroupId}},UX=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?zX+r:void 0})(),HX=e=>{const{theme:t,classGroups:n}=e;return qX(n,t)},qX=(e,t)=>{const n=yB();for(const r in e){const i=e[r];tA(i,n,r,t)}return n},tA=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];VX(o,t,n,r)}},VX=(e,t,n,r)=>{if(typeof e=="string"){GX(e,t,n);return}if(typeof e=="function"){KX(e,t,n,r);return}YX(e,t,n,r)},GX=(e,t,n)=>{const r=e===""?t:xB(t,e);r.classGroupId=n},KX=(e,t,n,r)=>{if(XX(e)){tA(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(BX(n,e))},YX=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[s,l]=i[o];tA(l,xB(t,s),n,r)}},xB=(e,t)=>{let n=e;const r=t.split(py),i=r.length;for(let a=0;a<i;a++){const o=r[a];let s=n.nextPart.get(o);s||(s=yB(),n.nextPart.set(o,s)),n=s}return n},XX=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,WX=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,o)=>{n[a]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let o=n[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return i(a,o),o},set(a,o){a in n?n[a]=o:i(a,o)}}},vO="!",DR=":",QX=[],IR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ZX=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let o=0,s=0,l=0,u;const f=i.length;for(let m=0;m<f;m++){const g=i[m];if(o===0&&s===0){if(g===DR){a.push(i.slice(l,m)),l=m+1;continue}if(g==="/"){u=m;continue}}g==="["?o++:g==="]"?o--:g==="("?s++:g===")"&&s--}const d=a.length===0?i:i.slice(l);let p=d,h=!1;d.endsWith(vO)?(p=d.slice(0,-1),h=!0):d.startsWith(vO)&&(p=d.slice(1),h=!0);const y=u&&u>l?u-l:void 0;return IR(a,h,p,y)};if(t){const i=t+DR,a=r;r=o=>o.startsWith(i)?a(o.slice(i.length)):IR(QX,!1,o,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},JX=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const o=n[a],s=o[0]==="[",l=t.has(o);s||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(o)):i.push(o)}return i.length>0&&(i.sort(),r.push(...i)),r}},eW=e=>({cache:WX(e.cacheSize),parseClassName:ZX(e),sortModifiers:JX(e),postfixLookupClassGroupIds:tW(e),...FX(e)}),tW=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},nW=/\s+/,rW=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],l=e.trim().split(nW);let u="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{isExternal:p,modifiers:h,hasImportantModifier:y,baseClassName:m,maybePostfixModifierPosition:g}=n(d);if(p){u=d+(u.length>0?" "+u:u);continue}let b=!!g,v;if(b){const E=m.substring(0,g);v=r(E);const T=v&&o[v]?r(m):void 0;T&&T!==v&&(v=T,b=!1)}else v=r(m);if(!v){if(!b){u=d+(u.length>0?" "+u:u);continue}if(v=r(m),!v){u=d+(u.length>0?" "+u:u);continue}b=!1}const w=h.length===0?"":h.length===1?h[0]:a(h).join(":"),S=y?w+vO:w,O=S+v;if(s.indexOf(O)>-1)continue;s.push(O);const j=i(v,b);for(let E=0;E<j.length;++E){const T=j[E];s.push(S+T)}u=d+(u.length>0?" "+u:u)}return u},iW=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=wB(n))&&(i&&(i+=" "),i+=r);return i},wB=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=wB(e[r]))&&(n&&(n+=" "),n+=t);return n},aW=(e,...t)=>{let n,r,i,a;const o=l=>{const u=t.reduce((f,d)=>d(f),e());return n=eW(u),r=n.cache.get,i=n.cache.set,a=s,s(l)},s=l=>{const u=r(l);if(u)return u;const f=rW(l,n);return i(l,f),f};return a=o,(...l)=>a(iW(...l))},oW=[],hn=e=>{const t=n=>n[e]||oW;return t.isThemeGetter=!0,t.themeKey=e,t},SB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sW=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,fW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qo=e=>sW.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),na=e=>!!e&&Number.isInteger(Number(e)),_w=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),Ba=e=>lW.test(e),jB=()=>!0,pW=e=>uW.test(e)&&!cW.test(e),nA=()=>!1,hW=e=>fW.test(e),mW=e=>dW.test(e),gW=e=>!ve(e)&&!be(e),vW=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),yW=e=>Ys(e,AB,nA),ve=e=>SB.test(e),cl=e=>Ys(e,CB,pW),kR=e=>Ys(e,TW,Ge),bW=e=>Ys(e,NB,jB),xW=e=>Ys(e,_B,nA),LR=e=>Ys(e,EB,nA),wW=e=>Ys(e,TB,mW),hg=e=>Ys(e,RB,hW),be=e=>OB.test(e),Kd=e=>Nu(e,CB),SW=e=>Nu(e,_B),BR=e=>Nu(e,EB),OW=e=>Nu(e,AB),jW=e=>Nu(e,TB),mg=e=>Nu(e,RB,!0),EW=e=>Nu(e,NB,!0),Ys=(e,t,n)=>{const r=SB.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nu=(e,t,n=!1)=>{const r=OB.exec(e);return r?r[1]?t(r[1]):n:!1},EB=e=>e==="position"||e==="percentage",TB=e=>e==="image"||e==="url",AB=e=>e==="length"||e==="size"||e==="bg-size",CB=e=>e==="length",TW=e=>e==="number",_B=e=>e==="family-name",NB=e=>e==="number"||e==="weight",RB=e=>e==="shadow",AW=()=>{const e=hn("color"),t=hn("font"),n=hn("text"),r=hn("font-weight"),i=hn("tracking"),a=hn("leading"),o=hn("breakpoint"),s=hn("container"),l=hn("spacing"),u=hn("radius"),f=hn("shadow"),d=hn("inset-shadow"),p=hn("text-shadow"),h=hn("drop-shadow"),y=hn("blur"),m=hn("perspective"),g=hn("aspect"),b=hn("ease"),v=hn("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...S(),be,ve],j=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],T=()=>[be,ve,l],A=()=>[qo,"full","auto",...T()],C=()=>[na,"none","subgrid",be,ve],_=()=>["auto",{span:["full",na,be,ve]},na,be,ve],$=()=>[na,"auto",be,ve],D=()=>["auto","min","max","fr",be,ve],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...T()],B=()=>[qo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],L=()=>[s,qo,"screen","full","dvw","lvw","svw","min","max","fit",...T()],k=()=>[qo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],I=()=>[e,be,ve],V=()=>[...S(),BR,LR,{position:[be,ve]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",OW,yW,{size:[be,ve]}],G=()=>[_w,Kd,cl],U=()=>["","none","full",u,be,ve],Y=()=>["",Ge,Kd,cl],X=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ge,_w,BR,LR],ee=()=>["","none",y,be,ve],J=()=>["none",Ge,be,ve],K=()=>["none",Ge,be,ve],oe=()=>[Ge,be,ve],Q=()=>[qo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ba],breakpoint:[Ba],color:[jB],container:[Ba],"drop-shadow":[Ba],ease:["in","out","in-out"],font:[gW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ba],shadow:[Ba],spacing:["px",Ge],text:[Ba],"text-shadow":[Ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qo,ve,be,g]}],container:["container"],"container-type":[{"@container":["","normal","size",be,ve]}],"container-named":[vW],columns:[{columns:[Ge,"auto",ve,be,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[na,"auto",be,ve]}],basis:[{basis:[qo,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,qo,"auto","initial","none",ve]}],grow:[{grow:["",Ge,be,ve]}],shrink:[{shrink:["",Ge,be,ve]}],order:[{order:[na,"first","last","none",be,ve]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mbs:[{mbs:R()}],mbe:[{mbe:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...k()]}],"min-block-size":[{"min-block":["auto",...k()]}],"max-block-size":[{"max-block":["none",...k()]}],w:[{w:[s,"screen",...B()]}],"min-w":[{"min-w":[s,"screen","none",...B()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh","none",...B()]}],"font-size":[{text:["base",n,Kd,cl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,EW,bW]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_w,ve]}],"font-family":[{font:[SW,xW,t]}],"font-features":[{"font-features":[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,be,ve]}],"line-clamp":[{"line-clamp":[Ge,"none",be,kR]}],leading:[{leading:["none",a,...T()]}],"list-image":[{"list-image":["none",be,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",be,cl]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ge,"auto",be,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[na,be,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},na,be,ve],radial:["",be,ve],conic:["",na,be,ve]},jW,wW]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,be,ve]}],"outline-w":[{outline:["",Ge,Kd,cl]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","inner","none",f,mg,hg]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",d,mg,hg]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ge,cl]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",p,mg,hg]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ge,be,ve]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[be,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ve]}],filter:[{filter:["","none",be,ve]}],blur:[{blur:ee()}],brightness:[{brightness:[Ge,be,ve]}],contrast:[{contrast:[Ge,be,ve]}],"drop-shadow":[{"drop-shadow":["","none",h,mg,hg]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Ge,be,ve]}],"hue-rotate":[{"hue-rotate":[Ge,be,ve]}],invert:[{invert:["",Ge,be,ve]}],saturate:[{saturate:[Ge,be,ve]}],sepia:[{sepia:["",Ge,be,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ve]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,be,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,be,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,be,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,be,ve]}],"backdrop-invert":[{"backdrop-invert":["",Ge,be,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,be,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,be,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,be,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",be,ve]}],ease:[{ease:["linear","initial",b,be,ve]}],delay:[{delay:[Ge,be,ve]}],animate:[{animate:["none",v,be,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,be,ve]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[be,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],zoom:[{zoom:[na,be,ve]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ve]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Ge,Kd,cl,kR]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},MB=aW(AW);function Gt(...e){return MB(ke(e))}const zR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,FR=ke,md=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return FR(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const f=n==null?void 0:n[u],d=a==null?void 0:a[u];if(f===null)return null;const p=zR(f)||zR(d);return i[u][p]}),s=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...h}=f;return Object.entries(h).every(y=>{let[m,g]=y;return Array.isArray(g)?g.includes({...a,...s}[m]):{...a,...s}[m]===g})?[...u,d,p]:u},[]);return FR(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},rA=md("inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium",{variants:{variant:{muted:"tint-muted",brand:"tint-brand",good:"tint-good",warn:"tint-warn",bad:"tint-bad",outline:"border-line bg-transparent text-muted-foreground"}},defaultVariants:{variant:"muted"}});function Dc({className:e,variant:t,...n}){return c.jsx("span",{className:Gt(rA({variant:t}),e),...n})}const CW=md("inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded border font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{outline:"border-line bg-transparent text-foreground hover:bg-panel-2",ghost:"border-transparent bg-transparent text-muted-foreground hover:bg-panel-2 hover:text-foreground",solid:"border-transparent bg-primary text-primary-foreground hover:opacity-90",brand:"tint-brand hover:brightness-125",good:"tint-good hover:brightness-125",warn:"tint-warn hover:brightness-125",bad:"tint-bad hover:brightness-125"},size:{xs:"px-2 py-0.5 text-[10px] uppercase tracking-wide",sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-sm"}},defaultVariants:{variant:"outline",size:"sm"}}),Tt=x.forwardRef(function({className:t,variant:n,size:r,type:i="button",...a},o){return c.jsx("button",{ref:o,type:i,className:Gt(CW({variant:n,size:r}),t),...a})});var _W=Array.isArray,zr=_W,NW=typeof Km=="object"&&Km&&Km.Object===Object&&Km,PB=NW,RW=PB,MW=typeof self=="object"&&self&&self.Object===Object&&self,PW=RW||MW||Function("return this")(),Ma=PW,$W=Ma,DW=$W.Symbol,jm=DW,UR=jm,$B=Object.prototype,IW=$B.hasOwnProperty,kW=$B.toString,Yd=UR?UR.toStringTag:void 0;function LW(e){var t=IW.call(e,Yd),n=e[Yd];try{e[Yd]=void 0;var r=!0}catch{}var i=kW.call(e);return r&&(t?e[Yd]=n:delete e[Yd]),i}var BW=LW,zW=Object.prototype,FW=zW.toString;function UW(e){return FW.call(e)}var HW=UW,HR=jm,qW=BW,VW=HW,GW="[object Null]",KW="[object Undefined]",qR=HR?HR.toStringTag:void 0;function YW(e){return e==null?e===void 0?KW:GW:qR&&qR in Object(e)?qW(e):VW(e)}var Ro=YW;function XW(e){return e!=null&&typeof e=="object"}var Mo=XW,WW=Ro,QW=Mo,ZW="[object Symbol]";function JW(e){return typeof e=="symbol"||QW(e)&&WW(e)==ZW}var gd=JW,eQ=zr,tQ=gd,nQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rQ=/^\w*$/;function iQ(e,t){if(eQ(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||tQ(e)?!0:rQ.test(e)||!nQ.test(e)||t!=null&&e in Object(t)}var iA=iQ;function aQ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Xs=aQ;const vd=vt(Xs);var oQ=Ro,sQ=Xs,lQ="[object AsyncFunction]",uQ="[object Function]",cQ="[object GeneratorFunction]",fQ="[object Proxy]";function dQ(e){if(!sQ(e))return!1;var t=oQ(e);return t==uQ||t==cQ||t==lQ||t==fQ}var aA=dQ;const Ce=vt(aA);var pQ=Ma,hQ=pQ["__core-js_shared__"],mQ=hQ,Nw=mQ,VR=function(){var e=/[^.]+$/.exec(Nw&&Nw.keys&&Nw.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gQ(e){return!!VR&&VR in e}var vQ=gQ,yQ=Function.prototype,bQ=yQ.toString;function xQ(e){if(e!=null){try{return bQ.call(e)}catch{}try{return e+""}catch{}}return""}var DB=xQ,wQ=aA,SQ=vQ,OQ=Xs,jQ=DB,EQ=/[\\^$.*+?()[\]{}|]/g,TQ=/^\[object .+?Constructor\]$/,AQ=Function.prototype,CQ=Object.prototype,_Q=AQ.toString,NQ=CQ.hasOwnProperty,RQ=RegExp("^"+_Q.call(NQ).replace(EQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MQ(e){if(!OQ(e)||SQ(e))return!1;var t=wQ(e)?RQ:TQ;return t.test(jQ(e))}var PQ=MQ;function $Q(e,t){return e==null?void 0:e[t]}var DQ=$Q,IQ=PQ,kQ=DQ;function LQ(e,t){var n=kQ(e,t);return IQ(n)?n:void 0}var Ru=LQ,BQ=Ru,zQ=BQ(Object,"create"),hx=zQ,GR=hx;function FQ(){this.__data__=GR?GR(null):{},this.size=0}var UQ=FQ;function HQ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var qQ=HQ,VQ=hx,GQ="__lodash_hash_undefined__",KQ=Object.prototype,YQ=KQ.hasOwnProperty;function XQ(e){var t=this.__data__;if(VQ){var n=t[e];return n===GQ?void 0:n}return YQ.call(t,e)?t[e]:void 0}var WQ=XQ,QQ=hx,ZQ=Object.prototype,JQ=ZQ.hasOwnProperty;function eZ(e){var t=this.__data__;return QQ?t[e]!==void 0:JQ.call(t,e)}var tZ=eZ,nZ=hx,rZ="__lodash_hash_undefined__";function iZ(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nZ&&t===void 0?rZ:t,this}var aZ=iZ,oZ=UQ,sZ=qQ,lZ=WQ,uZ=tZ,cZ=aZ;function yd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yd.prototype.clear=oZ;yd.prototype.delete=sZ;yd.prototype.get=lZ;yd.prototype.has=uZ;yd.prototype.set=cZ;var fZ=yd;function dZ(){this.__data__=[],this.size=0}var pZ=dZ;function hZ(e,t){return e===t||e!==e&&t!==t}var oA=hZ,mZ=oA;function gZ(e,t){for(var n=e.length;n--;)if(mZ(e[n][0],t))return n;return-1}var mx=gZ,vZ=mx,yZ=Array.prototype,bZ=yZ.splice;function xZ(e){var t=this.__data__,n=vZ(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():bZ.call(t,n,1),--this.size,!0}var wZ=xZ,SZ=mx;function OZ(e){var t=this.__data__,n=SZ(t,e);return n<0?void 0:t[n][1]}var jZ=OZ,EZ=mx;function TZ(e){return EZ(this.__data__,e)>-1}var AZ=TZ,CZ=mx;function _Z(e,t){var n=this.__data__,r=CZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var NZ=_Z,RZ=pZ,MZ=wZ,PZ=jZ,$Z=AZ,DZ=NZ;function bd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bd.prototype.clear=RZ;bd.prototype.delete=MZ;bd.prototype.get=PZ;bd.prototype.has=$Z;bd.prototype.set=DZ;var gx=bd,IZ=Ru,kZ=Ma,LZ=IZ(kZ,"Map"),sA=LZ,KR=fZ,BZ=gx,zZ=sA;function FZ(){this.size=0,this.__data__={hash:new KR,map:new(zZ||BZ),string:new KR}}var UZ=FZ;function HZ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var qZ=HZ,VZ=qZ;function GZ(e,t){var n=e.__data__;return VZ(t)?n[typeof t=="string"?"string":"hash"]:n.map}var vx=GZ,KZ=vx;function YZ(e){var t=KZ(this,e).delete(e);return this.size-=t?1:0,t}var XZ=YZ,WZ=vx;function QZ(e){return WZ(this,e).get(e)}var ZZ=QZ,JZ=vx;function eJ(e){return JZ(this,e).has(e)}var tJ=eJ,nJ=vx;function rJ(e,t){var n=nJ(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var iJ=rJ,aJ=UZ,oJ=XZ,sJ=ZZ,lJ=tJ,uJ=iJ;function xd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xd.prototype.clear=aJ;xd.prototype.delete=oJ;xd.prototype.get=sJ;xd.prototype.has=lJ;xd.prototype.set=uJ;var lA=xd,IB=lA,cJ="Expected a function";function uA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(cJ);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(uA.Cache||IB),n}uA.Cache=IB;var kB=uA;const fJ=vt(kB);var dJ=kB,pJ=500;function hJ(e){var t=dJ(e,function(r){return n.size===pJ&&n.clear(),r}),n=t.cache;return t}var mJ=hJ,gJ=mJ,vJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yJ=/\\(\\)?/g,bJ=gJ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(vJ,function(n,r,i,a){t.push(i?a.replace(yJ,"$1"):r||n)}),t}),xJ=bJ;function wJ(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var cA=wJ,YR=jm,SJ=cA,OJ=zr,jJ=gd,XR=YR?YR.prototype:void 0,WR=XR?XR.toString:void 0;function LB(e){if(typeof e=="string")return e;if(OJ(e))return SJ(e,LB)+"";if(jJ(e))return WR?WR.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var EJ=LB,TJ=EJ;function AJ(e){return e==null?"":TJ(e)}var BB=AJ,CJ=zr,_J=iA,NJ=xJ,RJ=BB;function MJ(e,t){return CJ(e)?e:_J(e,t)?[e]:NJ(RJ(e))}var zB=MJ,PJ=gd;function $J(e){if(typeof e=="string"||PJ(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var yx=$J,DJ=zB,IJ=yx;function kJ(e,t){t=DJ(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[IJ(t[n++])];return n&&n==r?e:void 0}var fA=kJ,LJ=fA;function BJ(e,t,n){var r=e==null?void 0:LJ(e,t);return r===void 0?n:r}var FB=BJ;const ti=vt(FB);function zJ(e){return e==null}var FJ=zJ;const Ue=vt(FJ);var UJ=Ro,HJ=zr,qJ=Mo,VJ="[object String]";function GJ(e){return typeof e=="string"||!HJ(e)&&qJ(e)&&UJ(e)==VJ}var KJ=GJ;const su=vt(KJ);var UB={exports:{}},wt={};/**
|
|
77
|
+
* @license React
|
|
78
|
+
* react-is.production.min.js
|
|
79
|
+
*
|
|
80
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the MIT license found in the
|
|
83
|
+
* LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/var dA=Symbol.for("react.element"),pA=Symbol.for("react.portal"),bx=Symbol.for("react.fragment"),xx=Symbol.for("react.strict_mode"),wx=Symbol.for("react.profiler"),Sx=Symbol.for("react.provider"),Ox=Symbol.for("react.context"),YJ=Symbol.for("react.server_context"),jx=Symbol.for("react.forward_ref"),Ex=Symbol.for("react.suspense"),Tx=Symbol.for("react.suspense_list"),Ax=Symbol.for("react.memo"),Cx=Symbol.for("react.lazy"),XJ=Symbol.for("react.offscreen"),HB;HB=Symbol.for("react.module.reference");function Ri(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case dA:switch(e=e.type,e){case bx:case wx:case xx:case Ex:case Tx:return e;default:switch(e=e&&e.$$typeof,e){case YJ:case Ox:case jx:case Cx:case Ax:case Sx:return e;default:return t}}case pA:return t}}}wt.ContextConsumer=Ox;wt.ContextProvider=Sx;wt.Element=dA;wt.ForwardRef=jx;wt.Fragment=bx;wt.Lazy=Cx;wt.Memo=Ax;wt.Portal=pA;wt.Profiler=wx;wt.StrictMode=xx;wt.Suspense=Ex;wt.SuspenseList=Tx;wt.isAsyncMode=function(){return!1};wt.isConcurrentMode=function(){return!1};wt.isContextConsumer=function(e){return Ri(e)===Ox};wt.isContextProvider=function(e){return Ri(e)===Sx};wt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===dA};wt.isForwardRef=function(e){return Ri(e)===jx};wt.isFragment=function(e){return Ri(e)===bx};wt.isLazy=function(e){return Ri(e)===Cx};wt.isMemo=function(e){return Ri(e)===Ax};wt.isPortal=function(e){return Ri(e)===pA};wt.isProfiler=function(e){return Ri(e)===wx};wt.isStrictMode=function(e){return Ri(e)===xx};wt.isSuspense=function(e){return Ri(e)===Ex};wt.isSuspenseList=function(e){return Ri(e)===Tx};wt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bx||e===wx||e===xx||e===Ex||e===Tx||e===XJ||typeof e=="object"&&e!==null&&(e.$$typeof===Cx||e.$$typeof===Ax||e.$$typeof===Sx||e.$$typeof===Ox||e.$$typeof===jx||e.$$typeof===HB||e.getModuleId!==void 0)};wt.typeOf=Ri;UB.exports=wt;var WJ=UB.exports,QJ=Ro,ZJ=Mo,JJ="[object Number]";function eee(e){return typeof e=="number"||ZJ(e)&&QJ(e)==JJ}var qB=eee;const tee=vt(qB);var nee=qB;function ree(e){return nee(e)&&e!=+e}var iee=ree;const wd=vt(iee);var Pn=function(t){return t===0?0:t>0?1:-1},El=function(t){return su(t)&&t.indexOf("%")===t.length-1},se=function(t){return tee(t)&&!wd(t)},aee=function(t){return Ue(t)},Sn=function(t){return se(t)||su(t)},oee=0,Sd=function(t){var n=++oee;return"".concat(t||"").concat(n)},wr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!se(t)&&!su(t))return r;var a;if(El(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return wd(a)&&(a=r),i&&a>n&&(a=n),a},es=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},see=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Un=function(t,n){return se(t)&&se(n)?function(r){return t+r*(n-t)}:function(){return n}};function hy(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ti(r,t))===n})}var lee=function(t,n){return se(t)&&se(n)?t-n:su(t)&&su(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Ic(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function yO(e){"@babel/helpers - typeof";return yO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yO(e)}var uee=["viewBox","children"],cee=["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"],QR=["points","pathLength"],Rw={svg:uee,polygon:QR,polyline:QR},hA=["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"],my=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(x.isValidElement(t)&&(r=t.props),!vd(r))return null;var i={};return Object.keys(r).forEach(function(a){hA.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},fee=function(t,n,r){return function(i){return t(n,r,i),null}},yo=function(t,n,r){if(!vd(t)||yO(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];hA.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=fee(o,n,r))}),i},dee=["children"],pee=["children"];function ZR(e,t){if(e==null)return{};var n=hee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bO(e){"@babel/helpers - typeof";return bO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bO(e)}var JR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},io=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},eM=null,Mw=null,mA=function e(t){if(t===eM&&Array.isArray(Mw))return Mw;var n=[];return x.Children.forEach(t,function(r){Ue(r)||(WJ.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Mw=n,eM=t,n};function ni(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return io(i)}):r=[io(t)],mA(e).forEach(function(i){var a=ti(i,"type.displayName")||ti(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function qr(e,t){var n=ni(e,t);return n&&n[0]}var tM=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!se(r)||r<=0||!se(i)||i<=0)},mee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],gee=function(t){return t&&t.type&&su(t.type)&&mee.indexOf(t.type)>=0},vee=function(t){return t&&bO(t)==="object"&&"clipDot"in t},yee=function(t,n,r,i){var a,o=(a=Rw==null?void 0:Rw[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!Ce(t)&&(i&&o.includes(n)||cee.includes(n))||r&&hA.includes(n)},Ae=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(x.isValidElement(t)&&(i=t.props),!vd(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;yee((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},xO=function e(t,n){if(t===n)return!0;var r=x.Children.count(t);if(r!==x.Children.count(n))return!1;if(r===0)return!0;if(r===1)return nM(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!nM(a,o))return!1}return!0},nM=function(t,n){if(Ue(t)&&Ue(n))return!0;if(!Ue(t)&&!Ue(n)){var r=t.props||{},i=r.children,a=ZR(r,dee),o=n.props||{},s=o.children,l=ZR(o,pee);return i&&s?Ic(a,l)&&xO(i,s):!i&&!s?Ic(a,l):!1}return!1},rM=function(t,n){var r=[],i={};return mA(t).forEach(function(a,o){if(gee(a))r.push(a);else if(a){var s=io(a.type),l=n[s]||{},u=l.handler,f=l.once;if(u&&(!f||!i[s])){var d=u(a,s,o);r.push(d),i[s]=!0}}}),r},bee=function(t){var n=t&&t.type;return n&&JR[n]?JR[n]:null},xee=function(t,n){return mA(n).indexOf(t)},wee=["children","width","height","viewBox","className","style","title","desc"];function wO(){return wO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wO.apply(this,arguments)}function See(e,t){if(e==null)return{};var n=Oee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function SO(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=See(e,wee),f=i||{width:n,height:r,x:0,y:0},d=ke("recharts-surface",a);return z.createElement("svg",wO({},Ae(u,!0,"svg"),{className:d,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),z.createElement("title",null,s),z.createElement("desc",null,l),t)}var jee=["children","className"];function OO(){return OO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OO.apply(this,arguments)}function Eee(e,t){if(e==null)return{};var n=Tee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ye=z.forwardRef(function(e,t){var n=e.children,r=e.className,i=Eee(e,jee),a=ke("recharts-layer",r);return z.createElement("g",OO({className:a},Ae(i,!0),{ref:t}),n)}),Hi=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]};function Aee(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var Cee=Aee,_ee=Cee;function Nee(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:_ee(e,t,n)}var Ree=Nee,Mee="\\ud800-\\udfff",Pee="\\u0300-\\u036f",$ee="\\ufe20-\\ufe2f",Dee="\\u20d0-\\u20ff",Iee=Pee+$ee+Dee,kee="\\ufe0e\\ufe0f",Lee="\\u200d",Bee=RegExp("["+Lee+Mee+Iee+kee+"]");function zee(e){return Bee.test(e)}var VB=zee;function Fee(e){return e.split("")}var Uee=Fee,GB="\\ud800-\\udfff",Hee="\\u0300-\\u036f",qee="\\ufe20-\\ufe2f",Vee="\\u20d0-\\u20ff",Gee=Hee+qee+Vee,Kee="\\ufe0e\\ufe0f",Yee="["+GB+"]",jO="["+Gee+"]",EO="\\ud83c[\\udffb-\\udfff]",Xee="(?:"+jO+"|"+EO+")",KB="[^"+GB+"]",YB="(?:\\ud83c[\\udde6-\\uddff]){2}",XB="[\\ud800-\\udbff][\\udc00-\\udfff]",Wee="\\u200d",WB=Xee+"?",QB="["+Kee+"]?",Qee="(?:"+Wee+"(?:"+[KB,YB,XB].join("|")+")"+QB+WB+")*",Zee=QB+WB+Qee,Jee="(?:"+[KB+jO+"?",jO,YB,XB,Yee].join("|")+")",ete=RegExp(EO+"(?="+EO+")|"+Jee+Zee,"g");function tte(e){return e.match(ete)||[]}var nte=tte,rte=Uee,ite=VB,ate=nte;function ote(e){return ite(e)?ate(e):rte(e)}var ste=ote,lte=Ree,ute=VB,cte=ste,fte=BB;function dte(e){return function(t){t=fte(t);var n=ute(t)?cte(t):void 0,r=n?n[0]:t.charAt(0),i=n?lte(n,1).join(""):t.slice(1);return r[e]()+i}}var pte=dte,hte=pte,mte=hte("toUpperCase"),gte=mte;const _x=vt(gte);function $t(e){return function(){return e}}const ZB=Math.cos,gy=Math.sin,Wi=Math.sqrt,vy=Math.PI,Nx=2*vy,TO=Math.PI,AO=2*TO,yl=1e-6,vte=AO-yl;function JB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function yte(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return JB;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class bte{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?JB:yte(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,u=i-n,f=o-t,d=s-n,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>yl)if(!(Math.abs(d*l-u*f)>yl)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,y=i-s,m=l*l+u*u,g=h*h+y*y,b=Math.sqrt(m),v=Math.sqrt(p),w=a*Math.tan((TO-Math.acos((m+p-g)/(2*b*v)))/2),S=w/v,O=w/b;Math.abs(S-1)>yl&&this._append`L${t+S*f},${n+S*d}`,this._append`A${a},${a},0,0,${+(d*h>f*y)},${this._x1=t+O*l},${this._y1=n+O*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,f=n+l,d=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>yl||Math.abs(this._y1-f)>yl)&&this._append`L${u},${f}`,r&&(p<0&&(p=p%AO+AO),p>vte?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:p>yl&&this._append`A${r},${r},0,${+(p>=TO)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function gA(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new bte(t)}function vA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ez(e){this._context=e}ez.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 Rx(e){return new ez(e)}function tz(e){return e[0]}function nz(e){return e[1]}function rz(e,t){var n=$t(!0),r=null,i=Rx,a=null,o=gA(s);e=typeof e=="function"?e:e===void 0?tz:$t(e),t=typeof t=="function"?t:t===void 0?nz:$t(t);function s(l){var u,f=(l=vA(l)).length,d,p=!1,h;for(r==null&&(a=i(h=o())),u=0;u<=f;++u)!(u<f&&n(d=l[u],u,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(d,u,l),+t(d,u,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:$t(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:$t(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:$t(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function gg(e,t,n){var r=null,i=$t(!0),a=null,o=Rx,s=null,l=gA(u);e=typeof e=="function"?e:e===void 0?tz:$t(+e),t=typeof t=="function"?t:$t(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?nz:$t(+n);function u(d){var p,h,y,m=(d=vA(d)).length,g,b=!1,v,w=new Array(m),S=new Array(m);for(a==null&&(s=o(v=l())),p=0;p<=m;++p){if(!(p<m&&i(g=d[p],p,d))===b)if(b=!b)h=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=p-1;y>=h;--y)s.point(w[y],S[y]);s.lineEnd(),s.areaEnd()}b&&(w[p]=+e(g,p,d),S[p]=+t(g,p,d),s.point(r?+r(g,p,d):w[p],n?+n(g,p,d):S[p]))}if(v)return s=null,v+""||null}function f(){return rz().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:$t(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:$t(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:$t(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:$t(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:$t(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:$t(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:$t(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),u):a},u}class iz{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function xte(e){return new iz(e,!0)}function wte(e){return new iz(e,!1)}const yA={draw(e,t){const n=Wi(t/vy);e.moveTo(n,0),e.arc(0,0,n,0,Nx)}},Ste={draw(e,t){const n=Wi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},az=Wi(1/3),Ote=az*2,jte={draw(e,t){const n=Wi(t/Ote),r=n*az;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Ete={draw(e,t){const n=Wi(t),r=-n/2;e.rect(r,r,n,n)}},Tte=.8908130915292852,oz=gy(vy/10)/gy(7*vy/10),Ate=gy(Nx/10)*oz,Cte=-ZB(Nx/10)*oz,_te={draw(e,t){const n=Wi(t*Tte),r=Ate*n,i=Cte*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=Nx*a/5,s=ZB(o),l=gy(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Pw=Wi(3),Nte={draw(e,t){const n=-Wi(t/(Pw*3));e.moveTo(0,n*2),e.lineTo(-Pw*n,-n),e.lineTo(Pw*n,-n),e.closePath()}},ci=-.5,fi=Wi(3)/2,CO=1/Wi(12),Rte=(CO/2+1)*3,Mte={draw(e,t){const n=Wi(t/Rte),r=n/2,i=n*CO,a=r,o=n*CO+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(ci*r-fi*i,fi*r+ci*i),e.lineTo(ci*a-fi*o,fi*a+ci*o),e.lineTo(ci*s-fi*l,fi*s+ci*l),e.lineTo(ci*r+fi*i,ci*i-fi*r),e.lineTo(ci*a+fi*o,ci*o-fi*a),e.lineTo(ci*s+fi*l,ci*l-fi*s),e.closePath()}};function Pte(e,t){let n=null,r=gA(i);e=typeof e=="function"?e:$t(e||yA),t=typeof t=="function"?t:$t(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:$t(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:$t(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function yy(){}function by(e,t,n){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+n)/6)}function sz(e){this._context=e}sz.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:by(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:by(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $te(e){return new sz(e)}function lz(e){this._context=e}lz.prototype={areaStart:yy,areaEnd:yy,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:by(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dte(e){return new lz(e)}function uz(e){this._context=e}uz.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:by(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ite(e){return new uz(e)}function cz(e){this._context=e}cz.prototype={areaStart:yy,areaEnd:yy,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 kte(e){return new cz(e)}function iM(e){return e<0?-1:1}function aM(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(iM(a)+iM(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function oM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function $w(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function xy(e){this._context=e}xy.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:$w(this,this._t0,oM(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 n=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,$w(this,oM(this,n=aM(this,e,t)),n);break;default:$w(this,this._t0,n=aM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function fz(e){this._context=new dz(e)}(fz.prototype=Object.create(xy.prototype)).point=function(e,t){xy.prototype.point.call(this,t,e)};function dz(e){this._context=e}dz.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,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Lte(e){return new xy(e)}function Bte(e){return new fz(e)}function pz(e){this._context=e}pz.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=sM(e),i=sM(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===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 sM(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function zte(e){return new pz(e)}function Mx(e,t){this._context=e,this._t=t}Mx.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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Fte(e){return new Mx(e,.5)}function Ute(e){return new Mx(e,0)}function Hte(e){return new Mx(e,1)}function jf(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function _O(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function qte(e,t){return e[t]}function Vte(e){const t=[];return t.key=e,t}function Gte(){var e=$t([]),t=_O,n=jf,r=qte;function i(a){var o=Array.from(e.apply(this,arguments),Vte),s,l=o.length,u=-1,f;for(const d of a)for(s=0,++u;s<l;++s)(o[s][u]=[0,+r(d,o[s].key,u,a)]).data=d;for(s=0,f=vA(t(o));s<l;++s)o[f[s]].index=s;return n(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:$t(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:$t(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?_O:typeof a=="function"?a:$t(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??jf,i):n},i}function Kte(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}jf(e,t)}}function Yte(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}jf(e,t)}}function Xte(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,l=0,u=0;s<o;++s){for(var f=e[t[s]],d=f[r][1]||0,p=f[r-1][1]||0,h=(d-p)/2,y=0;y<s;++y){var m=e[t[y]],g=m[r][1]||0,b=m[r-1][1]||0;h+=g-b}l+=d,u+=h*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,jf(e,t)}}function mh(e){"@babel/helpers - typeof";return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}var Wte=["type","size","sizeType"];function NO(){return NO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NO.apply(this,arguments)}function lM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lM(Object(n),!0).forEach(function(r){Qte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qte(e,t,n){return t=Zte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zte(e){var t=Jte(e,"string");return mh(t)=="symbol"?t:t+""}function Jte(e,t){if(mh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ene(e,t){if(e==null)return{};var n=tne(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var hz={symbolCircle:yA,symbolCross:Ste,symbolDiamond:jte,symbolSquare:Ete,symbolStar:_te,symbolTriangle:Nte,symbolWye:Mte},nne=Math.PI/180,rne=function(t){var n="symbol".concat(_x(t));return hz[n]||yA},ine=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*nne;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ane=function(t,n){hz["symbol".concat(_x(t))]=n},bA=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=ene(t,Wte),u=uM(uM({},l),{},{type:r,size:a,sizeType:s}),f=function(){var g=rne(r),b=Pte().type(g).size(ine(a,s,r));return b()},d=u.className,p=u.cx,h=u.cy,y=Ae(u,!0);return p===+p&&h===+h&&a===+a?z.createElement("path",NO({},y,{className:ke("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(h,")"),d:f()})):null};bA.registerSymbol=ane;function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function RO(){return RO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RO.apply(this,arguments)}function cM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function one(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cM(Object(n),!0).forEach(function(r){gh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gz(r.key),r)}}function une(e,t,n){return t&&lne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cne(e,t,n){return t=wy(t),fne(e,mz()?Reflect.construct(t,n||[],wy(e).constructor):t.apply(e,n))}function fne(e,t){if(t&&(Ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dne(e)}function dne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mz=function(){return!!e})()}function wy(e){return wy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wy(e)}function pne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MO(e,t)}function MO(e,t){return MO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},MO(e,t)}function gh(e,t,n){return t=gz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gz(e){var t=hne(e,"string");return Ef(t)=="symbol"?t:t+""}function hne(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var di=32,xA=function(e){function t(){return sne(this,t),cne(this,t,arguments)}return pne(t,e),une(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=di/2,o=di/6,s=di/3,l=r.inactive?i:r.color;if(r.type==="plainline")return z.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:di,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return z.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
|
|
85
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
|
|
86
|
+
H`).concat(di,"M").concat(2*s,",").concat(a,`
|
|
87
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return z.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(di/8,"h").concat(di,"v").concat(di*3/4,"h").concat(-di,"z"),className:"recharts-legend-icon"});if(z.isValidElement(r.legendIcon)){var u=one({},r);return delete u.legendIcon,z.cloneElement(r.legendIcon,u)}return z.createElement(bA,{fill:l,cx:a,cy:a,size:di,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,l=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:di,height:di},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,y){var m=h.formatter||l,g=ke(gh(gh({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var b=Ce(h.value)?null:h.value;Hi(!Ce(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var v=h.inactive?u:h.color;return z.createElement("li",RO({className:g,style:d,key:"legend-item-".concat(y)},yo(r.props,h,y)),z.createElement(SO,{width:o,height:o,viewBox:f,style:p},r.renderIcon(h)),z.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},m?m(b,h,y):b))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return z.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(x.PureComponent);gh(xA,"displayName","Legend");gh(xA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var mne=gx;function gne(){this.__data__=new mne,this.size=0}var vne=gne;function yne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var bne=yne;function xne(e){return this.__data__.get(e)}var wne=xne;function Sne(e){return this.__data__.has(e)}var One=Sne,jne=gx,Ene=sA,Tne=lA,Ane=200;function Cne(e,t){var n=this.__data__;if(n instanceof jne){var r=n.__data__;if(!Ene||r.length<Ane-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Tne(r)}return n.set(e,t),this.size=n.size,this}var _ne=Cne,Nne=gx,Rne=vne,Mne=bne,Pne=wne,$ne=One,Dne=_ne;function Od(e){var t=this.__data__=new Nne(e);this.size=t.size}Od.prototype.clear=Rne;Od.prototype.delete=Mne;Od.prototype.get=Pne;Od.prototype.has=$ne;Od.prototype.set=Dne;var vz=Od,Ine="__lodash_hash_undefined__";function kne(e){return this.__data__.set(e,Ine),this}var Lne=kne;function Bne(e){return this.__data__.has(e)}var zne=Bne,Fne=lA,Une=Lne,Hne=zne;function Sy(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Fne;++t<n;)this.add(e[t])}Sy.prototype.add=Sy.prototype.push=Une;Sy.prototype.has=Hne;var yz=Sy;function qne(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bz=qne;function Vne(e,t){return e.has(t)}var xz=Vne,Gne=yz,Kne=bz,Yne=xz,Xne=1,Wne=2;function Qne(e,t,n,r,i,a){var o=n&Xne,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,h=n&Wne?new Gne:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var y=e[d],m=t[d];if(r)var g=o?r(m,y,d,t,e,a):r(y,m,d,e,t,a);if(g!==void 0){if(g)continue;p=!1;break}if(h){if(!Kne(t,function(b,v){if(!Yne(h,v)&&(y===b||i(y,b,n,r,a)))return h.push(v)})){p=!1;break}}else if(!(y===m||i(y,m,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}var wz=Qne,Zne=Ma,Jne=Zne.Uint8Array,ere=Jne;function tre(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var nre=tre;function rre(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var wA=rre,fM=jm,dM=ere,ire=oA,are=wz,ore=nre,sre=wA,lre=1,ure=2,cre="[object Boolean]",fre="[object Date]",dre="[object Error]",pre="[object Map]",hre="[object Number]",mre="[object RegExp]",gre="[object Set]",vre="[object String]",yre="[object Symbol]",bre="[object ArrayBuffer]",xre="[object DataView]",pM=fM?fM.prototype:void 0,Dw=pM?pM.valueOf:void 0;function wre(e,t,n,r,i,a,o){switch(n){case xre:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case bre:return!(e.byteLength!=t.byteLength||!a(new dM(e),new dM(t)));case cre:case fre:case hre:return ire(+e,+t);case dre:return e.name==t.name&&e.message==t.message;case mre:case vre:return e==t+"";case pre:var s=ore;case gre:var l=r&lre;if(s||(s=sre),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=ure,o.set(e,t);var f=are(s(e),s(t),r,i,a,o);return o.delete(e),f;case yre:if(Dw)return Dw.call(e)==Dw.call(t)}return!1}var Sre=wre;function Ore(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Sz=Ore,jre=Sz,Ere=zr;function Tre(e,t,n){var r=t(e);return Ere(e)?r:jre(r,n(e))}var Are=Tre;function Cre(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var _re=Cre;function Nre(){return[]}var Rre=Nre,Mre=_re,Pre=Rre,$re=Object.prototype,Dre=$re.propertyIsEnumerable,hM=Object.getOwnPropertySymbols,Ire=hM?function(e){return e==null?[]:(e=Object(e),Mre(hM(e),function(t){return Dre.call(e,t)}))}:Pre,kre=Ire;function Lre(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Bre=Lre,zre=Ro,Fre=Mo,Ure="[object Arguments]";function Hre(e){return Fre(e)&&zre(e)==Ure}var qre=Hre,mM=qre,Vre=Mo,Oz=Object.prototype,Gre=Oz.hasOwnProperty,Kre=Oz.propertyIsEnumerable,Yre=mM(function(){return arguments}())?mM:function(e){return Vre(e)&&Gre.call(e,"callee")&&!Kre.call(e,"callee")},SA=Yre,Oy={exports:{}};function Xre(){return!1}var Wre=Xre;Oy.exports;(function(e,t){var n=Ma,r=Wre,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u})(Oy,Oy.exports);var jz=Oy.exports,Qre=9007199254740991,Zre=/^(?:0|[1-9]\d*)$/;function Jre(e,t){var n=typeof e;return t=t??Qre,!!t&&(n=="number"||n!="symbol"&&Zre.test(e))&&e>-1&&e%1==0&&e<t}var OA=Jre,eie=9007199254740991;function tie(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=eie}var jA=tie,nie=Ro,rie=jA,iie=Mo,aie="[object Arguments]",oie="[object Array]",sie="[object Boolean]",lie="[object Date]",uie="[object Error]",cie="[object Function]",fie="[object Map]",die="[object Number]",pie="[object Object]",hie="[object RegExp]",mie="[object Set]",gie="[object String]",vie="[object WeakMap]",yie="[object ArrayBuffer]",bie="[object DataView]",xie="[object Float32Array]",wie="[object Float64Array]",Sie="[object Int8Array]",Oie="[object Int16Array]",jie="[object Int32Array]",Eie="[object Uint8Array]",Tie="[object Uint8ClampedArray]",Aie="[object Uint16Array]",Cie="[object Uint32Array]",Lt={};Lt[xie]=Lt[wie]=Lt[Sie]=Lt[Oie]=Lt[jie]=Lt[Eie]=Lt[Tie]=Lt[Aie]=Lt[Cie]=!0;Lt[aie]=Lt[oie]=Lt[yie]=Lt[sie]=Lt[bie]=Lt[lie]=Lt[uie]=Lt[cie]=Lt[fie]=Lt[die]=Lt[pie]=Lt[hie]=Lt[mie]=Lt[gie]=Lt[vie]=!1;function _ie(e){return iie(e)&&rie(e.length)&&!!Lt[nie(e)]}var Nie=_ie;function Rie(e){return function(t){return e(t)}}var Ez=Rie,jy={exports:{}};jy.exports;(function(e,t){var n=PB,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(jy,jy.exports);var Mie=jy.exports,Pie=Nie,$ie=Ez,gM=Mie,vM=gM&&gM.isTypedArray,Die=vM?$ie(vM):Pie,Tz=Die,Iie=Bre,kie=SA,Lie=zr,Bie=jz,zie=OA,Fie=Tz,Uie=Object.prototype,Hie=Uie.hasOwnProperty;function qie(e,t){var n=Lie(e),r=!n&&kie(e),i=!n&&!r&&Bie(e),a=!n&&!r&&!i&&Fie(e),o=n||r||i||a,s=o?Iie(e.length,String):[],l=s.length;for(var u in e)(t||Hie.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||zie(u,l)))&&s.push(u);return s}var Vie=qie,Gie=Object.prototype;function Kie(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Gie;return e===n}var Yie=Kie;function Xie(e,t){return function(n){return e(t(n))}}var Az=Xie,Wie=Az,Qie=Wie(Object.keys,Object),Zie=Qie,Jie=Yie,eae=Zie,tae=Object.prototype,nae=tae.hasOwnProperty;function rae(e){if(!Jie(e))return eae(e);var t=[];for(var n in Object(e))nae.call(e,n)&&n!="constructor"&&t.push(n);return t}var iae=rae,aae=aA,oae=jA;function sae(e){return e!=null&&oae(e.length)&&!aae(e)}var Em=sae,lae=Vie,uae=iae,cae=Em;function fae(e){return cae(e)?lae(e):uae(e)}var Px=fae,dae=Are,pae=kre,hae=Px;function mae(e){return dae(e,hae,pae)}var gae=mae,yM=gae,vae=1,yae=Object.prototype,bae=yae.hasOwnProperty;function xae(e,t,n,r,i,a){var o=n&vae,s=yM(e),l=s.length,u=yM(t),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=s[d];if(!(o?p in t:bae.call(t,p)))return!1}var h=a.get(e),y=a.get(t);if(h&&y)return h==t&&y==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=o;++d<l;){p=s[d];var b=e[p],v=t[p];if(r)var w=o?r(v,b,p,t,e,a):r(b,v,p,e,t,a);if(!(w===void 0?b===v||i(b,v,n,r,a):w)){m=!1;break}g||(g=p=="constructor")}if(m&&!g){var S=e.constructor,O=t.constructor;S!=O&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof O=="function"&&O instanceof O)&&(m=!1)}return a.delete(e),a.delete(t),m}var wae=xae,Sae=Ru,Oae=Ma,jae=Sae(Oae,"DataView"),Eae=jae,Tae=Ru,Aae=Ma,Cae=Tae(Aae,"Promise"),_ae=Cae,Nae=Ru,Rae=Ma,Mae=Nae(Rae,"Set"),Cz=Mae,Pae=Ru,$ae=Ma,Dae=Pae($ae,"WeakMap"),Iae=Dae,PO=Eae,$O=sA,DO=_ae,IO=Cz,kO=Iae,_z=Ro,jd=DB,bM="[object Map]",kae="[object Object]",xM="[object Promise]",wM="[object Set]",SM="[object WeakMap]",OM="[object DataView]",Lae=jd(PO),Bae=jd($O),zae=jd(DO),Fae=jd(IO),Uae=jd(kO),bl=_z;(PO&&bl(new PO(new ArrayBuffer(1)))!=OM||$O&&bl(new $O)!=bM||DO&&bl(DO.resolve())!=xM||IO&&bl(new IO)!=wM||kO&&bl(new kO)!=SM)&&(bl=function(e){var t=_z(e),n=t==kae?e.constructor:void 0,r=n?jd(n):"";if(r)switch(r){case Lae:return OM;case Bae:return bM;case zae:return xM;case Fae:return wM;case Uae:return SM}return t});var Hae=bl,Iw=vz,qae=wz,Vae=Sre,Gae=wae,jM=Hae,EM=zr,TM=jz,Kae=Tz,Yae=1,AM="[object Arguments]",CM="[object Array]",vg="[object Object]",Xae=Object.prototype,_M=Xae.hasOwnProperty;function Wae(e,t,n,r,i,a){var o=EM(e),s=EM(t),l=o?CM:jM(e),u=s?CM:jM(t);l=l==AM?vg:l,u=u==AM?vg:u;var f=l==vg,d=u==vg,p=l==u;if(p&&TM(e)){if(!TM(t))return!1;o=!0,f=!1}if(p&&!f)return a||(a=new Iw),o||Kae(e)?qae(e,t,n,r,i,a):Vae(e,t,l,n,r,i,a);if(!(n&Yae)){var h=f&&_M.call(e,"__wrapped__"),y=d&&_M.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,g=y?t.value():t;return a||(a=new Iw),i(m,g,n,r,a)}}return p?(a||(a=new Iw),Gae(e,t,n,r,i,a)):!1}var Qae=Wae,Zae=Qae,NM=Mo;function Nz(e,t,n,r,i){return e===t?!0:e==null||t==null||!NM(e)&&!NM(t)?e!==e&&t!==t:Zae(e,t,n,r,Nz,i)}var EA=Nz,Jae=vz,eoe=EA,toe=1,noe=2;function roe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],u=e[l],f=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Jae;if(r)var p=r(u,f,l,e,t,d);if(!(p===void 0?eoe(f,u,toe|noe,r,d):p))return!1}}return!0}var ioe=roe,aoe=Xs;function ooe(e){return e===e&&!aoe(e)}var Rz=ooe,soe=Rz,loe=Px;function uoe(e){for(var t=loe(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,soe(i)]}return t}var coe=uoe;function foe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Mz=foe,doe=ioe,poe=coe,hoe=Mz;function moe(e){var t=poe(e);return t.length==1&&t[0][2]?hoe(t[0][0],t[0][1]):function(n){return n===e||doe(n,e,t)}}var goe=moe;function voe(e,t){return e!=null&&t in Object(e)}var yoe=voe,boe=zB,xoe=SA,woe=zr,Soe=OA,Ooe=jA,joe=yx;function Eoe(e,t,n){t=boe(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=joe(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Ooe(i)&&Soe(o,i)&&(woe(e)||xoe(e)))}var Toe=Eoe,Aoe=yoe,Coe=Toe;function _oe(e,t){return e!=null&&Coe(e,t,Aoe)}var Noe=_oe,Roe=EA,Moe=FB,Poe=Noe,$oe=iA,Doe=Rz,Ioe=Mz,koe=yx,Loe=1,Boe=2;function zoe(e,t){return $oe(e)&&Doe(t)?Ioe(koe(e),t):function(n){var r=Moe(n,e);return r===void 0&&r===t?Poe(n,e):Roe(t,r,Loe|Boe)}}var Foe=zoe;function Uoe(e){return e}var Ed=Uoe;function Hoe(e){return function(t){return t==null?void 0:t[e]}}var qoe=Hoe,Voe=fA;function Goe(e){return function(t){return Voe(t,e)}}var Koe=Goe,Yoe=qoe,Xoe=Koe,Woe=iA,Qoe=yx;function Zoe(e){return Woe(e)?Yoe(Qoe(e)):Xoe(e)}var Joe=Zoe,ese=goe,tse=Foe,nse=Ed,rse=zr,ise=Joe;function ase(e){return typeof e=="function"?e:e==null?nse:typeof e=="object"?rse(e)?tse(e[0],e[1]):ese(e):ise(e)}var Pa=ase;function ose(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var Pz=ose;function sse(e){return e!==e}var lse=sse;function use(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var cse=use,fse=Pz,dse=lse,pse=cse;function hse(e,t,n){return t===t?pse(e,t,n):fse(e,dse,n)}var mse=hse,gse=mse;function vse(e,t){var n=e==null?0:e.length;return!!n&&gse(e,t,0)>-1}var yse=vse;function bse(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var xse=bse;function wse(){}var Sse=wse,kw=Cz,Ose=Sse,jse=wA,Ese=1/0,Tse=kw&&1/jse(new kw([,-0]))[1]==Ese?function(e){return new kw(e)}:Ose,Ase=Tse,Cse=yz,_se=yse,Nse=xse,Rse=xz,Mse=Ase,Pse=wA,$se=200;function Dse(e,t,n){var r=-1,i=_se,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=Nse;else if(a>=$se){var u=t?null:Mse(e);if(u)return Pse(u);o=!1,i=Rse,l=new Cse}else l=t?[]:s;e:for(;++r<a;){var f=e[r],d=t?t(f):f;if(f=n||f!==0?f:0,o&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(f)}else i(l,d,n)||(l!==s&&l.push(d),s.push(f))}return s}var Ise=Dse,kse=Pa,Lse=Ise;function Bse(e,t){return e&&e.length?Lse(e,kse(t)):[]}var zse=Bse;const RM=vt(zse);function $z(e,t,n){return t===!0?RM(e,n):Ce(t)?RM(e,t):e}function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}var Fse=["ref"];function MM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MM(Object(n),!0).forEach(function(r){$x(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Use(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Iz(r.key),r)}}function Hse(e,t,n){return t&&PM(e.prototype,t),n&&PM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qse(e,t,n){return t=Ey(t),Vse(e,Dz()?Reflect.construct(t,n||[],Ey(e).constructor):t.apply(e,n))}function Vse(e,t){if(t&&(Tf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gse(e)}function Gse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dz=function(){return!!e})()}function Ey(e){return Ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ey(e)}function Kse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LO(e,t)}function LO(e,t){return LO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LO(e,t)}function $x(e,t,n){return t=Iz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iz(e){var t=Yse(e,"string");return Tf(t)=="symbol"?t:t+""}function Yse(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xse(e,t){if(e==null)return{};var n=Wse(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qse(e){return e.value}function Zse(e,t){if(z.isValidElement(e))return z.cloneElement(e,t);if(typeof e=="function")return z.createElement(e,t);t.ref;var n=Xse(t,Fse);return z.createElement(xA,n)}var $M=1,Gl=function(e){function t(){var n;Use(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=qse(this,t,[].concat(i)),$x(n,"lastBoundingBox",{width:-1,height:-1}),n}return Kse(t,e),Hse(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>$M||Math.abs(i.height-this.lastBoundingBox.height)>$M)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?za({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();d={left:((u||0)-h.width)/2}}else d=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var y=this.getBBoxSnapshot();p={top:((f||0)-y.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return za(za({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=za(za({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(h){r.wrapperNode=h}},Zse(a,za(za({},this.props),{},{payload:$z(f,u,Qse)})))}}],[{key:"getWithHeight",value:function(r,i){var a=za(za({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&se(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])}(x.PureComponent);$x(Gl,"displayName","Legend");$x(Gl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var DM=jm,Jse=SA,ele=zr,IM=DM?DM.isConcatSpreadable:void 0;function tle(e){return ele(e)||Jse(e)||!!(IM&&e&&e[IM])}var nle=tle,rle=Sz,ile=nle;function kz(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=ile),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?kz(s,t-1,n,r,i):rle(i,s):r||(i[i.length]=s)}return i}var Lz=kz;function ale(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var ole=ale,sle=ole,lle=sle(),ule=lle,cle=ule,fle=Px;function dle(e,t){return e&&cle(e,t,fle)}var Bz=dle,ple=Em;function hle(e,t){return function(n,r){if(n==null)return n;if(!ple(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var mle=hle,gle=Bz,vle=mle,yle=vle(gle),TA=yle,ble=TA,xle=Em;function wle(e,t){var n=-1,r=xle(e)?Array(e.length):[];return ble(e,function(i,a,o){r[++n]=t(i,a,o)}),r}var zz=wle;function Sle(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var Ole=Sle,kM=gd;function jle(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=kM(e),o=t!==void 0,s=t===null,l=t===t,u=kM(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!l)return-1}return 0}var Ele=jle,Tle=Ele;function Ale(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var l=Tle(i[r],a[r]);if(l){if(r>=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Cle=Ale,Lw=cA,_le=fA,Nle=Pa,Rle=zz,Mle=Ole,Ple=Ez,$le=Cle,Dle=Ed,Ile=zr;function kle(e,t,n){t.length?t=Lw(t,function(a){return Ile(a)?function(o){return _le(o,a.length===1?a[0]:a)}:a}):t=[Dle];var r=-1;t=Lw(t,Ple(Nle));var i=Rle(e,function(a,o,s){var l=Lw(t,function(u){return u(a)});return{criteria:l,index:++r,value:a}});return Mle(i,function(a,o){return $le(a,o,n)})}var Lle=kle;function Ble(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var zle=Ble,Fle=zle,LM=Math.max;function Ule(e,t,n){return t=LM(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=LM(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Fle(e,this,s)}}var Hle=Ule;function qle(e){return function(){return e}}var Vle=qle,Gle=Ru,Kle=function(){try{var e=Gle(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Fz=Kle,Yle=Vle,BM=Fz,Xle=Ed,Wle=BM?function(e,t){return BM(e,"toString",{configurable:!0,enumerable:!1,value:Yle(t),writable:!0})}:Xle,Qle=Wle,Zle=800,Jle=16,eue=Date.now;function tue(e){var t=0,n=0;return function(){var r=eue(),i=Jle-(r-n);if(n=r,i>0){if(++t>=Zle)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var nue=tue,rue=Qle,iue=nue,aue=iue(rue),oue=aue,sue=Ed,lue=Hle,uue=oue;function cue(e,t){return uue(lue(e,t,sue),e+"")}var fue=cue,due=oA,pue=Em,hue=OA,mue=Xs;function gue(e,t,n){if(!mue(n))return!1;var r=typeof t;return(r=="number"?pue(n)&&hue(t,n.length):r=="string"&&t in n)?due(n[t],e):!1}var Dx=gue,vue=Lz,yue=Lle,bue=fue,zM=Dx,xue=bue(function(e,t){if(e==null)return[];var n=t.length;return n>1&&zM(e,t[0],t[1])?t=[]:n>2&&zM(t[0],t[1],t[2])&&(t=[t[0]]),yue(e,vue(t,1),[])}),wue=xue;const AA=vt(wue);function vh(e){"@babel/helpers - typeof";return vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(e)}function BO(){return BO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BO.apply(this,arguments)}function Sue(e,t){return Tue(e)||Eue(e,t)||jue(e,t)||Oue()}function Oue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
88
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jue(e,t){if(e){if(typeof e=="string")return FM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FM(e,t)}}function FM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Tue(e){if(Array.isArray(e))return e}function UM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UM(Object(n),!0).forEach(function(r){Aue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aue(e,t,n){return t=Cue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cue(e){var t=_ue(e,"string");return vh(t)=="symbol"?t:t+""}function _ue(e,t){if(vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nue(e){return Array.isArray(e)&&Sn(e[0])&&Sn(e[1])?e.join(" ~ "):e}var Rue=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,f=t.payload,d=t.formatter,p=t.itemSorter,h=t.wrapperClassName,y=t.labelClassName,m=t.label,g=t.labelFormatter,b=t.accessibilityLayer,v=b===void 0?!1:b,w=function(){if(f&&f.length){var $={padding:0,margin:0},D=(p?AA(f,p):f).map(function(N,P){if(N.type==="none")return null;var R=Bw({display:"block",paddingTop:4,paddingBottom:4,color:N.color||"#000"},s),B=N.formatter||d||Nue,L=N.value,k=N.name,I=L,V=k;if(B&&I!=null&&V!=null){var M=B(L,k,N,P,f);if(Array.isArray(M)){var H=Sue(M,2);I=H[0],V=H[1]}else I=M}return z.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(P),style:R},Sn(V)?z.createElement("span",{className:"recharts-tooltip-item-name"},V):null,Sn(V)?z.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,z.createElement("span",{className:"recharts-tooltip-item-value"},I),z.createElement("span",{className:"recharts-tooltip-item-unit"},N.unit||""))});return z.createElement("ul",{className:"recharts-tooltip-item-list",style:$},D)}return null},S=Bw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),O=Bw({margin:0},u),j=!Ue(m),E=j?m:"",T=ke("recharts-default-tooltip",h),A=ke("recharts-tooltip-label",y);j&&g&&f!==void 0&&f!==null&&(E=g(m,f));var C=v?{role:"status","aria-live":"assertive"}:{};return z.createElement("div",BO({className:T,style:S},C),z.createElement("p",{className:A,style:O},z.isValidElement(E)?E:"".concat(E)),w())};function yh(e){"@babel/helpers - typeof";return yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yh(e)}function yg(e,t,n){return t=Mue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mue(e){var t=Pue(e,"string");return yh(t)=="symbol"?t:t+""}function Pue(e,t){if(yh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xd="recharts-tooltip-wrapper",$ue={visibility:"hidden"};function Due(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ke(Xd,yg(yg(yg(yg({},"".concat(Xd,"-right"),se(n)&&t&&se(t.x)&&n>=t.x),"".concat(Xd,"-left"),se(n)&&t&&se(t.x)&&n<t.x),"".concat(Xd,"-bottom"),se(r)&&t&&se(t.y)&&r>=t.y),"".concat(Xd,"-top"),se(r)&&t&&se(t.y)&&r<t.y))}function HM(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&se(a[r]))return a[r];var f=n[r]-s-i,d=n[r]+i;if(t[r])return o[r]?f:d;if(o[r]){var p=f,h=l[r];return p<h?Math.max(d,l[r]):Math.max(f,l[r])}var y=d+s,m=l[r]+u;return y>m?Math.max(f,l[r]):Math.max(d,l[r])}function Iue(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function kue(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return o.height>0&&o.width>0&&n?(f=HM({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),d=HM({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=Iue({translateX:f,translateY:d,useTranslate3d:s})):u=$ue,{cssProperties:u,cssClasses:Due({translateX:f,translateY:d,coordinate:n})}}function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function qM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(n),!0).forEach(function(r){FO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hz(r.key),r)}}function zue(e,t,n){return t&&Bue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fue(e,t,n){return t=Ty(t),Uue(e,Uz()?Reflect.construct(t,n||[],Ty(e).constructor):t.apply(e,n))}function Uue(e,t){if(t&&(Af(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hue(e)}function Hue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uz=function(){return!!e})()}function Ty(e){return Ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ty(e)}function que(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zO(e,t)}function zO(e,t){return zO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zO(e,t)}function FO(e,t,n){return t=Hz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hz(e){var t=Vue(e,"string");return Af(t)=="symbol"?t:t+""}function Vue(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GM=1,Gue=function(e){function t(){var n;Lue(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Fue(this,t,[].concat(i)),FO(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),FO(n,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return que(t,e),zue(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>GM||Math.abs(r.height-this.state.lastBoundingBox.height)>GM)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,h=i.offset,y=i.position,m=i.reverseDirection,g=i.useTranslate3d,b=i.viewBox,v=i.wrapperStyle,w=kue({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:y,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:b}),S=w.cssClasses,O=w.cssProperties,j=VM(VM({transition:p&&a?"transform ".concat(s,"ms ").concat(l):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return z.createElement("div",{tabIndex:-1,className:S,style:j,ref:function(T){r.wrapperNode=T}},u)}}])}(x.PureComponent),Kue=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ws={isSsr:Kue()};function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}function KM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KM(Object(n),!0).forEach(function(r){CA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vz(r.key),r)}}function Wue(e,t,n){return t&&Xue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Que(e,t,n){return t=Ay(t),Zue(e,qz()?Reflect.construct(t,n||[],Ay(e).constructor):t.apply(e,n))}function Zue(e,t){if(t&&(Cf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jue(e)}function Jue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qz=function(){return!!e})()}function Ay(e){return Ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ay(e)}function ece(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UO(e,t)}function UO(e,t){return UO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UO(e,t)}function CA(e,t,n){return t=Vz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vz(e){var t=tce(e,"string");return Cf(t)=="symbol"?t:t+""}function tce(e,t){if(Cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function nce(e){return e.dataKey}function rce(e,t){return z.isValidElement(e)?z.cloneElement(e,t):typeof e=="function"?z.createElement(e,t):z.createElement(Rue,t)}var ra=function(e){function t(){return Yue(this,t),Que(this,t,arguments)}return ece(t,e),Wue(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,p=i.isAnimationActive,h=i.offset,y=i.payload,m=i.payloadUniqBy,g=i.position,b=i.reverseDirection,v=i.useTranslate3d,w=i.viewBox,S=i.wrapperStyle,O=y??[];d&&O.length&&(O=$z(y.filter(function(E){return E.value!=null&&(E.hide!==!0||r.props.includeHidden)}),m,nce));var j=O.length>0;return z.createElement(Gue,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:p,active:a,coordinate:f,hasPayload:j,offset:h,position:g,reverseDirection:b,useTranslate3d:v,viewBox:w,wrapperStyle:S},rce(u,YM(YM({},this.props),{},{payload:O})))}}])}(x.PureComponent);CA(ra,"displayName","Tooltip");CA(ra,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ws.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ice=Ma,ace=function(){return ice.Date.now()},oce=ace,sce=/\s/;function lce(e){for(var t=e.length;t--&&sce.test(e.charAt(t)););return t}var uce=lce,cce=uce,fce=/^\s+/;function dce(e){return e&&e.slice(0,cce(e)+1).replace(fce,"")}var pce=dce,hce=pce,XM=Xs,mce=gd,WM=NaN,gce=/^[-+]0x[0-9a-f]+$/i,vce=/^0b[01]+$/i,yce=/^0o[0-7]+$/i,bce=parseInt;function xce(e){if(typeof e=="number")return e;if(mce(e))return WM;if(XM(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=XM(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=hce(e);var n=vce.test(e);return n||yce.test(e)?bce(e.slice(2),n?2:8):gce.test(e)?WM:+e}var Gz=xce,wce=Xs,zw=oce,QM=Gz,Sce="Expected a function",Oce=Math.max,jce=Math.min;function Ece(e,t,n){var r,i,a,o,s,l,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(Sce);t=QM(t)||0,wce(n)&&(f=!!n.leading,d="maxWait"in n,a=d?Oce(QM(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function h(j){var E=r,T=i;return r=i=void 0,u=j,o=e.apply(T,E),o}function y(j){return u=j,s=setTimeout(b,t),f?h(j):o}function m(j){var E=j-l,T=j-u,A=t-E;return d?jce(A,a-T):A}function g(j){var E=j-l,T=j-u;return l===void 0||E>=t||E<0||d&&T>=a}function b(){var j=zw();if(g(j))return v(j);s=setTimeout(b,m(j))}function v(j){return s=void 0,p&&r?h(j):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function S(){return s===void 0?o:v(zw())}function O(){var j=zw(),E=g(j);if(r=arguments,i=this,l=j,E){if(s===void 0)return y(l);if(d)return clearTimeout(s),s=setTimeout(b,t),h(l)}return s===void 0&&(s=setTimeout(b,t)),o}return O.cancel=w,O.flush=S,O}var Tce=Ece,Ace=Tce,Cce=Xs,_ce="Expected a function";function Nce(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(_ce);return Cce(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ace(e,t,{leading:r,maxWait:t,trailing:i})}var Rce=Nce;const Kz=vt(Rce);function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}function ZM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZM(Object(n),!0).forEach(function(r){Mce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mce(e,t,n){return t=Pce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pce(e){var t=$ce(e,"string");return bh(t)=="symbol"?t:t+""}function $ce(e,t){if(bh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dce(e,t){return Bce(e)||Lce(e,t)||kce(e,t)||Ice()}function Ice(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
89
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kce(e,t){if(e){if(typeof e=="string")return JM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JM(e,t)}}function JM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Bce(e){if(Array.isArray(e))return e}var zce=x.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,p=e.maxHeight,h=e.children,y=e.debounce,m=y===void 0?0:y,g=e.id,b=e.className,v=e.onResize,w=e.style,S=w===void 0?{}:w,O=x.useRef(null),j=x.useRef();j.current=v,x.useImperativeHandle(t,function(){return Object.defineProperty(O.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),O.current},configurable:!0})});var E=x.useState({containerWidth:i.width,containerHeight:i.height}),T=Dce(E,2),A=T[0],C=T[1],_=x.useCallback(function(D,N){C(function(P){var R=Math.round(D),B=Math.round(N);return P.containerWidth===R&&P.containerHeight===B?P:{containerWidth:R,containerHeight:B}})},[]);x.useEffect(function(){var D=function(k){var I,V=k[0].contentRect,M=V.width,H=V.height;_(M,H),(I=j.current)===null||I===void 0||I.call(j,M,H)};m>0&&(D=Kz(D,m,{trailing:!0,leading:!1}));var N=new ResizeObserver(D),P=O.current.getBoundingClientRect(),R=P.width,B=P.height;return _(R,B),N.observe(O.current),function(){N.disconnect()}},[_,m]);var $=x.useMemo(function(){var D=A.containerWidth,N=A.containerHeight;if(D<0||N<0)return null;Hi(El(o)||El(l),`The width(%s) and height(%s) are both fixed numbers,
|
|
90
|
+
maybe you don't need to use a ResponsiveContainer.`,o,l),Hi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var P=El(o)?D:o,R=El(l)?N:l;n&&n>0&&(P?R=P/n:R&&(P=R*n),p&&R>p&&(R=p)),Hi(P>0||R>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
91
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
92
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
93
|
+
height and width.`,P,R,o,l,f,d,n);var B=!Array.isArray(h)&&io(h.type).endsWith("Chart");return z.Children.map(h,function(L){return z.isValidElement(L)?x.cloneElement(L,bg({width:P,height:R},B?{style:bg({height:"100%",width:"100%",maxHeight:R,maxWidth:P},L.props.style)}:{})):L})},[n,h,l,p,d,f,A,o]);return z.createElement("div",{id:g?"".concat(g):void 0,className:ke("recharts-responsive-container",b),style:bg(bg({},S),{},{width:o,height:l,minWidth:f,minHeight:d,maxHeight:p}),ref:O},$)}),Td=function(t){return null};Td.displayName="Cell";function xh(e){"@babel/helpers - typeof";return xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xh(e)}function eP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eP(Object(n),!0).forEach(function(r){Fce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fce(e,t,n){return t=Uce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uce(e){var t=Hce(e,"string");return xh(t)=="symbol"?t:t+""}function Hce(e,t){if(xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qu={widthCache:{},cacheCount:0},qce=2e3,Vce={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tP="recharts_measurement_span";function Gce(e){var t=HO({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Lp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ws.isSsr)return{width:0,height:0};var r=Gce(n),i=JSON.stringify({text:t,copyStyle:r});if(qu.widthCache[i])return qu.widthCache[i];try{var a=document.getElementById(tP);a||(a=document.createElement("span"),a.setAttribute("id",tP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=HO(HO({},Vce),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return qu.widthCache[i]=l,++qu.cacheCount>qce&&(qu.cacheCount=0,qu.widthCache={}),l}catch{return{width:0,height:0}}},Kce=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function wh(e){"@babel/helpers - typeof";return wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wh(e)}function Cy(e,t){return Qce(e)||Wce(e,t)||Xce(e,t)||Yce()}function Yce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xce(e,t){if(e){if(typeof e=="string")return nP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nP(e,t)}}function nP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Qce(e){if(Array.isArray(e))return e}function Zce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,efe(r.key),r)}}function Jce(e,t,n){return t&&rP(e.prototype,t),n&&rP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function efe(e){var t=tfe(e,"string");return wh(t)=="symbol"?t:t+""}function tfe(e,t){if(wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var iP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,aP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nfe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,rfe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Yz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ife=Object.keys(Yz),yc="NaN";function afe(e,t){return e*Yz[t]}var xg=function(){function e(t,n){Zce(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!nfe.test(n)&&(this.num=NaN,this.unit=""),ife.includes(n)&&(this.num=afe(t,n),this.unit="px")}return Jce(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=rfe.exec(n))!==null&&r!==void 0?r:[],a=Cy(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])}();function Xz(e){if(e.includes(yc))return yc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=iP.exec(t))!==null&&n!==void 0?n:[],i=Cy(r,4),a=i[1],o=i[2],s=i[3],l=xg.parse(a??""),u=xg.parse(s??""),f=o==="*"?l.multiply(u):l.divide(u);if(f.isNaN())return yc;t=t.replace(iP,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,p=(d=aP.exec(t))!==null&&d!==void 0?d:[],h=Cy(p,4),y=h[1],m=h[2],g=h[3],b=xg.parse(y??""),v=xg.parse(g??""),w=m==="+"?b.add(v):b.subtract(v);if(w.isNaN())return yc;t=t.replace(aP,w.toString())}return t}var oP=/\(([^()]*)\)/;function ofe(e){for(var t=e;t.includes("(");){var n=oP.exec(t),r=Cy(n,2),i=r[1];t=t.replace(oP,Xz(i))}return t}function sfe(e){var t=e.replace(/\s+/g,"");return t=ofe(t),t=Xz(t),t}function lfe(e){try{return sfe(e)}catch{return yc}}function Fw(e){var t=lfe(e.slice(5,-1));return t===yc?"":t}var ufe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],cfe=["dx","dy","angle","className","breakAll"];function qO(){return qO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qO.apply(this,arguments)}function sP(e,t){if(e==null)return{};var n=ffe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ffe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lP(e,t){return mfe(e)||hfe(e,t)||pfe(e,t)||dfe()}function dfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pfe(e,t){if(e){if(typeof e=="string")return uP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(e,t)}}function uP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function mfe(e){if(Array.isArray(e))return e}var Wz=/[ \f\n\r\t\v\u2028\u2029]+/,Qz=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];Ue(n)||(r?a=n.toString().split(""):a=n.toString().split(Wz));var o=a.map(function(l){return{word:l,width:Lp(l,i).width}}),s=r?0:Lp(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},gfe=function(t,n,r,i,a){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,f=se(o),d=s,p=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return P.reduce(function(R,B){var L=B.word,k=B.width,I=R[R.length-1];if(I&&(i==null||a||I.width+k+r<Number(i)))I.words.push(L),I.width+=k+r;else{var V={words:[L],width:k};R.push(V)}return R},[])},h=p(n),y=function(P){return P.reduce(function(R,B){return R.width>B.width?R:B})};if(!f)return h;for(var m="…",g=function(P){var R=d.slice(0,P),B=Qz({breakAll:u,style:l,children:R+m}).wordsWithComputedWidth,L=p(B),k=L.length>o||y(L).width>Number(i);return[k,L]},b=0,v=d.length-1,w=0,S;b<=v&&w<=d.length-1;){var O=Math.floor((b+v)/2),j=O-1,E=g(j),T=lP(E,2),A=T[0],C=T[1],_=g(O),$=lP(_,1),D=$[0];if(!A&&!D&&(b=O+1),A&&D&&(v=O-1),!A&&D){S=C;break}w++}return S||h},cP=function(t){var n=Ue(t)?[]:t.toString().split(Wz);return[{words:n}]},vfe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!Ws.isSsr){var l,u,f=Qz({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;l=d,u=p}else return cP(i);return gfe({breakAll:o,children:i,maxLines:s,style:a},l,u,n,r)}return cP(i)},fP="#808080",lu=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,h=p===void 0?"start":p,y=t.verticalAnchor,m=y===void 0?"end":y,g=t.fill,b=g===void 0?fP:g,v=sP(t,ufe),w=x.useMemo(function(){return vfe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),S=v.dx,O=v.dy,j=v.angle,E=v.className,T=v.breakAll,A=sP(v,cfe);if(!Sn(r)||!Sn(a))return null;var C=r+(se(S)?S:0),_=a+(se(O)?O:0),$;switch(m){case"start":$=Fw("calc(".concat(u,")"));break;case"middle":$=Fw("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:$=Fw("calc(".concat(w.length-1," * -").concat(s,")"));break}var D=[];if(d){var N=w[0].width,P=v.width;D.push("scale(".concat((se(P)?P/N:1)/N,")"))}return j&&D.push("rotate(".concat(j,", ").concat(C,", ").concat(_,")")),D.length&&(A.transform=D.join(" ")),z.createElement("text",qO({},Ae(A,!0),{x:C,y:_,className:ke("recharts-text",E),textAnchor:h,fill:b.includes("url")?fP:b}),w.map(function(R,B){var L=R.words.join(T?"":" ");return z.createElement("tspan",{x:C,dy:B===0?$:s,key:"".concat(L,"-").concat(B)},L)}))};function Ns(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yfe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _A(e){let t,n,r;e.length!==2?(t=Ns,n=(s,l)=>Ns(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ns||e===yfe?e:bfe,n=e,r=e);function i(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const d=u+f>>>1;n(s[d],l)<0?u=d+1:f=d}while(u<f)}return u}function a(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const d=u+f>>>1;n(s[d],l)<=0?u=d+1:f=d}while(u<f)}return u}function o(s,l,u=0,f=s.length){const d=i(s,l,u,f-1);return d>u&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:o,right:a}}function bfe(){return 0}function Zz(e){return e===null?NaN:+e}function*xfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const wfe=_A(Ns),Tm=wfe.right;_A(Zz).center;class dP extends Map{constructor(t,n=jfe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(pP(this,t))}has(t){return super.has(pP(this,t))}set(t,n){return super.set(Sfe(this,t),n)}delete(t){return super.delete(Ofe(this,t))}}function pP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Sfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ofe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function jfe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Efe(e=Ns){if(e===Ns)return Jz;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Jz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Tfe=Math.sqrt(50),Afe=Math.sqrt(10),Cfe=Math.sqrt(2);function _y(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=Tfe?10:a>=Afe?5:a>=Cfe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?_y(e,t,n*2):[s,l,u]}function VO(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?_y(t,e,n):_y(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let u=0;u<s;++u)l[u]=(a-u)/-o;else for(let u=0;u<s;++u)l[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(i+u)/-o;else for(let u=0;u<s;++u)l[u]=(i+u)*o;return l}function GO(e,t,n){return t=+t,e=+e,n=+n,_y(e,t,n)[2]}function KO(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?GO(t,e,n):GO(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function hP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function mP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function e4(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Jz:Efe(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),h=Math.max(n,Math.floor(t-u*d/l+p)),y=Math.min(r,Math.floor(t+(l-u)*d/l+p));e4(e,t,h,y,i)}const a=e[t];let o=n,s=r;for(Wd(e,n,t),i(e[r],a)>0&&Wd(e,n,r);o<s;){for(Wd(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?Wd(e,n,s):(++s,Wd(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Wd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function _fe(e,t,n){if(e=Float64Array.from(xfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return mP(e);if(t>=1)return hP(e);var r,i=(r-1)*t,a=Math.floor(i),o=hP(e4(e,a).subarray(0,a+1)),s=mP(e.subarray(a+1));return o+(s-o)*(i-a)}}function Nfe(e,t,n=Zz){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Rfe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Mi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Po(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 YO=Symbol("implicit");function NA(){var e=new dP,t=[],n=[],r=YO;function i(a){let o=e.get(a);if(o===void 0){if(r!==YO)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new dP;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return NA(t,n).unknown(r)},Mi.apply(i,arguments),i}function Sh(){var e=NA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,u=0,f=.5;delete e.unknown;function d(){var p=t().length,h=i<r,y=h?i:r,m=h?r:i;a=(m-y)/Math.max(1,p-l+u*2),s&&(a=Math.floor(a)),y+=(m-y-a*(p-l))*f,o=a*(1-l),s&&(y=Math.round(y),o=Math.round(o));var g=Rfe(p).map(function(b){return y+a*b});return n(h?g.reverse():g)}return e.domain=function(p){return arguments.length?(t(p),d()):t()},e.range=function(p){return arguments.length?([r,i]=p,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(p){return[r,i]=p,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(p){return arguments.length?(s=!!p,d()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,u=+p),d()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),d()):l},e.paddingOuter=function(p){return arguments.length?(u=+p,d()):u},e.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),d()):f},e.copy=function(){return Sh(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(f)},Mi.apply(d(),arguments)}function t4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return t4(t())},e}function Bp(){return t4(Sh.apply(null,arguments).paddingInner(1))}function RA(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function n4(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Am(){}var Oh=.7,Ny=1/Oh,kc="\\s*([+-]?\\d+)\\s*",jh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mfe=/^#([0-9a-f]{3,8})$/,Pfe=new RegExp(`^rgb\\(${kc},${kc},${kc}\\)$`),$fe=new RegExp(`^rgb\\(${wa},${wa},${wa}\\)$`),Dfe=new RegExp(`^rgba\\(${kc},${kc},${kc},${jh}\\)$`),Ife=new RegExp(`^rgba\\(${wa},${wa},${wa},${jh}\\)$`),kfe=new RegExp(`^hsl\\(${jh},${wa},${wa}\\)$`),Lfe=new RegExp(`^hsla\\(${jh},${wa},${wa},${jh}\\)$`),gP={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};RA(Am,Eh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vP,formatHex:vP,formatHex8:Bfe,formatHsl:zfe,formatRgb:yP,toString:yP});function vP(){return this.rgb().formatHex()}function Bfe(){return this.rgb().formatHex8()}function zfe(){return r4(this).formatHsl()}function yP(){return this.rgb().formatRgb()}function Eh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Mfe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?bP(t):n===3?new $r(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wg(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=Pfe.exec(e))?new $r(t[1],t[2],t[3],1):(t=$fe.exec(e))?new $r(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Dfe.exec(e))?wg(t[1],t[2],t[3],t[4]):(t=Ife.exec(e))?wg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kfe.exec(e))?SP(t[1],t[2]/100,t[3]/100,1):(t=Lfe.exec(e))?SP(t[1],t[2]/100,t[3]/100,t[4]):gP.hasOwnProperty(e)?bP(gP[e]):e==="transparent"?new $r(NaN,NaN,NaN,0):null}function bP(e){return new $r(e>>16&255,e>>8&255,e&255,1)}function wg(e,t,n,r){return r<=0&&(e=t=n=NaN),new $r(e,t,n,r)}function Ffe(e){return e instanceof Am||(e=Eh(e)),e?(e=e.rgb(),new $r(e.r,e.g,e.b,e.opacity)):new $r}function XO(e,t,n,r){return arguments.length===1?Ffe(e):new $r(e,t,n,r??1)}function $r(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}RA($r,XO,n4(Am,{brighter(e){return e=e==null?Ny:Math.pow(Ny,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Oh:Math.pow(Oh,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $r(Kl(this.r),Kl(this.g),Kl(this.b),Ry(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:xP,formatHex:xP,formatHex8:Ufe,formatRgb:wP,toString:wP}));function xP(){return`#${Tl(this.r)}${Tl(this.g)}${Tl(this.b)}`}function Ufe(){return`#${Tl(this.r)}${Tl(this.g)}${Tl(this.b)}${Tl((isNaN(this.opacity)?1:this.opacity)*255)}`}function wP(){const e=Ry(this.opacity);return`${e===1?"rgb(":"rgba("}${Kl(this.r)}, ${Kl(this.g)}, ${Kl(this.b)}${e===1?")":`, ${e})`}`}function Ry(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Tl(e){return e=Kl(e),(e<16?"0":"")+e.toString(16)}function SP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new zi(e,t,n,r)}function r4(e){if(e instanceof zi)return new zi(e.h,e.s,e.l,e.opacity);if(e instanceof Am||(e=Eh(e)),!e)return new zi;if(e instanceof zi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new zi(o,s,l,e.opacity)}function Hfe(e,t,n,r){return arguments.length===1?r4(e):new zi(e,t,n,r??1)}function zi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}RA(zi,Hfe,n4(Am,{brighter(e){return e=e==null?Ny:Math.pow(Ny,e),new zi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Oh:Math.pow(Oh,e),new zi(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new $r(Uw(e>=240?e-240:e+120,i,r),Uw(e,i,r),Uw(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new zi(OP(this.h),Sg(this.s),Sg(this.l),Ry(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=Ry(this.opacity);return`${e===1?"hsl(":"hsla("}${OP(this.h)}, ${Sg(this.s)*100}%, ${Sg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function OP(e){return e=(e||0)%360,e<0?e+360:e}function Sg(e){return Math.max(0,Math.min(1,e||0))}function Uw(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const MA=e=>()=>e;function qfe(e,t){return function(n){return e+n*t}}function Vfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Gfe(e){return(e=+e)==1?i4:function(t,n){return n-t?Vfe(t,n,e):MA(isNaN(t)?n:t)}}function i4(e,t){var n=t-e;return n?qfe(e,n):MA(isNaN(e)?t:e)}const jP=function e(t){var n=Gfe(t);function r(i,a){var o=n((i=XO(i)).r,(a=XO(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),u=i4(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function Kfe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Yfe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Xfe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Ad(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function Wfe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function My(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Qfe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Ad(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var WO=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hw=new RegExp(WO.source,"g");function Zfe(e){return function(){return e}}function Jfe(e){return function(t){return e(t)+""}}function ede(e,t){var n=WO.lastIndex=Hw.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(r=WO.exec(e))&&(i=Hw.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:My(r,i)})),n=Hw.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?Jfe(l[0].x):Zfe(t):(t=l.length,function(u){for(var f=0,d;f<t;++f)s[(d=l[f]).i]=d.x(u);return s.join("")})}function Ad(e,t){var n=typeof t,r;return t==null||n==="boolean"?MA(t):(n==="number"?My:n==="string"?(r=Eh(t))?(t=r,jP):ede:t instanceof Eh?jP:t instanceof Date?Wfe:Yfe(t)?Kfe:Array.isArray(t)?Xfe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Qfe:My)(e,t)}function PA(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function tde(e,t){t===void 0&&(t=e,e=Ad);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function nde(e){return function(){return e}}function Py(e){return+e}var EP=[0,1];function Sr(e){return e}function QO(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:nde(isNaN(t)?NaN:.5)}function rde(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function ide(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=QO(i,r),a=n(o,a)):(r=QO(r,i),a=n(a,o)),function(s){return a(r(s))}}function ade(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=QO(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var l=Tm(e,s,1,r)-1;return a[l](i[l](s))}}function Cm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ix(){var e=EP,t=EP,n=Ad,r,i,a,o=Sr,s,l,u;function f(){var p=Math.min(e.length,t.length);return o!==Sr&&(o=rde(e[0],e[p-1])),s=p>2?ade:ide,l=u=null,d}function d(p){return p==null||isNaN(p=+p)?a:(l||(l=s(e.map(r),t,n)))(r(o(p)))}return d.invert=function(p){return o(i((u||(u=s(t,e.map(r),My)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Py),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=PA,f()},d.clamp=function(p){return arguments.length?(o=p?!0:Sr,f()):o!==Sr},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,h){return r=p,i=h,f()}}function $A(){return Ix()(Sr,Sr)}function ode(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $y(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _f(e){return e=$y(Math.abs(e)),e?e[1]:NaN}function sde(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function lde(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ude=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Th(e){if(!(t=ude.exec(e)))throw new Error("invalid format: "+e);var t;return new DA({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]})}Th.prototype=DA.prototype;function DA(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+""}DA.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 cde(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Dy;function fde(e,t){var n=$y(e,t);if(!n)return Dy=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Dy=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+$y(e,Math.max(0,t+a-1))[0]}function TP(e,t){var n=$y(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const AP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ode,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)=>TP(e*100,t),r:TP,s:fde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function CP(e){return e}var _P=Array.prototype.map,NP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dde(e){var t=e.grouping===void 0||e.thousands===void 0?CP:sde(_P.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?CP:lde(_P.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d,p){d=Th(d);var h=d.fill,y=d.align,m=d.sign,g=d.symbol,b=d.zero,v=d.width,w=d.comma,S=d.precision,O=d.trim,j=d.type;j==="n"?(w=!0,j="g"):AP[j]||(S===void 0&&(S=12),O=!0,j="g"),(b||h==="0"&&y==="=")&&(b=!0,h="0",y="=");var E=(p&&p.prefix!==void 0?p.prefix:"")+(g==="$"?n:g==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),T=(g==="$"?r:/[%p]/.test(j)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),A=AP[j],C=/[defgprs%]/.test(j);S=S===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function _($){var D=E,N=T,P,R,B;if(j==="c")N=A($)+N,$="";else{$=+$;var L=$<0||1/$<0;if($=isNaN($)?l:A(Math.abs($),S),O&&($=cde($)),L&&+$==0&&m!=="+"&&(L=!1),D=(L?m==="("?m:s:m==="-"||m==="("?"":m)+D,N=(j==="s"&&!isNaN($)&&Dy!==void 0?NP[8+Dy/3]:"")+N+(L&&m==="("?")":""),C){for(P=-1,R=$.length;++P<R;)if(B=$.charCodeAt(P),48>B||B>57){N=(B===46?i+$.slice(P+1):$.slice(P))+N,$=$.slice(0,P);break}}}w&&!b&&($=t($,1/0));var k=D.length+$.length+N.length,I=k<v?new Array(v-k+1).join(h):"";switch(w&&b&&($=t(I+$,I.length?v-N.length:1/0),I=""),y){case"<":$=D+$+N+I;break;case"=":$=D+I+$+N;break;case"^":$=I.slice(0,k=I.length>>1)+D+$+N+I.slice(k);break;default:$=I+D+$+N;break}return a($)}return _.toString=function(){return d+""},_}function f(d,p){var h=Math.max(-8,Math.min(8,Math.floor(_f(p)/3)))*3,y=Math.pow(10,-h),m=u((d=Th(d),d.type="f",d),{suffix:NP[8+h/3]});return function(g){return m(y*g)}}return{format:u,formatPrefix:f}}var Og,IA,a4;pde({thousands:",",grouping:[3],currency:["$",""]});function pde(e){return Og=dde(e),IA=Og.format,a4=Og.formatPrefix,Og}function hde(e){return Math.max(0,-_f(Math.abs(e)))}function mde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_f(t)/3)))*3-_f(Math.abs(e)))}function gde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_f(t)-_f(e))+1}function o4(e,t,n,r){var i=KO(e,t,n),a;switch(r=Th(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=mde(i,o))&&(r.precision=a),a4(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=gde(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=hde(i))&&(r.precision=a-(r.type==="%")*2);break}}return IA(r)}function Qs(e){var t=e.domain;return e.ticks=function(n){var r=t();return VO(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return o4(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,u,f=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);f-- >0;){if(u=GO(o,s,n),u===l)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function Iy(){var e=$A();return e.copy=function(){return Cm(e,Iy())},Mi.apply(e,arguments),Qs(e)}function s4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Py),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return s4(e).unknown(t)},e=arguments.length?Array.from(e,Py):[0,1],Qs(n)}function l4(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function RP(e){return Math.log(e)}function MP(e){return Math.exp(e)}function vde(e){return-Math.log(-e)}function yde(e){return-Math.exp(-e)}function bde(e){return isFinite(e)?+("1e"+e):e<0?0:e}function xde(e){return e===10?bde:e===Math.E?Math.exp:t=>Math.pow(e,t)}function wde(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 PP(e){return(t,n)=>-e(-t,n)}function kA(e){const t=e(RP,MP),n=t.domain;let r=10,i,a;function o(){return i=wde(r),a=xde(r),n()[0]<0?(i=PP(i),a=PP(a),e(vde,yde)):e(RP,MP),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f<u;d&&([u,f]=[f,u]);let p=i(u),h=i(f),y,m;const g=s==null?10:+s;let b=[];if(!(r%1)&&h-p<g){if(p=Math.floor(p),h=Math.ceil(h),u>0){for(;p<=h;++p)for(y=1;y<r;++y)if(m=p<0?y/a(-p):y*a(p),!(m<u)){if(m>f)break;b.push(m)}}else for(;p<=h;++p)for(y=r-1;y>=1;--y)if(m=p>0?y/a(-p):y*a(p),!(m<u)){if(m>f)break;b.push(m)}b.length*2<g&&(b=VO(u,f,g))}else b=VO(p,h,Math.min(h-p,g)).map(a);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Th(l)).precision==null&&(l.trim=!0),l=IA(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?l(f):""}},t.nice=()=>n(l4(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function u4(){const e=kA(Ix()).domain([1,10]);return e.copy=()=>Cm(e,u4()).base(e.base()),Mi.apply(e,arguments),e}function $P(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function DP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function LA(e){var t=1,n=e($P(t),DP(t));return n.constant=function(r){return arguments.length?e($P(t=+r),DP(t)):t},Qs(n)}function c4(){var e=LA(Ix());return e.copy=function(){return Cm(e,c4()).constant(e.constant())},Mi.apply(e,arguments)}function IP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Sde(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ode(e){return e<0?-e*e:e*e}function BA(e){var t=e(Sr,Sr),n=1;function r(){return n===1?e(Sr,Sr):n===.5?e(Sde,Ode):e(IP(n),IP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Qs(t)}function zA(){var e=BA(Ix());return e.copy=function(){return Cm(e,zA()).exponent(e.exponent())},Mi.apply(e,arguments),e}function jde(){return zA.apply(null,arguments).exponent(.5)}function kP(e){return Math.sign(e)*e*e}function Ede(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function f4(){var e=$A(),t=[0,1],n=!1,r;function i(a){var o=Ede(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(kP(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Py)).map(kP)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return f4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Mi.apply(i,arguments),Qs(i)}function d4(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=Nfe(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Tm(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Ns),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return d4().domain(e).range(t).unknown(r)},Mi.apply(a,arguments)}function p4(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[Tm(r,l,0,n)]:a}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return p4().domain([e,t]).range(i).unknown(a)},Mi.apply(Qs(o),arguments)}function h4(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Tm(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return h4().domain(e).range(t).unknown(n)},Mi.apply(i,arguments)}const qw=new Date,Vw=new Date;function jn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return l},i.filter=a=>jn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(qw.setTime(+a),Vw.setTime(+o),e(qw),e(Vw),Math.floor(n(qw,Vw))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const ky=jn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ky.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?jn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ky);ky.range;const Za=1e3,Oi=Za*60,Ja=Oi*60,bo=Ja*24,FA=bo*7,LP=bo*30,Gw=bo*365,Al=jn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Za)},(e,t)=>(t-e)/Za,e=>e.getUTCSeconds());Al.range;const UA=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Za)},(e,t)=>{e.setTime(+e+t*Oi)},(e,t)=>(t-e)/Oi,e=>e.getMinutes());UA.range;const HA=jn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Oi)},(e,t)=>(t-e)/Oi,e=>e.getUTCMinutes());HA.range;const qA=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Za-e.getMinutes()*Oi)},(e,t)=>{e.setTime(+e+t*Ja)},(e,t)=>(t-e)/Ja,e=>e.getHours());qA.range;const VA=jn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ja)},(e,t)=>(t-e)/Ja,e=>e.getUTCHours());VA.range;const _m=jn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Oi)/bo,e=>e.getDate()-1);_m.range;const kx=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bo,e=>e.getUTCDate()-1);kx.range;const m4=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bo,e=>Math.floor(e/bo));m4.range;function Mu(e){return jn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Oi)/FA)}const Lx=Mu(0),Ly=Mu(1),Tde=Mu(2),Ade=Mu(3),Nf=Mu(4),Cde=Mu(5),_de=Mu(6);Lx.range;Ly.range;Tde.range;Ade.range;Nf.range;Cde.range;_de.range;function Pu(e){return jn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/FA)}const Bx=Pu(0),By=Pu(1),Nde=Pu(2),Rde=Pu(3),Rf=Pu(4),Mde=Pu(5),Pde=Pu(6);Bx.range;By.range;Nde.range;Rde.range;Rf.range;Mde.range;Pde.range;const GA=jn(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());GA.range;const KA=jn(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());KA.range;const xo=jn(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());xo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});xo.range;const wo=jn(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());wo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});wo.range;function g4(e,t,n,r,i,a){const o=[[Al,1,Za],[Al,5,5*Za],[Al,15,15*Za],[Al,30,30*Za],[a,1,Oi],[a,5,5*Oi],[a,15,15*Oi],[a,30,30*Oi],[i,1,Ja],[i,3,3*Ja],[i,6,6*Ja],[i,12,12*Ja],[r,1,bo],[r,2,2*bo],[n,1,FA],[t,1,LP],[t,3,3*LP],[e,1,Gw]];function s(u,f,d){const p=f<u;p&&([u,f]=[f,u]);const h=d&&typeof d.range=="function"?d:l(u,f,d),y=h?h.range(u,+f+1):[];return p?y.reverse():y}function l(u,f,d){const p=Math.abs(f-u)/d,h=_A(([,,g])=>g).right(o,p);if(h===o.length)return e.every(KO(u/Gw,f/Gw,d));if(h===0)return ky.every(Math.max(KO(u,f,d),1));const[y,m]=o[p/o[h-1][2]<o[h][2]/p?h-1:h];return y.every(m)}return[s,l]}const[$de,Dde]=g4(wo,KA,Bx,m4,VA,HA),[Ide,kde]=g4(xo,GA,Lx,_m,qA,UA);function Kw(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 Yw(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 Qd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Lde(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Zd(i),f=Jd(i),d=Zd(a),p=Jd(a),h=Zd(o),y=Jd(o),m=Zd(s),g=Jd(s),b=Zd(l),v=Jd(l),w={a:B,A:L,b:k,B:I,c:null,d:qP,e:qP,f:spe,g:vpe,G:bpe,H:ipe,I:ape,j:ope,L:v4,m:lpe,M:upe,p:V,q:M,Q:KP,s:YP,S:cpe,u:fpe,U:dpe,V:ppe,w:hpe,W:mpe,x:null,X:null,y:gpe,Y:ype,Z:xpe,"%":GP},S={a:H,A:G,b:U,B:Y,c:null,d:VP,e:VP,f:jpe,g:$pe,G:Ipe,H:wpe,I:Spe,j:Ope,L:b4,m:Epe,M:Tpe,p:X,q:te,Q:KP,s:YP,S:Ape,u:Cpe,U:_pe,V:Npe,w:Rpe,W:Mpe,x:null,X:null,y:Ppe,Y:Dpe,Z:kpe,"%":GP},O={a:C,A:_,b:$,B:D,c:N,d:UP,e:UP,f:epe,g:FP,G:zP,H:HP,I:HP,j:Wde,L:Jde,m:Xde,M:Qde,p:A,q:Yde,Q:npe,s:rpe,S:Zde,u:Hde,U:qde,V:Vde,w:Ude,W:Gde,x:P,X:R,y:FP,Y:zP,Z:Kde,"%":tpe};w.x=j(n,w),w.X=j(r,w),w.c=j(t,w),S.x=j(n,S),S.X=j(r,S),S.c=j(t,S);function j(q,ee){return function(J){var K=[],oe=-1,Q=0,ae=q.length,ue,ye,Ie;for(J instanceof Date||(J=new Date(+J));++oe<ae;)q.charCodeAt(oe)===37&&(K.push(q.slice(Q,oe)),(ye=BP[ue=q.charAt(++oe)])!=null?ue=q.charAt(++oe):ye=ue==="e"?" ":"0",(Ie=ee[ue])&&(ue=Ie(J,ye)),K.push(ue),Q=oe+1);return K.push(q.slice(Q,oe)),K.join("")}}function E(q,ee){return function(J){var K=Qd(1900,void 0,1),oe=T(K,q,J+="",0),Q,ae;if(oe!=J.length)return null;if("Q"in K)return new Date(K.Q);if("s"in K)return new Date(K.s*1e3+("L"in K?K.L:0));if(ee&&!("Z"in K)&&(K.Z=0),"p"in K&&(K.H=K.H%12+K.p*12),K.m===void 0&&(K.m="q"in K?K.q:0),"V"in K){if(K.V<1||K.V>53)return null;"w"in K||(K.w=1),"Z"in K?(Q=Yw(Qd(K.y,0,1)),ae=Q.getUTCDay(),Q=ae>4||ae===0?By.ceil(Q):By(Q),Q=kx.offset(Q,(K.V-1)*7),K.y=Q.getUTCFullYear(),K.m=Q.getUTCMonth(),K.d=Q.getUTCDate()+(K.w+6)%7):(Q=Kw(Qd(K.y,0,1)),ae=Q.getDay(),Q=ae>4||ae===0?Ly.ceil(Q):Ly(Q),Q=_m.offset(Q,(K.V-1)*7),K.y=Q.getFullYear(),K.m=Q.getMonth(),K.d=Q.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),ae="Z"in K?Yw(Qd(K.y,0,1)).getUTCDay():Kw(Qd(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(ae+5)%7:K.w+K.U*7-(ae+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,Yw(K)):Kw(K)}}function T(q,ee,J,K){for(var oe=0,Q=ee.length,ae=J.length,ue,ye;oe<Q;){if(K>=ae)return-1;if(ue=ee.charCodeAt(oe++),ue===37){if(ue=ee.charAt(oe++),ye=O[ue in BP?ee.charAt(oe++):ue],!ye||(K=ye(q,J,K))<0)return-1}else if(ue!=J.charCodeAt(K++))return-1}return K}function A(q,ee,J){var K=u.exec(ee.slice(J));return K?(q.p=f.get(K[0].toLowerCase()),J+K[0].length):-1}function C(q,ee,J){var K=h.exec(ee.slice(J));return K?(q.w=y.get(K[0].toLowerCase()),J+K[0].length):-1}function _(q,ee,J){var K=d.exec(ee.slice(J));return K?(q.w=p.get(K[0].toLowerCase()),J+K[0].length):-1}function $(q,ee,J){var K=b.exec(ee.slice(J));return K?(q.m=v.get(K[0].toLowerCase()),J+K[0].length):-1}function D(q,ee,J){var K=m.exec(ee.slice(J));return K?(q.m=g.get(K[0].toLowerCase()),J+K[0].length):-1}function N(q,ee,J){return T(q,t,ee,J)}function P(q,ee,J){return T(q,n,ee,J)}function R(q,ee,J){return T(q,r,ee,J)}function B(q){return o[q.getDay()]}function L(q){return a[q.getDay()]}function k(q){return l[q.getMonth()]}function I(q){return s[q.getMonth()]}function V(q){return i[+(q.getHours()>=12)]}function M(q){return 1+~~(q.getMonth()/3)}function H(q){return o[q.getUTCDay()]}function G(q){return a[q.getUTCDay()]}function U(q){return l[q.getUTCMonth()]}function Y(q){return s[q.getUTCMonth()]}function X(q){return i[+(q.getUTCHours()>=12)]}function te(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var ee=j(q+="",w);return ee.toString=function(){return q},ee},parse:function(q){var ee=E(q+="",!1);return ee.toString=function(){return q},ee},utcFormat:function(q){var ee=j(q+="",S);return ee.toString=function(){return q},ee},utcParse:function(q){var ee=E(q+="",!0);return ee.toString=function(){return q},ee}}}var BP={"-":"",_:" ",0:"0"},Ln=/^\s*\d+/,Bde=/^%/,zde=/[\\^$*+?|[\]().{}]/g;function ut(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function Fde(e){return e.replace(zde,"\\$&")}function Zd(e){return new RegExp("^(?:"+e.map(Fde).join("|")+")","i")}function Jd(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Ude(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Hde(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Vde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function zP(e,t,n){var r=Ln.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function FP(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Kde(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yde(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Xde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function UP(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Wde(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function HP(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function epe(e,t,n){var r=Ln.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function tpe(e,t,n){var r=Bde.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function npe(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function rpe(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function qP(e,t){return ut(e.getDate(),t,2)}function ipe(e,t){return ut(e.getHours(),t,2)}function ape(e,t){return ut(e.getHours()%12||12,t,2)}function ope(e,t){return ut(1+_m.count(xo(e),e),t,3)}function v4(e,t){return ut(e.getMilliseconds(),t,3)}function spe(e,t){return v4(e,t)+"000"}function lpe(e,t){return ut(e.getMonth()+1,t,2)}function upe(e,t){return ut(e.getMinutes(),t,2)}function cpe(e,t){return ut(e.getSeconds(),t,2)}function fpe(e){var t=e.getDay();return t===0?7:t}function dpe(e,t){return ut(Lx.count(xo(e)-1,e),t,2)}function y4(e){var t=e.getDay();return t>=4||t===0?Nf(e):Nf.ceil(e)}function ppe(e,t){return e=y4(e),ut(Nf.count(xo(e),e)+(xo(e).getDay()===4),t,2)}function hpe(e){return e.getDay()}function mpe(e,t){return ut(Ly.count(xo(e)-1,e),t,2)}function gpe(e,t){return ut(e.getFullYear()%100,t,2)}function vpe(e,t){return e=y4(e),ut(e.getFullYear()%100,t,2)}function ype(e,t){return ut(e.getFullYear()%1e4,t,4)}function bpe(e,t){var n=e.getDay();return e=n>=4||n===0?Nf(e):Nf.ceil(e),ut(e.getFullYear()%1e4,t,4)}function xpe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ut(t/60|0,"0",2)+ut(t%60,"0",2)}function VP(e,t){return ut(e.getUTCDate(),t,2)}function wpe(e,t){return ut(e.getUTCHours(),t,2)}function Spe(e,t){return ut(e.getUTCHours()%12||12,t,2)}function Ope(e,t){return ut(1+kx.count(wo(e),e),t,3)}function b4(e,t){return ut(e.getUTCMilliseconds(),t,3)}function jpe(e,t){return b4(e,t)+"000"}function Epe(e,t){return ut(e.getUTCMonth()+1,t,2)}function Tpe(e,t){return ut(e.getUTCMinutes(),t,2)}function Ape(e,t){return ut(e.getUTCSeconds(),t,2)}function Cpe(e){var t=e.getUTCDay();return t===0?7:t}function _pe(e,t){return ut(Bx.count(wo(e)-1,e),t,2)}function x4(e){var t=e.getUTCDay();return t>=4||t===0?Rf(e):Rf.ceil(e)}function Npe(e,t){return e=x4(e),ut(Rf.count(wo(e),e)+(wo(e).getUTCDay()===4),t,2)}function Rpe(e){return e.getUTCDay()}function Mpe(e,t){return ut(By.count(wo(e)-1,e),t,2)}function Ppe(e,t){return ut(e.getUTCFullYear()%100,t,2)}function $pe(e,t){return e=x4(e),ut(e.getUTCFullYear()%100,t,2)}function Dpe(e,t){return ut(e.getUTCFullYear()%1e4,t,4)}function Ipe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Rf(e):Rf.ceil(e),ut(e.getUTCFullYear()%1e4,t,4)}function kpe(){return"+0000"}function GP(){return"%"}function KP(e){return+e}function YP(e){return Math.floor(+e/1e3)}var Vu,w4,S4;Lpe({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 Lpe(e){return Vu=Lde(e),w4=Vu.format,Vu.parse,S4=Vu.utcFormat,Vu.utcParse,Vu}function Bpe(e){return new Date(e)}function zpe(e){return e instanceof Date?+e:+new Date(+e)}function YA(e,t,n,r,i,a,o,s,l,u){var f=$A(),d=f.invert,p=f.domain,h=u(".%L"),y=u(":%S"),m=u("%I:%M"),g=u("%I %p"),b=u("%a %d"),v=u("%b %d"),w=u("%B"),S=u("%Y");function O(j){return(l(j)<j?h:s(j)<j?y:o(j)<j?m:a(j)<j?g:r(j)<j?i(j)<j?b:v:n(j)<j?w:S)(j)}return f.invert=function(j){return new Date(d(j))},f.domain=function(j){return arguments.length?p(Array.from(j,zpe)):p().map(Bpe)},f.ticks=function(j){var E=p();return e(E[0],E[E.length-1],j??10)},f.tickFormat=function(j,E){return E==null?O:u(E)},f.nice=function(j){var E=p();return(!j||typeof j.range!="function")&&(j=t(E[0],E[E.length-1],j??10)),j?p(l4(E,j)):f},f.copy=function(){return Cm(f,YA(e,t,n,r,i,a,o,s,l,u))},f}function Fpe(){return Mi.apply(YA(Ide,kde,xo,GA,Lx,_m,qA,UA,Al,w4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Upe(){return Mi.apply(YA($de,Dde,wo,KA,Bx,kx,VA,HA,Al,S4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function zx(){var e=0,t=1,n,r,i,a,o=Sr,s=!1,l;function u(d){return d==null||isNaN(d=+d)?l:o(i===0?.5:(d=(a(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(p){var h,y;return arguments.length?([h,y]=p,o=d(h,y),u):[o(0),o(1)]}}return u.range=f(Ad),u.rangeRound=f(PA),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),u}}function Zs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function O4(){var e=Qs(zx()(Sr));return e.copy=function(){return Zs(e,O4())},Po.apply(e,arguments)}function j4(){var e=kA(zx()).domain([1,10]);return e.copy=function(){return Zs(e,j4()).base(e.base())},Po.apply(e,arguments)}function E4(){var e=LA(zx());return e.copy=function(){return Zs(e,E4()).constant(e.constant())},Po.apply(e,arguments)}function XA(){var e=BA(zx());return e.copy=function(){return Zs(e,XA()).exponent(e.exponent())},Po.apply(e,arguments)}function Hpe(){return XA.apply(null,arguments).exponent(.5)}function T4(){var e=[],t=Sr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Tm(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ns),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>_fe(e,a/r))},n.copy=function(){return T4(t).domain(e)},Po.apply(n,arguments)}function Fx(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,u=Sr,f,d=!1,p;function h(m){return isNaN(m=+m)?p:(m=.5+((m=+f(m))-a)*(r*m<r*a?s:l),u(d?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,n]=m,i=f(e=+e),a=f(t=+t),o=f(n=+n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,h):[e,t,n]},h.clamp=function(m){return arguments.length?(d=!!m,h):d},h.interpolator=function(m){return arguments.length?(u=m,h):u};function y(m){return function(g){var b,v,w;return arguments.length?([b,v,w]=g,u=tde(m,[b,v,w]),h):[u(0),u(.5),u(1)]}}return h.range=y(Ad),h.rangeRound=y(PA),h.unknown=function(m){return arguments.length?(p=m,h):p},function(m){return f=m,i=m(e),a=m(t),o=m(n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,h}}function A4(){var e=Qs(Fx()(Sr));return e.copy=function(){return Zs(e,A4())},Po.apply(e,arguments)}function C4(){var e=kA(Fx()).domain([.1,1,10]);return e.copy=function(){return Zs(e,C4()).base(e.base())},Po.apply(e,arguments)}function _4(){var e=LA(Fx());return e.copy=function(){return Zs(e,_4()).constant(e.constant())},Po.apply(e,arguments)}function WA(){var e=BA(Fx());return e.copy=function(){return Zs(e,WA()).exponent(e.exponent())},Po.apply(e,arguments)}function qpe(){return WA.apply(null,arguments).exponent(.5)}const XP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Sh,scaleDiverging:A4,scaleDivergingLog:C4,scaleDivergingPow:WA,scaleDivergingSqrt:qpe,scaleDivergingSymlog:_4,scaleIdentity:s4,scaleImplicit:YO,scaleLinear:Iy,scaleLog:u4,scaleOrdinal:NA,scalePoint:Bp,scalePow:zA,scaleQuantile:d4,scaleQuantize:p4,scaleRadial:f4,scaleSequential:O4,scaleSequentialLog:j4,scaleSequentialPow:XA,scaleSequentialQuantile:T4,scaleSequentialSqrt:Hpe,scaleSequentialSymlog:E4,scaleSqrt:jde,scaleSymlog:c4,scaleThreshold:h4,scaleTime:Fpe,scaleUtc:Upe,tickFormat:o4},Symbol.toStringTag,{value:"Module"}));var Vpe=gd;function Gpe(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!Vpe(o):n(o,s)))var s=o,l=a}return l}var Ux=Gpe;function Kpe(e,t){return e>t}var N4=Kpe,Ype=Ux,Xpe=N4,Wpe=Ed;function Qpe(e){return e&&e.length?Ype(e,Wpe,Xpe):void 0}var Zpe=Qpe;const gs=vt(Zpe);function Jpe(e,t){return e<t}var R4=Jpe,ehe=Ux,the=R4,nhe=Ed;function rhe(e){return e&&e.length?ehe(e,nhe,the):void 0}var ihe=rhe;const Hx=vt(ihe);var ahe=cA,ohe=Pa,she=zz,lhe=zr;function uhe(e,t){var n=lhe(e)?ahe:she;return n(e,ohe(t))}var che=uhe,fhe=Lz,dhe=che;function phe(e,t){return fhe(dhe(e,t),1)}var hhe=phe;const mhe=vt(hhe);var ghe=EA;function vhe(e,t){return ghe(e,t)}var yhe=vhe;const uu=vt(yhe);var Cd=1e9,bhe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},ZA,Vt=!0,Ai="[DecimalError] ",Yl=Ai+"Invalid argument: ",QA=Ai+"Exponent out of range: ",_d=Math.floor,xl=Math.pow,xhe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yr,Cn=1e7,Bt=7,M4=9007199254740991,zy=_d(M4/Bt),xe={};xe.absoluteValue=xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};xe.comparedTo=xe.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Bt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};xe.dividedBy=xe.div=function(e){return ao(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,n=t.constructor;return At(ao(t,new n(e),0,1),n.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return cn(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Yr))throw Error(Ai+"NaN");if(n.s<1)throw Error(Ai+(n.s?"NaN":"-Infinity"));return n.eq(Yr)?new r(0):(Vt=!1,t=ao(Ah(n,a),Ah(e,a),a),Vt=!0,At(t,i))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?D4(t,e):P4(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ai+"NaN");return n.s?(Vt=!1,t=ao(n,e,0,1).times(e),Vt=!0,n.minus(t)):At(new r(n),i)};xe.naturalExponential=xe.exp=function(){return $4(this)};xe.naturalLogarithm=xe.ln=function(){return Ah(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?P4(t,e):D4(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Yl+e);if(t=cn(i)+1,r=i.d.length-1,n=r*Bt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};xe.squareRoot=xe.sqrt=function(){var e,t,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ai+"NaN")}for(e=cn(s),Vt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ga(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=_d((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),r=new l(t)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(ao(s,a,o+2)).times(.5),ga(a.d).slice(0,o)===(t=ga(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(At(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return Vt=!0,At(r,n)};xe.times=xe.mul=function(e){var t,n,r,i,a,o,s,l,u,f=this,d=f.constructor,p=f.d,h=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=p.length,u=h.length,l<u&&(a=p,p=h,h=a,o=l,l=u,u=o),a=[],o=l+u,r=o;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=a[i]+h[r]*p[i-r-1]+t,a[i--]=s%Cn|0,t=s/Cn|0;a[i]=(a[i]+t)%Cn|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,Vt?At(e,d.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Aa(e,0,Cd),t===void 0?t=r.rounding:Aa(t,0,8),At(n,e+cn(n)+1,t))};xe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=cu(r,!0):(Aa(e,0,Cd),t===void 0?t=i.rounding:Aa(t,0,8),r=At(new i(r),e+1,t),n=cu(r,!0,e+1)),n};xe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?cu(i):(Aa(e,0,Cd),t===void 0?t=a.rounding:Aa(t,0,8),r=At(new a(i),e+cn(i)+1,t),n=cu(r.abs(),!1,e+cn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return At(new t(e),cn(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,n,r,i,a,o,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(Yr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ai+"Infinity");return s}if(s.eq(Yr))return s;if(r=l.precision,e.eq(Yr))return At(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=f<0?-f:f)<=M4){for(i=new l(Yr),t=Math.ceil(r/Bt+4),Vt=!1;n%2&&(i=i.times(s),QP(i.d,t)),n=_d(n/2),n!==0;)s=s.times(s),QP(s.d,t);return Vt=!0,e.s<0?new l(Yr).div(i):At(i,r)}}else if(a<0)throw Error(Ai+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Vt=!1,i=e.times(Ah(s,r+u)),Vt=!0,i=$4(i),i.s=a,i};xe.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=cn(i),r=cu(i,n<=a.toExpNeg||n>=a.toExpPos)):(Aa(e,1,Cd),t===void 0?t=a.rounding:Aa(t,0,8),i=At(new a(i),e,t),n=cn(i),r=cu(i,e<=n||n<=a.toExpNeg,e)),r};xe.toSignificantDigits=xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Aa(e,1,Cd),t===void 0?t=r.rounding:Aa(t,0,8)),At(new r(n),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=cn(e),n=e.constructor;return cu(e,t<=n.toExpNeg||t>=n.toExpPos)};function P4(e,t){var n,r,i,a,o,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Vt?At(t,d):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=u.length):(r=u,i=o,s=l.length),o=Math.ceil(d/Bt),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,r=u,u=l,l=r),n=0;a;)n=(l[--a]=l[a]+u[a]+n)/Cn|0,l[a]%=Cn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Vt?At(t,d):t}function Aa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Yl+e)}function ga(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=Bt-r.length,n&&(a+=Zo(n)),a+=r;o=e[t],r=o+"",n=Bt-r.length,n&&(a+=Zo(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var ao=function(){function e(r,i){var a,o=0,s=r.length;for(r=r.slice();s--;)a=r[s]*i+o,r[s]=a%Cn|0,o=a/Cn|0;return o&&r.unshift(o),r}function t(r,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*Cn+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var s,l,u,f,d,p,h,y,m,g,b,v,w,S,O,j,E,T,A=r.constructor,C=r.s==i.s?1:-1,_=r.d,$=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(Ai+"Division by zero");for(l=r.e-i.e,E=$.length,O=_.length,h=new A(C),y=h.d=[],u=0;$[u]==(_[u]||0);)++u;if($[u]>(_[u]||0)&&--l,a==null?v=a=A.precision:o?v=a+(cn(r)-cn(i))+1:v=a,v<0)return new A(0);if(v=v/Bt+2|0,u=0,E==1)for(f=0,$=$[0],v++;(u<O||f)&&v--;u++)w=f*Cn+(_[u]||0),y[u]=w/$|0,f=w%$|0;else{for(f=Cn/($[0]+1)|0,f>1&&($=e($,f),_=e(_,f),E=$.length,O=_.length),S=E,m=_.slice(0,E),g=m.length;g<E;)m[g++]=0;T=$.slice(),T.unshift(0),j=$[0],$[1]>=Cn/2&&++j;do f=0,s=t($,m,E,g),s<0?(b=m[0],E!=g&&(b=b*Cn+(m[1]||0)),f=b/j|0,f>1?(f>=Cn&&(f=Cn-1),d=e($,f),p=d.length,g=m.length,s=t(d,m,p,g),s==1&&(f--,n(d,E<p?T:$,p))):(f==0&&(s=f=1),d=$.slice()),p=d.length,p<g&&d.unshift(0),n(m,d,g),s==-1&&(g=m.length,s=t($,m,E,g),s<1&&(f++,n(m,E<g?T:$,g))),g=m.length):s===0&&(f++,m=[0]),y[u++]=f,s&&m[0]?m[g++]=_[S]||0:(m=[_[S]],g=1);while((S++<O||m[0]!==void 0)&&v--)}return y[0]||y.shift(),h.e=l,At(h,o?a+cn(h)+1:a)}}();function $4(e,t){var n,r,i,a,o,s,l=0,u=0,f=e.constructor,d=f.precision;if(cn(e)>16)throw Error(QA+cn(e));if(!e.s)return new f(Yr);for(Vt=!1,s=d,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(xl(2,u))/Math.LN10*2+5|0,s+=r,n=i=a=new f(Yr),f.precision=s;;){if(i=At(i.times(e),s),n=n.times(++l),o=a.plus(ao(i,n,s)),ga(o.d).slice(0,s)===ga(a.d).slice(0,s)){for(;u--;)a=At(a.times(a),s);return f.precision=d,t==null?(Vt=!0,At(a,d)):a}a=o}}function cn(e){for(var t=e.e*Bt,n=e.d[0];n>=10;n/=10)t++;return t}function Xw(e,t,n){if(t>e.LN10.sd())throw Vt=!0,n&&(e.precision=n),Error(Ai+"LN10 precision limit exceeded");return At(new e(e.LN10),t)}function Zo(e){for(var t="";e--;)t+="0";return t}function Ah(e,t){var n,r,i,a,o,s,l,u,f,d=1,p=10,h=e,y=h.d,m=h.constructor,g=m.precision;if(h.s<1)throw Error(Ai+(h.s?"NaN":"-Infinity"));if(h.eq(Yr))return new m(0);if(t==null?(Vt=!1,u=g):u=t,h.eq(10))return t==null&&(Vt=!0),Xw(m,u);if(u+=p,m.precision=u,n=ga(y),r=n.charAt(0),a=cn(h),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=ga(h.d),r=n.charAt(0),d++;a=cn(h),r>1?(h=new m("0."+n),a++):h=new m(r+"."+n.slice(1))}else return l=Xw(m,u+2,g).times(a+""),h=Ah(new m(r+"."+n.slice(1)),u-p).plus(l),m.precision=g,t==null?(Vt=!0,At(h,g)):h;for(s=o=h=ao(h.minus(Yr),h.plus(Yr),u),f=At(h.times(h),u),i=3;;){if(o=At(o.times(f),u),l=s.plus(ao(o,new m(i),u)),ga(l.d).slice(0,u)===ga(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Xw(m,u+2,g).times(a+""))),s=ao(s,new m(d),u),m.precision=g,t==null?(Vt=!0,At(s,g)):s;s=l,i+=2}}function WP(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=_d(n/Bt),e.d=[],r=(n+1)%Bt,n<0&&(r+=Bt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Bt;r<i;)e.d.push(+t.slice(r,r+=Bt));t=t.slice(r),r=Bt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Vt&&(e.e>zy||e.e<-zy))throw Error(QA+n)}else e.s=0,e.e=0,e.d=[0];return e}function At(e,t,n){var r,i,a,o,s,l,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Bt,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/Bt),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;r%=Bt,i=r-Bt+o}if(n!==void 0&&(a=xl(10,o-i-1),s=u/a%10|0,l=t<0||d[f+1]!==void 0||u%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/xl(10,o-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(a=cn(e),d.length=1,t=t-a-1,d[0]=xl(10,(Bt-t%Bt)%Bt),e.e=_d(-t/Bt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,a=1,f--):(d.length=f+1,a=xl(10,Bt-r),d[f]=i>0?(u/xl(10,o-i)%xl(10,i)|0)*a:0),l)for(;;)if(f==0){(d[0]+=a)==Cn&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=Cn)break;d[f--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(Vt&&(e.e>zy||e.e<-zy))throw Error(QA+cn(e));return e}function D4(e,t){var n,r,i,a,o,s,l,u,f,d,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Vt?At(t,h):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),o=u-r,o){for(f=o<0,f?(n=l,o=-o,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(h/Bt),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){f=l[i]<d[i];break}o=0}for(f&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>o;){if(l[--i]<d[i]){for(a=i;a&&l[--a]===0;)l[a]=Cn-1;--l[a],l[i]+=Cn}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Vt?At(t,h):t):new p(0)}function cu(e,t,n){var r,i=cn(e),a=ga(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+Zo(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Zo(-i-1)+a,n&&(r=n-o)>0&&(a+=Zo(r))):i>=o?(a+=Zo(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Zo(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=Zo(r))),e.s<0?"-"+a:a}function QP(e,t){if(e.length>t)return e.length=t,!0}function I4(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Yl+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return WP(o,a.toString())}else if(typeof a!="string")throw Error(Yl+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,xhe.test(a))WP(o,a);else throw Error(Yl+a)}if(i.prototype=xe,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=I4,i.config=i.set=whe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function whe(e){if(!e||typeof e!="object")throw Error(Ai+"Object expected");var t,n,r,i=["precision",1,Cd,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(_d(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Yl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Yl+n+": "+r);return this}var ZA=I4(bhe);Yr=new ZA(1);const Ot=ZA;function She(e){return The(e)||Ehe(e)||jhe(e)||Ohe()}function Ohe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jhe(e,t){if(e){if(typeof e=="string")return ZO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZO(e,t)}}function Ehe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function The(e){if(Array.isArray(e))return ZO(e)}function ZO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ahe=function(t){return t},k4={},L4=function(t){return t===k4},ZP=function(t){return function n(){return arguments.length===0||arguments.length===1&&L4(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Che=function e(t,n){return t===1?n:ZP(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==k4}).length;return o>=t?n.apply(void 0,i):e(t-o,ZP(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var f=i.map(function(d){return L4(d)?l.shift():d});return n.apply(void 0,She(f).concat(l))}))})},qx=function(t){return Che(t.length,t)},JO=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},_he=qx(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Nhe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Ahe;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},ej=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},B4=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n&&a.every(function(s,l){return s===n[l]})||(n=a,r=t.apply(void 0,a)),r}};function Rhe(e){var t;return e===0?t=1:t=Math.floor(new Ot(e).abs().log(10).toNumber())+1,t}function Mhe(e,t,n){for(var r=new Ot(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var Phe=qx(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),$he=qx(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Dhe=qx(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Vx={rangeStep:Mhe,getDigitCount:Rhe,interpolateNumber:Phe,uninterpolateNumber:$he,uninterpolateTruncation:Dhe};function tj(e){return Lhe(e)||khe(e)||z4(e)||Ihe()}function Ihe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
97
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function khe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Lhe(e){if(Array.isArray(e))return nj(e)}function Ch(e,t){return Fhe(e)||zhe(e,t)||z4(e,t)||Bhe()}function Bhe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z4(e,t){if(e){if(typeof e=="string")return nj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nj(e,t)}}function nj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zhe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function Fhe(e){if(Array.isArray(e))return e}function F4(e){var t=Ch(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function U4(e,t,n){if(e.lte(0))return new Ot(0);var r=Vx.getDigitCount(e.toNumber()),i=new Ot(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Ot(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return t?l:new Ot(Math.ceil(l))}function Uhe(e,t,n){var r=1,i=new Ot(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Ot(10).pow(Vx.getDigitCount(e)-1),i=new Ot(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Ot(Math.floor(e)))}else e===0?i=new Ot(Math.floor((t-1)/2)):n||(i=new Ot(Math.floor(e)));var o=Math.floor((t-1)/2),s=Nhe(_he(function(l){return i.add(new Ot(l-o).mul(r)).toNumber()}),JO);return s(0,t)}function H4(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ot(0),tickMin:new Ot(0),tickMax:new Ot(0)};var a=U4(new Ot(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Ot(0):(o=new Ot(e).add(t).div(2),o=o.sub(new Ot(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ot(t).sub(o).div(a).toNumber()),u=s+l+1;return u>n?H4(e,t,n,r,i+1):(u<n&&(l=t>0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:a,tickMin:o.sub(new Ot(s).mul(a)),tickMax:o.add(new Ot(l).mul(a))})}function Hhe(e){var t=Ch(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=F4([n,r]),l=Ch(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(tj(JO(0,i-1).map(function(){return 1/0}))):[].concat(tj(JO(0,i-1).map(function(){return-1/0})),[f]);return n>r?ej(d):d}if(u===f)return Uhe(u,i,a);var p=H4(u,f,o,a),h=p.step,y=p.tickMin,m=p.tickMax,g=Vx.rangeStep(y,m.add(new Ot(.1).mul(h)),h);return n>r?ej(g):g}function qhe(e,t){var n=Ch(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=F4([r,i]),s=Ch(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var f=Math.max(t,2),d=U4(new Ot(u).sub(l).div(f-1),a,0),p=[].concat(tj(Vx.rangeStep(new Ot(l),new Ot(u).sub(new Ot(.99).mul(d)),d)),[u]);return r>i?ej(p):p}var Vhe=B4(Hhe),Ghe=B4(qhe),Khe="Invariant failed";function fu(e,t){throw new Error(Khe)}var Yhe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function Fy(){return Fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fy.apply(this,arguments)}function Xhe(e,t){return Jhe(e)||Zhe(e,t)||Qhe(e,t)||Whe()}function Whe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
99
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qhe(e,t){if(e){if(typeof e=="string")return JP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JP(e,t)}}function JP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Jhe(e){if(Array.isArray(e))return e}function eme(e,t){if(e==null)return{};var n=tme(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rme(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G4(r.key),r)}}function ime(e,t,n){return t&&rme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ame(e,t,n){return t=Uy(t),ome(e,q4()?Reflect.construct(t,n||[],Uy(e).constructor):t.apply(e,n))}function ome(e,t){if(t&&(Mf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sme(e)}function sme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q4=function(){return!!e})()}function Uy(e){return Uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uy(e)}function lme(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rj(e,t)}function rj(e,t){return rj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rj(e,t)}function V4(e,t,n){return t=G4(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G4(e){var t=ume(e,"string");return Mf(t)=="symbol"?t:t+""}function ume(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gx=function(e){function t(){return nme(this,t),ame(this,t,arguments)}return lme(t,e),ime(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,s=r.dataKey,l=r.data,u=r.dataPointFormatter,f=r.xAxis,d=r.yAxis,p=eme(r,Yhe),h=Ae(p,!1);this.props.direction==="x"&&f.type!=="number"&&fu();var y=l.map(function(m){var g=u(m,s),b=g.x,v=g.y,w=g.value,S=g.errorVal;if(!S)return null;var O=[],j,E;if(Array.isArray(S)){var T=Xhe(S,2);j=T[0],E=T[1]}else j=E=S;if(a==="vertical"){var A=f.scale,C=v+i,_=C+o,$=C-o,D=A(w-j),N=A(w+E);O.push({x1:N,y1:_,x2:N,y2:$}),O.push({x1:D,y1:C,x2:N,y2:C}),O.push({x1:D,y1:_,x2:D,y2:$})}else if(a==="horizontal"){var P=d.scale,R=b+i,B=R-o,L=R+o,k=P(w-j),I=P(w+E);O.push({x1:B,y1:I,x2:L,y2:I}),O.push({x1:R,y1:k,x2:R,y2:I}),O.push({x1:B,y1:k,x2:L,y2:k})}return z.createElement(Ye,Fy({className:"recharts-errorBar",key:"bar-".concat(O.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},h),O.map(function(V){return z.createElement("line",Fy({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return z.createElement(Ye,{className:"recharts-errorBars"},y)}}])}(z.Component);V4(Gx,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});V4(Gx,"displayName","ErrorBar");function _h(e){"@babel/helpers - typeof";return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_h(e)}function e2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e2(Object(n),!0).forEach(function(r){cme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cme(e,t,n){return t=fme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fme(e){var t=dme(e,"string");return _h(t)=="symbol"?t:t+""}function dme(e,t){if(_h(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_h(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var K4=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=qr(n,Gl);if(!o)return null;var s=Gl.defaultProps,l=s!==void 0?fl(fl({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(r||[]).reduce(function(f,d){var p=d.item,h=d.props,y=h.sectors||h.data||[];return f.concat(y.map(function(m){return{type:o.props.iconType||p.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(r||[]).map(function(f){var d=f.item,p=d.type.defaultProps,h=p!==void 0?fl(fl({},p),d.props):{},y=h.dataKey,m=h.name,g=h.legendType,b=h.hide;return{inactive:b,dataKey:y,type:l.iconType||g||"square",color:JA(d),value:m||y,payload:h}}),fl(fl(fl({},l),Gl.getWithHeight(o,i)),{},{payload:u,item:o})};function Nh(e){"@babel/helpers - typeof";return Nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nh(e)}function t2(e){return gme(e)||mme(e)||hme(e)||pme()}function pme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
100
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hme(e,t){if(e){if(typeof e=="string")return ij(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ij(e,t)}}function mme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gme(e){if(Array.isArray(e))return ij(e)}function ij(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(n),!0).forEach(function(r){Lc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lc(e,t,n){return t=vme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vme(e){var t=yme(e,"string");return Nh(t)=="symbol"?t:t+""}function yme(e,t){if(Nh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ln(e,t,n){return Ue(e)||Ue(t)?n:Sn(t)?ti(e,t,n):Ce(t)?t(e):n}function zp(e,t,n,r){var i=mhe(e,function(s){return ln(s,t)});if(n==="number"){var a=i.filter(function(s){return se(s)||parseFloat(s)});return a.length?[Hx(a),gs(a)]:[1/0,-1/0]}var o=r?i.filter(function(s){return!Ue(s)}):i;return o.map(function(s){return Sn(s)||s instanceof Date?s:""})}var bme=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u<s;u++){var f=u>0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,p=u>=s-1?i[0].coordinate:i[u+1].coordinate,h=void 0;if(Pn(d-f)!==Pn(p-d)){var y=[];if(Pn(p-d)===Pn(l[1]-l[0])){h=p;var m=d+l[1]-l[0];y[0]=Math.min(m,(m+f)/2),y[1]=Math.max(m,(m+f)/2)}else{h=f;var g=p+l[1]-l[0];y[0]=Math.min(d,(g+d)/2),y[1]=Math.max(d,(g+d)/2)}var b=[Math.min(d,(h+d)/2),Math.max(d,(h+d)/2)];if(t>b[0]&&t<=b[1]||t>=y[0]&&t<=y[1]){o=i[u].index;break}}else{var v=Math.min(f,p),w=Math.max(f,p);if(t>(v+d)/2&&t<=(w+d)/2){o=i[u].index;break}}}else for(var S=0;S<s;S++)if(S===0&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S>0&&S<s-1&&t>(r[S].coordinate+r[S-1].coordinate)/2&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S===s-1&&t>(r[S].coordinate+r[S-1].coordinate)/2){o=r[S].index;break}return o},JA=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Zt(Zt({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},xme=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l<u;l++)for(var f=a[s[l]].stackGroups,d=Object.keys(f),p=0,h=d.length;p<h;p++){var y=f[d[p]],m=y.items,g=y.cateAxisId,b=m.filter(function(E){return io(E.type).indexOf("Bar")>=0});if(b&&b.length){var v=b[0].type.defaultProps,w=v!==void 0?Zt(Zt({},v),b[0].props):b[0].props,S=w.barSize,O=w[g];o[O]||(o[O]=[]);var j=Ue(S)?n:S;o[O].push({item:b[0],stackList:b.slice(1),barSize:Ue(j)?void 0:wr(j,r,0)})}}return o},wme=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=wr(n,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,h=i/l,y=o.reduce(function(S,O){return S+O.barSize||0},0);y+=(l-1)*u,y>=i&&(y-=(l-1)*u,u=0),y>=i&&h>0&&(p=!0,h*=.9,y=l*h);var m=(i-y)/2>>0,g={offset:m-u,size:0};f=o.reduce(function(S,O){var j={item:O.item,position:{offset:g.offset+g.size+u,size:p?h:O.barSize}},E=[].concat(t2(S),[j]);return g=E[E.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(T){E.push({item:T,position:g})}),E},d)}else{var b=wr(r,i,0,!0);i-2*b-(l-1)*u<=0&&(u=0);var v=(i-2*b-(l-1)*u)/l;v>1&&(v>>=0);var w=s===+s?Math.min(v,s):v;f=o.reduce(function(S,O,j){var E=[].concat(t2(S),[{item:O.item,position:{offset:b+(v+u)*j+(v-w)/2,size:w}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(T){E.push({item:T,position:E[E.length-1].position})}),E},d)}return f},Sme=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),u=K4({children:a,legendWidth:l});if(u){var f=i||{},d=f.width,p=f.height,h=u.align,y=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&y==="middle")&&h!=="center"&&se(t[h]))return Zt(Zt({},t),{},Lc({},h,t[h]+(d||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&y!=="middle"&&se(t[y]))return Zt(Zt({},t),{},Lc({},y,t[y]+(p||0)))}return t},Ome=function(t,n,r){return Ue(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Y4=function(t,n,r,i,a){var o=n.props.children,s=ni(o,Gx).filter(function(u){return Ome(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=ln(f,r);if(Ue(d))return u;var p=Array.isArray(d)?[Hx(d),gs(d)]:[d,d],h=l.reduce(function(y,m){var g=ln(f,m,0),b=p[0]-Math.abs(Array.isArray(g)?g[0]:g),v=p[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(b,y[0]),Math.max(v,y[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},jme=function(t,n,r,i,a){var o=n.map(function(s){return Y4(t,s,r,a,i)}).filter(function(s){return!Ue(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},X4=function(t,n,r,i,a){var o=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&Y4(t,l,u,i)||zp(t,u,r,a)});if(r==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var f=0,d=u.length;f<d;f++)s[u[f]]||(s[u[f]]=!0,l.push(u[f]));return l},[])},W4=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Q4=function(t,n,r,i){if(i)return t.map(function(l){return l.coordinate});var a,o,s=t.map(function(l){return l.coordinate===n&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate});return a||s.push(n),o||s.push(r),s},eo=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Pn(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:i(p)+u,value:d,offset:u}});return f.filter(function(d){return!wd(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+u,value:d,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,p){return{coordinate:i(d)+u,value:a?a[d]:d,index:p,offset:u}})},Ww=new WeakMap,jg=function(t,n){if(typeof n!="function")return t;Ww.has(t)||Ww.set(t,new WeakMap);var r=Ww.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},Z4=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Sh(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Iy(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Bp(),realScaleType:"point"}:a==="category"?{scale:Sh(),realScaleType:"band"}:{scale:Iy(),realScaleType:"linear"};if(su(i)){var l="scale".concat(_x(i));return{scale:(XP[l]||Bp)(),realScaleType:XP[l]?l:"point"}}return Ce(i)?{scale:i}:{scale:Bp(),realScaleType:"point"}},r2=1e-4,J4=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-r2,o=Math.max(i[0],i[1])+r2,s=t(n[0]),l=t(n[r-1]);(s<a||s>o||l<a||l>o)&&t.domain([n[0],n[r-1]])}},eF=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},tF=function(t,n){if(!n||n.length!==2||!se(n[0])||!se(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!se(t[0])||t[0]<r)&&(a[0]=r),(!se(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},Eme=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,s=0;s<n;++s){var l=wd(t[s][r][1])?t[s][r][0]:t[s][r][1];l>=0?(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1])}},Tme=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var s=wd(t[o][r][1])?t[o][r][0]:t[o][r][1];s>=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},Ame={sign:Eme,expand:Kte,none:jf,silhouette:Yte,wiggle:Xte,positive:Tme},Cme=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=Ame[r],o=Gte().keys(i).value(function(s,l){return+ln(s,l,0)}).order(_O).offset(a);return o(t)},_me=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,l={},u=s.reduce(function(d,p){var h,y=(h=p.type)!==null&&h!==void 0&&h.defaultProps?Zt(Zt({},p.type.defaultProps),p.props):p.props,m=y.stackId,g=y.hide;if(g)return d;var b=y[r],v=d[b]||{hasStack:!1,stackGroups:{}};if(Sn(m)){var w=v.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};w.items.push(p),v.hasStack=!0,v.stackGroups[m]=w}else v.stackGroups[Sd("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Zt(Zt({},d),{},Lc({},b,v))},l),f={};return Object.keys(u).reduce(function(d,p){var h=u[p];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,g){var b=h.stackGroups[g];return Zt(Zt({},m),{},Lc({},g,{numericAxisId:r,cateAxisId:i,items:b.items,stackedData:Cme(t,b.items,a)}))},y)}return Zt(Zt({},d),{},Lc({},p,h))},f)},nF=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=Vhe(u,a,s);return t.domain([Hx(f),gs(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),p=Ghe(d,a,s);return{niceTicks:p}}return null};function i2(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ue(i[t.dataKey])){var s=hy(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var l=ln(i,Ue(o)?t.dataKey:o);return Ue(l)?null:t.scale(l)}var Hy=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=ln(o,n.dataKey,n.domain[s]);return Ue(l)?null:n.scale(l)-a/2+i},rF=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},Nme=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Zt(Zt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Sn(a)){var o=n[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},Rme=function(t){return t.reduce(function(n,r){return[Hx(r.concat([n[0]]).filter(se)),gs(r.concat([n[1]]).filter(se))]},[1/0,-1/0])},iF=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,f){var d=Rme(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},a2=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,o2=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,aj=function(t,n,r){if(Ce(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(se(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(a2.test(t[0])){var a=+a2.exec(t[0])[1];i[0]=n[0]-a}else Ce(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(se(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(o2.test(t[1])){var o=+o2.exec(t[1])[1];i[1]=n[1]+o}else Ce(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},qy=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=AA(n,function(d){return d.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var u=a[s],f=a[s-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},s2=function(t,n,r){return!t||!t.length||uu(t,ti(r,"type.defaultProps.domain"))?n:t},eC=function(t,n){var r=t.type.defaultProps?Zt(Zt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,s=r.formatter,l=r.tooltipType,u=r.chartType,f=r.hide;return Zt(Zt({},Ae(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:JA(t),value:ln(n,i),type:l,payload:n,chartType:u,hide:f})};function Rh(e){"@babel/helpers - typeof";return Rh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(e)}function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(n),!0).forEach(function(r){aF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aF(e,t,n){return t=Mme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mme(e){var t=Pme(e,"string");return Rh(t)=="symbol"?t:t+""}function Pme(e,t){if(Rh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $me(e,t){return Lme(e)||kme(e,t)||Ime(e,t)||Dme()}function Dme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
101
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ime(e,t){if(e){if(typeof e=="string")return u2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u2(e,t)}}function u2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Lme(e){if(Array.isArray(e))return e}var Vy=Math.PI/180,Bme=function(t){return t*180/Math.PI},Ct=function(t,n,r,i){return{x:t+Math.cos(-Vy*i)*r,y:n+Math.sin(-Vy*i)*r}},oF=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},sF=function(t,n,r,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=wr(t.cx,o,o/2),d=wr(t.cy,s,s/2),p=oF(o,s,r),h=wr(t.innerRadius,p,0),y=wr(t.outerRadius,p,p*.8),m=Object.keys(n);return m.reduce(function(g,b){var v=n[b],w=v.domain,S=v.reversed,O;if(Ue(v.range))i==="angleAxis"?O=[l,u]:i==="radiusAxis"&&(O=[h,y]),S&&(O=[O[1],O[0]]);else{O=v.range;var j=O,E=$me(j,2);l=E[0],u=E[1]}var T=Z4(v,a),A=T.realScaleType,C=T.scale;C.domain(w).range(O),J4(C);var _=nF(C,qa(qa({},v),{},{realScaleType:A})),$=qa(qa(qa({},v),_),{},{range:O,radius:y,realScaleType:A,scale:C,cx:f,cy:d,innerRadius:h,outerRadius:y,startAngle:l,endAngle:u});return qa(qa({},g),{},aF({},b,$))},{})},zme=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},Fme=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,s=zme({x:r,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(r-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:Bme(u),angleInRadian:u}},Ume=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},Hme=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},c2=function(t,n){var r=t.x,i=t.y,a=Fme({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,u=n.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var f=Ume(n),d=f.startAngle,p=f.endAngle,h=s,y;if(d<=p){for(;h>p;)h-=360;for(;h<d;)h+=360;y=h>=d&&h<=p}else{for(;h>d;)h-=360;for(;h<p;)h+=360;y=h>=p&&h<=d}return y?qa(qa({},n),{},{radius:o,angle:Hme(h,n)}):null},lF=function(t){return!x.isValidElement(t)&&!Ce(t)&&typeof t!="boolean"?t.className:""};function Mh(e){"@babel/helpers - typeof";return Mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mh(e)}var qme=["offset"];function Vme(e){return Xme(e)||Yme(e)||Kme(e)||Gme()}function Gme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
102
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kme(e,t){if(e){if(typeof e=="string")return oj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oj(e,t)}}function Yme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xme(e){if(Array.isArray(e))return oj(e)}function oj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wme(e,t){if(e==null)return{};var n=Qme(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function f2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f2(Object(n),!0).forEach(function(r){Zme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zme(e,t,n){return t=Jme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jme(e){var t=ege(e,"string");return Mh(t)=="symbol"?t:t+""}function ege(e,t){if(Mh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ph.apply(this,arguments)}var tge=function(t){var n=t.value,r=t.formatter,i=Ue(t.children)?n:t.children;return Ce(r)?r(i):i},nge=function(t,n){var r=Pn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},rge=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,u=l.cx,f=l.cy,d=l.innerRadius,p=l.outerRadius,h=l.startAngle,y=l.endAngle,m=l.clockWise,g=(d+p)/2,b=nge(h,y),v=b>=0?1:-1,w,S;i==="insideStart"?(w=h+v*o,S=m):i==="insideEnd"?(w=y-v*o,S=!m):i==="end"&&(w=y+v*o,S=m),S=b<=0?S:!S;var O=Ct(u,f,g,w),j=Ct(u,f,g,w+(S?1:-1)*359),E="M".concat(O.x,",").concat(O.y,`
|
|
103
|
+
A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`,
|
|
104
|
+
`).concat(j.x,",").concat(j.y),T=Ue(t.id)?Sd("recharts-radial-line-"):t.id;return z.createElement("text",Ph({},r,{dominantBaseline:"central",className:ke("recharts-radial-bar-label",s)}),z.createElement("defs",null,z.createElement("path",{id:T,d:E})),z.createElement("textPath",{xlinkHref:"#".concat(T)},n))},ige=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,p=(f+d)/2;if(i==="outside"){var h=Ct(o,s,u+r,p),y=h.x,m=h.y;return{x:y,y:m,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,b=Ct(o,s,g,p),v=b.x,w=b.y;return{x:v,y:w,textAnchor:"middle",verticalAnchor:"middle"}},age=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,l=o.y,u=o.width,f=o.height,d=f>=0?1:-1,p=d*i,h=d>0?"end":"start",y=d>0?"start":"end",m=u>=0?1:-1,g=m*i,b=m>0?"end":"start",v=m>0?"start":"end";if(a==="top"){var w={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:h};return gn(gn({},w),r?{height:Math.max(l-r.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+f+p,textAnchor:"middle",verticalAnchor:y};return gn(gn({},S),r?{height:Math.max(r.y+r.height-(l+f),0),width:u}:{})}if(a==="left"){var O={x:s-g,y:l+f/2,textAnchor:b,verticalAnchor:"middle"};return gn(gn({},O),r?{width:Math.max(O.x-r.x,0),height:f}:{})}if(a==="right"){var j={x:s+u+g,y:l+f/2,textAnchor:v,verticalAnchor:"middle"};return gn(gn({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:f}:{})}var E=r?{width:u,height:f}:{};return a==="insideLeft"?gn({x:s+g,y:l+f/2,textAnchor:v,verticalAnchor:"middle"},E):a==="insideRight"?gn({x:s+u-g,y:l+f/2,textAnchor:b,verticalAnchor:"middle"},E):a==="insideTop"?gn({x:s+u/2,y:l+p,textAnchor:"middle",verticalAnchor:y},E):a==="insideBottom"?gn({x:s+u/2,y:l+f-p,textAnchor:"middle",verticalAnchor:h},E):a==="insideTopLeft"?gn({x:s+g,y:l+p,textAnchor:v,verticalAnchor:y},E):a==="insideTopRight"?gn({x:s+u-g,y:l+p,textAnchor:b,verticalAnchor:y},E):a==="insideBottomLeft"?gn({x:s+g,y:l+f-p,textAnchor:v,verticalAnchor:h},E):a==="insideBottomRight"?gn({x:s+u-g,y:l+f-p,textAnchor:b,verticalAnchor:h},E):vd(a)&&(se(a.x)||El(a.x))&&(se(a.y)||El(a.y))?gn({x:s+wr(a.x,u),y:l+wr(a.y,f),textAnchor:"end",verticalAnchor:"end"},E):gn({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},E)},oge=function(t){return"cx"in t&&se(t.cx)};function Rn(e){var t=e.offset,n=t===void 0?5:t,r=Wme(e,qme),i=gn({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!a||Ue(s)&&Ue(l)&&!x.isValidElement(u)&&!Ce(u))return null;if(x.isValidElement(u))return x.cloneElement(u,i);var h;if(Ce(u)){if(h=x.createElement(u,i),x.isValidElement(h))return h}else h=tge(i);var y=oge(a),m=Ae(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return rge(i,h,m);var g=y?ige(i):age(i);return z.createElement(lu,Ph({className:ke("recharts-label",d)},m,g,{breakAll:p}),h)}Rn.displayName="Label";var uF=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,h=t.top,y=t.left,m=t.width,g=t.height,b=t.clockWise,v=t.labelViewBox;if(v)return v;if(se(m)&&se(g)){if(se(d)&&se(p))return{x:d,y:p,width:m,height:g};if(se(h)&&se(y))return{x:h,y,width:m,height:g}}return se(d)&&se(p)?{x:d,y:p,width:0,height:0}:se(n)&&se(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},sge=function(t,n){return t?t===!0?z.createElement(Rn,{key:"label-implicit",viewBox:n}):Sn(t)?z.createElement(Rn,{key:"label-implicit",viewBox:n,value:t}):x.isValidElement(t)?t.type===Rn?x.cloneElement(t,{key:"label-implicit",viewBox:n}):z.createElement(Rn,{key:"label-implicit",content:t,viewBox:n}):Ce(t)?z.createElement(Rn,{key:"label-implicit",content:t,viewBox:n}):vd(t)?z.createElement(Rn,Ph({viewBox:n},t,{key:"label-implicit"})):null:null},lge=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=uF(t),o=ni(i,Rn).map(function(l,u){return x.cloneElement(l,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return o;var s=sge(t.label,n||a);return[s].concat(Vme(o))};Rn.parseViewBox=uF;Rn.renderCallByParent=lge;function uge(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var cge=uge;const fge=vt(cge);function $h(e){"@babel/helpers - typeof";return $h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$h(e)}var dge=["valueAccessor"],pge=["data","dataKey","clockWise","id","textBreakAll"];function hge(e){return yge(e)||vge(e)||gge(e)||mge()}function mge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
105
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gge(e,t){if(e){if(typeof e=="string")return sj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sj(e,t)}}function vge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yge(e){if(Array.isArray(e))return sj(e)}function sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gy(){return Gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gy.apply(this,arguments)}function d2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(n),!0).forEach(function(r){bge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bge(e,t,n){return t=xge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xge(e){var t=wge(e,"string");return $h(t)=="symbol"?t:t+""}function wge(e,t){if($h(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($h(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h2(e,t){if(e==null)return{};var n=Sge(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Oge=function(t){return Array.isArray(t.value)?fge(t.value):t.value};function Sa(e){var t=e.valueAccessor,n=t===void 0?Oge:t,r=h2(e,dge),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,u=h2(r,pge);return!i||!i.length?null:z.createElement(Ye,{className:"recharts-label-list"},i.map(function(f,d){var p=Ue(a)?n(f,d):ln(f&&f.payload,a),h=Ue(s)?{}:{id:"".concat(s,"-").concat(d)};return z.createElement(Rn,Gy({},Ae(f,!0),u,h,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:Rn.parseViewBox(Ue(o)?f:p2(p2({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Sa.displayName="LabelList";function jge(e,t){return e?e===!0?z.createElement(Sa,{key:"labelList-implicit",data:t}):z.isValidElement(e)||Ce(e)?z.createElement(Sa,{key:"labelList-implicit",data:t,content:e}):vd(e)?z.createElement(Sa,Gy({data:t},e,{key:"labelList-implicit"})):null:null}function Ege(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ni(r,Sa).map(function(o,s){return x.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=jge(e.label,t);return[a].concat(hge(i))}Sa.renderCallByParent=Ege;function Dh(e){"@babel/helpers - typeof";return Dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dh(e)}function lj(){return lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lj.apply(this,arguments)}function m2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function g2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m2(Object(n),!0).forEach(function(r){Tge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tge(e,t,n){return t=Age(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Age(e){var t=Cge(e,"string");return Dh(t)=="symbol"?t:t+""}function Cge(e,t){if(Dh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _ge=function(t,n){var r=Pn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Eg=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,f=l*(s?1:-1)+i,d=Math.asin(l/f)/Vy,p=u?a:a+o*d,h=Ct(n,r,f,p),y=Ct(n,r,i,p),m=u?a-o*d:a,g=Ct(n,r,f*Math.cos(d*Vy),m);return{center:h,circleTangency:y,lineTangency:g,theta:d}},cF=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=_ge(o,s),u=o+l,f=Ct(n,r,a,o),d=Ct(n,r,a,u),p="M ".concat(f.x,",").concat(f.y,`
|
|
106
|
+
A `).concat(a,",").concat(a,`,0,
|
|
107
|
+
`).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
|
|
108
|
+
`).concat(d.x,",").concat(d.y,`
|
|
109
|
+
`);if(i>0){var h=Ct(n,r,i,o),y=Ct(n,r,i,u);p+="L ".concat(y.x,",").concat(y.y,`
|
|
110
|
+
A `).concat(i,",").concat(i,`,0,
|
|
111
|
+
`).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
|
|
112
|
+
`).concat(h.x,",").concat(h.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},Nge=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Pn(f-u),p=Eg({cx:n,cy:r,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:l}),h=p.circleTangency,y=p.lineTangency,m=p.theta,g=Eg({cx:n,cy:r,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:l}),b=g.circleTangency,v=g.lineTangency,w=g.theta,S=l?Math.abs(u-f):Math.abs(u-f)-m-w;if(S<0)return s?"M ".concat(y.x,",").concat(y.y,`
|
|
113
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
114
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
115
|
+
`):cF({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var O="M ".concat(y.x,",").concat(y.y,`
|
|
116
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(h.x,",").concat(h.y,`
|
|
117
|
+
A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(b.x,",").concat(b.y,`
|
|
118
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,`
|
|
119
|
+
`);if(i>0){var j=Eg({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),E=j.circleTangency,T=j.lineTangency,A=j.theta,C=Eg({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=C.circleTangency,$=C.lineTangency,D=C.theta,N=l?Math.abs(u-f):Math.abs(u-f)-A-D;if(N<0&&o===0)return"".concat(O,"L").concat(n,",").concat(r,"Z");O+="L".concat($.x,",").concat($.y,`
|
|
120
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(_.x,",").concat(_.y,`
|
|
121
|
+
A`).concat(i,",").concat(i,",0,").concat(+(N>180),",").concat(+(d>0),",").concat(E.x,",").concat(E.y,`
|
|
122
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(T.x,",").concat(T.y,"Z")}else O+="L".concat(n,",").concat(r,"Z");return O},Rge={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},fF=function(t){var n=g2(g2({},Rge),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,p=n.className;if(o<a||f===d)return null;var h=ke("recharts-sector",p),y=o-a,m=wr(s,y,0,!0),g;return m>0&&Math.abs(f-d)<360?g=Nge({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,y/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:d}):g=cF({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),z.createElement("path",lj({},Ae(n,!0),{className:h,d:g,role:"img"}))};function Ih(e){"@babel/helpers - typeof";return Ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ih(e)}function uj(){return uj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uj.apply(this,arguments)}function v2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function y2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v2(Object(n),!0).forEach(function(r){Mge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mge(e,t,n){return t=Pge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pge(e){var t=$ge(e,"string");return Ih(t)=="symbol"?t:t+""}function $ge(e,t){if(Ih(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ih(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var b2={curveBasisClosed:Dte,curveBasisOpen:Ite,curveBasis:$te,curveBumpX:xte,curveBumpY:wte,curveLinearClosed:kte,curveLinear:Rx,curveMonotoneX:Lte,curveMonotoneY:Bte,curveNatural:zte,curveStep:Fte,curveStepAfter:Hte,curveStepBefore:Ute},Tg=function(t){return t.x===+t.x&&t.y===+t.y},ep=function(t){return t.x},tp=function(t){return t.y},Dge=function(t,n){if(Ce(t))return t;var r="curve".concat(_x(t));return(r==="curveMonotone"||r==="curveBump")&&n?b2["".concat(r).concat(n==="vertical"?"Y":"X")]:b2[r]||Rx},Ige=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,f=Dge(r,s),d=u?a.filter(function(m){return Tg(m)}):a,p;if(Array.isArray(o)){var h=u?o.filter(function(m){return Tg(m)}):o,y=d.map(function(m,g){return y2(y2({},m),{},{base:h[g]})});return s==="vertical"?p=gg().y(tp).x1(ep).x0(function(m){return m.base.x}):p=gg().x(ep).y1(tp).y0(function(m){return m.base.y}),p.defined(Tg).curve(f),p(y)}return s==="vertical"&&se(o)?p=gg().y(tp).x1(ep).x0(o):se(o)?p=gg().x(ep).y1(tp).y0(o):p=rz().x(ep).y(tp),p.defined(Tg).curve(f),p(d)},Bc=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?Ige(t):i;return x.createElement("path",uj({},Ae(t,!1),my(t),{className:ke("recharts-curve",n),d:o,ref:a}))},dF={exports:{}},kge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lge=kge,Bge=Lge;function pF(){}function hF(){}hF.resetWarningCache=pF;var zge=function(){function e(r,i,a,o,s,l){if(l!==Bge){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:hF,resetWarningCache:pF};return n.PropTypes=n,n};dF.exports=zge();var Fge=dF.exports;const mt=vt(Fge),{getOwnPropertyNames:Uge,getOwnPropertySymbols:Hge}=Object,{hasOwnProperty:qge}=Object.prototype;function Qw(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function Ag(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:a}=i,o=a.get(n),s=a.get(r);if(o&&s)return o===r&&s===n;a.set(n,r),a.set(r,n);const l=e(n,r,i);return a.delete(n),a.delete(r),l}}function Vge(e){return e!=null?e[Symbol.toStringTag]:void 0}function x2(e){return Uge(e).concat(Hge(e))}const Gge=Object.hasOwn||((e,t)=>qge.call(e,t));function $u(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Kge="__v",Yge="__o",Xge="_owner",{getOwnPropertyDescriptor:w2,keys:S2}=Object;function Wge(e,t){return e.byteLength===t.byteLength&&Ky(new Uint8Array(e),new Uint8Array(t))}function Qge(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Zge(e,t){return e.byteLength===t.byteLength&&Ky(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Jge(e,t){return $u(e.getTime(),t.getTime())}function eve(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function tve(e,t){return e===t}function O2(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let f=!1,d=0;for(;(s=u.next())&&!s.done;){if(i[d]){d++;continue}const p=o.value,h=s.value;if(n.equals(p[0],h[0],l,d,e,t,n)&&n.equals(p[1],h[1],p[0],h[0],e,t,n)){f=i[d]=!0;break}d++}if(!f)return!1;l++}return!0}const nve=$u;function rve(e,t,n){const r=S2(e);let i=r.length;if(S2(t).length!==i)return!1;for(;i-- >0;)if(!mF(e,t,n,r[i]))return!1;return!0}function np(e,t,n){const r=x2(e);let i=r.length;if(x2(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!mF(e,t,n,a)||(o=w2(e,a),s=w2(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ive(e,t){return $u(e.valueOf(),t.valueOf())}function ave(e,t){return e.source===t.source&&e.flags===t.flags}function j2(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,f=0;for(;(s=l.next())&&!s.done;){if(!i[f]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function Ky(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function ove(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function mF(e,t,n,r){return(r===Xge||r===Yge||r===Kge)&&(e.$$typeof||t.$$typeof)?!0:Gge(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const sve="[object ArrayBuffer]",lve="[object Arguments]",uve="[object Boolean]",cve="[object DataView]",fve="[object Date]",dve="[object Error]",pve="[object Map]",hve="[object Number]",mve="[object Object]",gve="[object RegExp]",vve="[object Set]",yve="[object String]",bve={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},xve="[object URL]",wve=Object.prototype.toString;function Sve({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:h,unknownTagComparators:y}){return function(g,b,v){if(g===b)return!0;if(g==null||b==null)return!1;const w=typeof g;if(w!==typeof b)return!1;if(w!=="object")return w==="number"?s(g,b,v):w==="function"?a(g,b,v):!1;const S=g.constructor;if(S!==b.constructor)return!1;if(S===Object)return l(g,b,v);if(Array.isArray(g))return t(g,b,v);if(S===Date)return r(g,b,v);if(S===RegExp)return f(g,b,v);if(S===Map)return o(g,b,v);if(S===Set)return d(g,b,v);const O=wve.call(g);if(O===fve)return r(g,b,v);if(O===gve)return f(g,b,v);if(O===pve)return o(g,b,v);if(O===vve)return d(g,b,v);if(O===mve)return typeof g.then!="function"&&typeof b.then!="function"&&l(g,b,v);if(O===xve)return h(g,b,v);if(O===dve)return i(g,b,v);if(O===lve)return l(g,b,v);if(bve[O])return p(g,b,v);if(O===sve)return e(g,b,v);if(O===cve)return n(g,b,v);if(O===uve||O===hve||O===yve)return u(g,b,v);if(y){let j=y[O];if(!j){const E=Vge(g);E&&(j=y[E])}if(j)return j(g,b,v)}return!1}}function Ove({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Wge,areArraysEqual:n?np:Qge,areDataViewsEqual:Zge,areDatesEqual:Jge,areErrorsEqual:eve,areFunctionsEqual:tve,areMapsEqual:n?Qw(O2,np):O2,areNumbersEqual:nve,areObjectsEqual:n?np:rve,arePrimitiveWrappersEqual:ive,areRegExpsEqual:ave,areSetsEqual:n?Qw(j2,np):j2,areTypedArraysEqual:n?Qw(Ky,np):Ky,areUrlsEqual:ove,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Ag(r.areArraysEqual),a=Ag(r.areMapsEqual),o=Ag(r.areObjectsEqual),s=Ag(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return r}function jve(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Eve({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:f}=n();return t(s,l,{cache:u,equals:r,meta:f,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const Tve=Js();Js({strict:!0});Js({circular:!0});Js({circular:!0,strict:!0});Js({createInternalComparator:()=>$u});Js({strict:!0,createInternalComparator:()=>$u});Js({circular:!0,createInternalComparator:()=>$u});Js({circular:!0,createInternalComparator:()=>$u,strict:!0});function Js(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=Ove(e),o=Sve(a),s=n?n(o):jve(o);return Eve({circular:t,comparator:o,createState:r,equals:s,strict:i})}function Ave(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function E2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):Ave(i)};requestAnimationFrame(r)}function cj(e){"@babel/helpers - typeof";return cj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cj(e)}function Cve(e){return Mve(e)||Rve(e)||Nve(e)||_ve()}function _ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
123
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nve(e,t){if(e){if(typeof e=="string")return T2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T2(e,t)}}function T2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mve(e){if(Array.isArray(e))return e}function Pve(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,s=Cve(o),l=s[0],u=s.slice(1);if(typeof l=="number"){E2(i.bind(null,u),l);return}i(l),E2(i.bind(null,u));return}cj(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function kh(e){"@babel/helpers - typeof";return kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kh(e)}function A2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function C2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A2(Object(n),!0).forEach(function(r){gF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gF(e,t,n){return t=$ve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ve(e){var t=Dve(e,"string");return kh(t)==="symbol"?t:String(t)}function Dve(e,t){if(kh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ive=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},kve=function(t){return t},Lve=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Fp=function(t,n){return Object.keys(n).reduce(function(r,i){return C2(C2({},r),{},gF({},i,t(i,n[i])))},{})},_2=function(t,n,r){return t.map(function(i){return"".concat(Lve(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Bve(e,t){return Uve(e)||Fve(e,t)||vF(e,t)||zve()}function zve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
124
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Uve(e){if(Array.isArray(e))return e}function Hve(e){return Gve(e)||Vve(e)||vF(e)||qve()}function qve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
125
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vF(e,t){if(e){if(typeof e=="string")return fj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fj(e,t)}}function Vve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gve(e){if(Array.isArray(e))return fj(e)}function fj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yy=1e-4,yF=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},bF=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},N2=function(t,n){return function(r){var i=yF(t,n);return bF(i,r)}},Kve=function(t,n){return function(r){var i=yF(t,n),a=[].concat(Hve(i.map(function(o,s){return o*s}).slice(1)),[0]);return bF(a,r)}},R2=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(g){return parseFloat(g)}),f=Bve(u,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var d=N2(i,o),p=N2(a,s),h=Kve(i,o),y=function(b){return b>1?1:b<0?0:b},m=function(b){for(var v=b>1?1:b,w=v,S=0;S<8;++S){var O=d(w)-v,j=h(w);if(Math.abs(O-v)<Yy||j<Yy)return p(w);w=y(w-O/j)}return p(w)};return m.isStepper=!1,m},Yve=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,d,p){var h=-(f-d)*r,y=p*a,m=p+(h-y)*s/1e3,g=p*s/1e3+f;return Math.abs(g-d)<Yy&&Math.abs(m)<Yy?[d,0]:[g,m]};return l.isStepper=!0,l.dt=s,l},Xve=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return R2(i);case"spring":return Yve();default:if(i.split("(")[0]==="cubic-bezier")return R2(i)}return typeof i=="function"?i:null};function Lh(e){"@babel/helpers - typeof";return Lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lh(e)}function M2(e){return Zve(e)||Qve(e)||xF(e)||Wve()}function Wve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
126
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zve(e){if(Array.isArray(e))return pj(e)}function P2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P2(Object(n),!0).forEach(function(r){dj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dj(e,t,n){return t=Jve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jve(e){var t=eye(e,"string");return Lh(t)==="symbol"?t:String(t)}function eye(e,t){if(Lh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tye(e,t){return iye(e)||rye(e,t)||xF(e,t)||nye()}function nye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
127
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xF(e,t){if(e){if(typeof e=="string")return pj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pj(e,t)}}function pj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function iye(e){if(Array.isArray(e))return e}var Xy=function(t,n,r){return t+(n-t)*r},hj=function(t){var n=t.from,r=t.to;return n!==r},aye=function e(t,n,r){var i=Fp(function(a,o){if(hj(o)){var s=t(o.from,o.to,o.velocity),l=tye(s,2),u=l[0],f=l[1];return zn(zn({},o),{},{from:u,velocity:f})}return o},n);return r<1?Fp(function(a,o){return hj(o)?zn(zn({},o),{},{velocity:Xy(o.velocity,i[a].velocity,r),from:Xy(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const oye=function(e,t,n,r,i){var a=Ive(e,t),o=a.reduce(function(g,b){return zn(zn({},g),{},dj({},b,[e[b],t[b]]))},{}),s=a.reduce(function(g,b){return zn(zn({},g),{},dj({},b,{from:e[b],velocity:0,to:t[b]}))},{}),l=-1,u,f,d=function(){return null},p=function(){return Fp(function(b,v){return v.from},s)},h=function(){return!Object.values(s).filter(hj).length},y=function(b){u||(u=b);var v=b-u,w=v/n.dt;s=aye(n,s,w),i(zn(zn(zn({},e),t),p())),u=b,h()||(l=requestAnimationFrame(d))},m=function(b){f||(f=b);var v=(b-f)/r,w=Fp(function(O,j){return Xy.apply(void 0,M2(j).concat([n(v)]))},o);if(i(zn(zn(zn({},e),t),w)),v<1)l=requestAnimationFrame(d);else{var S=Fp(function(O,j){return Xy.apply(void 0,M2(j).concat([n(1)]))},o);i(zn(zn(zn({},e),t),S))}};return d=n.isStepper?y:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}};function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}var sye=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function lye(e,t){if(e==null)return{};var n=uye(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Zw(e){return pye(e)||dye(e)||fye(e)||cye()}function cye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
128
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fye(e,t){if(e){if(typeof e=="string")return mj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mj(e,t)}}function dye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pye(e){if(Array.isArray(e))return mj(e)}function mj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){yp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yp(e,t,n){return t=wF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wF(r.key),r)}}function gye(e,t,n){return t&&mye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wF(e){var t=vye(e,"string");return Pf(t)==="symbol"?t:String(t)}function vye(e,t){if(Pf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gj(e,t)}function gj(e,t){return gj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gj(e,t)}function bye(e){var t=xye();return function(){var r=Wy(e),i;if(t){var a=Wy(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return vj(this,i)}}function vj(e,t){if(t&&(Pf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yj(e)}function yj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xye(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wy(e){return Wy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wy(e)}var Vi=function(e){yye(n,e);var t=bye(n);function n(r,i){var a;hye(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,f=o.to,d=o.steps,p=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(yj(a)),a.changeStyle=a.changeStyle.bind(yj(a)),!s||h<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:f}),vj(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof p=="function")return a.state={style:u},vj(a);a.state={style:l?yp({},l,u):u}}else a.state={style:{}};return a}return gye(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,p=this.state.style;if(s){if(!o){var h={style:l?yp({},l,f):f};this.state&&p&&(l&&p[l]!==f||!l&&p!==f)&&this.setState(h);return}if(!(Tve(i.to,f)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=y||u?d:i.to;if(this.state&&p){var g={style:l?yp({},l,m):m};(l&&p[l]!==m||!l&&p!==m)&&this.setState(g)}this.runAnimation($i($i({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,h=oye(o,s,Xve(u),l,this.changeStyle),y=function(){a.stopJSAnimation=h()};this.manager.start([p,f,y,l,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,p=d===void 0?0:d,h=function(m,g,b){if(b===0)return m;var v=g.duration,w=g.easing,S=w===void 0?"ease":w,O=g.style,j=g.properties,E=g.onAnimationEnd,T=b>0?o[b-1]:g,A=j||Object.keys(O);if(typeof S=="function"||S==="spring")return[].concat(Zw(m),[a.runJSAnimation.bind(a,{from:T.style,to:O,duration:v,easing:S}),v]);var C=_2(A,v,S),_=$i($i($i({},T.style),O),{},{transition:C});return[].concat(Zw(m),[_,v,E]).filter(kve)};return this.manager.start([l].concat(Zw(o.reduce(h,[f,Math.max(p,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Pve());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,h=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var m=s?yp({},s,l):l,g=_2(Object.keys(m),o,u);y.start([f,a,$i($i({},m),{},{transition:g}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=lye(i,sye),u=x.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var d=function(h){var y=h.props,m=y.style,g=m===void 0?{}:m,b=y.className,v=x.cloneElement(h,$i($i({},l),{},{style:$i($i({},g),f),className:b}));return v};return u===1?d(x.Children.only(a)):z.createElement("div",null,x.Children.map(a,function(p){return d(p)}))}}]),n}(x.PureComponent);Vi.displayName="Animate";Vi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Vi.propTypes={from:mt.oneOfType([mt.object,mt.string]),to:mt.oneOfType([mt.object,mt.string]),attributeName:mt.string,duration:mt.number,begin:mt.number,easing:mt.oneOfType([mt.string,mt.func]),steps:mt.arrayOf(mt.shape({duration:mt.number.isRequired,style:mt.object.isRequired,easing:mt.oneOfType([mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),mt.func]),properties:mt.arrayOf("string"),onAnimationEnd:mt.func})),children:mt.oneOfType([mt.node,mt.func]),isActive:mt.bool,canBegin:mt.bool,onAnimationEnd:mt.func,shouldReAnimate:mt.bool,onAnimationStart:mt.func,onAnimationReStart:mt.func};function Bh(e){"@babel/helpers - typeof";return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bh(e)}function Qy(){return Qy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qy.apply(this,arguments)}function wye(e,t){return Eye(e)||jye(e,t)||Oye(e,t)||Sye()}function Sye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
129
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oye(e,t){if(e){if(typeof e=="string")return D2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D2(e,t)}}function D2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Eye(e){if(Array.isArray(e))return e}function I2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function k2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I2(Object(n),!0).forEach(function(r){Tye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tye(e,t,n){return t=Aye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aye(e){var t=Cye(e,"string");return Bh(t)=="symbol"?t:t+""}function Cye(e,t){if(Bh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var L2=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),s=i>=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,h=4;p<h;p++)d[p]=a[p]>o?o:a[p];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),f+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
|
|
130
|
+
`).concat(t+r,",").concat(n+s*d[1])),f+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
|
|
131
|
+
`).concat(t+r-l*d[2],",").concat(n+i)),f+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
|
|
132
|
+
`).concat(t,",").concat(n+i-s*d[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);f="M ".concat(t,",").concat(n+s*y,`
|
|
133
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+l*y,",").concat(n,`
|
|
134
|
+
L `).concat(t+r-l*y,",").concat(n,`
|
|
135
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*y,`
|
|
136
|
+
L `).concat(t+r,",").concat(n+i-s*y,`
|
|
137
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+r-l*y,",").concat(n+i,`
|
|
138
|
+
L `).concat(t+l*y,",").concat(n+i,`
|
|
139
|
+
A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*y," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},_ye=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),d=Math.min(o,o+l),p=Math.max(o,o+l);return r>=u&&r<=f&&i>=d&&i<=p}return!1},Nye={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tC=function(t){var n=k2(k2({},Nye),t),r=x.useRef(),i=x.useState(-1),a=wye(i,2),o=a[0],s=a[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&s(S)}catch{}},[]);var l=n.x,u=n.y,f=n.width,d=n.height,p=n.radius,h=n.className,y=n.animationEasing,m=n.animationDuration,g=n.animationBegin,b=n.isAnimationActive,v=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var w=ke("recharts-rectangle",h);return v?z.createElement(Vi,{canBegin:o>0,from:{width:f,height:d,x:l,y:u},to:{width:f,height:d,x:l,y:u},duration:m,animationEasing:y,isActive:v},function(S){var O=S.width,j=S.height,E=S.x,T=S.y;return z.createElement(Vi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:b,easing:y},z.createElement("path",Qy({},Ae(n,!0),{className:w,d:L2(E,T,O,j,p),ref:r})))}):z.createElement("path",Qy({},Ae(n,!0),{className:w,d:L2(l,u,f,d,p)}))},Rye=["points","className","baseLinePoints","connectNulls"];function bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bc.apply(this,arguments)}function Mye(e,t){if(e==null)return{};var n=Pye(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function B2(e){return kye(e)||Iye(e)||Dye(e)||$ye()}function $ye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
140
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dye(e,t){if(e){if(typeof e=="string")return bj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bj(e,t)}}function Iye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kye(e){if(Array.isArray(e))return bj(e)}function bj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z2=function(t){return t&&t.x===+t.x&&t.y===+t.y},Lye=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){z2(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),z2(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Up=function(t,n){var r=Lye(t);n&&(r=[r.reduce(function(a,o){return[].concat(B2(a),B2(o))},[])]);var i=r.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},Bye=function(t,n,r){var i=Up(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Up(n.reverse(),r).slice(1))},zye=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,a=t.connectNulls,o=Mye(t,Rye);if(!n||!n.length)return null;var s=ke("recharts-polygon",r);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=Bye(n,i,a);return z.createElement("g",{className:s},z.createElement("path",bc({},Ae(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?z.createElement("path",bc({},Ae(o,!0),{fill:"none",d:Up(n,a)})):null,l?z.createElement("path",bc({},Ae(o,!0),{fill:"none",d:Up(i,a)})):null)}var f=Up(n,a);return z.createElement("path",bc({},Ae(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function xj(){return xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xj.apply(this,arguments)}var Kx=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=ke("recharts-dot",a);return n===+n&&r===+r&&i===+i?x.createElement("circle",xj({},Ae(t,!1),my(t),{className:o,cx:n,cy:r,r:i})):null};function zh(e){"@babel/helpers - typeof";return zh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zh(e)}var Fye=["x","y","top","left","width","height","className"];function wj(){return wj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wj.apply(this,arguments)}function F2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F2(Object(n),!0).forEach(function(r){Hye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hye(e,t,n){return t=qye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qye(e){var t=Vye(e,"string");return zh(t)=="symbol"?t:t+""}function Vye(e,t){if(zh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gye(e,t){if(e==null)return{};var n=Kye(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Yye=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},Xye=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,f=t.width,d=f===void 0?0:f,p=t.height,h=p===void 0?0:p,y=t.className,m=Gye(t,Fye),g=Uye({x:r,y:a,top:s,left:u,width:d,height:h},m);return!se(r)||!se(a)||!se(d)||!se(h)||!se(s)||!se(u)?null:z.createElement("path",wj({},Ae(g,!0),{className:ke("recharts-cross",y),d:Yye(r,a,d,h,s,u)}))},Wye=Ux,Qye=N4,Zye=Pa;function Jye(e,t){return e&&e.length?Wye(e,Zye(t),Qye):void 0}var ebe=Jye;const tbe=vt(ebe);var nbe=Ux,rbe=Pa,ibe=R4;function abe(e,t){return e&&e.length?nbe(e,rbe(t),ibe):void 0}var obe=abe;const sbe=vt(obe);var lbe=["cx","cy","angle","ticks","axisLine"],ube=["ticks","tick","angle","tickFormatter","stroke"];function $f(e){"@babel/helpers - typeof";return $f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(e)}function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(this,arguments)}function U2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U2(Object(n),!0).forEach(function(r){Yx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H2(e,t){if(e==null)return{};var n=cbe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OF(r.key),r)}}function dbe(e,t,n){return t&&q2(e.prototype,t),n&&q2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pbe(e,t,n){return t=Zy(t),hbe(e,SF()?Reflect.construct(t,n||[],Zy(e).constructor):t.apply(e,n))}function hbe(e,t){if(t&&($f(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mbe(e)}function mbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SF=function(){return!!e})()}function Zy(e){return Zy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zy(e)}function gbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sj(e,t)}function Sj(e,t){return Sj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Sj(e,t)}function Yx(e,t,n){return t=OF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OF(e){var t=vbe(e,"string");return $f(t)=="symbol"?t:t+""}function vbe(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Nm=function(e){function t(){return fbe(this,t),pbe(this,t,arguments)}return gbe(t,e),dbe(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,a=this.props,o=a.angle,s=a.cx,l=a.cy;return Ct(s,l,i,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,s=r.ticks,l=tbe(s,function(f){return f.coordinate||0}),u=sbe(s,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,s=r.ticks,l=r.axisLine,u=H2(r,lbe),f=s.reduce(function(y,m){return[Math.min(y[0],m.coordinate),Math.max(y[1],m.coordinate)]},[1/0,-1/0]),d=Ct(i,a,f[0],o),p=Ct(i,a,f[1],o),h=dl(dl(dl({},Ae(u,!1)),{},{fill:"none"},Ae(l,!1)),{},{x1:d.x,y1:d.y,x2:p.x,y2:p.y});return z.createElement("line",Hp({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,s=i.angle,l=i.tickFormatter,u=i.stroke,f=H2(i,ube),d=this.getTickTextAnchor(),p=Ae(f,!1),h=Ae(o,!1),y=a.map(function(m,g){var b=r.getTickValueCoord(m),v=dl(dl(dl(dl({textAnchor:d,transform:"rotate(".concat(90-s,", ").concat(b.x,", ").concat(b.y,")")},p),{},{stroke:"none",fill:u},h),{},{index:g},b),{},{payload:m});return z.createElement(Ye,Hp({className:ke("recharts-polar-radius-axis-tick",lF(o)),key:"tick-".concat(m.coordinate)},yo(r.props,m,g)),t.renderTickItem(o,v,l?l(m.value,g):m.value))});return z.createElement(Ye,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.axisLine,o=r.tick;return!i||!i.length?null:z.createElement(Ye,{className:ke("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Rn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return z.isValidElement(r)?o=z.cloneElement(r,i):Ce(r)?o=r(i):o=z.createElement(lu,Hp({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(x.PureComponent);Yx(Nm,"displayName","PolarRadiusAxis");Yx(Nm,"axisType","radiusAxis");Yx(Nm,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wl.apply(this,arguments)}function V2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V2(Object(n),!0).forEach(function(r){Xx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ybe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EF(r.key),r)}}function bbe(e,t,n){return t&&G2(e.prototype,t),n&&G2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xbe(e,t,n){return t=Jy(t),wbe(e,jF()?Reflect.construct(t,n||[],Jy(e).constructor):t.apply(e,n))}function wbe(e,t){if(t&&(Df(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sbe(e)}function Sbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jF=function(){return!!e})()}function Jy(e){return Jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jy(e)}function Obe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oj(e,t)}function Oj(e,t){return Oj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Oj(e,t)}function Xx(e,t,n){return t=EF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EF(e){var t=jbe(e,"string");return Df(t)=="symbol"?t:t+""}function jbe(e,t){if(Df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ebe=Math.PI/180,K2=1e-5,Nd=function(e){function t(){return ybe(this,t),xbe(this,t,arguments)}return Obe(t,e),bbe(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.cx,o=i.cy,s=i.radius,l=i.orientation,u=i.tickSize,f=u||8,d=Ct(a,o,s,r.coordinate),p=Ct(a,o,s+(l==="inner"?-1:1)*f,r.coordinate);return{x1:d.x,y1:d.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,a=Math.cos(-r.coordinate*Ebe),o;return a>K2?o=i==="outer"?"start":"end":a<-K2?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.radius,s=r.axisLine,l=r.axisLineType,u=pl(pl({},Ae(this.props,!1)),{},{fill:"none"},Ae(s,!1));if(l==="circle")return z.createElement(Kx,wl({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,d=f.map(function(p){return Ct(i,a,o,p.coordinate)});return z.createElement(zye,wl({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,f=Ae(this.props,!1),d=Ae(o,!1),p=pl(pl({},f),{},{fill:"none"},Ae(s,!1)),h=a.map(function(y,m){var g=r.getTickLineCoord(y),b=r.getTickTextAnchor(y),v=pl(pl(pl({textAnchor:b},f),{},{stroke:"none",fill:u},d),{},{index:m,payload:y,x:g.x2,y:g.y2});return z.createElement(Ye,wl({className:ke("recharts-polar-angle-axis-tick",lF(o)),key:"tick-".concat(y.coordinate)},yo(r.props,y,m)),s&&z.createElement("line",wl({className:"recharts-polar-angle-axis-tick-line"},p,g)),o&&t.renderTickItem(o,v,l?l(y.value,m):y.value))});return z.createElement(Ye,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,o=r.axisLine;return a<=0||!i||!i.length?null:z.createElement(Ye,{className:ke("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var o;return z.isValidElement(r)?o=z.cloneElement(r,i):Ce(r)?o=r(i):o=z.createElement(lu,wl({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(x.PureComponent);Xx(Nd,"displayName","PolarAngleAxis");Xx(Nd,"axisType","angleAxis");Xx(Nd,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Tbe=Az,Abe=Tbe(Object.getPrototypeOf,Object),Cbe=Abe,_be=Ro,Nbe=Cbe,Rbe=Mo,Mbe="[object Object]",Pbe=Function.prototype,$be=Object.prototype,TF=Pbe.toString,Dbe=$be.hasOwnProperty,Ibe=TF.call(Object);function kbe(e){if(!Rbe(e)||_be(e)!=Mbe)return!1;var t=Nbe(e);if(t===null)return!0;var n=Dbe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&TF.call(n)==Ibe}var Lbe=kbe;const Bbe=vt(Lbe);var zbe=Ro,Fbe=Mo,Ube="[object Boolean]";function Hbe(e){return e===!0||e===!1||Fbe(e)&&zbe(e)==Ube}var qbe=Hbe;const Vbe=vt(qbe);function Fh(e){"@babel/helpers - typeof";return Fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fh(e)}function eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eb.apply(this,arguments)}function Gbe(e,t){return Wbe(e)||Xbe(e,t)||Ybe(e,t)||Kbe()}function Kbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
141
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ybe(e,t){if(e){if(typeof e=="string")return Y2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y2(e,t)}}function Y2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xbe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Wbe(e){if(Array.isArray(e))return e}function X2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X2(Object(n),!0).forEach(function(r){Qbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qbe(e,t,n){return t=Zbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zbe(e){var t=Jbe(e,"string");return Fh(t)=="symbol"?t:t+""}function Jbe(e,t){if(Fh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Q2=function(t,n,r,i,a){var o=r-i,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-o/2,",").concat(n+a),s+="L ".concat(t+r-o/2-i,",").concat(n+a),s+="L ".concat(t,",").concat(n," Z"),s},exe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},txe=function(t){var n=W2(W2({},exe),t),r=x.useRef(),i=x.useState(-1),a=Gbe(i,2),o=a[0],s=a[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&s(w)}catch{}},[]);var l=n.x,u=n.y,f=n.upperWidth,d=n.lowerWidth,p=n.height,h=n.className,y=n.animationEasing,m=n.animationDuration,g=n.animationBegin,b=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||p!==+p||f===0&&d===0||p===0)return null;var v=ke("recharts-trapezoid",h);return b?z.createElement(Vi,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:u},to:{upperWidth:f,lowerWidth:d,height:p,x:l,y:u},duration:m,animationEasing:y,isActive:b},function(w){var S=w.upperWidth,O=w.lowerWidth,j=w.height,E=w.x,T=w.y;return z.createElement(Vi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:y},z.createElement("path",eb({},Ae(n,!0),{className:v,d:Q2(E,T,S,O,j),ref:r})))}):z.createElement("g",null,z.createElement("path",eb({},Ae(n,!0),{className:v,d:Q2(l,u,f,d,p)})))},nxe=["option","shapeType","propTransformer","activeClassName","isActive"];function Uh(e){"@babel/helpers - typeof";return Uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uh(e)}function rxe(e,t){if(e==null)return{};var n=ixe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ixe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Z2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z2(Object(n),!0).forEach(function(r){axe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function axe(e,t,n){return t=oxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oxe(e){var t=sxe(e,"string");return Uh(t)=="symbol"?t:t+""}function sxe(e,t){if(Uh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lxe(e,t){return tb(tb({},t),e)}function uxe(e,t){return e==="symbols"}function J2(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return z.createElement(tC,n);case"trapezoid":return z.createElement(txe,n);case"sector":return z.createElement(fF,n);case"symbols":if(uxe(t))return z.createElement(bA,n);break;default:return null}}function cxe(e){return x.isValidElement(e)?e.props:e}function nC(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?lxe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=rxe(e,nxe),u;if(x.isValidElement(t))u=x.cloneElement(t,tb(tb({},l),cxe(t)));else if(Ce(t))u=t(l);else if(Bbe(t)&&!Vbe(t)){var f=i(t,l);u=z.createElement(J2,{shapeType:n,elementProps:f})}else{var d=l;u=z.createElement(J2,{shapeType:n,elementProps:d})}return s?z.createElement(Ye,{className:o},u):u}function Wx(e,t){return t!=null&&"trapezoids"in e.props}function Qx(e,t){return t!=null&&"sectors"in e.props}function Hh(e,t){return t!=null&&"points"in e.props}function fxe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function dxe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function pxe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function hxe(e,t){var n;return Wx(e,t)?n=fxe:Qx(e,t)?n=dxe:Hh(e,t)&&(n=pxe),n}function mxe(e,t){var n;return Wx(e,t)?n="trapezoids":Qx(e,t)?n="sectors":Hh(e,t)&&(n="points"),n}function gxe(e,t){if(Wx(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(Qx(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Hh(e,t)?t.payload:{}}function vxe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=mxe(n,t),a=gxe(n,t),o=r.filter(function(l,u){var f=uu(a,l),d=n.props[i].filter(function(y){var m=hxe(n,t);return m(y,t)}),p=n.props[i].indexOf(d[d.length-1]),h=u===p;return f&&h}),s=r.indexOf(o[o.length-1]);return s}var Ov;function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function xc(){return xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xc.apply(this,arguments)}function e$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e$(Object(n),!0).forEach(function(r){Si(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CF(r.key),r)}}function bxe(e,t,n){return t&&t$(e.prototype,t),n&&t$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xxe(e,t,n){return t=nb(t),wxe(e,AF()?Reflect.construct(t,n||[],nb(e).constructor):t.apply(e,n))}function wxe(e,t){if(t&&(If(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sxe(e)}function Sxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AF=function(){return!!e})()}function nb(e){return nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nb(e)}function Oxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jj(e,t)}function jj(e,t){return jj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jj(e,t)}function Si(e,t,n){return t=CF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CF(e){var t=jxe(e,"string");return If(t)=="symbol"?t:t+""}function jxe(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $o=function(e){function t(n){var r;return yxe(this,t),r=xxe(this,t,[n]),Si(r,"pieRef",null),Si(r,"sectorRefs",[]),Si(r,"id",Sd("recharts-pie-")),Si(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Ce(i)&&i()}),Si(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Ce(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return Oxe(t,e),bxe(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,s=a.labelLine,l=a.dataKey,u=a.valueKey,f=Ae(this.props,!1),d=Ae(o,!1),p=Ae(s,!1),h=o&&o.offsetRadius||20,y=r.map(function(m,g){var b=(m.startAngle+m.endAngle)/2,v=Ct(m.cx,m.cy,m.outerRadius+h,b),w=Pt(Pt(Pt(Pt({},f),m),{},{stroke:"none"},d),{},{index:g,textAnchor:t.getTextAnchor(v.x,m.cx)},v),S=Pt(Pt(Pt(Pt({},f),m),{},{fill:"none",stroke:m.fill},p),{},{index:g,points:[Ct(m.cx,m.cy,m.outerRadius,b),v]}),O=l;return Ue(l)&&Ue(u)?O="value":Ue(l)&&(O=u),z.createElement(Ye,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(g)},s&&t.renderLabelLineItem(s,S,"line"),t.renderLabelItem(o,w,ln(m,O)))});return z.createElement(Ye,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,o=a.activeShape,s=a.blendStroke,l=a.inactiveShape;return r.map(function(u,f){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=i.isActiveIndex(f),p=l&&i.hasActiveIndex()?l:null,h=d?o:p,y=Pt(Pt({},u),{},{stroke:s?u.fill:u.stroke,tabIndex:-1});return z.createElement(Ye,xc({ref:function(g){g&&!i.sectorRefs.includes(g)&&i.sectorRefs.push(g)},tabIndex:-1,className:"recharts-pie-sector"},yo(i.props,u,f),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(f)}),z.createElement(nC,xc({option:h,isActive:d,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.sectors,o=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,u=i.animationEasing,f=i.animationId,d=this.state,p=d.prevSectors,h=d.prevIsAnimationActive;return z.createElement(Vi,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var m=y.t,g=[],b=a&&a[0],v=b.startAngle;return a.forEach(function(w,S){var O=p&&p[S],j=S>0?ti(w,"paddingAngle",0):0;if(O){var E=Un(O.endAngle-O.startAngle,w.endAngle-w.startAngle),T=Pt(Pt({},w),{},{startAngle:v+j,endAngle:v+E(m)+j});g.push(T),v=T.endAngle}else{var A=w.endAngle,C=w.startAngle,_=Un(0,A-C),$=_(m),D=Pt(Pt({},w),{},{startAngle:v+j,endAngle:v+$+j});g.push(D),v=D.endAngle}}),z.createElement(Ye,null,r.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!uu(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,h=i.isAnimationActive,y=this.state.isAnimationFinished;if(a||!o||!o.length||!se(u)||!se(f)||!se(d)||!se(p))return null;var m=ke("recharts-pie",s);return z.createElement(Ye,{tabIndex:this.props.rootTabIndex,className:m,ref:function(b){r.pieRef=b}},this.renderSectors(),l&&this.renderLabels(o),Rn.renderCallByParent(this.props,null,!1),(!h||y)&&Sa.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,a){if(z.isValidElement(r))return z.cloneElement(r,i);if(Ce(r))return r(i);var o=ke("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return z.createElement(Bc,xc({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,i,a){if(z.isValidElement(r))return z.cloneElement(r,i);var o=a;if(Ce(r)&&(o=r(i),z.isValidElement(o)))return o;var s=ke("recharts-pie-label-text",typeof r!="boolean"&&!Ce(r)?r.className:"");return z.createElement(lu,xc({},i,{alignmentBaseline:"middle",className:s}),o)}}])}(x.PureComponent);Ov=$o;Si($o,"displayName","Pie");Si($o,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ws.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Si($o,"parseDeltaAngle",function(e,t){var n=Pn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Si($o,"getRealPieData",function(e){var t=e.data,n=e.children,r=Ae(e,!1),i=ni(n,Td);return t&&t.length?t.map(function(a,o){return Pt(Pt(Pt({payload:a},r),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return Pt(Pt({},r),a.props)}):[]});Si($o,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,a=t.height,o=oF(i,a),s=r+wr(e.cx,i,i/2),l=n+wr(e.cy,a,a/2),u=wr(e.innerRadius,o,0),f=wr(e.outerRadius,o,o*.8),d=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:s,cy:l,innerRadius:u,outerRadius:f,maxRadius:d}});Si($o,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Pt(Pt({},t.type.defaultProps),t.props):t.props,i=Ov.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,o=r.startAngle,s=r.endAngle,l=r.paddingAngle,u=r.dataKey,f=r.nameKey,d=r.valueKey,p=r.tooltipType,h=Math.abs(r.minAngle),y=Ov.parseCoordinateOfPie(r,n),m=Ov.parseDeltaAngle(o,s),g=Math.abs(m),b=u;Ue(u)&&Ue(d)?(Hi(!1,`Use "dataKey" to specify the value of pie,
|
|
142
|
+
the props "valueKey" will be deprecated in 1.1.0`),b="value"):Ue(u)&&(Hi(!1,`Use "dataKey" to specify the value of pie,
|
|
143
|
+
the props "valueKey" will be deprecated in 1.1.0`),b=d);var v=i.filter(function(T){return ln(T,b,0)!==0}).length,w=(g>=360?v:v-1)*l,S=g-v*h-w,O=i.reduce(function(T,A){var C=ln(A,b,0);return T+(se(C)?C:0)},0),j;if(O>0){var E;j=i.map(function(T,A){var C=ln(T,b,0),_=ln(T,f,A),$=(se(C)?C:0)/O,D;A?D=E.endAngle+Pn(m)*l*(C!==0?1:0):D=o;var N=D+Pn(m)*((C!==0?h:0)+$*S),P=(D+N)/2,R=(y.innerRadius+y.outerRadius)/2,B=[{name:_,value:C,payload:T,dataKey:b,type:p}],L=Ct(y.cx,y.cy,R,P);return E=Pt(Pt(Pt({percent:$,cornerRadius:a,name:_,tooltipPayload:B,midAngle:P,middleRadius:R,tooltipPosition:L},T),y),{},{value:ln(T,b),startAngle:D,endAngle:N,payload:T,paddingAngle:Pn(m)*l}),E})}return Pt(Pt({},y),{},{sectors:j,data:i})});function qh(e){"@babel/helpers - typeof";return qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qh(e)}function Ej(){return Ej=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ej.apply(this,arguments)}function n$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n$(Object(n),!0).forEach(function(r){Exe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Exe(e,t,n){return t=Txe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Txe(e){var t=Axe(e,"string");return qh(t)=="symbol"?t:t+""}function Axe(e,t){if(qh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r$(e){return typeof e=="string"?parseInt(e,10):e}function Cxe(e,t){var n="".concat(t.cx||e.cx),r=Number(n),i="".concat(t.cy||e.cy),a=Number(i);return Jw(Jw(Jw({},t),e),{},{cx:r,cy:a})}function i$(e){return z.createElement(nC,Ej({shapeType:"sector",propTransformer:Cxe},e))}var _xe=["shape","activeShape","activeIndex","cornerRadius"],Nxe=["value","background"];function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rb.apply(this,arguments)}function a$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a$(Object(n),!0).forEach(function(r){Xl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o$(e,t){if(e==null)return{};var n=Rxe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NF(r.key),r)}}function Pxe(e,t,n){return t&&s$(e.prototype,t),n&&s$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $xe(e,t,n){return t=ib(t),Dxe(e,_F()?Reflect.construct(t,n||[],ib(e).constructor):t.apply(e,n))}function Dxe(e,t){if(t&&(kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ixe(e)}function Ixe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_F=function(){return!!e})()}function ib(e){return ib=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ib(e)}function kxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tj(e,t)}function Tj(e,t){return Tj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Tj(e,t)}function Xl(e,t,n){return t=NF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NF(e){var t=Lxe(e,"string");return kf(t)=="symbol"?t:t+""}function Lxe(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Rm=function(e){function t(){var n;Mxe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=$xe(this,t,[].concat(i)),Xl(n,"state",{isAnimationFinished:!1}),Xl(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ce(o)&&o()}),Xl(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ce(o)&&o()}),n}return kxe(t,e),Pxe(t,[{key:"getDeltaAngle",value:function(){var r=this.props,i=r.startAngle,a=r.endAngle,o=Pn(a-i),s=Math.min(Math.abs(a-i),360);return o*s}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.activeShape,l=a.activeIndex,u=a.cornerRadius,f=o$(a,_xe),d=Ae(f,!1);return r.map(function(p,h){var y=h===l,m=Tn(Tn(Tn(Tn({},d),{},{cornerRadius:r$(u)},p),yo(i.props,p,h)),{},{className:"recharts-radial-bar-sector ".concat(p.className),forceCornerRadius:f.forceCornerRadius,cornerIsExternal:f.cornerIsExternal,isActive:y,option:y?s:o});return z.createElement(i$,rb({},m,{key:"sector-".concat(h)}))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,u=i.animationEasing,f=i.animationId,d=this.state.prevData;return z.createElement(Vi,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"radialBar-".concat(f),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(p){var h=p.t,y=a.map(function(m,g){var b=d&&d[g];if(b){var v=Un(b.startAngle,m.startAngle),w=Un(b.endAngle,m.endAngle);return Tn(Tn({},m),{},{startAngle:v(h),endAngle:w(h)})}var S=m.endAngle,O=m.startAngle,j=Un(O,S);return Tn(Tn({},m),{},{endAngle:j(h)})});return z.createElement(Ye,null,r.renderSectorsStatically(y))})}},{key:"renderSectors",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!uu(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"renderBackground",value:function(r){var i=this,a=this.props.cornerRadius,o=Ae(this.props.background,!1);return r.map(function(s,l){s.value;var u=s.background,f=o$(s,Nxe);if(!u)return null;var d=Tn(Tn(Tn(Tn(Tn({cornerRadius:r$(a)},f),{},{fill:"#eee"},u),o),yo(i.props,s,l)),{},{index:l,className:ke("recharts-radial-bar-background-sector",o==null?void 0:o.className),option:u,isActive:!1});return z.createElement(i$,rb({},d,{key:"sector-".concat(l)}))})}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.background,l=r.isAnimationActive;if(i||!a||!a.length)return null;var u=this.state.isAnimationFinished,f=ke("recharts-area",o);return z.createElement(Ye,{className:f},s&&z.createElement(Ye,{className:"recharts-radial-bar-background"},this.renderBackground(a)),z.createElement(Ye,{className:"recharts-radial-bar-sectors"},this.renderSectors()),(!l||u)&&Sa.renderCallByParent(Tn({},this.props),a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(x.PureComponent);Xl(Rm,"displayName","RadialBar");Xl(Rm,"defaultProps",{angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!Ws.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease",forceCornerRadius:!1,cornerIsExternal:!1});Xl(Rm,"getComposedData",function(e){var t=e.item,n=e.props,r=e.radiusAxis,i=e.radiusAxisTicks,a=e.angleAxis,o=e.angleAxisTicks,s=e.displayedData,l=e.dataKey,u=e.stackedData,f=e.barPosition,d=e.bandSize,p=e.dataStartIndex,h=eF(f,t);if(!h)return null;var y=a.cx,m=a.cy,g=n.layout,b=t.props,v=b.children,w=b.minPointSize,S=g==="radial"?a:r,O=u?S.scale.domain():null,j=rF({numericAxis:S}),E=ni(v,Td),T=s.map(function(A,C){var _,$,D,N,P,R;if(u?_=tF(u[p+C],O):(_=ln(A,l),Array.isArray(_)||(_=[j,_])),g==="radial"){$=Hy({axis:r,ticks:i,bandSize:d,offset:h.offset,entry:A,index:C}),P=a.scale(_[1]),N=a.scale(_[0]),D=$+h.size;var B=P-N;if(Math.abs(w)>0&&Math.abs(B)<Math.abs(w)){var L=Pn(B||w)*(Math.abs(w)-Math.abs(B));P+=L}R={background:{cx:y,cy:m,innerRadius:$,outerRadius:D,startAngle:n.startAngle,endAngle:n.endAngle}}}else{$=r.scale(_[0]),D=r.scale(_[1]),N=Hy({axis:a,ticks:o,bandSize:d,offset:h.offset,entry:A,index:C}),P=N+h.size;var k=D-$;if(Math.abs(w)>0&&Math.abs(k)<Math.abs(w)){var I=Pn(k||w)*(Math.abs(w)-Math.abs(k));D+=I}}return Tn(Tn(Tn(Tn({},A),R),{},{payload:A,value:u?_:_[1],cx:y,cy:m,innerRadius:$,outerRadius:D,startAngle:N,endAngle:P},E&&E[C]&&E[C].props),{},{tooltipPayload:[eC(t,A)],tooltipPosition:Ct(y,m,($+D)/2,(N+P)/2)})});return{data:T,layout:g}});var Bxe=Math.ceil,zxe=Math.max;function Fxe(e,t,n,r){for(var i=-1,a=zxe(Bxe((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var Uxe=Fxe,Hxe=Gz,l$=1/0,qxe=17976931348623157e292;function Vxe(e){if(!e)return e===0?e:0;if(e=Hxe(e),e===l$||e===-l$){var t=e<0?-1:1;return t*qxe}return e===e?e:0}var RF=Vxe,Gxe=Uxe,Kxe=Dx,e1=RF;function Yxe(e){return function(t,n,r){return r&&typeof r!="number"&&Kxe(t,n,r)&&(n=r=void 0),t=e1(t),n===void 0?(n=t,t=0):n=e1(n),r=r===void 0?t<n?1:-1:e1(r),Gxe(t,n,r,e)}}var Xxe=Yxe,Wxe=Xxe,Qxe=Wxe(),Zxe=Qxe;const ab=vt(Zxe);function Vh(e){"@babel/helpers - typeof";return Vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(e)}function u$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function c$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u$(Object(n),!0).forEach(function(r){MF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MF(e,t,n){return t=Jxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jxe(e){var t=e0e(e,"string");return Vh(t)=="symbol"?t:t+""}function e0e(e,t){if(Vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var t0e=["Webkit","Moz","O","ms"],n0e=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=t0e.reduce(function(a,o){return c$(c$({},a),{},MF({},o+r,n))},{});return i[t]=n,i};function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function ob(){return ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ob.apply(this,arguments)}function f$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function t1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f$(Object(n),!0).forEach(function(r){Ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$F(r.key),r)}}function i0e(e,t,n){return t&&d$(e.prototype,t),n&&d$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a0e(e,t,n){return t=sb(t),o0e(e,PF()?Reflect.construct(t,n||[],sb(e).constructor):t.apply(e,n))}function o0e(e,t){if(t&&(Lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s0e(e)}function s0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PF=function(){return!!e})()}function sb(e){return sb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sb(e)}function l0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Aj(e,t)}function Aj(e,t){return Aj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Aj(e,t)}function Ur(e,t,n){return t=$F(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $F(e){var t=u0e(e,"string");return Lf(t)=="symbol"?t:t+""}function u0e(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var c0e=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,u=Bp().domain(ab(0,l)).range([a,a+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:f}},p$=function(t){return t.changedTouches&&!!t.changedTouches.length},Bs=function(e){function t(n){var r;return r0e(this,t),r=a0e(this,t,[n]),Ur(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Ur(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Ur(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),Ur(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ur(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ur(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ur(r,"handleSlideDragStart",function(i){var a=p$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return l0e(t,e),i0e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,d=Math.min(i,a),p=Math.max(i,a),h=t.getIndexInRange(o,d),y=t.getIndexInRange(o,p);return{startIndex:h-h%l,endIndex:y===f?f:y-y%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=ln(a[r],s,r);return Ce(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,h=l.endIndex,y=l.onChange,m=r.pageX-a;m>0?m=Math.min(m,u+f-d-s,u+f-d-o):m<0&&(m=Math.max(m,u-o,u-s));var g=this.getIndex({startX:o+m,endX:s+m});(g.startIndex!==p||g.endIndex!==h)&&y&&y(g),this.setState({startX:o+m,endX:s+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=p$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],f=this.props,d=f.x,p=f.width,h=f.travellerWidth,y=f.onChange,m=f.gap,g=f.data,b={startX:this.state.startX,endX:this.state.endX},v=r.pageX-a;v>0?v=Math.min(v,d+p-h-u):v<0&&(v=Math.max(v,d-u)),b[o]=u+v;var w=this.getIndex(b),S=w.startIndex,O=w.endIndex,j=function(){var T=g.length-1;return o==="startX"&&(s>l?S%m===0:O%m===0)||s<l&&O===T||o==="endX"&&(s>l?O%m===0:S%m===0)||s>l&&O===T};this.setState(Ur(Ur({},o,u+v),"brushMoveStartX",r.pageX),function(){y&&j()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var h=s[p];i==="startX"&&h>=u||i==="endX"&&h<=l||this.setState(Ur({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,u=r.stroke;return z.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,u=r.children,f=r.padding,d=x.Children.only(u);return d?z.cloneElement(d,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,l=this.props,u=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,h=l.ariaLabel,y=l.data,m=l.startIndex,g=l.endIndex,b=Math.max(r,this.props.x),v=t1(t1({},Ae(this.props,!1)),{},{x:b,y:u,width:f,height:d}),w=h||"Min value: ".concat((a=y[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[g])===null||o===void 0?void 0:o.name);return z.createElement(Ye,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),s.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,v))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,f=Math.min(r,i)+u,d=Math.max(Math.abs(i-r)-u,0);return z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,p=f.endX,h=5,y={pointerEvents:"none",fill:u};return z.createElement(Ye,{className:"recharts-brush-texts"},z.createElement(lu,ob({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-h,y:o+s/2},y),this.getTextOfTick(i)),z.createElement(lu,ob({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+h,y:o+s/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,u=r.width,f=r.height,d=r.alwaysShowText,p=this.state,h=p.startX,y=p.endX,m=p.isTextActive,g=p.isSlideMoving,b=p.isTravellerMoving,v=p.isTravellerFocused;if(!i||!i.length||!se(s)||!se(l)||!se(u)||!se(f)||u<=0||f<=0)return null;var w=ke("recharts-brush",a),S=z.Children.count(o)===1,O=n0e("userSelect","none");return z.createElement(Ye,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(m||g||b||v||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,u=Math.floor(a+s/2)-1;return z.createElement(z.Fragment,null,z.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),z.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),z.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return z.isValidElement(r)?a=z.cloneElement(r,i):Ce(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return t1({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?c0e({data:a,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var p=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}])}(x.PureComponent);Ur(Bs,"displayName","Brush");Ur(Bs,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var f0e=TA;function d0e(e,t){var n;return f0e(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var p0e=d0e,h0e=bz,m0e=Pa,g0e=p0e,v0e=zr,y0e=Dx;function b0e(e,t,n){var r=v0e(e)?h0e:g0e;return n&&y0e(e,t,n)&&(t=void 0),r(e,m0e(t))}var x0e=b0e;const w0e=vt(x0e);var Oa=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},h$=Fz;function S0e(e,t,n){t=="__proto__"&&h$?h$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var O0e=S0e,j0e=O0e,E0e=Bz,T0e=Pa;function A0e(e,t){var n={};return t=T0e(t),E0e(e,function(r,i,a){j0e(n,i,t(r,i,a))}),n}var C0e=A0e;const _0e=vt(C0e);function N0e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var R0e=N0e,M0e=TA;function P0e(e,t){var n=!0;return M0e(e,function(r,i,a){return n=!!t(r,i,a),n}),n}var $0e=P0e,D0e=R0e,I0e=$0e,k0e=Pa,L0e=zr,B0e=Dx;function z0e(e,t,n){var r=L0e(e)?D0e:I0e;return n&&B0e(e,t,n)&&(t=void 0),r(e,k0e(t))}var F0e=z0e;const DF=vt(F0e);var U0e=["x","y"];function Gh(e){"@babel/helpers - typeof";return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(e)}function Cj(){return Cj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cj.apply(this,arguments)}function m$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m$(Object(n),!0).forEach(function(r){H0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H0e(e,t,n){return t=q0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q0e(e){var t=V0e(e,"string");return Gh(t)=="symbol"?t:t+""}function V0e(e,t){if(Gh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G0e(e,t){if(e==null)return{};var n=K0e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Y0e(e,t){var n=e.x,r=e.y,i=G0e(e,U0e),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),p=parseInt(d,10);return rp(rp(rp(rp(rp({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function g$(e){return z.createElement(nC,Cj({shapeType:"rectangle",propTransformer:Y0e,activeClassName:"recharts-active-bar"},e))}var X0e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=se(r)||aee(r);return a?t(r,i):(a||fu(),n)}},W0e=["value","background"],IF;function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function Q0e(e,t){if(e==null)return{};var n=Z0e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lb(){return lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lb.apply(this,arguments)}function v$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v$(Object(n),!0).forEach(function(r){vs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LF(r.key),r)}}function ewe(e,t,n){return t&&y$(e.prototype,t),n&&y$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function twe(e,t,n){return t=ub(t),nwe(e,kF()?Reflect.construct(t,n||[],ub(e).constructor):t.apply(e,n))}function nwe(e,t){if(t&&(Bf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rwe(e)}function rwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kF=function(){return!!e})()}function ub(e){return ub=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ub(e)}function iwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_j(e,t)}function _j(e,t){return _j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_j(e,t)}function vs(e,t,n){return t=LF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LF(e){var t=awe(e,"string");return Bf(t)=="symbol"?t:t+""}function awe(e,t){if(Bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Do=function(e){function t(){var n;J0e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=twe(this,t,[].concat(i)),vs(n,"state",{isAnimationFinished:!1}),vs(n,"id",Sd("recharts-bar-")),vs(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),vs(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return iwe(t,e),ewe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,u=a.activeBar,f=Ae(this.props,!1);return r&&r.map(function(d,p){var h=p===l,y=h?u:o,m=an(an(an({},f),d),{},{isActive:h,option:y,index:p,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return z.createElement(Ye,lb({className:"recharts-bar-rectangle"},yo(i.props,d,p),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(p)}),z.createElement(g$,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,f=i.animationEasing,d=i.animationId,p=this.state.prevData;return z.createElement(Vi,{begin:l,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var y=h.t,m=a.map(function(g,b){var v=p&&p[b];if(v){var w=Un(v.x,g.x),S=Un(v.y,g.y),O=Un(v.width,g.width),j=Un(v.height,g.height);return an(an({},g),{},{x:w(y),y:S(y),width:O(y),height:j(y)})}if(o==="horizontal"){var E=Un(0,g.height),T=E(y);return an(an({},g),{},{y:g.y+g.height-T,height:T})}var A=Un(0,g.width),C=A(y);return an(an({},g),{},{width:C})});return z.createElement(Ye,null,r.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!uu(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=Ae(this.props.background,!1);return a.map(function(u,f){u.value;var d=u.background,p=Q0e(u,W0e);if(!d)return null;var h=an(an(an(an(an({},p),{},{fill:"#eee"},d),l),yo(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return z.createElement(g$,lb({key:"background-bar-".concat(f),option:r.props.background,isActive:f===s},h))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,d=ni(f,Gx);if(!d)return null;var p=u==="vertical"?o[0].height/2:o[0].width/2,h=function(g,b){var v=Array.isArray(g.value)?g.value[1]:g.value;return{x:g.x,y:g.y,value:v,errorVal:ln(g,b)}},y={clipPath:r?"url(#clipPath-".concat(i,")"):null};return z.createElement(Ye,y,d.map(function(m){return z.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:p,dataPointFormatter:h})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.xAxis,l=r.yAxis,u=r.left,f=r.top,d=r.width,p=r.height,h=r.isAnimationActive,y=r.background,m=r.id;if(i||!a||!a.length)return null;var g=this.state.isAnimationFinished,b=ke("recharts-bar",o),v=s&&s.allowDataOverflow,w=l&&l.allowDataOverflow,S=v||w,O=Ue(m)?this.id:m;return z.createElement(Ye,{className:b},v||w?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(O)},z.createElement("rect",{x:v?u:u-d/2,y:w?f:f-p/2,width:v?d:d*2,height:w?p:p*2}))):null,z.createElement(Ye,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(O,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,O),(!h||g)&&Sa.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(x.PureComponent);IF=Do;vs(Do,"displayName","Bar");vs(Do,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ws.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});vs(Do,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,h=eF(r,n);if(!h)return null;var y=t.layout,m=n.type.defaultProps,g=m!==void 0?an(an({},m),n.props):n.props,b=g.dataKey,v=g.children,w=g.minPointSize,S=y==="horizontal"?o:a,O=u?S.scale.domain():null,j=rF({numericAxis:S}),E=ni(v,Td),T=d.map(function(A,C){var _,$,D,N,P,R;u?_=tF(u[f+C],O):(_=ln(A,b),Array.isArray(_)||(_=[j,_]));var B=X0e(w,IF.defaultProps.minPointSize)(_[1],C);if(y==="horizontal"){var L,k=[o.scale(_[0]),o.scale(_[1])],I=k[0],V=k[1];$=Hy({axis:a,ticks:s,bandSize:i,offset:h.offset,entry:A,index:C}),D=(L=V??I)!==null&&L!==void 0?L:void 0,N=h.size;var M=I-V;if(P=Number.isNaN(M)?0:M,R={x:$,y:o.y,width:N,height:o.height},Math.abs(B)>0&&Math.abs(P)<Math.abs(B)){var H=Pn(P||B)*(Math.abs(B)-Math.abs(P));D-=H,P+=H}}else{var G=[a.scale(_[0]),a.scale(_[1])],U=G[0],Y=G[1];if($=U,D=Hy({axis:o,ticks:l,bandSize:i,offset:h.offset,entry:A,index:C}),N=Y-U,P=h.size,R={x:a.x,y:D,width:a.width,height:P},Math.abs(B)>0&&Math.abs(N)<Math.abs(B)){var X=Pn(N||B)*(Math.abs(B)-Math.abs(N));N+=X}}return an(an(an({},A),{},{x:$,y:D,width:N,height:P,value:u?_:_[1],payload:A,background:R},E&&E[C]&&E[C].props),{},{tooltipPayload:[eC(n,A)],tooltipPosition:{x:$+N/2,y:D+P/2}})});return an({data:T,layout:y},p)});function Kh(e){"@babel/helpers - typeof";return Kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kh(e)}function owe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BF(r.key),r)}}function swe(e,t,n){return t&&b$(e.prototype,t),n&&b$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x$(Object(n),!0).forEach(function(r){Zx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zx(e,t,n){return t=BF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BF(e){var t=lwe(e,"string");return Kh(t)=="symbol"?t:t+""}function lwe(e,t){if(Kh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zF=function(t,n,r,i,a){var o=t.width,s=t.height,l=t.layout,u=t.children,f=Object.keys(n),d={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},p=!!qr(u,Do);return f.reduce(function(h,y){var m=n[y],g=m.orientation,b=m.domain,v=m.padding,w=v===void 0?{}:v,S=m.mirror,O=m.reversed,j="".concat(g).concat(S?"Mirror":""),E,T,A,C,_;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var $=b[1]-b[0],D=1/0,N=m.categoricalDomain.sort(lee);if(N.forEach(function(G,U){U>0&&(D=Math.min((G||0)-(N[U-1]||0),D))}),Number.isFinite(D)){var P=D/$,R=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(E=P*R/2),m.padding==="no-gap"){var B=wr(t.barCategoryGap,P*R),L=P*R/2;E=L-B-(L-B)/R*B}}}i==="xAxis"?T=[r.left+(w.left||0)+(E||0),r.left+r.width-(w.right||0)-(E||0)]:i==="yAxis"?T=l==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(E||0),r.top+r.height-(w.bottom||0)-(E||0)]:T=m.range,O&&(T=[T[1],T[0]]);var k=Z4(m,a,p),I=k.scale,V=k.realScaleType;I.domain(b).range(T),J4(I);var M=nF(I,Bi(Bi({},m),{},{realScaleType:V}));i==="xAxis"?(_=g==="top"&&!S||g==="bottom"&&S,A=r.left,C=d[j]-_*m.height):i==="yAxis"&&(_=g==="left"&&!S||g==="right"&&S,A=d[j]-_*m.width,C=r.top);var H=Bi(Bi(Bi({},m),M),{},{realScaleType:V,x:A,y:C,scale:I,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return H.bandSize=qy(H,M),!m.hide&&i==="xAxis"?d[j]+=(_?-1:1)*H.height:m.hide||(d[j]+=(_?-1:1)*H.width),Bi(Bi({},h),{},Zx({},y,H))},{})},FF=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},uwe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return FF({x:n,y:r},{x:i,y:a})},UF=function(){function e(t){owe(this,e),this.scale=t}return swe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Zx(UF,"EPS",1e-4);var rC=function(t){var n=Object.keys(t).reduce(function(r,i){return Bi(Bi({},r),{},Zx({},i,UF.create(t[i])))},{});return Bi(Bi({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return _0e(i,function(l,u){return n[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return DF(i,function(a,o){return n[o].isInRange(a)})}})};function cwe(e){return(e%180+180)%180}var fwe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=cwe(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&o<Math.PI-s?r/Math.sin(o):n/Math.cos(o);return Math.abs(l)},dwe=Pa,pwe=Em,hwe=Px;function mwe(e){return function(t,n,r){var i=Object(t);if(!pwe(t)){var a=dwe(n);t=hwe(t),n=function(s){return a(i[s],s,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var gwe=mwe,vwe=RF;function ywe(e){var t=vwe(e),n=t%1;return t===t?n?t-n:t:0}var bwe=ywe,xwe=Pz,wwe=Pa,Swe=bwe,Owe=Math.max;function jwe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Swe(n);return i<0&&(i=Owe(r+i,0)),xwe(e,wwe(t),i)}var Ewe=jwe,Twe=gwe,Awe=Ewe,Cwe=Twe(Awe),_we=Cwe;const Nwe=vt(_we);var Rwe=fJ(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),iC=x.createContext(void 0),aC=x.createContext(void 0),HF=x.createContext(void 0),qF=x.createContext({}),VF=x.createContext(void 0),GF=x.createContext(0),KF=x.createContext(0),w$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,f=Rwe(a);return z.createElement(iC.Provider,{value:r},z.createElement(aC.Provider,{value:i},z.createElement(qF.Provider,{value:a},z.createElement(HF.Provider,{value:f},z.createElement(VF.Provider,{value:o},z.createElement(GF.Provider,{value:u},z.createElement(KF.Provider,{value:l},s)))))))},Mwe=function(){return x.useContext(VF)},YF=function(t){var n=x.useContext(iC);n==null&&fu();var r=n[t];return r==null&&fu(),r},Pwe=function(){var t=x.useContext(iC);return es(t)},$we=function(){var t=x.useContext(aC),n=Nwe(t,function(r){return DF(r.domain,Number.isFinite)});return n||es(t)},XF=function(t){var n=x.useContext(aC);n==null&&fu();var r=n[t];return r==null&&fu(),r},Dwe=function(){var t=x.useContext(HF);return t},Iwe=function(){return x.useContext(qF)},oC=function(){return x.useContext(KF)},sC=function(){return x.useContext(GF)};function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function kwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lwe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QF(r.key),r)}}function Bwe(e,t,n){return t&&Lwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zwe(e,t,n){return t=cb(t),Fwe(e,WF()?Reflect.construct(t,n||[],cb(e).constructor):t.apply(e,n))}function Fwe(e,t){if(t&&(zf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uwe(e)}function Uwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WF=function(){return!!e})()}function cb(e){return cb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cb(e)}function Hwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nj(e,t)}function Nj(e,t){return Nj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Nj(e,t)}function S$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(n),!0).forEach(function(r){lC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lC(e,t,n){return t=QF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QF(e){var t=qwe(e,"string");return zf(t)=="symbol"?t:t+""}function qwe(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Vwe(e,t){return Xwe(e)||Ywe(e,t)||Kwe(e,t)||Gwe()}function Gwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
144
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kwe(e,t){if(e){if(typeof e=="string")return j$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j$(e,t)}}function j$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ywe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Xwe(e){if(Array.isArray(e))return e}function Rj(){return Rj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rj.apply(this,arguments)}var Wwe=function(t,n){var r;return z.isValidElement(t)?r=z.cloneElement(t,n):Ce(t)?r=t(n):r=z.createElement("line",Rj({},n,{className:"recharts-reference-line-line"})),r},Qwe=function(t,n,r,i,a,o,s,l,u){var f=a.x,d=a.y,p=a.width,h=a.height;if(r){var y=u.y,m=t.y.apply(y,{position:o});if(Oa(u,"discard")&&!t.y.isInRange(m))return null;var g=[{x:f+p,y:m},{x:f,y:m}];return l==="left"?g.reverse():g}if(n){var b=u.x,v=t.x.apply(b,{position:o});if(Oa(u,"discard")&&!t.x.isInRange(v))return null;var w=[{x:v,y:d+h},{x:v,y:d}];return s==="top"?w.reverse():w}if(i){var S=u.segment,O=S.map(function(j){return t.apply(j,{position:o})});return Oa(u,"discard")&&w0e(O,function(j){return!t.isInRange(j)})?null:O}return null};function Zwe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=Mwe(),f=YF(i),d=XF(a),p=Dwe();if(!u||!p)return null;Hi(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=rC({x:f.scale,y:d.scale}),y=Sn(t),m=Sn(n),g=r&&r.length===2,b=Qwe(h,y,m,g,p,e.position,f.orientation,d.orientation,e);if(!b)return null;var v=Vwe(b,2),w=v[0],S=w.x,O=w.y,j=v[1],E=j.x,T=j.y,A=Oa(e,"hidden")?"url(#".concat(u,")"):void 0,C=O$(O$({clipPath:A},Ae(e,!0)),{},{x1:S,y1:O,x2:E,y2:T});return z.createElement(Ye,{className:ke("recharts-reference-line",s)},Wwe(o,C),Rn.renderCallByParent(e,uwe({x1:S,y1:O,x2:E,y2:T})))}var uC=function(e){function t(){return kwe(this,t),zwe(this,t,arguments)}return Hwe(t,e),Bwe(t,[{key:"render",value:function(){return z.createElement(Zwe,this.props)}}])}(z.Component);lC(uC,"displayName","ReferenceLine");lC(uC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Mj(){return Mj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mj.apply(this,arguments)}function Ff(e){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ff(e)}function E$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function T$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E$(Object(n),!0).forEach(function(r){Jx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JF(r.key),r)}}function t1e(e,t,n){return t&&e1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n1e(e,t,n){return t=fb(t),r1e(e,ZF()?Reflect.construct(t,n||[],fb(e).constructor):t.apply(e,n))}function r1e(e,t){if(t&&(Ff(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i1e(e)}function i1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZF=function(){return!!e})()}function fb(e){return fb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fb(e)}function a1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pj(e,t)}function Pj(e,t){return Pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Pj(e,t)}function Jx(e,t,n){return t=JF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JF(e){var t=o1e(e,"string");return Ff(t)=="symbol"?t:t+""}function o1e(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var s1e=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=rC({x:i.scale,y:a.scale}),s=o.apply({x:n,y:r},{bandAware:!0});return Oa(t,"discard")&&!o.isInRange(s)?null:s},e0=function(e){function t(){return Jwe(this,t),n1e(this,t,arguments)}return a1e(t,e),t1e(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,s=r.alwaysShow,l=r.clipPathId,u=Sn(i),f=Sn(a);if(Hi(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=s1e(this.props);if(!d)return null;var p=d.x,h=d.y,y=this.props,m=y.shape,g=y.className,b=Oa(this.props,"hidden")?"url(#".concat(l,")"):void 0,v=T$(T$({clipPath:b},Ae(this.props,!0)),{},{cx:p,cy:h});return z.createElement(Ye,{className:ke("recharts-reference-dot",g)},t.renderDot(m,v),Rn.renderCallByParent(this.props,{x:p-o,y:h-o,width:2*o,height:2*o}))}}])}(z.Component);Jx(e0,"displayName","ReferenceDot");Jx(e0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Jx(e0,"renderDot",function(e,t){var n;return z.isValidElement(e)?n=z.cloneElement(e,t):Ce(e)?n=e(t):n=z.createElement(Kx,Mj({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function $j(){return $j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$j.apply(this,arguments)}function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function A$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function C$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(n),!0).forEach(function(r){t0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tU(r.key),r)}}function c1e(e,t,n){return t&&u1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f1e(e,t,n){return t=db(t),d1e(e,eU()?Reflect.construct(t,n||[],db(e).constructor):t.apply(e,n))}function d1e(e,t){if(t&&(Uf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p1e(e)}function p1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eU=function(){return!!e})()}function db(e){return db=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},db(e)}function h1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dj(e,t)}function Dj(e,t){return Dj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Dj(e,t)}function t0(e,t,n){return t=tU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(e){var t=m1e(e,"string");return Uf(t)=="symbol"?t:t+""}function m1e(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var g1e=function(t,n,r,i,a){var o=a.x1,s=a.x2,l=a.y1,u=a.y2,f=a.xAxis,d=a.yAxis;if(!f||!d)return null;var p=rC({x:f.scale,y:d.scale}),h={x:t?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(l,{position:"start"}):p.y.rangeMin},y={x:n?p.x.apply(s,{position:"end"}):p.x.rangeMax,y:i?p.y.apply(u,{position:"end"}):p.y.rangeMax};return Oa(a,"discard")&&(!p.isInRange(h)||!p.isInRange(y))?null:FF(h,y)},n0=function(e){function t(){return l1e(this,t),f1e(this,t,arguments)}return h1e(t,e),c1e(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,s=r.y2,l=r.className,u=r.alwaysShow,f=r.clipPathId;Hi(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Sn(i),p=Sn(a),h=Sn(o),y=Sn(s),m=this.props.shape;if(!d&&!p&&!h&&!y&&!m)return null;var g=g1e(d,p,h,y,this.props);if(!g&&!m)return null;var b=Oa(this.props,"hidden")?"url(#".concat(f,")"):void 0;return z.createElement(Ye,{className:ke("recharts-reference-area",l)},t.renderRect(m,C$(C$({clipPath:b},Ae(this.props,!0)),g)),Rn.renderCallByParent(this.props,g))}}])}(z.Component);t0(n0,"displayName","ReferenceArea");t0(n0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});t0(n0,"renderRect",function(e,t){var n;return z.isValidElement(e)?n=z.cloneElement(e,t):Ce(e)?n=e(t):n=z.createElement(tC,$j({},t,{className:"recharts-reference-area-rect"})),n});function nU(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function v1e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return fwe(r,n)}function y1e(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function pb(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function b1e(e,t){return nU(e,t+1)}function x1e(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,u=1,f=o,d=function(){var y=r==null?void 0:r[l];if(y===void 0)return{v:nU(r,u)};var m=l,g,b=function(){return g===void 0&&(g=n(y,m)),g},v=y.coordinate,w=l===0||pb(e,v,b,f,s);w||(l=0,f=o,u+=1),w&&(f=v+e*(b()/2+i),l+=u)},p;u<=a.length;)if(p=d(),p)return p.v;return[]}function Yh(e){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yh(e)}function _$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function er(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(n),!0).forEach(function(r){w1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w1e(e,t,n){return t=S1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S1e(e){var t=O1e(e,"string");return Yh(t)=="symbol"?t:t+""}function O1e(e,t){if(Yh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j1e(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,l=t.end,u=function(p){var h=a[p],y,m=function(){return y===void 0&&(y=n(h,p)),y};if(p===o-1){var g=e*(h.coordinate+e*m()/2-l);a[p]=h=er(er({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate})}else a[p]=h=er(er({},h),{},{tickCoord:h.coordinate});var b=pb(e,h.tickCoord,m,s,l);b&&(l=h.tickCoord-e*(m()/2+i),a[p]=er(er({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function E1e(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-u);o[s-1]=f=er(er({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var h=pb(e,f.tickCoord,function(){return d},l,u);h&&(u=f.tickCoord-e*(d/2+i),o[s-1]=er(er({},f),{},{isShow:!0}))}for(var y=a?s-1:s,m=function(v){var w=o[v],S,O=function(){return S===void 0&&(S=n(w,v)),S};if(v===0){var j=e*(w.coordinate-e*O()/2-l);o[v]=w=er(er({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else o[v]=w=er(er({},w),{},{tickCoord:w.coordinate});var E=pb(e,w.tickCoord,O,l,u);E&&(l=w.tickCoord+e*(O()/2+i),o[v]=er(er({},w),{},{isShow:!0}))},g=0;g<y;g++)m(g);return o}function cC(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(se(l)||Ws.isSsr)return b1e(i,typeof l=="number"&&se(l)?l:0);var p=[],h=s==="top"||s==="bottom"?"width":"height",y=f&&h==="width"?Lp(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(w,S){var O=Ce(u)?u(w.value,S):w.value;return h==="width"?v1e(Lp(O,{fontSize:t,letterSpacing:n}),y,d):Lp(O,{fontSize:t,letterSpacing:n})[h]},g=i.length>=2?Pn(i[1].coordinate-i[0].coordinate):1,b=y1e(a,g,h);return l==="equidistantPreserveStart"?x1e(g,b,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?p=E1e(g,b,m,i,o,l==="preserveStartEnd"):p=j1e(g,b,m,i,o),p.filter(function(v){return v.isShow}))}var T1e=["viewBox"],A1e=["viewBox"],C1e=["ticks"];function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function wc(){return wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wc.apply(this,arguments)}function N$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N$(Object(n),!0).forEach(function(r){fC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n1(e,t){if(e==null)return{};var n=_1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function N1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iU(r.key),r)}}function R1e(e,t,n){return t&&R$(e.prototype,t),n&&R$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function M1e(e,t,n){return t=hb(t),P1e(e,rU()?Reflect.construct(t,n||[],hb(e).constructor):t.apply(e,n))}function P1e(e,t){if(t&&(Hf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $1e(e)}function $1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rU=function(){return!!e})()}function hb(e){return hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hb(e)}function D1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ij(e,t)}function Ij(e,t){return Ij=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ij(e,t)}function fC(e,t,n){return t=iU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iU(e){var t=I1e(e,"string");return Hf(t)=="symbol"?t:t+""}function I1e(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Rd=function(e){function t(n){var r;return N1e(this,t),r=M1e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return D1e(t,e),R1e(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=n1(r,T1e),s=this.props,l=s.viewBox,u=n1(s,A1e);return!Ic(a,l)||!Ic(o,u)||!Ic(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.orientation,f=i.tickSize,d=i.mirror,p=i.tickMargin,h,y,m,g,b,v,w=d?-1:1,S=r.tickSize||f,O=se(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":h=y=r.coordinate,g=o+ +!d*l,m=g-w*S,v=m-w*p,b=O;break;case"left":m=g=r.coordinate,y=a+ +!d*s,h=y-w*S,b=h-w*p,v=O;break;case"right":m=g=r.coordinate,y=a+ +d*s,h=y+w*S,b=h+w*p,v=O;break;default:h=y=r.coordinate,g=o+ +d*l,m=g+w*S,v=m+w*p,b=O;break}return{line:{x1:h,y1:m,x2:y,y2:g},tick:{x:b,y:v}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.orientation,u=r.mirror,f=r.axisLine,d=mn(mn(mn({},Ae(this.props,!1)),Ae(f,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!u||l==="bottom"&&u);d=mn(mn({},d),{},{x1:i,y1:a+p*s,x2:i+o,y2:a+p*s})}else{var h=+(l==="left"&&!u||l==="right"&&u);d=mn(mn({},d),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+s})}return z.createElement("line",wc({},d,{className:ke("recharts-cartesian-axis-line",ti(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,s=this.props,l=s.tickLine,u=s.stroke,f=s.tick,d=s.tickFormatter,p=s.unit,h=cC(mn(mn({},this.props),{},{ticks:r}),i,a),y=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),g=Ae(this.props,!1),b=Ae(f,!1),v=mn(mn({},g),{},{fill:"none"},Ae(l,!1)),w=h.map(function(S,O){var j=o.getTickLineCoord(S),E=j.line,T=j.tick,A=mn(mn(mn(mn({textAnchor:y,verticalAnchor:m},g),{},{stroke:"none",fill:u},b),T),{},{index:O,payload:S,visibleTicksCount:h.length,tickFormatter:d});return z.createElement(Ye,wc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},yo(o.props,S,O)),l&&z.createElement("line",wc({},v,E,{className:ke("recharts-cartesian-axis-tick-line",ti(l,"className"))})),f&&t.renderTickItem(f,A,"".concat(Ce(d)?d(S.value,O):S.value).concat(p||"")))});return z.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var d=this.props,p=d.ticks,h=n1(d,C1e),y=p;return Ce(l)&&(y=p&&p.length>0?l(this.props):l(h)),o<=0||s<=0||!y||!y.length?null:z.createElement(Ye,{className:ke("recharts-cartesian-axis",u),ref:function(g){r.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Rn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,s=ke(i.className,"recharts-cartesian-axis-tick-value");return z.isValidElement(r)?o=z.cloneElement(r,mn(mn({},i),{},{className:s})):Ce(r)?o=r(mn(mn({},i),{},{className:s})):o=z.createElement(lu,wc({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(x.Component);fC(Rd,"displayName","CartesianAxis");fC(Rd,"defaultProps",{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"});var k1e=["x1","y1","x2","y2","key"],L1e=["offset"];function du(e){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}function M$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M$(Object(n),!0).forEach(function(r){B1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B1e(e,t,n){return t=z1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z1e(e){var t=F1e(e,"string");return du(t)=="symbol"?t:t+""}function F1e(e,t){if(du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cl.apply(this,arguments)}function P$(e,t){if(e==null)return{};var n=U1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var H1e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return z.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function aU(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Ce(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=P$(t,k1e),u=Ae(l,!1);u.offset;var f=P$(u,L1e);n=z.createElement("line",Cl({},f,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:s}))}return n}function q1e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=nr(nr({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return aU(i,u)});return z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function V1e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=nr(nr({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return aU(i,u)});return z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function G1e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,h){return p-h});i!==f[0]&&f.unshift(0);var d=f.map(function(p,h){var y=!f[h+1],m=y?i+o-p:f[h+1]-p;if(m<=0)return null;var g=h%t.length;return z.createElement("rect",{key:"react-".concat(h),y:p,x:r,height:m,width:a,stroke:"none",fill:t[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function K1e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(p){return Math.round(p+a-a)}).sort(function(p,h){return p-h});a!==f[0]&&f.unshift(0);var d=f.map(function(p,h){var y=!f[h+1],m=y?a+s-p:f[h+1]-p;if(m<=0)return null;var g=h%r.length;return z.createElement("rect",{key:"react-".concat(h),x:p,y:o,width:m,height:l,stroke:"none",fill:r[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var Y1e=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return Q4(cC(nr(nr(nr({},Rd.defaultProps),r),{},{ticks:eo(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},X1e=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return Q4(cC(nr(nr(nr({},Rd.defaultProps),r),{},{ticks:eo(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},Gu={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Mm(e){var t,n,r,i,a,o,s=oC(),l=sC(),u=Iwe(),f=nr(nr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Gu.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Gu.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Gu.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Gu.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Gu.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Gu.verticalFill,x:se(e.x)?e.x:u.left,y:se(e.y)?e.y:u.top,width:se(e.width)?e.width:u.width,height:se(e.height)?e.height:u.height}),d=f.x,p=f.y,h=f.width,y=f.height,m=f.syncWithTicks,g=f.horizontalValues,b=f.verticalValues,v=Pwe(),w=$we();if(!se(h)||h<=0||!se(y)||y<=0||!se(d)||d!==+d||!se(p)||p!==+p)return null;var S=f.verticalCoordinatesGenerator||Y1e,O=f.horizontalCoordinatesGenerator||X1e,j=f.horizontalPoints,E=f.verticalPoints;if((!j||!j.length)&&Ce(O)){var T=g&&g.length,A=O({yAxis:w?nr(nr({},w),{},{ticks:T?g:w.ticks}):void 0,width:s,height:l,offset:u},T?!0:m);Hi(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(du(A),"]")),Array.isArray(A)&&(j=A)}if((!E||!E.length)&&Ce(S)){var C=b&&b.length,_=S({xAxis:v?nr(nr({},v),{},{ticks:C?b:v.ticks}):void 0,width:s,height:l,offset:u},C?!0:m);Hi(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(du(_),"]")),Array.isArray(_)&&(E=_)}return z.createElement("g",{className:"recharts-cartesian-grid"},z.createElement(H1e,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),z.createElement(q1e,Cl({},f,{offset:u,horizontalPoints:j,xAxis:v,yAxis:w})),z.createElement(V1e,Cl({},f,{offset:u,verticalPoints:E,xAxis:v,yAxis:w})),z.createElement(G1e,Cl({},f,{horizontalPoints:j})),z.createElement(K1e,Cl({},f,{verticalPoints:E})))}Mm.displayName="CartesianGrid";var W1e=["layout","type","stroke","connectNulls","isRange","ref"],Q1e=["key"],oU;function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function sU(e,t){if(e==null)return{};var n=Z1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _l(){return _l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_l.apply(this,arguments)}function $$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$$(Object(n),!0).forEach(function(r){va(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uU(r.key),r)}}function eSe(e,t,n){return t&&D$(e.prototype,t),n&&D$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tSe(e,t,n){return t=mb(t),nSe(e,lU()?Reflect.construct(t,n||[],mb(e).constructor):t.apply(e,n))}function nSe(e,t){if(t&&(qf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rSe(e)}function rSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lU=function(){return!!e})()}function mb(e){return mb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mb(e)}function iSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kj(e,t)}function kj(e,t){return kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kj(e,t)}function va(e,t,n){return t=uU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uU(e){var t=aSe(e,"string");return qf(t)=="symbol"?t:t+""}function aSe(e,t){if(qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Io=function(e){function t(){var n;J1e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=tSe(this,t,[].concat(i)),va(n,"state",{isAnimationFinished:!0}),va(n,"id",Sd("recharts-area-")),va(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ce(o)&&o()}),va(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ce(o)&&o()}),n}return iSe(t,e),eSe(t,[{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,f=l.points,d=l.dataKey,p=Ae(this.props,!1),h=Ae(u,!0),y=f.map(function(g,b){var v=Yo(Yo(Yo({key:"dot-".concat(b),r:3},p),h),{},{index:b,cx:g.x,cy:g.y,dataKey:d,value:g.value,payload:g.payload,points:f});return t.renderDotItem(u,v)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return z.createElement(Ye,_l({className:"recharts-area-dots"},m),y)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].x,u=o[o.length-1].x,f=r*Math.abs(l-u),d=gs(o.map(function(p){return p.y||0}));return se(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(gs(a.map(function(p){return p.y||0})),d)),se(d)?z.createElement("rect",{x:l<u?l:l-f,y:0,width:f,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].y,u=o[o.length-1].y,f=r*Math.abs(l-u),d=gs(o.map(function(p){return p.x||0}));return se(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(gs(a.map(function(p){return p.x||0})),d)),se(d)?z.createElement("rect",{x:0,y:l<u?l:l-f,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,a,o){var s=this.props,l=s.layout,u=s.type,f=s.stroke,d=s.connectNulls,p=s.isRange;s.ref;var h=sU(s,W1e);return z.createElement(Ye,{clipPath:a?"url(#clipPath-".concat(o,")"):null},z.createElement(Bc,_l({},Ae(h,!0),{points:r,connectNulls:d,type:u,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),f!=="none"&&z.createElement(Bc,_l({},Ae(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:r})),f!=="none"&&p&&z.createElement(Bc,_l({},Ae(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var a=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,p=o.animationEasing,h=o.animationId,y=this.state,m=y.prevPoints,g=y.prevBaseLine;return z.createElement(Vi,{begin:f,duration:d,isActive:u,easing:p,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var v=b.t;if(m){var w=m.length/s.length,S=s.map(function(T,A){var C=Math.floor(A*w);if(m[C]){var _=m[C],$=Un(_.x,T.x),D=Un(_.y,T.y);return Yo(Yo({},T),{},{x:$(v),y:D(v)})}return T}),O;if(se(l)&&typeof l=="number"){var j=Un(g,l);O=j(v)}else if(Ue(l)||wd(l)){var E=Un(g,0);O=E(v)}else O=l.map(function(T,A){var C=Math.floor(A*w);if(g[C]){var _=g[C],$=Un(_.x,T.x),D=Un(_.y,T.y);return Yo(Yo({},T),{},{x:$(v),y:D(v)})}return T});return a.renderAreaStatically(S,O,r,i)}return z.createElement(Ye,null,z.createElement("defs",null,z.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(v))),z.createElement(Ye,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,l,r,i)))})}},{key:"renderArea",value:function(r,i){var a=this.props,o=a.points,s=a.baseLine,l=a.isAnimationActive,u=this.state,f=u.prevPoints,d=u.prevBaseLine,p=u.totalLength;return l&&o&&o.length&&(!f&&p>0||!uu(f,o)||!uu(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.top,f=i.left,d=i.xAxis,p=i.yAxis,h=i.width,y=i.height,m=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var b=this.state.isAnimationFinished,v=s.length===1,w=ke("recharts-area",l),S=d&&d.allowDataOverflow,O=p&&p.allowDataOverflow,j=S||O,E=Ue(g)?this.id:g,T=(r=Ae(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=T.r,C=A===void 0?3:A,_=T.strokeWidth,$=_===void 0?2:_,D=vee(o)?o:{},N=D.clipDot,P=N===void 0?!0:N,R=C*2+$;return z.createElement(Ye,{className:w},S||O?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(E)},z.createElement("rect",{x:S?f:f-h/2,y:O?u:u-y/2,width:S?h:h*2,height:O?y:y*2})),!P&&z.createElement("clipPath",{id:"clipPath-dots-".concat(E)},z.createElement("rect",{x:f-R/2,y:u-R/2,width:h+R,height:y+R}))):null,v?null:this.renderArea(j,E),(o||v)&&this.renderDots(j,P,E),(!m||b)&&Sa.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(x.PureComponent);oU=Io;va(Io,"displayName","Area");va(Io,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ws.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});va(Io,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(se(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});va(Io,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,h=t.layout,y=u&&u.length,m=oU.getBaseValue(t,n,r,i),g=h==="horizontal",b=!1,v=d.map(function(S,O){var j;y?j=u[f+O]:(j=ln(S,l),Array.isArray(j)?b=!0:j=[m,j]);var E=j[1]==null||y&&ln(S,l)==null;return g?{x:i2({axis:r,ticks:a,bandSize:s,entry:S,index:O}),y:E?null:i.scale(j[1]),value:j,payload:S}:{x:E?null:r.scale(j[1]),y:i2({axis:i,ticks:o,bandSize:s,entry:S,index:O}),value:j,payload:S}}),w;return y||b?w=v.map(function(S){var O=Array.isArray(S.value)?S.value[0]:null;return g?{x:S.x,y:O!=null&&S.y!=null?i.scale(O):null}:{x:O!=null?r.scale(O):null,y:S.y}}):w=g?i.scale(m):r.scale(m),Yo({points:v,baseLine:w,layout:h,isRange:b},p)});va(Io,"renderDotItem",function(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Ce(e))n=e(t);else{var r=ke("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=sU(t,Q1e);n=z.createElement(Kx,_l({},a,{key:i,className:r}))}return n});function Vf(e){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vf(e)}function oSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dU(r.key),r)}}function lSe(e,t,n){return t&&sSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uSe(e,t,n){return t=gb(t),cSe(e,cU()?Reflect.construct(t,n||[],gb(e).constructor):t.apply(e,n))}function cSe(e,t){if(t&&(Vf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fSe(e)}function fSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cU=function(){return!!e})()}function gb(e){return gb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gb(e)}function dSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lj(e,t)}function Lj(e,t){return Lj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Lj(e,t)}function fU(e,t,n){return t=dU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dU(e){var t=pSe(e,"string");return Vf(t)=="symbol"?t:t+""}function pSe(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Bj(){return Bj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bj.apply(this,arguments)}function hSe(e){var t=e.xAxisId,n=oC(),r=sC(),i=YF(t);return i==null?null:x.createElement(Rd,Bj({},i,{className:ke("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return eo(o,!0)}}))}var So=function(e){function t(){return oSe(this,t),uSe(this,t,arguments)}return dSe(t,e),lSe(t,[{key:"render",value:function(){return x.createElement(hSe,this.props)}}])}(x.Component);fU(So,"displayName","XAxis");fU(So,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Gf(e){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(e)}function mSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mU(r.key),r)}}function vSe(e,t,n){return t&&gSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ySe(e,t,n){return t=vb(t),bSe(e,pU()?Reflect.construct(t,n||[],vb(e).constructor):t.apply(e,n))}function bSe(e,t){if(t&&(Gf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xSe(e)}function xSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pU=function(){return!!e})()}function vb(e){return vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vb(e)}function wSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zj(e,t)}function zj(e,t){return zj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zj(e,t)}function hU(e,t,n){return t=mU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mU(e){var t=SSe(e,"string");return Gf(t)=="symbol"?t:t+""}function SSe(e,t){if(Gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Fj(){return Fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fj.apply(this,arguments)}var OSe=function(t){var n=t.yAxisId,r=oC(),i=sC(),a=XF(n);return a==null?null:x.createElement(Rd,Fj({},a,{className:ke("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(s){return eo(s,!0)}}))},Oo=function(e){function t(){return mSe(this,t),ySe(this,t,arguments)}return wSe(t,e),vSe(t,[{key:"render",value:function(){return x.createElement(OSe,this.props)}}])}(x.Component);hU(Oo,"displayName","YAxis");hU(Oo,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function I$(e){return ASe(e)||TSe(e)||ESe(e)||jSe()}function jSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
145
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ESe(e,t){if(e){if(typeof e=="string")return Uj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uj(e,t)}}function TSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ASe(e){if(Array.isArray(e))return Uj(e)}function Uj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Hj=function(t,n,r,i,a){var o=ni(t,uC),s=ni(t,e0),l=[].concat(I$(o),I$(s)),u=ni(t,n0),f="".concat(i,"Id"),d=i[0],p=n;if(l.length&&(p=l.reduce(function(m,g){if(g.props[f]===r&&Oa(g.props,"extendDomain")&&se(g.props[d])){var b=g.props[d];return[Math.min(m[0],b),Math.max(m[1],b)]}return m},p)),u.length){var h="".concat(d,"1"),y="".concat(d,"2");p=u.reduce(function(m,g){if(g.props[f]===r&&Oa(g.props,"extendDomain")&&se(g.props[h])&&se(g.props[y])){var b=g.props[h],v=g.props[y];return[Math.min(m[0],b,v),Math.max(m[1],b,v)]}return m},p)}return a&&a.length&&(p=a.reduce(function(m,g){return se(g)?[Math.min(m[0],g),Math.max(m[1],g)]:m},p)),p},gU={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,f){this.fn=l,this.context=u,this.once=f||!1}function a(l,u,f,d,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,d||l,p),y=n?n+u:u;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],h]:l._events[y].push(h):(l._events[y]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,h=d.length,y=new Array(h);p<h;p++)y[p]=d[p].fn;return y},s.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,f,d,p,h,y){var m=n?n+u:u;if(!this._events[m])return!1;var g=this._events[m],b=arguments.length,v,w;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,f),!0;case 3:return g.fn.call(g.context,f,d),!0;case 4:return g.fn.call(g.context,f,d,p),!0;case 5:return g.fn.call(g.context,f,d,p,h),!0;case 6:return g.fn.call(g.context,f,d,p,h,y),!0}for(w=1,v=new Array(b-1);w<b;w++)v[w-1]=arguments[w];g.fn.apply(g.context,v)}else{var S=g.length,O;for(w=0;w<S;w++)switch(g[w].once&&this.removeListener(u,g[w].fn,void 0,!0),b){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,f);break;case 3:g[w].fn.call(g[w].context,f,d);break;case 4:g[w].fn.call(g[w].context,f,d,p);break;default:if(!v)for(O=1,v=new Array(b-1);O<b;O++)v[O-1]=arguments[O];g[w].fn.apply(g[w].context,v)}}return!0},s.prototype.on=function(u,f,d){return a(this,u,f,d,!1)},s.prototype.once=function(u,f,d){return a(this,u,f,d,!0)},s.prototype.removeListener=function(u,f,d,p){var h=n?n+u:u;if(!this._events[h])return this;if(!f)return o(this,h),this;var y=this._events[h];if(y.fn)y.fn===f&&(!p||y.once)&&(!d||y.context===d)&&o(this,h);else{for(var m=0,g=[],b=y.length;m<b;m++)(y[m].fn!==f||p&&!y[m].once||d&&y[m].context!==d)&&g.push(y[m]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&o(this,f)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(gU);var CSe=gU.exports;const _Se=vt(CSe);var r1=new _Se,i1="recharts.syncMouseEvents";function Xh(e){"@babel/helpers - typeof";return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(e)}function NSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vU(r.key),r)}}function MSe(e,t,n){return t&&RSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a1(e,t,n){return t=vU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vU(e){var t=PSe(e,"string");return Xh(t)=="symbol"?t:t+""}function PSe(e,t){if(Xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $Se=function(){function e(){NSe(this,e),a1(this,"activeIndex",0),a1(this,"coordinateList",[]),a1(this,"layout","horizontal")}return MSe(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,s=o===void 0?null:o,l=n.layout,u=l===void 0?null:l,f=n.offset,d=f===void 0?null:f,p=n.mouseHandlerCallback,h=p===void 0?null:p;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=a+l+u,p=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:p})}}}])}();function DSe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&se(r)&&se(i))return!0}return!1}function ISe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function yU(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=Ct(t,n,r,i),s=Ct(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function kSe(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,p=Ct(s,l,u,d),h=Ct(s,l,f,d);r=p.x,i=p.y,a=h.x,o=h.y}else return yU(t);return[{x:r,y:i},{x:a,y:o}]}function Wh(e){"@babel/helpers - typeof";return Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wh(e)}function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){LSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LSe(e,t,n){return t=BSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BSe(e){var t=zSe(e,"string");return Wh(t)=="symbol"?t:t+""}function zSe(e,t){if(Wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FSe(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,p=e.chartName,h=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!h||!a||!o||p!=="ScatterChart"&&i!=="axis")return null;var y,m=Bc;if(p==="ScatterChart")y=o,m=Xye;else if(p==="BarChart")y=ISe(d,o,l,f),m=tC;else if(d==="radial"){var g=yU(o),b=g.cx,v=g.cy,w=g.radius,S=g.startAngle,O=g.endAngle;y={cx:b,cy:v,startAngle:S,endAngle:O,innerRadius:w,outerRadius:w},m=fF}else y={points:kSe(d,o,l)},m=Bc;var j=Cg(Cg(Cg(Cg({stroke:"#ccc",pointerEvents:"none"},l),y),Ae(h,!1)),{},{payload:s,payloadIndex:u,className:ke("recharts-tooltip-cursor",h.className)});return x.isValidElement(h)?x.cloneElement(h,j):x.createElement(m,j)}var USe=["item"],HSe=["children","className","width","height","style","compact","title","desc"];function Kf(e){"@babel/helpers - typeof";return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sc.apply(this,arguments)}function L$(e,t){return GSe(e)||VSe(e,t)||xU(e,t)||qSe()}function qSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
146
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VSe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function GSe(e){if(Array.isArray(e))return e}function B$(e,t){if(e==null)return{};var n=KSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function YSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wU(r.key),r)}}function WSe(e,t,n){return t&&XSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QSe(e,t,n){return t=yb(t),ZSe(e,bU()?Reflect.construct(t,n||[],yb(e).constructor):t.apply(e,n))}function ZSe(e,t){if(t&&(Kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JSe(e)}function JSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bU=function(){return!!e})()}function yb(e){return yb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yb(e)}function eOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qj(e,t)}function qj(e,t){return qj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qj(e,t)}function Yf(e){return rOe(e)||nOe(e)||xU(e)||tOe()}function tOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
147
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xU(e,t){if(e){if(typeof e=="string")return Vj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vj(e,t)}}function nOe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rOe(e){if(Array.isArray(e))return Vj(e)}function Vj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z$(Object(n),!0).forEach(function(r){Ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(e,t,n){return t=wU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wU(e){var t=iOe(e,"string");return Kf(t)=="symbol"?t:t+""}function iOe(e,t){if(Kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aOe={xAxis:["bottom","top"],yAxis:["left","right"]},oOe={width:"100%",height:"100%"},SU={x:0,y:0};function _g(e){return e}var sOe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},lOe=function(t,n,r,i){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return Z(Z(Z({},i),Ct(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,u=i.angle;return Z(Z(Z({},i),Ct(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return SU},r0=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(Yf(s),Yf(u)):s},[]);return o.length>0?o:t&&t.length&&se(i)&&se(a)?t.slice(i,a+1):[]};function OU(e){return e==="number"?[0,"auto"]:void 0}var Gj=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=r0(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var h=d===void 0?s:d;p=hy(h,o.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(Yf(l),[eC(u,p)]):l},[])},F$=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=sOe(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=bme(o,s,u,l);if(f>=0&&u){var d=u[f]&&u[f].value,p=Gj(t,n,f,d),h=lOe(r,s,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:h}}return null},uOe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,h=W4(f,a);return r.reduce(function(y,m){var g,b=m.type.defaultProps!==void 0?Z(Z({},m.type.defaultProps),m.props):m.props,v=b.type,w=b.dataKey,S=b.allowDataOverflow,O=b.allowDuplicatedCategory,j=b.scale,E=b.ticks,T=b.includeHidden,A=b[o];if(y[A])return y;var C=r0(t.data,{graphicalItems:i.filter(function(M){var H,G=o in M.props?M.props[o]:(H=M.type.defaultProps)===null||H===void 0?void 0:H[o];return G===A}),dataStartIndex:l,dataEndIndex:u}),_=C.length,$,D,N;DSe(b.domain,S,v)&&($=aj(b.domain,null,S),h&&(v==="number"||j!=="auto")&&(N=zp(C,w,"category")));var P=OU(v);if(!$||$.length===0){var R,B=(R=b.domain)!==null&&R!==void 0?R:P;if(w){if($=zp(C,w,v),v==="category"&&h){var L=see($);O&&L?(D=$,$=ab(0,_)):O||($=s2(B,$,m).reduce(function(M,H){return M.indexOf(H)>=0?M:[].concat(Yf(M),[H])},[]))}else if(v==="category")O?$=$.filter(function(M){return M!==""&&!Ue(M)}):$=s2(B,$,m).reduce(function(M,H){return M.indexOf(H)>=0||H===""||Ue(H)?M:[].concat(Yf(M),[H])},[]);else if(v==="number"){var k=jme(C,i.filter(function(M){var H,G,U=o in M.props?M.props[o]:(H=M.type.defaultProps)===null||H===void 0?void 0:H[o],Y="hide"in M.props?M.props.hide:(G=M.type.defaultProps)===null||G===void 0?void 0:G.hide;return U===A&&(T||!Y)}),w,a,f);k&&($=k)}h&&(v==="number"||j!=="auto")&&(N=zp(C,w,"category"))}else h?$=ab(0,_):s&&s[A]&&s[A].hasStack&&v==="number"?$=p==="expand"?[0,1]:iF(s[A].stackGroups,l,u):$=X4(C,i.filter(function(M){var H=o in M.props?M.props[o]:M.type.defaultProps[o],G="hide"in M.props?M.props.hide:M.type.defaultProps.hide;return H===A&&(T||!G)}),v,f,!0);if(v==="number")$=Hj(d,$,A,a,E),B&&($=aj(B,$,S));else if(v==="category"&&B){var I=B,V=$.every(function(M){return I.indexOf(M)>=0});V&&($=I)}}return Z(Z({},y),{},Ne({},A,Z(Z({},b),{},{axisType:a,domain:$,categoricalDomain:N,duplicateDomain:D,originalDomain:(g=b.domain)!==null&&g!==void 0?g:P,isCategorical:h,layout:f})))},{})},cOe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=r0(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),h=p.length,y=W4(f,a),m=-1;return r.reduce(function(g,b){var v=b.type.defaultProps!==void 0?Z(Z({},b.type.defaultProps),b.props):b.props,w=v[o],S=OU("number");if(!g[w]){m++;var O;return y?O=ab(0,h):s&&s[w]&&s[w].hasStack?(O=iF(s[w].stackGroups,l,u),O=Hj(d,O,w,a)):(O=aj(S,X4(p,r.filter(function(j){var E,T,A=o in j.props?j.props[o]:(E=j.type.defaultProps)===null||E===void 0?void 0:E[o],C="hide"in j.props?j.props.hide:(T=j.type.defaultProps)===null||T===void 0?void 0:T.hide;return A===w&&!C}),"number",f),i.defaultProps.allowDataOverflow),O=Hj(d,O,w,a)),Z(Z({},g),{},Ne({},w,Z(Z({axisType:a},i.defaultProps),{},{hide:!0,orientation:ti(aOe,"".concat(a,".").concat(m%2),null),domain:O,originalDomain:S,isCategorical:y,layout:f})))}return g},{})},fOe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=ni(f,a),h={};return p&&p.length?h=uOe(t,{axes:p,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=cOe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},dOe=function(t){var n=es(t),r=eo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:AA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:qy(n,r)}},U$=function(t){var n=t.children,r=t.defaultShowTooltip,i=qr(n,Bs),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},pOe=function(t){return!t||!t.length?!1:t.some(function(n){var r=io(n&&n.type);return r&&r.indexOf("Bar")>=0})},H$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},hOe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,f=r.height,d=r.children,p=r.margin||{},h=qr(d,Bs),y=qr(d,Gl),m=Object.keys(l).reduce(function(O,j){var E=l[j],T=E.orientation;return!E.mirror&&!E.hide?Z(Z({},O),{},Ne({},T,O[T]+E.width)):O},{left:p.left||0,right:p.right||0}),g=Object.keys(o).reduce(function(O,j){var E=o[j],T=E.orientation;return!E.mirror&&!E.hide?Z(Z({},O),{},Ne({},T,ti(O,"".concat(T))+E.height)):O},{top:p.top||0,bottom:p.bottom||0}),b=Z(Z({},g),m),v=b.bottom;h&&(b.bottom+=h.props.height||Bs.defaultProps.height),y&&n&&(b=Sme(b,i,r,n));var w=u-b.left-b.right,S=f-b.top-b.bottom;return Z(Z({brushBottom:v},b),{},{width:Math.max(w,0),height:Math.max(S,0)})},mOe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},i0=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,p=function(b,v){var w=v.graphicalItems,S=v.stackGroups,O=v.offset,j=v.updateId,E=v.dataStartIndex,T=v.dataEndIndex,A=b.barSize,C=b.layout,_=b.barGap,$=b.barCategoryGap,D=b.maxBarSize,N=H$(C),P=N.numericAxisName,R=N.cateAxisName,B=pOe(w),L=[];return w.forEach(function(k,I){var V=r0(b.data,{graphicalItems:[k],dataStartIndex:E,dataEndIndex:T}),M=k.type.defaultProps!==void 0?Z(Z({},k.type.defaultProps),k.props):k.props,H=M.dataKey,G=M.maxBarSize,U=M["".concat(P,"Id")],Y=M["".concat(R,"Id")],X={},te=l.reduce(function(re,we){var $e=v["".concat(we.axisType,"Map")],at=M["".concat(we.axisType,"Id")];$e&&$e[at]||we.axisType==="zAxis"||fu();var W=$e[at];return Z(Z({},re),{},Ne(Ne({},we.axisType,W),"".concat(we.axisType,"Ticks"),eo(W)))},X),q=te[R],ee=te["".concat(R,"Ticks")],J=S&&S[U]&&S[U].hasStack&&Nme(k,S[U].stackGroups),K=io(k.type).indexOf("Bar")>=0,oe=qy(q,ee),Q=[],ae=B&&xme({barSize:A,stackGroups:S,totalSize:mOe(te,R)});if(K){var ue,ye,Ie=Ue(G)?D:G,ce=(ue=(ye=qy(q,ee,!0))!==null&&ye!==void 0?ye:Ie)!==null&&ue!==void 0?ue:0;Q=wme({barGap:_,barCategoryGap:$,bandSize:ce!==oe?ce:oe,sizeList:ae[Y],maxBarSize:Ie}),ce!==oe&&(Q=Q.map(function(re){return Z(Z({},re),{},{position:Z(Z({},re.position),{},{offset:re.position.offset-ce/2})})}))}var Se=k&&k.type&&k.type.getComposedData;Se&&L.push({props:Z(Z({},Se(Z(Z({},te),{},{displayedData:V,props:b,dataKey:H,item:k,bandSize:oe,barPosition:Q,offset:O,stackedData:J,layout:C,dataStartIndex:E,dataEndIndex:T}))),{},Ne(Ne(Ne({key:k.key||"item-".concat(I)},P,te[P]),R,te[R]),"animationId",j)),childIndex:xee(k,b.children),item:k})}),L},h=function(b,v){var w=b.props,S=b.dataStartIndex,O=b.dataEndIndex,j=b.updateId;if(!tM({props:w}))return null;var E=w.children,T=w.layout,A=w.stackOffset,C=w.data,_=w.reverseStackOrder,$=H$(T),D=$.numericAxisName,N=$.cateAxisName,P=ni(E,r),R=_me(C,P,"".concat(D,"Id"),"".concat(N,"Id"),A,_),B=l.reduce(function(M,H){var G="".concat(H.axisType,"Map");return Z(Z({},M),{},Ne({},G,fOe(w,Z(Z({},H),{},{graphicalItems:P,stackGroups:H.axisType===D&&R,dataStartIndex:S,dataEndIndex:O}))))},{}),L=hOe(Z(Z({},B),{},{props:w,graphicalItems:P}),v==null?void 0:v.legendBBox);Object.keys(B).forEach(function(M){B[M]=f(w,B[M],L,M.replace("Map",""),n)});var k=B["".concat(N,"Map")],I=dOe(k),V=p(w,Z(Z({},B),{},{dataStartIndex:S,dataEndIndex:O,updateId:j,graphicalItems:P,stackGroups:R,offset:L}));return Z(Z({formattedGraphicalItems:V,graphicalItems:P,offset:L,stackGroups:R},I),B)},y=function(g){function b(v){var w,S,O;return YSe(this,b),O=QSe(this,b,[v]),Ne(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(O,"accessibilityManager",new $Se),Ne(O,"handleLegendBBoxUpdate",function(j){if(j){var E=O.state,T=E.dataStartIndex,A=E.dataEndIndex,C=E.updateId;O.setState(Z({legendBBox:j},h({props:O.props,dataStartIndex:T,dataEndIndex:A,updateId:C},Z(Z({},O.state),{},{legendBBox:j}))))}}),Ne(O,"handleReceiveSyncEvent",function(j,E,T){if(O.props.syncId===j){if(T===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(E)}}),Ne(O,"handleBrushChange",function(j){var E=j.startIndex,T=j.endIndex;if(E!==O.state.dataStartIndex||T!==O.state.dataEndIndex){var A=O.state.updateId;O.setState(function(){return Z({dataStartIndex:E,dataEndIndex:T},h({props:O.props,dataStartIndex:E,dataEndIndex:T,updateId:A},O.state))}),O.triggerSyncEvent({dataStartIndex:E,dataEndIndex:T})}}),Ne(O,"handleMouseEnter",function(j){var E=O.getMouseInfo(j);if(E){var T=Z(Z({},E),{},{isTooltipActive:!0});O.setState(T),O.triggerSyncEvent(T);var A=O.props.onMouseEnter;Ce(A)&&A(T,j)}}),Ne(O,"triggeredAfterMouseMove",function(j){var E=O.getMouseInfo(j),T=E?Z(Z({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(T),O.triggerSyncEvent(T);var A=O.props.onMouseMove;Ce(A)&&A(T,j)}),Ne(O,"handleItemMouseEnter",function(j){O.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),Ne(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),Ne(O,"handleMouseMove",function(j){j.persist(),O.throttleTriggeredAfterMouseMove(j)}),Ne(O,"handleMouseLeave",function(j){O.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};O.setState(E),O.triggerSyncEvent(E);var T=O.props.onMouseLeave;Ce(T)&&T(E,j)}),Ne(O,"handleOuterEvent",function(j){var E=bee(j),T=ti(O.props,"".concat(E));if(E&&Ce(T)){var A,C;/.*touch.*/i.test(E)?C=O.getMouseInfo(j.changedTouches[0]):C=O.getMouseInfo(j),T((A=C)!==null&&A!==void 0?A:{},j)}}),Ne(O,"handleClick",function(j){var E=O.getMouseInfo(j);if(E){var T=Z(Z({},E),{},{isTooltipActive:!0});O.setState(T),O.triggerSyncEvent(T);var A=O.props.onClick;Ce(A)&&A(T,j)}}),Ne(O,"handleMouseDown",function(j){var E=O.props.onMouseDown;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"handleMouseUp",function(j){var E=O.props.onMouseUp;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),Ne(O,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseDown(j.changedTouches[0])}),Ne(O,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseUp(j.changedTouches[0])}),Ne(O,"handleDoubleClick",function(j){var E=O.props.onDoubleClick;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"handleContextMenu",function(j){var E=O.props.onContextMenu;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"triggerSyncEvent",function(j){O.props.syncId!==void 0&&r1.emit(i1,O.props.syncId,j,O.eventEmitterSymbol)}),Ne(O,"applySyncEvent",function(j){var E=O.props,T=E.layout,A=E.syncMethod,C=O.state.updateId,_=j.dataStartIndex,$=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)O.setState(Z({dataStartIndex:_,dataEndIndex:$},h({props:O.props,dataStartIndex:_,dataEndIndex:$,updateId:C},O.state)));else if(j.activeTooltipIndex!==void 0){var D=j.chartX,N=j.chartY,P=j.activeTooltipIndex,R=O.state,B=R.offset,L=R.tooltipTicks;if(!B)return;if(typeof A=="function")P=A(L,j);else if(A==="value"){P=-1;for(var k=0;k<L.length;k++)if(L[k].value===j.activeLabel){P=k;break}}var I=Z(Z({},B),{},{x:B.left,y:B.top}),V=Math.min(D,I.x+I.width),M=Math.min(N,I.y+I.height),H=L[P]&&L[P].value,G=Gj(O.state,O.props.data,P),U=L[P]?{x:T==="horizontal"?L[P].coordinate:V,y:T==="horizontal"?M:L[P].coordinate}:SU;O.setState(Z(Z({},j),{},{activeLabel:H,activeCoordinate:U,activePayload:G,activeTooltipIndex:P}))}else O.setState(j)}),Ne(O,"renderCursor",function(j){var E,T=O.state,A=T.isTooltipActive,C=T.activeCoordinate,_=T.activePayload,$=T.offset,D=T.activeTooltipIndex,N=T.tooltipAxisBandSize,P=O.getTooltipEventType(),R=(E=j.props.active)!==null&&E!==void 0?E:A,B=O.props.layout,L=j.key||"_recharts-cursor";return z.createElement(FSe,{key:L,activeCoordinate:C,activePayload:_,activeTooltipIndex:D,chartName:n,element:j,isActive:R,layout:B,offset:$,tooltipAxisBandSize:N,tooltipEventType:P})}),Ne(O,"renderPolarAxis",function(j,E,T){var A=ti(j,"type.axisType"),C=ti(O.state,"".concat(A,"Map")),_=j.type.defaultProps,$=_!==void 0?Z(Z({},_),j.props):j.props,D=C&&C[$["".concat(A,"Id")]];return x.cloneElement(j,Z(Z({},D),{},{className:ke(A,D.className),key:j.key||"".concat(E,"-").concat(T),ticks:eo(D,!0)}))}),Ne(O,"renderPolarGrid",function(j){var E=j.props,T=E.radialLines,A=E.polarAngles,C=E.polarRadius,_=O.state,$=_.radiusAxisMap,D=_.angleAxisMap,N=es($),P=es(D),R=P.cx,B=P.cy,L=P.innerRadius,k=P.outerRadius;return x.cloneElement(j,{polarAngles:Array.isArray(A)?A:eo(P,!0).map(function(I){return I.coordinate}),polarRadius:Array.isArray(C)?C:eo(N,!0).map(function(I){return I.coordinate}),cx:R,cy:B,innerRadius:L,outerRadius:k,key:j.key||"polar-grid",radialLines:T})}),Ne(O,"renderLegend",function(){var j=O.state.formattedGraphicalItems,E=O.props,T=E.children,A=E.width,C=E.height,_=O.props.margin||{},$=A-(_.left||0)-(_.right||0),D=K4({children:T,formattedGraphicalItems:j,legendWidth:$,legendContent:u});if(!D)return null;var N=D.item,P=B$(D,USe);return x.cloneElement(N,Z(Z({},P),{},{chartWidth:A,chartHeight:C,margin:_,onBBoxUpdate:O.handleLegendBBoxUpdate}))}),Ne(O,"renderTooltip",function(){var j,E=O.props,T=E.children,A=E.accessibilityLayer,C=qr(T,ra);if(!C)return null;var _=O.state,$=_.isTooltipActive,D=_.activeCoordinate,N=_.activePayload,P=_.activeLabel,R=_.offset,B=(j=C.props.active)!==null&&j!==void 0?j:$;return x.cloneElement(C,{viewBox:Z(Z({},R),{},{x:R.left,y:R.top}),active:B,label:P,payload:B?N:[],coordinate:D,accessibilityLayer:A})}),Ne(O,"renderBrush",function(j){var E=O.props,T=E.margin,A=E.data,C=O.state,_=C.offset,$=C.dataStartIndex,D=C.dataEndIndex,N=C.updateId;return x.cloneElement(j,{key:j.key||"_recharts-brush",onChange:jg(O.handleBrushChange,j.props.onChange),data:A,x:se(j.props.x)?j.props.x:_.left,y:se(j.props.y)?j.props.y:_.top+_.height+_.brushBottom-(T.bottom||0),width:se(j.props.width)?j.props.width:_.width,startIndex:$,endIndex:D,updateId:"brush-".concat(N)})}),Ne(O,"renderReferenceElement",function(j,E,T){if(!j)return null;var A=O,C=A.clipPathId,_=O.state,$=_.xAxisMap,D=_.yAxisMap,N=_.offset,P=j.type.defaultProps||{},R=j.props,B=R.xAxisId,L=B===void 0?P.xAxisId:B,k=R.yAxisId,I=k===void 0?P.yAxisId:k;return x.cloneElement(j,{key:j.key||"".concat(E,"-").concat(T),xAxis:$[L],yAxis:D[I],viewBox:{x:N.left,y:N.top,width:N.width,height:N.height},clipPathId:C})}),Ne(O,"renderActivePoints",function(j){var E=j.item,T=j.activePoint,A=j.basePoint,C=j.childIndex,_=j.isRange,$=[],D=E.props.key,N=E.item.type.defaultProps!==void 0?Z(Z({},E.item.type.defaultProps),E.item.props):E.item.props,P=N.activeDot,R=N.dataKey,B=Z(Z({index:C,dataKey:R,cx:T.x,cy:T.y,r:4,fill:JA(E.item),strokeWidth:2,stroke:"#fff",payload:T.payload,value:T.value},Ae(P,!1)),my(P));return $.push(b.renderActiveDot(P,B,"".concat(D,"-activePoint-").concat(C))),A?$.push(b.renderActiveDot(P,Z(Z({},B),{},{cx:A.x,cy:A.y}),"".concat(D,"-basePoint-").concat(C))):_&&$.push(null),$}),Ne(O,"renderGraphicChild",function(j,E,T){var A=O.filterFormatItem(j,E,T);if(!A)return null;var C=O.getTooltipEventType(),_=O.state,$=_.isTooltipActive,D=_.tooltipAxis,N=_.activeTooltipIndex,P=_.activeLabel,R=O.props.children,B=qr(R,ra),L=A.props,k=L.points,I=L.isRange,V=L.baseLine,M=A.item.type.defaultProps!==void 0?Z(Z({},A.item.type.defaultProps),A.item.props):A.item.props,H=M.activeDot,G=M.hide,U=M.activeBar,Y=M.activeShape,X=!!(!G&&$&&B&&(H||U||Y)),te={};C!=="axis"&&B&&B.props.trigger==="click"?te={onClick:jg(O.handleItemMouseEnter,j.props.onClick)}:C!=="axis"&&(te={onMouseLeave:jg(O.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:jg(O.handleItemMouseEnter,j.props.onMouseEnter)});var q=x.cloneElement(j,Z(Z({},A.props),te));function ee(we){return typeof D.dataKey=="function"?D.dataKey(we.payload):null}if(X)if(N>=0){var J,K;if(D.dataKey&&!D.allowDuplicatedCategory){var oe=typeof D.dataKey=="function"?ee:"payload.".concat(D.dataKey.toString());J=hy(k,oe,P),K=I&&V&&hy(V,oe,P)}else J=k==null?void 0:k[N],K=I&&V&&V[N];if(Y||U){var Q=j.props.activeIndex!==void 0?j.props.activeIndex:N;return[x.cloneElement(j,Z(Z(Z({},A.props),te),{},{activeIndex:Q})),null,null]}if(!Ue(J))return[q].concat(Yf(O.renderActivePoints({item:A,activePoint:J,basePoint:K,childIndex:N,isRange:I})))}else{var ae,ue=(ae=O.getItemByXY(O.state.activeCoordinate))!==null&&ae!==void 0?ae:{graphicalItem:q},ye=ue.graphicalItem,Ie=ye.item,ce=Ie===void 0?j:Ie,Se=ye.childIndex,re=Z(Z(Z({},A.props),te),{},{activeIndex:Se});return[x.cloneElement(ce,re),null,null]}return I?[q,null,null]:[q,null]}),Ne(O,"renderCustomized",function(j,E,T){return x.cloneElement(j,Z(Z({key:"recharts-customized-".concat(T)},O.props),O.state))}),Ne(O,"renderMap",{CartesianGrid:{handler:_g,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:_g},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:_g},YAxis:{handler:_g},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((w=v.id)!==null&&w!==void 0?w:Sd("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=Kz(O.triggeredAfterMouseMove,(S=v.throttleDelay)!==null&&S!==void 0?S:1e3/60),O.state={},O}return eOe(b,g),WSe(b,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,O=w.data,j=w.height,E=w.layout,T=qr(S,ra);if(T){var A=T.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,_=Gj(this.state,O,A,C),$=this.state.tooltipTicks[A].coordinate,D=(this.state.offset.top+j)/2,N=E==="horizontal",P=N?{x:$,y:D}:{y:$,x:D},R=this.state.formattedGraphicalItems.find(function(L){var k=L.item;return k.type.name==="Scatter"});R&&(P=Z(Z({},P),R.props.points[A].tooltipPosition),_=R.props.points[A].tooltipPayload);var B={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:C,activePayload:_,activeCoordinate:P};this.setState(B),this.renderCursor(T),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var O,j;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){xO([qr(w.children,ra)],[qr(this.props.children,ra)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=qr(this.props.children,ra);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,O=S.getBoundingClientRect(),j=Kce(O),E={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},T=O.width/S.offsetWidth||1,A=this.inRange(E.chartX,E.chartY,T);if(!A)return null;var C=this.state,_=C.xAxisMap,$=C.yAxisMap,D=this.getTooltipEventType(),N=F$(this.state,this.props.data,this.props.layout,A);if(D!=="axis"&&_&&$){var P=es(_).scale,R=es($).scale,B=P&&P.invert?P.invert(E.chartX):null,L=R&&R.invert?R.invert(E.chartY):null;return Z(Z({},E),{},{xValue:B,yValue:L},N)}return N?Z(Z({},E),N):null}},{key:"inRange",value:function(w,S){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,E=w/O,T=S/O;if(j==="horizontal"||j==="vertical"){var A=this.state.offset,C=E>=A.left&&E<=A.left+A.width&&T>=A.top&&T<=A.top+A.height;return C?{x:E,y:T}:null}var _=this.state,$=_.angleAxisMap,D=_.radiusAxisMap;if($&&D){var N=es($);return c2({x:E,y:T},N)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),O=qr(w,ra),j={};O&&S==="axis"&&(O.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var E=my(this.props,this.handleOuterEvent);return Z(Z({},E),j)}},{key:"addListener",value:function(){r1.on(i1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){r1.removeListener(i1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,O){for(var j=this.state.formattedGraphicalItems,E=0,T=j.length;E<T;E++){var A=j[E];if(A.item===w||A.props.key===w.key||S===io(A.item.type)&&O===A.childIndex)return A}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,O=S.left,j=S.top,E=S.height,T=S.width;return z.createElement("defs",null,z.createElement("clipPath",{id:w},z.createElement("rect",{x:O,y:j,height:E,width:T})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,O){var j=L$(O,2),E=j[0],T=j[1];return Z(Z({},S),{},Ne({},E,T.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,O){var j=L$(O,2),E=j[0],T=j[1];return Z(Z({},S),{},Ne({},E,T.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,O=S.formattedGraphicalItems,j=S.activeItem;if(O&&O.length)for(var E=0,T=O.length;E<T;E++){var A=O[E],C=A.props,_=A.item,$=_.type.defaultProps!==void 0?Z(Z({},_.type.defaultProps),_.props):_.props,D=io(_.type);if(D==="Bar"){var N=(C.data||[]).find(function(L){return _ye(w,L)});if(N)return{graphicalItem:A,payload:N}}else if(D==="RadialBar"){var P=(C.data||[]).find(function(L){return c2(w,L)});if(P)return{graphicalItem:A,payload:P}}else if(Wx(A,j)||Qx(A,j)||Hh(A,j)){var R=vxe({graphicalItem:A,activeTooltipItem:j,itemData:$.data}),B=$.activeIndex===void 0?R:$.activeIndex;return{graphicalItem:Z(Z({},A),{},{childIndex:B}),payload:Hh(A,j)?$.data[R]:A.props.data[R]}}}return null}},{key:"render",value:function(){var w=this;if(!tM(this))return null;var S=this.props,O=S.children,j=S.className,E=S.width,T=S.height,A=S.style,C=S.compact,_=S.title,$=S.desc,D=B$(S,HSe),N=Ae(D,!1);if(C)return z.createElement(w$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},z.createElement(SO,Sc({},N,{width:E,height:T,title:_,desc:$}),this.renderClipPath(),rM(O,this.renderMap)));if(this.props.accessibilityLayer){var P,R;N.tabIndex=(P=this.props.tabIndex)!==null&&P!==void 0?P:0,N.role=(R=this.props.role)!==null&&R!==void 0?R:"application",N.onKeyDown=function(L){w.accessibilityManager.keyboardEvent(L)},N.onFocus=function(){w.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return z.createElement(w$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},z.createElement("div",Sc({className:ke("recharts-wrapper",j),style:Z({position:"relative",cursor:"default",width:E,height:T},A)},B,{ref:function(k){w.container=k}}),z.createElement(SO,Sc({},N,{width:E,height:T,title:_,desc:$,style:oOe}),this.renderClipPath(),rM(O,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);Ne(y,"displayName",n),Ne(y,"defaultProps",Z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Ne(y,"getDerivedStateFromProps",function(g,b){var v=g.dataKey,w=g.data,S=g.children,O=g.width,j=g.height,E=g.layout,T=g.stackOffset,A=g.margin,C=b.dataStartIndex,_=b.dataEndIndex;if(b.updateId===void 0){var $=U$(g);return Z(Z(Z({},$),{},{updateId:0},h(Z(Z({props:g},$),{},{updateId:0}),b)),{},{prevDataKey:v,prevData:w,prevWidth:O,prevHeight:j,prevLayout:E,prevStackOffset:T,prevMargin:A,prevChildren:S})}if(v!==b.prevDataKey||w!==b.prevData||O!==b.prevWidth||j!==b.prevHeight||E!==b.prevLayout||T!==b.prevStackOffset||!Ic(A,b.prevMargin)){var D=U$(g),N={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},P=Z(Z({},F$(b,w,E)),{},{updateId:b.updateId+1}),R=Z(Z(Z({},D),N),P);return Z(Z(Z({},R),h(Z({props:g},R),b)),{},{prevDataKey:v,prevData:w,prevWidth:O,prevHeight:j,prevLayout:E,prevStackOffset:T,prevMargin:A,prevChildren:S})}if(!xO(S,b.prevChildren)){var B,L,k,I,V=qr(S,Bs),M=V&&(B=(L=V.props)===null||L===void 0?void 0:L.startIndex)!==null&&B!==void 0?B:C,H=V&&(k=(I=V.props)===null||I===void 0?void 0:I.endIndex)!==null&&k!==void 0?k:_,G=M!==C||H!==_,U=!Ue(w),Y=U&&!G?b.updateId:b.updateId+1;return Z(Z({updateId:Y},h(Z(Z({props:g},b),{},{updateId:Y,dataStartIndex:M,dataEndIndex:H}),b)),{},{prevChildren:S,dataStartIndex:M,dataEndIndex:H})}return null}),Ne(y,"renderActiveDot",function(g,b,v){var w;return x.isValidElement(g)?w=x.cloneElement(g,b):Ce(g)?w=g(b):w=z.createElement(Kx,b),z.createElement(Ye,{className:"recharts-active-dot",key:v},w)});var m=x.forwardRef(function(b,v){return z.createElement(y,Sc({},b,{ref:v}))});return m.displayName=y.displayName,m},dC=i0({chartName:"BarChart",GraphicalChild:Do,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:So},{axisType:"yAxis",AxisComp:Oo}],formatAxisMap:zF}),gOe=i0({chartName:"PieChart",GraphicalChild:$o,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Nd},{axisType:"radiusAxis",AxisComp:Nm}],formatAxisMap:sF,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),jU=i0({chartName:"AreaChart",GraphicalChild:Io,axisComponents:[{axisType:"xAxis",AxisComp:So},{axisType:"yAxis",AxisComp:Oo}],formatAxisMap:zF}),vOe=i0({chartName:"RadialBarChart",GraphicalChild:Rm,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:Nd},{axisType:"radiusAxis",AxisComp:Nm}],formatAxisMap:sF,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const EU=x.createContext(null);function TU(){return x.useContext(EU)??{}}const yOe=["h-full w-full text-[10px]","[&_.recharts-cartesian-grid_line]:stroke-line","[&_.recharts-cartesian-axis-line]:stroke-line","[&_.recharts-cartesian-axis-tick-line]:stroke-line","[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground","[&_.recharts-radial-bar-background-sector]:fill-panel-2","[&_.recharts-reference-line_line]:stroke-line","[&_.recharts-brush-texts_text]:fill-muted-foreground","[&_.recharts-sector]:outline-none","[&_.recharts-layer]:outline-none","[&_.recharts-surface]:outline-none"].join(" "),AU={height:18,travellerWidth:8,stroke:"var(--aviary-accent-ink, var(--accent))",fill:"color-mix(in srgb, var(--panel-2) 80%, transparent)"};function bOe(e){const t={};for(const[n,r]of Object.entries(e))r.color&&(t[`--color-${n}`]=r.color);return t}function oo(e){return`var(--color-${e})`}function pu({config:e,className:t,children:n}){const r=x.useMemo(()=>bOe(e),[e]);return c.jsx(EU.Provider,{value:e,children:c.jsx("div",{"data-chart":"",className:Gt(yOe,t),style:r,children:c.jsx(zce,{width:"100%",height:"100%",children:n})})})}const Xf=ra,Kj=Gl;function CU(e){return typeof e=="object"&&e!==null}function _U(e){return Array.isArray(e)?e.filter(CU):[]}function qi(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isFinite(e))return String(e)}function xOe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function wOe(e){return CU(e.payload)?e.payload:void 0}function SOe(e){return qi(e.dataKey)??qi(e.name)}function OOe(e){return qi(e.dataKey)??qi(e.name)??qi(e.value)}function Yj(e,t){return e??`series-${t}`}function NU(e,t,n){var i,a;const r=t?(i=n[t])==null?void 0:i.color:void 0;return qi((a=wOe(e))==null?void 0:a.color)??r??qi(e.color)??qi(e.fill)}function RU(e,t,n){var i;return(t?(i=n[t])==null?void 0:i.label:void 0)??qi(e.name)??t??""}function Wf({active:e,payload:t,label:n,hideLabel:r=!1,hideIndicator:i=!1,labelFormatter:a,valueFormatter:o,className:s}){const l=TU(),u=_U(t);if(!e||u.length===0)return null;const f=qi(n),d=f===void 0?null:(a==null?void 0:a(f))??f;return c.jsxs("div",{className:Gt("min-w-[8rem] rounded border border-line bg-popover px-2 py-1.5 text-[11px] text-popover-foreground shadow-lg",s),children:[!r&&d!==null&&c.jsx("p",{className:"mb-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:d}),c.jsx("div",{className:"grid gap-0.5",children:u.map((p,h)=>{const y=SOe(p),m=xOe(p.value),g=m!==void 0&&o?o(m,y??""):qi(p.value)??"—",b=NU(p,y,l);return c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[!i&&c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[2px] border border-line",style:b?{background:b}:void 0}),RU(p,y,l)]}),c.jsx("span",{className:"font-mono tabular-nums text-foreground",children:g})]},Yj(y,h))})})]})}function Xj({payload:e,hidden:t,onToggle:n,className:r}){const i=TU(),a=_U(e);return a.length===0?null:c.jsx("div",{className:Gt("flex flex-wrap items-center justify-center gap-x-2 gap-y-1",r),children:a.map((o,s)=>{const l=OOe(o),u=l!==void 0&&(t==null?void 0:t.has(l))===!0,f=NU(o,l,i),d=c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:f?{background:f}:void 0}),p=RU(o,l,i);return!n||l===void 0?c.jsxs("span",{className:"flex items-center gap-1.5 px-1 text-[10px] text-muted-foreground",children:[d,p]},Yj(l,s)):c.jsxs(Tt,{variant:"ghost",size:"xs","aria-pressed":!u,title:u?`Show ${l}`:`Hide ${l}`,className:Gt("gap-1.5 normal-case tracking-normal",u&&"opacity-40"),onClick:()=>n(l),children:[d,p]},Yj(l,s))})})}function jOe(){const[e,t]=x.useState(()=>new Set),n=x.useCallback(i=>{t(a=>{const o=new Set(a);return o.delete(i)||o.add(i),o})},[]),r=x.useCallback(i=>e.has(i),[e]);return{hidden:e,toggle:n,isHidden:r}}function EOe(e,t){return function(r,...i){const a=new URL(e);return a.searchParams.set("code",r.toString()),i.forEach(o=>a.searchParams.append("args[]",o)),`${t} error #${r}; visit ${a} for the full message.`}}const Wt=EOe("https://base-ui.com/production-error","Base UI"),MU=x.createContext(void 0);function Du(e){const t=x.useContext(MU);if(!e&&t===void 0)throw new Error(Wt(27));return t}const q$={};function fn(e,t){const n=x.useRef(q$);return n.current===q$&&(n.current=e(t)),n}function Ca(e,t,n,r){const i=fn(PU).current;return AOe(i,e,t,n,r)&&$U(i,[e,t,n,r]),i.callback}function TOe(e){const t=fn(PU).current;return COe(t,e)&&$U(t,e),t.callback}function PU(){return{callback:null,cleanup:null,refs:[]}}function AOe(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function COe(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function $U(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const a=t[i];if(a!=null)switch(typeof a){case"function":{const o=a(n);typeof o=="function"&&(r[i]=o);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const a=t[i];if(a!=null)switch(typeof a){case"function":{const o=r[i];typeof o=="function"?o():a(null);break}case"object":{a.current=null;break}}}}}}}const _Oe=parseInt(x.version,10);function pC(e){return _Oe>=e}function V$(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(pC(19)?n==null?void 0:n.ref:t.ref)??null}function Wj(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ht(){}const Gi=Object.freeze([]),st=Object.freeze({});function NOe(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const a=t[r](i);a!=null&&Object.assign(n,a);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function ROe(e,t){return typeof e=="function"?e(t):e}function DU(e,t){return typeof e=="function"?e(t):e}const IU={};function Ir(e,t,n,r,i){if(!n&&!r&&!i&&!e)return bb(t);let a=bb(e);return t&&(a=bp(a,t)),n&&(a=bp(a,n)),r&&(a=bp(a,r)),i&&(a=bp(a,i)),a}function MOe(e){if(e.length===0)return IU;if(e.length===1)return bb(e[0]);let t=bb(e[0]);for(let n=1;n<e.length;n+=1)t=bp(t,e[n]);return t}function bb(e){return LU(e)?{...e(IU)}:POe(e)}function bp(e,t){return LU(t)?t(e):$Oe(e,t)}function POe(e){const t={...e};for(const n in t){const r=t[n];kU(n,r)&&(t[n]=BU(r))}return t}function $Oe(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Wj(e.style,r);break}case"className":{e[n]=zU(e.className,r);break}default:kU(n,r)?e[n]=DOe(e[n],r):e[n]=r}}return e}function kU(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function LU(e){return typeof e=="function"}function DOe(e,t){return t?e?(...n)=>{const r=n[0];if(FU(r)){const a=r;xb(a);const o=t(...n);return a.baseUIHandlerPrevented||e==null||e(...n),o}const i=t(...n);return e==null||e(...n),i}:BU(t):e}function BU(e){return e&&((...t)=>{const n=t[0];return FU(n)&&xb(n),e(...t)})}function xb(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function zU(e,t){return t?e?t+" "+e:t:e}function FU(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function it(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=hC(r));const i=IOe(t,n,r);if(n.enabled===!1)return null;const a=n.state??st;return BOe(e,r,i,a)}function IOe(e,t,n){const{className:r,style:i}=e,{state:a=st,ref:o,props:s,stateAttributesMapping:l,enabled:u=!0}=t,f=u?ROe(r,a):void 0,d=u?DU(i,a):void 0,p=u?NOe(a,l):st,h=u&&s?kOe(s):void 0,y=u?Wj(p,h)??{}:st;return typeof document<"u"&&(u?Array.isArray(o)?y.ref=TOe([y.ref,V$(n),...o]):y.ref=Ca(y.ref,V$(n),o):Ca(null,null)),u?(f!==void 0&&(y.className=zU(y.className,f)),d!==void 0&&(y.style=Wj(y.style,d)),y):st}function kOe(e){return Array.isArray(e)?MOe(e):Ir(void 0,e)}const LOe=Symbol.for("react.lazy");function hC(e){if((e==null?void 0:e.$$typeof)!==LOe)return e;const t=x.Children.toArray(e)[0];return x.isValidElement(t)?t:e}function BOe(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Ir(n,t.props);return i.ref=n.ref,x.cloneElement(t,i)}return zOe(e,n)}function zOe(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}const mC="data-starting-style",FOe="data-ending-style",UOe={[mC]:""},HOe={[FOe]:""},Pm={transitionStatus(e){return e==="starting"?UOe:e==="ending"?HOe:null}},qOe="data-open",VOe="data-closed",GOe="data-anchor-hidden",UU="data-popup-open",KOe="data-pressed",YOe={[UU]:""},XOe={[UU]:"",[KOe]:""},WOe={[qOe]:""},QOe={[VOe]:""},ZOe={[GOe]:""},HU={open(e){return e?YOe:null}},Qj={open(e){return e?XOe:null}},$m={open(e){return e?WOe:QOe},anchorHidden(e){return e?ZOe:null}},gC={...$m,...Pm},vC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,forceRender:o=!1,...s}=t,l=Du(),u=l.useState("open"),f=l.useState("nested"),d=l.useState("mounted"),p=l.useState("transitionStatus");return it("div",t,{state:{open:u,transitionStatus:p},ref:[l.context.backdropRef,n],stateAttributesMapping:gC,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},s],enabled:o||!f})});function a0(){return typeof window<"u"}function Wn(e){return yC(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ko(e){var t;return(t=(yC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yC(e){return a0()?e instanceof Node||e instanceof Nt(e).Node:!1}function ot(e){return a0()?e instanceof Element||e instanceof Nt(e).Element:!1}function Et(e){return a0()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function hu(e){return!a0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function Dm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ii(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function JOe(e){return/^(table|td|th)$/.test(Wn(e))}function o0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const eje=/transform|translate|scale|rotate|perspective|filter/,tje=/paint|layout|strict|content/,hl=e=>!!e&&e!=="none";let o1;function bC(e){const t=ot(e)?ii(e):e;return hl(t.transform)||hl(t.translate)||hl(t.scale)||hl(t.rotate)||hl(t.perspective)||!xC()&&(hl(t.backdropFilter)||hl(t.filter))||eje.test(t.willChange||"")||tje.test(t.contain||"")}function nje(e){let t=jo(e);for(;Et(t)&&!so(t);){if(bC(t))return t;if(o0(t))return null;t=jo(t)}return null}function xC(){return o1==null&&(o1=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),o1}function so(e){return/^(html|body|#document)$/.test(Wn(e))}function ii(e){return Nt(e).getComputedStyle(e)}function s0(e){return ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jo(e){if(Wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hu(e)&&e.host||ko(e);return hu(t)?t.host:t}function qU(e){const t=jo(e);return so(t)?(e.ownerDocument||e).body:Et(t)&&Dm(t)?t:qU(t)}function Qh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=qU(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Nt(i);if(a){const s=Zj(o);return t.concat(o,o.visualViewport||[],Dm(i)?i:[],s&&n?Qh(s):[])}else return t.concat(i,Qh(i,[],n))}function Zj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const wC={...zb},s1=wC.useInsertionEffect,rje=s1&&s1!==wC.useLayoutEffect?s1:e=>e();function de(e){const t=fn(ije).current;return t.next=e,rje(t.effect),t.trampoline}function ije(){const e={next:void 0,callback:aje,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function aje(){}const oje=()=>{},le=typeof document<"u"?x.useLayoutEffect:oje,VU=x.createContext(void 0);function l0(e=!1){const t=x.useContext(VU);if(t===void 0&&!e)throw new Error(Wt(16));return t}function sje(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:x.useMemo(()=>{const u={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(u.tabIndex=i,!a&&n&&(u.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(u["aria-disabled"]=n),a&&(!t||s)&&(u.disabled=n),u},[r,n,t,o,s,a,i])}}function Qe(e){return(e==null?void 0:e.ownerDocument)||document}function jv(e,t,{detail:n=0,pointerType:r=""}={}){e.dispatchEvent(new(Nt(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function el(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=x.useRef(null),s=l0(!0),l=a??s!==void 0,{props:u}=sje({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),f=x.useCallback(()=>{const h=o.current;l1(h)&&l&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,l]);le(f,[f]);const d=x.useCallback((h={})=>{const{onClick:y,onMouseDown:m,onKeyUp:g,onKeyDown:b,onPointerDown:v,...w}=h;return Ir({onClick(S){if(t){S.preventDefault();return}y==null||y(S)},onMouseDown(S){t||m==null||m(S)},onKeyDown(S){if(t||(xb(S),b==null||b(S),S.baseUIHandlerPrevented))return;const O=S.target===S.currentTarget,j=S.currentTarget,E=l1(j),T=!i&&lje(j),A=O&&(i?E:!T),C=S.key==="Enter",_=S.key===" ",$=j.getAttribute("role"),D=($==null?void 0:$.startsWith("menuitem"))||$==="option"||$==="gridcell";if(O&&l&&_){if(S.defaultPrevented&&D)return;S.preventDefault(),(!i||E)&&(S.preventBaseUIHandler(),jv(j,S));return}if(!A||i||!_&&!C){O&&T&&_&&S.preventDefault();return}S.defaultPrevented||(S.preventDefault(),C&&(S.preventBaseUIHandler(),jv(j,S)))},onKeyUp(S){if(!t){if(xb(S),g==null||g(S),S.target===S.currentTarget&&i&&l&&l1(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!i&&!l&&!S.defaultPrevented&&S.key===" "&&(S.preventBaseUIHandler(),jv(S.currentTarget,S))}},onPointerDown(S){if(t){S.preventDefault();return}v==null||v(S)}},i?{type:"button"}:{role:"button"},u,w)},[t,u,l,i]),p=de(h=>{o.current=h,f()});return{getButtonProps:d,buttonRef:p}}function l1(e){return Et(e)&&e.tagName==="BUTTON"}function lje(e){return Et(e)&&e.tagName==="A"&&!!e.href}function Re(e,t,n,r){let i=!1,a=!1;const o=r??st;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function uje(e,t,n){const r=n??st;return{reason:e,event:t??new Event("base-ui"),...r}}const Ci="none",Iu="trigger-press",bn="trigger-hover",zc="trigger-focus",u0="outside-press",Fc="item-press",cje="close-press",mu="focus-out",c0="escape-key",wb="list-navigation",GU="keyboard",fje="pointer",KU="cancel-open",xp="sibling-open",YU="disabled",G$="missing",K$="initial",f0="imperative-action",dje="window-resize",XU=x.forwardRef(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,...l}=t,u=Du(),f=u.useState("open"),{getButtonProps:d,buttonRef:p}=el({disabled:o,native:s}),h={disabled:o};function y(m){f&&u.setOpen(!1,Re(cje,m.nativeEvent))}return it("button",t,{state:h,ref:[n,p],props:[{onClick:y},l,d]})});function WU(){const[,e]=x.useState({});return x.useCallback(()=>{e({})},[])}let Y$=0;function pje(e,t="mui"){const n=x.useRef(void 0),r=WU(),i=e??n.current;return x.useEffect(()=>{n.current==null&&(Y$+=1,n.current=`${t}-${Y$}`,e==null&&r())},[e,t,r]),i}const X$=wC.useId;function Im(e,t){if(X$!==void 0){const n=X$();return e??(t?`${t}-${n}`:n)}return pje(e,t)}function _i(e){return Im(e,"base-ui")}const SC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,l=Du(),u=_i(o);return l.useSyncedValueWithCleanup("descriptionElementId",u),it("p",t,{ref:n,props:[{id:u},s]})});function OC(e){x.useEffect(e,Gi)}const ip=0;class Ki{constructor(){Be(this,"currentId",ip);Be(this,"clear",()=>{this.currentId!==ip&&(clearTimeout(this.currentId),this.currentId=ip)});Be(this,"disposeEffect",()=>this.clear)}static create(){return new Ki}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ip,n()},t)}isStarted(){return this.currentId!==ip}}function dn(){const e=fn(Ki.create).current;return OC(e.disposeEffect),e}function hje(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:mje,platform:gje,maxTouchPoints:vje}=hje(),d0=mje.toLowerCase(),Zh=gje.toLowerCase(),p0=/^i(os$|p)/.test(Zh)||Zh==="macintel"&&vje>1,W$="android",Jj=Zh===W$||d0.includes(W$),jC=!p0&&Zh.startsWith("mac");Zh.startsWith("win");const yje=jC||p0;var dk;const $a=typeof CSS<"u"&&!!((dk=CSS.supports)!=null&&dk.call(CSS,"-webkit-backdrop-filter:none"));!$a&&d0.includes("firefox");!$a&&d0.includes("chrom");const bje=yje,EC=/jsdom|happydom/.test(d0);function ia(e){e.preventDefault(),e.stopPropagation()}function xje(e){return"nativeEvent"in e}function Qf(e){return e.pointerType===""&&e.isTrusted?!0:Jj&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function TC(e){return EC?!1:!Jj&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(Jj||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Rs(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function wje(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function br(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function je(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&hu(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Jh(e,t){let n=e;for(;n;){if(ot(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(hu(n)?n.host:null)}return null}function $n(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const eE="data-base-ui-focusable",QU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",h0="ArrowLeft",m0="ArrowRight",ZU="ArrowUp",AC="ArrowDown",tE="data-trigger-disabled";function Sb(e,t){if(!ot(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute(tE);for(const[,r]of t.entries())if(je(r,n))return!r.hasAttribute(tE);return!1}function u1(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Sje(e){return e.matches("html,body")}function km(e){return Et(e)&&e.matches(QU)}function Oje(e){return Jh(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${QU}`)!=null}function nE(e){return e?e.getAttribute("role")==="combobox"&&km(e):!1}function jje(e){if(!e||EC)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ob(e){return e?e.hasAttribute(eE)?e:e.querySelector(`[${eE}]`)||e:null}function Eje(e,t){return t!=null&&!Rs(t)?0:typeof e=="function"?e():e}function gu(e,t,n){const r=Eje(e,n);return typeof r=="number"?r:r==null?void 0:r[t]}function Q$(e){return typeof e=="function"?e():e}function JU(e,t){return t||e==="click"||e==="mousedown"}function Tje(e){return(e==null?void 0:e.includes("mouse"))&&e!=="mousedown"}const eH=x.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ki,currentIdRef:{current:null},currentContextRef:{current:null}});function Aje(e,t){e.current=t.current}function Cje(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=x.useRef(n),a=x.useRef(n),o=x.useRef(null),s=x.useRef(null),l=dn();return le(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:gu(i.current,"open"),close:gu(n,"close")}},[n,o,i,a]),c.jsx(eH.Provider,{value:x.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:l}),[r,l]),children:t})}function _je(e,t={open:!1}){const{open:n}=t,r=e.useState("floatingId"),i=x.useContext(eH),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:l,currentContextRef:u,hasProvider:f,timeout:d}=i,[p,h]=x.useState(!1),y=x.useRef(n);return le(()=>{y.current=n},[n]),le(()=>{function m(){var g;(g=u.current)==null||g.setIsInstantPhase(!1),a.current=null,u.current=null,o.current=l.current,d.clear()}if(a.current&&!n&&a.current===r){if(h(!1),s){const g=r;return d.start(s,()=>{e.select("open")||a.current&&a.current!==g||m()}),()=>{(y.current||a.current!==g)&&d.clear()}}m()}},[n,r,a,o,s,l,u,d,e]),le(()=>{if(!n)return;const m=u.current,g=a.current;d.clear(),u.current={onOpenChange:e.setOpen,setIsInstantPhase:h},a.current=r,o.current={open:0,close:gu(l.current,"close")},g!==null&&g!==r?(h(!0),m==null||m.setIsInstantPhase(!0),m==null||m.onOpenChange(!1,Re(Ci))):(h(!1),m==null||m.setIsInstantPhase(!1))},[n,r,e,a,o,l,u,d]),le(()=>()=>{if(a.current===r){if(u.current=null,!y.current)return;a.current=null,Aje(o,l),d.clear()}},[u,a,o,r,l,d]),x.useMemo(()=>({activeIdRef:a,hasProvider:f,delayRef:o,isInstantPhase:p}),[a,f,o,p])}function Ve(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ja(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function qt(e){const t=fn(Nje,e).current;return t.next=e,le(t.effect),t}function Nje(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Ng=null;class Rje{constructor(){Be(this,"callbacks",[]);Be(this,"callbacksCount",0);Be(this,"nextId",1);Be(this,"startId",1);Be(this,"isScheduled",!1);Be(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let a=0;a<n.length;a+=1)(i=n[a])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||this.callbacks[n]!==null&&(this.callbacks[n]=null,this.callbacksCount-=1)}}let Rg=new Rje;class rr{constructor(){Be(this,"currentId",Ng);Be(this,"cancel",()=>{this.currentId!==Ng&&(Rg.cancel(this.currentId),this.currentId=Ng)});Be(this,"disposeEffect",()=>this.cancel)}static create(){return new rr}static request(t){return Rg.request(t)}static cancel(t){return Rg.cancel(t)}request(t){this.cancel(),this.currentId=Rg.request(()=>{this.currentId=Ng,t()})}}function Zf(){const e=fn(rr.create).current;return OC(e.disposeEffect),e}const tH={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},nH={...tH,position:"fixed",margin:0,top:0,left:0},Mje={...tH,position:"absolute"},Jf=x.forwardRef(function(t,n){const[r,i]=x.useState();le(()=>{bje&&$a&&i("button")},[]);const a={tabIndex:0,role:r};return c.jsx("span",{...t,ref:n,style:nH,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),ed=Math.min,lo=Math.max,jb=Math.round,Mg=Math.floor,uo=e=>({x:e,y:e}),Pje={left:"right",right:"left",bottom:"top",top:"bottom"};function rH(e,t,n){return lo(e,ed(t,n))}function zs(e,t){return typeof e=="function"?e(t):e}function Wr(e){return e.split("-")[0]}function Ea(e){return e.split("-")[1]}function CC(e){return e==="x"?"y":"x"}function _C(e){return e==="y"?"height":"width"}function ji(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function NC(e){return CC(ji(e))}function $je(e,t,n){n===void 0&&(n=!1);const r=Ea(e),i=NC(e),a=_C(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Eb(o)),[o,Eb(o)]}function Dje(e){const t=Eb(e);return[rE(e),t,rE(t)]}function rE(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Z$=["left","right"],J$=["right","left"],Ije=["top","bottom"],kje=["bottom","top"];function Lje(e,t,n){switch(e){case"top":case"bottom":return n?t?J$:Z$:t?Z$:J$;case"left":case"right":return t?Ije:kje;default:return[]}}function Bje(e,t,n,r){const i=Ea(e);let a=Lje(Wr(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(rE)))),a}function Eb(e){const t=Wr(e);return Pje[t]+e.slice(t.length)}function zje(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function iH(e){return typeof e!="number"?zje(e):{top:e,right:e,bottom:e,left:e}}function em(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Uc(e,t){return t<0||t>=e.length}function Ev(e,t){return Hc(e.current,{disabledIndices:t})}function iE(e,t){return Hc(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Fje(e,t,n){const{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:l}=n,u=()=>Hc(e,{startingIndex:t,decrement:r,disabledIndices:o});let f,d=!1;if(!i)f=r?Math.max(s,u()):Math.min(l,u());else if(r?t<=s:t>=l){const p=r?-1:e.length;a&&t!==p?f=-1:(f=r?l:s,d=!0)}else f=u();return{index:Uc(e,f)?-1:f,wrapped:d}}function Hc(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&qc(e,a,r));return a}function qc(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const i=e[t];return i?!g0(i)||i.matches(":disabled")?!0:!n&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!1}function Uje(e){return e.visibility==="hidden"||e.visibility==="collapse"}function g0(e,t=e?ii(e):null){return!e||!e.isConnected||!t||Uje(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const Hje='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function qje(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return hu(n)?n.host:null}function aE(e){for(const t of Array.from(e.children))if(Wn(t)==="summary")return t;return null}function Vje(e,t){const n=aE(t);return!!n&&(e===n||je(n,e))}function aH(e){const t=e?Wn(e):"";return e!=null&&e.matches(Hje)&&(t!=="summary"||e.parentElement!=null&&Wn(e.parentElement)==="details"&&aE(e.parentElement)===e)&&(t!=="details"||aE(e)==null)&&(t!=="input"||e.type!=="hidden")}function RC(e){if(!aH(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=qje(t)){const n=t!==e,r=Wn(t)==="slot";if(t.hasAttribute("inert")||n&&Wn(t)==="details"&&!t.open&&!Vje(e,t)||t.hasAttribute("hidden")||!r&&!Gje(t,n))return!1}return!0}function Gje(e,t){const n=ii(e);return t?n.display!=="none":g0(e,n)}function oH(e){const t=e.tabIndex;if(t<0){const n=Wn(e);if(n==="details"||n==="audio"||n==="video"||Et(e)&&e.isContentEditable)return 0}return t}function c1(e){if(Wn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function sH(e,t){const n=c1(e);if(!n)return!0;const r=t.find(i=>{const a=c1(i);return(a==null?void 0:a.name)===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(i=>{const a=c1(i);return(a==null?void 0:a.name)===n.name&&a.form===n.form})===n}function lH(e){if(Et(e)&&Wn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Et(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function MC(e,t){lH(e).forEach(n=>{aH(n)&&t.push(n),MC(n,t)})}function uH(e,t,n){lH(e).forEach(r=>{Et(r)&&r.matches(t)&&n.push(r),uH(r,t,n)})}function v0(e){return RC(e)&&oH(e)>=0}function cH(e){const t=[];return MC(e,t),t.filter(RC)}function y0(e){const t=cH(e);return t.filter(n=>oH(n)>=0&&sH(n,t))}function fH(e,t){const n=y0(e),r=n.length;if(r===0)return;const i=br(Qe(e)),a=n.indexOf(i),o=a===-1?t===1?0:r-1:a+t;return n[o]}function dH(e){return fH(Qe(e).body,1)||e}function pH(e){return fH(Qe(e).body,-1)||e}function Kje(e,t,n){if(!e)return null;const r=[];MC(Qe(e).body,r);const i=r.indexOf(e);if(i===-1)return null;const a=r.filter(RC);for(let o=1;o<r.length;o+=1){const s=r[(i+t*o+r.length)%r.length];if(!je(n,s)&&v0(s)&&sH(s,a))return s}return r[i]}function Vc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!je(n,r)}function Yje(e){y0(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function eD(e){const t=[];uH(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Fs(e,t,n=!0){return e.filter(i=>i.parentId===t).flatMap(i=>{var a;return[...!n||(a=i.context)!=null&&a.open?[i]:[],...Fs(e,i.id,n)]})}function tD(e,t){var i;let n=[],r=(i=e.find(a=>a.id===t))==null?void 0:i.parentId;for(;r;){const a=e.find(o=>o.id===r);r=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function Gc(e){return`data-base-ui-${e}`}let Pg=0;function Tv(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Pg);function a(){i&&!i()||e==null||e.focus({preventScroll:n})}if(r)return a(),Ht;const o=requestAnimationFrame(a);return Pg=o,()=>{Pg===o&&(cancelAnimationFrame(o),Pg=0)}}const nD="data-base-ui-inert";let ap=new WeakMap,$g=new WeakSet,op=new WeakMap,f1=0;function hH(e){return e?hu(e)?e.host:hH(e.parentNode):null}const rD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=hH(n);return e.contains(r)?r:null}).filter(n=>n!=null),iD=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},aD=(e,t,n)=>{const r=[],i=a=>{!a||n.has(a)||Array.from(a.children).forEach(o=>{Wn(o)!=="script"&&(t.has(o)?i(o):r.push(o))})};return i(e),r};function Xje(e,t,n,{mark:r=!0}){const i=rD(t,e),a=r?aD(t,iD(i),new Set(i)):[],o=[],s=[];if(n){const l=rD(t,Array.from(t.querySelectorAll("[aria-live]"))),u=i.concat(l);aD(t,iD(u),new Set(u)).forEach(d=>{const p=d.getAttribute("aria-hidden"),h=p!==null&&p!=="false",y=(ap.get(d)||0)+1;ap.set(d,y),o.push(d),y===1&&h&&$g.add(d),h||d.setAttribute("aria-hidden","true")})}return r&&a.forEach(l=>{const u=(op.get(l)||0)+1;op.set(l,u),s.push(l),u===1&&l.setAttribute(nD,"")}),f1+=1,()=>{o.forEach(l=>{const u=(ap.get(l)||0)-1;ap.set(l,u),u||($g.has(l)||l.removeAttribute("aria-hidden"),$g.delete(l))}),r&&s.forEach(l=>{const u=(op.get(l)||0)-1;op.set(l,u),u||l.removeAttribute(nD)}),f1-=1,f1||(ap=new WeakMap,$g=new WeakSet,op=new WeakMap)}}function oD(e,t={}){const{ariaHidden:n=!1,mark:r=!0}=t,i=Qe(e[0]).body;return Xje(e,i,n,{mark:r})}const Wje=500,Qje=500,Zje={style:{transition:"none"}},Jje="data-base-ui-click-trigger",mH={fallbackAxisSide:"none"},gH={fallbackAxisSide:"end"},eEe={clipPath:"inset(50%)",position:"fixed",top:0,left:0},vH=x.createContext(null),yH=()=>x.useContext(vH),tEe=Gc("portal");function bH(e={}){const{ref:t,container:n,componentProps:r=st,elementProps:i}=e,a=Im(),o=yH(),s=o==null?void 0:o.portalNode,[l,u]=x.useState(null),[f,d]=x.useState(null),p=de(g=>{g!==null&&d(g)}),h=x.useRef(null);le(()=>{if(n===null){h.current&&(h.current=null,d(null),u(null));return}const g=(n&&(yC(n)?n:n.current))??s??document.body;if(g==null){h.current&&(h.current=null,d(null),u(null));return}h.current!==g&&(h.current=g,d(null),u(g))},[n,s]);const y=it("div",r,{ref:[t,p],props:[{id:a,[tEe]:""},i]}),m=l&&y?Ni.createPortal(y,l):null;return{node:f,nodeId:x.isValidElement(y)?y.props.id:void 0,subtree:m}}const PC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,children:o,container:s,portalOwnerRole:l,...u}=t,{node:f,nodeId:d,subtree:p}=bH({container:s,ref:n,componentProps:t,elementProps:u}),h=x.useRef(null),y=x.useRef(null),m=x.useRef(null),g=x.useRef(null),[b,v]=x.useState(null),w=x.useRef(!1),S=b==null?void 0:b.modal,O=b==null?void 0:b.open,j=!!b&&!b.modal&&b.open&&!!f;x.useEffect(()=>{if(!f||S)return;function T(A){f&&A.relatedTarget&&Vc(A)&&(A.type==="focusin"?w.current&&(eD(f),w.current=!1):(Yje(f),w.current=!0))}return ja(Ve(f,"focusin",T,!0),Ve(f,"focusout",T,!0))},[f,S]),le(()=>{!f||O!==!0||!w.current||(eD(f),w.current=!1)},[O,f]);const E=x.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:y,beforeInsideRef:m,afterInsideRef:g,portalNode:f,setFocusManagerState:v}),[f]);return c.jsxs(x.Fragment,{children:[p,c.jsxs(vH.Provider,{value:E,children:[j&&f&&c.jsx(Jf,{"data-type":"outside",ref:h,onFocus:T=>{var A;if(Vc(T,f))(A=m.current)==null||A.focus();else{const C=b?b.domReference:null,_=pH(C);_==null||_.focus()}}}),j&&f&&c.jsx("span",{role:l,"aria-owns":d,style:eEe}),f&&Ni.createPortal(o,f),j&&f&&c.jsx(Jf,{"data-type":"outside",ref:y,onFocus:T=>{var A;if(Vc(T,f))(A=g.current)==null||A.focus();else{const C=b?b.domReference:null,_=dH(C);_==null||_.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,Re(mu,T.nativeEvent)))}}})]})]})});function xH(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}class $C{constructor(){Be(this,"nodesRef",{current:[]});Be(this,"events",xH())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const wH=x.createContext(null),SH=x.createContext(null),tl=()=>{var e;return((e=x.useContext(wH))==null?void 0:e.id)||null},nl=e=>{const t=x.useContext(SH);return e??t};function OH(e){const t=Im(),n=nl(e),r=tl();return le(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function nEe(e){const{children:t,id:n}=e,r=tl();return c.jsx(wH.Provider,{value:x.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function rEe(e){const{children:t,externalTree:n}=e,r=fn(()=>n??new $C).current;return c.jsx(SH.Provider,{value:r,children:t})}function Ha(e){return e==null?e:"current"in e?e.current:e}function iEe(e,t){const n=Nt($n(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(Qf(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const sD=20;let ys=[];function DC(){ys=ys.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function lD(e){DC(),e&&Wn(e)!=="body"&&(ys.push(new WeakRef(e)),ys.length>sD&&(ys=ys.slice(-sD)))}function uD(){var e;return DC(),(e=ys[ys.length-1])==null?void 0:e.deref()}function aEe(e){return e?v0(e)?e:y0(e)[0]||e:null}function cD(e){var i;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const n=cH(e).filter(a=>{const o=a.getAttribute("data-tabindex")||"";return v0(a)||a.hasAttribute("data-tabindex")&&!o.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function IC(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:f="",nextFocusableElement:d,previousFocusableElement:p,beforeContentFocusGuardRef:h,externalTree:y,getInsideElements:m}=e,g=t.useState("open"),b=t.useState("domReferenceElement"),v=t.useState("floatingElement"),{events:w,dataRef:S}=t.context,O=de(()=>{var Q;return(Q=S.current.floatingContext)==null?void 0:Q.nodeId}),j=i===!1,E=nE(b)&&j,T=qt(i),A=qt(a),C=qt(o),_=qt(f),$=qt(g),D=nl(y),N=yH(),P=x.useRef(!1),R=x.useRef(!1),B=x.useRef(!1),L=x.useRef(null),k=x.useRef(""),I=x.useRef(""),V=x.useRef(null),M=x.useRef(null),H=Ca(V,h,N==null?void 0:N.beforeInsideRef),G=Ca(M,N==null?void 0:N.afterInsideRef),U=dn(),Y=dn(),X=Zf(),te=N!=null,q=Ob(v),ee=de((Q=q)=>Q?y0(Q):[]),J=de(()=>(m==null?void 0:m().filter(Q=>Q!=null))??[]);x.useEffect(()=>{if(r||!l)return;function Q(ue){ue.key==="Tab"&&je(q,br(Qe(q)))&&ee().length===0&&!E&&ia(ue)}const ae=Qe(q);return Ve(ae,"keydown",Q)},[r,q,l,E,ee]),x.useEffect(()=>{if(r||!g)return;const Q=Qe(q);function ae(){B.current=!1}function ue(Ie){const ce=$n(Ie),Se=J(),re=je(v,ce)||je(b,ce)||je(N==null?void 0:N.portalNode,ce)||Se.some(we=>we===ce||je(we,ce));B.current=!re,I.current=Ie.pointerType||"keyboard",Jh(ce,`[${Jje}]`)&&(R.current=!0,Y.start(0,()=>{R.current=!1}))}function ye(){I.current="keyboard"}return ja(Ve(Q,"pointerdown",ue,!0),Ve(Q,"pointerup",ae,!0),Ve(Q,"pointercancel",ae,!0),Ve(Q,"keydown",ye,!0),ae)},[r,v,b,q,g,N,Y,J]),x.useEffect(()=>{if(r||!u)return;const Q=Qe(q);function ae(){R.current=!0,Y.start(0,()=>{R.current=!1})}function ue(Se){const re=$n(Se);v0(re)&&(L.current=re)}function ye(Se){const re=Se.relatedTarget,we=Se.currentTarget,$e=$n(Se);l&&re==null&&$e!=null&&je(v,$e)&&lD($e),queueMicrotask(()=>{const at=O(),W=t.context.triggerElements,ie=J(),Oe=(re==null?void 0:re.hasAttribute(Gc("focus-guard")))&&[V.current,M.current,N==null?void 0:N.beforeInsideRef.current,N==null?void 0:N.afterInsideRef.current,N==null?void 0:N.beforeOutsideRef.current,N==null?void 0:N.afterOutsideRef.current,Ha(p),Ha(d)].includes(re),pe=!(je(b,re)||je(v,re)||je(re,v)||je(N==null?void 0:N.portalNode,re)||ie.some(he=>he===re||je(he,re))||W.hasMatchingElement(he=>je(he,re))||Oe||D&&(Fs(D.nodesRef.current,at).find(he=>{var Fe,Le;return je((Fe=he.context)==null?void 0:Fe.elements.floating,re)||je((Le=he.context)==null?void 0:Le.elements.domReference,re)})||tD(D.nodesRef.current,at).find(he=>{var Fe,Le,nt;return[(Fe=he.context)==null?void 0:Fe.elements.floating,Ob((Le=he.context)==null?void 0:Le.elements.floating)].includes(re)||((nt=he.context)==null?void 0:nt.elements.domReference)===re})));if(we===b&&q&&cD(q),s&&we!==b&&!g0($e)&&br(Q)===Q.body){if(Et(q)&&(q.focus(),s==="popup")){X.request(()=>{q.focus()});return}const he=ee(),Fe=L.current,Le=(Fe&&he.includes(Fe)?Fe:null)||he[he.length-1]||q;Et(Le)&&Le.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(E||!l)&&re&&pe&&!R.current&&(E||re!==uD())&&(P.current=!0,t.setOpen(!1,Re(mu,Se)))})}function Ie(){B.current||(S.current.insideReactTree=!0,U.start(0,()=>{S.current.insideReactTree=!1}))}const ce=Et(b)?b:null;if(!(!v&&!ce))return ja(ce&&Ve(ce,"focusout",ye),ce&&Ve(ce,"pointerdown",ae),v&&Ve(v,"focusin",ue),v&&Ve(v,"focusout",ye),v&&N&&Ve(v,"focusout",Ie,!0))},[r,b,v,q,l,D,N,t,u,s,ee,E,O,S,U,Y,X,d,p,J]),x.useEffect(()=>{var we,$e,at;if(r||!v||!g)return;const Q=Array.from(((we=N==null?void 0:N.portalNode)==null?void 0:we.querySelectorAll(`[${Gc("portal")}]`))||[]),ue=(at=($e=(D?tD(D.nodesRef.current,O()):[]).find(W=>{var ie;return nE(((ie=W.context)==null?void 0:ie.elements.domReference)||null)}))==null?void 0:$e.context)==null?void 0:at.elements.domReference,Ie=[...[v,...Q,V.current,M.current,N==null?void 0:N.beforeOutsideRef.current,N==null?void 0:N.afterOutsideRef.current,...J()],ue,Ha(p),Ha(d),E?b:null].filter(W=>W!=null),ce=oD(Ie,{ariaHidden:l||E,mark:!1}),Se=[v,...Q].filter(W=>W!=null),re=oD(Se);return()=>{re(),ce()}},[g,r,b,v,l,N,E,D,O,d,p,J]),le(()=>{if(!g||r||!Et(q))return;k.current="",I.current="";const Q=Qe(q),ae=br(Q);queueMicrotask(()=>{const ue=T.current,ye=typeof ue=="function"?ue(_.current||""):ue;if(ye===void 0||ye===!1||je(q,ae))return;let ce=null;const Se=()=>(ce==null&&(ce=ee(q)),ce[0]||q);let re;ye===!0||ye===null?re=Se():re=Ha(ye),re=re||Se();const we=je(q,br(Q)),$e=S.current.openEvent,at=($e==null?void 0:$e.type)==="mousedown"&&Qf($e);Tv(re,{sync:at,preventScroll:re===q,shouldFocus(){if(!$.current)return!1;if(we)return!0;const W=br(Q);return!(W!==re&&je(q,W))}})})},[r,g,q,ee,T,_,$,S]);const K=x.useRef(null);le(()=>{if(r||!q){K.current=null;return}K.current&&(K.current.cancelled=!0,K.current=null);const Q=Qe(q),ae=br(Q),ue=_.current==null;lD(ae);function ye(ce){var Se;if(ce.open||(k.current=iEe(ce.nativeEvent,I.current)),(ce.reason===mu&&((Se=ce.triggerElement)!=null&&Se.hasAttribute(Gc("focus-guard")))||ce.reason===bn&&ce.nativeEvent.type==="mouseleave")&&(P.current=!0),ce.reason===u0)if(ce.nested)P.current=!1;else if(Qf(ce.nativeEvent)||TC(ce.nativeEvent))P.current=!1;else{let re=!1;Qe(q).createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?P.current=!1:P.current=!0}}w.on("openchange",ye);function Ie(ce){const Se=A.current;let re=typeof Se=="function"?Se(ce):Se;if(re===void 0||re===!1)return null;re===null&&(re=!0);const we=b!=null&&b.isConnected?b:null,$e=ae!=null&&ae.isConnected&&Wn(ae)!=="body"?ae:null;let at=ue?$e||we:we||$e;return at||(at=uD()||null),typeof re=="boolean"?at:Ha(re)||at||null}return()=>{w.off("openchange",ye);const ce=br(Q),Se=J(),re=je(v,ce)||Se.some(ie=>ie===ce||je(ie,ce))||D&&Fs(D.nodesRef.current,O(),!1).some(ie=>{var Oe;return je((Oe=ie.context)==null?void 0:Oe.elements.floating,ce)}),we=A.current,$e=k.current,at=Ie($e),W={cancelled:!1};K.current=W,queueMicrotask(()=>{K.current===W&&(K.current=null);const ie=aEe(at),Oe=C.current??typeof we!="boolean";if(!W.cancelled&&we&&!P.current&&Et(ie)&&(!(!Oe&&ie!==ce&&ce!==Q.body)||re)){const pe={preventScroll:!0};$e==="keyboard"&&(pe.focusVisible=!0),ie.focus(pe)}P.current=!1})}},[r,v,q,A,C,_,w,D,b,O,J]),le(()=>{if(!$a||g||!v)return;const Q=br(Qe(v));!Et(Q)||!km(Q)||je(v,Q)&&Q.blur()},[g,v]),le(()=>{if(!(r||!N))return N.setFocusManagerState({modal:l,closeOnFocusOut:u,open:g,onOpenChange:t.setOpen,domReference:b}),()=>{N.setFocusManagerState(null)}},[r,N,l,g,t,u,b]),le(()=>{if(!(r||!q))return cD(q),()=>{queueMicrotask(DC)}},[r,q]);const oe=!r&&(l?!E:!0)&&(te||l);return c.jsxs(x.Fragment,{children:[oe&&c.jsx(Jf,{"data-type":"inside",ref:H,onFocus:Q=>{var ae;if(l){const ue=ee();Tv(ue[ue.length-1])}else if(N!=null&&N.portalNode)if(P.current=!1,Vc(Q,N.portalNode)){const ue=dH(b);ue==null||ue.focus()}else(ae=Ha(p??N.beforeOutsideRef))==null||ae.focus()}}),n,oe&&c.jsx(Jf,{"data-type":"inside",ref:G,onFocus:Q=>{var ae;if(l)Tv(ee()[0]);else if(N!=null&&N.portalNode)if(u&&(P.current=!0),Vc(Q,N.portalNode)){const ue=pH(b);ue==null||ue.focus()}else(ae=Ha(d??N.afterOutsideRef))==null||ae.focus()}})]})}function jH(e,t={}){const{enabled:n=!0,event:r="click",toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:l=Iu}=t,u=e.context.dataRef,f=x.useRef(void 0),d=Zf(),p=dn(),h=x.useMemo(()=>{function y(g,b,v,w){const S=Re(l,b,v);g&&w==="touch"&&s>0?p.start(s,()=>{e.setOpen(!0,S)}):e.setOpen(g,S)}function m(g,b,v){const w=u.current.openEvent,S=e.select("domReferenceElement")!==b;return g&&S||!g||!i?!0:w&&(typeof o=="function"?o():o)?!v(w.type):!1}return{onPointerDown(g){f.current=Rs(g.pointerType,!0)&&TC(g.nativeEvent)?"virtual":g.pointerType},onMouseDown(g){const b=f.current,v=g.nativeEvent,w=e.select("open");if(g.button!==0||r==="click"||Rs(b,!0)&&a)return;const S=m(w,g.currentTarget,T=>T==="click"||T==="mousedown"),O=$n(v),j=km(O);if(j||b==="virtual"){y(S,v,j?O:g.currentTarget,b);return}const E=g.currentTarget;d.request(()=>{y(S,v,E,b)})},onClick(g){if(r==="mousedown-only")return;const b=f.current;if(r==="mousedown"&&b){f.current=void 0;return}if(Rs(b,!0)&&a)return;const v=e.select("open"),w=m(v,g.currentTarget,S=>S==="click"||S==="mousedown"||S==="keydown"||S==="keyup");y(w,g.nativeEvent,g.currentTarget,b)},onKeyDown(){f.current=void 0}}},[u,r,a,l,e,o,i,d,p,s]);return x.useMemo(()=>n?{reference:h}:st,[n,h])}function oEe(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var h;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},o=t.axis==="x"||t.axis==="both",s=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((h=t.dataRef.current.openEvent)==null?void 0:h.type)||"")&&t.pointerType!=="touch",u=t.axis==="y"?a.width:0,f=t.axis==="x"?a.height:0;let d=a.x,p=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,p-=r||0,(!i||l)&&(d=o&&t.x!=null?t.x:d,p=s&&t.y!=null?t.y:p),i=!0,{width:u,height:f,x:d,y:p,top:p,right:d+u,bottom:p+f,left:d}}}}function fD(e){return e!=null&&e.clientX!=null}function sEe(e,t={}){const{enabled:n=!0,axis:r="both"}=t,i=e.useState("open"),a=e.useState("floatingElement"),o=e.useState("domReferenceElement"),s=e.context.dataRef,l=x.useRef(!1),u=x.useRef(null),[f,d]=x.useState(),[p,h]=x.useState([]),y=de(w=>{e.set("positionReference",w)}),m=de((w,S,O)=>{l.current||s.current.openEvent&&!fD(s.current.openEvent)||e.set("positionReference",oEe(O??o,{x:w,y:S,axis:r,dataRef:s,pointerType:f}))}),g=de(w=>{i?u.current||(m(w.clientX,w.clientY,w.currentTarget),h([])):m(w.clientX,w.clientY,w.currentTarget)}),b=Rs(f)?a:i;x.useEffect(()=>{if(!n){y(o);return}if(!b)return;function w(){var j;(j=u.current)==null||j.call(u),u.current=null}const S=Nt(a);function O(j){const E=$n(j);je(a,E)?w():m(j.clientX,j.clientY)}return!s.current.openEvent||fD(s.current.openEvent)?u.current=Ve(S,"mousemove",O):y(o),w},[b,n,a,s,o,e,m,y,p]),x.useEffect(()=>()=>{e.set("positionReference",null)},[e]),x.useEffect(()=>{n&&!a&&(l.current=!1)},[n,a]),x.useEffect(()=>{!n&&i&&(l.current=!0)},[n,i]);const v=x.useMemo(()=>{function w(S){d(S.pointerType)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:g,onMouseEnter:g}},[g]);return x.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function lEe(){return!1}function uEe(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function b0(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a="sloppy",referencePress:o=lEe,bubbles:s,externalTree:l}=t,u=e.useState("open"),f=e.useState("floatingElement"),{dataRef:d,events:p}=e.context,h=nl(l),y=de(typeof i=="function"?i:()=>!1),m=typeof i=="function"?y:i,g=m!==!1,b=de(()=>a),{escapeKey:v,outsidePress:w}=uEe(s),S=x.useRef(!1),O=x.useRef(!1),j=x.useRef(!1),E=x.useRef(!1),T=x.useRef(!1),A=x.useRef(""),C=x.useRef(null),_=dn(),$=dn(),D=dn(),N=de(()=>{$.clear(),d.current.insideReactTree=!1}),P=de(G=>{var X;const U=(X=d.current.floatingContext)==null?void 0:X.nodeId;return(h?Fs(h.nodesRef.current,U):[]).some(te=>{var q;return((q=te.context)==null?void 0:q.open)&&!te.context.dataRef.current[G]})}),R=de(G=>u1(G,e.select("floatingElement"))||u1(G,e.select("domReferenceElement"))),B=de(G=>{o()&&e.setOpen(!1,Re(Iu,G.nativeEvent))}),L=de(G=>{if(!u||!n||!r||G.key!=="Escape")return;const U=xje(G)?G.nativeEvent:G;if(T.current||U.isComposing||!v&&P("__escapeKeyBubbles"))return;const Y=Re(c0,U);e.setOpen(!1,Y),Y.isCanceled||G.preventDefault(),!v&&!Y.isPropagationAllowed&&G.stopPropagation()}),k=de(()=>{d.current.insideReactTree=!0,$.start(0,N)}),I=de(G=>{if(!u||!n||G.button!==0)return;const U=$n(G.nativeEvent);je(e.select("floatingElement"),U)&&(S.current||(S.current=!0,O.current=!1))}),V=de(G=>{!u||!n||(G.defaultPrevented||G.nativeEvent.defaultPrevented)&&S.current&&(O.current=!0)});x.useEffect(()=>{function G(U){U.open||(E.current=!1)}return p.on("openchange",G),()=>{p.off("openchange",G)}},[p]),x.useEffect(()=>N,[N]),x.useEffect(()=>{if(!u||!n)return u||(E.current=!1,T.current=!1,A.current="",C.current=null),N;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=w;const G=new Ki,U=Qe(f);function Y(){D.clear(),T.current=!0}function X(){T.current=!0,D.start($a?5:0,()=>{T.current=!1})}function te(){j.current=!0,G.start(0,()=>{j.current=!1})}function q(){S.current=!1,O.current=!1}function ee(){const W=A.current,ie=W==="pen"||!W?"mouse":W,Oe=b(),pe=typeof Oe=="function"?Oe():Oe;return typeof pe=="string"?pe:pe[ie]}function J(W){const ie=ee();return ie==="intentional"&&W.type!=="click"||ie==="sloppy"&&W.type==="click"}function K(W){var pe;const ie=(pe=d.current.floatingContext)==null?void 0:pe.nodeId,Oe=h&&Fs(h.nodesRef.current,ie).some(he=>{var Fe;return u1(W,(Fe=he.context)==null?void 0:Fe.elements.floating)});return R(W)||Oe}function oe(W){if(J(W)){W.type!=="click"&&!R(W)&&(G.clear(),j.current=!1),N();return}if(d.current.insideReactTree){N();return}const ie=$n(W),Oe=`[${Gc("inert")}]`,pe=ot(ie)?ie.getRootNode():null,he=Array.from((hu(pe)?pe:Qe(e.select("floatingElement"))).querySelectorAll(Oe)),Fe=e.context.triggerElements;if(ie&&(Fe.hasElement(ie)||Fe.hasMatchingElement(nt=>je(nt,ie))))return;let Le=ot(ie)?ie:null;for(;Le&&!so(Le);){const nt=jo(Le);if(so(nt)||!ot(nt))break;Le=nt}if(!(he.length&&ot(ie)&&!Sje(ie)&&!je(ie,e.select("floatingElement"))&&he.every(nt=>!je(Le,nt)))){if(Et(ie)&&!("touches"in W)){const nt=so(ie),Kt=ii(ie),ht=/auto|scroll/,oi=nt||ht.test(Kt.overflowX),cr=nt||ht.test(Kt.overflowY),jr=oi&&ie.clientWidth>0&&ie.scrollWidth>ie.clientWidth,fr=cr&&ie.clientHeight>0&&ie.scrollHeight>ie.clientHeight,En=Kt.direction==="rtl",Er=fr&&(En?W.offsetX<=ie.offsetWidth-ie.clientWidth:W.offsetX>ie.clientWidth),Tr=jr&&W.offsetY>ie.clientHeight;if(Er||Tr)return}if(!K(W)){if(ee()==="intentional"){if(W.detail!==0&&!Qf(W)&&!E.current)return;if(j.current){G.clear(),j.current=!1;return}}typeof m=="function"&&!m(W)||P("__outsidePressBubbles")||(e.setOpen(!1,Re(u0,W)),N())}}}function Q(W){ee()!=="sloppy"||W.pointerType==="touch"||!e.select("open")||!n||R(W)||oe(W)}function ae(W){if(ee()!=="sloppy"||!e.select("open")||!n||R(W))return;const ie=W.touches[0];ie&&(C.current={startTime:Date.now(),startX:ie.clientX,startY:ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}function ue(W,ie){const Oe=$n(W);if(!Oe)return;const pe=Ve(Oe,W.type,()=>{ie(W),pe()})}function ye(W){A.current="touch",ue(W,ae)}function Ie(W){_.clear(),W.type==="pointerdown"&&(W.button===0&&(E.current=!0),A.current=W.pointerType),!(W.type==="mousedown"&&C.current&&!C.current.dismissOnMouseDown)&&ue(W,ie=>{ie.type==="pointerdown"?Q(ie):oe(ie)})}function ce(W){if(W.type==="pointercancel"&&(E.current=!1),!S.current)return;const ie=O.current;if(q(),ee()==="intentional"){if(W.type==="pointercancel"){ie&&te();return}if(!K(W)){if(ie){te();return}typeof m=="function"&&!m(W)||(G.clear(),j.current=!0,N())}}}function Se(W){if(ee()!=="sloppy"||!C.current||R(W))return;const ie=W.touches[0];if(!ie)return;const Oe=Math.abs(ie.clientX-C.current.startX),pe=Math.abs(ie.clientY-C.current.startY),he=Math.sqrt(Oe*Oe+pe*pe);he>5&&(C.current.dismissOnTouchEnd=!0),he>10&&(oe(W),_.clear(),C.current=null)}function re(W){ue(W,Se)}function we(W){ee()!=="sloppy"||!C.current||R(W)||(C.current.dismissOnTouchEnd&&oe(W),_.clear(),C.current=null)}function $e(W){ue(W,we)}const at=ja(r&&ja(Ve(U,"keydown",L),Ve(U,"compositionstart",Y),Ve(U,"compositionend",X)),g&&ja(Ve(U,"click",Ie,!0),Ve(U,"pointerdown",Ie,!0),Ve(U,"pointerup",ce,!0),Ve(U,"pointercancel",ce,!0),Ve(U,"mousedown",Ie,!0),Ve(U,"mouseup",ce,!0),Ve(U,"touchstart",ye,{capture:!0,passive:!0}),Ve(U,"touchmove",re,{capture:!0,passive:!0}),Ve(U,"touchend",$e,{capture:!0,passive:!0})));return()=>{at(),G.clear(),q(),j.current=!1}},[d,f,r,g,m,u,n,v,w,L,N,b,P,R,h,e,_,D]);const M=x.useMemo(()=>({onKeyDown:L,onPointerDown:B,onClick:B}),[L,B]),H=x.useMemo(()=>({onKeyDown:L,onPointerDown:V,onMouseDown:V,onClickCapture:k,onMouseDownCapture(G){k(),I(G)},onPointerDownCapture(G){k(),I(G)},onMouseUpCapture:k,onTouchEndCapture:k,onTouchMoveCapture:k}),[L,k,I,V]);return x.useMemo(()=>n?{reference:M,floating:H,trigger:M}:{},[n,M,H])}function EH(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),f=o;return t.useSyncedValue("floatingId",i),le(()=>{const d={open:s,floatingId:i,referenceElement:l,floatingElement:u};ot(l)&&(d.domReferenceElement=l),r.state.positionReference===r.state.referenceElement&&(d.positionReference=l),r.update(d)},[s,i,l,u,r]),r.context.onOpenChange=f,r.context.nested=a,r}function TH(e,t=!1,n=!1,r=!1){const[i,a]=x.useState(e&&t?"idle":void 0),[o,s]=x.useState(e&&!r);return e&&!o&&(s(!0),a("starting")),!e&&o&&i!=="ending"&&!n&&a("ending"),!e&&!o&&i==="ending"&&a(void 0),le(()=>{if(!e&&o&&i!=="ending"&&n){const l=rr.request(()=>{a("ending")});return()=>{rr.cancel(l)}}},[e,o,i,n]),le(()=>{if(!e||t||i===void 0)return;const l=rr.request(()=>{a(void 0)});return()=>{rr.cancel(l)}},[t,e,i]),le(()=>{if(!e||!t)return;e&&o&&i!=="idle"&&a("starting");const l=rr.request(()=>{a("idle")});return()=>{rr.cancel(l)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function dD(e,t){return e.getAnimations(t).filter(n=>{var i;const r=(i=n.effect)==null?void 0:i.getTiming();return(r==null?void 0:r.duration)!==1/0&&(r==null?void 0:r.iterations)!==1/0})}let Dg=null;function cEe(e){if(!Dg){const t=[];Dg=t,queueMicrotask(()=>{Dg=null,Ni.flushSync(()=>{for(const n of t)n()})})}Dg.push(e)}function x0(e,t=!1,n=!1){const r=Zf();return de((i,a=null)=>{r.cancel();const o=Ha(e);if(o==null)return;const s=o,l=()=>{if(!n){Ni.flushSync(i);return}cEe(()=>{a!=null&&a.aborted||i()})};if(typeof s.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function u(){Promise.all(dD(s).map(f=>f.finished.then(Ht))).then(()=>{a!=null&&a.aborted||l()},()=>{if(a!=null&&a.aborted)return;if(dD(s).some(d=>d.pending||d.playState!=="finished")){u();return}l()})}if(t){const f=mC;if(!s.hasAttribute(f)){r.request(u);return}const d=new MutationObserver(()=>{s.hasAttribute(f)||(d.disconnect(),u())});d.observe(s,{attributes:!0,attributeFilter:[f]}),a==null||a.addEventListener("abort",()=>d.disconnect(),{once:!0});return}r.request(u)})}function Md(e){const{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=de(a),s=x0(r,n,i);x.useEffect(()=>{if(!t)return;const l=new AbortController;return s(o,l.signal),()=>{l.abort()}},[t,n,o,s])}function AH(e){const{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=de(i),{mounted:l,setMounted:u,transitionStatus:f}=TH(t,!1,!1,o),d=t?!1:r;le(()=>{t&&s(!1)},[t,s]);const p=x.useRef(l),h=x.useRef(!1),y=WU(),m=()=>{p.current=!1,u(!1),a()};le(()=>{p.current=l,h.current&&(h.current=!1,!t&&l&&m())});const g=de(()=>{if(p.current){if(t){h.current=!0,y();return}m()}});return Md({enabled:l&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:l,transitionStatus:f,preventUnmountingOnClose:d,forceUnmount:g}}const w0={tabIndex:-1,[eE]:""};function fEe(e){return t=>t==="touch"?e.current:!0}function CH(e,t=!1){const n=Im(),r=tl()!=null,i=fn(()=>e(n,r)).current;return EH({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function kC({handle:e,store:t}){return le(()=>e.attachStore(t),[e,t]),null}function pD(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function dEe(e,t){const n=x.useRef(null);return de(r=>{const i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;const a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),pD(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),pD(t))})}function LC(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);const a=(n==null?void 0:n.id)??null;let o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function BC(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function pEe(e,t,n,r={}){var f,d,p;const i=n.reason,a=i===bn,o=t&&i===zc,s=!t&&(i===Iu||i===c0),l=BC(n);if((d=(f=e.context).onOpenChange)==null||d.call(f,t,n),n.isCanceled)return;(p=r.onBeforeDispatch)==null||p.call(r),e.state.floatingRootContext.dispatchOpenChange(t,n);const u=()=>{const h=LC(e.state,t,n.trigger,l()),y={...r.extraState,...h};o?y.instantType="focus":s?y.instantType="dismiss":a&&(y.instantType=void 0),e.update(y)};a?Ni.flushSync(u):u()}function _H(e,t,n,r){const i=n.useState("isMountedByTrigger",e),a=dEe(e,n),o=de(l=>{const u=n.select("open"),f=n.select("activeTriggerId");if(f===e){const d={activeTriggerElement:l,...u?r:null};n.update(d);return}if(f==null&&u&&!n.state.openedWithoutTrigger){const d={activeTriggerId:e??null,activeTriggerElement:l,...r};n.update(d)}}),s=de(l=>{a(l),l&&o(l)});return le(()=>(s(t.current),()=>s(null)),[s,t,n,e]),le(()=>{if(i){const l={activeTriggerElement:t.current,...r};n.update(l)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function zC(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=x.useRef(null),i=e.useState("open"),a=e.useState("triggerCount"),o=e.useState("activeTriggerId"),s=e.useState("activeTriggerElement");le(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const l=e.context.triggerElements.size,u={};e.state.triggerCount!==l&&(u.triggerCount=l);const f=e.select("activeTriggerId");let d=null;if(f){const p=e.context.triggerElements.getById(f);if(p)r.current=f,p!==e.state.activeTriggerElement&&(u.activeTriggerElement=p);else{for(const[h,y]of e.context.triggerElements.entries())if(y===e.state.activeTriggerElement){u.activeTriggerId=h,u.activeTriggerElement=y,r.current=h;break}u.activeTriggerId===void 0&&(r.current===f?d=f:r.current=null)}}else r.current=null;if(!d&&!f&&!e.state.openedWithoutTrigger&&l===1){const p=e.context.triggerElements.entries().next();if(!p.done){const[h,y]=p.value;u.activeTriggerId=h,u.activeTriggerElement=y,r.current=h}}(u.triggerCount!==void 0||u.activeTriggerId!==void 0||u.activeTriggerElement!==void 0)&&e.update(u),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){const p=Re(Ci);e.setOpen(!1,p),p.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function FC(e,t,n,r){const{mounted:i,transitionStatus:a,forceUnmount:o}=AH({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:s=>t.set("preventUnmountingOnClose",s),animateInitialOpen:r,onUnmount(){var s,l;t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n==null||n(),(l=(s=t.context).onOpenChangeComplete)==null||l.call(s,!1)}});return fn(()=>(t.set("mounted",i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function UC(e,t){e.useSyncedValues(t),le(()=>()=>{e.update({activeTriggerProps:st,inactiveTriggerProps:st,popupProps:st})},[e])}function hEe(e,t){le(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),le(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class S0{constructor(){Be(this,"idMap",new Map)}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var NH={exports:{}},RH={};/**
|
|
148
|
+
* @license React
|
|
149
|
+
* use-sync-external-store-shim.production.js
|
|
150
|
+
*
|
|
151
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the MIT license found in the
|
|
154
|
+
* LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/var td=x;function mEe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gEe=typeof Object.is=="function"?Object.is:mEe,vEe=td.useState,yEe=td.useEffect,bEe=td.useLayoutEffect,xEe=td.useDebugValue;function wEe(e,t){var n=t(),r=vEe({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return bEe(function(){i.value=n,i.getSnapshot=t,d1(i)&&a({inst:i})},[e,n,t]),yEe(function(){return d1(i)&&a({inst:i}),e(function(){d1(i)&&a({inst:i})})},[e]),xEe(n),n}function d1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gEe(e,n)}catch{return!0}}function SEe(e,t){return t()}var OEe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?SEe:wEe;RH.useSyncExternalStore=td.useSyncExternalStore!==void 0?td.useSyncExternalStore:OEe;NH.exports=RH;var O0=NH.exports,MH={exports:{}},PH={};/**
|
|
156
|
+
* @license React
|
|
157
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
158
|
+
*
|
|
159
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the MIT license found in the
|
|
162
|
+
* LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/var j0=x,jEe=O0;function EEe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TEe=typeof Object.is=="function"?Object.is:EEe,AEe=jEe.useSyncExternalStore,CEe=j0.useRef,_Ee=j0.useEffect,NEe=j0.useMemo,REe=j0.useDebugValue;PH.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=CEe(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=NEe(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var y=o.value;if(i(y,h))return d=y}return d=h}if(y=d,TEe(f,h))return y;var m=r(h);return i!==void 0&&i(y,m)?(f=h,y):(f=h,d=m)}var u=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=AEe(e,a[0],a[1]);return _Ee(function(){o.hasValue=!0,o.value=s},[s]),REe(s),s};MH.exports=PH;var MEe=MH.exports;const oE=[];let sE;function PEe(){return sE}function $Ee(e){oE.push(e)}function E0(e){const t=(n,r)=>{const i=fn(DEe).current;let a;try{sE=i;for(const o of oE)o.before(i);a=e(n,r);for(const o of oE)o.after(i);i.didInitialize=!0}finally{sE=void 0}return a};return t.displayName=e.displayName||e.name,t}function $H(e){return x.forwardRef(E0(e))}function DEe(){return{didInitialize:!1}}const IEe=pC(19),kEe=IEe?BEe:zEe;function DH(e,t,n,r,i){return kEe(e,t,n,r,i)}function LEe(e,t,n,r,i){const a=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return O0.useSyncExternalStore(e.subscribe,a,a)}$Ee({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),O0.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function BEe(e,t,n,r,i){const a=PEe();if(!a)return LEe(e,t,n,r,i);const o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function zEe(e,t,n,r,i){return MEe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,i))}class FEe{constructor(t){Be(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));Be(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new this(t)}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return DH(this,t,n,r,i)}}class Lm extends FEe{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){x.useDebugValue(t);const r=this;le(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;le(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);le(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){x.useDebugValue(t);const r=this,i=n!==void 0;le(()=>{i&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,i])}select(t,n,r,i){const a=this.selectors[t];return a(this.state,n,r,i)}useState(t,n,r,i){return x.useDebugValue(t),DH(this,this.selectors[t],n,r,i)}useContextCallback(t,n){x.useDebugValue(t);const r=de(n??Ht);this.context[t]=r}useStateSetter(t){const n=x.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(a=>{const o=r(a);if(!Object.is(i,o)){const s=i;i=o,n(o,s,this)}})}}const UEe={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class IH extends Lm{constructor(n){const{syncOnly:r,nested:i,onOpenChange:a,triggerElements:o,...s}=n;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:a,dataRef:{current:{}},events:xH(),nested:i,triggerElements:o},UEe);Be(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&wje(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});Be(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const i={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)});Be(this,"setOpen",(n,r)=>{var i,a,o,s;if(this.syncOnly){(a=(i=this.context).onOpenChange)==null||a.call(i,n,r);return}this.dispatchOpenChange(n,r),(s=(o=this.context).onOpenChange)==null||s.call(o,n,r)});this.syncOnly=r}}function HC(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new IH({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:st,inactiveTriggerProps:st,popupProps:st}}const qp=e=>e.triggerIdProp??e.activeTriggerId,Tb=e=>e.openProp??e.open,hD=e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0};function kH(e,t){return t!==void 0&&Tb(e)&&qp(e)===t}function HEe(e,t){return kH(e,t)?!0:t!==void 0&&Tb(e)&&qp(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Vp={open:Tb,mounted:e=>e.mounted,transitionStatus:e=>Tb(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:qp,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:hD,isTriggerActive:(e,t)=>t!==void 0&&qp(e)===t,isOpenedByTrigger:(e,t)=>kH(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&qp(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>HEe(e,t)?hD(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function LH(e){const t=x.useCallback(r=>e===void 0?Ht:e.subscribeStore(r),[e]),n=x.useCallback(()=>e===void 0?void 0:e.store,[e]);return O0.useSyncExternalStore(t,n,()=>e==null?void 0:e.serverStore)}function qEe(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Im(),a=tl()!=null,o=fn(()=>new IH({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new S0,floatingId:i,syncOnly:!1,nested:a})).current;return le(()=>{const s={open:t,floatingId:i};r.reference!==void 0&&(s.referenceElement=r.reference,s.domReferenceElement=ot(r.reference)?r.reference:null),r.floating!==void 0&&(s.floatingElement=r.floating),o.update(s)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}const p1=jC&&$a;function BH(e,t={}){const{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=x.useRef(!1),s=x.useRef(null),l=x.useRef(!0),u=dn();x.useEffect(()=>{const d=e.select("domReferenceElement");if(!n)return;const p=Nt(d);function h(){const g=e.select("domReferenceElement");!e.select("open")&&Et(g)&&g===br(Qe(g))&&(o.current=!0,s.current=g)}function y(){l.current=!0}function m(){l.current=!1}return ja(Ve(p,"blur",h),p1&&Ve(p,"keydown",y,!0),p1&&Ve(p,"pointerdown",m,!0))},[e,n]),x.useEffect(()=>{if(!n)return;function d(p){if(p.reason===Iu||p.reason===c0){const h=e.select("domReferenceElement");ot(h)&&(s.current=h,o.current=!0)}}return i.on("openchange",d),()=>{i.off("openchange",d)}},[i,n,e]);const f=x.useMemo(()=>{function d(){o.current=!1,s.current=null}return{onMouseLeave(){d()},onFocus(p){const h=p.currentTarget;if(o.current){if(s.current===h)return;d()}const y=$n(p.nativeEvent);if(ot(y)){if(p1&&!p.relatedTarget){if(!l.current&&!km(y))return}else if(!jje(y))return}const m=Sb(p.relatedTarget,e.context.triggerElements),{nativeEvent:g,currentTarget:b}=p;if(e.select("open")&&m||!r){e.setOpen(!0,Re(zc,g,b));return}u.start(r,()=>{o.current||e.setOpen(!0,Re(zc,g,b))})},onBlur(p){d();const h=p.relatedTarget,y=p.nativeEvent,m=ot(h)&&h.hasAttribute(Gc("focus-guard"))&&h.getAttribute("data-type")==="outside";u.start(0,()=>{var w;const g=e.select("domReferenceElement"),b=br(Qe(g));!h&&b===g||je((w=a.current.floatingContext)==null?void 0:w.refs.floating.current,b)||je(g,b)||m||Sb(h??b,e.context.triggerElements)||e.setOpen(!1,Re(zc,y))})}}},[a,r,e,u]);return x.useMemo(()=>n?{reference:f,trigger:f}:{},[n,f])}class qC{constructor(){Be(this,"pointerType");Be(this,"interactedInside",!1);Be(this,"handler");Be(this,"blockMouseMove",!0);Be(this,"performedPointerEventsMutation",!1);Be(this,"pointerEventsScopeElement",null);Be(this,"pointerEventsReferenceElement",null);Be(this,"pointerEventsFloatingElement",null);Be(this,"restTimeoutPending",!1);Be(this,"openChangeTimeout",new Ki);Be(this,"restTimeout",new Ki);Be(this,"handleCloseOptions");Be(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});Be(this,"disposeEffect",()=>this.dispose)}static create(){return new qC}}const Ab=new WeakMap;function Cb(e){var n,r,i;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Ab.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty("pointer-events"),(i=e.pointerEventsFloatingElement)==null||i.style.removeProperty("pointer-events"),Ab.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function zH(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Ab.get(n);a&&a!==e&&Cb(a),Cb(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Ab.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}function VC(e){const t=e.context.dataRef.current,n=fn(()=>t.hoverInteractionState??qC.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),OC(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function FH(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState("open"),o=e.useState("floatingElement"),s=e.useState("domReferenceElement"),{dataRef:l}=e.context,u=nl(),f=tl(),d=VC(e),p=dn(),h=de(()=>{var g;return JU((g=l.current.openEvent)==null?void 0:g.type,d.interactedInside)}),y=de(()=>{var g;return Tje((g=l.current.openEvent)==null?void 0:g.type)}),m=de(()=>{Cb(d)});le(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,m())},[a,d,m]),x.useEffect(()=>m,[m]),le(()=>{var g,b,v,w,S;if(n&&a&&(g=d.handleCloseOptions)!=null&&g.blockPointerEvents&&y()&&ot(s)&&o){const O=s,j=o,E=Qe(o),T=(v=(b=u==null?void 0:u.nodesRef.current.find($=>$.id===f))==null?void 0:b.context)==null?void 0:v.elements.floating;T&&(T.style.pointerEvents="");const A=d.pointerEventsScopeElement!==j?d.pointerEventsScopeElement:null,C=T!==j?T:null,_=((S=(w=d.handleCloseOptions)==null?void 0:w.getScope)==null?void 0:S.call(w))??A??C??Jh(O,"[data-rootownerid]")??E.body;return zH(d,{scopeElement:_,referenceElement:O,floatingElement:j}),()=>{m()}}},[n,a,s,o,d,y,u,f,m]),x.useEffect(()=>{if(!n)return;function g(){return!!(u&&f&&Fs(u.nodesRef.current,f).length>0)}function b(E){const T=gu(r,"close",d.pointerType),A=()=>{e.setOpen(!1,Re(bn,E)),u==null||u.events.emit("floating.closed",E)};T?d.openChangeTimeout.start(T,A):(d.openChangeTimeout.clear(),A())}function v(E){const T=$n(E);if(!Oje(T)){d.interactedInside=!1;return}d.interactedInside=Jh(T,"[aria-haspopup]")!=null}function w(){d.openChangeTimeout.clear(),p.clear(),u==null||u.events.off("floating.closed",O),m()}function S(E){var _;if(g()&&u){u.events.on("floating.closed",O);return}if(Sb(E.relatedTarget,e.context.triggerElements))return;const T=((_=l.current.floatingContext)==null?void 0:_.nodeId)??i,A=E.relatedTarget;if(!(u&&T&&ot(A)&&Fs(u.nodesRef.current,T,!1).some($=>{var D;return je((D=$.context)==null?void 0:D.elements.floating,A)}))){if(d.handler){d.handler(E);return}m(),y()&&!h()&&b(E)}}function O(E){!u||!f||g()||p.start(0,()=>{u.events.off("floating.closed",O),e.setOpen(!1,Re(bn,E)),u.events.emit("floating.closed",E)})}const j=o;return ja(j&&Ve(j,"mouseenter",w),j&&Ve(j,"mouseleave",S),j&&Ve(j,"pointerdown",v,!0),()=>{u==null||u.events.off("floating.closed",O)})},[n,o,e,l,r,i,y,h,m,d,u,f,p])}const VEe={current:null};function UH(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:l=VEe,externalTree:u,isActiveTrigger:f=!0,getHandleCloseContext:d,isClosing:p,shouldOpen:h,guardStaleOpen:y=!1}=t,{dataRef:m,events:g}=e.context,b=nl(u),v=VC(e),w=x.useRef(!1),S=qt(i),O=qt(r),j=qt(o),E=qt(n),T=qt(h),A=qt(p),C=de(()=>{var P;return JU((P=m.current.openEvent)==null?void 0:P.type,v.interactedInside)}),_=de(()=>{var P;return((P=T.current)==null?void 0:P.call(T))!==!1}),$=de((P,R,B)=>{const L=e.context.triggerElements;if(L.hasElement(R))return!P||!je(P,R);if(!ot(B))return!1;const k=B;return L.hasMatchingElement(I=>je(I,k))&&(!P||!je(P,k))}),D=de(()=>{if(!v.handler)return;Qe(e.select("domReferenceElement")).removeEventListener("mousemove",v.handler),v.handler=void 0}),N=de(()=>{Cb(v)});return f&&(v.handleCloseOptions=i==null?void 0:i.__options),x.useEffect(()=>D,[D]),x.useEffect(()=>{if(!n)return;function P(R){R.open?w.current=!1:(w.current=R.reason===bn,D(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on("openchange",P),()=>{g.off("openchange",P)}},[n,g,v,D]),x.useEffect(()=>{if(!n)return;function P(V,M=!0){const H=gu(O.current,"close",v.pointerType);H?v.openChangeTimeout.start(H,()=>{e.setOpen(!1,Re(bn,V)),b==null||b.events.emit("floating.closed",V)}):M&&(v.openChangeTimeout.clear(),e.setOpen(!1,Re(bn,V)),b==null||b.events.emit("floating.closed",V))}const R=l.current??(f?e.select("domReferenceElement"):null);if(!ot(R))return;function B(V){var ue;if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Rs(v.pointerType))return;const M=Q$(j.current),H=gu(O.current,"open",v.pointerType),G=$n(V),U=V.currentTarget??null,Y=e.select("domReferenceElement");let X=U;if(ot(G)&&!e.context.triggerElements.hasElement(G)){for(const ye of e.context.triggerElements.elements())if(je(ye,G)){X=ye;break}}ot(U)&&ot(Y)&&!e.context.triggerElements.hasElement(U)&&je(U,Y)&&(X=Y);const te=X==null?!1:$(Y,X,G),q=e.select("open"),ee=((ue=A.current)==null?void 0:ue.call(A))??e.select("transitionStatus")==="ending",J=!q&&ee&&w.current,K=!te&&ot(X)&&ot(Y)&&je(Y,X)&&J,oe=M>0&&!H,Q=te&&(q||J)||K,ae=!q||te;if(Q){_()&&e.setOpen(!0,Re(bn,V,X));return}oe||(H?v.openChangeTimeout.start(H,()=>{ae&&_()&&e.setOpen(!0,Re(bn,V,X))}):ae&&_()&&e.setOpen(!0,Re(bn,V,X)))}function L(V){if(C()){N();return}D();const M=e.select("domReferenceElement"),H=Qe(M);v.restTimeout.clear(),v.restTimeoutPending=!1;const G=m.current.floatingContext??(d==null?void 0:d());if(Sb(V.relatedTarget,e.context.triggerElements))return;if(S.current&&G){e.select("open")||v.openChangeTimeout.clear();const Y=l.current;v.handler=S.current({...G,tree:b,x:V.clientX,y:V.clientY,onClose(){N(),D(),E.current&&!C()&&Y===e.select("domReferenceElement")&&P(V,!0)}}),H.addEventListener("mousemove",v.handler),v.handler(V);return}(v.pointerType==="touch"?!je(e.select("floatingElement"),V.relatedTarget):!0)&&P(V)}function k(V){je(R,V.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}const I=y?Ve(R,"mouseout",k):void 0;return s?ja(Ve(R,"mousemove",B,{once:!0}),Ve(R,"mouseenter",B),Ve(R,"mouseleave",L),I):ja(Ve(R,"mouseenter",B),Ve(R,"mouseleave",L),I)},[D,N,m,O,e,n,S,v,f,$,C,a,s,j,l,b,E,d,A,_,y]),x.useMemo(()=>{if(!n)return;function P(R){v.pointerType=R.pointerType}return{onPointerDown:P,onPointerEnter:P,onMouseMove(R){var G,U,Y;const{nativeEvent:B}=R,L=R.currentTarget,k=e.select("domReferenceElement"),I=e.select("open"),V=$(k,L,R.target);if(a&&!Rs(v.pointerType))return;if(I&&V&&((G=v.handleCloseOptions)!=null&&G.blockPointerEvents)){const X=e.select("floatingElement");if(X){const te=((Y=(U=v.handleCloseOptions)==null?void 0:U.getScope)==null?void 0:Y.call(U))??L.ownerDocument.body;zH(v,{scopeElement:te,referenceElement:L,floatingElement:X})}}const M=Q$(j.current);if(I&&!V||M===0||!V&&v.restTimeoutPending&&R.movementX**2+R.movementY**2<2)return;v.restTimeout.clear();function H(){if(v.restTimeoutPending=!1,C())return;const X=e.select("open");!v.blockMouseMove&&(!X||V)&&_()&&e.setOpen(!0,Re(bn,B,L))}v.pointerType==="touch"?Ni.flushSync(()=>{H()}):V&&I?H():(v.restTimeoutPending=!0,v.restTimeout.start(M,H))}}},[n,v,C,$,a,e,j,_])}function mD(e){return $a&&e.movementX===0&&e.movementY===0}function T0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ig(e,t){return T0(t,e===ZU||e===AC,e===h0||e===m0)}function h1(e,t,n){return T0(t,e===AC,n?e===h0:e===m0)||e==="Enter"||e===" "||e===""}function GEe(e,t,n){return T0(t,n?e===h0:e===m0,e===AC)}function KEe(e,t,n,r){const i=n?e===m0:e===h0,a=e===ZU;return t==="both"||t==="horizontal"&&r?e==="Escape":T0(t,i,a)}function HH(e,t){const{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:l=!1,nested:u=!1,rtl:f=!1,virtual:d=!1,focusItemOnOpen:p="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:y=!0,disabledIndices:m=void 0,orientation:g="vertical",triggerOrientation:b=g,parentOrientation:v,id:w,resetOnPointerLeave:S=!0,externalTree:O,nestedReturnFocusRef:j,grid:E}=t,T=E!=null,A=e.useState("open"),C=e.useState("floatingElement"),_=e.useState("domReferenceElement"),$=e.context.dataRef,D=Ob(C),N=nE(_),P=qt(D),R=tl(),B=nl(O),L=x.useRef(p),k=x.useRef(o??-1),I=x.useRef(null),V=x.useRef(!0),M=de(W=>{i(k.current===-1?null:k.current,W)}),H=x.useRef(!!C),G=x.useRef(A),U=x.useRef(!1),Y=x.useRef(!1),X=x.useRef(null),te=qt(m),q=qt(A),ee=qt(o),J=qt(S),K=Zf(),oe=Zf(),Q=de(()=>{K.cancel();function W(he){d||(X.current=Tv(he,{sync:U.current,preventScroll:!0}))}const ie=n.current[k.current],Oe=Y.current;ie&&W(ie),(U.current?he=>he():he=>K.request(he))(()=>{var Le;const he=n.current[k.current]||ie;if(!he)return;ie||W(he),Se&&(Oe||!V.current)&&((Le=he.scrollIntoView)==null||Le.call(he,{block:"nearest",inline:"nearest"}))})});le(()=>{$.current.orientation=g},[$,g]),le(()=>{A||(I.current=null),(!A||p!=="auto")&&(L.current=p)},[A,p]),le(()=>{a&&(A&&C?(k.current=o??-1,L.current&&o!=null&&(Y.current=!0,M())):H.current&&(k.current=-1,M()))},[a,A,C,o,M]),le(()=>{if(a){if(!A){U.current=!1;return}if(C)if(r==null){if(U.current=!1,ee.current!=null)return;if(H.current&&(k.current=-1,Q()),(!G.current||!H.current)&&L.current&&(I.current!=null||L.current===!0&&I.current==null)){let W=0;const ie=()=>{n.current[0]==null?(W<2&&(W?pe=>oe.request(pe):queueMicrotask)(ie),W+=1):(k.current=I.current==null||h1(I.current,b,f)||u?Ev(n):iE(n),I.current=null,M())};ie()}}else Uc(n.current,r)||(k.current=r,Q(),Y.current=!1)}},[a,A,C,r,ee,u,n,b,f,M,Q,oe]),le(()=>{var he,Fe;if(!a||C||!B||d||!H.current)return;const W=B.nodesRef.current,ie=(Fe=(he=W.find(Le=>Le.id===R))==null?void 0:he.context)==null?void 0:Fe.elements.floating,Oe=br(Qe(_??ie??null)),pe=W.some(Le=>Le.context&&je(Le.context.elements.floating,Oe));ie&&!pe&&V.current&&ie.focus({preventScroll:!0})},[a,C,_,B,R,d]),le(()=>{G.current=A,H.current=!!C});const ae=r!=null,ue=de(W=>{if(!q.current)return;const ie=n.current.indexOf(W.currentTarget);ie!==-1&&(k.current!==ie||r!==ie)&&(k.current=ie,M(W))}),ye=de(()=>{var W,ie,Oe;return v??((Oe=(ie=(W=B==null?void 0:B.nodesRef.current.find(pe=>pe.id===R))==null?void 0:W.context)==null?void 0:ie.dataRef)==null?void 0:Oe.current.orientation)}),Ie=de(()=>Ev(n,te.current)),ce=de(W=>{if(V.current=!1,U.current=!0,W.which===229||!q.current&&W.currentTarget===P.current)return;if(u&&KEe(W.key,g,f,T)){Ig(W.key,ye())||ia(W),e.setOpen(!1,Re(wb,W.nativeEvent));const he=(j==null?void 0:j.current)??_;Et(he)&&he.focus();return}r!=null&&r!==k.current&&!Uc(n.current,r)&&(k.current=r);const ie=k.current,Oe=Ev(n,m),pe=iE(n,m);if(N||(W.key==="Home"&&(ia(W),k.current=Oe,M(W)),W.key==="End"&&(ia(W),k.current=pe,M(W))),E!=null){const he=E(W,k.current,n,g,l,f,m,Oe,pe);if(he!=null&&he!==k.current&&(k.current=he,M(W)),g==="both")return}if(Ig(W.key,g)){ia(W);const he=br(W.currentTarget.ownerDocument);if(A&&!d&&je(W.currentTarget,he)&&!n.current.some(nt=>nt!=null&&je(nt,he))){k.current=h1(W.key,g,f)?Oe:pe,M(W),r===k.current&&Q();return}const{index:Fe,wrapped:Le}=Fje(n.current,ie,{decrement:!h1(W.key,g,f),loopFocus:l,allowEscape:s,disabledIndices:m,minIndex:Oe,maxIndex:pe});Le&&(U.current=!1),k.current=Fe,M(W)}}),Se=x.useMemo(()=>({onFocus(ie){U.current=!0,ue(ie)},onClick({currentTarget:ie}){d||ie.focus({preventScroll:!0})},onMouseMove(ie){mD(ie)||(U.current=!0,Y.current=!1,h&&ue(ie))},onPointerLeave(ie){var pe;if(!q.current||!V.current||ie.pointerType==="touch")return;U.current=!0;const Oe=ie.relatedTarget;if(!(!h||n.current.includes(Oe))&&J.current&&((pe=X.current)==null||pe.call(X),X.current=null,k.current=-1,M(ie),!d)){const he=P.current,Fe=br(Qe(he));he&&je(he,Fe)&&he.focus({preventScroll:!0})}}}),[ue,q,P,h,n,M,J,d]),re=x.useMemo(()=>d&&A&&ae&&{"aria-activedescendant":`${w}-${r}`},[d,A,ae,w,r]),we=x.useMemo(()=>({...N?{}:re,onKeyDown(W){if(W.key==="Tab"&&W.shiftKey&&A&&!d){const ie=$n(W.nativeEvent);if(ie&&!je(P.current,ie))return;ia(W);const Oe=Re(mu,W.nativeEvent);e.setOpen(!1,Oe);const pe=(j==null?void 0:j.current)??_;!Oe.isCanceled&&Et(pe)&&pe.focus();return}ce(W)},onPointerMove(W){mD(W)||(V.current=!0)}}),[re,ce,P,N,e,A,d,_,j]),$e=x.useMemo(()=>{function W(pe){e.setOpen(!0,Re(wb,pe.nativeEvent,pe.currentTarget))}function ie(pe){p==="auto"&&Qf(pe.nativeEvent)&&(L.current=!d)}function Oe(pe){L.current=p,p==="auto"&&TC(pe.nativeEvent)&&(L.current=!0)}return{onKeyDown(pe){var ht;const he=e.select("open");V.current=!1;const Fe=pe.key.startsWith("Arrow"),Le=GEe(pe.key,ye(),f),nt=Ig(pe.key,he?g:b),Kt=(u?Le:nt)||pe.key==="Enter"||pe.key.trim()==="";if(d&&he&&(!u||km(pe.currentTarget)))return ce(pe);if(!(!he&&!y&&Fe)){if(Kt){const oi=Ig(pe.key,ye());I.current=u&&oi?null:pe.key}if(u){Le&&(ia(pe),he?(k.current=Ie(),M(pe),d&&((ht=P.current)==null||ht.focus())):W(pe));return}nt&&(ee.current!=null&&(k.current=ee.current),ia(pe),!he&&y?W(pe):ce(pe),he&&M(pe))}},onFocus(pe){pe.target===pe.currentTarget&&e.select("open")&&!d&&(k.current=-1,M(pe))},onPointerDown:Oe,onPointerEnter:Oe,onMouseDown:ie,onClick:ie}},[ce,p,Ie,u,M,e,y,g,b,ye,f,ee,d,P]),at=x.useMemo(()=>({...re,...$e}),[re,$e]);return x.useMemo(()=>a?{reference:at,floating:we,item:Se,trigger:$e}:{},[a,at,we,$e,Se])}function qH(e,t){const{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:l=!0,resetMs:u=750,selectedIndex:f=null}=t,d=de(s),p=e.useState("open"),h=dn(),y=x.useRef(""),m=x.useRef(f??i??-1),g=x.useRef(null),b=de(S=>{function O(N){return r==null?void 0:r.current[N]}function j(N){const P=O(N);return P&&!g0(P)||P!=null&&P.matches(":disabled")?!1:o==null||!qc(Gi,N,o)}function E(N,P,R=0){if(N.length===0)return-1;const B=(R%N.length+N.length)%N.length,L=P.toLowerCase();for(let k=0;k<N.length;k+=1){const I=(B+k)%N.length,V=N[I];if(!(!(V!=null&&V.toLowerCase().startsWith(L))||!j(I)))return I}return-1}const T=n.current;if(y.current.length>0&&S.key===" "&&(ia(S),d==null||d(!0)),y.current.length>0&&y.current[0]!==" "&&E(T,y.current)===-1&&S.key!==" "&&(d==null||d(!1)),T==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;p&&S.key!==" "&&(ia(S),d==null||d(!0));const A=y.current==="";A&&(m.current=f??i??-1),T.every((N,P)=>{var R,B;return N&&j(P)?((R=N[0])==null?void 0:R.toLowerCase())!==((B=N[1])==null?void 0:B.toLowerCase()):!0})&&y.current===S.key&&(y.current="",m.current=g.current),y.current+=S.key,h.start(u,()=>{y.current="",m.current=g.current,d==null||d(!1)});const $=((A?f??i??-1:m.current)??0)+1,D=E(T,y.current,$);D!==-1?(a==null||a(D,S),g.current=D):S.key!==" "&&(y.current="",d==null||d(!1))}),v=de(S=>{const O=S.relatedTarget,j=e.select("domReferenceElement"),E=e.select("floatingElement");je(j,O)||je(E,O)||(h.clear(),y.current="",m.current=g.current,d==null||d(!1))});le(()=>{!p&&f!==null||(h.clear(),g.current=null,y.current!==""&&(y.current="",d==null||d(!1)))},[p,f,h,d]);const w=x.useMemo(()=>({onKeyDown:b,onBlur:v}),[b,v]);return x.useMemo(()=>l?{reference:w,floating:w}:{},[l,w])}const gD=.1,YEe=gD*gD,St=.5;function kg(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Lg(e,t,n,r,i,a,o,s,l,u){let f=!1;return kg(e,t,n,r,i,a)&&(f=!f),kg(e,t,i,a,o,s)&&(f=!f),kg(e,t,o,s,l,u)&&(f=!f),kg(e,t,l,u,n,r)&&(f=!f),f}function XEe(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Bg(e,t,n,r,i,a){const o=Math.min(n,i),s=Math.max(n,i),l=Math.min(r,a),u=Math.max(r,a);return e>=o&&e<=s&&t>=l&&t<=u}function VH(e={}){const{blockPointerEvents:t=!1}=e,n=new Ki,r=({x:i,y:a,placement:o,elements:s,onClose:l,nodeId:u,tree:f})=>{const d=o==null?void 0:o.split("-")[0];let p=!1,h=null,y=null,m=typeof performance<"u"?performance.now():0;function g(v,w){const S=performance.now(),O=S-m;if(h===null||y===null||O===0)return h=v,y=w,m=S,!1;const j=v-h,E=w-y,T=j*j+E*E,A=O*O*YEe;return h=v,y=w,m=S,T<A}function b(){n.clear(),l()}return function(w){n.clear();const S=s.domReference,O=s.floating;if(!S||!O||d==null||i==null||a==null)return;const{clientX:j,clientY:E}=w,T=$n(w),A=w.type==="mouseleave",C=je(O,T),_=je(S,T);if(C&&(p=!0,!A))return;if(_&&(p=!1,!A)){p=!0;return}if(A&&ot(w.relatedTarget)&&je(O,w.relatedTarget))return;function $(){return!!(f&&Fs(f.nodesRef.current,u).length>0)}function D(){$()||b()}if($())return;const N=S.getBoundingClientRect(),P=O.getBoundingClientRect(),R=i>P.right-P.width/2,B=a>P.bottom-P.height/2,L=P.width>N.width,k=P.height>N.height,I=(L?N:P).left,V=(L?N:P).right,M=(k?N:P).top,H=(k?N:P).bottom;if(d==="top"&&a>=N.bottom-1||d==="bottom"&&a<=N.top+1||d==="left"&&i>=N.right-1||d==="right"&&i<=N.left+1){D();return}let G=!1;switch(d){case"top":G=Bg(j,E,I,N.top+1,V,P.bottom-1);break;case"bottom":G=Bg(j,E,I,P.top+1,V,N.bottom-1);break;case"left":G=Bg(j,E,P.right-1,H,N.left+1,M);break;case"right":G=Bg(j,E,N.right-1,H,P.left+1,M);break}if(G)return;if(p&&!XEe(j,E,N)){D();return}if(!A&&g(j,E)){D();return}let U=!1;switch(d){case"top":{const Y=L?St/2:St*4,X=L||R?i+Y:i-Y,te=L?i-Y:R?i+Y:i-Y,q=a+St+1,ee=R||L?P.bottom-St:P.top,J=R?L?P.bottom-St:P.top:P.bottom-St;U=Lg(j,E,X,q,te,q,P.left,ee,P.right,J);break}case"bottom":{const Y=L?St/2:St*4,X=L||R?i+Y:i-Y,te=L?i-Y:R?i+Y:i-Y,q=a-St,ee=R||L?P.top+St:P.bottom,J=R?L?P.top+St:P.bottom:P.top+St;U=Lg(j,E,X,q,te,q,P.left,ee,P.right,J);break}case"left":{const Y=k?St/2:St*4,X=k||B?a+Y:a-Y,te=k?a-Y:B?a+Y:a-Y,q=i+St+1,ee=B||k?P.right-St:P.left,J=B?k?P.right-St:P.left:P.right-St;U=Lg(j,E,ee,P.top,J,P.bottom,q,X,q,te);break}case"right":{const Y=k?St/2:St*4,X=k||B?a+Y:a-Y,te=k?a-Y:B?a+Y:a-Y,q=i-St,ee=B||k?P.left+St:P.right,J=B?k?P.left+St:P.right:P.left+St;U=Lg(j,E,q,X,q,te,ee,P.top,J,P.bottom);break}}U?p||n.start(40,D):D()}};return r.__options={...e,blockPointerEvents:t},r}function vD(e,t,n){let{reference:r,floating:i}=e;const a=ji(t),o=NC(t),s=_C(o),l=Wr(t),u=a==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}const y=Ea(t);return y&&(h[o]+=p*(y==="end"?1:-1)*(n&&u?-1:1)),h}async function WEe(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=zs(t,e),y=iH(h),g=s[p?d==="floating"?"reference":"floating":d],b=em(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),v=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))&&await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1},O=em(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:w,strategy:l}):v);return{top:(b.top-O.top+y.top)/S.y,bottom:(O.bottom-b.bottom+y.bottom)/S.y,left:(b.left-O.left+y.left)/S.x,right:(O.right-b.right+y.right)/S.x}}const QEe=50,ZEe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:WEe},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=vD(u,r,l),p=r,h=0;const y={};for(let m=0;m<a.length;m++){const g=a[m];if(!g)continue;const{name:b,fn:v}=g,{x:w,y:S,data:O,reset:j}=await v({x:f,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:y,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,d=S??d,y[b]={...y[b],...O},j&&h<QEe&&(h++,typeof j=="object"&&(j.placement&&(p=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:f,y:d}=vD(u,p,l)),m=-1)}return{x:f,y:d,placement:p,strategy:i,middlewareData:y}},JEe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...g}=zs(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Wr(i),v=ji(s),w=Wr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=p||(w||!m?[Eb(s)]:Dje(s)),j=y!=="none";!p&&j&&O.push(...Bje(s,m,y,S));const E=[s,...O],T=await l.detectOverflow(t,g),A=[];let C=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&A.push(T[b]),d){const N=$je(i,o,S);A.push(T[N[0]],T[N[1]])}if(C=[...C,{placement:i,overflows:A}],!A.every(N=>N<=0)){var _,$;const N=(((_=a.flip)==null?void 0:_.index)||0)+1,P=E[N];if(P&&(!(d==="alignment"?v!==ji(P):!1)||C.every(L=>ji(L.placement)===v?L.overflows[0]>0:!0)))return{data:{index:N,overflows:C},reset:{placement:P}};let R=($=C.filter(B=>B.overflows[0]<=0).sort((B,L)=>B.overflows[1]-L.overflows[1])[0])==null?void 0:$.placement;if(!R)switch(h){case"bestFit":{var D;const B=(D=C.filter(L=>{if(j){const k=ji(L.placement);return k===v||k==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(k=>k>0).reduce((k,I)=>k+I,0)]).sort((L,k)=>L[1]-k[1])[0])==null?void 0:D[0];B&&(R=B);break}case"initialPlacement":R=s;break}if(i!==R)return{reset:{placement:R}}}return{}}}},GH=new Set(["left","top"]);async function eTe(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Wr(n),s=Ea(n),l=ji(n)==="y",u=GH.has(o)?-1:1,f=a&&l?-1:1,d=zs(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),l?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const tTe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await eTe(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},nTe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:w,y:S}=v;return{x:w,y:S}}},...u}=zs(e,t),f={x:n,y:r},d=await a.detectOverflow(t,u),p=ji(i),h=CC(p);let y=f[h],m=f[p];const g=(v,w)=>rH(w+d[v==="y"?"top":"left"],w,w-d[v==="y"?"bottom":"right"]);o&&(y=g(h,y)),s&&(m=g(p,m));const b=l.fn({...t,[h]:y,[p]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[h]:o,[p]:s}}}}}},rTe=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:a,placement:o,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:f=!0,crossAxis:d=!0}=zs(e,t),p={x:i,y:a},h=ji(o),y=CC(h);let m=p[y],g=p[h];const b=zs(u,t),v=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:(n=b.mainAxis)!=null?n:0,crossAxis:(r=b.crossAxis)!=null?r:0};if(f){const O=y==="y"?"height":"width",j=s.reference[y]-s.floating[O]+v.mainAxis,E=s.reference[y]+s.reference[O]-v.mainAxis;m<j?m=j:m>E&&(m=E)}if(d){var w,S;const O=y==="y"?"width":"height",j=GH.has(Wr(o)),E=s.reference[h]-s.floating[O]+(j&&((w=l.offset)==null?void 0:w[h])||0)+(j?0:v.crossAxis),T=s.reference[h]+s.reference[O]+(j?0:((S=l.offset)==null?void 0:S[h])||0)-(j?v.crossAxis:0);g<E?g=E:g>T&&(g=T)}return{[y]:m,[h]:g}}}},iTe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=zs(e,t),l=await i.detectOverflow(t,s),u=Wr(n),f=Ea(n),d=ji(n)==="y",{width:p,height:h}=r.floating;let y,m;u==="top"||u==="bottom"?(y=u,m=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(m=u,y=f==="end"?"top":"bottom");const g=h-l.top-l.bottom,b=p-l.left-l.right,v=ed(h-l[y],g),w=ed(p-l[m],b),S=t.middlewareData.shift,O=!S;let j=v,E=w;S!=null&&S.enabled.x&&(E=b),S!=null&&S.enabled.y&&(j=g),O&&!f&&(d?E=p-2*lo(l.left,l.right):j=h-2*lo(l.top,l.bottom)),await o({...t,availableWidth:E,availableHeight:j});const T=await i.getDimensions(a.floating);return p!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function KH(e){const t=ii(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Et(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=jb(n)!==a||jb(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function GC(e){return ot(e)?e:e.contextElement}function Kc(e){const t=GC(e);if(!Et(t))return uo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=KH(t);let o=(a?jb(n.width):n.width)/r,s=(a?jb(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const aTe=uo(0);function YH(e){const t=Nt(e);return!xC()||!t.visualViewport?aTe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oTe(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Nt(e)}function vu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=GC(e);let o=uo(1);t&&(r?ot(r)&&(o=Kc(r)):o=Kc(e));const s=oTe(a,n,r)?YH(a):uo(0);let l=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,f=i.width/o.x,d=i.height/o.y;if(a&&r){const p=Nt(a),h=ot(r)?Nt(r):r;let y=p,m=Zj(y);for(;m&&h!==y;){const g=Kc(m),b=m.getBoundingClientRect(),v=ii(m),w=b.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,S=b.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,u*=g.y,f*=g.x,d*=g.y,l+=w,u+=S,y=Nt(m),m=Zj(y)}}return em({width:f,height:d,x:l,y:u})}function A0(e,t){const n=s0(e).scrollLeft;return t?t.left+n:vu(ko(e)).left+n}function XH(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-A0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function sTe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ko(r),s=t?o0(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=uo(1);const f=uo(0),d=Et(r);if((d||!a)&&((Wn(r)!=="body"||Dm(o))&&(l=s0(r)),d)){const h=vu(r);u=Kc(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=o&&!d&&!a?XH(o,l):uo(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}}function lTe(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function uTe(e){const t=s0(e),n=e.ownerDocument.body,r=lo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=lo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+A0(e);const o=-t.scrollTop;return ii(n).direction==="rtl"&&(a+=lo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}const cTe=25;function fTe(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",i=Nt(e),a=ko(e),o=i.visualViewport;let s=a.clientWidth,l=a.clientHeight,u=0,f=0;if(o){const p=!xC()||t==="fixed";r?p||(u=-o.offsetLeft,f=-o.offsetTop):(s=o.width,l=o.height,p&&(u=o.offsetLeft,f=o.offsetTop))}if(A0(a)<=0){const p=a.ownerDocument,h=p.body,y=getComputedStyle(h),m=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,g=Math.abs(a.clientWidth-h.clientWidth-m),b=getComputedStyle(a).scrollbarGutter==="stable both-edges"?g/2:g;b<=cTe&&(s-=b)}return{width:s,height:l,x:u,y:f}}function dTe(e,t){const n=vu(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Kc(e),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,u=r*a.y;return{width:o,height:s,x:l,y:u}}function yD(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=fTe(e,n,t);else if(t==="document")r=uTe(ko(e));else if(ot(t))r=dTe(t,n);else{const i=YH(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return em(r)}function pTe(e,t){const n=t.get(e);if(n)return n;let r=Qh(e,[],!1).filter(s=>ot(s)&&Wn(s)!=="body"),i=null;const a=ii(e).position==="fixed";let o=a?jo(e):e;for(;ot(o)&&!so(o);){const s=ii(o),l=bC(o),u=i?i.position:a?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&s.position==="static")?r=r.filter(d=>d!==o):i=s,o=jo(o)}return t.set(e,r),r}function hTe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?o0(t)?[]:pTe(t,this._c):[].concat(n),r],s=yD(t,o[0],i);let l=s.top,u=s.right,f=s.bottom,d=s.left;for(let p=1;p<o.length;p++){const h=yD(t,o[p],i);l=lo(h.top,l),u=ed(h.right,u),f=ed(h.bottom,f),d=lo(h.left,d)}return{width:u-d,height:f-l,x:d,y:l}}function mTe(e){const{width:t,height:n}=KH(e);return{width:t,height:n}}function gTe(e,t,n){const r=Et(t),i=ko(t),a=n==="fixed",o=vu(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=uo(0);if((r||!a)&&((Wn(t)!=="body"||Dm(i))&&(s=s0(t)),r)){const p=vu(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!r&&i&&(l.x=A0(i));const u=i&&!r&&!a?XH(i,s):uo(0),f=o.left+s.scrollLeft-l.x-u.x,d=o.top+s.scrollTop-l.y-u.y;return{x:f,y:d,width:o.width,height:o.height}}function m1(e){return ii(e).position==="static"}function bD(e,t){if(!Et(e)||ii(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ko(e)===n&&(n=n.ownerDocument.body),n}function WH(e,t){const n=Nt(e);if(o0(e))return n;if(!Et(e)){let i=jo(e);for(;i&&!so(i);){if(ot(i)&&!m1(i))return i;i=jo(i)}return n}let r=bD(e,t);for(;r&&JOe(r)&&m1(r);)r=bD(r,t);return r&&so(r)&&m1(r)&&!bC(r)?n:r||nje(e)||n}const vTe=async function(e){const t=this.getOffsetParent||WH,n=this.getDimensions,r=await n(e.floating);return{reference:gTe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function yTe(e){return ii(e).direction==="rtl"}const QH={convertOffsetParentRelativeRectToViewportRelativeRect:sTe,getDocumentElement:ko,getClippingRect:hTe,getOffsetParent:WH,getElementRects:vTe,getClientRects:lTe,getDimensions:mTe,getScale:Kc,isElement:ot,isRTL:yTe};function ZH(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bTe(e,t,n){let r=null,i;const a=ko(e);function o(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function s(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),o();const p=e.getBoundingClientRect(),{left:h,top:y,width:m,height:g}=p;if(f||t(),!m||!g)return;const b=Mg(y),v=Mg(a.clientWidth-(h+m)),w=Mg(a.clientHeight-(y+g)),S=Mg(h),j={rootMargin:-b+"px "+-v+"px "+-w+"px "+-S+"px",threshold:lo(0,ed(1,d))||1};let E=!0;function T(A){const C=A[0].intersectionRatio;if(!ZH(p,e.getBoundingClientRect()))return s();if(C!==d){if(!E)return s();C?s(!1,C):i=setTimeout(()=>{s(!1,1e-7)},1e3)}E=!1}try{r=new IntersectionObserver(T,{...j,root:a.ownerDocument})}catch{r=new IntersectionObserver(T,j)}r.observe(e)}const l=Nt(e),u=()=>s(n);return l.addEventListener("resize",u),s(!0),()=>{l.removeEventListener("resize",u),o()}}function xD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=GC(e),f=i||a?[...u?Qh(u):[],...t?Qh(t):[]]:[];f.forEach(b=>{i&&b.addEventListener("scroll",n),a&&b.addEventListener("resize",n)});const d=u&&s?bTe(u,n,a):null;let p=-1,h=null;o&&(h=new ResizeObserver(b=>{let[v]=b;v&&v.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),t&&h.observe(t));let y,m=l?vu(e):null;l&&g();function g(){const b=vu(e);m&&!ZH(m,b)&&n(),m=b,y=requestAnimationFrame(g)}return n(),()=>{var b;f.forEach(v=>{i&&v.removeEventListener("scroll",n),a&&v.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const xTe=tTe,wTe=nTe,STe=JEe,OTe=iTe,jTe=rTe,ETe=(e,t,n)=>{const r=new Map,i=n??{},a={...QH,...i.platform,_c:r};return ZEe(e,t,{...i,platform:a})};var TTe=typeof document<"u",ATe=function(){},Av=TTe?x.useLayoutEffect:ATe;function _b(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_b(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!_b(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function JH(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wD(e,t){const n=JH(e);return Math.round(t*n)/n}function g1(e){const t=x.useRef(e);return Av(()=>{t.current=e}),t}function CTe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=x.useState(r);_b(p,r)||h(r);const[y,m]=x.useState(null),[g,b]=x.useState(null),v=x.useCallback(L=>{L!==j.current&&(j.current=L,m(L))},[]),w=x.useCallback(L=>{L!==E.current&&(E.current=L,b(L))},[]),S=a||y,O=o||g,j=x.useRef(null),E=x.useRef(null),T=x.useRef(f),A=l!=null,C=g1(l),_=g1(i),$=g1(u),D=x.useCallback(()=>{if(!j.current||!E.current)return;const L={placement:t,strategy:n,middleware:p};_.current&&(L.platform=_.current),ETe(j.current,E.current,L).then(k=>{const I={...k,isPositioned:$.current!==!1};N.current&&!_b(T.current,I)&&(T.current=I,Ni.flushSync(()=>{d(I)}))})},[p,t,n,_,$]);Av(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[u]);const N=x.useRef(!1);Av(()=>(N.current=!0,()=>{N.current=!1}),[]),Av(()=>{if(S&&(j.current=S),O&&(E.current=O),S&&O){if(C.current)return C.current(S,O,D);D()}},[S,O,D,C,A]);const P=x.useMemo(()=>({reference:j,floating:E,setReference:v,setFloating:w}),[v,w]),R=x.useMemo(()=>({reference:S,floating:O}),[S,O]),B=x.useMemo(()=>{const L={position:n,left:0,top:0};if(!R.floating)return L;const k=wD(R.floating,f.x),I=wD(R.floating,f.y);return s?{...L,transform:"translate("+k+"px, "+I+"px)",...JH(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:I}},[n,s,R.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:D,refs:P,elements:R,floatingStyles:B}),[f,D,P,R,B])}const _Te=(e,t)=>{const n=xTe(e);return{name:n.name,fn:n.fn,options:[e,t]}},NTe=(e,t)=>{const n=wTe(e);return{name:n.name,fn:n.fn,options:[e,t]}},RTe=(e,t)=>({fn:jTe(e).fn,options:[e,t]}),MTe=(e,t)=>{const n=STe(e);return{name:n.name,fn:n.fn,options:[e,t]}},PTe=(e,t)=>{const n=OTe(e);return{name:n.name,fn:n.fn,options:[e,t]}},e6=x.createContext(void 0);function $Te(){const e=x.useContext(e6);if(e===void 0)throw new Error(Wt(26));return e}const lE="ArrowUp",uE="ArrowDown",cE="ArrowLeft",fE="ArrowRight",dE="Home",pE="End",C0=new Set([lE,uE,cE,fE,dE,pE]),DTe="Shift",ITe=[DTe,"Control","Alt","Meta"];function kTe(e){return Et(e)&&e.tagName==="INPUT"}function SD(e){return!!(kTe(e)&&e.selectionStart!=null||Et(e)&&e.tagName==="TEXTAREA")}function OD(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop;const o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!=="vertical"){const l=jD(e,t,"left"),u=zg(e),f=zg(t);n==="ltr"&&(l+t.offsetWidth+f.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight?i=l+t.offsetWidth+f.scrollMarginRight-e.clientWidth+u.scrollPaddingRight:l-f.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft&&(i=l-f.scrollMarginLeft-u.scrollPaddingLeft)),n==="rtl"&&(l-f.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft?i=l-f.scrollMarginLeft-u.scrollPaddingLeft:l+t.offsetWidth+f.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight&&(i=l+t.offsetWidth+f.scrollMarginRight-e.clientWidth+u.scrollPaddingRight))}if(s&&r!=="horizontal"){const l=jD(e,t,"top"),u=zg(e),f=zg(t);l-f.scrollMarginTop<e.scrollTop+u.scrollPaddingTop?a=l-f.scrollMarginTop-u.scrollPaddingTop:l+t.offsetHeight+f.scrollMarginBottom>e.scrollTop+e.clientHeight-u.scrollPaddingBottom&&(a=l+t.offsetHeight+f.scrollMarginBottom-e.clientHeight+u.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:"auto"})}function jD(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function zg(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const LTe="--nested-dialogs",BTe="data-nested-dialog-open",zTe={...$m,...Pm,nestedDialogOpen(e){return e?{[BTe]:""}:null}},KC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,initialFocus:s,...l}=t,u=Du(),f=u.useState("descriptionElementId"),d=u.useState("disablePointerDismissal"),p=u.useState("floatingRootContext"),h=u.useState("popupProps"),y=u.useState("modal"),m=u.useState("mounted"),g=u.useState("nested"),b=u.useState("nestedOpenDialogCount"),v=u.useState("open"),w=u.useState("openMethod"),S=u.useState("titleElementId"),O=u.useState("transitionStatus"),j=u.useState("role"),E=p.useState("floatingId");$Te(),Md({open:v,ref:u.context.popupRef,onComplete(){var D,N;v&&((N=(D=u.context).onOpenChangeComplete)==null||N.call(D,!0))}});const T=s===void 0?fEe(u.context.popupRef):s,A=b>0,C=u.useStateSetter("popupElement"),$=it("div",t,{state:{open:v,nested:g,transitionStatus:O,nestedDialogOpen:A},props:[h,{id:E,"aria-labelledby":S,"aria-describedby":f,role:j,...w0,hidden:!m,onKeyDown(D){C0.has(D.key)&&D.stopPropagation()},style:{[LTe]:b}},l],ref:[n,u.context.popupRef,C],stateAttributesMapping:zTe});return c.jsx(IC,{context:p,openInteractionType:w,disabled:!m,closeOnFocusOut:!d,initialFocus:T,returnFocus:o,modal:y!==!1,restoreFocus:"popup",children:$})});function YC(e){return pC(19)?e:e?"true":void 0}const XC=x.forwardRef(function(t,n){const{cutout:r,...i}=t;let a;if(r){const o=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${o.left}px ${o.top}px,${o.left}px ${o.bottom}px,${o.right}px ${o.bottom}px,${o.right}px ${o.top}px,${o.left}px ${o.top}px)`}return c.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),WC=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,a=Du(),o=a.useState("mounted"),s=a.useState("modal"),l=a.useState("open");return o||r?c.jsx(e6.Provider,{value:r,children:c.jsxs(PC,{ref:n,...i,children:[o&&s===!0&&c.jsx(XC,{ref:a.context.internalBackdropRef,inert:YC(!l)}),t.children]})}):null});let ED={},TD={},AD="";function _0(e,t){return Dm(e)?e:t}function CD(e,t,n){return/hidden|clip/.test(e.getComputedStyle(_0(t,n)).overflowY)}function FTe(e){if(typeof document>"u")return!1;const t=Qe(e);return Nt(t).innerWidth-t.documentElement.clientWidth>0}function UTe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Qe(e),r=n.documentElement,i=n.body,a=_0(r,i),o=a.style.overflowY,s=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const l=a.offsetWidth;a.style.overflowY="hidden";const u=a.offsetWidth;return a.style.overflowY=o,r.style.scrollbarGutter=s,l===u}function HTe(e){const t=Qe(e),n=t.documentElement,r=t.body,i=_0(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,a)}}function qTe(e){var h;const t=Qe(e),n=t.documentElement,r=t.body,i=Nt(n);let a=0,o=0,s=!1;const l=rr.create();if($a&&(((h=i.visualViewport)==null?void 0:h.scale)??1)!==1)return()=>{};function u(){const y=i.getComputedStyle(n),m=i.getComputedStyle(r),v=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,o=n.scrollLeft,ED={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},AD=n.style.scrollBehavior,TD={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const w=n.scrollHeight>n.clientHeight,S=n.scrollWidth>n.clientWidth,O=y.overflowY==="scroll"||m.overflowY==="scroll",j=y.overflowX==="scroll"||m.overflowX==="scroll",E=Math.max(0,i.innerWidth-r.clientWidth),T=Math.max(0,i.innerHeight-r.clientHeight),A=parseFloat(m.marginTop)+parseFloat(m.marginBottom),C=parseFloat(m.marginLeft)+parseFloat(m.marginRight),_=_0(n,r);if(s=UTe(e),s){n.style.scrollbarGutter=v,_.style.overflowY="hidden",_.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(w||O)&&(n.style.overflowY="scroll"),(S||j)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:A||T?`calc(100dvh - ${A+T}px)`:"100dvh",width:C||E?`calc(100vw - ${C+E}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function f(){Object.assign(n.style,ED),Object.assign(r.style,TD),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=AD)}function d(){f(),l.request(u)}u();const p=Ve(i,"resize",d);return()=>{l.cancel(),f(),typeof i.removeEventListener=="function"&&p()}}class VTe{constructor(){Be(this,"lockCount",0);Be(this,"restore",null);Be(this,"timeoutLock",Ki.create());Be(this,"timeoutUnlock",Ki.create());Be(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Be(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=Qe(t),r=n.documentElement,i=n.body,a=Nt(r);if(CD(a,r,i)){const s=new a.MutationObserver(()=>{CD(a,r,i)||(s.disconnect(),this.restore=null,this.lock(t))}),l={attributes:!0};s.observe(r,l),s.observe(i,l),this.restore=()=>s.disconnect();return}const o=p0||!FTe(t);this.restore=o?HTe(t):qTe(t)}}const GTe=new VTe;function t6(e=!0,t=null){le(()=>{if(e)return GTe.acquire(t)},[e,t])}function KTe({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),i=e.useState("mounted"),a=e.useState("disablePointerDismissal"),o=e.useState("modal"),s=e.useState("popupElement"),l=e.useState("floatingRootContext"),[u,f]=x.useState(0),[d,p]=x.useState(0),h=u===0,y=b0(l,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:o==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(m){if(!e.context.outsidePressEnabledRef.current||"button"in m&&m.button!==0)return!1;if("touches"in m){if(m.type==="touchend"){if(m.changedTouches.length!==1||m.touches.length!==0)return!1}else if(m.touches.length!==1)return!1}const g=$n(m);if(h&&!a){if(o){const b=e.context.internalBackdropRef.current,v=e.context.backdropRef.current;return b||v?b===g||v===g||je(g,s)&&!(g!=null&&g.hasAttribute("data-base-ui-portal")):!0}return!0}return!1},escapeKey:h});return t6(r&&o===!0,s),e.useContextCallback("onNestedDialogOpen",(m,g)=>{!e.select("open")&&!e.select("mounted")||(f(m),p(g))}),le(()=>{!r&&!i&&(f(0),p(0))},[r,i]),le(()=>(t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(u+1,d+(n?1:0)),()=>{t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,u,d,t]),UC(e,{activeTriggerProps:y.reference,inactiveTriggerProps:y.trigger,popupProps:y.floating,nestedOpenDialogCount:u,nestedOpenDrawerCount:d}),null}const YTe={...Vp,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class XTe extends Lm{constructor(n,r,i){const a=new S0,o=WTe(n,a,r,i);super(o,QTe(a),YTe);Be(this,"setOpen",(n,r)=>{var i,a;r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(a=(i=this.context).onOpenChange)==null||a.call(i,n,r),!r.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,r),this.update(LC(this.state,n,r.trigger)))})}}function WTe(e,t,n,r=!1){return{...HC(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function QTe(e){return{popupRef:x.createRef(),backdropRef:x.createRef(),internalBackdropRef:x.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function ZTe(e,t){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:l=!0,actionsRef:u,handle:f,triggerId:d,defaultTriggerId:p=null}=t,h=e==="drawer",y=l,m=s,g="dialog",b=Du(!0),v=b!=null,w={modal:y,disablePointerDismissal:m,nested:v,role:g},S=CH((C,_)=>new XTe({open:i,openProp:r,activeTriggerId:p,triggerIdProp:d,...w},C,_),!0);S.useControlledProp("openProp",r),S.useControlledProp("triggerIdProp",d),S.useSyncedValues(w),S.useContextCallback("onOpenChange",a),S.useContextCallback("onOpenChangeComplete",o);const O=S.useState("open"),j=S.useState("mounted"),E=S.useState("payload");hEe(S,O),zC(S);const{forceUnmount:T}=FC(O,S);x.useImperativeHandle(u,()=>({unmount:T,close:()=>S.setOpen(!1,Re(f0))}),[T,S]);const A=O||j||f!=null;return c.jsxs(MU.Provider,{value:S,children:[f&&c.jsx(kC,{handle:f,store:S}),A&&c.jsx(KTe,{store:S,parentContext:b==null?void 0:b.context,isDrawer:h}),typeof n=="function"?n({payload:E}):n]})}const QC=E0(function(t){return ZTe("dialog",t)}),ZC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,l=Du(),u=_i(o);return l.useSyncedValueWithCleanup("titleElementId",u),it("h2",t,{ref:n,props:[{id:u},s]})});function JTe(e){const t=x.useRef(""),n=x.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:x.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function n6(e,t){const n=x.useRef(e),r=de(t);le(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function eAe(e,t){const n=de((a,o)=>{(typeof e=="function"?e():e)||t(o||(p0?"touch":""))}),{onClick:r,onPointerDown:i}=JTe(n);return x.useMemo(()=>({onClick:r,onPointerDown:i}),[r,i])}function r6(e){const[t,n]=x.useState(null),r=eAe(e,n);return n6(e,i=>{i&&!e&&n(null)}),x.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const i6=QC,tAe=x.forwardRef(function({className:t,...n},r){return c.jsx(vC,{ref:r,className:Gt("fixed inset-0 z-40 bg-black/60 backdrop-blur-[2px]",t),...n})}),a6=x.forwardRef(function({className:t,placement:n="center",children:r,...i},a){const o=n==="right"?"inset-y-0 right-0 w-full max-w-xl border-l":n==="top"?"left-1/2 top-[12vh] w-[min(36rem,92vw)] -translate-x-1/2 rounded-lg border":"left-1/2 top-1/2 w-[min(36rem,92vw)] -translate-x-1/2 -translate-y-1/2 rounded-lg border";return c.jsxs(WC,{children:[c.jsx(tAe,{}),c.jsx(KC,{ref:a,className:Gt("fixed z-50 border-line bg-panel-2 text-foreground shadow-2xl focus:outline-none font-mono",o,t),...i,children:r})]})}),o6=x.forwardRef(function({className:t,...n},r){return c.jsx(ZC,{ref:r,className:Gt("text-sm font-semibold text-foreground",t),...n})}),nAe=x.forwardRef(function({className:t,...n},r){return c.jsx(SC,{ref:r,className:Gt("text-xs text-muted-foreground",t),...n})}),nd=x.forwardRef(function({className:t,...n},r){return c.jsx("input",{ref:r,className:Gt("rounded border border-input bg-panel px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...n})});function rAe(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}function iAe(e){const[t,n]=x.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function s6(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Nb({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=x.useRef(e!==void 0),[a,o]=x.useState(()=>t),s=i&&e!==void 0?e:a,l=x.useCallback(u=>{i||o(u)},[]);return[s,l]}const l6=x.createContext(void 0),u6=x.createContext(void 0);function rl(){const e=x.useContext(l6);if(e===void 0)throw new Error(Wt(60));return e}function c6(){const e=x.useContext(u6);if(e===void 0)throw new Error(Wt(61));return e}const aAe="data-valid",oAe="data-invalid",sAe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},lAe={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},uAe={disabled:!1,...lAe},cAe={valid(e){return e===null?null:e?{[aAe]:""}:{[oAe]:""}}},fAe={invalid:void 0,name:void 0,validityData:{state:sAe,errors:[],error:"",value:"",initialValue:null},setValidityData:Ht,disabled:void 0,setTouched:Ht,setDirty:Ht,setFilled:Ht,setFocused:Ht,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:uAe,registerFieldControl:Ht,validation:{getValidationProps:(e,t=st)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Ht,getInputControl:()=>null,commit:async()=>{},change:Ht}},dAe=x.createContext(fAe);function N0(e=!0){const t=x.useContext(dAe);if(t.setValidityData===Ht&&!e)throw new Error(Wt(28));return t}function pAe(e,t,n,r,i=!0,a){const{registerFieldControl:o}=N0(),s=fn(()=>Symbol());le(()=>{const l=s.current;if(!i){o(l,void 0);return}o(l,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),le(()=>{const l=s.current;return()=>{o(l,void 0)}},[o,s])}const hAe=x.createContext({controlId:void 0,registerControlId:Ht,resetControlId:Ht,labelId:void 0,setLabelId:Ht,messageIds:[],setMessageIds:Ht,getDescriptionProps:e=>e});function f6(){return x.useContext(hAe)}function d6(e={}){const{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=f6(),o=_i(),s=fn(()=>Symbol()),l=x.useRef(!1),u=x.useRef(!1),f=de(()=>{!l.current||i===Ht||(l.current=!1,i(s.current,void 0))});return le(()=>{if(!n||i===Ht){f();return}let d;if(t!==void 0)u.current=!0,d=t;else if(u.current)d=o;else{a();return}if(d===void 0){f();return}l.current=!0,i(s.current,d)},[t,n,i,a,o,s,f]),le(()=>f,[f]),(n?r:void 0)??t??o}function mAe(e,t,n=Object.is){const{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}const p6=(e,t)=>Object.is(e,t);function yu(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function gAe(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!mAe(e,t,(r,i)=>yu(r,i,n)):e!==t}function hE(e,t,n){return e?e.some(r=>r===void 0?!1:yu(t,r,n)):!1}function Cv(e,t,n){return e?e.findIndex(r=>r===void 0?!1:yu(r,t,n)):-1}function vAe(e,t){if(t!==p6)return r=>hE(e,r,t);const n=new Set(e);return n.delete(void 0),r=>n.has(r)&&(r!==0||e.some(i=>Object.is(r,i)))}function h6(e,t,n,r){const i=r&&Array.isArray(t)?e.findIndex(vAe(t,n)):Cv(e,t,n);return i===-1?null:i}function yAe(e,t,n,r,i,a){return hE(r,t,i)?a!=null&&e>a&&hE(r,n[a],i)?a:e:e===a?h6(n,r,i,!0):a}function bAe(e,t,n){return e.filter(r=>!yu(t,r,n))}function mE(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function xAe(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function m6(e){return xAe(e==null?void 0:e[0])}function wAe(e){return m6(e)?e.flatMap(t=>t.items):e}function SAe(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(m6(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function g6(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return mE(e)}function rc(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?mE(e.value):mE(e)}function v6(e,t,n){function r(){return g6(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){const a=wAe(t);if(e==null||typeof e!="object"){const o=a.find(s=>s.value===e);return o&&o.label!=null?o.label:r()}if("value"in e){const o=a.find(s=>s&&s.value===e.value);if(o&&o.label!=null)return o.label}}return r()}function OAe(e,t,n){return e.reduce((r,i,a)=>(a>0&&r.push(", "),r.push(c.jsx(x.Fragment,{children:v6(i,t,n)},a)),r),[])}const jAe={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:rc(t,r)!==""},hasNullItemLabel:(e,t)=>t?SAe(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(i=>yu(t,i,n)):yu(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},EAe=x.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Ht,validationMode:"onSubmit",submitCountRef:{current:0}});function TAe(){return x.useContext(EAe)}function wp(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Va=1;function y6(e,t){return Math.max(0,e-t)}function AAe(e,t){if(t<=0)return 0;const n=wp(e,0,t),r=n,i=t-n,a=r<=Va,o=i<=Va;return a&&o?r<=i?0:t:a?0:o?t:n}function CAe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:l,form:u,autoComplete:f,disabled:d=!1,readOnly:p=!1,required:h=!1,modal:y=!0,actionsRef:m,inputRef:g,onOpenChangeComplete:b,items:v,multiple:w=!1,itemToStringLabel:S,itemToStringValue:O,isItemEqualToValue:j=p6,highlightItemOnHover:E=!0,children:T}=e,{clearErrors:A}=TAe(),{setDirty:C,setTouched:_,setFocused:$,validityData:D,setFilled:N,name:P,disabled:R,validation:B,validationMode:L}=N0(),k=d6({id:t}),I=R||d,V=P??l,[M,H]=Nb({controlled:n,default:w?r??Gi:r,name:"Select",state:"value"}),[G,U]=Nb({controlled:a,default:o,name:"Select",state:"open"}),Y=x.useRef([]),X=x.useRef([]),te=x.useRef(null),q=x.useRef(null),ee=x.useRef(0),J=x.useRef(null),K=x.useRef([]),oe=x.useRef(!1),Q=x.useRef(null),ae=x.useRef(null),ue=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ye=x.useRef(!1),Ie=x.useRef(M),{openMethod:ce,triggerProps:Se}=r6(G),re=fn(()=>new Lm({id:k,labelId:void 0,modal:y,multiple:w,disabled:I,readOnly:p,required:h,highlightItemOnHover:E,itemToStringLabel:S,itemToStringValue:O,isItemEqualToValue:j,value:M,open:G,mounted:G,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:st,triggerProps:st,itemRoot:{props:st,multiple:w,disabled:I,readOnly:p,isItemEqualToValue:j},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Ht,setOpen:Ht,handleScrollArrowVisibility:Ht,onOpenChangeComplete:Ht,listRef:Y,popupRef:te,scrollHandlerRef:q,scrollArrowsMountedCountRef:ee,valueRef:J,valuesRef:K,labelsRef:X,typingRef:oe,selectionRef:ue,firstItemTextRef:Q,selectedItemTextRef:ae,alignItemWithTriggerActiveRef:ye,initialValueRef:Ie},jAe)).current,[we,$e]=x.useState(!1),{mounted:at,transitionStatus:W,forceUnmount:ie}=AH({open:G,ref:te,preventUnmountOnClose:we,setPreventUnmountOnClose:$e,onUnmount(){re.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),b==null||b(!1)}}),Oe=re.useState("activeIndex"),pe=re.useState("selectedIndex"),he=re.useState("triggerElement"),Fe=re.useState("positionerElement"),Le=iAe(ce),nt=ce??Le,Kt=x.useMemo(()=>w?"":rc(M,O),[w,M,O]),ht=x.useMemo(()=>w&&Array.isArray(M)?M.map(De=>rc(De,O)):rc(M,O),[w,M,O]),oi=qt(he),cr=de(()=>ht);pAe(oi,k,M,cr,!I,l);const jr=w?Array.isArray(M)&&M.length>0:M!=null&&Kt!=="";le(()=>{N(jr)},[jr,N]),le(function(){const ct=h6(K.current,M,j,w);ct===null&&(ae.current=null),!G&&re.set("selectedIndex",ct)},[w,G,M,j,re]),n6(M,()=>{A(V),C(gAe(M,D.initialValue,j)),B.change(M)});const fr=de((De,ct)=>{const Ar=ct,Zi=BC(Ar);s==null||s(De,Ar),!ct.isCanceled&&(De||$e(Zi()),U(De),!De&&(ct.reason===mu||ct.reason===u0)&&(_(!0),$(!1),L==="onBlur"&&B.commit(M)))});x.useImperativeHandle(m,()=>({unmount:ie,close:()=>{re.state.open&&fr(!1,Re(f0))}}),[ie,fr,re]);const En=de((De,ct)=>{i==null||i(De,ct),!ct.isCanceled&&H(De)}),Er=de(De=>{const ct=y6(De.scrollHeight,De.clientHeight),Ar=AAe(De.scrollTop,ct),Zi=Ar>0,Cr=Ar<ct;re.set("scrollUpArrowVisible",Zi),re.set("scrollDownArrowVisible",Cr)}),Tr=qEe({open:G,onOpenChange:fr,elements:{reference:he,floating:Fe}}),si=jH(Tr,{enabled:!I,event:"mousedown"}),pn=b0(Tr),dr=HH(Tr,{enabled:!I,listRef:Y,activeIndex:Oe,selectedIndex:pe,disabledIndices:Gi,onNavigate(De){De===null&&!G||re.set("activeIndex",De)},focusItemOnHover:E}),li=qH(Tr,{enabled:!I&&(G||!p&&!w),listRef:X,activeIndex:Oe,selectedIndex:pe,disabledIndices:De=>s6(Y.current[De]),onMatch(De){G?re.set("activeIndex",De):En(K.current[De],Re(Ci))},onTyping(De){oe.current=De}}),Da=x.useMemo(()=>Ir(li.reference,dr.reference,pn.reference,si.reference,Se),[si.reference,li.reference,dr.reference,pn.reference,Se]),Ia=x.useMemo(()=>Ir(w0,li.floating,dr.floating,pn.floating),[li.floating,dr.floating,pn.floating]),fe=dr.item??st,Ee=x.useMemo(()=>({props:fe,multiple:w,disabled:I,readOnly:p,isItemEqualToValue:j}),[fe,w,I,p,j]);re.useContextCallback("setValue",En),re.useContextCallback("setOpen",fr),re.useContextCallback("handleScrollArrowVisibility",Er),re.useContextCallback("onOpenChangeComplete",b),rAe(()=>{re.update({popupProps:Ia,triggerProps:Da,itemRoot:Ee})}),re.useSyncedValues({id:k,modal:y,multiple:w,disabled:I,readOnly:p,required:h,highlightItemOnHover:E,value:M,open:G,mounted:at,transitionStatus:W,popupProps:Ia,triggerProps:Da,itemRoot:Ee,items:v,itemToStringLabel:S,itemToStringValue:O,isItemEqualToValue:j,openMethod:nt});const rt=Ca(g,B.inputRef),tn=w?void 0:V,nn=x.useMemo(()=>!w||!Array.isArray(M)||!V?null:M.map(De=>{const ct=rc(De,O);return c.jsx("input",{type:"hidden",form:u,name:V,value:ct,disabled:I},ct)}),[w,M,u,V,O,I]);return c.jsxs(l6.Provider,{value:re,children:[c.jsx(u6.Provider,{value:Tr,children:T}),c.jsx("input",{...B.getValidationProps(I,{onFocus(){var De;(De=re.state.triggerElement)==null||De.focus({focusVisible:!0})},onChange(De){if(De.nativeEvent.defaultPrevented||I||p)return;const ct=De.currentTarget.value,Ar=Re(Ci,De.nativeEvent);function Zi(){if(w)return;const Cr=ct.toLowerCase();let Fr=K.current.findIndex(Fo=>rc(Fo,O).toLowerCase()===Cr||g6(Fo,S).toLowerCase()===Cr);Fr===-1&&(Fr=K.current.findIndex((Fo,Bd)=>{const zd=X.current[Bd];return zd!=null&&zd.toLowerCase()===Cr}));const zo=K.current[Fr];zo!=null&&En(zo,Ar)}re.set("forceMount",!0),queueMicrotask(Zi)}}),id:k&&tn==null?`${k}-hidden-input`:void 0,form:u,name:tn,autoComplete:f,value:Kt,disabled:I,required:h&&!(w&&jr),readOnly:p,ref:rt,style:V?Mje:nH,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),nn]})}function _Ae(e,t){return e??t}function NAe(e,t,n){const{setFocused:r,focusOwnerRef:i}=N0(),a=de(o=>{(o?!e:i.current===a)&&(i.current=o&&a,r(o))});return le(()=>{const o=t.current,s=o==null?void 0:o.getRootNode();return(s==null?void 0:s.activeElement)===o&&a(!0),()=>a(!1)},[e,t,a]),a}const Fg=5;function b6(e,t){const n=RAe(t);return e.clientX>=n.left-Fg&&e.clientX<=n.right+Fg&&e.clientY>=n.top-Fg&&e.clientY<=n.bottom+Fg}function RAe(e){const t=e.getBoundingClientRect(),n=Nt(e);if(EC)return t;const r=n.getComputedStyle(e,"::before"),i=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,l=parseFloat(i.width)||0,u=parseFloat(i.height)||0,f=Math.max(t.width,o,l),d=Math.max(t.height,s,u),p=f-t.width,h=d-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-h/2,bottom:t.bottom+h/2}}const MAe="data-popup-side",PAe=400,$Ae={...Qj,...cAe,popupSide:e=>e?{[MAe]:e}:null,value:()=>null},DAe=x.forwardRef(function(t,n){var ee;const{render:r,className:i,id:a,disabled:o=!1,nativeButton:s=!0,style:l,...u}=t,{setTouched:f,validationMode:d,validation:p,state:h,disabled:y}=N0(),{labelId:m}=f6(),g=rl(),b=g.useState("readOnly"),v=g.useState("required"),w=g.useState("disabled"),S=y||w||o,O=g.useState("open"),j=g.useState("mounted"),E=g.useState("value"),T=g.useState("triggerProps"),A=g.useState("positionerElement"),C=g.useState("listElement"),_=g.useState("popupSide"),$=g.useState("id"),D=g.useState("labelId"),N=g.useState("hasSelectedValue"),P=j&&A?_:null,R=a??$,B=_Ae(m,D);d6({id:a});const L=qt(A),k=x.useRef(null),I=NAe(S,k),{getButtonProps:V,buttonRef:M}=el({disabled:S,native:s}),H=g.useStateSetter("triggerElement"),G=dn(),U=dn(),Y=dn();x.useEffect(()=>{if(O)return Y.start(PAe,()=>{g.context.selectionRef.current.allowUnselectedMouseUp=!0,g.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{Y.clear()};g.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},U.clear()},[O,g,U,Y]);const X=Ir(T,{id:R,role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-controls":O?(C==null?void 0:C.id)??((ee=Ob(A))==null?void 0:ee.id):void 0,"aria-labelledby":B,"aria-readonly":b||void 0,"aria-required":v||void 0,tabIndex:S?-1:0,onFocus(J){I(!0),O&&g.context.alignItemWithTriggerActiveRef.current&&g.context.setOpen(!1,Re(Ci,J.nativeEvent)),G.start(0,()=>{g.set("forceMount",!0)})},onBlur(J){je(A,J.relatedTarget)||(f(!0),I(!1),d==="onBlur"&&p.commit(E))},onMouseDown(J){if(O)return;const K=Qe(J.currentTarget);function oe(Q){if(!k.current)return;const ae=Q.target;je(k.current,ae)||je(L.current,ae)||b6(Q,k.current)||g.context.setOpen(!1,Re(KU,Q))}U.start(0,()=>{K.addEventListener("mouseup",oe,{once:!0})})}},u,V),te=p.getValidationProps(S,X);te.role="combobox";const q={...h,open:O,disabled:S,value:E,readOnly:b,popupSide:P,placeholder:!N};return it("button",t,{ref:[n,k,M,H],state:q,stateAttributesMapping:$Ae,props:te})}),IAe={value:()=>null},kAe=x.forwardRef(function(t,n){const{className:r,render:i,children:a,placeholder:o,style:s,...l}=t,u=rl(),f=u.useState("value"),d=u.useState("items"),p=u.useState("itemToStringLabel"),h=u.useState("hasSelectedValue"),y=!h&&o!=null&&a==null,m=u.useState("hasNullItemLabel",y),g={value:f,placeholder:!h};let b=null;return typeof a=="function"?b=a(f):a!=null?b=a:y&&!m?b=o:Array.isArray(f)?b=OAe(f,d,p):b=v6(f,d,p),it("span",t,{state:g,ref:[n,u.context.valueRef],props:[{children:b},l],stateAttributesMapping:IAe})}),LAe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,u={open:rl().useState("open")};return it("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:HU})}),BAe=x.forwardRef(function(t,n){const r=rl(),i=r.useState("mounted"),a=r.useState("forceMount");return i||a?c.jsx(PC,{ref:n,...t}):null}),x6=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function zAe(){return x.useContext(x6)}function R0(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=de(i),[,o]=x.useState(0),s=fn(UAe).current,l=fn(FAe).current,u=x.useRef(0),f=x.useRef(!0),d=x.useRef(null),p=x.useRef(null),h=de(()=>{f.current||(f.current=!0,o(O=>O+1))}),y=de((O,j)=>{l.set(O,j),h()}),m=de(O=>{l.delete(O),h()}),g=de(O=>{const j=new Map;return n.current.length=0,r&&(r.current.length=0),O.forEach(E=>{var T,A;j.set(E.element,{...E.registration.metadata??{},index:E.index}),n.current[E.index]=E.element,r&&(r.current[E.index]=E.registration.label!==void 0?E.registration.label:((A=(T=E.registration.textRef)==null?void 0:T.current)==null?void 0:A.textContent)??E.element.textContent)}),u.current=n.current.length,j});function b(O){var T;if((T=p.current)==null||T.disconnect(),p.current=null,typeof MutationObserver!="function"||O.length<2)return;const j=new MutationObserver(A=>{if(!VAe(A))return;let C=null;for(const _ of O)if(_.isConnected){if(C&&w6(C,_)>0){j.disconnect(),h();return}C=_}});p.current=j;const E=new Set;for(let A=1;A<O.length;A+=1){const C=qAe(O[A-1],O[A]);C&&E.add(C)}E.forEach(A=>j.observe(A,{childList:!0}))}const v=de(()=>{const[O,j]=HAe(l),E=g(O),T=d.current,A=!T||T.length!==O.length||O.some((C,_)=>{const $=T[_];return C.index!==$.index||C.element!==$.element||C.registration.index!==$.registration.index||C.registration.metadata!==$.registration.metadata});b(j),d.current=O,f.current=!1,A&&(s.forEach(C=>C(E)),a(E))});le(()=>(!f.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),le(()=>{f.current&&v()}),le(()=>()=>{var O;(O=p.current)==null||O.disconnect(),f.current=!0},[]);const w=de(O=>(s.add(O),()=>{s.delete(O)})),S=x.useMemo(()=>({register:y,unregister:m,subscribeMapChange:w,nextIndexRef:u}),[y,m,w,u]);return c.jsx(x6.Provider,{value:S,children:t})}function FAe(){return new Map}function UAe(){return new Set}function HAe(e){const t=new Set,n=[],r=[];e.forEach((a,o)=>{if(!o.isConnected)return;const s=a.index,l={index:s??-1,element:o,registration:a};s===null?r.push(l):s>=0&&(t.add(s),n.push(l))});let i=0;return r.sort((a,o)=>w6(a.element,o.element)),r.forEach(a=>{for(;t.has(i);)i+=1;a.index=i,n.push(a),i+=1}),t.size>0&&n.sort((a,o)=>a.index-o.index),[n,r.map(a=>a.element)]}function qAe(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function VAe(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function w6(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function GAe(e){const{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState("referenceElement"),a=r.useState("floatingElement"),o=r.useState("domReferenceElement"),s=r.useState("open"),l=r.useState("floatingId"),[u,f]=x.useState(null),d=x.useRef(null),p=nl(n),h=x.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),y=CTe({...e,elements:{...h,...u&&{reference:u}}}),m=x.useCallback(w=>{const S=ot(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;f(S),y.refs.setReference(S)},[y.refs]),g=x.useMemo(()=>({...y.refs,setPositionReference:m,domReference:d}),[y.refs,m]),b=x.useMemo(()=>({...y.elements,domReference:o}),[y.elements,o]),v=x.useMemo(()=>({...y,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:l,refs:g,elements:b,nodeId:t,rootStore:r}),[y,g,b,t,r,s,l]);return le(()=>{o&&(d.current=o)},[o]),le(()=>{r.context.dataRef.current.floatingContext=v;const w=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);w&&(w.context=v)}),x.useMemo(()=>({...y,context:v,refs:g,elements:b,rootStore:r}),[y,g,b,v,r])}const KAe=x.createContext(void 0);function M0(){const e=x.useContext(KAe);return(e==null?void 0:e.direction)??"ltr"}const YAe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=zs(e,t)||{};if(u==null)return{};const d=iH(f),p={x:n,y:r},h=NC(i),y=_C(h),m=await o.getDimensions(u),g=h==="y",b=g?"top":"left",v=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[h]-p[h]-a.floating[y],O=p[h]-a.reference[h],j=s.floating[w]||a.floating[y],E=S/2-O/2,T=j/2-m[y]/2-1,A=Math.min(d[b],T),C=Math.min(d[v],T),_=A,$=j-m[y]-C,D=j/2-m[y]/2+E,N=rH(_,D,$),P=!l.arrow&&Ea(i)!=null&&D!==N&&a.reference[y]/2-(D<_?A:C)-m[y]/2<0,R=P?D<_?D-_:D-$:0;return{[h]:p[h]+R,data:{[h]:N,centerOffset:D-N-R,...P&&{alignmentOffset:R}},reset:P}}}),XAe=(e,t)=>{const{name:n,fn:r}=YAe(e);return{name:n,fn:r,options:[e,t]}},WAe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},QAe={sideX:"left",sideY:"top"},ZAe="--available-width",JAe="--available-height",eCe="--anchor-width",tCe="--anchor-height",nCe="--transform-origin",_D=ZAe,ND=JAe;function S6(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function RD(e,t,n){const{rects:r,placement:i}=e;return{side:S6(t,Wr(i),n),align:Ea(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function JC(e){return rCe(e,GAe)}function rCe(e,t){var Da,Ia;const{anchor:n,positionMethod:r="absolute",side:i="bottom",sideOffset:a=0,align:o="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:u=5,sticky:f=!1,arrowPadding:d=5,disableAnchorTracking:p=!1,inline:h,keepMounted:y=!1,floatingRootContext:m,mounted:g,collisionAvoidance:b,shift:v,nodeId:w,adaptiveOrigin:S,lazyFlip:O=!1,externalTree:j}=e,E=b.side||"flip",T=b.align||"flip",A=b.fallbackAxisSide||"end",C=(v==null?void 0:v.crossAxis)??!1,_=v==null?void 0:v.rootBoundary,$=typeof n=="function"?n:void 0,D=de($),N=$?D:n,P=qt(n),R=qt(g),L=M0()==="rtl",[k,I]=x.useState(null);!g&&k!==null&&I(null);const V=O==="placement",M=k?Wr(k):null,H=k&&V?Ea(k)||"center":null,G=M||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":L?"left":"right","inline-start":L?"right":"left"}[i],U=H||o,Y=U==="center"?G:`${G}-${U}`;let X=u;typeof X=="number"?X={top:X,right:X,bottom:X,left:X}:X&&(X={top:X.top||0,right:X.right||0,bottom:X.bottom||0,left:X.left||0});const te=1,q=i==="bottom"?te:0,ee=i==="top"?te:0,J=i==="right"?te:0,K=i==="left"?te:0,oe={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:X},Q=x.useRef(null),ae=qt(a),ue=qt(s),ye=typeof a!="function"?a:0,Ie=typeof s!="function"?s:0,ce=[];h&&ce.push(h),ce.push(_Te(fe=>{const Ee=RD(fe,i,L),rt=typeof ae.current=="function"?ae.current(Ee):ae.current,tn=typeof ue.current=="function"?ue.current(Ee):ue.current;return{mainAxis:rt,crossAxis:tn,alignmentAxis:tn}},[ye,Ie,L,i]));const Se=T==="none"&&E!=="shift",re=!Se&&(f||C||E==="shift"),we=E==="none"?null:MTe({...oe,padding:{top:X.top+te+q,right:X.right+te+K,bottom:X.bottom+te+ee,left:X.left+te+J},mainAxis:!C&&E==="flip",crossAxis:T==="flip"?"alignment":!1,fallbackAxisSideDirection:A}),$e=Se?null:NTe({...oe,rootBoundary:_,mainAxis:T!=="none",crossAxis:re,limiter:f||C?void 0:RTe(fe=>{if(!Q.current)return{};const{width:Ee,height:rt}=Q.current.getBoundingClientRect(),tn=ji(Wr(fe.placement)),nn=tn==="y"?Ee:rt,De=tn==="y"?X.left+X.right:X.top+X.bottom;return{offset:nn/2+De/2}})},[oe,f,C,_,X,T]);E==="shift"||T==="shift"||U==="center"?ce.push($e,we):ce.push(we,$e),ce.push(PTe({...oe,apply({elements:{floating:fe},availableWidth:Ee,availableHeight:rt,rects:tn}){if(!R.current)return;const nn=fe.style;nn.setProperty(_D,`${Ee}px`),nn.setProperty(ND,`${rt}px`);const De=Nt(fe).devicePixelRatio||1,{x:ct,y:Ar,width:Zi,height:Cr}=tn.reference,Fr=(Math.round((ct+Zi)*De)-Math.round(ct*De))/De,zo=(Math.round((Ar+Cr)*De)-Math.round(Ar*De))/De;nn.setProperty(eCe,`${Fr}px`),nn.setProperty(tCe,`${zo}px`)}}),XAe(fe=>({element:Q.current||Qe(fe.elements.floating).createElement("div"),padding:Q.current?d:0}),[d]),{name:"transformOrigin",fn(fe){var zd,j_,E_,T_,A_,C_;const{elements:{floating:Ee},middlewareData:rt,placement:tn,platform:nn,rects:De,y:ct}=fe,Ar=Wr(tn),Zi=Ea(tn),Cr=ji(Ar)==="y",Fr=Q.current,zo=typeof a=="function"?a(RD(fe,i,L)):a;let Fo;if(!Fr&&Zi&&Math.abs(Cr?((zd=rt.shift)==null?void 0:zd.x)||0:((j_=rt.shift)==null?void 0:j_.y)||0)<=1)Fo=Zi==="start"===(Cr&&((E_=nn.isRTL)==null?void 0:E_.call(nn,Ee))===!0)?"100%":"0%";else{const eV=Cr?((T_=rt.arrow)==null?void 0:T_.x)||0:((A_=rt.arrow)==null?void 0:A_.y)||0,tV=Cr?(Fr==null?void 0:Fr.clientWidth)||0:(Fr==null?void 0:Fr.clientHeight)||0;Fo=`${eV+tV/2}px`}let Bd=Ar==="top"||Ar==="left"?`calc(100% + ${zo}px)`:`${-zo}px`;return re&&Cr&&Math.abs(((C_=rt.shift)==null?void 0:C_.y)||0)>zo&&(Bd=`${De.reference.y+De.reference.height/2-ct}px`),Ee.style.setProperty(nCe,Cr?`${Fo} ${Bd}`:`${Bd} ${Fo}`),{}}},WAe,S),le(()=>{!g&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,m]);const at=x.useMemo(()=>({ancestorScroll:!p,elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:W,elements:ie,x:Oe,y:pe,middlewareData:he,update:Fe,placement:Le,context:nt,isPositioned:Kt,floatingStyles:ht}=t({rootContext:m,open:y?g:void 0,placement:Y,middleware:ce,strategy:r,whileElementsMounted:y?void 0:(...fe)=>xD(...fe,at),nodeId:w,externalTree:j}),{sideX:oi,sideY:cr}=he.adaptiveOrigin||QAe,jr=Kt?r:"fixed",fr=x.useMemo(()=>{let fe;return Kt?S?fe={position:jr,[oi]:Oe,[cr]:pe}:fe={...ht,position:jr}:fe={position:jr,top:0,left:0},fe[_D]="100vw",fe[ND]="100vh",Kt||(fe.opacity=0),fe},[S,jr,oi,Oe,cr,pe,ht,Kt]),En=x.useRef(null);le(()=>{if(!g)return;const fe=P.current,Ee=typeof fe=="function"?fe():fe,tn=(MD(Ee)?Ee.current:Ee)||null||null;tn!==En.current&&(W.setPositionReference(tn),En.current=tn)},[g,W,N,P]),x.useEffect(()=>{if(!g)return;const fe=P.current;typeof fe!="function"&&MD(fe)&&fe.current!==En.current&&(W.setPositionReference(fe.current),En.current=fe.current)},[g,W,N,P]),x.useEffect(()=>{if(y&&g&&ie.reference&&ie.floating)return xD(ie.reference,ie.floating,Fe,at)},[y,g,ie,Fe,at]);const Er=Wr(Le),Tr=S6(i,Er,L),si=Ea(Le)||"center",pn=!!((Da=he.hide)!=null&&Da.referenceHidden);le(()=>{O&&g&&Kt&&(Er!==G||V&&si!==U)&&I(Le)},[O,V,g,Kt,Le,Er,si,G,U]);const dr=x.useMemo(()=>{var fe,Ee;return{position:"absolute",top:(fe=he.arrow)==null?void 0:fe.y,left:(Ee=he.arrow)==null?void 0:Ee.x}},[he.arrow]),li=((Ia=he.arrow)==null?void 0:Ia.centerOffset)!==0;return x.useMemo(()=>({positionerStyles:fr,arrowStyles:dr,arrowRef:Q,arrowUncentered:li,side:Tr,align:si,physicalSide:Er,anchorHidden:pn,refs:W,context:nt,isPositioned:Kt,update:Fe}),[fr,dr,Q,li,Tr,si,Er,pn,W,nt,Kt,Fe])}function MD(e){return e!=null&&"current"in e}const O6=x.createContext(void 0);function iCe(){const e=x.useContext(O6);if(!e)throw new Error(Wt(59));return e}function Rb(e,t){e&&Object.assign(e.style,t)}const aCe={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};function P0(e){return e==="starting"?Zje:st}function e_(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){const l={...n};return s&&(l.pointerEvents="none"),it("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:o,style:l},P0(r),i],stateAttributesMapping:$m})}const oCe=20;function j6(e,t,n,r){const[i,a]=x.useState(!1);le(()=>{if(!e||!t||n==null){a(!1);return}const o=Qe(n).documentElement.clientWidth,s=n.offsetWidth;a(o>0&&s>0&&s>=o-oCe)},[e,t,n]),t6(e&&(!t||i),r)}const sCe={position:"fixed"},lCe=x.forwardRef(function(t,n){const{anchor:r,className:i,render:a,positionMethod:o,side:s,align:l,sideOffset:u,alignOffset:f,collisionBoundary:d="clipping-ancestors",collisionPadding:p,arrowPadding:h,sticky:y,disableAnchorTracking:m,alignItemWithTrigger:g=!0,collisionAvoidance:b=mH,style:v,...w}=t,S=rl(),O=c6(),j=S.useState("open"),E=S.useState("mounted"),T=S.useState("modal"),A=S.useState("value"),C=S.useState("openMethod"),_=S.useState("positionerElement"),$=S.useState("triggerElement"),D=S.useState("isItemEqualToValue"),N=S.useState("transitionStatus"),P=x.useRef(null),R=x.useRef(null),[B,L]=x.useState(g),k=E&&B&&C!=="touch";!E&&B!==g&&L(g),x.useImperativeHandle(S.context.alignItemWithTriggerActiveRef,()=>k),j6((k||T)&&j,C==="touch",_,$);const I=JC({anchor:r,floatingRootContext:O,positionMethod:o,mounted:E,side:s,sideOffset:u,align:l,alignOffset:f,arrowPadding:h,collisionBoundary:d,collisionPadding:p,sticky:y,disableAnchorTracking:m??k,collisionAvoidance:b,keepMounted:!0}),V=k?"none":I.side,M=k?sCe:I.positionerStyles,H={open:j,side:V,align:I.align,anchorHidden:I.anchorHidden};le(()=>{S.set("popupSide",I.side)},[S,I.side]);const G=S.useStateSetter("positionerElement"),U=e_(t,H,{styles:M,transitionStatus:N,props:w,refs:[n,G],hidden:!E,inert:!j}),Y=x.useRef(0),X=de(q=>{if(S.context.valuesRef.current.length===0)return;const ee=Y.current;Y.current=q.size;const J=Re(Ci);if(ee!==0&&!S.state.multiple&&A!==null&&Cv(S.context.valuesRef.current,A,D)===-1){const oe=S.context.initialValueRef.current,ae=oe!=null&&Cv(S.context.valuesRef.current,oe,D)!==-1?oe:null;S.context.setValue(ae,J),ae===null&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null)}if(ee!==0&&S.state.multiple&&Array.isArray(A)){const K=A.filter(oe=>Cv(S.context.valuesRef.current,oe,D)!==-1);K.length!==A.length&&(S.context.setValue(K,J),K.length===0&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null))}if(j&&k){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const K={height:""};Rb(_,K),Rb(S.context.popupRef.current,K)}}),te=x.useMemo(()=>({...I,side:V,alignItemWithTriggerActive:k,setControlledAlignItemWithTrigger:L,scrollUpArrowRef:P,scrollDownArrowRef:R}),[I,V,k,L]);return c.jsx(R0,{elementsRef:S.context.listRef,labelsRef:S.context.labelsRef,onMapChange:X,children:c.jsxs(O6.Provider,{value:te,children:[E&&T&&c.jsx(XC,{inert:YC(!j),cutout:$}),U]})})}),Ug="base-ui-disable-scrollbar",PD={className:Ug,getElement(e){return c.jsx("style",{nonce:e,href:Ug,precedence:"base-ui:low",children:`.${Ug}{scrollbar-width:none}.${Ug}::-webkit-scrollbar{display:none}`})}},uCe=x.createContext(void 0);function E6(e){return x.useContext(uCe)}const cCe=x.createContext(void 0),fCe={disableStyleElements:!1};function dCe(){return x.useContext(cCe)??fCe}const $D="--transform-origin",pCe={...$m,...Pm},hCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,...s}=t,l=rl(),u=l.useState("multiple"),f=l.useState("readOnly"),d=l.useState("highlightItemOnHover"),p=c6(),{side:h,align:y,alignItemWithTriggerActive:m,isPositioned:g,setControlledAlignItemWithTrigger:b}=iCe(),v=E6()!=null,w=M0(),{nonce:S,disableStyleElements:O}=dCe(),j=l.useState("id"),E=l.useState("open"),T=l.useState("openMethod"),A=l.useState("mounted"),C=l.useState("popupProps"),_=l.useState("transitionStatus"),$=l.useState("triggerElement"),D=l.useState("positionerElement"),N=l.useState("listElement"),P=x.useRef(!1),R=x.useRef(!1),B=x.useRef({}),L=Zf(),k=de(H=>{if(!D||!l.context.popupRef.current||!R.current)return;const G=D.style.top==="0px",U=D.style.bottom==="0px";if(P.current||!m||!G&&!U){l.context.handleScrollArrowVisibility(H);return}const Y=ID(D),X=Sp(D.getBoundingClientRect().height,"y",Y),te=Qe(D),q=Nt(D),ee=q.getComputedStyle(D),J=parseFloat(ee.marginTop),K=parseFloat(ee.marginBottom),oe=DD(q.getComputedStyle(l.context.popupRef.current)),Q=Math.min(te.documentElement.clientHeight-J-K,oe),ae=H.scrollTop,ue=Hg(H);let ye=null;const Ie=we=>{D.style.height=`${we}px`},ce=G?ue-ae:ae,Se=Math.min(X+ce,Q);if(ce<=Va){const we=wp(ce,0,Q-X);we>0&&Ie(X+we),H.scrollTop=G?ue:0,Q-(X+we)<=Va&&(P.current=!0),l.context.handleScrollArrowVisibility(H);return}if(Q-Se>Va)ye=G?1/0:0;else if(U&&ae<ue){const we=X+ce-Q;ye=ae-(ce-we)}const re=Math.ceil(Se);if(re!==0&&Ie(re),ye!=null){const we=wp(ye,0,Hg(H));Math.abs(H.scrollTop-we)>Va&&(H.scrollTop=we)}re>=Q-Va&&(P.current=!0),l.context.handleScrollArrowVisibility(H)});x.useImperativeHandle(l.context.scrollHandlerRef,()=>k,[k]),Md({open:E,ref:l.context.popupRef,onComplete(){E&&l.context.onOpenChangeComplete(!0)}});const I={open:E,transitionStatus:_,side:h,align:y};le(()=>{!D||!l.context.popupRef.current||Object.keys(B.current).length||(B.current={top:D.style.top||"0",left:D.style.left||"0",right:D.style.right,height:D.style.height,bottom:D.style.bottom,minHeight:D.style.minHeight,maxHeight:D.style.maxHeight,marginTop:D.style.marginTop,marginBottom:D.style.marginBottom})},[l,D]),le(()=>{E||m||(R.current=!1,P.current=!1,Rb(D,B.current))},[E,m,D]),le(()=>{var U,Y;const H=l.context.popupRef.current;if(!E||!$||!D||!H||m&&!g||l.state.transitionStatus==="ending")return;if(R.current=!0,H.style.removeProperty($D),!m){L.request(()=>l.context.handleScrollArrowVisibility(N||H));return}const G=mCe(H);try{let X=l.context.selectedItemTextRef.current;X!=null&&X.isConnected||(X=!l.select("hasSelectedValue")&&((U=l.context.firstItemTextRef.current)!=null&&U.isConnected)?l.context.firstItemTextRef.current:null);const te=l.context.valueRef.current,q=Nt(D),ee=q.getComputedStyle(D),J=q.getComputedStyle(H),K=Qe($),oe=ID($),Q=qg($.getBoundingClientRect(),oe),ae=qg(D.getBoundingClientRect(),oe),ue=Q.height,ye=N||H,Ie=ye.scrollHeight,ce=parseFloat(J.borderBottomWidth),Se=parseFloat(ee.marginTop)||10,re=parseFloat(ee.marginBottom)||10,we=parseFloat(ee.minHeight)||100,$e=DD(J),at=5,W=5,ie=20,Oe=K.documentElement.clientHeight-Se-re,pe=K.documentElement.clientWidth,he=Oe-Q.bottom+ue;let Fe,Le=w==="rtl"?Q.right-ae.width:Q.left,nt=0;if(X&&te){const pn=qg(te.getBoundingClientRect(),oe);Fe=qg(X.getBoundingClientRect(),oe),Le=ae.left+(w==="rtl"?pn.right-Fe.right:pn.left-Fe.left);const dr=pn.top-Q.top+pn.height/2;nt=Fe.top-ae.top+Fe.height/2-dr}const Kt=he+nt+re+ce;let ht=Math.min(Oe,Kt);const oi=Oe-Se-re,cr=Kt-ht,jr=pe-W;D.style.left=`${wp(Le,at,jr-ae.width)}px`,D.style.height=`${ht}px`,D.style.maxHeight="none",D.style.marginTop=`${Se}px`,D.style.marginBottom=`${re}px`,H.style.height="100%";const fr=Hg(ye),En=cr>=fr-Va;En&&(ht=Math.min(Oe,ae.height)-(cr-fr));const Er=Q.top<ie||Q.bottom>Oe-ie||Math.ceil(ht)+Va<Math.min(Ie,we),Tr=(((Y=q.visualViewport)==null?void 0:Y.scale)??1)!==1&&$a;if(Er||Tr){Rb(D,B.current),b(!1);return}const si=Math.max(we,ht);if(En){const pn=Math.max(0,Oe-Kt);D.style.top=ae.height>=oi?"0":`${pn}px`,D.style.height=`${ht}px`,ye.scrollTop=Hg(ye)}else D.style.bottom="0",ye.scrollTop=cr;if(Fe){const pn=ae.top,dr=ae.height,li=Fe.top+Fe.height/2,Da=wp(dr>0?(li-pn)/dr*100:50,0,100);H.style.setProperty($D,`50% ${Da}%`)}(si===Oe||ht>=$e)&&(P.current=!0),l.context.handleScrollArrowVisibility(ye),d&&l.state.selectedIndex===null&&l.state.activeIndex===null&&l.context.listRef.current[0]!=null&&l.set("activeIndex",0)}finally{G()}},[l,E,D,$,m,b,L,N,d,w,g]),x.useEffect(()=>{if(!m||!D||!E)return;const H=Nt(D);function G(U){l.context.setOpen(!1,Re(dje,U))}return Ve(H,"resize",G)},[l,m,D,E]);const V={...N?{role:"presentation"}:{role:"listbox","aria-multiselectable":u||void 0,"aria-readonly":f||void 0,id:`${j}-list`},onKeyDown(H){v&&C0.has(H.key)&&H.stopPropagation()},onScroll(H){N||k(H.currentTarget)},...m&&{style:N?{height:"100%"}:aCe},className:!N&&m?PD.className:void 0},M=it("div",t,{ref:[n,l.context.popupRef],state:I,stateAttributesMapping:pCe,props:[C,V,P0(_),s]});return c.jsxs(x.Fragment,{children:[!O&&PD.getElement(S),c.jsx(IC,{context:p,modal:!1,disabled:!A,openInteractionType:T,returnFocus:o,restoreFocus:!0,children:M})]})});function DD(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function Hg(e){return y6(e.scrollHeight,e.clientHeight)}function ID(e){return QH.getScale(e)}function Sp(e,t,n){return e/n[t]}function qg(e,t){return em({x:Sp(e.x,"x",t),y:Sp(e.y,"y",t),width:Sp(e.width,"x",t),height:Sp(e.height,"y",t)})}const kD=[["transform","none"],["scale","1"],["translate","0 0"]];function mCe(e){const{style:t}=e,n={};for(const[r,i]of kD)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of kD){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}function t_(e={}){const{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:l,nextIndexRef:u}=zAe(),f=x.useRef(-1),[d,p]=x.useState(a==null&&t?()=>{if(f.current===-1){const g=u.current;u.current+=1,f.current=g}return f.current}:-1),h=a??d,y=x.useRef(null),m=x.useCallback(g=>{const b=y.current;b&&s(b),y.current=g,g&&o(g,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return le(()=>{if(a==null)return l(g=>{var v;const b=y.current?(v=g.get(y.current))==null?void 0:v.index:null;b!=null&&p(b)})},[a,l]),{ref:m,index:h}}const T6=x.createContext(void 0);function gCe(){const e=x.useContext(T6);if(!e)throw new Error(Wt(57));return e}const vCe=x.memo(x.forwardRef(function(t,n){const{render:r,className:i,style:a,value:o=null,label:s,disabled:l=!1,nativeButton:u=!1,...f}=t,d=x.useRef(null),p=t_({guess:!0,label:s,textRef:d}),h=rl(),{props:y,multiple:m,disabled:g,readOnly:b,isItemEqualToValue:v}=h.useState("itemRoot"),w=g||l,S=h.useState("isActive",p.index),O=h.useState("open"),j=h.useState("isSelected",o),E=h.useState("isSelectedByFocus",p.index),T=p.index,A=x.useRef(null);le(()=>{const I=h.context.valuesRef.current;return I[T]=o,()=>{delete I[T]}},[T,o,h]),le(()=>{const I=h.state.value,V=h.state.selectedIndex;let M=V,H;m&&Array.isArray(I)?(M=yAe(T,o,h.context.valuesRef.current,I,v,V),H=M===T,T===V&&!H&&(h.context.selectedItemTextRef.current=null)):(H=I!==void 0&&yu(o,I,v),H&&(M=T)),h.set("selectedIndex",M),H&&d.current&&(h.context.selectedItemTextRef.current=d.current)},[T,m,v,h,o]);const C=x.useRef("mouse"),_=x.useRef(!1),{getButtonProps:$,buttonRef:D}=el({disabled:w,focusableWhenDisabled:!0,native:u,composite:!0}),N={disabled:w,selected:j,highlighted:S};function P(I){if(g||b)return;const V=h.state.value;if(m){const M=Array.isArray(V)?V:[],H=j?bAe(M,o,v):[...M,o];h.context.setValue(H,Re(Fc,I))}else h.context.setValue(o,Re(Fc,I)),h.context.setOpen(!1,Re(Fc,I))}function R(){h.context.selectionRef.current.dragY=0}const B={role:"option","aria-selected":j,tabIndex:O&&S?0:-1,onKeyDown(I){h.set("activeIndex",T),I.key===" "&&h.context.typingRef.current&&I.preventDefault()},onClick(I){const V=C.current!=="touch",M=I.nativeEvent.pointerType,H=V&&Qf(I.nativeEvent)&&(M!==void 0||S),G=V&&!H&&!_.current;_.current=!1,!(w||G)&&P(I.nativeEvent)},onPointerEnter(I){C.current=I.pointerType},onPointerMove(I){if(I.pointerType==="mouse"&&I.buttons===1){const V=h.context.selectionRef.current;V.dragY+=I.movementY,V.dragY**2>=64&&(V.allowUnselectedMouseUp=!0)}},onPointerDown(I){C.current=I.pointerType,_.current=!0,R()},onMouseUp(){var M;if(R(),w||C.current==="touch"||_.current)return;const I=!h.context.selectionRef.current.allowSelectedMouseUp&&j,V=!h.context.selectionRef.current.allowUnselectedMouseUp&&!j;I||V||(_.current=!0,(M=A.current)==null||M.click(),_.current=!1)}},L=it("div",t,{ref:[D,n,p.ref,A],state:N,props:[y,B,f,$]}),k=x.useMemo(()=>({selected:j,index:T,textRef:d,selectedByFocus:E}),[j,T,d,E]);return c.jsx(T6.Provider,{value:k,children:L})})),yCe=x.memo(x.forwardRef(function(t,n){const{index:r,textRef:i,selectedByFocus:a}=gCe(),o=rl(),{render:s,className:l,style:u,...f}=t,d=x.useCallback(h=>{h&&(r===0&&(o.context.firstItemTextRef.current=h),a&&(o.context.selectedItemTextRef.current=h))},[o,r,a]);return it("div",t,{ref:[d,n,i],props:f})})),bCe=x.createContext(void 0);function xCe(){const e=x.useContext(bCe);if(e===void 0)throw new Error(Wt(56));return e}const wCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,{setLabelId:l}=xCe(),u=_i(o);return le(()=>(l(u),()=>{l(d=>d===u?void 0:d)}),[u,l]),it("div",t,{ref:n,props:[{id:u,"aria-hidden":!0},s]})}),gE=CAe,vE=kAe,yE=x.forwardRef(function({className:t,children:n,...r},i){return c.jsxs(DAe,{ref:i,className:Gt("inline-flex items-center justify-between gap-1.5 rounded border border-line bg-panel px-2 py-1 text-xs text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",t),...r,children:[n,c.jsx(LAe,{className:"text-muted-foreground","aria-hidden":"true",children:"▾"})]})}),bE=x.forwardRef(function({className:t,children:n,side:r="bottom",align:i="start",...a},o){return c.jsx(BAe,{children:c.jsx(lCe,{side:r,align:i,sideOffset:4,className:"z-50",children:c.jsx(hCe,{ref:o,className:Gt("min-w-[6rem] overflow-hidden rounded border border-line bg-popover p-1 text-popover-foreground shadow-lg font-mono",t),...a,children:n})})})}),Op=x.forwardRef(function({className:t,children:n,...r},i){return c.jsx(vCe,{ref:i,className:Gt("relative flex cursor-default select-none items-center rounded-sm px-2 py-1 text-xs text-foreground outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-panel data-[selected]:text-brand",t),...r,children:c.jsx(yCe,{children:n})})});x.forwardRef(function({className:t,...n},r){return c.jsx(wCe,{ref:r,className:Gt("px-2 py-1 text-[10px] uppercase tracking-[0.12em] text-faint",t),...n})});const il=x.forwardRef(function({className:t,containerClassName:n,...r},i){return c.jsx("div",{className:Gt("w-full overflow-x-auto",n),children:c.jsx("table",{ref:i,className:Gt("w-full border-collapse text-xs",t),...r})})}),al=x.forwardRef(function({className:t,...n},r){return c.jsx("thead",{ref:r,className:Gt("border-b border-line text-left text-[10px] uppercase tracking-[0.12em] text-faint",t),...n})}),ol=x.forwardRef(function({className:t,...n},r){return c.jsx("tbody",{ref:r,className:Gt("divide-y divide-line-soft",t),...n})}),Dn=x.forwardRef(function({className:t,...n},r){return c.jsx("tr",{ref:r,className:Gt("transition-colors",t),...n})}),_e=x.forwardRef(function({className:t,...n},r){return c.jsx("th",{ref:r,className:Gt("px-3 py-2 font-normal",t),...n})}),Me=x.forwardRef(function({className:t,...n},r){return c.jsx("td",{ref:r,className:Gt("px-3 py-2 align-top",t),...n})}),A6=x.createContext(void 0);function C6(){const e=x.useContext(A6);if(e===void 0)throw new Error(Wt(64));return e}const SCe="data-activation-direction",n_={tabActivationDirection:e=>({[SCe]:e})},OCe=x.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:a,orientation:o="horizontal",render:s,value:l,style:u,...f}=t,d=t.defaultValue!==void 0,p=x.useRef([]),[h,y]=x.useState(()=>new Map),[m,g]=Nb({controlled:l,default:i,name:"Tabs",state:"value"}),b=l!==void 0,[v,w]=x.useState(()=>new Map),S=x.useRef(void 0),O=x.useCallback(te=>xE(v,te),[v]),[j,E]=x.useState(()=>({previousValue:m,tabActivationDirection:"none"})),{previousValue:T,tabActivationDirection:A}=j;let C=A,_=!1;T!==m&&(C=LD(T,m,o,v),_=T!=null&&m!=null&&O(m)==null);const $=_?T:m,D=T!==$||A!==C;le(()=>{D&&E({previousValue:$,tabActivationDirection:C})},[$,D,C]);const N=de((te,q)=>{const ee=LD(m,te,o,v);q.activationDirection=ee,a==null||a(te,q),!q.isCanceled&&g(()=>te)}),P=de((te,q)=>{a==null||a(te,Re(q,void 0,void 0,{activationDirection:"none"}))}),R=de((te,q)=>(y(ee=>{const J=new Map(ee);return J.set(te,q),J}),()=>{y(ee=>{if(ee.get(te)!==q)return ee;const J=new Map(ee);return J.delete(te),J})})),B=x.useCallback(te=>h.get(te),[h]),L=x.useCallback(te=>{for(const q of v.values())if(te===q.value)return q.id},[v]),k=x.useMemo(()=>({getTabElementBySelectedValue:O,getTabIdByPanelValue:L,getTabPanelIdByValue:B,onValueChange:N,orientation:o,registerMountedTabPanel:R,setTabMap:w,tabActivationDirection:C,value:m}),[O,L,B,N,o,R,w,C,m]),I=x.useMemo(()=>{for(const te of v.values())if(te.value===m)return te},[v,m]),V=x.useMemo(()=>{for(const te of v.values())if(!te.disabled)return te.value},[v]),M=x.useRef(!d),H=x.useRef(i),G=x.useRef(d),U=x.useRef(!1);le(()=>{var K;if(b)return;function te(oe,Q){g(()=>oe),E({previousValue:oe,tabActivationDirection:"none"}),P(oe,Q),M.current=!1}if(v.size===0){U.current&&m!==null&&!((K=S.current)!=null&&K.isConnected)&&te(null,G$);return}U.current=!0,S.current=v.keys().next().value;const q=I==null?void 0:I.disabled,ee=I==null&&m!==null;if(!q&&m===H.current&&(G.current=!1),G.current&&q&&m===H.current)return;const J=M.current;if(q||ee){const oe=V??null;if(m===oe){M.current=!1;return}let Q=G$;J?Q=K$:q&&(Q=YU),te(oe,Q);return}J&&I!=null&&(P(m,K$),M.current=!1)},[V,b,P,I,g,v,m]);const X=it("div",t,{state:{orientation:o,tabActivationDirection:C},ref:n,props:f,stateAttributesMapping:n_});return c.jsx(A6.Provider,{value:k,children:c.jsx(R0,{elementsRef:p,children:X})})});function xE(e,t){for(const[n,r]of e.entries())if(t===r.value)return n;return null}function LD(e,t,n,r){if(e==null||t==null)return"none";const[i,a,o]=n==="horizontal"?["left","left","right"]:["top","up","down"],s=xE(r,e),l=xE(r,t);if(s==null||l==null)return s!==l&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?o:a:"none";const u=s.getBoundingClientRect()[i],f=l.getBoundingClientRect()[i];return f<u?a:f>u?o:"none"}const r_="data-composite-item-active";function _6(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=l0(),{ref:i,index:a}=t_(e),o=n===a,s=x.useRef(null),l=Ca(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){const f=s.current;if(!t||!f)return;const d=f.hasAttribute("disabled")||f.ariaDisabled==="true";!o&&!d&&f.focus()}},compositeRef:l,index:a}}const N6=x.createContext(void 0);function jCe(){const e=x.useContext(N6);if(e===void 0)throw new Error(Wt(65));return e}const ECe=x.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:a,value:o,id:s,nativeButton:l=!0,style:u,...f}=t,{value:d,getTabPanelIdByValue:p,onValueChange:h,orientation:y,tabActivationDirection:m}=C6(),{activateOnFocus:g,registerTabResizeObserverElement:b,tabsListElement:v}=jCe(),{highlightedIndex:w,onHighlightedIndexChange:S}=l0(),O=_i(s),j=x.useMemo(()=>({disabled:i,id:O,value:o}),[i,O,o]),{compositeProps:E,compositeRef:T,index:A}=_6({metadata:j}),C=o===d,_=x.useRef(!1),$=x.useRef(null),D=de(U=>{var Y;(Y=$.current)==null||Y.call($),$.current=U?b(U):null});le(()=>{if(_.current){_.current=!1;return}if(!(C&&A>-1&&w!==A))return;const U=v;if(U!=null){const Y=br(Qe(U));if(Y&&je(U,Y))return}i||S(A)},[C,A,w,S,i,v]);const{getButtonProps:N,buttonRef:P}=el({disabled:i,native:l,focusableWhenDisabled:!0}),R=p(o),B=x.useRef(!1),L=x.useRef(!1);function k(U){h(o,Re(Ci,U.nativeEvent,void 0,{activationDirection:"none"}))}function I(U){C||i||k(U)}function V(U){C||i||g&&(!B.current||L.current)&&k(U)}function M(U){if(C||i)return;B.current=!0,L.current=U.button===0;const Y=Qe(U.currentTarget);function X(){B.current=!1,L.current=!1,Y.removeEventListener("pointerup",X),Y.removeEventListener("pointercancel",X)}Y.addEventListener("pointerup",X),Y.addEventListener("pointercancel",X)}return it("button",t,{state:{disabled:i,active:C,orientation:y,tabActivationDirection:m},ref:[n,P,T,D],props:[E,{role:"tab","aria-controls":R,"aria-selected":C,id:O,onClick:I,onFocus:V,onPointerDown:M,[r_]:C?"":void 0,onKeyDownCapture(){_.current=!0}},f,N],stateAttributesMapping:n_})});function TCe(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:f,disabledIndices:d,modifierKeys:p=Gi}=e,[h,y]=x.useState(0),m=r!=null,g=x.useRef(null),b=Ca(g,l),v=x.useRef([]),w=x.useRef(!1),S=x.useRef(null),O=o??h,j=de((_,$=!1)=>{if(S.current=v.current[_]??null,(s??y)(_),$){const D=v.current[_];OD(g.current,D,a,n)}}),E=de(_=>{var P;if(_.size===0)return;if(w.current){const R=v.current,B=R.indexOf(S.current);if(B===-1){const L=R[O];!L||qc(R,O,d)?j(ACe(R,d)):S.current=L}else B!==O&&j(B);return}w.current=!0;const $=Array.from(_.keys()),D=$.find(R=>R==null?void 0:R.hasAttribute(r_))??null,N=D?((P=_.get(D))==null?void 0:P.index)??-1:-1;if(N!==-1)j(N);else if(qc($,O,d)){const R=Hc($,{disabledIndices:d});Uc($,R)||j(R)}OD(g.current,D,a,n)});le(()=>{if(d==null||o!=null||!w.current)return;const _=v.current;if(qc(_,O,d)){const $=Hc(_,{disabledIndices:d});Uc(_,$)||j($)}},[d,o,O,v,j]);const T=de((_,$,D)=>i?i(_,$,D,v):D),A=de(_=>{const $=_.key===dE||_.key===pE;if(!C0.has(_.key)||!u&&$||CCe(_,p)||!g.current)return;const N=a==="rtl",P=N?cE:fE,R=N?fE:cE,B=n==="vertical"?uE:P,L=n==="vertical"?lE:R,k=$n(_.nativeEvent);if(k!=null&&SD(k)&&!s6(k)){const U=k.selectionStart,Y=k.selectionEnd,X=k.value;if(U==null||_.shiftKey||U!==Y||_.key!==L&&U<X.length||_.key!==B&&U>0)return}let I=O;const V=Ev(v,d),M=iE(v,d);r!=null&&(I=r({disabledIndices:d,elementsRef:v,event:_,highlightedIndex:O,loopFocus:t,maxIndex:M,minIndex:V,onLoop:T,orientation:n,rtl:N}));const H=n!=="vertical"&&_.key===P||n!=="horizontal"&&_.key===uE,G=n!=="vertical"&&_.key===R||n!=="horizontal"&&_.key===lE;u&&(_.key===dE?I=V:_.key===pE&&(I=M)),I===O&&(H||G)&&(t&&I===M&&H?(I=V,i&&(I=i(_,O,I,v))):t&&I===V&&G?(I=M,i&&(I=i(_,O,I,v))):I=Hc(v.current,{startingIndex:I,decrement:G,disabledIndices:d})),I!==O&&!Uc(v.current,I)&&(f&&_.stopPropagation(),(m||$||H||G)&&_.preventDefault(),j(I,!0),queueMicrotask(()=>{var U;(U=v.current[I])==null||U.focus()}))});return{props:{ref:b,onFocus(_){const $=g.current,D=$n(_.nativeEvent);!$||D==null||!SD(D)||D.setSelectionRange(0,D.value.length)},onKeyDown:A},highlightedIndex:O,onHighlightedIndexChange:j,elementsRef:v,onMapChange:E,relayKeyboardEvent:A}}function ACe(e,t){let n=-1;for(let r=0;r<e.length;r+=1){const i=e[r];if(!(!i||qc(e,r,t))){if(i.hasAttribute(r_))return r;n===-1&&(n=r)}}return Math.max(n,0)}function CCe(e,t){for(const n of ITe)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function _Ce(e){const{render:t,className:n,style:r,refs:i=Gi,props:a=Gi,state:o=st,stateAttributesMapping:s,highlightedIndex:l,onHighlightedIndexChange:u,orientation:f,grid:d,loopFocus:p,onLoop:h,enableHomeAndEndKeys:y,onMapChange:m,stopEventPropagation:g=!0,rootRef:b,disabledIndices:v,modifierKeys:w,highlightItemOnHover:S=!1,tag:O="div",...j}=e,E=M0(),{props:T,highlightedIndex:A,onHighlightedIndexChange:C,elementsRef:_,onMapChange:$,relayKeyboardEvent:D}=TCe({grid:d,loopFocus:p,onLoop:h,orientation:f,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:b,stopEventPropagation:g,enableHomeAndEndKeys:y,direction:E,disabledIndices:v,modifierKeys:w}),N=it(O,e,{state:o,ref:i,props:[T,...a,j],stateAttributesMapping:s}),P=x.useMemo(()=>({highlightedIndex:A,onHighlightedIndexChange:C,highlightItemOnHover:S,relayKeyboardEvent:D}),[A,C,S,D]);return c.jsx(VU.Provider,{value:P,children:c.jsx(R0,{elementsRef:_,onMapChange:R=>{m==null||m(R),$(R)},children:N})})}const NCe=x.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:a=!0,render:o,style:s,...l}=t,{orientation:u,setTabMap:f,tabActivationDirection:d}=C6(),[p,h]=x.useState(0),[y,m]=x.useState(null),g=x.useRef(new Set),b=x.useRef(new Set),v=x.useRef(null);le(()=>{if(typeof ResizeObserver>"u")return;const T=new ResizeObserver(()=>{g.current.forEach(A=>{A()})});return v.current=T,y&&T.observe(y),b.current.forEach(A=>{T.observe(A)}),()=>{T.disconnect(),v.current=null}},[y]);const w=de(T=>(g.current.add(T),()=>{g.current.delete(T)})),S=de(T=>{var A;return b.current.add(T),(A=v.current)==null||A.observe(T),()=>{var C;b.current.delete(T),(C=v.current)==null||C.unobserve(T)}}),O={orientation:u,tabActivationDirection:d},j={"aria-orientation":u==="vertical"?"vertical":void 0,role:"tablist"},E=x.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:w,registerTabResizeObserverElement:S,tabsListElement:y}),[r,w,S,y]);return c.jsx(N6.Provider,{value:E,children:c.jsx(_Ce,{render:o,className:i,style:s,state:O,refs:[n,m],props:[j,l],stateAttributesMapping:n_,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:a,orientation:u,onHighlightedIndexChange:h,onMapChange:f,disabledIndices:Gi})})}),RCe=OCe,MCe=x.forwardRef(function({className:t,...n},r){return c.jsx(NCe,{ref:r,className:Gt("flex flex-wrap gap-1 border-b border-line pb-2",t),...n})}),PCe=x.forwardRef(function({className:t,...n},r){return c.jsx(ECe,{ref:r,className:Gt("flex items-baseline gap-1.5 rounded-md px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-panel hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[active]:bg-panel-2 data-[active]:text-foreground",t),...n})}),R6=x.createContext(void 0);function Bm(e){const t=x.useContext(R6);if(t===void 0&&!e)throw new Error(Wt(72));return t}const $Ce={...Vp,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class DCe extends Lm{constructor(n,r,i){const a=new S0;super(ICe(n,a,r,i),kCe(a),$Ce);Be(this,"setOpen",(n,r)=>{pEe(this,n,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,Re(Iu,n))}}function ICe(e,t,n,r=!1){return{...HC(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function kCe(e){return{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const LCe=E0(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:a=!1,trackCursorAxis:o="none",actionsRef:s,onOpenChange:l,onOpenChangeComplete:u,handle:f,triggerId:d,defaultTriggerId:p=null,children:h}=t,y=CH((_,$)=>new DCe({open:r,openProp:i,activeTriggerId:p,triggerIdProp:d},_,$));y.useControlledProp("openProp",i),y.useControlledProp("triggerIdProp",d),y.useContextCallback("onOpenChange",l),y.useContextCallback("onOpenChangeComplete",u);const m=y.useState("open"),g=!n&&m,b=y.useState("activeTriggerId"),v=y.useState("mounted"),w=y.useState("payload");y.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:a,disabled:n}),zC(y,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S,transitionStatus:O}=FC(g,y),j=y.useState("isInstantPhase"),E=y.useState("instantType"),T=y.useState("lastOpenChangeReason"),A=x.useRef(null);le(()=>{m&&n&&y.setOpen(!1,Re(YU))},[m,n,y]),le(()=>{O==="ending"&&T===Ci||O!=="ending"&&j?(E!=="delay"&&(A.current=E),y.set("instantType","delay")):A.current!==null&&(y.set("instantType",A.current),A.current=null)},[O,j,T,E,y]),le(()=>{g&&b==null&&y.set("payload",void 0)},[y,b,g]),x.useImperativeHandle(s,()=>({unmount:S,close:()=>y.setOpen(!1,Re(f0))}),[S,y]);const C=g||v||!n&&o!=="none";return c.jsxs(R6.Provider,{value:y,children:[f&&c.jsx(kC,{handle:f,store:y}),C&&c.jsx(BCe,{store:y,disabled:n,trackCursorAxis:o}),typeof h=="function"?h({payload:w}):h]})});function BCe({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),i=b0(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=sEe(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),o=x.useMemo(()=>Ir(a.reference,i.reference),[a.reference,i.reference]);return UC(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??st}),null}const M6=x.createContext(void 0);function zCe(){return x.useContext(M6)}const FCe=600,BD="data-base-ui-tooltip-trigger";function zD(e){const t=$n(e);return ot(t)?t:null}const UCe=$H(function(t,n){const{render:r,className:i,style:a,handle:o,payload:s,disabled:l,delay:u,closeOnClick:f=!0,closeDelay:d,id:p,...h}=t,y=Bm(!0),g=LH(o)??y;if(!g)throw new Error(Wt(82));const b=_i(p),v=g.useState("isTriggerActive",b),w=g.useState("isOpenedByTrigger",b),S=g.useState("floatingRootContext"),O=x.useRef(null),j=d??0,{registerTrigger:E,isMountedByThisTrigger:T}=_H(b,O,g,{payload:s,closeOnClick:f,closeDelay:j}),A=zCe(),{activeIdRef:C,delayRef:_,isInstantPhase:$,hasProvider:D}=_je(S,{open:w}),N=VC(S);g.useSyncedValue("isInstantPhase",$);const P=g.useState("disabled"),R=l??P,B=qt(R),L=g.useState("trackCursorAxis"),k=g.useState("disableHoverablePopup"),I=x.useRef(!1),V=dn(),M=x.useRef(void 0);function H(){return D&&C.current!=null?0:u??A??FCe}function G(K){const oe=O.current;if(!oe||!K)return!1;const Q=Jh(K,`[${BD}]`);return Q!==null&&Q!==oe&&je(oe,Q)}function U(K){const oe=G(K);return I.current=oe,oe&&(N.openChangeTimeout.clear(),N.restTimeout.clear(),N.restTimeoutPending=!1,V.clear()),oe}const Y=UH(S,{enabled:!R,mouseOnly:!0,move:!1,handleClose:!k&&L!=="both"?VH():null,restMs:H,delay(){return d==null&&D?{close:gu(_.current,"close")}:{close:j}},triggerElementRef:O,isActiveTrigger:v,isClosing:()=>g.select("transitionStatus")==="ending",shouldOpen(){return!I.current}}),X=BH(S,{enabled:!R}).reference,te=K=>{const oe=I.current,Q=zD(K),ae=U(Q),ue=O.current,ye=ue&&Q&&je(ue,Q);if(ae&&g.select("open")&&g.select("lastOpenChangeReason")===bn){g.setOpen(!1,Re(bn,K));return}if(oe&&!ae&&ye&&!B.current&&!g.select("open")&&ue&&Rs(M.current)){const Ie=()=>{!I.current&&!B.current&&!g.select("open")&&g.setOpen(!0,Re(bn,K,ue))},ce=H();ce===0?(V.clear(),Ie()):V.start(ce,Ie)}},q=g.useState("appliedTriggerProps",T||L!=="none");return it("button",t,{state:{open:w},ref:[n,E,O],props:[Y,X,q,{onMouseOver(K){te(K.nativeEvent)},onFocus(K){G(zD(K.nativeEvent))&&K.preventBaseUIHandler()},onMouseLeave(){I.current=!1,V.clear(),M.current=void 0},onPointerEnter(K){M.current=K.pointerType},onPointerDown(K){M.current=K.pointerType,g.set("closeOnClick",f),f&&!g.select("open")&&g.cancelPendingOpen(K.nativeEvent)},onClick(K){f&&!g.select("open")&&g.cancelPendingOpen(K.nativeEvent)},id:b,[tE]:R?"":void 0,[BD]:R?void 0:""},h],stateAttributesMapping:HU})}),P6=x.createContext(void 0);function HCe(){const e=x.useContext(P6);if(e===void 0)throw new Error(Wt(70));return e}const qCe=x.forwardRef(function(t,n){const{children:r,container:i,className:a,render:o,style:s,...l}=t,{node:u,subtree:f}=bH({container:i,ref:n,componentProps:t,elementProps:l});return!f&&!u?null:c.jsxs(x.Fragment,{children:[f,u&&Ni.createPortal(r,u)]})}),VCe=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Bm().useState("mounted")||r?c.jsx(P6.Provider,{value:r,children:c.jsx(qCe,{ref:n,...i})}):null}),$6=x.createContext(void 0);function D6(){const e=x.useContext($6);if(e===void 0)throw new Error(Wt(71));return e}const GCe=x.forwardRef(function(t,n){const{render:r,className:i,anchor:a,positionMethod:o="absolute",side:s="top",align:l="center",sideOffset:u=0,alignOffset:f=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:h=5,sticky:y=!1,disableAnchorTracking:m=!1,collisionAvoidance:g=gH,style:b,...v}=t,w=Bm(),S=HCe(),O=w.useState("open"),j=w.useState("mounted"),E=w.useState("trackCursorAxis"),T=w.useState("disableHoverablePopup"),A=w.useState("floatingRootContext"),C=w.useState("instantType"),_=w.useState("transitionStatus"),$=w.useState("adaptiveOrigin"),D=JC({anchor:a,positionMethod:o,floatingRootContext:A,mounted:j,side:s,sideOffset:u,align:l,alignOffset:f,collisionBoundary:d,collisionPadding:p,sticky:y,arrowPadding:h,disableAnchorTracking:m,keepMounted:S,collisionAvoidance:g,adaptiveOrigin:$}),N=x.useMemo(()=>({open:O,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:E!=="none"?"tracking-cursor":C}),[O,D.side,D.align,D.anchorHidden,E,C]),P=e_(t,N,{styles:D.positionerStyles,transitionStatus:_,props:v,refs:[n,w.useStateSetter("positionerElement")],hidden:!j,inert:!O||E==="both"||T});return c.jsx($6.Provider,{value:D,children:P})}),KCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,s=Bm(),{side:l,align:u}=D6(),f=s.useState("open"),d=s.useState("instantType"),p=s.useState("transitionStatus"),h=s.useState("popupProps"),y=s.useState("floatingRootContext"),m=s.useState("disabled"),g=s.useState("closeDelay");Md({open:f,ref:s.context.popupRef,onComplete(){var S,O;f&&((O=(S=s.context).onOpenChangeComplete)==null||O.call(S,!0))}}),FH(y,{enabled:!m,closeDelay:g});const b=s.useStateSetter("popupElement");return it("div",t,{state:{open:f,side:l,align:u,instant:d,transitionStatus:p},ref:[n,s.context.popupRef,b],props:[w0,h,P0(p),o],stateAttributesMapping:gC})}),YCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,s=Bm(),{arrowRef:l,side:u,align:f,arrowUncentered:d,arrowStyles:p}=D6(),h=s.useState("open"),y=s.useState("instantType");return it("div",t,{state:{open:h,side:u,align:f,uncentered:d,instant:y},ref:[n,l],props:[{style:p,"aria-hidden":!0},o],stateAttributesMapping:$m})}),XCe=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,a=x.useMemo(()=>({open:n,close:r}),[n,r]);return c.jsx(M6.Provider,{value:n,children:c.jsx(Cje,{delay:a,timeoutMs:i,children:t.children})})},WCe=new Set(["get","set","delete","clear"]);function QCe(e){if(typeof e!="object"||e===null||!("operation"in e)||!("hit"in e)||!("key"in e))return!1;const{operation:t,hit:n,key:r}=e;return typeof t!="string"||!WCe.has(t)||n!==null&&typeof n!="boolean"?!1:typeof r=="string"}function sp(e,t){return{label:e,variant:t,className:rA({variant:t})}}function ZCe(e){if(!QCe(e))return null;const t=typeof e.tier=="string"?` ${e.tier.toUpperCase()}`:"";if(e.operation==="set")return sp(`SET${t}`,"muted");if(e.operation==="delete")return sp("DEL","muted");if(e.operation==="clear")return sp("CLEAR","muted");if(e.hit===!0){const n=e.stale===!0;return sp(`${n?"HIT·STALE":"HIT"}${t}`,n?"warn":"good")}return e.hit===!1?sp(`MISS${t}`,"warn"):null}function I6({content:e}){const t=ZCe(e);return t===null?null:c.jsx(Dc,{variant:t.variant,children:t.label})}function JCe(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.component!="string")return null;const n=typeof t.props=="object"&&t.props!==null?t.props:{},r=typeof n.deferred=="object"&&n.deferred!==null?n.deferred:{};return{isPartial:t.isPartial===!0,versionMismatch:t.versionMismatch===!0,pageBytes:typeof t.pageBytes=="number"?t.pageBytes:0,deferred:r}}function Vg(e,t){return{label:e,variant:t,className:rA({variant:t})}}function k6(e){if(!Number.isFinite(e)||e<=0)return"0 B";if(e<1024)return`${e} B`;const t=e/1024;return t<1024?`${t.toFixed(1)} KB`:`${(t/1024).toFixed(1)} MB`}function e_e(e){const t=JCe(e);if(t===null)return[];const n=[];return t.versionMismatch&&n.push(Vg("409","bad")),t.isPartial&&n.push(Vg("partial","warn")),Object.keys(t.deferred).length>0&&n.push(Vg("deferred","brand")),n.push(Vg(k6(t.pageBytes),"muted")),n}function L6({content:e}){const t=e_e(e);return t.length===0?null:c.jsx("span",{className:"inline-flex items-center gap-1",children:t.map(n=>c.jsx(Dc,{variant:n.variant,children:n.label},n.label))})}const t_e=["resilience","workflow","auth"];function B6(e){return t_e.includes(e)}function z6(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}function pi(e){return typeof e=="string"&&e!==""?e:null}const n_e=new Set(["event","source","error","output","waits","status"]),r_e=new Set(["timeout","circuit-open","circuit-rejected","bulkhead-rejected","rate-limited","workflow-failed","workflow-compensation-failed","step-failed","signal-timed-out","mfa-failed","refresh-token-reused","magic-link-refused","session-touch-failed","denied"]);function F6(e,t){if(e==="resilience"){const n=pi(t.source);return`${pi(t.policy)??"unknown"}${n?` · ${n}`:""}`}if(e==="workflow"){const n=pi(t.step);return`${pi(t.workflow)??"unknown"}${n?` › ${n}`:""}`}if(t.source==="authorization"){const n=pi(t.policy);return`${n?`${n}.${pi(t.ability)??"?"}`:"no check declared"}${pi(t.reason)?` (${String(t.reason)})`:""}`}return pi(t.userId)??pi(t.email)??""}function i_e(e,t){const n=z6(t),r=pi(n.event)??e,i=F6(e,n);return i?`${r} ${i}`:r}function a_e(e){return typeof e=="number"&&e>1e12&&e<1e14?`${new Date(e).toISOString()} (${e})`:Array.isArray(e)?e.map(t=>String(t)).join(", "):String(e)}function o_e({type:e,content:t}){const n=z6(t),r=pi(n.event)??e,i=r_e.has(r),a=Object.entries(n).filter(([l,u])=>!n_e.has(l)&&u!==null&&u!==void 0&&(typeof u!="object"||Array.isArray(u)&&u.every(f=>typeof f!="object"))),o=n.error,s=["output","status","waits"].filter(l=>n[l]!==void 0).map(l=>[l,n[l]]);return c.jsxs("div",{"data-testid":"official-event",children:[c.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-2 font-mono text-sm text-foreground",children:[c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase ${i?"text-bad":"text-brand"}`,children:r}),c.jsx("span",{children:F6(e,n)}),pi(n.source)?c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["@nestjs/",String(n.source)]}):null]}),a.length>0?c.jsx("dl",{className:"mb-4 grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1 text-xs",children:a.map(([l,u])=>c.jsxs("div",{className:"contents",children:[c.jsx("dt",{className:"text-muted-foreground",children:l}),c.jsx("dd",{className:"break-all font-mono text-foreground",children:a_e(u)})]},l))}):null,o!=null?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Error"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-bad",children:JSON.stringify(o,null,2)})]}):null,s.map(([l,u])=>c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:l}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(u,null,2)})]},l))]})}const rd="user:";function U6(e){for(const t of e)if(t.startsWith(rd)&&t.length>rd.length)return t;return null}function i_(e){return e.slice(rd.length)}function H6(e){return`#/entries?tag=${encodeURIComponent(e)}`}const s_e=rd;function l_e(e){return e.startsWith(rd)&&e.length>rd.length}function Mb(e){const t=e.content;if(typeof t=="object"&&t!==null){const n=t;if(typeof n.uri=="string")return typeof n.method=="string"?`${n.method} ${n.uri}`:n.uri;if(typeof n.sql=="string")return n.sql;if(typeof n.queue=="string"&&typeof n.name=="string")return`${n.queue}:${n.name}`;if(e.type==="dump")return typeof n.label=="string"&&n.label.length>0?n.label:c_e(n.value);if(e.type==="event"&&typeof n.name=="string")return n.name;if(B6(e.type))return i_e(e.type,n);if(e.type==="mail"&&typeof n.status=="string"){const r=typeof n.subject=="string"?n.subject:"(no subject)";return`[${n.status}] ${r}`}if(e.type==="model"&&typeof n.action=="string"){const r=typeof n.entity=="string"?n.entity:"",i=n.id===null||n.id===void 0?"":`#${String(n.id)}`;return`${n.action} ${r}${i}`}if(e.type==="redis"&&typeof n.command=="string")return`${n.command} ${u_e(n.args)}`.trim();if(e.type==="inertia"&&typeof n.component=="string"){const r=typeof n.method=="string"?n.method:"",i=n.isPartial===!0?" (partial)":"";return`${r} → ${n.component}${i}`.trim()}if(e.type==="log"&&typeof n.message=="string")return`[${typeof n.level=="string"?n.level:"log"}] ${n.message}`;if(typeof n.message=="string")return n.message;if(typeof n.url=="string")return typeof n.method=="string"?`${n.method} ${n.url}`:n.url}return e.type}function u_e(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.map(n=>typeof n=="string"?n:String(n)).join(" ");return t.length>60?`${t.slice(0,60)}…`:t}function c_e(e){if(typeof e=="string")return e;let t;try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>80?`${t.slice(0,80)}…`:t}function q6({entries:e,onSelect:t}){return c.jsxs(il,{className:"text-left",children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{className:"py-2.5 pr-3 pl-4",children:"Time"}),c.jsx(_e,{className:"px-3",children:"Type"}),c.jsx(_e,{className:"px-3",children:"Summary"}),c.jsx(_e,{className:"px-3 text-right",children:"Duration"}),c.jsx(_e,{className:"hidden pr-4 pl-3 md:table-cell",children:"Tags"})]})}),c.jsx(ol,{children:e.map(n=>{const r=U6(n.tags),i=n.tags.filter(a=>a!==r);return c.jsxs(Dn,{onClick:()=>t==null?void 0:t(n.id),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(t==null||t(n.id))},className:"cursor-pointer transition-colors hover:bg-hover",children:[c.jsx(Me,{className:"py-2 pr-3 pl-4 align-middle font-mono whitespace-nowrap tabular-nums text-faint",children:new Date(n.createdAt).toLocaleTimeString()}),c.jsx(Me,{className:"px-3 py-2 align-middle whitespace-nowrap text-fg-2",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:`size-[7px] shrink-0 rounded-full ${px(n.type)}`,"aria-hidden":"true"}),n.type]})}),c.jsx(Me,{className:"max-w-md truncate px-3 py-2 align-middle font-mono text-foreground",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.type==="cache"?c.jsx(I6,{content:n.content}):null,n.type==="inertia"?c.jsx(L6,{content:n.content}):null,c.jsx("span",{className:"truncate",children:Mb(n)})]})}),c.jsx(Me,{className:"px-3 py-2 text-right align-middle font-mono whitespace-nowrap tabular-nums text-fg-2",children:n.durationMs!=null?`${n.durationMs}ms`:"—"}),c.jsx(Me,{className:"hidden py-2 pr-4 pl-3 align-middle font-mono text-[11px] text-faint md:table-cell",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.traceId!==null&&c.jsxs("a",{href:`#/traces/${n.traceId}`,title:`View trace ${n.traceId}`,onClick:a=>a.stopPropagation(),className:"rounded border border-brand-border bg-brand-soft px-1.5 py-0.5 font-mono text-[10px] text-brand hover:bg-panel-2",children:["trace:",n.traceId.slice(0,6)]}),r!==null&&c.jsx("a",{href:H6(r),title:`View all activity for user ${i_(r)}`,onClick:a=>a.stopPropagation(),className:"rounded border border-good/25 bg-good/10 px-1.5 py-0.5 font-mono text-[10px] text-good hover:bg-good/15",children:r}),i.length>0&&c.jsx("span",{children:i.join(" ")})]})})]},n.id)})})]})}function f_e({batch:e,currentId:t,onSelect:n}){return c.jsx("ol",{className:"space-y-1",children:[...e].sort((r,i)=>r.sequence-i.sequence).map(r=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(r.id),className:`flex w-full justify-between gap-4 px-2 py-1 text-left text-xs ${r.id===t?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel"}`,children:[c.jsxs("span",{children:[c.jsx("span",{className:"text-brand",children:r.type})," ",Mb(r)]}),c.jsx("span",{className:"text-muted-foreground",children:r.durationMs!=null?`${r.durationMs}ms`:""})]})},r.id))})}const d_e={request:"bg-sky-500",query:"bg-amber-500",http_client:"bg-violet-500",job:"bg-emerald-500",cache:"bg-teal-500",exception:"bg-rose-500",event:"bg-indigo-500",log:"bg-zinc-500",mail:"bg-pink-500",redis:"bg-red-500"};function p_e(e){return d_e[e]??"bg-zinc-600"}function _v(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function h_e(e){const t=[],n=r=>{for(const i of r)t.push(i),i.children.length>0&&n(i.children)};return n(e),t}function m_e({span:e,totalDurationMs:t,onSelect:n}){const r=t>0?t:1,i=Math.min(100,e.offsetMs/r*100),a=Math.max(.5,Math.min(100-i,e.durationMs/r*100));return c.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(e.id),"data-testid":"waterfall-row",className:"flex w-full items-center gap-2 rounded px-1 py-0.5 text-left text-[11px] hover:bg-panel-2",children:[c.jsxs("span",{className:"min-w-0 flex-shrink-0 truncate font-mono text-foreground",style:{width:"40%",paddingLeft:`${e.depth*12}px`},title:e.label,children:[c.jsx("span",{className:"mr-1 text-muted-foreground",children:e.type}),e.label]}),c.jsx("span",{className:"relative h-3 flex-1 rounded bg-panel",children:c.jsx("span",{className:`absolute top-0 h-3 rounded ${p_e(e.type)}`,style:{left:`${i}%`,width:`${a}%`},title:`${_v(e.offsetMs)} +${_v(e.durationMs)}`})}),c.jsx("span",{className:"w-16 flex-shrink-0 text-right tabular-nums text-muted-foreground",children:_v(e.durationMs)})]})}function g_e({waterfall:e,onSelect:t}){const n=h_e(e.spans);return n.length===0?c.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):c.jsxs("div",{className:"space-y-0.5",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx("span",{children:"Span"}),c.jsxs("span",{children:["Total ",_v(e.totalDurationMs)]})]}),n.map(r=>c.jsx(m_e,{span:r,totalDurationMs:e.totalDurationMs,onSelect:t},r.id))]})}function v_e(e,t=.002){const n=e.totalMs>0?e.totalMs:1,r=[],i=(a,o,s,l,u)=>{if(l<t)return;r.push({key:u,node:a,depth:o,x:s,width:l});const f=[...a.children].sort((p,h)=>h.totalMs-p.totalMs);let d=s;for(let p=0;p<f.length;p++){const h=f[p];if(h===void 0)continue;const y=h.totalMs/n*1;i(h,o+1,d,y,`${u}.${p}`),d+=y}};return i(e,0,0,1,"0"),r}function y_e(e){return e.reduce((t,n)=>Math.max(t,n.depth),0)+1}function b_e(e){let t=0;for(let a=0;a<e.length;a++)t=t*31+e.charCodeAt(a)|0;const n=Math.abs(t)%46,r=55+Math.abs(t>>8)%25,i=45+Math.abs(t>>16)%12;return`hsl(${n}, ${r}%, ${i}%)`}function tm(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}const v1=18;function x_e({tree:e}){const[t,n]=x.useState("0"),r=x.useMemo(()=>v_e(e),[e]),i=y_e(r),a=r.find(d=>d.key===t)??r[0],o=(a==null?void 0:a.x)??0,s=(a==null?void 0:a.width)??1,l=(a==null?void 0:a.depth)??0;if(e.totalMs<=0||r.length===0)return c.jsx("div",{className:"flex h-24 items-center justify-center aviary-surface rounded-lg border border-border text-xs text-muted-foreground",children:"No samples — the capture was empty."});const u=r.filter(d=>d.key===t||d.key.startsWith(`${t}.`)),f=i-l;return c.jsxs("div",{children:[t!=="0"&&c.jsx("button",{type:"button",onClick:()=>n("0"),className:"mb-2 rounded border border-line px-2 py-0.5 text-[10px] text-foreground hover:bg-panel-2",children:"← Reset zoom"}),c.jsx("div",{"data-testid":"flamegraph",className:"relative w-full overflow-hidden rounded-lg border border-line bg-background",style:{height:f*v1+2},children:u.map(d=>{const p=(d.x-o)/s*100,h=d.width/s*100,y=(d.depth-l)*v1,m=(d.node.totalMs/e.totalMs*100).toFixed(1);return c.jsx("button",{type:"button",onClick:()=>n(d.key),title:`${d.node.name}${d.node.file?` — ${d.node.file}`:""}
|
|
164
|
+
total ${tm(d.node.totalMs)} (${m}%) · self ${tm(d.node.selfMs)}`,className:"absolute flex items-center overflow-hidden border border-line-soft/60 px-1 text-left text-[10px] leading-none text-black/80 hover:brightness-110",style:{left:`${p}%`,width:`${h}%`,top:y,height:v1-1,background:d.node.name==="(root)"?"var(--line)":b_e(d.node.name)},children:c.jsx("span",{className:"truncate",style:d.node.name==="(root)"?{color:"var(--text)"}:{},children:d.node.name})},d.key)})})]})}function V6(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}async function w_e(e){var r;const t=V6(e),n=(r=globalThis.navigator)==null?void 0:r.clipboard;if(!(n!=null&&n.writeText))return!1;try{return await n.writeText(t),!0}catch{return!1}}function a_(e,t){const n=V6(t),r=new Blob([n],{type:"application/json"}),i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}const FD="rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground";function S_e({value:e,filename:t}){const[n,r]=x.useState(!1);async function i(){await w_e(e)&&(r(!0),setTimeout(()=>r(!1),1500))}return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:i,className:FD,children:n?"Copied":"Copy JSON"}),c.jsx("button",{type:"button",onClick:()=>a_(t,e),className:FD,children:"Download JSON"})]})}function O_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.component=="string"?t.component:"",r=typeof t.method=="string"?t.method:"",i=typeof t.url=="string"?t.url:"",a=typeof t.statusCode=="number"?t.statusCode:null,o=t.isPartial===!0,s=t.versionMismatch===!0,l=typeof t.assetVersion=="string"?t.assetVersion:null,u=typeof t.clientVersion=="string"?t.clientVersion:null,f=t.encryptHistory===!0,d=t.clearHistory===!0,p=typeof t.pageBytes=="number"?t.pageBytes:0,h=t.ssr===!0,y=j_e(t.partial),m=E_e(t.props),g=T_e([...y.except,...m.excludedKeys]),b=[{label:"Shared",keys:m.sharedKeys,accent:"text-info"},{label:"Final",keys:m.finalKeys,accent:"text-foreground"},{label:"Optional",keys:m.optionalKeys,accent:"text-violet"},{label:"Once",keys:m.onceKeys,accent:"text-brand"},{label:"Merge",keys:m.merge,accent:"text-teal",annotations:m.matchPropsOn},{label:"Deep-merge",keys:m.deepMerge,accent:"text-teal",annotations:m.matchPropsOn},{label:"Prepend",keys:m.prepend,accent:"text-teal",annotations:m.matchPropsOn},{label:"Rescued",keys:m.rescued,accent:"text-bad"}];return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex flex-wrap items-center gap-2 font-mono text-sm text-info",children:[r?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:r}):null,i?c.jsx("span",{className:"text-muted-foreground",children:i}):null,c.jsx("span",{className:"text-muted-foreground",children:"→"}),c.jsx("span",{className:"text-foreground",children:n}),a!==null?c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] ${a===409?"text-bad":"text-muted-foreground"}`,children:a}):null,o?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"partial"}):null,l?c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["asset ",l]}):null]}),s?c.jsxs("div",{className:"mb-4 rounded border border-bad tint-bad p-3 text-xs text-bad",children:["Version mismatch: client ",c.jsx("code",{className:"font-mono",children:u??"unknown"})," ≠ server ",c.jsx("code",{className:"font-mono",children:l??"unknown"})," → 409 forced full reload."]}):null,o?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Partial reload"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(UD,{label:"Kept",keys:y.only,accent:"text-brand"}),c.jsx(UD,{label:"Excluded",keys:g,accent:"text-bad"})]}),y.reset.length>0||y.resetOnce.length>0||y.exceptOnce.length>0?c.jsxs("div",{className:"mt-2 flex flex-wrap gap-3",children:[c.jsx(Gg,{label:"reset",keys:y.reset,accent:"text-warn"}),c.jsx(Gg,{label:"reset-once",keys:y.resetOnce,accent:"text-warn"}),c.jsx(Gg,{label:"except-once",keys:y.exceptOnce,accent:"text-warn"})]}):null]}):null,c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Props"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:b.map(v=>x.createElement(Gg,{...v,key:v.label}))})]}),Object.keys(m.deferred).length>0?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Deferred"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(m.deferred).map(([v,w])=>c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsxs("span",{className:"font-mono text-[11px] text-violet",children:[v,":"]}),w.map(S=>c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:S},S))]},v))})]}):null,Object.keys(m.once).length>0?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Once cache"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(m.once).map(([v,w])=>c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-brand",children:v}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["→ ",w.prop]}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:w.expiresAt==null?"no expiry":`expires ${w.expiresAt}`})]},v))})]}):null,Object.keys(m.scroll).length>0?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Scroll"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(m.scroll).map(([v,w])=>c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-teal",children:v}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["page «",w.pageName,"»"]}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[y1(w.previousPage)," ← ",y1(w.currentPage)," →"," ",y1(w.nextPage)]}),w.reset?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"reset"}):null]},v))})]}):null,c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Resolved props"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.resolvedProps)})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx(HD,{label:"encryptHistory",on:f}),c.jsx(HD,{label:"clearHistory",on:d}),c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:k6(p)}),c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["SSR: ",h?"yes":"no"]})]})]})}function j_e(e){const t=typeof e=="object"&&e!==null?e:{};return{only:Rr(t.only),except:Rr(t.except),reset:Rr(t.reset),resetOnce:Rr(t.resetOnce),exceptOnce:Rr(t.exceptOnce)}}function E_e(e){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.deferred=="object"&&t.deferred!==null?t.deferred:{},r={};if(typeof t.matchPropsOn=="object"&&t.matchPropsOn!==null)for(const[o,s]of Object.entries(t.matchPropsOn))r[o]=Array.isArray(s)?s.join(", "):String(s);const i=typeof t.once=="object"&&t.once!==null?t.once:{},a=typeof t.scroll=="object"&&t.scroll!==null?t.scroll:{};return{sharedKeys:Rr(t.sharedKeys),finalKeys:Rr(t.finalKeys),deferred:n,merge:Rr(t.merge),deepMerge:Rr(t.deepMerge),prepend:Rr(t.prepend),matchPropsOn:r,optionalKeys:Rr(t.optionalKeys),onceKeys:Rr(t.onceKeys),once:i,scroll:a,rescued:Rr(t.rescued),excludedKeys:Rr(t.excludedKeys)}}function Rr(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function y1(e){return e==null?"∅":String(e)}function T_e(e){return[...new Set(e)]}function Gg({label:e,keys:t,accent:n,annotations:r}){return t.length===0?null:c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"w-20 shrink-0 text-[11px] text-muted-foreground",children:e}),t.map(i=>{const a=r==null?void 0:r[i];return c.jsxs("span",{className:`rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] ${n}`,children:[i,a?c.jsxs("span",{className:"text-muted-foreground",children:[" · ",a]}):null]},i)})]})}function UD({label:e,keys:t,accent:n}){return c.jsxs("div",{className:"rounded bg-panel p-2",children:[c.jsx("div",{className:"mb-1.5 text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),t.length>0?c.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>c.jsx("span",{className:`font-mono text-[10px] ${n}`,children:r},r))}):c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"—"})]})}function HD({label:e,on:t}){return c.jsxs("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] ${t?"text-brand":"text-muted-foreground"}`,children:[e,": ",t?"on":"off"]})}const A_e=50;function C_e({batch:e,requestId:t,onSelect:n}){const r=[...e].sort((s,l)=>s.sequence-l.sequence),i=r.reduce((s,l)=>l.durationMs!=null&&l.durationMs>s?l.durationMs:s,0),a=r.slice(0,A_e),o=r.length-a.length;return c.jsxs("div",{children:[c.jsx("ol",{className:"space-y-1",children:a.map(s=>c.jsx("li",{children:c.jsx(__e,{entry:s,maxDuration:i,isRequest:s.id===t,onSelect:n})},s.id))}),o>0?c.jsxs("p",{className:"mt-1 px-2 text-[10px] text-muted-foreground",children:["+",o," more"]}):null]})}function __e({entry:e,maxDuration:t,isRequest:n,onSelect:r}){const i=t>0&&e.durationMs!=null?e.durationMs/t:0,a=Math.max(0,Math.min(100,i*100));return c.jsxs("button",{type:"button",onClick:o=>{o.stopPropagation(),r==null||r(e.id)},className:`flex w-full items-center gap-2 rounded px-2 py-1 text-left text-xs ${n?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel"}`,children:[c.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${px(e.type)}`,"aria-hidden":!0}),c.jsx("span",{className:"w-40 shrink-0 truncate",title:Mb(e),children:Mb(e)}),c.jsx("span",{className:"h-2 flex-1 overflow-hidden rounded bg-panel",children:c.jsx("span",{className:"block h-full rounded bg-brand",style:{width:`${a}%`},"aria-hidden":!0})}),c.jsx("span",{className:"w-12 shrink-0 text-right tabular-nums text-muted-foreground",children:e.durationMs!=null?`${e.durationMs}ms`:"—"})]})}function N_e(e,t,n){return e?e.replaceAll("{traceId}",t).replaceAll("{spanId}",n):null}function R_e({entry:e,onSelect:t}){var a,o;const{data:n}=Ks(),r=e.type==="request"&&e.batch.length>1,i=U6(e.tags);return c.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[c.jsxs("section",{className:"col-span-2",children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[c.jsxs("h2",{className:"flex items-center gap-2 text-sm text-brand",children:[e.type,e.type==="cache"?c.jsx(I6,{content:e.content}):null,e.type==="inertia"?c.jsx(L6,{content:e.content}):null]}),c.jsx(S_e,{value:e,filename:`telescope-entry-${e.id}.json`})]}),r?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Timeline"}),c.jsx(C_e,{batch:e.batch,requestId:e.id,onSelect:t})]}):null,e.type==="dump"?c.jsx(P_e,{content:e.content}):e.type==="event"?c.jsx(D_e,{content:e.content}):e.type==="log"?c.jsx(H_e,{content:e.content}):e.type==="model"?c.jsx(k_e,{content:e.content}):e.type==="redis"?c.jsx(L_e,{content:e.content}):e.type==="inertia"?c.jsx(O_e,{content:e.content}):e.type==="client_exception"?c.jsxs(c.Fragment,{children:[c.jsx(B_e,{content:e.content}),c.jsx(VD,{entryId:e.id,aiEnabled:((a=n==null?void 0:n.ai)==null?void 0:a.enabled)??!1})]}):e.type==="exception"?c.jsxs(c.Fragment,{children:[c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(e.content,null,2)}),c.jsx(VD,{entryId:e.id,aiEnabled:((o=n==null?void 0:n.ai)==null?void 0:o.enabled)??!1})]}):e.type==="request"?c.jsx(F_e,{content:e.content}):B6(e.type)?c.jsx(o_e,{type:e.type,content:e.content}):e.type==="query"?c.jsx(U_e,{entryId:e.id,content:e.content,explainEnabled:(n==null?void 0:n.explainEnabled)??!1}):c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(e.content,null,2)})]}),c.jsxs("aside",{children:[i!==null?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"User"}),c.jsx("div",{className:"font-mono text-[11px] text-foreground",children:i_(i)}),c.jsx("a",{href:H6(i),className:"mt-1 inline-block text-[11px] text-brand hover:underline",children:"View all activity for this user"})]}):null,e.traceId?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Trace"}),c.jsx(q_e,{traceId:e.traceId,spanId:e.spanId,traceLink:(n==null?void 0:n.traceLink)??null})]}):null,c.jsx(M_e,{entry:e}),c.jsxs("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:["Batch (",e.batch.length,")"]}),c.jsx(f_e,{batch:e.batch,currentId:e.id,onSelect:t})]})]})}function M_e({entry:e}){const t=[];if(e.familyHash&&t.push({label:`All ${e.type} like this`,href:`#/entries/${encodeURIComponent(e.type)}?familyHash=${encodeURIComponent(e.familyHash)}`}),e.type!=="request"){const n=e.batch.find(r=>r.type==="request"&&r.id!==e.id);n&&t.push({label:"Originating request",href:`#/entries/view/${n.id}`})}return e.type==="job"&&t.push({label:"Open queue console",href:"#/queues"}),t.length===0?null:c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Related"}),c.jsx("div",{className:"flex flex-col gap-1",children:t.map(n=>c.jsxs("a",{href:n.href,className:"text-[11px] text-brand hover:underline",children:[n.label," →"]},`${n.href}:${n.label}`))})]})}function Yi(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function P_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.label=="string"?t.label:null;return c.jsxs("div",{children:[n?c.jsx("h3",{className:"mb-2 font-mono text-sm text-brand",children:n}):null,c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.value)})]})}function $_e(e){switch(e){case"error":return"text-bad";case"warn":return"text-warn";case"debug":case"verbose":return"text-muted-foreground";default:return"text-foreground"}}function D_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.name=="string"?t.name:String(t.name??""),r=typeof t.listenerCount=="number"?t.listenerCount:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-violet",children:[n,r!==null?c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[r," listener",r===1?"":"s"]}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.payload)})]})}function I_e(e){switch(e){case"create":return"text-brand";case"update":return"text-warn";case"delete":return"text-bad";default:return"text-foreground"}}function k_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.action=="string"?t.action:"update",r=typeof t.entity=="string"?t.entity:String(t.entity??""),i=t.id===null||t.id===void 0?null:String(t.id);return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-good",children:[c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase ${I_e(n)}`,children:n}),c.jsx("span",{children:r}),i!==null?c.jsxs("span",{className:"text-muted-foreground",children:["#",i]}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.changes)})]})}function L_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.command=="string"?t.command:String(t.command??""),r=typeof t.durationMs=="number"?t.durationMs:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-bad",children:[n,r!==null?c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[r," ms"]}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.args)})]})}function qD({label:e,value:t}){return c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs leading-relaxed text-foreground",children:t})]})}function B_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.name=="string"?t.name:null,r=typeof t.message=="string"?t.message:String(t.message??""),i=typeof t.url=="string"?t.url:null,a=typeof t.userAgent=="string"?t.userAgent:null,o=typeof t.release=="string"?t.release:null,s=typeof t.stack=="string"?t.stack:null,l=typeof t.componentStack=="string"?t.componentStack:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-2 font-mono text-sm text-warn",children:[n?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:n}):null,c.jsx("span",{className:"text-foreground",children:r}),o?c.jsx("span",{className:"text-[10px] text-muted-foreground",children:o}):null]}),i?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"URL"}),c.jsx("div",{className:"break-all font-mono text-xs text-foreground",children:i})]}):null,a?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"User agent"}),c.jsx("div",{className:"break-all font-mono text-[11px] text-muted-foreground",children:a})]}):null,s?c.jsx(qD,{label:"Stack",value:s}):null,l?c.jsx(qD,{label:"Component stack",value:l}):null,G6(t.extra)?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Extra"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.extra)})]}):null]})}function G6(e){return e==null?!1:Array.isArray(e)?e.length>0:typeof e=="object"?Object.keys(e).length>0:!0}function z_e({headers:e}){const t=Object.entries(e);return c.jsxs("details",{className:"mb-4",children:[c.jsxs("summary",{className:"cursor-pointer text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:["Headers (",t.length,")"]}),c.jsx("dl",{className:"mt-2 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 rounded bg-panel p-3 text-xs",children:t.map(([n,r])=>c.jsxs("div",{className:"contents",children:[c.jsx("dt",{className:"font-mono text-muted-foreground",children:n}),c.jsx("dd",{className:"break-all font-mono text-foreground",children:typeof r=="string"?r:Yi(r)})]},n))})]})}function F_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.headers=="object"&&t.headers!==null?t.headers:{},r=typeof t.method=="string"?t.method:String(t.method??""),i=typeof t.uri=="string"?t.uri:String(t.uri??""),a=typeof t.statusCode=="number"?t.statusCode:null,o=typeof t.ip=="string"?t.ip:null,s="user"in t&&t.user!==null&&t.user!==void 0;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-3 flex items-center gap-2 font-mono text-sm text-brand",children:[c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:r}),c.jsx("span",{className:"text-foreground",children:i}),a!==null?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:a}):null,o?c.jsx("span",{className:"text-[10px] text-muted-foreground",children:o}):null]}),c.jsx(z_e,{headers:n}),c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Payload"}),G6(t.payload)?c.jsx("pre",{className:"mb-4 overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.payload)}):c.jsx("p",{className:"mb-4 text-xs text-muted-foreground",children:"No payload"}),c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"User"}),s?c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.user)}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"anonymous"})]})}function U_e({entryId:e,content:t,explainEnabled:n}){const r=typeof t=="object"&&t!==null?t:{},i=typeof r.sql=="string"?r.sql:String(r.sql??""),a=r.slow===!0,o=fX(),s=o.data;async function l(){try{await o.mutateAsync(e)}catch{}}return c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[c.jsxs("h3",{className:"flex items-center gap-2 font-mono text-sm text-info",children:["query",a?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"slow"}):null]}),n?c.jsx("button",{type:"button",onClick:l,disabled:o.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:o.isPending?"Explaining…":"Explain"}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:i}),Array.isArray(r.bindings)&&r.bindings.length>0?c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"mt-3 mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Bindings"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(r.bindings)})]}):null,o.isPending?c.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Running EXPLAIN…"}):s===void 0?null:s.ok?c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"mt-3 mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Query plan"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(s.plan)})]}):c.jsx("p",{className:"mt-3 rounded bg-panel p-3 text-xs text-bad",children:s.message})]})}function H_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.level=="string"?t.level:"log",r=typeof t.message=="string"?t.message:String(t.message??""),i=typeof t.context=="string"?t.context:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm",children:[c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] uppercase ${$_e(n)}`,children:n}),i?c.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:i}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:r})]})}function q_e({traceId:e,spanId:t,traceLink:n}){const r=N_e(n,e,t??"");return c.jsxs("div",{children:[r?c.jsx("a",{href:r,target:"_blank",rel:"noreferrer",className:"font-mono text-[11px] text-brand hover:underline",children:e}):c.jsx("div",{className:"font-mono text-[11px] text-foreground",children:e}),t?c.jsx("div",{className:"font-mono text-[10px] text-muted-foreground",children:t}):null,c.jsx("a",{href:`#/traces/${e}`,className:"mt-1 inline-block text-[11px] text-brand hover:underline",children:"View all in this trace"})]})}function VD({entryId:e,aiEnabled:t}){const n=dX(),r=hX(e,t),[i,a]=x.useState(null);if(!t)return null;async function o(p){try{const h=await n.mutateAsync({entryId:e,force:p});a(h)}catch{a({ok:!1,message:"Diagnosis request failed."})}}const s=r.data??null,l=i,u=l!==null?l.ok===!0&&l.cached:s!==null,f=l!==null?l.ok===!0:s!==null,d=l===null&&r.isLoading;return c.jsxs("div",{className:"mt-4 rounded border border-line p-3",children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[c.jsxs("h3",{className:"flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:["AI diagnosis",u?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] normal-case text-warn",children:"cached"}):null]}),c.jsx("div",{className:"flex items-center gap-2",children:d?null:f?c.jsx("button",{type:"button",onClick:()=>o(!0),disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Re-running…":"Re-run"}):c.jsx("button",{type:"button",onClick:()=>o(!1),disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-brand hover:border-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Diagnosing…":"Diagnose with AI"})})]}),n.isPending?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Asking the model…"}):d?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Checking for an existing diagnosis…"}):l!==null?l.ok?c.jsx(GD,{source:l.markdown}):c.jsx("p",{className:"rounded bg-panel p-3 text-xs text-bad",children:l.message}):s!==null?c.jsx(GD,{source:s.markdown}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Get an AI-generated probable cause, where to look, and a suggested fix."})]})}function V_e(e){const t=[];let n=[],r=[],i=0;const a=()=>`block-${i++}`;function o(){n.length!==0&&(t.push({id:a(),kind:"paragraph",text:n.join(`
|
|
165
|
+
`)}),n=[])}function s(){r.length!==0&&(t.push({id:a(),kind:"bullets",items:r}),r=[])}for(const l of e.split(`
|
|
166
|
+
`)){const u=l.trimEnd();/^#{1,6}\s+/.test(u)?(o(),s(),t.push({id:a(),kind:"heading",text:u.replace(/^#{1,6}\s+/,"")})):/^[-*]\s+/.test(u)?(o(),r.push({id:a(),text:u.replace(/^[-*]\s+/,"")})):u.trim()===""?(o(),s()):(s(),n.push(u))}return o(),s(),t}function GD({source:e}){const t=V_e(e);return c.jsx("div",{className:"rounded bg-panel p-3",children:t.map(n=>n.kind==="heading"?c.jsx("h4",{className:"mt-3 mb-1 text-xs font-semibold text-brand",children:n.text},n.id):n.kind==="bullets"?c.jsx("ul",{className:"ml-4 list-disc text-xs leading-relaxed text-foreground",children:n.items.map(r=>c.jsx("li",{children:r.text},r.id))},n.id):c.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground",children:n.text},n.id))})}const G_e=["id","type","createdAt","durationMs","tags","familyHash","traceId","content"];function KD(e){return/[",\r\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function K_e(e){if(e==null)return"";try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Y_e(e){return[e.id,e.type,e.createdAt,e.durationMs===null?"":String(e.durationMs),e.tags.join("; "),e.familyHash??"",e.traceId??"",K_e(e.content)]}function X_e(e){const t=[G_e.map(KD).join(",")];for(const n of e)t.push(Y_e(n).map(KD).join(","));return t.join(`\r
|
|
167
|
+
`)}function W_e(e,t){const n=new Blob([t],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=e,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}const wE=1e3,SE=60*wE,OE=60*SE,YD=24*OE;function Gp(e){return e>=YD?`${Math.round(e/YD)}d`:e>=OE?`${Math.round(e/OE)}h`:e>=SE?`${Math.round(e/SE)}m`:e>=wE?`${Math.round(e/wE)}s`:`${e}ms`}function Q_e(e){for(const[t,n]of Object.entries(e))if(n<1)return`${t} sampled @ ${Math.round(n*100)}%`;return null}function Z_e(){const{data:e}=Ks();if(!e)return null;const t=Q_e(e.sampling??{});return c.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",title:t??void 0,children:[c.jsx("span",{className:"uppercase tracking-[0.12em] text-faint",children:"retention:"}),e.retention?c.jsx("span",{className:"text-muted-foreground",children:Gp(e.retention.afterMs)}):c.jsx("span",{className:"text-muted-foreground",children:"none"}),t?c.jsx("span",{"aria-label":t,className:"cursor-help rounded-full border border-line px-1 text-[9px] text-muted-foreground",children:"?"}):null]})}const K6={request:"#34d399",query:"#38bdf8",job:"#a78bfa",exception:"#f87171",http_client:"#fbbf24",mail:"#f472b6"},XD=["#71717a","#a1a1aa","#22d3ee","#c084fc","#fb923c","#4ade80"],WD=["#34d399","#fbbf24","#f87171","#38bdf8","#a78bfa"],Y6="var(--aviary-accent-ink, var(--accent))";function J_e(e,t=0){const n=XD[t%XD.length];return K6[e]??n??"#71717a"}function b1(e,t,n){if(n)return n;const r=WD[t%WD.length];return K6[e]??r??"#71717a"}function Pd(e,t,n){const r={};return e.forEach((i,a)=>{r[i]={label:(n==null?void 0:n(i))??i,color:t(i,a)}}),r}function zm(e){return{label:e.label,...e.series!==void 0?{series:e.series}:{},...e.id!==void 0?{id:e.id}:{},...e.value!==void 0?{value:e.value}:{}}}function eNe(e){return typeof e=="object"&&e!==null}function X6(e){if(!eNe(e))return;const t=e.activeLabel;return typeof t=="string"&&t.length>0?t:typeof t=="number"?String(t):void 0}function Ms({title:e,right:t,height:n=220,children:r}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("header",{className:"-mx-4 -mt-4 mb-3 flex items-center justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),t]}),c.jsx("div",{style:{height:n},children:r})]})}function Fm({height:e}){return c.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",style:e===void 0?void 0:{height:e},children:"No data in window."})}const tNe=24;function ku({title:e,data:t,right:n,color:r=Y6,valueLabel:i="value",height:a=220,brush:o,valueFormatter:s,onSelect:l}){const u=x.useId(),f=a-64,d=x.useMemo(()=>Pd(["value"],()=>r,()=>i),[r,i]),p=o??t.length>=tNe,h=l?{onClick:y=>{const m=X6(y);if(m===void 0)return;const g=t.find(b=>b.label===m);l(zm({label:m,series:"value",value:g==null?void 0:g.value}))},className:"cursor-pointer"}:{};return c.jsx(Ms,{title:e,right:n,height:f,children:t.length===0?c.jsx(Fm,{height:f}):c.jsx(pu,{config:d,children:c.jsxs(jU,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...h,children:[c.jsx("defs",{children:c.jsxs("linearGradient",{id:u,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:oo("value"),stopOpacity:.35}),c.jsx("stop",{offset:"100%",stopColor:oo("value"),stopOpacity:0})]})}),c.jsx(Mm,{vertical:!1}),c.jsx(So,{dataKey:"label",tickLine:!1,minTickGap:24}),c.jsx(Oo,{tickLine:!1,width:52,allowDecimals:!1}),c.jsx(Xf,{cursor:{stroke:"var(--line)"},content:c.jsx(Wf,{...s?{valueFormatter:y=>s(y)}:{}})}),c.jsx(Io,{type:"monotone",dataKey:"value",name:i,stroke:oo("value"),strokeWidth:2,fill:`url(#${u})`,isAnimationActive:!1,dot:!1,activeDot:{r:3}}),p&&c.jsx(Bs,{...AU,dataKey:"label"})]})})})}const nNe=24;function $0({title:e,data:t,series:n,right:r,height:i=240,brush:a,onSelect:o,colors:s}){const l=i-64,u=x.useMemo(()=>Pd(n,(m,g)=>(s==null?void 0:s[m])??J_e(m,g)),[n,s]),{hidden:f,toggle:d,isHidden:p}=jOe(),h=a??t.length>=nNe,y=o?{onClick:m=>{const g=X6(m);g!==void 0&&o(zm({label:g}))},className:"cursor-pointer"}:{};return c.jsx(Ms,{title:e,right:r,height:l,children:t.length===0||n.length===0?c.jsx(Fm,{height:l}):c.jsx(pu,{config:u,children:c.jsxs(jU,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...y,children:[c.jsx(Mm,{vertical:!1}),c.jsx(So,{dataKey:"label",tickLine:!1,minTickGap:24}),c.jsx(Oo,{tickLine:!1,width:52,allowDecimals:!1}),c.jsx(Xf,{cursor:{stroke:"var(--line)"},content:c.jsx(Wf,{})}),c.jsx(Kj,{content:c.jsx(Xj,{hidden:f,onToggle:d})}),n.map(m=>c.jsx(Io,{type:"monotone",dataKey:m,name:m,stackId:"1",stroke:oo(m),strokeWidth:1.5,fill:oo(m),fillOpacity:.25,hide:p(m),isAnimationActive:!1},m)),h&&c.jsx(Bs,{...AU,dataKey:"label"})]})})})}function rNe(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function Wl({title:e,data:t,right:n,color:r=Y6,valueLabel:i="value",height:a=220,horizontal:o=!1,truncateLabel:s,valueFormatter:l,onSelect:u}){const f=a-64,d=x.useMemo(()=>Pd(["value"],()=>r,()=>i),[r,i]);function p(g,b){const v=t[b];v&&(u==null||u(zm({label:v.label,id:v.id,value:v.value})))}const h=s!==void 0?{tickFormatter:g=>rNe(g,s)}:{},m=u!==void 0?{onClick:p,cursor:"pointer"}:{};return c.jsx(Ms,{title:e,right:n,height:f,children:t.length===0?c.jsx(Fm,{height:f}):c.jsx(pu,{config:d,children:c.jsxs(dC,{data:t,layout:o?"vertical":"horizontal",margin:{top:4,right:8,bottom:0,left:o?8:-16},children:[c.jsx(Mm,{horizontal:!o,vertical:o}),o?c.jsx(So,{type:"number",tickLine:!1,allowDecimals:!1}):c.jsx(So,{dataKey:"label",tickLine:!1,interval:0,...h}),o?c.jsx(Oo,{type:"category",dataKey:"label",tickLine:!1,width:160,interval:0,...h}):c.jsx(Oo,{tickLine:!1,width:52,allowDecimals:!1}),c.jsx(Xf,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:c.jsx(Wf,{...l?{valueFormatter:g=>l(g)}:{}})}),c.jsx(Do,{dataKey:"value",name:i,fill:oo("value"),radius:o?[0,3,3,0]:[3,3,0,0],isAnimationActive:!1,...m,children:t.map(g=>c.jsx(Td,{fill:g.color??oo("value")},g.id??g.label))})]})})})}const W6=["waiting","active","delayed","failed","completed","paused"],Q6={waiting:"text-foreground",active:"text-brand",delayed:"text-warn",failed:"text-bad",completed:"text-good",paused:"text-muted-foreground"};function Lo(e){if(e==null)return"—";const t=Date.now()-e;if(t<0)return"just now";const n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}const iNe="1h";function aNe(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Um(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:aNe(t.t),value:t.total}))}function ir({label:e,value:t,accent:n="text-foreground"}){return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border px-4 py-3",children:[c.jsx("p",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${n}`,children:t})]})}function Hm({children:e}){return c.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:e})}function o_({children:e}){return c.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:e})}function oNe(e){return e.map(t=>({label:t.label!==""?t.label:t.familyHash.slice(0,12),value:t.p99,id:t.familyHash}))}function sNe(e){return[{label:"2xx",value:e["2xx"],color:"var(--good)"},{label:"3xx",value:e["3xx"],color:"#38bdf8"},{label:"4xx",value:e["4xx"],color:"var(--warn)"},{label:"5xx",value:e["5xx"],color:"var(--bad)"},{label:"other",value:e.other,color:"var(--aviary-muted, var(--muted))"}]}function lNe(e){return e.topKeys.map(t=>({label:t.key,value:t.count}))}function uNe({stats:e}){const t=e.latency,n=Ra();return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Total",value:e.total.toLocaleString()}),c.jsx(ir,{label:"p50 ms",value:t?t.p50.toLocaleString():"—"}),c.jsx(ir,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-info"}),c.jsx(ir,{label:"Slow",value:t?t.slow.toLocaleString():"—",accent:t&&t.slow>0?"text-warn":"text-foreground"})]}),c.jsxs(o_,{children:[e.families?c.jsx(Wl,{title:"Slowest query shapes (p99)",valueLabel:"p99 ms",data:oNe(e.families),horizontal:!0,truncateLabel:40,onSelect:r=>{r.id!==void 0&&n(`/entries/query?familyHash=${encodeURIComponent(r.id)}`)}}):null,c.jsx(ku,{title:"Queries over time",valueLabel:"queries",data:Um(e.overTime)})]})]})}function cNe(e){return Object.entries(e).map(([t,n])=>({label:t,value:n.hits})).sort((t,n)=>t.label.localeCompare(n.label))}function fNe({stats:e}){const t=e.cache,n=(t==null?void 0:t.byTier)??{},r=Object.keys(n),i=(t==null?void 0:t.staleHits)??0,a=(t==null?void 0:t.deletes)??0;return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Hit ratio",value:t?`${Math.round(t.hitRatio*100)}%`:"—",accent:"text-brand"}),c.jsx(ir,{label:"Hits",value:t?t.hits.toLocaleString():"—"}),c.jsx(ir,{label:"Misses",value:t?t.misses.toLocaleString():"—"}),c.jsx(ir,{label:"Sets",value:t?t.sets.toLocaleString():"—"}),a>0?c.jsx(ir,{label:"Deletes",value:a.toLocaleString()}):null,i>0?c.jsx(ir,{label:"Stale hits",value:i.toLocaleString(),accent:"text-warn"}):null]}),c.jsxs(o_,{children:[t?c.jsx(Wl,{title:"Hits vs misses",valueLabel:"count",data:[{label:"hits",value:t.hits,color:"var(--good)"},{label:"misses",value:t.misses,color:"var(--bad)"}]}):null,r.length>0?c.jsx(Wl,{title:"Hits by tier",valueLabel:"hits",data:cNe(n)}):null,c.jsx(ku,{title:"Cache over time",valueLabel:"ops",data:Um(e.overTime)})]}),t?c.jsx(Wl,{title:"Top keys",valueLabel:"count",data:lNe(t)}):null]})}function dNe({stats:e}){const t=e.latency,n=e.status,r=n?n["4xx"]+n["5xx"]:0,i=e.total>0?Math.round(r/e.total*100):0;return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Total",value:e.total.toLocaleString()}),c.jsx(ir,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-info"}),c.jsx(ir,{label:"Error %",value:`${i}%`,accent:r>0?"text-bad":"text-foreground"})]}),c.jsxs(o_,{children:[n?c.jsx(Wl,{title:"Status codes",valueLabel:"count",data:sNe(n)}):null,c.jsx(ku,{title:"Throughput",valueLabel:"requests",data:Um(e.overTime)})]})]})}function pNe({values:e}){if(e.length===0)return null;const t=Math.max(1,...e);return c.jsx("div",{className:"flex h-6 items-end gap-px","aria-hidden":"true",children:e.map((n,r)=>c.jsx("div",{className:"w-1 rounded-sm bg-warn",style:{height:`${Math.max(2,Math.round(n/t*100))}%`}},r))})}function hNe({group:e}){const t=new Date(e.lastAt).getTime();return c.jsxs(dy,{to:`/entries/exception?familyHash=${encodeURIComponent(e.key)}`,className:"flex items-center gap-3 aviary-surface rounded-lg border border-border px-4 py-3 transition hover:border-line hover:bg-panel/70",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"truncate font-mono text-sm font-semibold text-bad",children:e.class}),c.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.message})]}),c.jsx(pNe,{values:e.overTime}),c.jsxs("div",{className:"shrink-0 text-right",children:[c.jsx("p",{className:"text-sm font-semibold tabular-nums text-foreground",children:e.count.toLocaleString()}),c.jsx("p",{className:"text-[10px] text-muted-foreground",children:Lo(Number.isNaN(t)?null:t)})]})]})}function mNe({stats:e}){const t=e.exceptions??[];return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Total",value:e.total.toLocaleString()}),c.jsx(ir,{label:"Groups",value:t.length.toLocaleString(),accent:t.length>0?"text-warn":"text-foreground"})]}),t.length>0?c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Exception groups"}),t.map(n=>c.jsx(hNe,{group:n},n.key))]}):null,c.jsx(ku,{title:"Exceptions over time",valueLabel:"exceptions",data:Um(e.overTime)})]})}function gNe({stats:e}){return c.jsxs(c.Fragment,{children:[c.jsx(Hm,{children:c.jsx(ir,{label:"Total",value:e.total.toLocaleString()})}),c.jsx(ku,{title:"Over time",valueLabel:"entries",data:Um(e.overTime)})]})}function vNe({stats:e}){return e.type==="query"?c.jsx(uNe,{stats:e}):e.type==="cache"?c.jsx(fNe,{stats:e}):e.type==="request"?c.jsx(dNe,{stats:e}):e.type==="exception"?c.jsx(mNe,{stats:e}):c.jsx(gNe,{stats:e})}function yNe({type:e}){const{data:t}=wX(e,iNe);return t?c.jsxs("div",{className:"mb-4 space-y-4",children:[c.jsx(vNe,{stats:t}),t.truncated?c.jsx("p",{className:"text-[10px] text-muted-foreground",children:"sampled (window capped)"}):null]}):c.jsx("div",{className:"mb-4 h-24 animate-pulse rounded-lg border border-line bg-panel/20"})}const bNe=["15m","1h","6h","24h"];function $d({value:e,onChange:t}){return c.jsxs(gE,{value:e,onValueChange:n=>{typeof n=="string"&&t(n)},children:[c.jsx(yE,{"aria-label":"Time window",children:c.jsx(vE,{})}),c.jsx(bE,{align:"end",children:bNe.map(n=>c.jsx(Op,{value:n,children:n},n))})]})}const xNe=200,wNe=48;function SNe(e,t){const[n,r]=x.useState(e);return x.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}function QD({onSelect:e,prefix:t="",placeholder:n="Filter by tag…",ariaLabel:r="Filter by tag"}){var T;const[i,a]=x.useState(""),[o,s]=x.useState(!1),[l,u]=x.useState(0),f=x.useRef(null),d=x.useId(),p=i.trim(),h=`${t}${p}`,y=SNe(p,xNe),m=xX(t,y),g=((T=m.data)==null?void 0:T.pages.flatMap(A=>A.data))??[],b=o&&g.length>0,v=x.useRef(null);function w(){const A=v.current;!A||!m.hasNextPage||m.isFetchingNextPage||A.scrollTop+A.clientHeight>=A.scrollHeight-wNe&&m.fetchNextPage()}function S(A){return t!==""&&A.startsWith(t)?A.slice(t.length):A}x.useEffect(()=>{u(A=>A>=g.length?0:A)},[g.length]),x.useEffect(()=>{function A(C){var $;const _=C.target;_ instanceof Node&&!(($=f.current)!=null&&$.contains(_))&&s(!1)}return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]);function O(A){e(A),a(S(A)),s(!1)}function j(A){if(A.key==="Escape"){s(!1);return}if(!b){A.key==="Enter"&&p!==""&&O(h);return}if(A.key==="ArrowDown")A.preventDefault(),u(C=>(C+1)%g.length);else if(A.key==="ArrowUp")A.preventDefault(),u(C=>(C-1+g.length)%g.length);else if(A.key==="Enter"){A.preventDefault();const C=g[l];C?O(C.tag):p!==""&&O(h)}}const E=b?`${d}-option-${l}`:void 0;return c.jsxs("div",{ref:f,className:"relative",children:[c.jsx(nd,{type:"text",value:i,onChange:A=>{a(A.target.value),s(!0)},onFocus:()=>s(!0),onKeyDown:j,placeholder:n,"aria-label":r,role:"combobox","aria-expanded":b,"aria-controls":d,"aria-autocomplete":"list",...E?{"aria-activedescendant":E}:{}}),b?c.jsxs("div",{id:d,role:"listbox","aria-label":"Tag suggestions",tabIndex:-1,ref:v,onScroll:w,className:"absolute left-0 top-full z-10 mt-1 max-h-64 w-48 overflow-auto rounded border border-line bg-popover py-1 shadow-lg",children:[g.map((A,C)=>c.jsxs("div",{id:`${d}-option-${C}`,role:"option",tabIndex:-1,"aria-selected":C===l,onMouseDown:_=>{_.preventDefault(),O(A.tag)},onMouseEnter:()=>u(C),className:`flex cursor-pointer items-center justify-between gap-3 px-2 py-1 text-xs ${C===l?"bg-panel-2 text-foreground":"text-foreground"}`,children:[c.jsx("span",{className:"truncate",children:S(A.tag)}),c.jsx("span",{className:"shrink-0 text-muted-foreground",children:A.count})]},A.tag)),m.isFetchingNextPage?c.jsx("p",{className:"px-2 py-1 text-[10px] text-muted-foreground",children:"loading more…"}):null]}):null]})}function Ku({title:e,children:t}){return c.jsxs("section",{className:"aviary-surface mb-4 rounded-lg border border-border",children:[c.jsx("h3",{className:"border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),c.jsx("div",{className:"px-4 pt-3 pb-4 text-xs",children:t})]})}function ONe({report:e,onSelectEntry:t,onSelectFamily:n,onSelectRoute:r,onSelectOutgoing:i}){return c.jsxs("div",{className:"text-xs",children:[e.truncated&&c.jsxs("p",{className:"mb-4 text-warn",children:["Scan truncated at ",e.scanned," entries — widen the window with care."]}),c.jsx(Ku,{title:"Entries by type",children:c.jsxs("div",{className:"flex flex-wrap gap-3",children:[Object.entries(e.counts).map(([a,o])=>c.jsxs("span",{className:"rounded bg-panel px-2 py-1",children:[c.jsx("span",{className:"text-brand",children:a})," ",c.jsx("span",{className:"text-foreground",children:o})]},a)),Object.keys(e.counts).length===0&&c.jsx("span",{className:"text-muted-foreground",children:"No entries in window."})]})}),c.jsx(Ku,{title:"Slowest",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.slowest.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>t==null?void 0:t(a.id),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(t==null||t(a.id))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsx("td",{className:"py-1 text-brand",children:a.type}),c.jsx("td",{className:"max-w-md truncate text-foreground",children:a.label}),c.jsxs("td",{className:"text-right text-muted-foreground",children:[a.durationMs,"ms"]})]},a.id)),e.slowest.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"—"})})]})})}),c.jsx(Ku,{title:"Top exceptions",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.topExceptions.map(a=>c.jsxs("tr",{className:"border-t border-line-soft",children:[c.jsx("td",{className:"py-1 text-bad",children:a.class}),c.jsx("td",{className:"max-w-md truncate text-foreground",children:a.message}),c.jsxs("td",{className:"text-right text-muted-foreground",children:["×",a.count]})]},a.familyHash)),e.topExceptions.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"No exceptions 🎉"})})]})})}),c.jsx(Ku,{title:"N+1 query hotspots",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.nPlusOne.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>n==null?void 0:n(a.familyHash),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(n==null||n(a.familyHash))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsxs("td",{className:"whitespace-nowrap py-1 text-warn",children:["×",a.perRequest,c.jsx("span",{className:"text-muted-foreground",children:" per request"})]}),c.jsx("td",{className:"max-w-md truncate text-foreground",children:a.sql}),c.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:[a.requests," requests · ",a.total," total"]})]},a.familyHash)),e.nPlusOne.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"None detected"})})]})})}),c.jsx(Ku,{title:"Slow request hotspots",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.slowRoutes.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>r==null?void 0:r(a.route),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(r==null||r(a.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:a.route}),c.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[a.p99,"ms",c.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),c.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",a.count]})]},a.route)),e.slowRoutes.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"No routes over the slow threshold"})})]})})}),c.jsx(Ku,{title:"Slow outgoing HTTP",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.slowOutgoing.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>i==null?void 0:i(a.route),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(i==null||i(a.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:a.route}),c.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[a.p99,"ms",c.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),c.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",a.count]})]},a.route)),e.slowOutgoing.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"No outgoing calls over the slow threshold"})})]})})})]})}function ZD(e){return e?`${Math.round(e.p95)}ms`:"—"}function jNe({report:e,sparkline:t}){return c.jsxs("table",{className:"w-full text-left text-xs",children:[c.jsx("thead",{className:"text-muted-foreground",children:c.jsxs("tr",{children:[c.jsx("th",{className:"py-2 font-normal",children:"Queue"}),c.jsx("th",{className:"font-normal",children:"Total"}),c.jsx("th",{className:"font-normal",children:"Failed"}),c.jsx("th",{className:"font-normal",children:"Fail %"}),c.jsx("th",{className:"font-normal",children:"Per min"}),c.jsx("th",{className:"font-normal",children:"Runtime p95"}),c.jsx("th",{className:"font-normal",children:"Wait p95"}),t&&c.jsx("th",{className:"font-normal",children:"Trend"})]})}),c.jsxs("tbody",{children:[e.queues.map(n=>c.jsxs("tr",{className:"border-t border-line-soft",children:[c.jsx("td",{className:"py-1.5 text-brand",children:n.queue}),c.jsx("td",{className:"text-foreground",children:n.total}),c.jsx("td",{className:"text-foreground",children:n.failed}),c.jsxs("td",{className:n.failureRate>0?"text-bad":"text-muted-foreground",children:[(n.failureRate*100).toFixed(1),"%"]}),c.jsx("td",{className:"text-muted-foreground",children:n.throughputPerMinute.toFixed(1)}),c.jsx("td",{className:"text-muted-foreground",children:ZD(n.runtimeMs)}),c.jsx("td",{className:"text-muted-foreground",children:ZD(n.waitMs)}),t&&c.jsx("td",{className:"text-muted-foreground",children:t(n.queue)})]},n.queue)),e.queues.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-2 text-muted-foreground",colSpan:t?8:7,children:"No queue activity in window."})})]})]})}function ENe(e,t,n){if(e.length===0)return"";const r=Math.max(...e,1),i=e.length>1?t/(e.length-1):0;return e.map((a,o)=>{const s=o*i,l=n-a/r*n;return`${s.toFixed(1)},${l.toFixed(1)}`}).join(" ")}function Nv({values:e,width:t=160,height:n=36}){const r=ENe(e,t,n),i=r?`0,${n} ${r} ${t},${n}`:"";return c.jsxs("svg",{width:t,height:n,viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"none",role:"img","aria-label":"throughput",children:[i&&c.jsx("polygon",{points:i,className:"fill-accent opacity-10"}),r&&c.jsx("polyline",{points:r,className:"fill-none stroke-accent",strokeWidth:1.5})]})}const JD={request:"fill-emerald-400",query:"fill-sky-400",job:"fill-violet-400",exception:"fill-red-400",http_client:"fill-amber-400",mail:"fill-pink-400"};function s_(e){const t=new Set;for(const i of e)for(const a of Object.keys(i.byType))t.add(a);const n=Object.keys(JD).filter(i=>t.has(i)),r=[...t].filter(i=>!(i in JD)).sort();return[...n,...r]}function TNe({queue:e,window:t}){const{data:n}=eA({window:t,tag:`queue:${e}`,buckets:24});return c.jsx(Nv,{values:((n==null?void 0:n.buckets)??[]).map(r=>r.total),width:120,height:20})}function ANe({state:e,value:t}){const n=e==="failed"&&t>0;return c.jsxs("span",{className:`flex items-baseline gap-1 rounded px-1.5 py-0.5 ${n?"tint-bad":"bg-panel-2/60"}`,title:`${t} ${e}`,children:[c.jsx("span",{className:"text-[9px] uppercase tracking-[0.12em] text-faint",children:e.slice(0,4)}),c.jsx("span",{className:`tabular-nums ${t>0?Q6[e]:"text-muted-foreground"}`,children:t})]})}function CNe({summary:e,active:t,onSelect:n}){return c.jsxs("button",{type:"button",onClick:()=>n(e.driver,e.queue),className:`w-full rounded-lg border px-3 py-2.5 text-left transition-colors ${t?"border-brand bg-panel-2":"border-line bg-panel/40 hover:border-line hover:bg-panel"}`,children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:e.queue}),e.isPaused&&c.jsx("span",{className:"shrink-0 rounded bg-violet/15 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-violet",children:"paused"})]}),c.jsx("div",{className:"mt-0.5 text-[10px] uppercase tracking-[0.12em] text-faint",children:e.driver}),c.jsx("div",{className:"mt-2 flex flex-wrap gap-1 text-[10px]",children:W6.map(r=>c.jsx(ANe,{state:r,value:e.counts[r]},r))})]})}function _Ne({selected:e,onSelect:t}){const{data:n,isLoading:r,isError:i}=cB();if(r)return c.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading queues…"});if(i)return c.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load queues."});const a=(n==null?void 0:n.queues)??[];return a.length===0?c.jsx("div",{className:"rounded-lg border border-dashed border-line px-3 py-6 text-center text-xs text-muted-foreground",children:"No live queues detected."}):c.jsx("div",{className:"space-y-2",children:a.map(o=>c.jsx(CNe,{summary:o,active:(e==null?void 0:e.driver)===o.driver&&(e==null?void 0:e.queue)===o.queue,onSelect:t},`${o.driver}:${o.queue}`))})}function NNe({counts:e,state:t,onState:n}){return c.jsx(RCe,{value:t,onValueChange:r=>{typeof r=="string"&&n(r)},children:c.jsx(MCe,{children:W6.map(r=>{const i=r===t,a=(e==null?void 0:e[r])??0;return c.jsxs(PCe,{value:r,children:[c.jsx("span",{className:"capitalize",children:r}),c.jsx("span",{className:`tabular-nums text-[11px] ${i?Q6[r]:"text-muted-foreground"}`,children:a})]},r)})})})}const eI=25;function RNe(e){return e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}function MNe({job:e,onOpen:t}){return c.jsxs("tr",{onClick:()=>t(e.id),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&t(e.id)},className:"cursor-pointer border-t border-line-soft align-top hover:bg-panel",children:[c.jsx("td",{className:"py-1.5 pr-2 font-mono text-[11px] text-muted-foreground",children:e.id}),c.jsx("td",{className:"pr-2 text-emerald-400",children:e.name||"—"}),c.jsx("td",{className:"pr-2 tabular-nums text-muted-foreground",children:RNe(e)}),c.jsx("td",{className:"pr-2 whitespace-nowrap text-muted-foreground",children:Lo(e.timestamp)}),c.jsx("td",{className:"max-w-xs truncate pr-2 text-muted-foreground",children:e.failedReason?c.jsx("span",{className:"text-bad",children:e.failedReason}):c.jsx("span",{className:"text-muted-foreground",children:"open to inspect payload →"})})]})}function PNe(e,t){const n=new Map;for(const r of e)n.set(r.id,r);for(const r of t)n.set(r.id,r);return[...n.values()]}function $Ne({driver:e,queue:t,state:n,onOpen:r}){const[i,a]=x.useState(void 0),[o,s]=x.useState([]),l=`${e}\0${t}\0${n}`,u=x.useRef(l);u.current!==l&&(u.current=l,i!==void 0&&a(void 0),o.length>0&&s([]));const{data:f,isLoading:d,isError:p}=aX(e,t,n,i!==void 0?{after:i,first:eI}:{first:eI}),h=f!=null&&f.meta.hasNext?f.meta.nextCursor:null,y=f==null?void 0:f.data;return x.useEffect(()=>{y&&s(i===void 0?m=>DNe(m,y):m=>PNe(m,y))},[y,i]),d&&o.length===0?c.jsx("p",{className:"px-1 py-3 text-xs text-muted-foreground",children:"Loading jobs…"}):p&&o.length===0?c.jsx("p",{className:"px-1 py-3 text-xs text-bad",children:"Failed to load jobs."}):o.length===0?c.jsxs("div",{className:"rounded-lg border border-dashed border-line px-3 py-8 text-center text-xs text-muted-foreground",children:["No ",c.jsx("span",{className:"text-muted-foreground",children:n})," jobs."]}):c.jsxs("div",{className:"space-y-3",children:[c.jsxs("table",{className:"w-full text-left text-xs",children:[c.jsx("thead",{className:"text-muted-foreground",children:c.jsxs("tr",{children:[c.jsx("th",{className:"py-1.5 pr-2 font-normal",children:"ID"}),c.jsx("th",{className:"pr-2 font-normal",children:"Name"}),c.jsx("th",{className:"pr-2 font-normal",children:"Attempts"}),c.jsx("th",{className:"pr-2 font-normal",children:"Age"}),c.jsx("th",{className:"pr-2 font-normal",children:"Reason / Payload"})]})}),c.jsx("tbody",{children:o.map(m=>c.jsx(MNe,{job:m,onOpen:r},m.id))})]}),h!=null&&c.jsx("button",{type:"button",onClick:()=>a(h),className:"w-full rounded-md border border-line py-1.5 text-[11px] text-muted-foreground transition-colors hover:border-line hover:text-foreground",children:"Load more"})]})}function DNe(e,t){const n=new Set(t.map(i=>i.id)),r=e.filter(i=>!n.has(i.id));return[...t,...r]}function D0(e,t,n){return e!=null&&e.mutationsEnabled?(e.actionsByDriver[t]??[]).includes(n):!1}function INe(e,t){switch(e){case"promote":return t==="delayed";case"retry":return t==="failed"||t==="completed";case"remove":return!0;default:return!1}}function l_(e){return e instanceof Error&&/\b403\b/.test(e.message)}const kNe={retry:"good",promote:"warn",remove:"bad"};function LNe({driver:e,queue:t,id:n,action:r,onDone:i}){const a=sX(),[o,s]=x.useState(!1),l=a.isPending,u=l_(a.error);async function f(){s(!1);try{await a.mutateAsync({driver:e,queue:t,id:n,action:r}),i==null||i()}catch{}}return r==="remove"&&o?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(Tt,{variant:"bad",disabled:l,onClick:f,children:l?"Removing…":"Confirm remove"}),c.jsx(Tt,{variant:"ghost",onClick:()=>s(!1),children:"Cancel"})]}):c.jsxs("span",{className:"inline-flex flex-col",children:[c.jsx(Tt,{variant:kNe[r],disabled:l,onClick:r==="remove"?()=>s(!0):f,className:"capitalize",children:l?`${r}…`:r}),u&&c.jsx("span",{className:"mt-0.5 text-[10px] text-bad",children:"Not authorized"})]})}function BNe({capabilities:e,driver:t,queue:n,id:r,state:i,onDone:a}){const o=["retry","promote","remove"].filter(s=>D0(e,t,s)&&INe(s,i));return o.length===0?null:c.jsx("div",{className:"flex flex-wrap items-start gap-1.5",children:o.map(s=>c.jsx(LNe,{driver:t,queue:n,id:r,action:s,onDone:a},s))})}function zNe({capabilities:e,driver:t,queue:n}){const r=fB();if(!D0(e,t,"retry-all"))return null;const i=l_(r.error);async function a(){try{await r.mutateAsync({driver:t,queue:n,action:"retry-all",state:"failed"})}catch{}}return c.jsxs("span",{className:"inline-flex items-center gap-2",children:[c.jsx(Tt,{variant:"good",disabled:r.isPending,onClick:a,children:r.isPending?"Retrying all…":"Retry all failed"}),i&&c.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function FNe({capabilities:e,driver:t,queue:n}){const r=fB(),[i,a]=x.useState(!1);if(!D0(e,t,"redrive"))return null;const o=l_(r.error);async function s(){a(!1);try{await r.mutateAsync({driver:t,queue:n,action:"redrive"})}catch{}}return i?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(Tt,{variant:"warn",disabled:r.isPending,onClick:s,children:r.isPending?"Redriving…":"Confirm redrive"}),c.jsx(Tt,{variant:"ghost",onClick:()=>a(!1),children:"Cancel"})]}):c.jsxs("span",{className:"inline-flex items-center gap-2",children:[c.jsx(Tt,{variant:"warn",disabled:r.isPending,onClick:()=>a(!0),children:"Redrive DLQ"}),o&&c.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function UNe(e){if(e===void 0)return"—";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function x1({label:e,value:t}){return c.jsxs("section",{children:[c.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-foreground ring-1 ring-line",children:UNe(t)})]})}function lp({label:e,value:t}){return c.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-t border-line-soft py-1 first:border-0",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function w1(e){return e==null?"—":`${new Date(e).toLocaleString()} (${Lo(e)})`}function HNe({detail:e,capabilities:t,driver:n,queue:r,state:i,onClose:a}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("header",{className:"space-y-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-brand",children:e.name||"job"}),c.jsx(Dc,{className:"capitalize",children:e.state})]}),c.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:e.id})]}),c.jsx(BNe,{capabilities:t,driver:n,queue:r,id:e.id,state:i,onDone:a}),c.jsxs("div",{className:"rounded-lg border border-line bg-panel px-3 py-2 text-xs",children:[c.jsx(lp,{label:"Attempts",value:e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}),c.jsx(lp,{label:"Progress",value:e.progress!=null?`${e.progress}`:"—"}),c.jsx(lp,{label:"Created",value:w1(e.timestamp)}),c.jsx(lp,{label:"Processed",value:w1(e.processedOn)}),c.jsx(lp,{label:"Finished",value:w1(e.finishedOn)})]}),e.failedReason&&c.jsxs("section",{children:[c.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-bad",children:"Failed reason"}),c.jsx("p",{className:"tint-bad rounded border px-2.5 py-2 text-[11px]",children:e.failedReason})]}),c.jsx(x1,{label:"Payload (data)",value:e.data}),c.jsx(x1,{label:"Options (opts)",value:e.opts}),e.returnValue!==void 0&&e.returnValue!==null&&c.jsx(x1,{label:"Return value",value:e.returnValue}),e.stacktrace&&e.stacktrace.length>0&&c.jsxs("section",{children:[c.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:"Stacktrace"}),c.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-bad ring-1 ring-line",children:e.stacktrace.join(`
|
|
168
|
+
`)})]})]})}function qNe({driver:e,queue:t,jobId:n,state:r,capabilities:i,onClose:a}){const{data:o,isLoading:s,isError:l}=oX(e,t,n);return c.jsx(i6,{open:!0,onOpenChange:u=>{u||a()},children:c.jsxs(a6,{placement:"right",className:"flex flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2.5",children:[c.jsx(o6,{className:"text-xs font-normal uppercase tracking-[0.12em] text-faint",children:"Job detail"}),c.jsx(Tt,{variant:"ghost",size:"xs","aria-label":"Close job detail",onClick:a,children:"✕"})]}),c.jsx("div",{className:"flex-1 overflow-auto p-4",children:s?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading job…"}):l?c.jsx("p",{className:"text-xs text-bad",children:"Failed to load job."}):o?c.jsx(HNe,{detail:o,capabilities:i,driver:e,queue:t,state:r,onClose:a}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Job not found (it may have been removed)."})})]})})}function VNe(e){return e instanceof Error&&/\b403\b/.test(e.message)}function GNe(e){const t=e.trim();if(t==="")return{ok:!1,message:"Payload is required."};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,message:"Payload must be valid JSON."}}}function KNe({capabilities:e,driver:t,queue:n}){const r=lX(),[i,a]=x.useState(""),[o,s]=x.useState(""),[l,u]=x.useState(null),[f,d]=x.useState(void 0);if(!D0(e,t,"enqueue"))return null;const p=VNe(r.error);async function h(y){y.preventDefault(),d(void 0);const m=GNe(o);if(!m.ok){u(m.message);return}u(null);try{const g=await r.mutateAsync({driver:t,queue:n,...i.trim()!==""?{name:i.trim()}:{},payload:m.value});d(g.id),s("")}catch{}}return c.jsxs("form",{onSubmit:h,className:"space-y-2 rounded-lg border border-line p-3",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Send message"}),c.jsx("input",{type:"text",value:i,onChange:y=>a(y.target.value),placeholder:"Job name (optional)","aria-label":"Job name",className:"w-full rounded border border-line bg-background px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground"}),c.jsx("textarea",{value:o,onChange:y=>s(y.target.value),placeholder:'{"to": "a@b.c"}',"aria-label":"Payload (JSON)",rows:4,className:"w-full rounded border border-line bg-background px-2 py-1 font-mono text-xs text-foreground placeholder:text-muted-foreground"}),l&&c.jsx("p",{className:"text-[10px] text-bad",children:l}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Tt,{type:"submit",variant:"good",disabled:r.isPending,children:r.isPending?"Sending…":"Send message"}),p&&c.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"}),f!==void 0&&!p&&c.jsx("span",{className:"text-[10px] text-good",children:f?`Enqueued job ${f}`:"Message enqueued"})]})]})}function YNe(){const[e,t]=x.useState(null);return x.useEffect(()=>{const n=r=>{t(r.detail)};return window.addEventListener(mO,n),()=>window.removeEventListener(mO,n)},[]),e}function XNe({denial:e}){const t=e.reason==="unauthenticated";return c.jsx("main",{role:"alert",className:"flex min-h-screen items-center justify-center bg-background p-6 text-foreground",children:c.jsxs("div",{className:"max-w-md aviary-surface rounded-lg border border-border p-6 text-center",children:[c.jsx("h1",{className:"text-lg font-semibold",children:t?"Sign in required":"Access denied"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t?"Sign in to the app to open Telescope, then reload this page.":"Your account is not allowed to open Telescope."})]})})}function WNe({children:e}){const t=YNe();return t?c.jsx(XNe,{denial:t}):c.jsx(c.Fragment,{children:e})}function ur(e,t){return function({size:r=16,...i}){return c.jsx("svg",{viewBox:"0 0 16 16",width:r,height:r,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,role:void 0,"aria-label":t,...i,children:e})}}const u_=ur(c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.5"}),c.jsx("path",{d:"M10.5 10.5 14 14"})]})),Z6=ur(c.jsx("path",{d:"M4 4l8 8M12 4l-8 8"})),QNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"2"}),c.jsx("path",{d:"M6 2.5v11"})]})),J6=ur(c.jsx("path",{d:"M4 6l4 4 4-4"})),e8=ur(c.jsx("path",{d:"M3.5 8.5l3 3 6-7"})),ZNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"8",cy:"8",r:"3"}),c.jsx("path",{d:"M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3.05 3.05l1.06 1.06M11.89 11.89l1.06 1.06M3.05 12.95l1.06-1.06M11.89 4.11l1.06-1.06"})]})),JNe=ur(c.jsx("path",{d:"M13.5 9A6 6 0 116.5 2.5a4.5 4.5 0 007 6.5z"})),tI=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M10 11l4-3.5L10 4"}),c.jsx("path",{d:"M14 7.5H5"}),c.jsx("path",{d:"M6 3H3a1 1 0 00-1 1v7a1 1 0 001 1h3"})]})),t8=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M8 2 1.5 13.5h13z"}),c.jsx("path",{d:"M8 6.5v3M8 11.5h.01"})]})),eRe=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M13.5 8a5.5 5.5 0 1 1-1.6-3.9"}),c.jsx("path",{d:"M13.5 2.5v3h-3"})]})),n8=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M2 9.5 4 3h8l2 6.5V13H2z"}),c.jsx("path",{d:"M2 9.5h3.5l1 1.5h3l1-1.5H14"})]})),tRe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"1.5",y:"1.5",width:"5.5",height:"5.5",rx:"1.5"}),c.jsx("rect",{x:"9",y:"1.5",width:"5.5",height:"5.5",rx:"1.5"}),c.jsx("rect",{x:"1.5",y:"9",width:"5.5",height:"5.5",rx:"1.5"}),c.jsx("rect",{x:"9",y:"9",width:"5.5",height:"5.5",rx:"1.5"})]})),nRe=ur(c.jsx("path",{d:"M2.5 4h11M2.5 8h7M2.5 12h5"})),rRe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"2",y:"2",width:"12",height:"5",rx:"1.2"}),c.jsx("rect",{x:"2",y:"9",width:"12",height:"5",rx:"1.2"}),c.jsx("path",{d:"M4.5 4.5h.01M4.5 11.5h.01"})]})),iRe=ur(c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"8",cy:"8",r:"6.5"}),c.jsx("path",{d:"M8 4.5V8l2.5 1.5"})]})),aRe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1.2"}),c.jsx("rect",{x:"10",y:"9.5",width:"4.5",height:"4.5",rx:"1.2"}),c.jsx("path",{d:"M6 4.25h3a1.5 1.5 0 0 1 1.5 1.5V9.5"})]})),jE={workflow:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3",y:"4",width:"6",height:"6",rx:"1.5"}),c.jsx("rect",{x:"15",y:"14",width:"6",height:"6",rx:"1.5"}),c.jsx("path",{d:"M9 7h4a2 2 0 0 1 2 2v5"})]}),telescope:c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"m4 14 13-6 2 4-13 6z"}),c.jsx("path",{d:"m10 16 2 5M14 15l-2 6M17 8l1-3 3 1-1 3"})]}),media:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),c.jsx("circle",{cx:"9",cy:"10",r:"2"}),c.jsx("path",{d:"m21 16-5-5-9 9"})]}),payments:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2"}),c.jsx("path",{d:"M2.5 10h19M6.5 15h4"})]}),agent:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"5",y:"8",width:"14",height:"11",rx:"3"}),c.jsx("path",{d:"M12 8V4M9 13h.01M15 13h.01M9.5 16.5h5"}),c.jsx("circle",{cx:"12",cy:"3.5",r:"0.5"})]}),identity:c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M12 3 4.5 6v5.5c0 4.5 3.2 8.2 7.5 9.5 4.3-1.3 7.5-5 7.5-9.5V6z"}),c.jsx("circle",{cx:"12",cy:"10",r:"2.5"}),c.jsx("path",{d:"M8 16a4.5 4.5 0 0 1 8 0"})]}),flags:c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M5 21V4"}),c.jsx("path",{d:"M5 4h11l-2 4 2 4H5"})]}),generic:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),c.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),c.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),c.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})},oRe=Object.keys(jE);function r8(e){return oRe.includes(e)?e:"generic"}function i8({icon:e,className:t,size:n=16}){return c.jsx("svg",{viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true","data-icon":e,children:jE[e]??jE.generic})}const sRe={agent:"#a78bfa",durable:"#a3e635",media:"#22d3ee",telescope:"#e879f9"},lRe={agent:"#a78bfa",workflow:"#a3e635",media:"#22d3ee",telescope:"#e879f9"};function a8(e,t){return(e?sRe[e]:void 0)??lRe[t]}function EE({icon:e,accent:t,size:n=26,className:r}){return c.jsx("span",{className:`aviary-tile${r?` ${r}`:""}`,style:{width:n,height:n,...t?{"--aviary-tile":t}:{}},"data-accent":t,children:c.jsx(i8,{icon:e,size:Math.round(n*.58)})})}function ge(...e){return MB(ke(e))}function uRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty",className:ge("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance",e),...t})}function cRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-header",className:ge("flex max-w-sm flex-col items-center gap-2",e),...t})}const fRe=md("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function dRe({className:e,variant:t="default",...n}){return c.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:ge(fRe({variant:t,className:e})),...n})}function pRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-title",className:ge("cn-font-heading text-lg font-medium tracking-tight",e),...t})}function hRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-description",className:ge("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function mRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-content",className:ge("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",e),...t})}function o8({title:e,description:t,icon:n,action:r,className:i}){return c.jsxs(uRe,{className:ge("p-8",i),children:[c.jsxs(cRe,{children:[c.jsx(dRe,{variant:"icon",className:"border border-border bg-panel-2 text-faint",children:n??c.jsx(n8,{})}),c.jsx(pRe,{className:"text-[13px] font-semibold text-fg",children:e}),t&&c.jsx(hRe,{className:"text-xs text-faint",children:t})]}),r&&c.jsx(mRe,{children:r})]})}const gRe=x.forwardRef(function(t,n){const{render:r,className:i,disabled:a=!1,focusableWhenDisabled:o=!1,nativeButton:s=!0,style:l,...u}=t,{getButtonProps:f,buttonRef:d}=el({disabled:a,focusableWhenDisabled:o,native:s});return it("button",t,{state:{disabled:a},ref:[n,d],props:[u,f]})}),vRe=md("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-brand-hover",outline:"border-border bg-panel-2 text-dim hover:border-line-strong hover:bg-panel-3 hover:text-foreground aria-expanded:bg-panel-3 aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"text-dim hover:bg-hover hover:text-foreground aria-expanded:bg-hover aria-expanded:text-foreground",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline",brand:"border-brand-border bg-brand-soft text-brand hover:bg-brand/20",warn:"border-warn/40 bg-warn/10 text-warn hover:bg-warn/20",info:"border-info/30 bg-info/10 text-info hover:bg-info/20",alt:"border-violet/30 bg-violet/10 text-violet hover:bg-violet/20",chip:"border-border bg-panel-2 text-dim hover:border-line-strong hover:text-foreground aria-pressed:border-brand-border aria-pressed:bg-brand-soft aria-pressed:text-foreground"},size:{default:"h-8 gap-1.5 px-3 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-[26px] gap-1 rounded-[6px] px-2.5 text-[11px] [&_svg:not([class*='size-'])]:size-3.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10",micro:"h-5 gap-1 rounded-sm px-1.5 text-[10px] [&_svg:not([class*='size-'])]:size-3",chip:"h-7 gap-1.5 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3.5"}},defaultVariants:{variant:"default",size:"default"}});function Ql({className:e,variant:t="default",size:n="default",...r}){return c.jsx(gRe,{"data-slot":"button",className:ge(vRe({variant:t,size:n,className:e})),...r})}class yRe extends x.Component{constructor(){super(...arguments);Be(this,"state",{error:null});Be(this,"reset",()=>{var n,r;(r=(n=this.props).onReset)==null||r.call(n),this.setState({error:null})})}static getDerivedStateFromError(n){return{error:n instanceof Error?n:new Error(String(n))}}componentDidCatch(n,r){typeof console<"u"&&console.error("[aviary-kit] region crashed",n,r)}componentDidUpdate(n){if(!this.state.error)return;const r=n.resetKeys??[],i=this.props.resetKeys??[];(r.length!==i.length||r.some((a,o)=>!Object.is(a,i[o])))&&this.reset()}render(){const{error:n}=this.state;return n?this.props.fallback?this.props.fallback(n,this.reset):c.jsx(bRe,{title:this.props.label?`${this.props.label} failed to render`:"Something broke here",error:n,onRetry:this.reset,className:this.props.className}):this.props.children}}function bRe({title:e,error:t,onRetry:n,className:r}){const i=t instanceof Error?t.message:t?String(t):void 0;return c.jsxs("div",{role:"alert",className:ge("flex flex-col items-start gap-3 rounded-lg border border-bad/25 bg-bad/5 p-4 text-sm",r),children:[c.jsxs("div",{className:"flex items-center gap-2 font-medium text-bad",children:[c.jsx(t8,{}),e]}),i&&c.jsx("p",{className:"mono break-all text-[11px] text-fg-2",children:i}),n&&c.jsxs(Ql,{variant:"outline",size:"sm",onClick:n,children:[c.jsx(eRe,{}),"Retry"]})]})}const xRe=/^[a-z][a-z0-9-]*$/;function Oc(e){return typeof e=="string"&&e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")&&!/[\u0000-\u001f\u007f]/.test(e)}function up(e){return typeof e=="object"&&e!==null?e:void 0}function Kg(e){if(typeof e!="string")return;const t=e.trim();return t===""?void 0:t}function wRe(e){const t=up(e)??{},n={},r=up(t.switcher);r&&Oc(r.endpoint)&&typeof r.others=="number"&&r.others>0&&(n.switcher={endpoint:r.endpoint,others:r.others});const i=up(t.search);if(i&&Oc(i.endpoint)){const l=typeof i.self=="string"&&xRe.test(i.self)?i.self:"";n.search={endpoint:i.endpoint,...l?{self:l}:{}}}else n.switcher&&(n.search={endpoint:`${n.switcher.endpoint}/search`});const a=up(t.viewer),o=Kg(a==null?void 0:a.label);if(a&&o){const l=Kg(a.email),u=Kg(a.role);n.viewer={label:o,...l?{email:l}:{},...u?{role:u}:{}}}const s=up(t.signOut);if(s&&Oc(s.action)){const l=Kg(s.csrfToken);n.signOut={action:s.action,...l?{csrfToken:l}:{}}}else s&&Oc(s.href)&&(n.signOut={href:s.href});return n}function SRe(e){if(typeof document>"u")return{};const t=document.getElementById(e);if(t===null)return{};try{return wRe(JSON.parse(t.textContent??""))}catch{return{}}}function ORe(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Nb({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:s,setMounted:l,transitionStatus:u}=TH(a,!0,!0),f=_i(),[d,p]=x.useState(),h=d===null?void 0:d??f,y=de(m=>{const g=!a,b=Re(Iu,m.nativeEvent);r(g,b),!b.isCanceled&&o(g)});return x.useMemo(()=>({defaultPanelId:f,disabled:i,handleTrigger:y,mounted:s,open:a,panelId:h,setMounted:l,setOpen:o,setPanelIdState:p,transitionStatus:u}),[f,i,y,s,a,h,l,o,p,u])}const s8=x.createContext(void 0);function l8(){const e=x.useContext(s8);if(e===void 0)throw new Error(Wt(15));return e}const jRe="data-open",ERe="data-closed",Yg=mC,TRe="data-panel-open",ARe={[jRe]:""},CRe={[ERe]:""},_Re={open(e){return e?{[TRe]:""}:null}},NRe={open(e){return e?ARe:CRe}},u8={...NRe,...Pm},RRe=x.forwardRef(function(t,n){const{render:r,className:i,defaultOpen:a=!1,disabled:o=!1,onOpenChange:s,open:l,style:u,...f}=t,d=de(s),p=ORe({open:l,defaultOpen:a,onOpenChange:d,disabled:o}),h=x.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),y=x.useMemo(()=>({...p,onOpenChange:d,state:h}),[p,d,h]),m=it("div",t,{state:h,ref:n,props:f,stateAttributesMapping:u8});return c.jsx(s8.Provider,{value:y,children:m})}),MRe={..._Re,...Pm},PRe=x.forwardRef(function(t,n){const{panelId:r,open:i,handleTrigger:a,state:o,disabled:s}=l8(),{className:l,disabled:u=s,render:f,nativeButton:d=!0,style:p,...h}=t,{getButtonProps:y,buttonRef:m}=el({disabled:u,native:d});return it("button",t,{state:o,ref:[n,m],props:[{"aria-controls":i?r:void 0,"aria-expanded":i,onClick:a},h,y],stateAttributesMapping:MRe})}),Yu={height:void 0,width:void 0};function $Re(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:l,setOpen:u,transitionStatus:f}=e,d=x.useRef(null),p=x.useRef(null),[h,y]=x.useState(Yu),m=x.useRef(Yu),g=x.useRef(!1),b=x.useRef(s),v=x.useRef(!1),[w,S]=x.useState(!1),O=x.useRef(null),j=Ca(t,d),E=qt(s),T=x0(d),A=!s&&!a,C=w?"idle":f,_=s&&(b.current||v.current),$=!s&&a&&p.current==="css-animation"&&h.height===void 0&&h.width===void 0?m.current:h,D=n&&A&&p.current!=="css-animation",N=de((k,I=!0)=>{I&&(m.current=k),y(k)}),P=de(()=>{var k;(k=O.current)==null||k.call(O),O.current=null}),R=de(k=>{P(),O.current=()=>{O.current=null,k()}}),B=de(()=>{s&&a&&p.current==="css-animation"&&(v.current=!0)});le(()=>{!w||f==="starting"||S(!1)},[w,f]),x.useEffect(()=>()=>{B(),P()},[B,P]),le(()=>{s||(b.current=!1,v.current=!1);const k=d.current;if(!k)return;!s&&O.current&&P();const I=DRe(k,_);if(p.current=I,s&&f==="idle"&&b.current&&I==="css-animation"){m.current=Xu(k);return}if(s&&f==="starting"){const H=g.current;if(g.current=!1,I==="none"){N(Xu(k)),S(!0);return}if(I==="css-transition"){const Y=IRe(k);if(N(Xu(k)),!H)return Y;const X=Xg(k,"transition-duration","0s");return R(X),S(!0),Y}N(Xu(k));const G=Xg(k,"animation-name","none");if(!H){G();return}const U=Xg(k,"animation-duration","0s");G(),R(U),S(!0);return}if(!s&&a&&(f==="idle"||f==="starting")){if(I==="none"){N(Yu,!1),l(!1);return}N(Xu(k));return}if(f!=="ending")return;if(I==="none"){l(!1);return}const V=Xu(k);if(!(V.height>0||V.width>0)){l(!1);return}N(V),I==="css-animation"&&Xg(k,"animation-name","none")()},[a,s,P,N,l,R,_,f]),Md({enabled:s&&a&&C==="idle",open:!0,ref:d,onComplete(){s&&N(Yu,!1)}}),x.useEffect(()=>{if(s||!a||C!=="ending")return;if(!d.current){l(!1),N(Yu,!1);return}const I=new AbortController;let V=-1;function M(){E.current||(l(!1),N(Yu,!1))}return V=rr.request(()=>{T(M,I.signal)}),()=>{rr.cancel(V),I.abort()}},[E,a,s,C,T,N,l]),le(()=>{const k=d.current;!k||!n||!A||k.setAttribute("hidden","until-found")},[A,n]),x.useEffect(function(){const I=d.current;if(!I)return;const V=Ki.create();let M=-1;const H=(Y,X)=>{V.start(0,()=>{E.current||(M=rr.request(()=>{E.current||(Y&&(g.current=!1),X&&I.setAttribute(Yg,""),I.setAttribute("hidden","until-found"))}))})},U=Ve(I,"beforematch",Y=>{const X=Re(Ci,Y);if(o(!0,X),X.isCanceled){H(!1,!1);return}g.current=!0;const te=I.hasAttribute(Yg);I.removeAttribute(Yg),u(!0),H(!0,te)});return()=>{V.clear(),rr.cancel(M),U()}},[E,o,u]);const L=i||n||a||s;return{height:$.height,props:{...D?{[Yg]:""}:void 0,hidden:A,id:r},ref:j,shouldPreventOpenAnimation:_,shouldRender:L,transitionStatus:C,width:$.width}}function Xu(e){return{height:e.scrollHeight,width:e.scrollWidth}}function DRe(e,t){const n=Nt(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&nI(n.animationDuration),i=nI(n.transitionDuration);return r&&i||i?"css-transition":r?"css-animation":"none"}function nI(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Xg(e,t,n){const r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function IRe(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(i=>{e.style.setProperty(i,"initial","important")});function n(){Object.entries(t).forEach(([i,a])=>{if(a===""){e.style.removeProperty(i);return}e.style.setProperty(i,a)})}const r=rr.request(n);return()=>{rr.cancel(r),n()}}const kRe="--collapsible-panel-height",LRe="--collapsible-panel-width",BRe=x.forwardRef(function(t,n){const{className:r,hiddenUntilFound:i,keepMounted:a,render:o,id:s,style:l,...u}=t,{defaultPanelId:f,mounted:d,onOpenChange:p,open:h,setMounted:y,setPanelIdState:m,setOpen:g,state:b,transitionStatus:v}=l8(),w=i??!1,S=a??!1,O=s||void 0,j=O??f;le(()=>(m(B=>O??(B===null?void 0:B)),()=>{m(B=>B===O?null:B)}),[O,m]);const{height:E,props:T,ref:A,shouldPreventOpenAnimation:C,shouldRender:_,transitionStatus:$,width:D}=$Re({externalRef:n,hiddenUntilFound:w,id:j,keepMounted:S,mounted:d,onOpenChange:p,open:h,setMounted:y,setOpen:g,transitionStatus:v}),N={...b,transitionStatus:$},P=DU(l,N),R=it("div",{...t,style:void 0},{state:N,ref:A,props:[T,{style:{[kRe]:E===void 0?"auto":`${E}px`,[LRe]:D===void 0?"auto":`${D}px`}},u,P?{style:P}:void 0,C?{style:{animationName:"none"}}:void 0],stateAttributesMapping:u8});return _?R:null});function zRe({...e}){return c.jsx(RRe,{"data-slot":"collapsible",...e})}function FRe({...e}){return c.jsx(PRe,{"data-slot":"collapsible-trigger",...e})}function URe({...e}){return c.jsx(BRe,{"data-slot":"collapsible-content",...e})}function c8(e){return it(e.defaultTagName??"div",e,e)}const S1=768;function HRe(){const[e,t]=x.useState(void 0);return x.useEffect(()=>{const n=()=>{t(window.innerWidth<S1)};if(t(window.innerWidth<S1),typeof window.matchMedia!="function")return;const r=window.matchMedia(`(max-width: ${S1-1}px)`);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),!!e}const qRe=x.forwardRef(function(t,n){const{className:r,render:i,orientation:a="horizontal",style:o,...s}=t;return it("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},s]})});function VRe({...e}){return c.jsx(QC,{"data-slot":"sheet",...e})}function GRe({...e}){return c.jsx(WC,{"data-slot":"sheet-portal",...e})}function KRe({className:e,...t}){return c.jsx(vC,{"data-slot":"sheet-overlay",className:ge("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function YRe({className:e,children:t,side:n="right",showCloseButton:r=!0,...i}){return c.jsxs(GRe,{children:[c.jsx(KRe,{}),c.jsxs(KC,{"data-slot":"sheet-content","data-side":n,className:ge("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...i,children:[t,r&&c.jsxs(XU,{"data-slot":"sheet-close",render:c.jsx(Ql,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[c.jsx(Z6,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function XRe({className:e,...t}){return c.jsx("div",{"data-slot":"sheet-header",className:ge("flex flex-col gap-1.5 p-4",e),...t})}function WRe({className:e,...t}){return c.jsx(ZC,{"data-slot":"sheet-title",className:ge("cn-font-heading font-medium text-foreground",e),...t})}function QRe({className:e,...t}){return c.jsx(SC,{"data-slot":"sheet-description",className:ge("text-sm text-muted-foreground",e),...t})}function to({className:e,...t}){return c.jsx("div",{"data-slot":"skeleton",className:ge("animate-pulse rounded-md bg-muted",e),...t})}function ZRe({delay:e=0,...t}){return c.jsx(XCe,{"data-slot":"tooltip-provider",delay:e,...t})}function JRe({...e}){return c.jsx(LCe,{"data-slot":"tooltip",...e})}function eMe({...e}){return c.jsx(UCe,{"data-slot":"tooltip-trigger",...e})}function tMe({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:i=0,children:a,...o}){return c.jsx(VCe,{children:c.jsx(GCe,{align:r,alignOffset:i,side:t,sideOffset:n,className:"isolate z-50",children:c.jsxs(KCe,{"data-slot":"tooltip-content",className:ge("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[a,c.jsx(YCe,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const nMe="sidebar_state",rMe=60*60*24*7,iMe="16rem",aMe="18rem",oMe="3rem",sMe="b",f8=x.createContext(null);function I0(){const e=x.useContext(f8);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function lMe({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){const s=HRe(),[l,u]=x.useState(!1),[f,d]=x.useState(e),p=t??f,h=x.useCallback(b=>{const v=typeof b=="function"?b(p):b;n?n(v):d(v),document.cookie=`${nMe}=${v}; path=/; max-age=${rMe}`},[n,p]),y=x.useCallback(()=>s?u(b=>!b):h(b=>!b),[s,h,u]);x.useEffect(()=>{const b=v=>{v.key===sMe&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),y())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[y]);const m=p?"expanded":"collapsed",g=x.useMemo(()=>({state:m,open:p,setOpen:h,isMobile:s,openMobile:l,setOpenMobile:u,toggleSidebar:y}),[m,p,h,s,l,u,y]);return c.jsx(f8.Provider,{value:g,children:c.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":iMe,"--sidebar-width-icon":oMe,...i},className:ge("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...o,children:a})})}function uMe({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:i,dir:a,...o}){const{isMobile:s,state:l,openMobile:u,setOpenMobile:f}=I0();return n==="none"?c.jsx("div",{"data-slot":"sidebar",className:ge("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...o,children:i}):s?c.jsx(VRe,{open:u,onOpenChange:f,...o,children:c.jsxs(YRe,{dir:a,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":aMe},side:e,children:[c.jsxs(XRe,{className:"sr-only",children:[c.jsx(WRe,{children:"Sidebar"}),c.jsx(QRe,{children:"Displays the mobile sidebar."})]}),c.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):c.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[c.jsx("div",{"data-slot":"sidebar-gap",className:ge("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),c.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:ge("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:c.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:i})})]})}function cMe({className:e,onClick:t,...n}){const{toggleSidebar:r}=I0();return c.jsxs(Ql,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:ge(e),onClick:i=>{t==null||t(i),r()},...n,children:[c.jsx(QNe,{className:"cn-rtl-flip"}),c.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function fMe({className:e,...t}){return c.jsx("main",{"data-slot":"sidebar-inset",className:ge("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function dMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ge("flex flex-col gap-2 p-2",e),...t})}function pMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ge("flex flex-col gap-2 p-2",e),...t})}function hMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ge("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function rI({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ge("relative flex w-full min-w-0 flex-col p-2",e),...t})}function iI({className:e,render:t,...n}){return c8({defaultTagName:"div",props:Ir({className:ge("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e)},n),render:t,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function aI({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ge("w-full text-sm",e),...t})}function mMe({className:e,...t}){return c.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ge("flex w-full min-w-0 flex-col gap-1",e),...t})}function gMe({className:e,...t}){return c.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ge("group/menu-item relative",e),...t})}const vMe=md("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function oI({render:e,isActive:t=!1,variant:n="default",size:r="default",tooltip:i,className:a,...o}){const{isMobile:s,state:l}=I0(),u=c8({defaultTagName:"button",props:Ir({className:ge(vMe({variant:n,size:r}),a)},o),render:i?c.jsx(eMe,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:t}});return i?(typeof i=="string"&&(i={children:i}),c.jsxs(JRe,{children:[u,c.jsx(tMe,{side:"right",align:"center",hidden:l!=="collapsed"||s,...i})]})):u}function yMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:ge("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",e),...t})}function Kp(e){return typeof e=="object"&&e!==null?e:void 0}function bMe(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){const r=Kp(n);!r||typeof r.id!="string"||typeof r.title!="string"||!Oc(r.href)||t.push({id:r.id,title:r.title,...typeof r.package=="string"?{package:r.package}:{},icon:r8(r.icon),href:r.href})}return t}function d8(e){const t=Kp(e),n=Array.isArray(t==null?void 0:t.results)?t.results:Array.isArray(t==null?void 0:t.groups)?t.groups:[],r=[];for(const i of n){const a=Kp(i);if(!a||typeof a.id!="string"||typeof a.title!="string"||!Array.isArray(a.hits))continue;const o=[];for(const s of a.hits){const l=Kp(s);!l||typeof l.title!="string"||!Oc(l.href)||o.push({title:l.title,...typeof l.subtitle=="string"?{subtitle:l.subtitle}:{},href:l.href})}o.length>0&&r.push({id:a.id,title:a.title,icon:r8(a.icon),hits:o})}return r}class TE extends Error{constructor(t){super(`HTTP ${t}`),this.status=t,this.name="HttpError"}}const xMe=new Set([404,405,501]);function p8(e){return e instanceof TE&&xMe.has(e.status)}const Pb=new Set,AE=new Set;function wMe(e){return!Pb.has(e)}function SMe(e){return AE.add(e),()=>{AE.delete(e)}}function OMe(e){if(!Pb.has(e)){Pb.add(e);for(const t of AE)t()}}async function c_(e,t,n){if(Pb.has(e))throw new TE(404);const r=await fetch(t,{headers:{accept:"application/json"},credentials:"same-origin",...n?{signal:n}:{}});if(!r.ok){const i=new TE(r.status);throw p8(i)&&OMe(e),i}return r.json()}let Fa;function h8(e){if((Fa==null?void 0:Fa.endpoint)===e.endpoint)return Fa.result;const t=c_(e.endpoint,e.endpoint).then(n=>{var r;return bMe((r=Kp(n))==null?void 0:r.consoles)}).catch(n=>(!p8(n)&&(Fa==null?void 0:Fa.result)===t&&(Fa=void 0),[]));return Fa={endpoint:e.endpoint,result:t},t}async function jMe(e,t,n){return d8(await c_(e.endpoint,`${e.endpoint}?q=${encodeURIComponent(t)}`,n))}async function EMe(e,t,n,r){const i=`${e.endpoint}?q=${encodeURIComponent(t)}&console=${encodeURIComponent(n)}`;return d8(await c_(e.endpoint,i,r)).filter(a=>a.id===n)}async function TMe(e,t){if(!e.self)return;if(!t)return[e.self];const n=await h8(t);if(n.length!==0)return[e.self,...n.map(r=>r.id).filter(r=>r!==e.self)]}var sI=1,AMe=.9,CMe=.8,_Me=.17,O1=.1,j1=.999,NMe=.9999,RMe=.99,MMe=/[\\\/_+.#"@\[\(\{&]/,PMe=/[\\\/_+.#"@\[\(\{&]/g,$Me=/[\s-]/,m8=/[\s-]/g;function CE(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?sI:RMe;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var l=r.charAt(a),u=n.indexOf(l,i),f=0,d,p,h,y;u>=0;)d=CE(e,t,n,r,u+1,a+1,o),d>f&&(u===i?d*=sI:MMe.test(e.charAt(u-1))?(d*=CMe,h=e.slice(i,u-1).match(PMe),h&&i>0&&(d*=Math.pow(j1,h.length))):$Me.test(e.charAt(u-1))?(d*=AMe,y=e.slice(i,u-1).match(m8),y&&i>0&&(d*=Math.pow(j1,y.length))):(d*=_Me,i>0&&(d*=Math.pow(j1,u-i))),e.charAt(u)!==t.charAt(a)&&(d*=NMe)),(d<O1&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=CE(e,t,n,r,u+1,a+2,o),p*O1>d&&(d=p*O1)),d>f&&(f=d),u=n.indexOf(l,u+1);return o[s]=f,f}function lI(e){return e.toLowerCase().replace(m8," ")}function DMe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,CE(e,t,lI(e),lI(t),0,0,{})}function Ps(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function uI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bu(...e){return t=>{let n=!1;const r=e.map(i=>{const a=uI(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():uI(e[i],null)}}}}function Lu(...e){return x.useCallback(bu(...e),e)}function IMe(e,t){const n=x.createContext(t),r=a=>{const{children:o,...s}=a,l=x.useMemo(()=>s,Object.values(s));return c.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function kMe(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),l=n.length;n=[...n,o];const u=d=>{var b;const{scope:p,children:h,...y}=d,m=((b=p==null?void 0:p[e])==null?void 0:b[l])||s,g=x.useMemo(()=>y,Object.values(y));return c.jsx(m.Provider,{value:g,children:h})};u.displayName=a+"Provider";function f(d,p){var m;const h=((m=p==null?void 0:p[e])==null?void 0:m[l])||s,y=x.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,f]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,LMe(i,...t)]}function LMe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(a)[`__scope${u}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var nm=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},BMe=zb[" useId ".trim().toString()]||(()=>{}),zMe=0;function co(e){const[t,n]=x.useState(BMe());return nm(()=>{n(r=>r??String(zMe++))},[e]),t?`radix-${t}`:""}var FMe=zb[" useInsertionEffect ".trim().toString()]||nm;function UMe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=HMe({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const f=x.useRef(e!==void 0);x.useEffect(()=>{const d=f.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const u=x.useCallback(f=>{var d;if(s){const p=qMe(f)?f(e):f;p!==e&&((d=o.current)==null||d.call(o,p))}else a(f)},[s,e,a,o]);return[l,u]}function HMe({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),a=x.useRef(t);return FMe(()=>{a.current=t},[t]),x.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function qMe(e){return typeof e=="function"}function g8(e){const t=VMe(e),n=x.forwardRef((r,i)=>{const{children:a,...o}=r,s=x.Children.toArray(a),l=s.find(KMe);if(l){const u=l.props.children,f=s.map(d=>d===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return c.jsx(t,{...o,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,f):null})}return c.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function VMe(e){const t=x.forwardRef((n,r)=>{const{children:i,...a}=n;if(x.isValidElement(i)){const o=XMe(i),s=YMe(a,i.props);return i.type!==x.Fragment&&(s.ref=r?bu(r,o):o),x.cloneElement(i,s)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GMe=Symbol("radix.slottable");function KMe(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GMe}function YMe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function XMe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var WMe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qn=WMe.reduce((e,t)=>{const n=g8(`Primitive.${t}`),r=x.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function QMe(e,t){e&&Ni.flushSync(()=>e.dispatchEvent(t))}function rm(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ZMe(e,t=globalThis==null?void 0:globalThis.document){const n=rm(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var JMe="DismissableLayer",_E="dismissableLayer.update",ePe="dismissableLayer.pointerDownOutside",tPe="dismissableLayer.focusOutside",cI,v8=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y8=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=x.useContext(v8),[f,d]=x.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),y=Lu(t,E=>d(E)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(g),v=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=b,O=iPe(E=>{const T=E.target,A=[...u.branches].some(C=>C.contains(T));!S||A||(i==null||i(E),o==null||o(E),E.defaultPrevented||s==null||s())},p),j=aPe(E=>{const T=E.target;[...u.branches].some(C=>C.contains(T))||(a==null||a(E),o==null||o(E),E.defaultPrevented||s==null||s())},p);return ZMe(E=>{v===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),x.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(cI=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),fI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=cI)}},[f,p,n,u]),x.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),fI())},[f,u]),x.useEffect(()=>{const E=()=>h({});return document.addEventListener(_E,E),()=>document.removeEventListener(_E,E)},[]),c.jsx(Qn.div,{...l,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:Ps(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Ps(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ps(e.onPointerDownCapture,O.onPointerDownCapture)})});y8.displayName=JMe;var nPe="DismissableLayerBranch",rPe=x.forwardRef((e,t)=>{const n=x.useContext(v8),r=x.useRef(null),i=Lu(t,r);return x.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),c.jsx(Qn.div,{...e,ref:i})});rPe.displayName=nPe;function iPe(e,t=globalThis==null?void 0:globalThis.document){const n=rm(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){b8(ePe,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function aPe(e,t=globalThis==null?void 0:globalThis.document){const n=rm(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&b8(tPe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fI(){const e=new CustomEvent(_E);document.dispatchEvent(e)}function b8(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?QMe(i,a):i.dispatchEvent(a)}var E1="focusScope.autoFocusOnMount",T1="focusScope.autoFocusOnUnmount",dI={bubbles:!1,cancelable:!0},oPe="FocusScope",x8=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=x.useState(null),u=rm(i),f=rm(a),d=x.useRef(null),p=Lu(t,m=>l(m)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let m=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?d.current=S:Xo(d.current,{select:!0})},g=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||Xo(d.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const O of w)O.removedNodes.length>0&&Xo(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(b);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()}}},[r,s,h.paused]),x.useEffect(()=>{if(s){hI.add(h);const m=document.activeElement;if(!s.contains(m)){const b=new CustomEvent(E1,dI);s.addEventListener(E1,u),s.dispatchEvent(b),b.defaultPrevented||(sPe(dPe(w8(s)),{select:!0}),document.activeElement===m&&Xo(s))}return()=>{s.removeEventListener(E1,u),setTimeout(()=>{const b=new CustomEvent(T1,dI);s.addEventListener(T1,f),s.dispatchEvent(b),b.defaultPrevented||Xo(m??document.body,{select:!0}),s.removeEventListener(T1,f),hI.remove(h)},0)}}},[s,u,f,h]);const y=x.useCallback(m=>{if(!n&&!r||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(g&&b){const v=m.currentTarget,[w,S]=lPe(v);w&&S?!m.shiftKey&&b===S?(m.preventDefault(),n&&Xo(w,{select:!0})):m.shiftKey&&b===w&&(m.preventDefault(),n&&Xo(S,{select:!0})):b===v&&m.preventDefault()}},[n,r,h.paused]);return c.jsx(Qn.div,{tabIndex:-1,...o,ref:p,onKeyDown:y})});x8.displayName=oPe;function sPe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xo(r,{select:t}),document.activeElement!==n)return}function lPe(e){const t=w8(e),n=pI(t,e),r=pI(t.reverse(),e);return[n,r]}function w8(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pI(e,t){for(const n of e)if(!uPe(n,{upTo:t}))return n}function uPe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cPe(e){return e instanceof HTMLInputElement&&"select"in e}function Xo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cPe(e)&&t&&e.select()}}var hI=fPe();function fPe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=mI(e,t),e.unshift(t)},remove(t){var n;e=mI(e,t),(n=e[0])==null||n.resume()}}}function mI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dPe(e){return e.filter(t=>t.tagName!=="A")}var pPe="Portal",S8=x.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=x.useState(!1);nm(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?_V.createPortal(c.jsx(Qn.div,{...r,ref:t}),o):null});S8.displayName=pPe;function hPe(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var k0=e=>{const{present:t,children:n}=e,r=mPe(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=Lu(r.ref,gPe(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};k0.displayName="Presence";function mPe(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,l]=hPe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=Wg(r.current);a.current=s==="mounted"?u:"none"},[s]),nm(()=>{const u=r.current,f=i.current;if(f!==e){const p=a.current,h=Wg(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),nm(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=h=>{const m=Wg(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=h=>{h.target===t&&(a.current=Wg(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Wg(e){return(e==null?void 0:e.animationName)||"none"}function gPe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var A1=0;function vPe(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gI()),document.body.insertAdjacentElement("beforeend",e[1]??gI()),A1++,()=>{A1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),A1--}},[])}function gI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fa=function(){return fa=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},fa.apply(this,arguments)};function O8(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yPe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Rv="right-scroll-bar-position",Mv="width-before-scroll-bar",bPe="with-scroll-bars-hidden",xPe="--removed-body-scroll-bar-size";function C1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wPe(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var SPe=typeof window<"u"?x.useLayoutEffect:x.useEffect,vI=new WeakMap;function OPe(e,t){var n=wPe(null,function(r){return e.forEach(function(i){return C1(i,r)})});return SPe(function(){var r=vI.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||C1(s,null)}),a.forEach(function(s){i.has(s)||C1(s,o)})}vI.set(n,e)},[e]),n}function jPe(e){return e}function EPe(e,t){t===void 0&&(t=jPe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var l=function(){var f=o;o=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),n}}}};return i}function TPe(e){e===void 0&&(e={});var t=EPe(null);return t.options=fa({async:!0,ssr:!1},e),t}var j8=function(e){var t=e.sideCar,n=O8(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,fa({},n))};j8.isSideCarExport=!0;function APe(e,t){return e.useMedium(t),j8}var E8=TPe(),_1=function(){},L0=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:_1,onWheelCapture:_1,onTouchMoveCapture:_1}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noRelative,y=e.noIsolation,m=e.inert,g=e.allowPinchZoom,b=e.as,v=b===void 0?"div":b,w=e.gapMode,S=O8(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,j=OPe([n,t]),E=fa(fa({},S),i);return x.createElement(x.Fragment,null,f&&x.createElement(O,{sideCar:E8,removeScrollBar:u,shards:d,noRelative:h,noIsolation:y,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),o?x.cloneElement(x.Children.only(s),fa(fa({},E),{ref:j})):x.createElement(v,fa({},E,{className:l,ref:j}),s))});L0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};L0.classNames={fullWidth:Mv,zeroRight:Rv};var CPe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _Pe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=CPe();return t&&e.setAttribute("nonce",t),e}function NPe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RPe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var MPe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_Pe())&&(NPe(t,n),RPe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},PPe=function(){var e=MPe();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},T8=function(){var e=PPe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$Pe={left:0,top:0,right:0,gap:0},N1=function(e){return parseInt(e||"",10)||0},DPe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[N1(n),N1(r),N1(i)]},IPe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $Pe;var t=DPe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},kPe=T8(),Yc="data-scroll-locked",LPe=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
169
|
+
.`.concat(bPe,` {
|
|
170
|
+
overflow: hidden `).concat(r,`;
|
|
171
|
+
padding-right: `).concat(s,"px ").concat(r,`;
|
|
172
|
+
}
|
|
173
|
+
body[`).concat(Yc,`] {
|
|
174
|
+
overflow: hidden `).concat(r,`;
|
|
175
|
+
overscroll-behavior: contain;
|
|
176
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
177
|
+
padding-left: `.concat(i,`px;
|
|
178
|
+
padding-top: `).concat(a,`px;
|
|
179
|
+
padding-right: `).concat(o,`px;
|
|
180
|
+
margin-left:0;
|
|
181
|
+
margin-top:0;
|
|
182
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
183
|
+
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.`).concat(Rv,` {
|
|
187
|
+
right: `).concat(s,"px ").concat(r,`;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.`).concat(Mv,` {
|
|
191
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.`).concat(Rv," .").concat(Rv,` {
|
|
195
|
+
right: 0 `).concat(r,`;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.`).concat(Mv," .").concat(Mv,` {
|
|
199
|
+
margin-right: 0 `).concat(r,`;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
body[`).concat(Yc,`] {
|
|
203
|
+
`).concat(xPe,": ").concat(s,`px;
|
|
204
|
+
}
|
|
205
|
+
`)},yI=function(){var e=parseInt(document.body.getAttribute(Yc)||"0",10);return isFinite(e)?e:0},BPe=function(){x.useEffect(function(){return document.body.setAttribute(Yc,(yI()+1).toString()),function(){var e=yI()-1;e<=0?document.body.removeAttribute(Yc):document.body.setAttribute(Yc,e.toString())}},[])},zPe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;BPe();var a=x.useMemo(function(){return IPe(i)},[i]);return x.createElement(kPe,{styles:LPe(a,!t,i,n?"":"!important")})},NE=!1;if(typeof window<"u")try{var Qg=Object.defineProperty({},"passive",{get:function(){return NE=!0,!0}});window.addEventListener("test",Qg,Qg),window.removeEventListener("test",Qg,Qg)}catch{NE=!1}var Wu=NE?{passive:!1}:!1,FPe=function(e){return e.tagName==="TEXTAREA"},A8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!FPe(e)&&n[t]==="visible")},UPe=function(e){return A8(e,"overflowY")},HPe=function(e){return A8(e,"overflowX")},bI=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=C8(e,r);if(i){var a=_8(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qPe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},VPe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},C8=function(e,t){return e==="v"?UPe(t):HPe(t)},_8=function(e,t){return e==="v"?qPe(t):VPe(t)},GPe=function(e,t){return e==="h"&&t==="rtl"?-1:1},KPe=function(e,t,n,r,i){var a=GPe(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,l=t.contains(s),u=!1,f=o>0,d=0,p=0;do{if(!s)break;var h=_8(e,s),y=h[0],m=h[1],g=h[2],b=m-g-a*y;(y||b)&&C8(e,s)&&(d+=b,p+=y);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(d)<1||!f&&Math.abs(p)<1)&&(u=!0),u},Zg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xI=function(e){return[e.deltaX,e.deltaY]},wI=function(e){return e&&"current"in e?e.current:e},YPe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},XPe=function(e){return`
|
|
206
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
207
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
208
|
+
`)},WPe=0,Qu=[];function QPe(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(WPe++)[0],a=x.useState(T8)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=yPe([e.lockRef.current],(e.shards||[]).map(wI),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var b=Zg(m),v=n.current,w="deltaX"in m?m.deltaX:v[0]-b[0],S="deltaY"in m?m.deltaY:v[1]-b[1],O,j=m.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&E==="h"&&j.type==="range")return!1;var T=window.getSelection(),A=T&&T.anchorNode,C=A?A===j||A.contains(j):!1;if(C)return!1;var _=bI(E,j);if(!_)return!0;if(_?O=E:(O=E==="v"?"h":"v",_=bI(E,j)),!_)return!1;if(!r.current&&"changedTouches"in m&&(w||S)&&(r.current=O),!O)return!0;var $=r.current||O;return KPe($,g,m,$==="h"?w:S)},[]),l=x.useCallback(function(m){var g=m;if(!(!Qu.length||Qu[Qu.length-1]!==a)){var b="deltaY"in g?xI(g):Zg(g),v=t.current.filter(function(O){return O.name===g.type&&(O.target===g.target||g.target===O.shadowParent)&&YPe(O.delta,b)})[0];if(v&&v.should){g.cancelable&&g.preventDefault();return}if(!v){var w=(o.current.shards||[]).map(wI).filter(Boolean).filter(function(O){return O.contains(g.target)}),S=w.length>0?s(g,w[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=x.useCallback(function(m,g,b,v){var w={name:m,delta:g,target:b,should:v,shadowParent:ZPe(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=x.useCallback(function(m){n.current=Zg(m),r.current=void 0},[]),d=x.useCallback(function(m){u(m.type,xI(m),m.target,s(m,e.lockRef.current))},[]),p=x.useCallback(function(m){u(m.type,Zg(m),m.target,s(m,e.lockRef.current))},[]);x.useEffect(function(){return Qu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Wu),document.addEventListener("touchmove",l,Wu),document.addEventListener("touchstart",f,Wu),function(){Qu=Qu.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Wu),document.removeEventListener("touchmove",l,Wu),document.removeEventListener("touchstart",f,Wu)}},[]);var h=e.removeScrollBar,y=e.inert;return x.createElement(x.Fragment,null,y?x.createElement(a,{styles:XPe(i)}):null,h?x.createElement(zPe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ZPe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const JPe=APe(E8,QPe);var N8=x.forwardRef(function(e,t){return x.createElement(L0,fa({},e,{ref:t,sideCar:JPe}))});N8.classNames=L0.classNames;var e2e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zu=new WeakMap,Jg=new WeakMap,ev={},R1=0,R8=function(e){return e&&(e.host||R8(e.parentNode))},t2e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=R8(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},n2e=function(e,t,n,r){var i=t2e(t,Array.isArray(e)?e:[e]);ev[n]||(ev[n]=new WeakMap);var a=ev[n],o=[],s=new Set,l=new Set(i),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",m=(Zu.get(p)||0)+1,g=(a.get(p)||0)+1;Zu.set(p,m),a.set(p,g),o.push(p),m===1&&y&&Jg.set(p,!0),g===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return f(t),s.clear(),R1++,function(){o.forEach(function(d){var p=Zu.get(d)-1,h=a.get(d)-1;Zu.set(d,p),a.set(d,h),p||(Jg.has(d)||d.removeAttribute(r),Jg.delete(d)),h||d.removeAttribute(n)}),R1--,R1||(Zu=new WeakMap,Zu=new WeakMap,Jg=new WeakMap,ev={})}},r2e=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=e2e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),n2e(r,i,n,"aria-hidden")):function(){return null}},B0="Dialog",[M8]=kMe(B0),[i2e,Qi]=M8(B0),P8=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),l=x.useRef(null),[u,f]=UMe({prop:r,defaultProp:i??!1,onChange:a,caller:B0});return c.jsx(i2e,{scope:t,triggerRef:s,contentRef:l,contentId:co(),titleId:co(),descriptionId:co(),open:u,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(d=>!d),[f]),modal:o,children:n})};P8.displayName=B0;var $8="DialogTrigger",a2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi($8,n),a=Lu(t,i.triggerRef);return c.jsx(Qn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":p_(i.open),...r,ref:a,onClick:Ps(e.onClick,i.onOpenToggle)})});a2e.displayName=$8;var f_="DialogPortal",[o2e,D8]=M8(f_,{forceMount:void 0}),I8=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Qi(f_,t);return c.jsx(o2e,{scope:t,forceMount:n,children:x.Children.map(r,o=>c.jsx(k0,{present:n||a.open,children:c.jsx(S8,{asChild:!0,container:i,children:o})}))})};I8.displayName=f_;var $b="DialogOverlay",k8=x.forwardRef((e,t)=>{const n=D8($b,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Qi($b,e.__scopeDialog);return a.modal?c.jsx(k0,{present:r||a.open,children:c.jsx(l2e,{...i,ref:t})}):null});k8.displayName=$b;var s2e=g8("DialogOverlay.RemoveScroll"),l2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi($b,n);return c.jsx(N8,{as:s2e,allowPinchZoom:!0,shards:[i.contentRef],children:c.jsx(Qn.div,{"data-state":p_(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xu="DialogContent",L8=x.forwardRef((e,t)=>{const n=D8(xu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Qi(xu,e.__scopeDialog);return c.jsx(k0,{present:r||a.open,children:a.modal?c.jsx(u2e,{...i,ref:t}):c.jsx(c2e,{...i,ref:t})})});L8.displayName=xu;var u2e=x.forwardRef((e,t)=>{const n=Qi(xu,e.__scopeDialog),r=x.useRef(null),i=Lu(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return r2e(a)},[]),c.jsx(B8,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ps(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ps(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Ps(e.onFocusOutside,a=>a.preventDefault())})}),c2e=x.forwardRef((e,t)=>{const n=Qi(xu,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return c.jsx(B8,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),B8=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Qi(xu,n),l=x.useRef(null),u=Lu(t,l);return vPe(),c.jsxs(c.Fragment,{children:[c.jsx(x8,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:c.jsx(y8,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":p_(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(h2e,{titleId:s.titleId}),c.jsx(g2e,{contentRef:l,descriptionId:s.descriptionId})]})]})}),d_="DialogTitle",f2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(d_,n);return c.jsx(Qn.h2,{id:i.titleId,...r,ref:t})});f2e.displayName=d_;var z8="DialogDescription",d2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(z8,n);return c.jsx(Qn.p,{id:i.descriptionId,...r,ref:t})});d2e.displayName=z8;var F8="DialogClose",p2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(F8,n);return c.jsx(Qn.button,{type:"button",...r,ref:t,onClick:Ps(e.onClick,()=>i.onOpenChange(!1))})});p2e.displayName=F8;function p_(e){return e?"open":"closed"}var U8="DialogTitleWarning",[$5e,H8]=IMe(U8,{contentName:xu,titleName:d_,docsSlug:"dialog"}),h2e=({titleId:e})=>{const t=H8(U8),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
209
|
+
|
|
210
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
211
|
+
|
|
212
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},m2e="DialogDescriptionWarning",g2e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H8(m2e).contentName}}.`;return x.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},v2e=P8,y2e=I8,b2e=k8,x2e=L8,cp='[cmdk-group=""]',M1='[cmdk-group-items=""]',w2e='[cmdk-group-heading=""]',q8='[cmdk-item=""]',SI=`${q8}:not([aria-disabled="true"])`,RE="cmdk-item-select",ic="data-value",S2e=(e,t,n)=>DMe(e,t,n),V8=x.createContext(void 0),qm=()=>x.useContext(V8),G8=x.createContext(void 0),h_=()=>x.useContext(G8),K8=x.createContext(void 0),Y8=x.forwardRef((e,t)=>{let n=ac(()=>{var M,H;return{search:"",value:(H=(M=e.value)!=null?M:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ac(()=>new Set),i=ac(()=>new Map),a=ac(()=>new Map),o=ac(()=>new Set),s=X8(e),{label:l,children:u,value:f,onValueChange:d,filter:p,shouldFilter:h,loop:y,disablePointerSelection:m=!1,vimBindings:g=!0,...b}=e,v=co(),w=co(),S=co(),O=x.useRef(null),j=P2e();wu(()=>{if(f!==void 0){let M=f.trim();n.current.value=M,E.emit()}},[f]),wu(()=>{j(6,D)},[]);let E=x.useMemo(()=>({subscribe:M=>(o.current.add(M),()=>o.current.delete(M)),snapshot:()=>n.current,setState:(M,H,G)=>{var U,Y,X,te;if(!Object.is(n.current[M],H)){if(n.current[M]=H,M==="search")$(),C(),j(1,_);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(S);q?q.focus():(U=document.getElementById(v))==null||U.focus()}if(j(7,()=>{var q;n.current.selectedItemId=(q=N())==null?void 0:q.id,E.emit()}),G||j(5,D),((Y=s.current)==null?void 0:Y.value)!==void 0){let q=H??"";(te=(X=s.current).onValueChange)==null||te.call(X,q);return}}E.emit()}},emit:()=>{o.current.forEach(M=>M())}}),[]),T=x.useMemo(()=>({value:(M,H,G)=>{var U;H!==((U=a.current.get(M))==null?void 0:U.value)&&(a.current.set(M,{value:H,keywords:G}),n.current.filtered.items.set(M,A(H,G)),j(2,()=>{C(),E.emit()}))},item:(M,H)=>(r.current.add(M),H&&(i.current.has(H)?i.current.get(H).add(M):i.current.set(H,new Set([M]))),j(3,()=>{$(),C(),n.current.value||_(),E.emit()}),()=>{a.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let G=N();j(4,()=>{$(),(G==null?void 0:G.getAttribute("id"))===M&&_(),E.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{a.current.delete(M),i.current.delete(M)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:S,labelId:w,listInnerRef:O}),[]);function A(M,H){var G,U;let Y=(U=(G=s.current)==null?void 0:G.filter)!=null?U:S2e;return M?Y(M,n.current.search,H):0}function C(){if(!n.current.search||s.current.shouldFilter===!1)return;let M=n.current.filtered.items,H=[];n.current.filtered.groups.forEach(U=>{let Y=i.current.get(U),X=0;Y.forEach(te=>{let q=M.get(te);X=Math.max(q,X)}),H.push([U,X])});let G=O.current;P().sort((U,Y)=>{var X,te;let q=U.getAttribute("id"),ee=Y.getAttribute("id");return((X=M.get(ee))!=null?X:0)-((te=M.get(q))!=null?te:0)}).forEach(U=>{let Y=U.closest(M1);Y?Y.appendChild(U.parentElement===Y?U:U.closest(`${M1} > *`)):G.appendChild(U.parentElement===G?U:U.closest(`${M1} > *`))}),H.sort((U,Y)=>Y[1]-U[1]).forEach(U=>{var Y;let X=(Y=O.current)==null?void 0:Y.querySelector(`${cp}[${ic}="${encodeURIComponent(U[0])}"]`);X==null||X.parentElement.appendChild(X)})}function _(){let M=P().find(G=>G.getAttribute("aria-disabled")!=="true"),H=M==null?void 0:M.getAttribute(ic);E.setState("value",H||void 0)}function $(){var M,H,G,U;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Y=0;for(let X of r.current){let te=(H=(M=a.current.get(X))==null?void 0:M.value)!=null?H:"",q=(U=(G=a.current.get(X))==null?void 0:G.keywords)!=null?U:[],ee=A(te,q);n.current.filtered.items.set(X,ee),ee>0&&Y++}for(let[X,te]of i.current)for(let q of te)if(n.current.filtered.items.get(q)>0){n.current.filtered.groups.add(X);break}n.current.filtered.count=Y}function D(){var M,H,G;let U=N();U&&(((M=U.parentElement)==null?void 0:M.firstChild)===U&&((G=(H=U.closest(cp))==null?void 0:H.querySelector(w2e))==null||G.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function N(){var M;return(M=O.current)==null?void 0:M.querySelector(`${q8}[aria-selected="true"]`)}function P(){var M;return Array.from(((M=O.current)==null?void 0:M.querySelectorAll(SI))||[])}function R(M){let H=P()[M];H&&E.setState("value",H.getAttribute(ic))}function B(M){var H;let G=N(),U=P(),Y=U.findIndex(te=>te===G),X=U[Y+M];(H=s.current)!=null&&H.loop&&(X=Y+M<0?U[U.length-1]:Y+M===U.length?U[0]:U[Y+M]),X&&E.setState("value",X.getAttribute(ic))}function L(M){let H=N(),G=H==null?void 0:H.closest(cp),U;for(;G&&!U;)G=M>0?R2e(G,cp):M2e(G,cp),U=G==null?void 0:G.querySelector(SI);U?E.setState("value",U.getAttribute(ic)):B(M)}let k=()=>R(P().length-1),I=M=>{M.preventDefault(),M.metaKey?k():M.altKey?L(1):B(1)},V=M=>{M.preventDefault(),M.metaKey?R(0):M.altKey?L(-1):B(-1)};return x.createElement(Qn.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:M=>{var H;(H=b.onKeyDown)==null||H.call(b,M);let G=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||G))switch(M.key){case"n":case"j":{g&&M.ctrlKey&&I(M);break}case"ArrowDown":{I(M);break}case"p":case"k":{g&&M.ctrlKey&&V(M);break}case"ArrowUp":{V(M);break}case"Home":{M.preventDefault(),R(0);break}case"End":{M.preventDefault(),k();break}case"Enter":{M.preventDefault();let U=N();if(U){let Y=new Event(RE);U.dispatchEvent(Y)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:D2e},l),z0(e,M=>x.createElement(G8.Provider,{value:E},x.createElement(V8.Provider,{value:T},M))))}),O2e=x.forwardRef((e,t)=>{var n,r;let i=co(),a=x.useRef(null),o=x.useContext(K8),s=qm(),l=X8(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;wu(()=>{if(!u)return s.item(i,o==null?void 0:o.id)},[u]);let f=W8(i,a,[e.value,e.children,a],e.keywords),d=h_(),p=Us(j=>j.value&&j.value===f.current),h=Us(j=>u||s.filter()===!1?!0:j.search?j.filtered.items.get(i)>0:!0);x.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(RE,y),()=>j.removeEventListener(RE,y)},[h,e.onSelect,e.disabled]);function y(){var j,E;m(),(E=(j=l.current).onSelect)==null||E.call(j,f.current)}function m(){d.setState("value",f.current,!0)}if(!h)return null;let{disabled:g,value:b,onSelect:v,forceMount:w,keywords:S,...O}=e;return x.createElement(Qn.div,{ref:bu(a,t),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!p,"data-disabled":!!g,"data-selected":!!p,onPointerMove:g||s.getDisablePointerSelection()?void 0:m,onClick:g?void 0:y},e.children)}),j2e=x.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=co(),s=x.useRef(null),l=x.useRef(null),u=co(),f=qm(),d=Us(h=>i||f.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);wu(()=>f.group(o),[]),W8(o,s,[e.value,e.heading,l]);let p=x.useMemo(()=>({id:o,forceMount:i}),[i]);return x.createElement(Qn.div,{ref:bu(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&x.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),z0(e,h=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},x.createElement(K8.Provider,{value:p},h))))}),E2e=x.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=x.useRef(null),a=Us(o=>!o.search);return!n&&!a?null:x.createElement(Qn.div,{ref:bu(i,t),...r,"cmdk-separator":"",role:"separator"})}),T2e=x.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=h_(),o=Us(u=>u.search),s=Us(u=>u.selectedItemId),l=qm();return x.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),x.createElement(Qn.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:i?e.value:o,onChange:u=>{i||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),A2e=x.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=x.useRef(null),o=x.useRef(null),s=Us(u=>u.selectedItemId),l=qm();return x.useEffect(()=>{if(o.current&&a.current){let u=o.current,f=a.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(d),p.unobserve(u)}}},[]),x.createElement(Qn.div,{ref:bu(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},z0(e,u=>x.createElement("div",{ref:bu(o,l.listInnerRef),"cmdk-list-sizer":""},u)))}),C2e=x.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return x.createElement(v2e,{open:n,onOpenChange:r},x.createElement(y2e,{container:o},x.createElement(b2e,{"cmdk-overlay":"",className:i}),x.createElement(x2e,{"aria-label":e.label,"cmdk-dialog":"",className:a},x.createElement(Y8,{ref:t,...s}))))}),_2e=x.forwardRef((e,t)=>Us(n=>n.filtered.count===0)?x.createElement(Qn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),N2e=x.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return x.createElement(Qn.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},z0(e,o=>x.createElement("div",{"aria-hidden":!0},o)))}),Vm=Object.assign(Y8,{List:A2e,Item:O2e,Input:T2e,Group:j2e,Separator:E2e,Dialog:C2e,Empty:_2e,Loading:N2e});function R2e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function M2e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function X8(e){let t=x.useRef(e);return wu(()=>{t.current=e}),t}var wu=typeof window>"u"?x.useEffect:x.useLayoutEffect;function ac(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function Us(e){let t=h_(),n=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,n,n)}function W8(e,t,n,r=[]){let i=x.useRef(),a=qm();return wu(()=>{var o;let s=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():i.current}})(),l=r.map(u=>u.trim());a.value(e,s,l),(o=t.current)==null||o.setAttribute(ic,s),i.current=s}),i}var P2e=()=>{let[e,t]=x.useState(),n=ac(()=>new Map);return wu(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function $2e(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function z0({asChild:e,children:t},n){return e&&x.isValidElement(t)?x.cloneElement($2e(t),{ref:t.ref},n(t.props.children)):n(t)}var D2e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function I2e({...e}){return c.jsx(QC,{"data-slot":"dialog",...e})}function k2e({...e}){return c.jsx(WC,{"data-slot":"dialog-portal",...e})}function L2e({className:e,...t}){return c.jsx(vC,{"data-slot":"dialog-overlay",className:ge("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function B2e({className:e,children:t,showCloseButton:n=!0,...r}){return c.jsxs(k2e,{children:[c.jsx(L2e,{}),c.jsxs(KC,{"data-slot":"dialog-content",className:ge("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[t,n&&c.jsxs(XU,{"data-slot":"dialog-close",render:c.jsx(Ql,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[c.jsx(Z6,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function z2e({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-header",className:ge("flex flex-col gap-2",e),...t})}function F2e({className:e,...t}){return c.jsx(ZC,{"data-slot":"dialog-title",className:ge("cn-font-heading leading-none font-medium",e),...t})}function U2e({className:e,...t}){return c.jsx(SC,{"data-slot":"dialog-description",className:ge("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function H2e({className:e,...t}){return c.jsx("div",{"data-slot":"input-group",role:"group",className:ge("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}const q2e=md("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function V2e({className:e,align:t="inline-start",...n}){return c.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:ge(q2e({align:t}),e),onClick:r=>{var i,a;r.target.closest("button")||(a=(i=r.currentTarget.parentElement)==null?void 0:i.querySelector("input"))==null||a.focus()},...n})}function G2e({className:e,...t}){return c.jsx(Vm,{"data-slot":"command",className:ge("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})}function K2e({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:i=!1,...a}){return c.jsxs(I2e,{...a,children:[c.jsxs(z2e,{className:"sr-only",children:[c.jsx(F2e,{children:e}),c.jsx(U2e,{children:t})]}),c.jsx(B2e,{className:ge("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",r),showCloseButton:i,children:n})]})}function Y2e({className:e,...t}){return c.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:c.jsxs(H2e,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[c.jsx(Vm.Input,{"data-slot":"command-input",className:ge("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),c.jsx(V2e,{children:c.jsx(u_,{className:"size-4 shrink-0 opacity-50"})})]})})}function X2e({className:e,...t}){return c.jsx(Vm.List,{"data-slot":"command-list",className:ge("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function OI({className:e,...t}){return c.jsx(Vm.Group,{"data-slot":"command-group",className:ge("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})}function jI({className:e,children:t,...n}){return c.jsxs(Vm.Item,{"data-slot":"command-item",className:ge("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:**:[svg]:text-foreground",e),...n,children:[t,c.jsx(e8,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function W2e({className:e,...t}){return c.jsx("kbd",{"data-slot":"kbd",className:ge("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",e),...t})}function Q2e(e,t){const n=t.trim().toLowerCase();return n===""?[...e]:e.filter(r=>[r.label,...r.keywords??[]].some(i=>i.toLowerCase().includes(n)))}function Q8(e){const t=e==null?void 0:e.endpoint;return x.useSyncExternalStore(SMe,x.useCallback(()=>t===void 0||wMe(t),[t]),()=>!0)?e:void 0}function Z2e(e,t){x.useEffect(()=>{if(!e)return;const n=r=>{(r.metaKey||r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(i=>!i))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t])}function J2e({onOpen:e,className:t}){return c.jsxs("button",{type:"button",onClick:e,"aria-keyshortcuts":"Control+K Meta+K","aria-label":"Search all consoles",className:ge("flex h-[26px] items-center gap-2 rounded-[6px] px-2.5 text-[11px] font-medium text-dim transition-colors hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",t),children:[c.jsx(u_,{className:"size-[13px]"}),c.jsx("span",{className:"hidden sm:inline",children:"Search"}),c.jsx(W2e,{className:"mono hidden h-4 text-[9px] sm:inline-flex",children:"⌘K"})]})}function EI({className:e}){return c.jsxs("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:"none","aria-hidden":"true","data-aviary-search-spinner":"",className:ge("animate-spin text-dim motion-reduce:animate-none",e),children:[c.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeOpacity:.25,strokeWidth:1.8}),c.jsx("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round"})]})}function e$e({remaining:e}){return c.jsxs("div",{"data-aviary-search-skeleton":"","aria-hidden":!0,className:"p-1",children:[c.jsx("div",{className:"px-2 py-1.5 text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground",children:Z8(e)}),[.55,.4,.48].map(t=>c.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1.5",children:[c.jsx(to,{className:"size-[18px] shrink-0 rounded-[5px] bg-fg/[0.08] motion-reduce:animate-none"}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[c.jsx(to,{className:"h-3 rounded-sm bg-fg/[0.08] motion-reduce:animate-none",style:{width:`${t*100}%`}}),c.jsx(to,{className:"h-2.5 rounded-sm bg-fg/[0.08] motion-reduce:animate-none",style:{width:`${t*55}%`}})]})]},t))]})}function Z8(e){return e===void 0?"Searching consoles…":`Searching ${e} ${e===1?"console":"consoles"}…`}const tv={phase:"idle",groups:[],fresh:!0,remaining:void 0,failed:0};function t$e({config:e,switcher:t,commands:n,open:r,onOpenChange:i,placeholder:a="Search runs, workflows, media…"}){const[o,s]=x.useState(""),[l,u]=x.useState(tv),[f,d]=x.useState(0),p=Q8(e),h=e!==void 0&&p===void 0;x.useEffect(()=>{r||s("")},[r]);const y=x.useMemo(()=>Q2e(n??[],o),[n,o]),m=x.useMemo(()=>{const N=new Map;for(const P of y)N.set(P.group,[...N.get(P.group)??[],P]);return[...N.entries()]},[y]);x.useEffect(()=>{const N=o.trim();if(N===""||!p){u(tv);return}const P=new AbortController,{signal:R}=P;u(L=>({...L,phase:"loading",fresh:!1,failed:0}));const B=setTimeout(()=>{TMe(p,t).then(L=>{if(R.aborted)return;if(!L){jMe(p,N,R).then(M=>{R.aborted||u({...tv,phase:"done",groups:M})},()=>{R.aborted||u({...tv,phase:"error"})});return}const k=new Map;let I=0,V=0;u(M=>({...M,remaining:L.length}));for(const M of L)EMe(p,N,M,R).then(H=>{k.set(M,H)},()=>{V+=1}).finally(()=>{if(R.aborted)return;I+=1;const H=L.length-I,G=L.flatMap(Y=>k.get(Y)??[]),U=H===0;u(Y=>!U&&G.length===0&&!Y.fresh?{...Y,remaining:H,failed:V}:{phase:U?V===L.length?"error":"done":"loading",groups:G,fresh:!0,remaining:H,failed:V})})})},200);return()=>{clearTimeout(B),P.abort()}},[o,p,t,f]);const{phase:g,groups:b,fresh:v,remaining:w,failed:S}=l,O=o.trim(),j=p!==void 0&&O!=="",E=j&&g==="loading",T=E&&!v&&b.length>0,A=j?b:[],C=A.reduce((N,P)=>N+P.hits.length,0)+y.length,_=O!==""&&y.length===0&&A.length===0&&!h&&(!j||g==="done"),$=p?"Search all consoles":"Search",D=N=>{i(!1),window.location.assign(N)};return c.jsx(K2e,{open:r,onOpenChange:i,title:$,description:p?"Search every console you can open":"Jump to a page",className:"sm:max-w-xl",children:c.jsxs(G2e,{shouldFilter:!1,label:$,children:[c.jsxs("div",{className:"relative",children:[c.jsx(Y2e,{value:o,onValueChange:s,placeholder:a,"aria-label":$,className:"pr-7"}),E&&c.jsx(EI,{className:"pointer-events-none absolute top-[calc(50%+2px)] right-3.5 -translate-y-1/2"})]}),c.jsx("output",{className:"sr-only",children:E?"Searching…":O!==""&&g!=="error"?`${C} results`:""}),c.jsxs(X2e,{className:"max-h-[60vh]","aria-busy":E,children:[O===""&&y.length===0&&!h&&c.jsx("p",{className:"px-3 py-6 text-center text-[13px] text-dim",children:"Type to search."}),h&&y.length===0&&c.jsx("p",{"data-aviary-search-unavailable":"",className:"px-3 py-6 text-center text-[13px] text-dim",children:"Search isn't enabled in this app."}),_&&c.jsx("p",{"data-aviary-search-empty":"",className:"px-3 py-6 text-center text-[13px] text-dim",children:"Nothing found."}),m.map(([N,P])=>c.jsx(OI,{heading:c.jsx("span",{className:"uppercase tracking-[0.14em]",children:N}),children:P.map(R=>c.jsxs(jI,{value:`local:${R.id}`,onSelect:()=>{i(!1),R.onSelect()},children:[R.icon,c.jsx("span",{className:"truncate text-[13px] text-fg",children:R.label}),R.hint&&c.jsx("span",{className:"ml-auto text-[11px] text-dim",children:R.hint})]},R.id))},`local:${N}`)),E&&A.length===0&&c.jsx(e$e,{remaining:w}),A.map(N=>c.jsx(OI,{"data-stale":T?"":void 0,className:ge("transition-opacity duration-150 motion-reduce:transition-none",T&&"opacity-50"),heading:c.jsxs("span",{className:"flex items-center gap-1.5 uppercase tracking-[0.14em]",children:[c.jsx(EE,{icon:N.icon,accent:a8(N.id,N.icon),size:18}),N.title]}),children:N.hits.map(P=>c.jsx(jI,{value:`${N.id}:${P.href}`,onSelect:()=>D(P.href),children:c.jsxs("a",{href:P.href,tabIndex:-1,className:"flex min-w-0 flex-col",onClick:R=>{if(R.button!==0||R.metaKey||R.ctrlKey||R.shiftKey||R.altKey){R.stopPropagation();return}R.preventDefault()},children:[c.jsx("span",{className:"mono truncate text-[13px] text-fg",children:P.title}),P.subtitle&&c.jsx("span",{className:"truncate text-[11px] text-dim",children:P.subtitle})]})},P.href))},N.id)),E&&A.length>0&&w!==void 0&&w>0&&c.jsxs("p",{"data-aviary-search-progress":"",className:"flex items-center gap-2 px-3 py-2 text-[12px] text-faint",children:[c.jsx(EI,{className:"size-3"}),Z8(w)]}),j&&g==="error"&&c.jsxs("p",{"data-aviary-search-error":"",className:"flex items-center justify-center gap-2 px-3 py-3 text-[12px] text-faint",children:["The other consoles didn't answer.",c.jsx(TI,{onRetry:()=>d(N=>N+1)})]}),j&&g==="done"&&S>0&&c.jsxs("p",{"data-aviary-search-partial":"",className:"flex items-center justify-center gap-2 px-3 py-3 text-[12px] text-faint",children:[S," ",S===1?"console didn't":"consoles didn't"," answer.",c.jsx(TI,{onRetry:()=>d(N=>N+1)})]})]})]})})}function TI({onRetry:e}){return c.jsx("button",{type:"button",onClick:e,className:"rounded-sm text-dim underline underline-offset-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:"Retry"})}const J8=x.createContext(void 0);function n$e(e){const t=x.useContext(J8);if(t===void 0)throw new Error(Wt(33));return t}const m_=x.createContext(void 0);function Bu(e){const t=x.useContext(m_);if(t===void 0&&!e)throw new Error(Wt(36));return t}const r$e=x.createContext(void 0);function g_(e=!0){const t=x.useContext(r$e);if(t===void 0&&!e)throw new Error(Wt(25));return t}const eq=x.createContext(null);function v_(e="root"){const t=x.useContext(eq),n=x.useContext(m_);return t===null||n===void 0?null:(e==="submenu-trigger"?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}const i$e={visible:!0,ref:null};function a$e(){return i$e}function o$e(e,t,n="root"){const r=v_(n),a=((n==="submenu-trigger"?r==null?void 0:r.useSubmenuTrigger:r==null?void 0:r.useItem)??a$e)({label:e.label,children:e.children,render:e.render}),o=Ca(t,a.ref);return{visible:a.visible,ref:o,props:a.props}}function s$e(e){e.preventDefault()}function l$e(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:l}=e,u=Bu(),f=g_(!0),d=l.type==="submenu-trigger",p=d?u.parentVirtualFocus:u.virtualFocus,y=(d&&u.parent.type==="menu"?u.parent.store:u.store).useState("webkitAriaSelected",n),{events:m}=a.useState("floatingTreeRoot"),g=a.useState("open"),b=f!==void 0,v=!p&&g&&n?0:-1;return x.useMemo(()=>({id:r,role:"menuitem",tabIndex:v,"aria-selected":y,onMouseDown:p?s$e:void 0,onKeyDown(w){w.key===" "&&(o!=null&&o.current)&&w.preventDefault()},onMouseMove(w){i&&m.emit("itemhover",{nodeId:i,target:w.currentTarget})},onClick(w){t&&m.emit("close",{domEvent:w.nativeEvent,reason:Fc})},onMouseUp(w){if(f){const S=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,b&&S&&Math.abs(w.clientX-S.x)<=1&&Math.abs(w.clientY-S.y)<=1||b&&!jC&&w.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!b||w.button===2)&&l.type==="regular-item"&&jv(s.current,w,{detail:1,pointerType:"mouse"})}}),[t,v,r,m,i,a.context.allowMouseUpTriggerRef,o,s,f,b,l.type,y,p])}const u$e={type:"regular-item"};function c$e(e){const{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:l,nodeId:u}=e,f=x.useRef(null),{getButtonProps:d,buttonRef:p}=el({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),h=l$e({closeOnClick:t,highlighted:r,id:i,nodeId:u,store:a,typingRef:o,itemRef:f,itemMetadata:l}),y=x.useCallback(g=>Ir(h,{onMouseEnter(b){l.type==="submenu-trigger"&&l.setActive(b.nativeEvent)}},g,d),[h,d,l]),m=Ca(f,p);return x.useMemo(()=>({getItemProps:y,itemRef:m}),[y,m])}const tq=x.createContext(void 0);function f$e(){const e=x.useContext(tq);if(e===void 0)throw new Error(Wt(31));return e}const d$e=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,[s,l]=x.useState(void 0),u=it("div",t,{ref:n,props:{role:"group","aria-labelledby":s,...o}});return c.jsx(tq.Provider,{value:l,children:u})}),p$e=x.forwardRef(function(t,n){var i;const r=((i=v_())==null?void 0:i.Group)??d$e;return c.jsx(r,{...t,ref:n})}),h$e=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,l=_i(o),u=f$e();return le(()=>(u(l),()=>{u(f=>f===l?void 0:f)}),[u,l]),it("div",t,{ref:n,props:{id:l,"aria-hidden":!0,...s}})}),m$e=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:s=!1,disabled:l=!1,closeOnClick:u=!0,style:f,...d}=t,{store:p}=Bu(),h=t_({guess:!0,label:o}),y=_i(a),m=p.useState("disabled"),g=p.useState("isActive",h.index),b=p.useState("floatingNodeId"),v=p.useState("itemProps"),w=l||m,{getItemProps:S,itemRef:O}=c$e({closeOnClick:u,disabled:w,highlighted:g,id:y,store:p,nativeButton:s,nodeId:b,itemMetadata:u$e});return it("div",t,{state:{disabled:w,highlighted:g},props:[v,d,S],ref:[O,n,h.ref]})}),g$e=x.forwardRef(function(t,n){const r=o$e(t,n);return r.visible?c.jsx(m$e,{...t,ref:r.ref}):null}),v$e=x.createContext(void 0);function y$e(){return x.useContext(v$e)}function b$e(e,t){const n=hC(e.render);if(x.isValidElement(n)){const r=n.props;if(Object.hasOwn(r,"id"))return r.id??""}return e.id??t}function x$e(e,t,n){const r=b$e(e,t),i=r===t?void 0:r,a=x.useCallback(o=>n==null?void 0:n(o?i:void 0),[i,n]);return[r,a]}function w$e(e,t,n){const r=hC(e.render),i=x.isValidElement(r)?r.props:void 0,a=e["aria-label"]??(i==null?void 0:i["aria-label"]);let o=e["aria-labelledby"]??(i==null?void 0:i["aria-labelledby"]);return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}const S$e=x.forwardRef(function(t,n){var Q;const{render:r,className:i,style:a,finalFocus:o,id:s,initialFocus:l,...u}=t,{store:f,defaultFloatingId:d,setRenderedFloatingId:p,virtualFocus:h,orientation:y}=Bu(),m=y$e(),{side:g,align:b}=n$e(),v=E6()!=null,w=f.useState("open"),S=f.useState("transitionStatus"),O=f.useState("popupProps"),j=f.useState("mounted"),E=f.useState("instantType"),T=f.useState("activeTriggerElement"),A=f.useState("parent"),C=f.useState("lastOpenChangeReason"),_=f.useState("rootId"),$=f.useState("floatingRootContext"),D=f.useState("floatingTreeRoot"),N=f.useState("closeDelay"),P=f.useState("hoverEnabled"),R=f.useState("disabled"),B=f.useState("openMethod"),L=f.useState("activeTriggerId"),k=f.useState("listElement"),[I,V]=x$e(t,d,p),M=w$e(t,T,L),H=A.type==="menu"?m:void 0,G=A.type==="context-menu";let U=l??A.type!=="menu";l===void 0&&k&&A.type!=="menu"&&(U=()=>f.state.activeIndex!==null?!1:k),Md({open:w,ref:f.context.popupRef,onComplete(){var ae,ue;w&&((ue=(ae=f.context).onOpenChangeComplete)==null||ue.call(ae,!0))}}),x.useEffect(()=>{function ae(ue){f.setOpen(!1,Re(ue.reason,ue.domEvent))}return D.events.on("close",ae),()=>{D.events.off("close",ae)}},[D.events,f]),FH($,{enabled:P&&!R&&!G&&A.type!=="menubar",closeDelay:N});const Y=f.useStateSetter("popupElement"),X=((Q=x.useContext(eq))==null?void 0:Q.useParentHandoff)??j$e,{parentVirtualFocusRef:te,handleFocus:q}=X(f,A,w,h),ee={transitionStatus:S,side:g,align:b,open:w,nested:A.type==="menu",instant:E},J=it("div",t,{state:ee,ref:[n,f.context.popupRef,Y,V],stateAttributesMapping:gC,props:[O,{id:I,...k?{role:"presentation"}:{role:"menu","aria-orientation":y==="horizontal"?"horizontal":void 0,"aria-labelledby":M},onKeyDown(ae){var ue;(ue=H==null?void 0:H.onPopupKeyDown)==null||ue.call(H,ae),v&&C0.has(ae.key)&&ae.stopPropagation()},onFocus:q},P0(S),u,{"data-rootownerid":_}]});let K=A.type===void 0||G;(T||A.type==="menubar"&&C!==u0)&&(K=!0);const oe=(H==null?void 0:H.getReturnElement)??te;return c.jsx(IC,{context:$,openInteractionType:B,modal:G,disabled:!j,returnFocus:o??oe??K,explicitReturnFocus:o===void 0&&oe?!1:void 0,initialFocus:U,restoreFocus:!0,getInsideElements:A.type===void 0?()=>[f.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:A.type!=="menubar"?D:void 0,previousFocusableElement:T,nextFocusableElement:A.type===void 0?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:f.context.beforeContentFocusGuardRef,children:J})}),O$e={parentVirtualFocusRef:void 0,handleFocus:void 0};function j$e(){return O$e}const E$e=x.forwardRef(function(t,n){var i;const r=((i=v_())==null?void 0:i.Popup)??S$e;return c.jsx(r,{...t,ref:n})}),nq=x.createContext(void 0);function T$e(){const e=x.useContext(nq);if(e===void 0)throw new Error(Wt(32));return e}const A$e=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:a,parent:o}=Bu();if(!(a.useState("mounted")||r))return null;const u=o.type==="menu"||o.type==="menubar"?"group":void 0;return c.jsx(nq.Provider,{value:r,children:c.jsx(PC,{ref:n,...i,portalOwnerRole:u})})});function C$e(e){const{store:t,domReference:n,positionerElement:r,open:i}=e,a=x.useRef(null),o=x.useRef(null),s=x0(r);le(()=>{var l;i||((l=o.current)==null||l.abort(),o.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[i,t]),le(()=>{const l=n,u=a.current;if(l&&(a.current=l),!u||!l||l===u||!t.select("open"))return;t.set("instantType",void 0);const f=new AbortController;return o.current=f,s(()=>{t.select("open")&&t.set("instantType","trigger-change")},f.signal),()=>{f.abort()}},[n,s,t])}const _$e=x.forwardRef(function(t,n){var Se;const{anchor:r,positionMethod:i="absolute",className:a,render:o,side:s,align:l,sideOffset:u=0,alignOffset:f=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:h=5,sticky:y=!1,disableAnchorTracking:m=!1,collisionAvoidance:g=mH,style:b,...v}=t,{store:w,virtualFocus:S,syncHighlightedItem:O}=Bu(),j=T$e(),E=g_(!0),T=w.useState("parent"),A=w.useState("floatingRootContext"),C=w.useState("floatingTreeRoot"),_=w.useState("mounted"),$=w.useState("open"),D=w.useState("modal"),N=w.useState("openMethod"),P=w.useState("activeTriggerElement"),R=w.useState("transitionStatus"),B=w.useState("positionerElement"),L=w.useState("instantType"),k=w.useState("adaptiveOrigin"),I=w.useState("lastOpenChangeReason"),V=w.useState("floatingNodeId"),M=w.useState("floatingParentNodeId"),H=A.useState("domReferenceElement");let G=r,U=u,Y=f,X=l,te=g;T.type==="context-menu"&&(G=r??((Se=T.context)==null?void 0:Se.anchor),X=X??"start",!s&&X!=="center"&&(Y=t.alignOffset??2,U=t.sideOffset??-5));let q=s,ee=X;T.type==="menu"?(q=q??"inline-end",ee=ee??"start",te=t.collisionAvoidance??gH):T.type==="menubar"&&(q=q??(T.context.orientation==="vertical"?"inline-end":"bottom"),ee=ee??"start");const J=T.type==="context-menu",K=JC({anchor:G,floatingRootContext:A,positionMethod:E?"fixed":i,mounted:_,side:q,sideOffset:U,align:ee,alignOffset:Y,arrowPadding:J?0:h,collisionBoundary:d,collisionPadding:p,sticky:y,nodeId:V,keepMounted:j,disableAnchorTracking:m,collisionAvoidance:te,shift:J?{crossAxis:!("side"in te&&te.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:C,adaptiveOrigin:k,lazyFlip:S?"placement":!1});x.useEffect(()=>{function re(we){we.open&&(we.parentNodeId===V&&w.set("hoverEnabled",!1),we.nodeId!==V&&we.parentNodeId===w.select("floatingParentNodeId")&&w.setOpen(!1,Re(xp)))}return C.events.on("menuopenchange",re),()=>{C.events.off("menuopenchange",re)}},[w,C.events,V]),x.useEffect(()=>{if(w.select("floatingParentNodeId")==null)return;function re(we){if(we.open||we.nodeId!==w.select("floatingParentNodeId"))return;const $e=we.reason??xp;w.setOpen(!1,Re($e))}return C.events.on("menuopenchange",re),()=>{C.events.off("menuopenchange",re)}},[C.events,w]);const oe=dn();x.useEffect(()=>{$||oe.clear()},[$,oe]),x.useEffect(()=>{function re(we){if(!(!$||we.nodeId!==w.select("floatingParentNodeId")))if(we.target&&P&&P!==we.target){const $e=w.select("closeDelay");$e>0?oe.isStarted()||oe.start($e,()=>{w.setOpen(!1,Re(xp))}):w.setOpen(!1,Re(xp))}else oe.clear()}return C.events.on("itemhover",re),()=>{C.events.off("itemhover",re)}},[C.events,$,P,w,oe]),x.useEffect(()=>{const re={open:$,nodeId:V,parentNodeId:M,reason:w.select("lastOpenChangeReason")};C.events.emit("menuopenchange",re)},[C.events,$,w,V,M]),C$e({store:w,domReference:H,positionerElement:B,open:$});const Q={open:$,side:K.side,align:K.align,anchorHidden:K.anchorHidden,nested:T.type==="menu",instant:L},ae=T.type==="menubar"&&T.context.modal;j6($&&(ae||D&&I!==bn),N==="touch",B,P);const ye=e_(t,Q,{styles:K.positionerStyles,transitionStatus:R,props:v,refs:[n,w.useStateSetter("positionerElement")],hidden:!_,inert:!$}),Ie=_&&T.type!=="menu"&&(T.type!=="menubar"&&D&&I!==bn||T.type==="menubar"&&T.context.modal);let ce=null;return T.type==="menubar"?ce=T.context.contentElement:T.type===void 0&&(ce=P),c.jsxs(J8.Provider,{value:K,children:[Ie&&c.jsx(XC,{ref:T.type==="context-menu"||T.type==="nested-context-menu"?T.context.internalBackdropRef:null,inert:YC(!$),cutout:ce}),c.jsx(nEe,{id:V,children:c.jsx(R0,{elementsRef:w.context.itemDomElements,labelsRef:w.context.itemLabels,onMapChange:O,children:ye})})]})}),N$e=x.createContext(null);function rq(e){return x.useContext(N$e)}function R$e(e){return e==null?Ci:e.type.startsWith("key")?GU:e.type.startsWith("mouse")||e.type.startsWith("pointer")?fje:Ci}const M$e={...Vp,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{var r;const n=Vp.triggerPopupId(e,t);return n?((r=e.listElement)==null?void 0:r.id)||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>$a&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>{var t;return((t=e.highlightedItem)==null?void 0:t.id)||void 0},isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Vp.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class P$e extends Lm{constructor(t,n,r=!1){const i=new S0,a=D$e(i,n,r,t);super(a,$$e(i),M$e),this.observe("parent",o=>{o.type==="menu"?this.context.allowMouseUpTriggerRef=o.store.context.allowMouseUpTriggerRef:o.type!==void 0&&(this.context.allowMouseUpTriggerRef=o.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const t=this.state.parent;if(t.type!=="menu")return;let n=t.store.select("rootId"),r=t.store.select("floatingTreeRoot"),i=t.store.select("keyboardEventRelay");return t.store.subscribe(()=>{const a=t.store.select("rootId"),o=t.store.select("floatingTreeRoot"),s=t.store.select("keyboardEventRelay");n===a&&r===o&&i===s||(n=a,r=o,i=s,this.notifyAll())})}setOpen(t,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:n})}setActiveIndex(t,n,r){if(this.state.activeIndex!==t){const a=(t===null?void 0:this.context.itemDomElements.current[t])===this.context.reportedItem;this.context.highlightReason=a?"none":n,this.context.highlightEvent=a?void 0:r}this.set("activeIndex",t)}highlightItem(t,n,r){const i=this.context.itemDomElements.current.indexOf(t);i>-1&&this.setActiveIndex(i,n,r)}}function $$e(e){return{positionerRef:x.createRef(),popupRef:x.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:x.createRef(),beforeTriggerFocusGuardRef:x.createRef(),beforeContentFocusGuardRef:x.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function D$e(e,t,n=!1,r){return{...HC(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:st,inputProps:st,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new $C,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:st,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const AI=x.createContext(null);function iq(e,t){return(e===Iu||e===Fc)&&(t==null?void 0:t.detail)===0}function I$e(e,t){return e===wb||iq(e,t)}const k$e=E0(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:a,onItemHighlighted:o,defaultOpen:s=!1,disabled:l=!1,modal:u,loopFocus:f=!0,orientation:d="vertical",actionsRef:p,closeParentOnEsc:h=!1,handle:y,triggerId:m,defaultTriggerId:g=null,highlightItemOnHover:b=!0,isSubmenu:v=!1,virtualFocus:w=!1,virtualFocusRef:S,allowEscape:O=!0,resetOnPointerLeave:j=!0}=t,E=g_(!0),T=Bu(!0),A=rq(!0),C=T==null?void 0:T.store,_=(T==null?void 0:T.virtualFocus)??!1,$=x.useMemo(()=>v&&C?{type:"menu",store:C}:A?{type:"menubar",context:A}:E&&!C?{type:"context-menu",context:E}:{type:void 0},[E,C,A,v]),D=_i(),N=_i(),[P,R]=x.useState(void 0),B=(P??N)||void 0,L=tl(),k=$.type==="menu"?$.store:void 0,I=(r??s)&&(k==null?void 0:k.state.transitionStatus)==="starting",V=fn(()=>I?k==null?void 0:k.state.instantType:void 0).current,M=fn(()=>{const fe=new P$e({open:s,openProp:r,activeTriggerId:g,triggerIdProp:m,parent:$,disabled:l,highlightItemOnHover:b,modal:$.type===void 0?u:void 0,rootId:D,instantType:V},B,L!=null);return fe.context.virtualFocusRef=S,fe}).current;M.useControlledProp("openProp",r),M.useControlledProp("triggerIdProp",m),M.useContextCallback("onOpenChangeComplete",a);const H=M.useState("floatingTreeRoot"),G=OH(H),U=M.useState("open"),Y=M.useState("activeTriggerElement"),X=M.useState("positionerElement"),te=M.useState("hoverEnabled"),q=M.useState("disabled"),ee=M.useState("lastOpenChangeReason"),J=M.useState("parent"),K=M.useState("activeIndex"),oe=M.useState("keyboardOpen"),Q=M.useState("payload"),ae=M.useState("floatingParentNodeId"),ue=x.useRef(null),ye=x.useRef(J.type!=="context-menu"),Ie=dn(),ce=x.useRef(!0),Se=dn(),re=ae!=null,{openMethod:we,triggerProps:$e}=r6(U);M.useSyncedValues({disabled:l,highlightItemOnHover:b,modal:J.type===void 0?u:void 0,openMethod:we,rootId:D}),zC(M);const{forceUnmount:at,transitionStatus:W}=FC(U,M,()=>{M.set("allowMouseEnter",!1)},I),ie=x0(M.context.popupRef);x.useEffect(()=>{if(V===void 0)return;const fe=()=>{M.state.instantType===V&&M.set("instantType",void 0)};if(!U){fe();return}if(W!==void 0)return;if(M.context.popupRef.current==null){fe();return}const Ee=new AbortController;return ie(fe,Ee.signal),()=>{Ee.abort()}},[V,U,W,ie,M]),le(()=>{E&&!T?M.update({parent:{type:"context-menu",context:E},floatingNodeId:G,floatingParentNodeId:L}):(T||!M.select("activeTriggerElement"))&&M.update({floatingNodeId:G,floatingParentNodeId:L})},[E,T,G,L,Y,M]),x.useEffect(()=>{if(U||(ue.current=null),J.type==="context-menu"){if(!U){Ie.clear(),ye.current=!1;return}Ie.start(500,()=>{ye.current=!0})}},[Ie,U,J.type]),le(()=>{!U&&!te&&M.set("hoverEnabled",!0)},[U,te,M]);const Oe=de((fe,Ee)=>{const rt=Ee.reason;if(!fe&&!M.select("open")||U===fe&&Ee.trigger===Y&&ee===rt)return;const tn=BC(Ee);if(!fe&&Ee.trigger==null&&(Ee.trigger=Y??void 0),i==null||i(fe,Ee),Ee.isCanceled)return;M.state.floatingRootContext.dispatchOpenChange(fe,Ee);const nn=Ee.event;if(fe===!1&&rt!==Fc&&(nn==null?void 0:nn.type)==="click"&&nn.pointerType==="touch"&&!ce.current)return;fe&&rt===zc?(ce.current=!1,Se.start(300,()=>{ce.current=!0})):(ce.current=!0,Se.clear());const De=!fe&&(rt===c0||rt==null);ue.current=Ee.event;const ct=LC(M.state,fe,Ee.trigger,tn());ct.openChangeReason=rt,ct.keyboardOpen=fe&&I$e(rt,nn),J.type==="menubar"&&(rt===zc||rt===mu||rt===bn||rt===wb||rt===xp)?ct.instantType="group":iq(rt,nn)?ct.instantType="click":De?ct.instantType="dismiss":ct.instantType=void 0,M.update(ct)}),pe=EH({popupStore:M,floatingRootContext:M.state.floatingRootContext,floatingId:B,nested:L!=null,onOpenChange:Oe}),he=pe.context.events;le(()=>{const fe=({open:Ee,eventDetails:rt})=>Oe(Ee,rt);return he.on("setOpen",fe),()=>{he==null||he.off("setOpen",fe)}},[he,Oe]),le(()=>M.subscribeToParentMenu(),[M]);const Fe=x.useCallback(()=>{M.setOpen(!1,Re(f0))},[M]);x.useImperativeHandle(p,()=>({unmount:at,close:Fe}),[at,Fe]);let Le;J.type==="context-menu"&&(Le=J.context),x.useImperativeHandle(Le==null?void 0:Le.positionerRef,()=>X,[X]),x.useImperativeHandle(Le==null?void 0:Le.actionsRef,()=>({setOpen:Oe}),[Oe]);const nt=b0(pe,{enabled:!q,bubbles:{escapeKey:h&&J.type==="menu"},outsidePress(){var fe;return J.type!=="context-menu"||((fe=ue.current)==null?void 0:fe.type)==="contextmenu"?!0:ye.current},externalTree:re?H:void 0}),Kt=M0(),ht=HH(pe,{enabled:!q,listRef:M.context.itemDomElements,activeIndex:K,virtual:w,nested:J.type==="menubar"||!w&&J.type!==void 0,parentOrientation:J.type==="menubar"?J.context.orientation:void 0,loopFocus:f,focusItemOnOpen:w?oe:void 0,allowEscape:w&&f&&O,orientation:d,triggerOrientation:w?"vertical":d,rtl:Kt==="rtl",disabledIndices:Gi,onNavigate(fe,Ee){M.setActiveIndex(fe,R$e(Ee),Ee==null?void 0:Ee.nativeEvent)},openOnArrowKeyDown:J.type!=="context-menu"&&!(w&&v),externalTree:!w&&re?H:void 0,nestedReturnFocusRef:k==null?void 0:k.context.virtualFocusRef,focusItemOnHover:b,resetOnPointerLeave:j}),oi=x.useCallback(fe=>{M.context.typingRef.current=fe},[M]),cr=qH(pe,{enabled:!q&&!w,listRef:M.context.itemLabels,elementsRef:M.context.itemDomElements,activeIndex:K,resetMs:Wje,onMatch:(fe,Ee)=>{U&&fe!==K&&M.setActiveIndex(fe,GU,Ee.nativeEvent)},onTyping:oi}),jr=de(o),fr=x.useRef(-1),En=de(()=>{const fe=M.state.activeIndex,Ee=fe===null?void 0:M.context.itemDomElements.current[fe]??void 0;if((Ee==null?void 0:Ee.isConnected)===!1)return;const rt=Ee===void 0?-1:fe;if(fr.current===rt&&M.context.reportedItem===Ee)return;fr.current=rt,M.context.reportedItem=Ee,w&&M.set("highlightedItem",Ee);const{highlightReason:tn,highlightEvent:nn}=M.context;M.context.highlightReason=Ci,M.context.highlightEvent=void 0,o&&jr(Ee,uje(tn,nn,{label:Ee===void 0?void 0:M.context.itemLabels.current[rt]??void 0}))});le(()=>{En()},[K,En]);const Er=x.useMemo(()=>{if(!w)return ht.reference;if(!ht.trigger)return st;const{onFocus:fe,...Ee}=ht.trigger;return Ee},[w,ht.reference,ht.trigger]);M.useSyncedValue("inputProps",w?ht.reference??st:st);const Tr=x.useMemo(()=>{const fe=Ir(cr.reference,Er,nt.reference,{onMouseMove(){M.set("allowMouseEnter",!0)}},$e);return fe["aria-haspopup"]="menu",fe["aria-expanded"]=U,fe},[M,cr.reference,Er,nt.reference,$e,U]),si=x.useMemo(()=>{const fe=Ir(ht.trigger,nt.trigger,$e);return fe["aria-haspopup"]="menu",fe["aria-expanded"]=!1,fe},[ht.trigger,nt.trigger,$e]);fn(()=>(M.update({inactiveTriggerProps:si}),null));const pn=x.useMemo(()=>Ir(w0,{onMouseMove(){M.set("allowMouseEnter",!0),J.type==="menu"&&M.set("hoverEnabled",!1)},onClick(){M.select("hoverEnabled")&&M.set("hoverEnabled",!1)},onKeyDown(fe){const Ee=M.select("keyboardEventRelay");Ee&&!fe.isPropagationStopped()&&Ee(fe)}},cr.floating,ht.floating,nt.floating),[J.type,M,cr.floating,ht.floating,nt.floating]),dr=ht.item??st;UC(M,{floatingRootContext:pe,activeTriggerProps:Tr,inactiveTriggerProps:si,popupProps:pn,itemProps:dr});const li=x.useMemo(()=>({store:M,parent:$,orientation:d,loopFocus:f,allowEscape:O,defaultFloatingId:N,setRenderedFloatingId:R,virtualFocus:w,parentVirtualFocus:_,syncHighlightedItem:En}),[M,$,d,f,O,N,w,_,En]),Da=typeof n=="function"?n({payload:Q}):n;let Ia=c.jsxs(m_.Provider,{value:li,children:[y&&c.jsx(kC,{handle:y,store:M}),Da]});return(J.type===void 0||J.type==="context-menu")&&(Ia=c.jsx(rEe,{externalTree:H,children:Ia})),Ia});function L$e(e){const t=x.useContext(AI);if(t===null)return c.jsx(k$e,{...e});const n=t.Root;return c.jsx(AI.Provider,{value:null,children:c.jsx(n,{...t.options,...e})})}function B$e(e){const{render:t,className:n,style:r,state:i=st,props:a=Gi,refs:o=Gi,metadata:s,stateAttributesMapping:l,tag:u="div",...f}=e,{compositeProps:d,compositeRef:p}=_6({metadata:s});return it(u,e,{state:i,ref:[p,...o],props:[d,...a,f],stateAttributesMapping:l})}function aq(e){if(Et(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!so(e))return aq(jo(e))}function z$e(e,t){function n(a,o,s){var u;const l=a.currentTarget;Ni.flushSync(()=>{e.setOpen(!1,Re(mu,a.nativeEvent,l))}),(u=Kje(l.isConnected?l:t.current,o,s))==null||u.focus()}function r(a){n(a,-1,e.select("positionerElement"))}function i(a){var s;const o=e.select("positionerElement");o&&Vc(a,o)?(s=e.context.beforeContentFocusGuardRef.current)==null||s.focus():n(a,1,o)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function F$e(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=x.useRef(!1);return x.useMemo(()=>t?{onMouseDown:a=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Qe(a.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:a=>{i.current&&(i.current=!1,a.preventBaseUIHandler())}}:st,[t,n,r])}const U$e=$H(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,id:l,openOnHover:u,delay:f=100,closeDelay:d=0,handle:p,payload:h,...y}=t,m=Bu(!0),b=LH(p)??(m==null?void 0:m.store);if(!b)throw new Error(Wt(85));const v=_i(l),w=b.useState("isTriggerActive",v),S=b.useState("floatingRootContext"),O=b.useState("isOpenedByTrigger",v),j=b.useState("triggerControlsId",v),E=x.useRef(null),T=q$e(),A=l0(!0),C=nl(),_=x.useMemo(()=>C??new $C,[C]),$=OH(_),D=tl(),{registerTrigger:N,isMountedByThisTrigger:P}=_H(v,E,b,{payload:h,closeDelay:d,parent:T,floatingTreeRoot:_,floatingNodeId:$,floatingParentNodeId:D,keyboardEventRelay:A==null?void 0:A.relayKeyboardEvent}),R=T.type==="menubar",B=b.useState("disabled"),L=o||B||R&&T.context.disabled,{getButtonProps:k,buttonRef:I}=el({disabled:L,native:s});x.useEffect(()=>{!O&&T.type===void 0&&(b.context.allowMouseUpTriggerRef.current=!1)},[b,O,T.type]);const V=x.useRef(null),M=dn(),H=de(Se=>{if(!V.current)return;M.clear(),b.context.allowMouseUpTriggerRef.current=!1;const re=Se.target;je(V.current,re)||je(b.select("positionerElement"),re)||re===V.current||re!=null&&aq(re)===b.select("rootId")||b6(Se,V.current)||_.events.emit("close",{domEvent:Se,reason:KU})});x.useEffect(()=>{const Se=Qe(V.current);if(O&&b.select("lastOpenChangeReason")===bn)return Se.addEventListener("mouseup",H,{once:!0}),()=>{Se.removeEventListener("mouseup",H)}},[O,H,b]);const G=R&&T.context.hasSubmenuOpen,Y=UH(S,{enabled:(u??G)&&!L&&(!R||G&&!P),handleClose:VH({blockPointerEvents:!R}),mouseOnly:!0,move:!1,restMs:T.type===void 0?f:void 0,delay:{close:d},triggerElementRef:E,externalTree:_,isActiveTrigger:w,isClosing:()=>b.select("transitionStatus")==="ending"}),X=H$e(O,b.select("lastOpenChangeReason")),te=jH(S,{enabled:!L,event:O&&R?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:T.type===void 0?X:!1}),q=BH(S,{enabled:!L&&G}),ee=F$e({open:O,enabled:R,mouseDownAction:"open"}),J=x.useMemo(()=>Ir(q.reference,te.reference),[q.reference,te.reference]),K=b.useState("triggerProps",P),oe=b.useState("filterTriggerProps"),{handlePreFocusGuardFocus:Q,handleFocusTargetFocus:ae}=z$e(b,E),ue={disabled:L,open:O},ye=[V,n,I,N,E],Ie=[J,Y??st,K,{"aria-haspopup":"menu","aria-controls":j,id:v,onMouseDown:Se=>{if(b.select("open"))return;M.start(200,()=>{b.context.allowMouseUpTriggerRef.current=!0}),Qe(Se.currentTarget).addEventListener("mouseup",H,{once:!0})}},oe,R?{role:"menuitem"}:{},ee,y,k],ce=it("button",t,{enabled:!R,stateAttributesMapping:Qj,state:ue,ref:ye,props:Ie});return R?c.jsx(B$e,{tag:"button",render:r,className:i,style:a,state:ue,refs:ye,props:Ie,stateAttributesMapping:Qj}):O?c.jsxs(x.Fragment,{children:[c.jsx(Jf,{ref:b.context.beforeTriggerFocusGuardRef,onFocus:Q},`${v}-pre-focus-guard`),c.jsx(x.Fragment,{children:ce},v),c.jsx(Jf,{ref:b.context.triggerFocusTargetRef,onFocus:ae},`${v}-post-focus-guard`)]}):c.jsx(x.Fragment,{children:ce},v)});function H$e(e,t){const n=dn(),[r,i]=x.useState(!1);return le(()=>{e&&t===bn?(i(!0),n.start(Qje,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function q$e(){const e=rq();return x.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}function V$e({...e}){return c.jsx(L$e,{"data-slot":"dropdown-menu",...e})}function G$e({...e}){return c.jsx(U$e,{"data-slot":"dropdown-menu-trigger",...e})}function K$e({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:i,...a}){return c.jsx(A$e,{children:c.jsx(_$e,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:c.jsx(E$e,{"data-slot":"dropdown-menu-content",className:ge("cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...a})})})}function Y$e({...e}){return c.jsx(p$e,{"data-slot":"dropdown-menu-group",...e})}function X$e({className:e,inset:t,...n}){return c.jsx(h$e,{"data-slot":"dropdown-menu-label","data-inset":t,className:ge("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",e),...n})}function P1({className:e,inset:t,variant:n="default",...r}){return c.jsx(g$e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ge("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function W$e({className:e,...t}){return c.jsx(qRe,{"data-slot":"dropdown-menu-separator",className:ge("-mx-1 my-1 h-px bg-border",e),...t})}function Q$e({className:e,...t}){return c.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:ge("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...t})}function Z$e(e){const[t,n]=x.useState([]);return x.useEffect(()=>{if(!e)return;let r=!0;return h8(e).then(i=>{r&&n(i)}),()=>{r=!1}},[e]),t}function J$e({brand:e,current:t,config:n,onSearch:r}){const i=Z$e(n);return!n||i.length===0?c.jsx(c.Fragment,{children:e}):c.jsx("div",{"data-aviary-switcher":"",className:"min-w-0",children:c.jsxs(V$e,{children:[c.jsxs(G$e,{"aria-label":`${t.title}: switch console`,className:"flex w-full min-w-0 items-center gap-2 rounded-md p-1 text-left outline-none transition-colors hover:bg-sidebar-accent/60 focus-visible:ring-2 focus-visible:ring-ring/60 data-popup-open:bg-sidebar-accent/60",children:[c.jsx("span",{className:"min-w-0 flex-1",children:e}),c.jsx(J6,{className:"size-3.5 shrink-0 text-dim"})]}),c.jsxs(K$e,{align:"start",className:"w-64 border border-border bg-popover shadow-(--aviary-shadow) ring-0",children:[c.jsxs(Y$e,{children:[c.jsx(X$e,{className:"text-[10px] uppercase tracking-[0.16em] text-dim",children:"Consoles"}),c.jsxs(P1,{disabled:!0,"aria-current":"page",className:"data-disabled:opacity-100",children:[c.jsx(EE,{icon:t.icon,accent:"var(--aviary-accent)"}),c.jsx(CI,{title:t.title,pkg:t.package}),c.jsx(e8,{"aria-label":"Current console",className:"ml-auto text-brand"})]}),i.map(a=>c.jsxs(P1,{render:c.jsx("a",{href:a.href}),children:[c.jsx(EE,{icon:a.icon,accent:a8(a.id,a.icon)}),c.jsx(CI,{title:a.title,pkg:a.package})]},a.id))]}),r&&c.jsxs(c.Fragment,{children:[c.jsx(W$e,{}),c.jsxs(P1,{onClick:r,children:[c.jsx(u_,{className:"text-dim"}),"Search all consoles",c.jsx(Q$e,{className:"mono",children:"⌘K"})]})]})]})]})})}function CI({title:e,pkg:t}){return c.jsxs("span",{className:ge("flex min-w-0 flex-col leading-tight"),children:[c.jsx("span",{className:"truncate",children:e}),t&&c.jsx("span",{className:"mono truncate text-[10px] text-dim",children:t})]})}const oq=x.createContext({theme:"dark",setTheme:()=>{},toggle:()=>{}});function eDe(e){try{const t=window.localStorage.getItem(e);return t==="light"||t==="dark"?t:void 0}catch{return}}function tDe(e,t){return typeof window>"u"?t:eDe(e)??t}function nDe(e){if(typeof document>"u")return;const t=document.documentElement;t.classList.toggle("light",e==="light"),t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function rDe({children:e,storageKey:t,accent:n,defaultTheme:r="dark"}){const[i,a]=x.useState(()=>tDe(t,r));x.useEffect(()=>{nDe(i)},[i]),x.useEffect(()=>{n&&typeof document<"u"&&document.documentElement.style.setProperty("--aviary-accent",n)},[n]);const o=x.useCallback(l=>{if(typeof document<"u"){const u=document.documentElement;u.classList.add("aviary-theme-switching"),window.setTimeout(()=>u.classList.remove("aviary-theme-switching"),260)}a(l);try{window.localStorage.setItem(t,l)}catch{}},[t]),s=x.useCallback(()=>o(i==="dark"?"light":"dark"),[i,o]);return c.jsx(oq.Provider,{value:{theme:i,setTheme:o,toggle:s},children:e})}function iDe(){return x.useContext(oq)}const sq=x.createContext(void 0);function aDe(){const e=x.useContext(sq);if(e===void 0)throw new Error(Wt(13));return e}const lq={imageLoadingStatus:()=>null},oDe=x.forwardRef(function(t,n){const{className:r,render:i,style:a,...o}=t,[s,l]=x.useState("idle"),u={imageLoadingStatus:s},f=x.useMemo(()=>({imageLoadingStatus:s,setImageLoadingStatus:l}),[s,l]),d=it("span",t,{state:u,ref:n,props:o,stateAttributesMapping:lq});return c.jsx(sq.Provider,{value:f,children:d})}),sDe=x.forwardRef(function(t,n){const{className:r,render:i,delay:a=0,style:o,...s}=t,{imageLoadingStatus:l}=aDe(),[u,f]=x.useState(a===0),d=dn();return x.useEffect(()=>(a>0?d.start(a,()=>f(!0)):f(!0),d.clear),[d,a]),it("span",t,{state:{imageLoadingStatus:l},ref:n,props:s,stateAttributesMapping:lq,enabled:l!=="loaded"&&(a===0||u)})});function lDe({className:e,size:t="default",...n}){return c.jsx(oDe,{"data-slot":"avatar","data-size":t,className:ge("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...n})}function uDe({className:e,...t}){return c.jsx(sDe,{"data-slot":"avatar-fallback",className:ge("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function cDe(e){var i,a;const t=e.label.includes("@")?e.label.split("@")[0]??"":e.label,n=t.split(/[\s._-]+/).filter(Boolean);return(n.length>1?`${((i=n[0])==null?void 0:i[0])??""}${((a=n[1])==null?void 0:a[0])??""}`:t.slice(0,2)).toUpperCase()||"?"}function fDe({viewer:e,signOut:t}){const{theme:n,toggle:r}=iDe();return c.jsxs("div",{className:"flex flex-col gap-2",children:[e&&c.jsxs("div",{className:"flex items-center gap-[9px] px-2 py-1.5","data-aviary-viewer":"",children:[c.jsx(lDe,{size:"sm",className:"size-7 after:hidden",children:c.jsx(uDe,{className:"border border-brand-border bg-brand-soft text-[10.5px] font-semibold text-brand",children:cDe(e)})}),c.jsxs("div",{className:"min-w-0 leading-tight",children:[c.jsx("div",{className:"truncate text-[11px] font-medium text-fg",title:e.email??e.label,children:e.label}),(e.role||e.email&&e.email!==e.label)&&c.jsx("div",{className:"mono truncate text-[9.5px] uppercase text-faint",children:e.role??e.email})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsxs(Ql,{variant:"ghost",size:"sm",className:"flex-1 justify-center",onClick:r,"aria-label":n==="dark"?"Switch to light mode":"Switch to dark mode",children:[n==="dark"?c.jsx(ZNe,{}):c.jsx(JNe,{}),n==="dark"?"Light mode":"Dark mode"]}),t&&("action"in t?c.jsxs("form",{method:"post",action:t.action,className:"contents",children:[t.csrfToken&&c.jsx("input",{type:"hidden",name:"_csrf",value:t.csrfToken}),c.jsx(Ql,{type:"submit",variant:"ghost",size:"icon-sm","aria-label":"Sign out",title:"Sign out",className:"text-dim",children:c.jsx(tI,{})})]}):c.jsx(Ql,{variant:"ghost",size:"icon-sm","aria-label":"Sign out",title:"Sign out",className:"text-dim",nativeButton:!1,render:c.jsx("a",{href:t.href}),children:c.jsx(tI,{})}))]})]})}function dDe({brand:e}){return c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsxs("div",{className:"relative grid size-[30px] shrink-0 place-items-center rounded-md border border-brand-border bg-brand-soft text-brand [&_svg]:size-4",children:[e.mark,c.jsx("span",{className:"aviary-ring","aria-hidden":!0})]}),c.jsxs("div",{className:"min-w-0 overflow-hidden",children:[c.jsx("div",{className:"truncate text-sm font-bold tracking-[0.03em] text-fg",children:e.name}),e.subtitle&&c.jsx("div",{className:"mt-px truncate text-[10px] font-medium uppercase tracking-[0.08em] text-faint",children:e.subtitle})]})]})}function pDe({nav:e,activeId:t}){const{isMobile:n,setOpenMobile:r}=I0(),i=x.useCallback(()=>{n&&r(!1)},[n,r]);return c.jsx(c.Fragment,{children:e.filter(a=>a.items.length>0).map(a=>a.collapsible?c.jsx(zRe,{defaultOpen:a.defaultOpen??!0,children:c.jsxs(rI,{className:"px-2.5 py-0",children:[c.jsxs(iI,{className:ge(_I,"p-0"),render:c.jsx(FRe,{className:"flex w-full items-center gap-1 rounded-md px-2 pt-3 pb-1.5 text-left uppercase hover:text-dim"}),children:[a.section,c.jsx(J6,{className:"ml-auto size-3! -rotate-90 transition-transform in-data-panel-open:rotate-0"})]}),c.jsx(URe,{children:c.jsx(aI,{children:c.jsx(NI,{items:a.items,activeId:t,after:i})})})]})},a.section):c.jsxs(rI,{className:"px-2.5 py-0",children:[c.jsx(iI,{className:_I,children:a.section}),c.jsx(aI,{children:c.jsx(NI,{items:a.items,activeId:t,after:i})})]},a.section))})}const _I="h-auto px-2 pt-3 pb-1.5 text-[9.5px] font-semibold uppercase tracking-[0.14em] text-faint";function NI({items:e,activeId:t,after:n}){return c.jsx(mMe,{className:"gap-0.5",children:e.map(r=>{const i=r.id===t,a=c.jsxs(c.Fragment,{children:[r.icon,c.jsx("span",{children:r.label})]});return c.jsxs(gMe,{children:[r.href?c.jsx(oI,{isActive:i,"aria-current":i?"page":void 0,className:RI,render:c.jsx("a",{href:r.href,onClick:o=>{r.onSelect&&(o.preventDefault(),r.onSelect()),n()}}),children:a}):c.jsx(oI,{isActive:i,"aria-current":i?"page":void 0,className:RI,onClick:()=>{var o;(o=r.onSelect)==null||o.call(r),n()},children:a}),r.badge!==void 0&&c.jsx(yMe,{className:"mono tnum text-[10px]",children:r.badge})]},r.id)})})}const RI="h-auto gap-[9px] rounded-md border border-transparent px-[9px] py-[7px] text-[12.5px] font-medium text-dim transition-colors hover:bg-hover hover:text-fg data-active:border-brand-border data-active:bg-brand-soft data-active:font-medium data-active:text-fg [&_svg]:size-[15px]! [&_svg]:text-faint hover:[&_svg]:text-dim data-active:[&_svg]:text-brand";function hDe({title:e,actions:t,search:n}){return c.jsxs("header",{className:"sticky top-0 z-20 flex h-(--aviary-topbar-h) shrink-0 items-center gap-3 border-b border-border bg-(--aviary-topbar) px-3 backdrop-blur-md md:px-5",children:[c.jsx(cMe,{className:"-ml-1 text-dim md:hidden"}),c.jsx("div",{className:"min-w-0 truncate text-sm font-semibold text-fg",children:e}),c.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-2",children:[t,n]})]})}function mDe({brand:e,nav:t,activeId:n,shell:r,title:i,actions:a,children:o,searchPlaceholder:s,contentClassName:l,commands:u}){const[f,d]=x.useState(!1),h=Q8(r.search)!==void 0||((u==null?void 0:u.length)??0)>0;Z2e(h||f,d);const y=x.useCallback(()=>d(!0),[]);return c.jsxs(ZRe,{delay:150,children:[c.jsx("div",{className:"aviary-glow","aria-hidden":!0}),c.jsxs(lMe,{className:"relative z-[1] h-svh min-h-0 overflow-hidden",style:{"--sidebar-width":"var(--aviary-sidebar-w)"},children:[c.jsxs(uMe,{className:"border-sidebar-border [&_[data-slot=sidebar-inner]]:backdrop-blur-md",children:[c.jsx(dMe,{className:"border-b border-sidebar-border px-[18px] pt-[18px] pb-3.5",children:c.jsx(J$e,{brand:c.jsx(dDe,{brand:e}),current:e.current,config:r.switcher,...h?{onSearch:y}:{}})}),c.jsx(hMe,{className:"pt-1 pb-2",children:c.jsx("nav",{"aria-label":"Console",children:c.jsx(pDe,{nav:t,activeId:n})})}),c.jsx(pMe,{className:"border-t border-sidebar-border px-3.5 py-3",children:c.jsx(fDe,{...r.viewer?{viewer:r.viewer}:{},...r.signOut?{signOut:r.signOut}:{}})})]}),c.jsxs(fMe,{className:"min-h-0 min-w-0 overflow-hidden bg-transparent",children:[c.jsx(hDe,{title:i,actions:a,search:h?c.jsx(J2e,{onOpen:y}):void 0}),c.jsx("div",{className:ge("relative min-h-0 flex-1 overflow-y-auto",l),children:o})]})]}),(h||f)&&c.jsx(t$e,{config:r.search,switcher:r.switcher,commands:u,open:f,onOpenChange:d,...s?{placeholder:s}:{}})]})}function Bo({children:e,className:t}){return c.jsx("div",{className:ge("flex flex-col gap-4 px-4 pt-5 pb-16 md:px-6 md:pt-6",t),children:e})}function zu({children:e,...t}){return c.jsx("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:e})}function gDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M1.5 8.5h2.5l1.5-3 2.5 6 2-4.5 1 1.5h3.5"})})}function vDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M2 3.5h7M4 6.5h7M6 9.5h5M8 12.5h6"})})}function yDe(e){return c.jsxs(zu,{...e,children:[c.jsx("path",{d:"M8 1.5c.5 3 1.5 4 4.5 4.5-3 .5-4 1.5-4.5 4.5-.5-3-1.5-4-4.5-4.5 3-.5 4-1.5 4.5-4.5z"}),c.jsx("path",{d:"M12.5 10.5v3M11 12h3"})]})}function bDe(e){return c.jsxs(zu,{...e,children:[c.jsx("rect",{x:"1.5",y:"11",width:"13",height:"2.5",rx:"0.6"}),c.jsx("rect",{x:"2.5",y:"7.5",width:"7",height:"2.5",rx:"0.6"}),c.jsx("rect",{x:"10.5",y:"7.5",width:"3",height:"2.5",rx:"0.6"}),c.jsx("rect",{x:"3.5",y:"4",width:"4",height:"2.5",rx:"0.6"})]})}function xDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M8 2v8M4.5 6.5 8 10l3.5-3.5M2.5 11v2.5h11V11"})})}function wDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M2.5 4h11M6 4V2.5h4V4M4 4l.7 9.5h6.6L12 4M6.8 6.5v4.5M9.2 6.5v4.5"})})}function SDe(e){return c.jsxs(zu,{...e,children:[c.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2"}),c.jsx("path",{d:"M4.5 11V8.5M8 11V5.5M11.5 11V7"})]})}const $1="All organizations";function MI(e){const t=new URL(window.location.href);e===null?t.searchParams.delete("tenant"):t.searchParams.set("tenant",e),window.location.assign(t.toString())}function ODe(e,t){const[n,r]=x.useState(e);return x.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}function jDe(){var y;const e=gO(),[t,n]=x.useState(!1),[r,i]=x.useState(""),a=ODe(r.trim(),200),o=gO(t?a:""),s=x.useRef(null),l=x.useId();x.useEffect(()=>{function m(g){var v;const b=g.target;b instanceof Node&&!((v=s.current)!=null&&v.contains(b))&&n(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const u=e.data;if(!(u!=null&&u.enabled))return null;const f=m=>{var g;return m===null?u.tenants==="*"?$1:"none":((g=u.options.find(b=>b.id===m))==null?void 0:g.label)??m},d="rounded border border-line px-2 py-1 text-xs";if(Array.isArray(u.tenants)&&u.tenants.length<=1)return c.jsxs("span",{className:d,title:"Organization",children:[c.jsx("span",{className:"text-muted-foreground",children:"Organization: "}),u.tenants[0]!==void 0?f(u.tenants[0]):"none"]});const p=(y=o.data)!=null&&y.enabled?o.data.options:u.options,h=[...u.tenants==="*"&&(a===""||$1.toLowerCase().includes(a.toLowerCase()))?[{id:null,label:$1}]:[],...p];return c.jsxs("div",{ref:s,className:"relative",children:[c.jsxs("button",{type:"button",className:`${d} hover:bg-panel-2`,"aria-haspopup":"listbox","aria-expanded":t,"aria-controls":l,onClick:()=>n(m=>!m),children:[c.jsx("span",{className:"text-muted-foreground",children:"Organization: "}),f(u.selected)]}),t?c.jsxs("div",{className:"absolute right-0 top-full z-20 mt-1 w-64 rounded border border-line bg-popover p-1 shadow-lg",children:[c.jsx(nd,{type:"text",value:r,autoFocus:!0,onChange:m=>i(m.target.value),placeholder:"Search organizations…","aria-label":"Search organizations"}),c.jsxs("div",{id:l,role:"listbox","aria-label":"Organizations",tabIndex:-1,className:"mt-1 max-h-64 overflow-auto",children:[h.map(m=>c.jsx("div",{role:"option",tabIndex:0,"aria-selected":m.id===u.selected,onClick:()=>MI(m.id),onKeyDown:g=>{g.key==="Enter"&&MI(m.id)},className:`cursor-pointer truncate px-2 py-1 text-xs hover:bg-panel-2 ${m.id===u.selected?"text-brand":"text-foreground"}`,children:m.label},m.id??"*")),h.length===0?c.jsx("p",{className:"px-2 py-1 text-xs text-muted-foreground",children:"No organization found."}):null]})]}):null]})}function EDe(){const e=gO().data;return(e==null?void 0:e.enabled)===!0&&Array.isArray(e.tenants)&&e.tenants.length===0}const TDe="telescope-dashboard-config",ADe=[{to:"/",label:"Overview",end:!0},{to:"/pulse",label:"Pulse",end:!1},{to:"/entries/exception",label:"Exceptions",end:!0},{to:"/entries",label:"Entries",end:!0},{to:"/traces",label:"Traces",end:!0},{to:"/ai",label:"AI",end:!1},{to:"/profiles",label:"Profiles",end:!1},{to:"/queues",label:"Queues",end:!1},{to:"/schedules",label:"Schedules",end:!1},{to:"/exports",label:"Exports",end:!1},{to:"/prunes",label:"Prunes",end:!1}];function CDe(e,t,n){return e.filter(r=>!(r.to==="/traces"&&t===!1||r.to==="/profiles"&&n!==!0))}const _De={"/":"Monitor","/pulse":"Monitor","/entries/exception":"Monitor","/entries":"Explore","/traces":"Explore","/ai":"Explore","/profiles":"Explore","/queues":"Operations","/schedules":"Operations","/exports":"Data","/prunes":"Data"},NDe={"/":c.jsx(tRe,{}),"/pulse":c.jsx(gDe,{}),"/entries/exception":c.jsx(t8,{}),"/entries":c.jsx(nRe,{}),"/traces":c.jsx(vDe,{}),"/ai":c.jsx(yDe,{}),"/profiles":c.jsx(bDe,{}),"/queues":c.jsx(n8,{}),"/schedules":c.jsx(iRe,{}),"/exports":c.jsx(xDe,{}),"/prunes":c.jsx(wDe,{})};function RDe(e){return e==="/"?"overview":e==="/entries/exception"?"exceptions":e.slice(1)}function PI(e){try{return decodeURIComponent(e)}catch{return e}}function $I(e){if(e==="/"||e==="")return"overview";if(e==="/entries/exception")return"exceptions";if(e==="/entries"||e.startsWith("/entries/view/"))return"entries";const t=/^\/entries\/([^/]+)$/.exec(e);if(t!=null&&t[1])return`watcher:${PI(t[1])}`;const n=/^\/ext\/([^/]+)$/.exec(e);if(n!=null&&n[1])return`dashboard:${PI(n[1])}`;const r=e.split("/")[1];return r||void 0}function DI(e){return e.startsWith("/entries/view/")?"Entry":e.startsWith("/traces/")?"Trace":e==="/queues/metrics"?"Queue metrics":"Telescope"}function MDe(){const{paused:e,setPaused:t}=sB();return c.jsxs("button",{type:"button",onClick:()=>t(!e),"aria-pressed":e,title:e?"Resume live tail":"Pause live tail",className:ge("flex h-7 items-center gap-1.5 rounded-md border px-2 text-[12px] transition-colors",e?"border-warn/30 bg-warn/10 text-warn hover:bg-warn/15":"border-transparent text-dim hover:bg-hover hover:text-fg"),children:[c.jsx("span",{"aria-hidden":"true",className:ge("size-[7px] rounded-full",e?"bg-warn":"tele-live bg-good")}),e?"Paused":"Live"]})}function PDe(){return c.jsx(i8,{icon:"telescope"})}function $De({children:e}){var b,v,w,S,O,j,E;const t=x.useMemo(()=>SRe(TDe),[]),n=Ra(),{pathname:r}=_u(),i=J5("/").replace(/\/$/,""),a=Ks(),o=EDe(),s=IX((b=a.data)==null?void 0:b.entryTypes),l=kX(s,(v=a.data)==null?void 0:v.watchers),u=CDe(ADe,(w=a.data)==null?void 0:w.tracesEnabled,(O=(S=a.data)==null?void 0:S.profiling)==null?void 0:O.enabled),f=((j=a.data)==null?void 0:j.dashboards)??[],d=((E=$I(r))==null?void 0:E.startsWith("watcher:"))??!1,p=(()=>{const T=(C,_,$,D)=>({id:C,label:_,icon:D,href:`${i}${$}`,onSelect:()=>n($)}),A=C=>u.filter(_=>_De[_.to]===C).map(_=>T(RDe(_.to),_.label,_.to,NDe[_.to]));return[{section:"Monitor",items:A("Monitor")},{section:"Explore",items:A("Explore")},{section:"Operations",items:A("Operations")},{section:"Dashboards",items:f.map(C=>T(`dashboard:${C.id}`,C.label,`/ext/${C.id}`,c.jsx(SDe,{})))},{section:"Watchers",collapsible:!0,defaultOpen:d,items:l.map(C=>T(`watcher:${C.id}`,C.label,`/entries/${C.id}`,c.jsx("span",{className:"grid size-[15px] place-items-center","aria-hidden":"true",children:c.jsx("span",{className:ge("size-[7px] rounded-full",C.dot)})})))},{section:"Data",items:A("Data")}]})(),h=[...p.filter(T=>T.section!=="Watchers").flatMap(T=>T.items.map(A=>({id:`page:${A.id}`,label:A.label,group:"Pages",icon:A.icon,keywords:[T.section],onSelect:()=>{var C;return(C=A.onSelect)==null?void 0:C.call(A)}}))),{id:"page:queue-metrics",label:"Queue metrics",group:"Pages",icon:c.jsx(rRe,{}),keywords:["Operations","queues"],onSelect:()=>n("/queues/metrics")},...s.map(T=>({id:`type:${T.id}`,label:T.label,group:"Entry types",icon:c.jsx("span",{className:"grid size-4 place-items-center","aria-hidden":"true",children:c.jsx("span",{className:ge("size-[7px] rounded-full",T.dot)})}),keywords:[T.id,"watcher"],onSelect:()=>n(`/entries/${T.id}`)}))],y=$I(r),m=p.flatMap(T=>T.items).find(T=>T.id===y),g=r.startsWith("/entries/view/")||/^\/traces\/./.test(r)?DI(r):(m==null?void 0:m.label)??DI(r);return c.jsx(mDe,{brand:{name:"telescope",subtitle:"observability",mark:c.jsx(PDe,{}),current:{title:"Telescope",package:"@dudousxd/nestjs-telescope",icon:"telescope"}},nav:p,activeId:y,shell:t,title:g,commands:h,searchPlaceholder:"Jump to a page, or search by id or tag…",actions:c.jsxs(c.Fragment,{children:[c.jsx(jDe,{}),c.jsx("span",{className:"hidden lg:flex",children:c.jsx(Z_e,{})}),c.jsx(MDe,{})]}),children:c.jsx(yRe,{label:g,resetKeys:[r],className:"m-4 md:m-6",children:o?c.jsx(o8,{className:"mt-16",icon:c.jsx(aRe,{}),title:"Choose an organization",description:"Choose an organization to see its data."}):e})})}function Dd({title:e,description:t,actions:n,className:r}){return c.jsxs("div",{className:ge("flex flex-wrap items-end justify-between gap-3",r),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"text-lg font-bold tracking-[0.01em] text-fg",children:e}),t&&c.jsx("p",{className:"mt-1 text-xs text-faint",children:t})]}),n&&c.jsx("div",{className:"flex flex-wrap items-center gap-2",children:n})]})}function DDe({children:e,className:t,label:n="toolbar"}){return c.jsx("div",{role:"toolbar","aria-label":n,className:ge("flex flex-wrap items-center gap-1.5",t),children:e})}function IDe(e,t){if(e===void 0||!t)return null;const n=t.direction==="up-bad";return(n?e>=t.bad:e<=t.bad)?"bad":(n?e>=t.warn:e<=t.warn)?"warn":"ok"}const kDe={ok:"var(--good)",warn:"var(--warn)",bad:"var(--bad)"};function LDe({points:e}){if(e.length<2)return null;const t=Math.max(...e),n=Math.min(...e),r=t-n||1,i=e.map((a,o)=>{const s=o/(e.length-1)*100,l=20-(a-n)/r*18-1;return`${o===0?"M":"L"}${s.toFixed(1)},${l.toFixed(1)}`}).join(" ");return c.jsxs("svg",{className:"mt-2",width:"100%",height:"22",viewBox:"0 0 100 22",preserveAspectRatio:"none",children:[c.jsx("title",{children:"Trend sparkline"}),c.jsx("path",{d:i,fill:"none",stroke:"var(--aviary-muted, var(--muted))",strokeWidth:"1.5"})]})}function Ze({label:e,value:t,delta:n,deltaLabel:r,spark:i,thresholds:a,currentValue:o,accent:s="text-foreground",hint:l}){const u=IDe(o,a),f=n===void 0||!a?null:a.direction==="up-bad"?n<0:n>0,d=f===null?"#a1a1aa":f?"var(--good)":"var(--bad)",p=n===void 0?"":n>0?"▲":n<0?"▼":"◆";return c.jsxs("div",{"data-health":u??void 0,className:"aviary-surface overflow-hidden rounded-lg border border-border px-[18px] pt-4 pb-3.5",children:[u&&c.jsx("div",{style:{height:3,background:kDe[u],margin:"-16px -18px 13px"}}),c.jsx("p",{className:"mb-2.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:e}),c.jsxs("p",{className:`flex items-baseline gap-2 font-mono text-[26px] font-semibold leading-none tracking-[-0.02em] tabular-nums ${s}`,children:[t,n!==void 0&&c.jsxs("span",{className:"text-xs font-semibold",style:{color:d},children:[p," ",r??Math.abs(n)]})]}),i&&c.jsx(LDe,{points:i}),l&&c.jsx("p",{className:"mt-2 truncate font-mono text-[10.5px] text-faint",children:l})]})}function BDe(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:`${i}m ${t%60}s`}function zDe({stats:e}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Server"}),e?c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[c.jsx(Ze,{label:"Uptime",value:BDe(e.uptimeSec),accent:"text-brand"}),c.jsx(Ze,{label:"RSS",value:`${e.memory.rssMb} MB`,hint:`heap ${e.memory.heapUsedMb}/${e.memory.heapTotalMb} MB`}),c.jsx(Ze,{label:"Heap used",value:`${e.memory.heapUsedMb} MB`,accent:"text-info"}),c.jsx(Ze,{label:"CPU",value:`${Math.round(e.cpu.userMs)} ms`,accent:"text-violet",hint:`sys ${Math.round(e.cpu.systemMs)} ms`}),c.jsx(Ze,{label:"Event loop",value:e.eventLoopDelayMs===null?"n/a":`${e.eventLoopDelayMs} ms`,accent:e.eventLoopDelayMs!==null&&e.eventLoopDelayMs>100?"text-bad":"text-foreground",hint:`instance ${e.instanceId}`})]}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function FDe(e){return`${(Math.max(0,e)/1e3).toFixed(1)} µs`}function II(e){return e===null?"n/a":`${e.toFixed(1)} ms`}function UDe({health:e}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"-mx-4 -mt-4 mb-3 flex items-baseline justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Telescope health"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Captures run off the response path — your requests don't wait on Telescope."})]}),e?c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[c.jsx(Ze,{label:"Capture cost",value:`${FDe(e.captureCostNanos)}/capture`,accent:"text-brand",hint:"micro-benchmark"}),c.jsx(Ze,{label:"Buffer",value:`${e.bufferUsed} / ${e.bufferSize}`,accent:"text-info",hint:`high-water ${e.bufferHighWater}`}),c.jsx(Ze,{label:"Last flush",value:II(e.lastFlushMs),hint:`max ${II(e.maxFlushMs)}`}),c.jsx(Ze,{label:"Flushes",value:e.flushes.toLocaleString(),accent:"text-violet",hint:`${e.flushedEntries.toLocaleString()} entries`}),c.jsx(Ze,{label:"Dropped",value:e.droppedCount.toLocaleString(),accent:e.droppedCount>0?"text-bad":"text-good",hint:e.droppedCount>0?`overflow ${e.overflowDropped} · store ${e.storeFailedDropped}`:"keeping up"}),c.jsx(Ze,{label:"Truncated",value:e.truncatedCount.toLocaleString(),accent:e.truncatedCount>0?"text-warn":"text-good",hint:e.truncatedCount>0?"fat content — tune redact/sampling":"within bounds"})]}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function HDe({retention:e,pruneEnabled:t}){const n=dB(),r=e==null?void 0:e.retention;async function i(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const a=await n.mutateAsync();globalThis.alert(`Pruned ${a.pruned} ${a.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"-mx-4 -mt-4 mb-3 flex items-baseline justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Retention"}),t?c.jsx("button",{type:"button",onClick:i,disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Pruning…":"Prune now"}):null]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[c.jsx(Ze,{label:"Window",value:r?Gp(r.afterMs):"none",accent:r?"text-brand":"text-muted-foreground",hint:(r==null?void 0:r.keepLast)!=null?`keep last ${r.keepLast}`:"unbounded"}),c.jsx(Ze,{label:"Entries",value:(e==null?void 0:e.entryCount)!=null?e.entryCount.toLocaleString():"n/a"}),c.jsx(Ze,{label:"Oldest",value:(e==null?void 0:e.oldestCreatedAt)!=null?"tracked":"n/a"})]})]})}function uq(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function qDe(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:uq(t.t),value:t.total}))}function cq(e){const t=s_((e==null?void 0:e.buckets)??[]);return((e==null?void 0:e.buckets)??[]).map(n=>{const r={label:uq(n.t)};for(const i of t)r[i]=n.byType[i]??0;return r})}function VDe(e){return Object.values(e).reduce((t,n)=>t+n,0)}function GDe(e){const t=e.request??0;return t===0?null:(e.exception??0)/t}const KDe=.05;function YDe(e){return e===null?"n/a":`${(e*100).toFixed(1)}%`}function XDe(e){return(e==null?void 0:e.slowRoutes.length)??0}const ME=100;function WDe(e){return((e==null?void 0:e.queues)??[]).filter(t=>{const n=Math.max(0,t.total-t.completed-t.failed);return t.failed>0||n>=ME})}function QDe({pulse:e,queues:t}){const n=(e==null?void 0:e.counts)??{},r=VDe(n),i=n.request??0,a=n.exception??0,o=GDe(n),s=((t==null?void 0:t.queues)??[]).reduce((u,f)=>u+f.failed,0),l=XDe(e);return c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[c.jsx(Ze,{label:"Requests",value:i.toLocaleString(),accent:"text-brand",hint:`${r.toLocaleString()} entries total`}),c.jsx(Ze,{label:"Error rate",value:YDe(o),accent:o!==null&&o>KDe?"text-bad":"text-foreground",hint:`${a.toLocaleString()} exceptions`}),c.jsx(Ze,{label:"Failed jobs",value:s.toLocaleString(),accent:s>0?"text-bad":"text-foreground",hint:"across queues"}),c.jsx(Ze,{label:"Slow routes",value:l.toLocaleString(),accent:l>0?"text-warn":"text-foreground",hint:"routes over the slow p99 threshold"})]})}function kI({title:e,emptyLabel:t,children:n}){const r=Array.isArray(n)?n.length>0:!!n;return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),r?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:n}):c.jsx("p",{className:"text-xs text-muted-foreground",children:t})]})}function ZDe({hotspots:e,onSelectFamily:t}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"N+1 query hotspots"}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(n=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t(n.familyHash),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsxs("span",{className:"min-w-0 truncate",children:[c.jsxs("span",{className:"whitespace-nowrap text-warn",children:["×",n.perRequest]})," ",c.jsx("span",{className:"text-muted-foreground",children:n.sql})]}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.requests," req · ",n.total," total",n.totalDurationMs>0?` · ${Math.round(n.totalDurationMs)}ms`:""]})]})},n.familyHash))}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"None detected"})]})}function JDe({queues:e,onOpenQueues:t}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"-mx-4 -mt-4 mb-3 flex items-baseline justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Queues needing attention"}),c.jsx("button",{type:"button",onClick:t,className:"text-[11px] text-muted-foreground hover:text-brand",children:"All queues →"})]}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(n=>{const r=Math.max(0,n.total-n.completed-n.failed);return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.queue}),c.jsxs("span",{className:"shrink-0 tabular-nums",children:[n.failed>0?c.jsxs("span",{className:"text-bad",children:[n.failed," failed"]}):null,n.failed>0&&r>=ME?c.jsx("span",{className:"text-muted-foreground",children:" · "}):null,r>=ME?c.jsxs("span",{className:"text-warn",children:[r.toLocaleString()," pending"]}):null]})]})},n.queue)})}):c.jsx("p",{className:"text-xs text-good",children:"All queues healthy"})]})}function eIe({hotspots:e}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Slowest jobs"}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(t=>c.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[c.jsx("span",{className:"min-w-0 truncate text-foreground",children:t.route}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[c.jsxs("span",{className:"text-warn",children:[Math.round(t.p99),"ms"]})," p99 · ",t.count,"×"]})]},t.route))}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"No jobs in window."})]})}function tIe({users:e,onSelectUser:t}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Load by user"}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(n=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t(n.user),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.user}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.count," req · ",Math.round(n.totalDurationMs),"ms"]})]})},n.user))}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"No identified users in window."})]})}function nIe({history:e}){const t=(e==null?void 0:e.samples)??[],n=t.map(o=>o.cpuPercent),r=t.map(o=>o.rssMb),i=t.map(o=>o.heapUsedMb),a=t[t.length-1];return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Resource history"}),t.length>1?c.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["CPU ",a?`${a.cpuPercent}%`:""]}),c.jsx(Nv,{values:n})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["RSS ",a?`${a.rssMb}MB`:""]}),c.jsx(Nv,{values:r})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["Heap ",a?`${a.heapUsedMb}MB`:""]}),c.jsx(Nv,{values:i})]})]}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Collecting samples…"})]})}function rIe(){var m,g,b,v,w,S,O;const[e,t]=x.useState("1h"),n=Ra(),r=hB(e),i=mB(e),a=eA({window:e,buckets:60}),o=gX(),s=vX(),l=bX(),u=uX(),f=Ks(),d=qDe(a.data),p=cq(a.data),h=s_(((m=a.data)==null?void 0:m.buckets)??[]),y=WDe(i.data);return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"Overview",description:"What needs attention right now, then the trends and Telescope's own health.",actions:c.jsx($d,{value:e,onChange:t})}),c.jsx(QDe,{pulse:r.data,queues:i.data}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx(kI,{title:"Recent failures",emptyLabel:"No exceptions 🎉",children:(((g=r.data)==null?void 0:g.topExceptions)??[]).map(j=>c.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[c.jsxs("span",{className:"min-w-0",children:[c.jsx("span",{className:"text-bad",children:j.class})," ",c.jsx("span",{className:"text-muted-foreground",children:j.message})]}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["×",j.count]})]},j.familyHash))}),c.jsx(ZDe,{hotspots:((b=r.data)==null?void 0:b.nPlusOne)??[],onSelectFamily:j=>n(`/entries/query?familyHash=${encodeURIComponent(j)}`)})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx(kI,{title:"Slowest",emptyLabel:"Nothing slow in window.",children:(((v=r.data)==null?void 0:v.slowest)??[]).map(j=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>n(`/entries/view/${j.id}`),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsxs("span",{className:"min-w-0 truncate",children:[c.jsx("span",{className:"text-brand",children:j.type})," ",c.jsx("span",{className:"text-muted-foreground",children:j.label})]}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[j.durationMs,"ms"]})]})},j.id))}),c.jsx(JDe,{queues:y,onOpenQueues:()=>n("/queues")})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx(eIe,{hotspots:((w=r.data)==null?void 0:w.slowJobs)??[]}),c.jsx(tIe,{users:((S=r.data)==null?void 0:S.loadByUser)??[],onSelectUser:j=>n(`/entries?tag=${encodeURIComponent(`user:${j}`)}`)})]}),c.jsx(nIe,{history:s.data}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx(ku,{title:"Throughput",valueLabel:"entries",data:d}),c.jsx($0,{title:"By type",series:h,data:p})]}),c.jsx(zDe,{stats:o.data}),c.jsx(UDe,{health:l.data}),c.jsx(HDe,{retention:u.data,pruneEnabled:((O=f.data)==null?void 0:O.pruneEnabled)??!1})]})}function iIe(){const{data:e}=cB(),t=(e==null?void 0:e.queues)??[],n=e==null?void 0:e.capabilities,[r,i]=x.useState(void 0),[a,o]=x.useState("waiting"),[s,l]=x.useState(null);x.useEffect(()=>{if(r||t.length===0)return;const d=t[0];d&&i({driver:d.driver,queue:d.queue})},[t,r]);const u=t.find(d=>d.driver===(r==null?void 0:r.driver)&&d.queue===(r==null?void 0:r.queue));function f(d,p){i({driver:d,queue:p}),l(null)}return c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[280px_minmax(0,1fr)]",children:[c.jsxs("aside",{className:"space-y-2",children:[c.jsx("h3",{className:"px-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:"Live queues"}),c.jsx(_Ne,{...r?{selected:r}:{},onSelect:f})]}),c.jsx("section",{className:"min-w-0 space-y-3",children:r?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("h2",{className:"truncate text-sm font-semibold text-fg",children:[r.queue,c.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-[0.12em] text-faint",children:r.driver})]}),a==="failed"&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(zNe,{capabilities:n,driver:r.driver,queue:r.queue}),c.jsx(FNe,{capabilities:n,driver:r.driver,queue:r.queue})]})]}),c.jsx(NNe,{counts:u==null?void 0:u.counts,state:a,onState:o}),c.jsx($Ne,{driver:r.driver,queue:r.queue,state:a,onOpen:l}),c.jsx(KNe,{capabilities:n,driver:r.driver,queue:r.queue})]}):c.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-12 text-center text-xs text-faint",children:"Select a queue to inspect its jobs."})}),r&&s&&c.jsx(qNe,{driver:r.driver,queue:r.queue,jobId:s,state:a,capabilities:n,onClose:()=>l(null)})]})}function id({title:e,description:t,actions:n,children:r,className:i}){return c.jsxs(Bo,{...i?{className:i}:{},children:[c.jsx(Dd,{title:e,description:t,actions:n}),r]})}function Fu({rows:e=8,className:t}){return c.jsx("div",{"aria-busy":"true","aria-label":"Loading",className:ge("aviary-surface rounded-lg border border-border px-4 py-2",t),children:Array.from({length:e},(n,r)=>`row-${r}`).map((n,r)=>c.jsxs("div",{className:"flex items-center gap-4 border-b border-line-soft py-2.5 last:border-0",children:[c.jsx(to,{className:"h-3 w-16 shrink-0"}),c.jsx(to,{className:"h-3 w-14 shrink-0"}),c.jsx(to,{className:"h-3",style:{width:`${40+r*17%40}%`}}),c.jsx(to,{className:"ml-auto h-3 w-10 shrink-0"})]},n))})}function aIe({height:e=220}){return c.jsxs("div",{"aria-busy":"true","aria-label":"Loading",className:"aviary-surface flex flex-col gap-3 rounded-lg border border-border p-4",children:[c.jsx(to,{className:"h-3 w-32"}),c.jsx(to,{className:"w-full",style:{height:e-40}})]})}function y_({title:e,description:t,icon:n,action:r}){return c.jsx("div",{className:"aviary-surface rounded-lg border border-border",children:c.jsx(o8,{title:e,description:t,icon:n,action:r})})}function oIe({error:e,label:t}){const n=e instanceof Error?e.message:String(e);return c.jsxs("div",{role:"alert",className:"rounded-lg border border-bad/25 bg-bad/5 p-4 text-sm text-bad",children:[t," could not be loaded: ",c.jsx("span",{className:"mono text-[11px] text-fg-2",children:n})]})}const im={queue:"#71717a",model:"#38bdf8",tools:"#2dd4bf"},sIe={users:"#38bdf8",platform:"#c084fc"};function Nl(e){if(e==null)return"—";if(e===0)return"$0";const t=Math.abs(e);return t<.01?`$${e.toFixed(4)}`:t<100?`$${e.toFixed(2)}`:`$${Math.round(e).toLocaleString("en-US")}`}function tr(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(e<1e4?2:1)}s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function gi(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(1)}k`:e.toLocaleString("en-US")}function LI(e,t){return t<=0?"0%":`${Math.round(e/t*100)}%`}function lIe(e){return e==="@platform"?"Platform (@platform)":e}function jc({title:e,hint:t}){return c.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),t&&c.jsx("span",{className:"text-[10px] text-muted-foreground",children:t})]})}function am({children:e}){return c.jsx("section",{className:"space-y-3 aviary-surface rounded-lg border border-border p-4",children:e})}function D1({title:e,rows:t,total:n,label:r=i=>i}){return c.jsxs(am,{children:[c.jsx(jc,{title:e}),t.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Nothing in this window."}):c.jsx("ul",{className:"space-y-2",children:t.map(i=>c.jsxs("li",{className:"space-y-1",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs",children:[c.jsx("span",{className:"truncate font-mono text-foreground",title:i.key,children:r(i.key)}),c.jsxs("span",{className:"shrink-0 tabular-nums text-foreground",children:[Nl(i.costUsd),c.jsxs("span",{className:"ml-2 text-muted-foreground",children:[gi(i.calls)," calls",i.unpricedCalls>0?` · ${i.unpricedCalls} unpriced`:""]})]})]}),c.jsx("div",{className:"h-1 rounded bg-line",children:c.jsx("div",{className:"h-1 rounded bg-brand",style:{width:n>0?`${Math.max(1,i.costUsd/n*100)}%`:0}})})]},i.key))})]})}function uIe({run:e,scaleMs:t}){const n=[{key:"queue",ms:e.queueMs??0},{key:"model",ms:e.modelMs??0},{key:"tools",ms:e.toolsMs??0}],r=n.reduce((a,o)=>a+o.ms,0);if(r===0)return c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"no breakdown"});const i=Math.max(t,r,1);return c.jsx("div",{className:"flex h-2 w-40 overflow-hidden rounded bg-line",role:"img","aria-label":`queue ${tr(e.queueMs)}, model ${tr(e.modelMs)}, tools ${tr(e.toolsMs)}`,title:`queue ${tr(e.queueMs)} · model ${tr(e.modelMs)} · tools ${tr(e.toolsMs)}`,children:n.map(a=>a.ms>0?c.jsx("span",{style:{width:`${a.ms/i*100}%`,background:im[a.key]}},a.key):null)})}function cIe(){return c.jsx("span",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:Object.keys(im).map(e=>c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"h-2 w-2 rounded-sm",style:{background:im[e]}}),e]},e))})}function fq({status:e,code:t}){return e==="completed"?c.jsx(Dc,{variant:"good",children:"completed"}):e==="cancelled"?c.jsx(Dc,{variant:"muted",children:"cancelled"}):c.jsxs(Dc,{variant:"bad",title:t??void 0,children:["failed",t?` · ${t}`:""]})}function fIe({runs:e,selectedId:t,onSelect:n}){const r=Math.max(1,...e.map(i=>(i.queueMs??0)+(i.modelMs??0)+(i.toolsMs??0)));return c.jsxs(il,{containerClassName:"max-h-[28rem]",children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"When"}),c.jsx(_e,{children:"Agent"}),c.jsx(_e,{children:"Status"}),c.jsx(_e,{children:"Model"}),c.jsx(_e,{className:"text-right",children:"Duration"}),c.jsx(_e,{children:"Queue · model · tools"}),c.jsx(_e,{className:"text-right",children:"Steps"}),c.jsx(_e,{className:"text-right",children:"Tool calls"}),c.jsx(_e,{className:"text-right",children:"Cost"})]})}),c.jsx(ol,{children:e.map(i=>c.jsxs(Dn,{onClick:()=>n(i),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(i))},tabIndex:0,"aria-selected":t===i.entryId,className:`cursor-pointer ${t===i.entryId?"bg-panel-2":"hover:bg-panel"}`,children:[c.jsx(Me,{className:"whitespace-nowrap text-muted-foreground",title:i.at,children:Lo(new Date(i.at).getTime())}),c.jsx(Me,{className:"font-mono",children:i.agent}),c.jsx(Me,{children:c.jsx(fq,{status:i.status,code:i.code})}),c.jsx(Me,{className:"max-w-[12rem] truncate font-mono text-muted-foreground",children:i.modelId??"—"}),c.jsx(Me,{className:"text-right tabular-nums",children:tr(i.durationMs)}),c.jsx(Me,{children:c.jsx(uIe,{run:i,scaleMs:r})}),c.jsx(Me,{className:"text-right tabular-nums",children:i.steps??"—"}),c.jsx(Me,{className:"text-right tabular-nums",children:i.toolCalls??"—"}),c.jsx(Me,{className:"text-right tabular-nums",children:Nl(i.costUsd)})]},i.entryId))})]})}function dIe({step:e,scaleMs:t}){const n=Math.max(1,t);return c.jsxs("div",{className:"flex h-2 w-56 overflow-hidden rounded bg-line","aria-hidden":"true",children:[e.modelMs?c.jsx("span",{style:{width:`${e.modelMs/n*100}%`,background:im.model}}):null,e.toolsMs>0?c.jsx("span",{style:{width:`${e.toolsMs/n*100}%`,background:im.tools}}):null]})}function pIe({run:e,onClose:t}){const n=Math.max(1,...e.stepTimings.map(r=>(r.modelMs??0)+r.toolsMs));return c.jsxs(am,{children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline gap-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Run"}),c.jsx("span",{className:"font-mono text-xs text-foreground",children:e.runId??e.entryId}),c.jsx(fq,{status:e.status,code:e.code})]}),c.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[e.traceId?c.jsx(dy,{className:"text-brand hover:underline",to:`/traces/${encodeURIComponent(e.traceId)}`,children:"Open trace waterfall →"}):c.jsx("span",{className:"text-muted-foreground",children:"No trace recorded"}),c.jsx(dy,{className:"text-brand hover:underline",to:`/entries/view/${encodeURIComponent(e.entryId)}`,children:"Open entry →"}),c.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground hover:text-foreground","aria-label":"Close run detail",children:"✕"})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-8",children:[c.jsx(Ze,{label:"Agent",value:e.agent}),c.jsx(Ze,{label:"Duration",value:tr(e.durationMs),accent:"text-brand"}),c.jsx(Ze,{label:"Queue",value:tr(e.queueMs)}),c.jsx(Ze,{label:"Model",value:tr(e.modelMs),hint:`${e.modelCalls??"—"} calls`}),c.jsx(Ze,{label:"Tools",value:tr(e.toolsMs),hint:`${e.toolCalls??"—"} calls`}),c.jsx(Ze,{label:"TTFT",value:tr(e.ttftMs)}),c.jsx(Ze,{label:"Tokens",value:e.inputTokens===null?"—":gi(e.inputTokens+(e.outputTokens??0)),...e.inputTokens===null?{}:{hint:`${e.inputTokens} in · ${e.outputTokens??0} out`}}),c.jsx(Ze,{label:"Cost",value:Nl(e.costUsd),...e.modelId===null?{}:{hint:e.modelId}})]}),e.stepTimings.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"This run carried no per-step timings. They arrive with @dudousxd/nestjs-agent 1.38.0 (core 0.60.0) and later."}):c.jsxs(il,{children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"Step"}),c.jsx(_e,{className:"text-right",children:"Model"}),c.jsx(_e,{className:"text-right",children:"Tools"}),c.jsx(_e,{children:"Model · tools"}),c.jsx(_e,{children:"Tool calls"})]})}),c.jsx(ol,{children:e.stepTimings.map(r=>c.jsxs(Dn,{children:[c.jsxs(Me,{className:"tabular-nums",children:["#",r.step]}),c.jsx(Me,{className:"text-right tabular-nums",children:tr(r.modelMs)}),c.jsx(Me,{className:"text-right tabular-nums",children:tr(r.toolsMs)}),c.jsx(Me,{children:c.jsx(dIe,{step:r,scaleMs:n})}),c.jsx(Me,{className:"font-mono text-muted-foreground",children:r.tools.length===0?"—":r.tools.map(i=>`${i.toolName} ${tr(i.ms)}`).join(" · ")})]},r.step))})]})]})}function BI({title:e,runs:t,value:n,onSelect:r}){return c.jsxs(am,{children:[c.jsx(jc,{title:e}),t.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Nothing in this window."}):c.jsx("ul",{className:"divide-y divide-line-soft",children:t.map(i=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>r(i),className:"flex w-full items-center justify-between gap-3 py-1.5 text-left text-xs hover:bg-panel",children:[c.jsxs("span",{className:"truncate font-mono text-foreground",children:[i.agent,c.jsx("span",{className:"ml-2 text-muted-foreground",children:i.modelId??""})]}),c.jsx("span",{className:"shrink-0 tabular-nums text-foreground",children:n(i)})]})},i.entryId))})]})}function hIe({rows:e}){return c.jsxs(il,{children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"Feature"}),c.jsx(_e,{children:"Model"}),c.jsx(_e,{children:"Provider"}),c.jsx(_e,{className:"text-right",children:"Calls"}),c.jsx(_e,{className:"text-right",children:"Tokens in · out"}),c.jsx(_e,{className:"text-right",children:"Audio"}),c.jsx(_e,{children:"Last seen"})]})}),c.jsx(ol,{children:e.map(t=>c.jsxs(Dn,{children:[c.jsx(Me,{className:"font-mono",children:t.feature}),c.jsx(Me,{className:"font-mono text-muted-foreground",children:t.model}),c.jsx(Me,{className:"text-muted-foreground",children:t.provider}),c.jsx(Me,{className:"text-right tabular-nums",children:gi(t.calls)}),c.jsxs(Me,{className:"text-right tabular-nums",children:[gi(t.inputTokens)," · ",gi(t.outputTokens)]}),c.jsx(Me,{className:"text-right tabular-nums",children:t.audioSeconds>0?`${Math.round(t.audioSeconds)}s`:"—"}),c.jsx(Me,{className:"text-muted-foreground",children:Lo(new Date(t.lastAt).getTime())})]},`${t.feature}|${t.model}|${t.provider}`))})]})}function mIe(e){return e.spend.buckets.map(t=>({label:new Date(t.start).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),users:Number((t.costUsd-t.platformUsd).toFixed(6)),platform:Number(t.platformUsd.toFixed(6))}))}function zI({report:e}){return e.coverage.legacyAgentLib?c.jsxs("div",{className:"rounded-md border border-dashed border-line px-4 py-6 text-sm text-muted-foreground",children:[c.jsxs("p",{children:[c.jsx("span",{className:"text-warn",children:"No AI spend recorded."})," This window has"," ",e.coverage.agentEvents," agent events but no ",c.jsx("code",{children:"usage.recorded"})," — the app most likely runs an agent lib older than ",c.jsx("code",{children:"@dudousxd/nestjs-agent"})," 1.38.0 (core 0.60.0), which is the first to publish one event per usage-ledger row."]}),c.jsx("p",{className:"mt-2",children:"Upgrade the agent packages to see spend, models and unpriced calls here."})]}):c.jsxs("div",{className:"rounded-md border border-dashed border-line px-4 py-6 text-sm text-muted-foreground",children:[c.jsx("p",{children:"No AI usage or agent runs in this window."}),c.jsxs("p",{className:"mt-2",children:["This screen reads the ",c.jsx("code",{children:"aviary:agent:*"})," events of"," ",c.jsx("code",{children:"@dudousxd/nestjs-agent"})," 1.38.0+ (core 0.60.0+), recorded by its Telescope watcher (",c.jsx("code",{children:"@dudousxd/nestjs-agent-telescope"}),") or the generic diagnostics bridge (",c.jsx("code",{children:"@dudousxd/nestjs-diagnostics-telescope"}),"). Widen the window, or check that one of them is registered."]})]})}function gIe(){const[e,t]=x.useState("24h"),[n,r]=aB(),{data:i,isLoading:a,error:o}=SX(e),s=n.get("run"),l=x.useMemo(()=>!i||s===null?null:i.runs.find(p=>p.entryId===s)??i.slowest.find(p=>p.entryId===s)??i.mostExpensive.find(p=>p.entryId===s)??null,[i,s]),u=p=>{const h=new URLSearchParams(n);p===null?h.delete("run"):h.set("run",p.entryId),r(h,{replace:!0})},f=i==null?void 0:i.spend,d=i!==void 0&&(i.coverage.usageEvents>0||i.coverage.runEvents>0);return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"AI",description:"Model calls and agent runs: spend, tokens, latency and failures.",actions:c.jsx($d,{value:e,onChange:t})}),o?c.jsx(oIe,{label:"AI usage",error:o}):a||!i||!f?c.jsx(Fu,{rows:6}):d?c.jsxs(c.Fragment,{children:[i.coverage.legacyAgentLib&&c.jsx(zI,{report:i}),i.truncated&&c.jsxs("p",{className:"text-[11px] text-warn",children:["Scanned ",gi(i.scanned)," entries and hit the scan cap — older entries in this window are not counted."]}),i.coverage.usageEvents>0&&c.jsxs(c.Fragment,{children:[c.jsx(jc,{title:"Spend",hint:`${gi(f.calls)} calls in ${e}`}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[c.jsx(Ze,{label:"Total spend",value:Nl(f.totalUsd),accent:"text-brand"}),c.jsx(Ze,{label:"Platform share",value:LI(f.platformUsd,f.totalUsd),hint:`${Nl(f.platformUsd)} paid by @platform`}),c.jsx(Ze,{label:"Estimated share",value:LI(f.estimatedUsd,f.totalUsd),hint:`${Nl(f.estimatedUsd)} priced by estimate`}),c.jsx(Ze,{label:"Unpriced calls",value:gi(f.unpricedCalls),accent:f.unpricedCalls>0?"text-warn":"text-foreground",hint:"calls with no cost"}),c.jsx(Ze,{label:"Tokens",value:gi(f.inputTokens+f.outputTokens),hint:`${gi(f.inputTokens)} in · ${gi(f.outputTokens)} out · ${gi(f.cacheReadTokens)} cached`}),c.jsx(Ze,{label:"Audio",value:f.audioSeconds>0?`${Math.round(f.audioSeconds/60)} min`:"—",hint:`${Math.round(f.audioSeconds)} s processed`})]}),c.jsx($0,{title:"Spend over time (USD) — users vs platform",series:["users","platform"],data:mIe(i),colors:sIe,brush:!1}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-3",children:[c.jsx(D1,{title:"By feature",rows:f.byFeature,total:f.totalUsd}),c.jsx(D1,{title:"By model",rows:f.byModel,total:f.totalUsd}),c.jsx(D1,{title:"Top payers",rows:f.byActor,total:f.totalUsd,label:lIe})]})]}),i.coverage.runEvents>0&&c.jsxs(c.Fragment,{children:[c.jsx(jc,{title:"Runs",hint:i.coverage.runsWithoutTimings>0?`${i.coverage.runsWithoutTimings} of ${i.coverage.runEvents} runs carried no timing breakdown`:`${i.coverage.runEvents} runs`}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[c.jsx(BI,{title:"Slowest",runs:i.slowest,value:p=>tr(p.durationMs),onSelect:u}),c.jsx(BI,{title:"Most expensive",runs:i.mostExpensive,value:p=>Nl(p.costUsd),onSelect:u})]}),l&&c.jsx(pIe,{run:l,onClose:()=>u(null)}),c.jsxs(am,{children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsx(jc,{title:"Recent runs",hint:"click a run for its steps"}),c.jsx(cIe,{})]}),c.jsx(fIe,{runs:i.runs,selectedId:s,onSelect:u})]})]}),i.coverage.usageEvents>0&&c.jsxs(am,{children:[c.jsx(jc,{title:"Unpriced",hint:"calls the ledger recorded with no cost — give them a price or a provider cost"}),i.unpriced.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Every call in this window was priced."}):c.jsx(hIe,{rows:i.unpriced})]})]}):c.jsx(zI,{report:i})]})}function vIe(e,t){return t.trim()!==""?`No entries match tag '${t.trim()}'`:e?`No ${hh(e)} entries`:"No entries"}function FI(){const{type:e}=cx(),t=Ra(),[n]=aB(),[r,i]=x.useState(()=>n.get("tag")??""),[a,o]=x.useState(""),[s,l]=x.useState(""),[u,f]=x.useState(0),[d,p]=x.useState(0);function h(P){i(P),p(R=>R+1)}function y(P){i(P),f(R=>R+1)}const m=e&&$X(e)?e:void 0,g=r.trim(),b=l_e(g)?g:"",v=b===""?g:"",w=s.trim(),S=n.get("familyHash")??"",O=S!=="",j=w!=="",E=m!==void 0||g!==""||O||j,{data:T,isLoading:A}=pB({...m?gB(m):{},...g!==""?{tag:g}:{},...O?{familyHash:S}:{},...j?{search:w}:{}}),C=(T==null?void 0:T.data)??[];function _(){l(a)}function $(){o(""),l("")}function D(){i(""),$(),t("/entries")}function N(){t(m?`/entries/${m}`:"/entries")}return c.jsxs(Bo,{children:[c.jsx(Dd,{title:m?hh(m):"Entries",description:m?"Recorded entries of this type, newest first, with their insights.":"Everything the watchers recorded, newest first. Filter by type, tag, user or content."}),m?c.jsx(yNe,{type:m}):null,c.jsxs(DDe,{label:"Entry filters",className:"gap-2",children:[m?c.jsxs(Tt,{variant:"ghost",onClick:()=>t("/entries"),className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{className:`h-2 w-2 rounded-full ${px(m)}`,"aria-hidden":"true"}),hh(m),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):c.jsx("span",{className:"rounded-md border border-border bg-panel-2 px-2 py-1 text-xs text-dim",children:"All types"}),c.jsx(QD,{onSelect:h},`tag-${u}`),c.jsx(QD,{prefix:s_e,placeholder:"Filter by user…",ariaLabel:"Filter by user",onSelect:y},`user-${d}`),v!==""?c.jsxs(Tt,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{children:`tag:${v}`}),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,b!==""?c.jsxs(Tt,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{children:`User: ${i_(b)}`}),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,c.jsx(nd,{type:"text",value:a,onChange:P=>o(P.target.value),onKeyDown:P=>{P.key==="Enter"&&_()},onBlur:_,placeholder:"Search content…","aria-label":"Search content"}),j?c.jsxs(Tt,{variant:"ghost",onClick:$,className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{children:`search:"${w}"`}),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,O?c.jsxs(Tt,{variant:"ghost",onClick:N,className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"family:"}),S.slice(0,12),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,E?c.jsx(Tt,{variant:"ghost",onClick:D,children:"Clear filters"}):null]}),T!=null&&T.partial?c.jsx("output",{className:"tint-warn block rounded-lg border px-4 py-3 text-sm",children:"Older entries are unavailable right now — the store could only read part of its data, so this list may be missing them."}):null,A?c.jsx(Fu,{rows:10}):C.length===0?c.jsx(y_,{title:vIe(m,r),description:"New entries show up here as the watchers record them."}):c.jsx("div",{className:"aviary-surface overflow-hidden rounded-lg border border-border",children:c.jsx(q6,{entries:C,onSelect:P=>t(`/entries/view/${P}`)})})]})}function yIe(){const{id:e=""}=cx(),t=Ra(),{data:n,isLoading:r}=mX(e);return c.jsxs(Bo,{children:[c.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"self-start text-xs text-dim hover:text-fg",children:"← Entries"}),r||!n?c.jsx(aIe,{height:360}):c.jsx(R_e,{entry:n,onSelect:i=>t(`/entries/view/${i}`)})]})}const bIe={json:"JSON",csv:"CSV"},xIe={all:"all",...Object.fromEntries(ph.map(e=>[e.id,e.label]))},wIe=200,UI=1e3,HI=1e4,qI={"15m":15*6e4,"1h":60*6e4,"6h":6*60*6e4,"24h":24*60*6e4};function SIe(e){return e==="all"?{}:gB(e)}async function OIe(e,t,n,r,i){const a=[];let o;for(;a.length<n;){const s=Math.min(wIe,n-a.length),l=await e.entries({...t,first:s,...o!==void 0?{after:o}:{}});let u=!1;for(const f of l.data){if(new Date(f.createdAt).getTime()<r){u=!0;break}if(a.push(f),a.length>=n)break}if(i(a.length),u||!l.meta.hasNext||l.meta.nextCursor===null)break;o=l.meta.nextCursor}return a}function jIe({records:e}){return e.length===0?null:c.jsx("div",{className:"rounded-lg border border-line",children:c.jsxs(il,{className:"min-w-[640px] text-left",children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"Filename"}),c.jsx(_e,{children:"Type"}),c.jsx(_e,{children:"Rows"}),c.jsx(_e,{children:"Format"}),c.jsx(_e,{children:"Time"})]})}),c.jsx(ol,{children:e.map(t=>c.jsxs(Dn,{className:"hover:bg-panel",children:[c.jsx(Me,{className:"font-mono text-foreground",children:t.filename}),c.jsx(Me,{className:"text-muted-foreground",children:t.type}),c.jsx(Me,{className:"tabular-nums text-foreground",children:t.rows.toLocaleString()}),c.jsx(Me,{className:"uppercase text-muted-foreground",children:t.format}),c.jsx(Me,{className:"text-muted-foreground",children:new Date(t.at).toLocaleTimeString()})]},`${t.filename}:${t.at}`))})]})})}function EIe(){const e=tt(),t=x.useId(),n=x.useId(),[r,i]=x.useState("all"),[a,o]=x.useState("1h"),[s,l]=x.useState(""),[u,f]=x.useState(UI),[d,p]=x.useState("json"),[h,y]=x.useState(!1),[m,g]=x.useState(null),[b,v]=x.useState(null),[w,S]=x.useState([]);async function O(){y(!0),v(null),g(0);const j=Math.min(Math.max(1,u),HI),E=Date.now()-(qI[a]??qI["1h"]),T={...SIe(r),...s.trim()!==""?{search:s.trim()}:{}};try{const A=await OIe(e,T,j,E,g),C=new Date().toISOString().replace(/[:.]/g,"-"),_=`telescope-export-${r}-${C}.${d}`;d==="csv"?W_e(_,X_e(A)):a_(_,A),S($=>[{filename:_,type:r,rows:A.length,format:d,at:Date.now()},...$])}catch{v("Export failed while gathering entries.")}finally{y(!1)}}return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"Exports",description:"Page captured entries into a downloadable JSON or CSV file. Gathering runs in your browser against the live store, newest-first within the selected window."}),c.jsxs("div",{className:"flex flex-wrap items-end gap-3 aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:["Type",c.jsxs(gE,{items:xIe,value:r,onValueChange:j=>{typeof j=="string"&&i(j)},children:[c.jsx(yE,{"aria-label":"Entry type",children:c.jsx(vE,{})}),c.jsxs(bE,{children:[c.jsx(Op,{value:"all",children:"all"}),ph.map(j=>c.jsx(Op,{value:j.id,children:j.label},j.id))]})]})]}),c.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:["Window",c.jsx($d,{value:a,onChange:o})]}),c.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",htmlFor:t,children:["Search",c.jsx(nd,{id:t,type:"text",value:s,onChange:j=>l(j.target.value),placeholder:"content filter"})]}),c.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",htmlFor:n,children:["Limit",c.jsx(nd,{id:n,type:"number",min:1,max:HI,value:u,onChange:j=>f(Number(j.target.value)||UI),className:"w-24 tabular-nums"})]}),c.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:["Format",c.jsxs(gE,{items:bIe,value:d,onValueChange:j=>p(j==="csv"?"csv":"json"),children:[c.jsx(yE,{"aria-label":"Export format",children:c.jsx(vE,{})}),c.jsxs(bE,{children:[c.jsx(Op,{value:"json",children:"JSON"}),c.jsx(Op,{value:"csv",children:"CSV"})]})]})]}),c.jsx(Tt,{onClick:O,disabled:h,size:"md",children:h?"Exporting…":"Export"}),h&&m!==null&&c.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:["gathered ",m.toLocaleString(),"…"]})]}),b&&c.jsx("p",{className:"px-1 text-xs text-bad",children:b}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"px-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:"Recent exports (this session)"}),w.length===0?c.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-10 text-center text-xs text-muted-foreground",children:"No exports yet. Pick a type, window, and format, then export."}):c.jsx(jIe,{records:w})]})]})}const dq=x.createContext(null);function VI(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>String(t[r]??""))}function TIe(e,t){return e.showWhen?Object.entries(e.showWhen).every(([n,r])=>r.some(i=>i===t[n])):!0}function AIe({ext:e,children:t}){var m,g;const n=MY(),r=_o(),i=Ks(),[a,o]=x.useState(null),[s,l]=x.useState(!1),[u,f]=x.useState(null),d=(((m=i.data)==null?void 0:m.actions)??[]).filter(b=>b.ext===e),h=((g=i.data)==null?void 0:g.mutations)===!0&&(n==null?void 0:n.extAction)!==void 0?{info:b=>d.find(v=>v.name===b.name),request(b,v){const w=d.find(E=>E.name===b.name);if(!w)return;const S=b.label??w.label??w.name,O=b.confirm??w.confirm??`${S}?`,j={};for(const[E,T]of Object.entries(b.input??{}))j[E]=VI(T,v);f(null),o({ext:e,name:w.name,label:S,question:VI(O,v),destructive:b.destructive??w.destructive??!1,input:j})}}:null;async function y(){if(!(!a||!(n!=null&&n.extAction))){l(!0);try{await n.extAction(a.ext,a.name,a.input),f({ok:!0,text:`${a.label}: done.`}),await r.invalidateQueries({queryKey:["telescope","ext-data",a.ext]})}catch(b){f({ok:!1,text:`${a.label} failed: ${b instanceof Error?b.message:String(b)}`})}finally{l(!1),o(null)}}}return c.jsxs(dq.Provider,{value:h,children:[u&&c.jsx("output",{className:`mb-3 block rounded border px-3 py-1.5 text-xs ${u.ok?"tint-good":"tint-bad"}`,children:u.text}),t,c.jsx(i6,{open:a!==null,onOpenChange:b=>{!b&&!s&&o(null)},children:c.jsxs(a6,{"aria-label":"Confirm action",className:"space-y-3 p-4",children:[c.jsx(o6,{children:a==null?void 0:a.label}),c.jsx(nAe,{children:a==null?void 0:a.question}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Tt,{variant:"ghost",disabled:s,onClick:()=>o(null),children:"Cancel"}),c.jsx(Tt,{variant:a!=null&&a.destructive?"bad":"solid",disabled:s,onClick:()=>void y(),children:a==null?void 0:a.label})]})]})})]})}function CIe({action:e,row:t}){const n=x.useContext(dq),r=n==null?void 0:n.info(e);return n===null||r===void 0||!TIe(e,t)?null:c.jsx(Tt,{size:"xs",variant:e.destructive??r.destructive?"bad":"outline",className:"ml-2",onClick:()=>n.request(e,t),children:e.label??r.label??r.name})}function _Ie({title:e,segments:t,style:n="donut",height:r=220,onSelect:i}){const a=r-64,o=x.useMemo(()=>Pd(t.map(f=>f.label),(f,d)=>{var p;return b1(f,d,(p=t[d])==null?void 0:p.color)}),[t]);function s(f){const d=t[f];d&&i&&i(zm({label:d.label,value:d.value}))}const l=i?{onClick:(f,d)=>s(d),cursor:"pointer"}:{};if(t.length===0)return c.jsx(Ms,{title:e,height:a,children:c.jsx(Fm,{height:a})});if(n==="bar"){const f=[{name:"breakdown",...Object.fromEntries(t.map(d=>[d.label,d.value]))}];return c.jsx(Ms,{title:e,height:a,children:c.jsx(pu,{config:o,children:c.jsxs(dC,{data:f,layout:"vertical",children:[c.jsx(Xf,{content:c.jsx(Wf,{hideLabel:!0})}),c.jsx(Kj,{content:c.jsx(Xj,{})}),t.map((d,p)=>c.jsx(Do,{dataKey:d.label,stackId:"a",fill:b1(d.label,p,d.color),isAnimationActive:!1,...i?{onClick:()=>s(p),cursor:"pointer"}:{}},d.label))]})})})}const u=t.map((f,d)=>({name:f.label,value:f.value,color:b1(f.label,d,f.color)}));return c.jsx(Ms,{title:e,height:a,children:c.jsx(pu,{config:o,children:c.jsxs(gOe,{children:[c.jsx(Xf,{content:c.jsx(Wf,{hideLabel:!0})}),c.jsx(Kj,{content:c.jsx(Xj,{})}),c.jsx($o,{data:u,dataKey:"value",nameKey:"name",innerRadius:"55%",outerRadius:"80%",isAnimationActive:!1,...l,children:u.map(f=>c.jsx(Td,{fill:f.color},f.name))})]})})})}function NIe(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}const RIe={p50:"tint-good",p95:"tint-warn",p99:"tint-bad"};function MIe({title:e,buckets:t,p50:n,p95:r,p99:i,height:a=220,onSelect:o}){const s=[];n!==void 0&&s.push([n,"p50"]),r!==void 0&&s.push([r,"p95"]),i!==void 0&&s.push([i,"p99"]);const l=a-64,u=x.useMemo(()=>Pd(["count"],()=>"var(--live)"),[]),f=o?{onClick:(d,p)=>{const h=t[p];h&&o(zm({label:h.label,value:h.count}))},cursor:"pointer"}:{};return c.jsx(Ms,{title:e,height:l,children:c.jsxs("div",{className:"flex h-full flex-col",children:[s.length>0&&c.jsx("div",{className:"mb-1.5 flex flex-wrap gap-2",children:s.map(([d,p])=>c.jsxs("span",{className:`rounded border px-1.5 text-[10px] tabular-nums ${RIe[p]}`,children:[p,": ",NIe(d)]},p))}),c.jsx("div",{className:"min-h-0 flex-1",children:t.length===0?c.jsx(Fm,{}):c.jsx(pu,{config:u,children:c.jsxs(dC,{data:t,margin:{top:4,right:8,bottom:0,left:-16},children:[c.jsx(Mm,{vertical:!1}),c.jsx(So,{dataKey:"label",tickLine:!1}),c.jsx(Oo,{tickLine:!1,allowDecimals:!1,width:52}),c.jsx(Xf,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:c.jsx(Wf,{})}),c.jsx(Do,{dataKey:"count",name:"count",fill:oo("count"),radius:[3,3,0,0],isAnimationActive:!1,...f})]})})})]})})}function PIe({title:e,value:t,min:n=0,max:r=1,label:i,color:a="var(--good)",height:o=220}){const s=r-n,l=s===0?0:Math.max(0,Math.min(1,(t-n)/s)),u=i??`${Math.round(l*100)}%`,f=o-64,d=x.useMemo(()=>Pd(["value"],()=>a,()=>e),[a,e]),p=[{value:l*100}];return c.jsx(Ms,{title:e,height:f,children:c.jsxs("div",{className:"relative h-full",children:[c.jsx(pu,{config:d,children:c.jsxs(vOe,{innerRadius:"60%",outerRadius:"100%",data:p,startAngle:180,endAngle:0,barSize:16,children:[c.jsx(Nd,{type:"number",domain:[0,100],tick:!1,axisLine:!1}),c.jsx(Rm,{dataKey:"value",fill:oo("value"),background:!0,cornerRadius:4,isAnimationActive:!1})]})}),c.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center pt-[40%]",children:c.jsx("span",{className:"text-xl font-semibold tabular-nums text-foreground",children:u})})]})})}function $Ie({columns:e}){const[t,n]=x.useState(!1),r=x.useRef(null),i=e.filter(o=>o.getCanHide());if(x.useEffect(()=>{if(!t)return;function o(l){var u;l.target instanceof Node&&((u=r.current)!=null&&u.contains(l.target))||n(!1)}function s(l){l.key==="Escape"&&n(!1)}return document.addEventListener("mousedown",o),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",s)}},[t]),i.length===0)return null;const a=i.filter(o=>!o.getIsVisible()).length;return c.jsxs("div",{className:"relative",ref:r,children:[c.jsxs(Tt,{variant:"ghost",size:"xs","aria-haspopup":"menu","aria-expanded":t,onClick:()=>n(o=>!o),className:"px-1.5 text-muted-foreground",children:["Columns",a>0?` (${i.length-a}/${i.length})`:""]}),t&&c.jsx("div",{role:"menu",className:"absolute right-0 z-20 mt-1 min-w-[10rem] rounded border border-line bg-popover p-1 shadow-lg",children:i.map(o=>c.jsxs(Tt,{role:"menuitemcheckbox","aria-checked":o.getIsVisible(),variant:"ghost",size:"xs",onClick:()=>o.toggleVisibility(),className:"w-full justify-start gap-2 normal-case tracking-normal",children:[c.jsx("span",{"aria-hidden":"true",className:o.getIsVisible()?"":"opacity-30",children:o.getIsVisible()?"☑":"☐"}),typeof o.columnDef.header=="string"?o.columnDef.header:o.id]},o.id))})]})}function DIe(e){return IIe(e)||typeof e=="function"||kIe(e)}function IIe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function kIe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Rl(e,t){return e==null?null:DIe(e)?z.createElement(e,t):e}function LIe(e){var t,n;if("cell"in e&&e.cell){const r=e.cell,i=r.column.columnDef,a=r,o=i;return(t=a.getIsAggregated)!=null&&t.call(a)?Rl(o.aggregatedCell??i.cell,r.getContext()):(n=a.getIsPlaceholder)!=null&&n.call(a)?null:Rl(i.cell,r.getContext())}return"header"in e&&e.header?Rl(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?Rl(e.footer.column.columnDef.footer,e.footer.getContext()):null}function BIe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(u,f,d){const p=f.depsTail;if(p!==void 0&&p.dep===u)return;const h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===u){h.version=d,f.depsTail=h;return}const y=u.subsTail;if(y!==void 0&&y.version===d&&y.sub===f)return;const m=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:p,nextDep:h,prevSub:y,nextSub:void 0};h!==void 0&&(h.prevDep=m),p!==void 0?p.nextDep=m:f.deps=m,y!==void 0?y.nextSub=m:u.subs=m}function i(u,f=u.sub){const d=u.dep,p=u.prevDep,h=u.nextDep,y=u.nextSub,m=u.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,y!==void 0?y.prevSub=m:d.subsTail=m,m!==void 0?m.nextSub=y:(d.subs=y)===void 0&&n(d),h}function a(u){let f=u.nextSub,d;e:do{const p=u.sub;let h=p.flags;if(h&60?h&12?h&4?!(h&48)&&l(u,p)?(p.flags=h|40,h&=1):h=0:p.flags=h&-9|32:h=0:p.flags=h|32,h&2&&t(p),h&1){const y=p.subs;if(y!==void 0){const m=(u=y).nextSub;m!==void 0&&(d={value:f,prev:d},f=m);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue e}break}while(!0)}function o(u,f){let d,p=0,h=!1;e:do{const y=u.dep,m=y.flags;if(f.flags&16)h=!0;else if((m&17)===17){if(e(y)){const g=y.subs;g.nextSub!==void 0&&s(g),h=!0}}else if((m&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=y.deps,f=y,++p;continue}if(!h){const g=u.nextDep;if(g!==void 0){u=g;continue}}for(;p--;){const g=f.subs,b=g.nextSub!==void 0;if(b?(u=d.value,d=d.prev):u=g,h){if(e(f)){b&&s(g),f=u.sub;continue}h=!1}else f.flags&=-33;f=u.sub;const v=u.nextDep;if(v!==void 0){u=v;continue e}}return h}while(!0)}function s(u){do{const f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&t(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function zIe(e,t,n){var a,o,s;const r=typeof e=="object",i=r?e:void 0;return{next:(a=r?e.next:e)==null?void 0:a.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(s=r?e.complete:n)==null?void 0:s.bind(i)}}const PE=[];let Pv=0;const{link:GI,unlink:FIe,propagate:UIe,checkDirty:pq,shallowPropagate:KI}=BIe({update(e){return e._update()},notify(e){PE[$E++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Db(e))}});let nv=0,$E=0,aa,DE=0;function HIe(e){try{++DE,e()}finally{--DE||hq()}}function Db(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=FIe(n,e)}function hq(){if(!(DE>0)){for(;nv<$E;){const e=PE[nv];PE[nv++]=void 0,e.notify()}nv=0,$E=0}}function qIe(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?0:1,get(){return aa!==void 0&&GI(i,aa,Pv),i._snapshot},subscribe(a){const o=zIe(a),s={current:!1},l=VIe(()=>{var u;i.get(),s.current?(u=o.next)==null||u.call(o,i._snapshot):s.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(a){const o=aa,s=(t==null?void 0:t.compare)??Object.is;if(n)aa=i,++Pv,i.depsTail=void 0;else if(a===void 0)return!1;n&&(i.flags=5);try{const l=i._snapshot,u=typeof a=="function"?a(l):a===void 0&&n?r(l):a;return l===void 0||!s(l,u)?(i._snapshot=u,!0):!1}finally{aa=o,n&&(i.flags&=-5),Db(i)}}};return n?(i.flags=17,i.get=function(){const a=i.flags;if(a&16||a&32&&pq(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&KI(o)}}else a&32&&(i.flags=a&-33);return aa!==void 0&&GI(i,aa,Pv),i._snapshot}):i.set=function(a){if(i._update(a)){const o=i.subs;o!==void 0&&(UIe(o),KI(o),hq())}},i}function VIe(e){const t=()=>{const r=aa;aa=n,++Pv,n.depsTail=void 0,n.flags=6;try{return e()}finally{aa=r,n.flags&=-5,Db(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&pq(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Db(this)}};return t(),n}function Yp(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=YI(e);if(n.length!==YI(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function YI(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var mq={exports:{}},gq={},vq={exports:{}},yq={};/**
|
|
213
|
+
* @license React
|
|
214
|
+
* use-sync-external-store-shim.production.js
|
|
215
|
+
*
|
|
216
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the MIT license found in the
|
|
219
|
+
* LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/var ad=x;function GIe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var KIe=typeof Object.is=="function"?Object.is:GIe,YIe=ad.useState,XIe=ad.useEffect,WIe=ad.useLayoutEffect,QIe=ad.useDebugValue;function ZIe(e,t){var n=t(),r=YIe({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return WIe(function(){i.value=n,i.getSnapshot=t,I1(i)&&a({inst:i})},[e,n,t]),XIe(function(){return I1(i)&&a({inst:i}),e(function(){I1(i)&&a({inst:i})})},[e]),QIe(n),n}function I1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!KIe(e,n)}catch{return!0}}function JIe(e,t){return t()}var eke=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?JIe:ZIe;yq.useSyncExternalStore=ad.useSyncExternalStore!==void 0?ad.useSyncExternalStore:eke;vq.exports=yq;var tke=vq.exports;/**
|
|
221
|
+
* @license React
|
|
222
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
223
|
+
*
|
|
224
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the MIT license found in the
|
|
227
|
+
* LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/var F0=x,nke=tke;function rke(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ike=typeof Object.is=="function"?Object.is:rke,ake=nke.useSyncExternalStore,oke=F0.useRef,ske=F0.useEffect,lke=F0.useMemo,uke=F0.useDebugValue;gq.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=oke(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=lke(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var y=o.value;if(i(y,h))return d=y}return d=h}if(y=d,ike(f,h))return y;var m=r(h);return i!==void 0&&i(y,m)?(f=h,y):(f=h,d=m)}var u=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=ake(e,a[0],a[1]);return ske(function(){o.hasValue=!0,o.value=s},[s]),uke(s),s};mq.exports=gq;var cke=mq.exports;function fke(e,t){return e===t}function bq(e,t=r=>r,n){const r=(n==null?void 0:n.compare)??fke,i=x.useCallback(o=>{const{unsubscribe:s}=e.subscribe(o);return s},[e]),a=x.useCallback(()=>e.get(),[e]);return cke.useSyncExternalStoreWithSelector(i,a,a,t,r)}function dke(e){const t=bq(e.source,e.selector,{compare:Yp});return typeof e.children=="function"?e.children(t):e.children}function pke(e){const t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),"set"in e&&(t.setState=e.set.bind(e)),t}function hke(e){const{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw new Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw new Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(i=>queueMicrotask(i)),batch:n,untrack:i=>i(),createReadonlyAtom:(i,a)=>{const o=(a==null?void 0:a.compare)??Object.is;let s=!1,l;const u=()=>{const d=i();return(!s||!o(l,d))&&(l=d,s=!0),l},f=t(()=>(r.get(),u()),{compare:o});return{get:u,subscribe:f.subscribe.bind(f)}},createWritableAtom:(i,a)=>t(i,{compare:a==null?void 0:a.compare}),commit:()=>{r.set(i=>i+1)}}}function mke(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:i=>{r=i,n=!0},subscribe:i=>e.subscribe(a=>{(!n||!t(r,a))&&i(a)})}}function gke(){return hke({createAtom:qIe,batch:HIe})}function Id(e,t){return typeof e=="function"?e(t):e}function Eo(e){if(Array.isArray(e))return e.map(Eo);if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const n=t===null?or():{},r=Object.keys(e);for(let i=0;i<r.length;i++){const a=r[i];Object.defineProperty(n,a,{configurable:!0,enumerable:!0,value:Eo(e[a]),writable:!0})}return n}return e}function or(){return Object.create(null)}function U0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function b_(e,t){return n=>{var r;(((r=t.options.atoms)==null?void 0:r[e])??t.baseAtoms[e]).set(i=>Id(n,i))}}function XI(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e))return!0;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function WI(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}const vke=3;function yke(e,t){return xq(e,t,vke)}function xq(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!XI(e)||!XI(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;const r=WI(e),i=WI(t);if(r.length!==i.length)return!1;const a=e,o=t;for(let s=0;s<r.length;s++){const l=r[s];if(!Object.prototype.propertyIsEnumerable.call(t,l)||!xq(a[l],o[l],n-1))return!1}return!0}function kd(e,t,n,r=yke){const i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,a=e.options[i];a&&a(o=>{const s=Id(n,o);return r(o,s)?o:s})}function wq(e){return e instanceof Function}function bke(e,t){const n=[],r=i=>{i.forEach(a=>{n.push(a);const o=t(a);o.length&&r(o)})};return r(e),n}const xke=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:a})=>{let o=[],s;return u=>{i==null||i();const f=t==null?void 0:t(u);let d=!f||f.length!==(o==null?void 0:o.length);if(!d&&f){for(let p=0;p<f.length;p++)if(f[p]!==o[p]){d=!0;break}}return n==null||n(d),d&&(o=f,a==null||a(),s=e(...f??[]),r==null||r(s)),s}};function wke(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function x_({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...a}){const o=()=>{if(!r)return;const{schedule:l,untrack:u}=i._reactivity;l(()=>u(()=>r()))};return xke({...a,...{onAfterUpdate:()=>{o()}}})}function Sq(e,t="_"){const[n,r]=e.split(t);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function sl(e,t,n){for(const[r,{fn:i,memoDeps:a}]of Object.entries(n)){const{fnKey:o,fnName:s}=Sq(r);t[o]=a?x_({memoDeps:a,fn:i,fnName:s,table:t,feature:e}):i}}function Hs(e,t,n,r){for(const[i,{fn:a,memoDeps:o}]of Object.entries(r)){const{fnKey:s,fnName:l}=Sq(i);if(o){const u=`_memo_${s}`;t[s]=function(...f){if(!this[u]){const d=this;this[u]=x_({memoDeps:p=>o(d,p),fn:(...p)=>a(d,...p),fnName:l,objectId:d.id,table:n,feature:e})}return this[u](...f)}}else t[s]=function(...u){return a(this,...u)}}}function Yn(e,t,n,...r){var i;return((i=e[t])==null?void 0:i.call(e,...r))??n(e,...r)}function Ske(e){return e.row.getValue(e.column.id)}function Oke(e){return e.getValue()??e.table.options.renderFallbackValue}function jke(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}const Eke={assignCellPrototype:(e,t)=>{Hs("coreCellsFeature",e,t,{cell_getValue:{fn:n=>Ske(n)},cell_renderValue:{fn:n=>Oke(n)},cell_getContext:{fn:n=>jke(n),memoDeps:n=>[n]}})}};function Tke(e){var t,n;if(!e._headerPrototype){e._headerPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignHeaderPrototype)==null||n.call(t,e._headerPrototype,e)}return e._headerPrototype}function Oq(e,t,n){const r=Tke(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];const a=e._headerInstanceInitFns;for(let o=0;o<a.length;o++)a[o](i);return i}function jq(){return{start:[],end:[]}}function Ake(){return or()}function Eq(e,t){Ib(e)&&H0(e.table,n=>{const r=Object.assign(or(),n),i=t??!Yn(e,"getIsVisible",Br),a=e.getLeafColumns();for(let o=0;o<a.length;o++){const s=a[o];Ib(s)&&(r[s.id]=i)}return r})}function Br(e){var r;const t=(r=e.table.atoms.columnVisibility)==null?void 0:r.get();if(!t)return!0;const n=e.columns;return n.length?n.some(i=>Yn(i,"getIsVisible",Br)):(U0(t,e.id)?t[e.id]:void 0)??!0}function Ib(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function Cke(e){return t=>{Eq(e,t.target.checked)}}function _ke(e){var u;const t=e.getAllCells(),n=[];for(let f=0;f<t.length;f++){const d=t[f];Yn(d.column,"getIsVisible",Br)&&n.push(d)}const{start:r,end:i}=((u=e.table.atoms.columnPinning)==null?void 0:u.get())??jq();if(!r.length&&!i.length)return n;const a=Yn(e,"getVisibleCellsByColumnId",Tq),o=[];for(let f=0;f<r.length;f++){const d=a[r[f]];d&&o.push(d)}const s=[];for(let f=0;f<i.length;f++){const d=a[i[f]];d&&s.push(d)}const l=[];for(let f=0;f<n.length;f++){const d=n[f],p=d.column.id;!r.includes(p)&&!i.includes(p)&&l.push(d)}return[...o,...l,...s]}function Tq(e){const t=or(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];Yn(i.column,"getIsVisible",Br)&&(t[i.column.id]=i)}return t}function Nke(e){return e.getAllFlatColumns().filter(t=>Yn(t,"getIsVisible",Br))}function Aq(e){return e.getAllLeafColumns().filter(t=>Yn(t,"getIsVisible",Br))}function H0(e,t){kd(e,"columnVisibility",t)}function Rke(e,t){H0(e,t?or():Object.assign(or(),Eo(e.initialState.columnVisibility??{})))}function Cq(e,t){t=t??!_q(e);const n=or(),r=e.getAllLeafColumns();for(let i=0;i<r.length;i++){const a=r[i];n[a.id]=t||!Ib(a)}H0(e,n)}function _q(e){return!e.getAllLeafColumns().some(t=>!Yn(t,"getIsVisible",Br))}function Mke(e){return e.getAllLeafColumns().some(t=>Yn(t,"getIsVisible",Br))}function Pke(e){return t=>{Cq(e,t.target.checked)}}function Nq(e,t=1){let n=t;for(let r=0;r<e.length;r++){const i=e[r];Yn(i,"getIsVisible",Br)&&i.columns.length&&(n=Math.max(n,Nq(i.columns,t+1)))}return n}function $ke(e,t){return String(t)}function Dke(e,t,n,r){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function Ike(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function Rq(e,t,n,r,i,a){const o={depth:t,id:$ke(r,t),headers:[]},s=[];for(let l=0;l<e.length;l++){if(!(l in e))continue;const u=e[l],f=s[s.length-1],d=u.column.depth===o.depth;let p,h=!1;if(d&&u.column.parent?p=u.column.parent:(p=u.column,h=!0),f&&f.column===p)f.subHeaders.push(u);else{const y=Oq(n,p,{id:Dke(r,t,p.id,u.id),isPlaceholder:h,placeholderId:h?String(Ike(s,p)):void 0,depth:t,index:s.length});y.subHeaders.push(u),s.push(y)}o.headers.push(u),u.headerGroup=o}for(let l=0;l<a.length;l++)a[l](o);i.push(o),t>0&&Rq(s,t-1,n,r,i,a)}function Mq(e){for(let t=0;t<e.length;t++){const n=e[t];if(!Yn(n.column,"getIsVisible",Br))continue;let r=0;if(n.subHeaders.length){Mq(n.subHeaders);for(let i=0;i<n.subHeaders.length;i++){const a=n.subHeaders[i];Yn(a.column,"getIsVisible",Br)&&(r+=a.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let i=1,a=n.subHeaders[0];for(;a;)a.rowSpan=0,i++,a=a.subHeaders.length===1&&a.subHeaders[0].column===n.column?a.subHeaders[0]:void 0;n.rowSpan=i}else n.rowSpan=1}}function QI(e,t,n,r){var l;const i=Nq(e),a=[],o=n._headerGroupInstanceInitFns,s=new Array(t.length);for(let u=0;u<t.length;u++)u in t&&(s[u]=Oq(n,t[u],{depth:i,index:u}));return Rq(s,i-1,n,r,a,o),a.reverse(),Mq(((l=a[0])==null?void 0:l.headers)??[]),a}function kke(e){var t,n;if(!e._columnPrototype){e._columnPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignColumnPrototype)==null||n.call(t,e._columnPrototype,e)}return e._columnPrototype}function Lke(e,t,n,r){const i={...e.getDefaultColumnDef(),...t},a=i.accessorKey,o=a===void 0?void 0:String(a),s=i.id??(o==null?void 0:o.replaceAll(".","_"))??(typeof i.header=="string"?i.header:void 0);let l;if(i.accessorFn)l=i.accessorFn;else if(a!==void 0)if(typeof a=="string"&&a.includes(".")){const p=a.split(".");l=h=>{let y=h;for(let m=0;m<p.length;m++){const g=p[m];y=y==null?void 0:y[g]}return y}}else l=p=>p[i.accessorKey];if(!s)throw new Error;const u=kke(e),f=Object.create(u);f.accessorFn=l,f.columnDef=i,f.columns=[],f.depth=n,f.id=`${String(s)}`,f.parent=r;const d=e._columnInstanceInitFns;for(let p=0;p<d.length;p++)d[p](f);return f}function Pq(e){var n;const t=(n=e.atoms.columnOrder)==null?void 0:n.get();return r=>{let i=[];if(!(t!=null&&t.length))i=r;else{const a=new Map;for(let o=0;o<r.length;o++){const s=r[o];a.set(s.id,s)}for(let o=0;o<t.length;o++){const s=t[o],l=a.get(s);l&&(i.push(l),a.delete(s))}for(let o=0;o<r.length;o++){const s=r[o];a.has(s.id)&&i.push(s)}}return Bke(e,i)}}function Bke(e,t){var s;const n=((s=e.atoms.grouping)==null?void 0:s.get())??[],{groupedColumnMode:r}=e.options;if(!n.length||!r)return t;const i=t.filter(l=>!n.includes(l.id));if(r==="remove")return i;const a=new Map;for(let l=0;l<t.length;l++){const u=t[l];a.set(u.id,u)}const o=[];for(let l=0;l<n.length;l++){const u=a.get(n[l]);u&&o.push(u)}return[...o,...i]}function zke(e){return[e,...e.columns.flatMap(t=>t.getFlatColumns())]}function Fke(e){if(e.columns.length){const t=e.columns.flatMap(n=>n.getLeafColumns());return Yn(e.table,"getOrderColumns",Pq)(t)}return[e]}function Uke(e){return{header:t=>{const n=t.header.column.columnDef;return n.accessorKey?n.accessorKey:n.accessorFn?n.id:null},cell:t=>{var n,r;return((r=(n=t.renderValue())==null?void 0:n.toString)==null?void 0:r.call(n))??null},...Object.values(e._features).reduce((t,n)=>{var r;return Object.assign(t,(r=n.getDefaultColumnDef)==null?void 0:r.call(n))},{}),...e.options.defaultColumn}}function $q(e,t,n,r=0){const i=new Array(t.length);for(let a=0;a<t.length;a++){if(!(a in t))continue;const o=t[a],s=Lke(e,o,r,n),l=o;s.columns=l.columns?$q(e,l.columns,s,r+1):[],i[a]=s}return i}function Hke(e){return $q(e,e.options.columns)}function qke(e){return e.getAllColumns().flatMap(t=>t.getFlatColumns())}function Vke(e){const t=or(),n=e.getAllFlatColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function Gke(e){const t=e.getAllColumns().flatMap(n=>n.getLeafColumns());return Yn(e,"getOrderColumns",Pq)(t)}function Kke(e){const t=or(),n=e.getAllLeafColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function Yke(e,t){return e.getAllFlatColumnsById()[t]}const Xke={assignColumnPrototype:(e,t)=>{Hs("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:n=>zke(n),memoDeps:n=>[n.table.options.columns]},column_getLeafColumns:{fn:n=>Fke(n),memoDeps:n=>{var r,i;return[(r=n.table.atoms.columnOrder)==null?void 0:r.get(),(i=n.table.atoms.grouping)==null?void 0:i.get(),n.table.options.columns,n.table.options.groupedColumnMode]}}})},constructTableAPIs:e=>{sl("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>Uke(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>Hke(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>qke(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>Vke(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>Gke(e),memoDeps:()=>{var t,n;return[(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),e.options.columns,e.options.groupedColumnMode]}},table_getAllLeafColumnsById:{fn:()=>Kke(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>Yke(e,t)}})}};function Dq(e,t){for(let n=0;n<e.subHeaders.length;n++)Dq(e.subHeaders[n],t);t.push(e)}function Wke(e){const t=[];return Dq(e,t),t}function Qke(e){return{column:e.column,header:e,table:e.column.table}}function Zke(e){var u;const{start:t,end:n}=((u=e.atoms.columnPinning)==null?void 0:u.get())??jq(),r=e.getAllColumns(),i=Yn(e,"getVisibleLeafColumns",Aq);if(!t.length&&!n.length)return QI(r,i,e);const a=e.getAllLeafColumnsById(),o=[];for(let f=0;f<t.length;f++){const d=a[t[f]];d&&Yn(d,"getIsVisible",Br)&&o.push(d)}const s=[];for(let f=0;f<n.length;f++){const d=a[n[f]];d&&Yn(d,"getIsVisible",Br)&&s.push(d)}const l=i.filter(f=>!t.includes(f.id)&&!n.includes(f.id));return QI(r,[...o,...l,...s],e)}function Jke(e){return[...e.getHeaderGroups()].reverse()}function eLe(e){const t=e.getHeaderGroups(),n=[];for(let r=0;r<t.length;r++){const i=t[r].headers;for(let a=0;a<i.length;a++)n.push(i[a])}return n}function tLe(e){var r;const t=((r=e.getHeaderGroups()[0])==null?void 0:r.headers)??[],n=[];for(let i=0;i<t.length;i++){const a=t[i].getLeafHeaders();for(let o=0;o<a.length;o++)n.push(a[o])}return n}const nLe={assignHeaderPrototype:(e,t)=>{Hs("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:n=>Wke(n),memoDeps:n=>[n.column.table.options.columns]},header_getContext:{fn:n=>Qke(n),memoDeps:n=>[n.column.table.options.columns]}})},constructTableAPIs:e=>{sl("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>Zke(e),memoDeps:()=>{var t,n,r,i;return[e.options.columns,(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),(r=e.atoms.columnPinning)==null?void 0:r.get(),(i=e.atoms.columnVisibility)==null?void 0:i.get(),e.options.groupedColumnMode]}},table_getFooterGroups:{fn:()=>Jke(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>eLe(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>tLe(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function rLe(e){var t,n;if(!e._rowPrototype){e._rowPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignRowPrototype)==null||n.call(t,e._rowPrototype,e)}return e._rowPrototype}const iLe=(e,t,n,r,i,a,o)=>{const s=rLe(e),l=Object.create(s);l._displayIndexCache=-1,l._uniqueValuesCache=or(),l._valuesCache=or(),l.depth=i,l.id=t,l.index=r,l.original=n,l.parentId=o,l.subRows=[];const u=e._rowInstanceInitFns;for(let f=0;f<u.length;f++)u[f](l);return l},aLe=/([0-9]+)/gm;function Ld(e){const t=Object.assign((n,r,i)=>{let a=n.getValue(i),o=r.getValue(i);const s=t.resolveDataValue;return s&&(a=s(a),o=s(o)),t.sort(a,o,n,r,i)},e);return t}Ld({resolveDataValue:e=>q0(e).toLowerCase(),sort:(e,t)=>kq(e,t)});Ld({resolveDataValue:e=>q0(e),sort:(e,t)=>kq(e,t)});Ld({resolveDataValue:e=>q0(e).toLowerCase(),sort:(e,t)=>w_(e,t)});Ld({resolveDataValue:e=>q0(e),sort:(e,t)=>w_(e,t)});Ld({resolveDataValue:e=>oLe(e),sort:(e,t)=>e>t?1:e<t?-1:0});const Iq=Ld({sort:(e,t)=>w_(e,t)});function w_(e,t){return e===t?0:e>t?1:-1}function oLe(e){return e instanceof Date?e.getTime():e}function q0(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function kq(e,t){let n=0,r=0;const i=e.length,a=t.length;for(;n<i&&r<a;){const o=kb(e.charCodeAt(n)),s=kb(t.charCodeAt(r)),l=IE(e,n,o),u=IE(t,r,s);if(!o&&!s){const d=sLe(e,n,l,t,r,u);if(d)return d;n=l,r=u;continue}if(o!==s)return o?1:-1;const f=lLe(e,n,l,t,r,u);if(f)return f;n=l,r=u}return JI(e,n)-JI(t,r)}function kb(e){return e>=48&&e<=57}function IE(e,t,n){let r=t+1;for(;r<e.length&&kb(e.charCodeAt(r))===n;)r++;return r}function sLe(e,t,n,r,i,a){const o=n-t,s=a-i,l=o<s?o:s;for(let u=0;u<l;u++){const f=e.charCodeAt(t+u),d=r.charCodeAt(i+u);if(f>d)return 1;if(d>f)return-1}return o>s?1:s>o?-1:0}function lLe(e,t,n,r,i,a){let o=t;for(;o<n&&e.charCodeAt(o)===48;)o++;let s=i;for(;s<a&&r.charCodeAt(s)===48;)s++;const l=n-o,u=a-s;if(l===0&&u===0)return 0;if(l<=15&&u<=15){const p=ZI(e,o,n),h=ZI(r,s,a);return p>h?1:h>p?-1:0}const f=parseInt(e.slice(t,n),10),d=parseInt(r.slice(i,a),10);return f>d?1:d>f?-1:0}function ZI(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function JI(e,t){let n=0,r=t;for(;r<e.length;)n++,r=IE(e,r,kb(e.charCodeAt(r)));return n}function uLe(){return[]}function cLe(e,t){kd(e,"cellSelection",Eo(e.initialState.cellSelection)??uLe())}function fLe(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>cLe(e))}function dLe(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>pLe(e))}function pLe(e,t){const n=e.initialState.expanded;kd(e,"expanded",n===!0?!0:Object.assign(or(),Eo(n??{})))}const kE=0;function hLe(e){var t,n;if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((((n=(t=e.atoms.pagination)==null?void 0:t.get())==null?void 0:n.pageIndex)??kE)===kE)return;vLe(e)}}function mLe(e,t){kd(e,"pagination",t)}function gLe(e,t){mLe(e,n=>{let r=Id(t,n.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function vLe(e,t){gLe(e,kE)}function yLe(){return[]}function V0(e,t){kd(e,"sorting",t)}function Lq(e,t){V0(e,t?[]:Eo(e.initialState.sorting??[]))}function bLe(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&Lq(e)}function Bq(e){const t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10);let r,i=!1;for(let a=0;a<n.length;a++){const o=n[a].getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]"){r="datetime";break}if(typeof o=="string"&&(i=!0,o.split(aLe).length>1)){r="alphanumeric";break}}if(!r&&i&&(r="text"),r){let a=t==null?void 0:t[r];if(a||r==="alphanumeric"&&(a=t==null?void 0:t.text),a)return a}return Iq}function zq(e){const t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){const r=t[n].getValue(e.id);if(r!=null)return typeof r=="string"?"asc":"desc"}return"desc"}function xLe(e){const t=e.table._rowModelFns.sortFns;return wq(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn==="auto"?Bq(e):(t==null?void 0:t[e.columnDef.sortFn])??Iq}function Fq(e,t,n){const r=Hq(e,n&&Lb(e)),i=typeof t<"u";V0(e.table,a=>{const o=a.findIndex(p=>p.id===e.id),s=o===-1?void 0:a[o];let l=[],u;const f=i?t:r==="desc",d=!!(a.length&&Lb(e)&&n);return d?s?u="toggle":u="add":s?u="toggle":u="replace",u==="toggle"&&(i||r||(u="remove")),u==="add"?(l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):u==="toggle"?l=d?a.map(p=>p.id===e.id?{...p,desc:f}:p):[{id:e.id,desc:f}]:u==="remove"?l=d?a.filter(p=>p.id!==e.id):[]:l=[{id:e.id,desc:f}],l})}function Uq(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??zq(e)==="desc"?"desc":"asc"}function Hq(e,t){const n=Uq(e),r=Vq(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r==="desc"?"asc":"desc":n}function qq(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function Lb(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function Vq(e){var n,r;const t=(r=(n=e.table.atoms.sorting)==null?void 0:n.get())==null?void 0:r.find(i=>i.id===e.id);return t?t.desc?"desc":"asc":!1}function wLe(e){var t,n;return((n=(t=e.table.atoms.sorting)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function SLe(e){V0(e.table,t=>t.length?t.filter(n=>n.id!==e.id):[])}function OLe(e){const t=qq(e);return n=>{var r,i;t&&Fq(e,void 0,Lb(e)?(i=(r=e.table.options).isMultiSortEvent)==null?void 0:i.call(r,n):!1)}}function jLe(){return e=>x_({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>ELe(e,e.options.data),onAfterUpdate:wke(()=>{dLe(e),hLe(e),bLe(e),fLe(e)})})}function Gq(e,t,n,r=0,i){var o;const a=[];for(let s=0;s<n.length;s++){const l=n[s],u=iLe(e,e.getRowId(l,s,i),l,s,r,void 0,i==null?void 0:i.id);t.flatRows.push(u),t.rowsById[u.id]=u,a.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(l,s),(o=u.originalSubRows)!=null&&o.length&&(u.subRows=Gq(e,t,u.originalSubRows,r+1,u)))}return a}function ELe(e,t){const n={rows:[],flatRows:[],rowsById:or()};return n.rows=Gq(e,n,t),n}function TLe(e){var t,n;return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=((n=(t=e.options.features).coreRowModel)==null?void 0:n.call(t,e))??jLe()(e)),e._rowModels.coreRowModel()}function ALe(e){return e.getCoreRowModel()}function CLe(e){var t,n;return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=(n=(t=e.options.features).filteredRowModel)==null?void 0:n.call(t,e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function _Le(e){return e.getFilteredRowModel()}function NLe(e){var t,n;return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=(n=(t=e.options.features).groupedRowModel)==null?void 0:n.call(t,e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function RLe(e){return e.getGroupedRowModel()}function MLe(e){var t,n;return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=(n=(t=e.options.features).sortedRowModel)==null?void 0:n.call(t,e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function PLe(e){return e.getSortedRowModel()}function $Le(e){var t,n;return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=(n=(t=e.options.features).expandedRowModel)==null?void 0:n.call(t,e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function DLe(e){return e.getExpandedRowModel()}function ILe(e){var t,n;return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=(n=(t=e.options.features).paginatedRowModel)==null?void 0:n.call(t,e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function kLe(e){return e.getPaginatedRowModel()}const LLe={constructTableAPIs:e=>{sl("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>TLe(e)},table_getPreFilteredRowModel:{fn:()=>ALe(e)},table_getFilteredRowModel:{fn:()=>CLe(e)},table_getPreGroupedRowModel:{fn:()=>_Le(e)},table_getGroupedRowModel:{fn:()=>NLe(e)},table_getPreSortedRowModel:{fn:()=>RLe(e)},table_getSortedRowModel:{fn:()=>MLe(e)},table_getPreExpandedRowModel:{fn:()=>PLe(e)},table_getExpandedRowModel:{fn:()=>$Le(e)},table_getPrePaginatedRowModel:{fn:()=>DLe(e)},table_getPaginatedRowModel:{fn:()=>ILe(e)},table_getRowModel:{fn:()=>kLe(e)}})}};function BLe(e){var t,n;if(!e._cellPrototype){e._cellPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignCellPrototype)==null||n.call(t,e._cellPrototype,e)}return e._cellPrototype}function zLe(e,t,n){const r=BLe(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;const a=n._cellInstanceInitFns;for(let o=0;o<a.length;o++)a[o](i);return i}function FLe(e){const t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function ULe(e){const t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){const n=[],r=i=>{var a;i._displayIndexCache=n.length,n.push(i),i.subRows.length&&((a=i.getIsExpanded)!=null&&a.call(i))&&i.subRows.forEach(r)};return t.forEach(r),n}for(let n=0;n<t.length;n++)t[n]._displayIndexCache=n;return t}function HLe(e,t){if(U0(e._valuesCache,t))return e._valuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function qLe(e,t){if(U0(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function VLe(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function GLe(e){return bke(e.subRows,t=>t.subRows)}function KLe(e){const t=e.getCoreRowModel().flatRows;let n=0;for(let r=0;r<t.length;r++)n=Math.max(n,t[r].depth);return n}function YLe(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function XLe(e){const t=[];let n=e;for(;;){const r=n.getParentRow();if(!r)break;t.push(r),n=r}return t.reverse()}function WLe(e){const t=e.table.getAllLeafColumns();let n=e._cellsCache;n||(n=e._cellsCache=new WeakMap);const r=new Array(t.length);for(let i=0;i<t.length;i++){const a=t[i];let o=n.get(a);o||(o=zLe(a,e,e.table),n.set(a,o)),r[i]=o}return r}function QLe(e){const t=or(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];t[i.column.id]=i}return t}function ZLe(e,t,n,r){var i,a;return((a=(i=t.options).getRowId)==null?void 0:a.call(i,e,n,r))??(r?`${r.id}.${n}`:String(n))}function JLe(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw new Error;return r}const e3e={assignRowPrototype:(e,t)=>{Hs("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:n=>FLe(n)},row_getAllCellsByColumnId:{fn:n=>QLe(n),memoDeps:n=>[n.getAllCells()]},row_getAllCells:{fn:n=>WLe(n),memoDeps:n=>[n.table.getAllLeafColumns()]},row_getLeafRows:{fn:n=>GLe(n),memoDeps:n=>[n.subRows]},row_getParentRow:{fn:n=>YLe(n)},row_getParentRows:{fn:n=>XLe(n)},row_getUniqueValues:{fn:(n,r)=>qLe(n,r)},row_getValue:{fn:(n,r)=>HLe(n,r)},row_renderValue:{fn:(n,r)=>VLe(n,r)}})},constructTableAPIs:e=>{sl("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>ULe(e),memoDeps:()=>{var t;return[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?(t=e.atoms.expanded)==null?void 0:t.get():void 0]}},table_getRowId:{fn:(t,n,r)=>ZLe(t,e,n,r)},table_getRow:{fn:(t,n)=>JLe(e,t,n)},table_getMaxSubRowDepth:{fn:()=>KLe(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function Kq(e,t,n=(r,i)=>r===i){const r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(const i in r){const a=e.baseAtoms[i];if(!a)continue;const o=r[i],s=o===void 0?e.initialState[i]:o;n(e._reactivity.untrack(()=>a.get()),s)||a.set(()=>s)}})}function Yq(e,t,n=(r,i)=>r===i){e._reactivity.batch(()=>{var r,i;Kq(e,t,n),(i=(r=e._reactivity).commit)==null||i.call(r)})}function t3e(e){var r,i;const t=Eo(e.initialState);e._reactivity.batch(()=>{const a=Object.keys(t);for(let o=0;o<a.length;o++){const s=a[o];e.baseAtoms[s].set(t[s])}});const n=Object.values(e._features);for(let a=0;a<n.length;a++)(i=(r=n[a]).resetTableInstanceData)==null||i.call(r,e)}function n3e(e,t){const{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};const a=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(a)};return Object.defineProperties(Object.create(Object.getPrototypeOf(a)),{...o,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function Xq(e,t,n){const r=n3e(e,Id(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,(n==null?void 0:n.syncExternalState)!==!1&&Yq(e,r.state??null)}const r3e={constructTableAPIs:e=>{sl("coreTablesFeature",e,{table_reset:{fn:()=>t3e(e)},table_setOptions:{fn:t=>Xq(e,t)}})}},i3e={coreCellsFeature:Eke,coreColumnsFeature:Xke,coreHeadersFeature:nLe,coreRowModelsFeature:LLe,coreRowsFeature:e3e,coreTablesFeature:r3e};function a3e(e,t={}){return Object.values(e).forEach(n=>{var r;t=((r=n.getInitialState)==null?void 0:r.call(n,t))??t}),Eo(t)}function o3e(e){var j,E;const t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:a,facetedMinMaxValues:o,facetedRowModel:s,facetedUniqueValues:l,filterFns:u,filterMeta:f,filteredRowModel:d,groupedRowModel:p,paginatedRowModel:h,sortFns:y,sortedRowModel:m,tableMeta:g,...b}=e.features,v={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...i3e,...b},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:u,sortFns:y},_rowModels:{},atoms:{},baseAtoms:{}},w=Object.values(v._features),S={...w.reduce((T,A)=>{var C;return Object.assign(T,(C=A.getDefaultTableOptions)==null?void 0:C.call(A,v))},{}),...e};if(t.wrapExternalAtoms&&S.atoms)for(const[T,A]of Object.entries(S.atoms)){const C=A,_=t.createWritableAtom(C.get(),{debugName:`externalAtom/${T}`});S.atoms[T]=_;let $=!1;const D=C.subscribe(P=>{$||_.set(P)}),N=_.subscribe(P=>{$=!0,C.set(P),$=!1});t.addSubscription(D),t.addSubscription(N)}t.createOptionsStore?(v.optionsStore=t.createWritableAtom(S,{debugName:"table/optionsStore"}),Object.defineProperty(v,"options",{configurable:!0,enumerable:!0,get(){return v.optionsStore.get()},set(T){v.optionsStore.set(()=>T)}})):v.options=S,v.initialState=a3e(v._features,v.options.initialState);const O=Object.keys(v.initialState);for(let T=0;T<O.length;T++){const A=O[T];v.baseAtoms[A]=t.createWritableAtom(v.initialState[A],{debugName:`table/baseAtoms/${A}`}),v.atoms[A]=t.createReadonlyAtom(()=>{var N;const C=v.options,_=(N=C.atoms)==null?void 0:N[A],$=_?_.get():v.baseAtoms[A].get();if(_)return $;const D=C.state;if(D&&U0(D,A)){const P=D[A];return P===void 0?v.initialState[A]:P}return $},{debugName:`table/atoms/${A}`})}Kq(v),v.store=pke(t.createReadonlyAtom(()=>{const T={};for(let A=0;A<O.length;A++){const C=O[A];T[C]=v.atoms[C].get()}return T},{compare:Yp,debugName:"table/store"}));for(let T=0;T<w.length;T++){const A=w[T];(j=A.initTableInstanceData)==null||j.call(A,v),A.initCellInstanceData&&v._cellInstanceInitFns.push(A.initCellInstanceData.bind(A)),A.initColumnInstanceData&&v._columnInstanceInitFns.push(A.initColumnInstanceData.bind(A)),A.initHeaderGroupInstanceData&&v._headerGroupInstanceInitFns.push(A.initHeaderGroupInstanceData.bind(A)),A.initHeaderInstanceData&&v._headerInstanceInitFns.push(A.initHeaderInstanceData.bind(A)),A.initRowInstanceData&&v._rowInstanceInitFns.push(A.initRowInstanceData.bind(A)),(E=A.constructTableAPIs)==null||E.call(A,v)}return v}function s3e(){return[]}function Wq(e){const t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows;let r;for(let o=0;o<n.length;o++){const s=n[o].getValue(e.id);if(s!=null){r=s;break}}let i;return typeof r=="string"?i="includesString":typeof r=="number"?i="inNumberRange":typeof r=="boolean"?i="equals":Array.isArray(r)?i="arrIncludes":Object.prototype.toString.call(r)==="[object Date]"?i="inDateRange":r!==null&&typeof r=="object"?i="equals":i="weakEquals",t==null?void 0:t[i]}function S_(e){let t=null;const n=e.table._rowModelFns.filterFns;return t=wq(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?Wq(e):n==null?void 0:n[e.columnDef.filterFn],t??void 0}function l3e(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function u3e(e){return Qq(e)>-1}function c3e(e){var t,n,r;return(r=(n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.find(i=>i.id===e.id))==null?void 0:r.value}function Qq(e){var t,n;return((n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function f3e(e,t){O_(e.table,n=>{const r=S_(e),i=n.find(s=>s.id===e.id),a=Id(t,i?i.value:void 0);if(Zq(r,a,e))return n.filter(s=>s.id!==e.id);const o={id:e.id,value:a};return i?n.map(s=>s.id===e.id?o:s):n.length?[...n,o]:[o]})}function O_(e,t){const n=e.getAllLeafColumnsById();kd(e,"columnFilters",i=>Id(t,i).filter(a=>{const o=n[a.id];return!(o&&Zq(S_(o),a.value,o))}))}function d3e(e,t){O_(e,t?[]:Eo(e.initialState.columnFilters??[]))}function Zq(e,t,n){return typeof t>"u"?!0:e!=null&&e.autoRemove?!!e.autoRemove(t,n):typeof t=="string"&&!t}const p3e={getInitialState:e=>({columnFilters:s3e(),...e}),getDefaultColumnDef:()=>({filterFn:"auto"}),getDefaultTableOptions:e=>({onColumnFiltersChange:b_("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{Hs("columnFilteringFeature",e,t,{column_getAutoFilterFn:{fn:n=>Wq(n)},column_getFilterFn:{fn:n=>S_(n)},column_getCanFilter:{fn:n=>l3e(n)},column_getIsFiltered:{fn:n=>u3e(n)},column_getFilterValue:{fn:n=>c3e(n)},column_getFilterIndex:{fn:n=>Qq(n)},column_setFilterValue:{fn:(n,r)=>f3e(n,r)}})},initRowInstanceData:e=>{e.columnFilters=or(),e.columnFiltersMeta=or()},constructTableAPIs:e=>{sl("columnFilteringFeature",e,{table_setColumnFilters:{fn:t=>O_(e,t)},table_resetColumnFilters:{fn:t=>d3e(e,t)}})}},h3e={getInitialState:e=>({columnVisibility:Ake(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:b_("columnVisibility",e)}),assignColumnPrototype:(e,t)=>{Hs("columnVisibilityFeature",e,t,{column_getIsVisible:{fn:n=>Br(n),memoDeps:n=>{var r;return[t.options.columns,(r=t.atoms.columnVisibility)==null?void 0:r.get(),n.columns]}},column_getCanHide:{fn:n=>Ib(n)},column_getToggleVisibilityHandler:{fn:n=>Cke(n)},column_toggleVisibility:{fn:(n,r)=>Eq(n,r)}})},assignRowPrototype:(e,t)=>{Hs("columnVisibilityFeature",e,t,{row_getVisibleCells:{fn:n=>_ke(n),memoDeps:n=>{var r,i;return[n.getAllCells(),(r=t.atoms.columnPinning)==null?void 0:r.get(),(i=t.atoms.columnVisibility)==null?void 0:i.get()]}},row_getVisibleCellsByColumnId:{fn:n=>Tq(n),memoDeps:n=>{var r;return[n.getAllCells(),(r=t.atoms.columnVisibility)==null?void 0:r.get()]}}})},constructTableAPIs:e=>{sl("columnVisibilityFeature",e,{table_getVisibleFlatColumns:{fn:()=>Nke(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_getVisibleLeafColumns:{fn:()=>Aq(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_setColumnVisibility:{fn:t=>H0(e,t)},table_resetColumnVisibility:{fn:t=>Rke(e,t)},table_toggleAllColumnsVisible:{fn:t=>Cq(e,t)},table_getIsAllColumnsVisible:{fn:()=>_q(e)},table_getIsSomeColumnsVisible:{fn:()=>Mke(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>Pke(e)}})}},m3e={getInitialState(e){return{sorting:yLe(),...e}},getDefaultColumnDef(){return{sortFn:"auto",sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:b_("sorting",e),isMultiSortEvent:t=>t.shiftKey}},assignColumnPrototype(e,t){Hs("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:n=>Bq(n)},column_getAutoSortDir:{fn:n=>zq(n)},column_getSortFn:{fn:n=>xLe(n)},column_toggleSorting:{fn:(n,r,i)=>Fq(n,r,i)},column_getFirstSortDir:{fn:n=>Uq(n)},column_getNextSortingOrder:{fn:(n,r)=>Hq(n,r)},column_getCanSort:{fn:n=>qq(n)},column_getCanMultiSort:{fn:n=>Lb(n)},column_getIsSorted:{fn:n=>Vq(n)},column_getSortIndex:{fn:n=>wLe(n)},column_clearSorting:{fn:n=>SLe(n)},column_getToggleSortingHandler:{fn:n=>OLe(n)}})},constructTableAPIs(e){sl("rowSortingFeature",e,{table_setSorting:{fn:t=>V0(e,t)},table_resetSorting:{fn:t=>Lq(e,t)}})}},g3e=typeof window>"u"?x.useEffect:x.useLayoutEffect;function v3e(e,t){const[{table:n,rootSource:r}]=x.useState(()=>{const l=o3e({...e,features:{coreReactivityFeature:gke(),...e.features}});return l.Subscribe=u=>dke({...u,source:u.source??l.store}),l.FlexRender=LIe,{table:l,rootSource:mke(l.store,Yp)}}),i=n;Xq(i,l=>({...l,...e}),{syncExternalState:!1});const a=i.options.state,o=r.get(),s=bq(r,t,{compare:Yp});return g3e(()=>{r.markCommitted(o),Yq(i,a??null,Yp)}),x.useMemo(()=>({...n,options:e,state:s}),[n,e,s])}const y3e={rowSortingFeature:m3e,columnFilteringFeature:p3e,columnVisibilityFeature:h3e};function b3e({direction:e}){return e==="asc"?c.jsx("span",{"aria-hidden":"true",children:"↑"}):e==="desc"?c.jsx("span",{"aria-hidden":"true",children:"↓"}):c.jsx("span",{"aria-hidden":"true",className:"opacity-30",children:"↕"})}function x3e({header:e,className:t}){const n=e.column.getIsSorted(),r=Rl(e.column.columnDef.header,e.getContext());return c.jsx(_e,{className:`whitespace-nowrap p-0 ${t}`,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":"none",children:c.jsxs(Tt,{variant:"ghost",size:"xs",onClick:e.column.getToggleSortingHandler(),className:"w-full justify-start gap-1 px-3 py-2 font-normal",children:[r,c.jsx(b3e,{direction:n})]})})}function w3e({header:e}){const t=e.column.getFilterValue(),n=typeof t=="string"?t:"",[r,i]=x.useState(n);x.useEffect(()=>i(n),[n]);const a=()=>{r!==n&&e.column.setFilterValue(r)};return c.jsx(nd,{value:r,"aria-label":`Filter by ${e.column.id}`,placeholder:"Filter…",className:"w-full py-0.5",onChange:o=>i(o.target.value),onBlur:a,onKeyDown:o=>{o.key==="Enter"&&a(),o.key==="Escape"&&i(n)}})}function S3e({table:e,sticky:t,menu:n}){var s;const r=((s=e.getHeaderGroups().at(-1))==null?void 0:s.headers)??[],i=r.some(l=>l.column.getCanFilter()),a=t?"sticky top-0 z-10 bg-panel":"",o=t?"sticky top-8 z-10 bg-panel":"";return c.jsxs(al,{children:[c.jsxs(Dn,{children:[r.map(l=>l.column.getCanSort()?c.jsx(x3e,{header:l,className:a},l.id):c.jsx(_e,{className:`whitespace-nowrap ${a}`,children:Rl(l.column.columnDef.header,l.getContext())},l.id)),n?c.jsx(_e,{className:`w-px whitespace-nowrap text-right ${a}`,children:n}):null]}),i&&c.jsxs(Dn,{children:[r.map(l=>c.jsx(_e,{className:`py-1 ${o}`,children:l.column.getCanFilter()?c.jsx(w3e,{header:l}):null},l.id)),n?c.jsx(_e,{className:o}):null]})]})}function O3e(e,t){const n=e.replace(/\{(\w+)\}/g,(r,i)=>String(t[i]??""));return/^\s*(javascript|data|vbscript):/i.test(n)?"#":n}function j3e({spec:e,row:t}){const n=String(t[e.key]??""),r=e.link?c.jsx("a",{className:"text-info hover:underline",href:O3e(e.link.href,t),...e.link.external?{target:"_blank",rel:"noreferrer"}:{},children:n}):n;return e.action?c.jsxs(c.Fragment,{children:[r,c.jsx(CIe,{action:e.action,row:t})]}):c.jsx(c.Fragment,{children:r})}function E3e(e){return e.map(t=>({id:t.key,accessorFn:n=>n[t.key],header:t.label,enableSorting:t.sortable===!0,enableColumnFilter:t.filterable===!0,enableHiding:t.hideable===!0,cell:({row:n})=>c.jsx(j3e,{spec:t,row:n.original})}))}const T3e="max-h-[28rem]";function A3e(e,t,n){return`${t.map(r=>String(e[r.key]??"")).join("|")}#${n}`}function C3e({columns:e,rows:t,sort:n,onSortChange:r,filters:i,onFiltersChange:a,scrolls:o}){const[s,l]=x.useState({}),u=x.useMemo(()=>E3e(e),[e]),f=n?[{id:n.key,desc:n.dir==="desc"}]:[],d=Object.entries(i??{}).map(([g,b])=>({id:g,value:b})),p=v3e({features:y3e,columns:u,data:t,state:{sorting:f,columnFilters:d,columnVisibility:s},onColumnVisibilityChange:l,onSortingChange:g=>{const v=(typeof g=="function"?g(f):g)[0];r==null||r(v?{key:v.id,dir:v.desc?"desc":"asc"}:void 0)},onColumnFiltersChange:g=>{const b=typeof g=="function"?g(d):g,v={};for(const w of b)typeof w.value=="string"&&w.value!==""&&(v[w.id]=w.value);a==null||a(v)},manualSorting:!0,manualFiltering:!0,getRowId:(g,b)=>A3e(g,e,b)}),h=p.getAllLeafColumns(),y=h.some(g=>g.getCanHide()),m=p.getVisibleLeafColumns().length+(y?1:0);return c.jsxs(il,{containerClassName:o?T3e:"",children:[c.jsx(S3e,{table:p,sticky:o===!0,...y?{menu:c.jsx($Ie,{columns:h})}:{}}),c.jsxs(ol,{children:[t.length===0?c.jsx(Dn,{children:c.jsx(Me,{colSpan:m,className:"py-6 text-center text-muted-foreground",children:"No data in this window."})}):null,p.getRowModel().rows.map(g=>c.jsxs(Dn,{children:[g.getVisibleCells().map(b=>c.jsx(Me,{className:"whitespace-nowrap text-foreground",children:Rl(b.column.columnDef.cell,b.getContext())},b.id)),y?c.jsx(Me,{}):null]},g.id))]})]})}function _3e(e,t){return t==="percent"?`${Math.round(e*100)}%`:t==="duration"?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:t==="rate"?`${new Intl.NumberFormat().format(Math.round(e))}/hr`:new Intl.NumberFormat().format(e)}function Jq(e,t="rows"){if(typeof e!="object"||e===null||!(t in e))return[];const n=Reflect.get(e,t);return Array.isArray(n)?n.filter(r=>typeof r=="object"&&r!==null):[]}function k1(e,t){if(typeof e!="object"||e===null||!(t in e))return;const n=Reflect.get(e,t);return typeof n=="number"&&Number.isFinite(n)?n:void 0}function N3e(e){const t=Jq(e,"data"),n=typeof e=="object"&&e!==null?Reflect.get(e,"meta"):void 0;return{rows:t,total:k1(n,"total")??t.length,page:k1(n,"currentPage")??1,limit:k1(n,"perPage")??0}}function R3e({title:e}){return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e}),c.jsx("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:"No data in this window."})]})}function M3e({page:e,totalPages:t,onPageChange:n}){return c.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[c.jsx(Tt,{variant:"outline",size:"xs",disabled:e<=1,onClick:()=>n==null?void 0:n(e-1),className:"px-1.5 text-muted-foreground",children:"Prev"}),c.jsxs("span",{children:["Page ",e," of ",t]}),c.jsx(Tt,{variant:"outline",size:"xs",disabled:e>=t,onClick:()=>n==null?void 0:n(e+1),className:"px-1.5 text-muted-foreground",children:"Next"})]})}function P3e({panel:e,data:t,onPageChange:n,requestedPage:r,sort:i,onSortChange:a,filters:o,onFiltersChange:s,onSelect:l}){const u=l?{onSelect:l}:{};switch(e.kind){case"stat":{const f=t??{};return c.jsx(Ze,{label:e.title,value:_3e(f.value??0,e.format),...f.value!==void 0?{currentValue:f.value}:{},...f.delta!==void 0?{delta:f.delta}:{},...f.deltaLabel?{deltaLabel:f.deltaLabel}:{},...e.spark&&f.spark?{spark:f.spark}:{},...e.thresholds?{thresholds:e.thresholds}:{},...e.accent?{accent:e.accent}:{}})}case"distribution":{const f=t??{};return c.jsx(MIe,{title:e.title,buckets:f.buckets??[],...f.p50!==void 0?{p50:f.p50}:{},...f.p95!==void 0?{p95:f.p95}:{},...f.p99!==void 0?{p99:f.p99}:{},...u})}case"gauge":{const f=t??{};return c.jsx(PIe,{title:e.title,value:f.value??0,...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}})}case"breakdown":{const f=t??{};return c.jsx(_Ie,{title:e.title,segments:f.segments??[],...e.style?{style:e.style}:{},...u})}case"timeseries":{const f=(t==null?void 0:t.rows)??[],d=e.series[0];return e.style==="stacked"?c.jsx($0,{title:e.title,data:f,series:e.series,...u}):c.jsx(ku,{title:e.title,data:f.map(p=>({label:p.label,value:d?Number(p[d]??0):0})),...u})}case"topN":{const f=(t==null?void 0:t.items)??[],d=e.limit?f.slice(0,e.limit):f;return d.length===0?c.jsx(R3e,{title:e.title}):c.jsx(Wl,{title:e.title,data:d,horizontal:!0,truncateLabel:32,...u})}case"table":{const f=c.jsx(C3e,{columns:e.columns,rows:Jq(t,e.paged===!0?"data":"rows"),scrolls:e.paged===!0,sort:i,...a?{onSortChange:a}:{},filters:o,...s?{onFiltersChange:s}:{}});if(e.paged){const{rows:d,total:p,page:h,limit:y}=N3e(t),m=Math.max(1,Math.ceil(p/(y||d.length||1)));return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2",children:[c.jsx("p",{className:"text-xs font-medium text-foreground",children:e.title}),c.jsx(M3e,{page:r??h,totalPages:m,...n?{onPageChange:n}:{}})]}),f]})}return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e.title}),f]})}default:return null}}const $3e="sort",D3e="size";function I3e(e){return`filter[${e}]`}function k3e(e,t){const n=Object.entries(t.filters??{}).filter(([,i])=>i!=="");if(!t.paging&&!t.sort&&n.length===0)return e;const r={...e};t.paging&&(r.page=t.paging.page,r[D3e]=t.paging.size),t.sort&&(r[$3e]=`${t.sort.dir==="desc"?"-":""}${t.sort.key}`);for(const[i,a]of n)r[I3e(i)]=a;return r}const L3e={1:"",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"},B3e=50;function z3e(e){return"drilldown"in e?e.drilldown:void 0}function F3e({status:e}){const t=e==="live";return c.jsxs("span",{"data-telescope-status":e,className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide ${t?"tint-good":"tint-warn"}`,children:[c.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${t?"animate-pulse bg-good":"bg-warn"}`}),t?"live":e]})}function U3e({ext:e,panel:t,focus:n,onSelect:r}){const i=t.kind==="table"&&t.paged===!0,[a,o]=x.useState(1),[s,l]=x.useState(void 0),[u,f]=x.useState({}),d=n?{[n.param]:n.value}:void 0,p=d?{...t.data.query,...d}:t.data.query,h=k3e(p,{...i?{paging:{page:a,size:B3e}}:{},...s?{sort:s}:{},filters:u}),y=yX(e,t.data.provider,h);return y.isError?c.jsxs("div",{className:"tint-bad rounded-lg border px-4 py-3 text-sm",children:['Failed to load "',t.title,'".']}):c.jsx(P3e,{panel:t,data:y.data,...i?{onPageChange:o,requestedPage:a}:{},sort:s,onSortChange:m=>{o(1),l(m)},filters:u,onFiltersChange:m=>{o(1),f(m)},...r?{onSelect:r}:{}})}function H3e(){var u,f;const{dashboardId:e}=cx(),t=Ks(),{status:n}=MX(),[r,i]=x.useState(null),a=(f=(u=t.data)==null?void 0:u.dashboards)==null?void 0:f.find(d=>d.id===e);if(!a)return c.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Dashboard not found."});const o=(e==null?void 0:e.split(".")[0])??"",s=a.sections??[{panels:a.panels,cols:2}];function l(d,p){const h=p.id??p.label,y=p.series?`${p.series} · ${p.label}`:p.label;i(m=>(m==null?void 0:m.param)===d&&m.value===h?null:{param:d,value:h,label:y})}return c.jsx(AIe,{ext:o,children:c.jsxs(Bo,{children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsx("h1",{className:"text-lg font-bold tracking-[0.01em] text-fg",children:a.label}),c.jsx(F3e,{status:n}),r&&c.jsxs("span",{className:"tint-brand inline-flex items-center gap-1 rounded border py-0.5 pl-1.5 text-[10px]",children:[r.param,": ",r.label,c.jsx(Tt,{variant:"ghost",size:"xs",className:"px-1 text-inherit",onClick:()=>i(null),children:"Clear"})]})]}),s.map((d,p)=>c.jsxs("section",{className:"mb-6",children:[d.title&&c.jsx("p",{className:"mb-2 text-[10px] uppercase tracking-[0.12em] text-faint",children:d.title}),c.jsx("div",{className:`grid grid-cols-1 gap-3 ${L3e[d.cols??2]}`,children:d.panels.map(h=>{const y=z3e(h);return c.jsx(U3e,{ext:o,panel:h,focus:r,...y?{onSelect:m=>l(y.param,m)}:{}},`${h.kind}-${h.title}`)})})]},d.title??`s${p}`))]})})}function q3e({profile:e,selected:t,onSelect:n}){return c.jsxs("button",{type:"button",onClick:n,className:`flex w-full flex-col gap-0.5 border-b border-line-soft px-3 py-2 text-left hover:bg-panel ${t?"bg-panel":""}`,children:[c.jsx("span",{className:"truncate font-mono text-xs text-foreground",title:e.familyHash??e.id,children:e.familyHash??"(unlabelled)"}),c.jsxs("span",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[c.jsx("span",{children:e.durationMs!==null?tm(e.durationMs):"—"}),e.tags.includes("manual")&&c.jsx("span",{className:"text-warn",children:"manual"}),e.tags.includes("sampled")&&c.jsx("span",{className:"text-info",children:"sampled"}),c.jsx("span",{className:"ml-auto",children:Lo(new Date(e.createdAt).getTime())})]})]})}function V3e({hot:e}){return e.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"No hot frames."}):c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-3 py-1.5 text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx("span",{className:"flex-1",children:"Function"}),c.jsx("span",{className:"w-16 text-right",children:"Self"}),c.jsx("span",{className:"w-12 text-right",children:"%"})]}),e.map(t=>c.jsxs("div",{className:"flex items-center gap-2 border-b border-line-soft px-3 py-1 text-[11px] last:border-0",children:[c.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-foreground",title:`${t.name} ${t.file}`,children:[t.name,t.file&&c.jsx("span",{className:"ml-1 text-muted-foreground",children:t.file})]}),c.jsx("span",{className:"w-16 text-right tabular-nums text-foreground",children:tm(t.selfMs)}),c.jsx("span",{className:"w-12 text-right tabular-nums text-warn",children:t.selfPct.toFixed(1)})]},`${t.name}:${t.file}`))]})}function G3e({id:e}){const{data:t,isLoading:n}=NX(e);if(n)return c.jsx("p",{className:"text-muted-foreground",children:"Loading profile…"});if(!t)return c.jsx("p",{className:"text-muted-foreground",children:"Profile not found."});const r=t.content;return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1",children:[c.jsx("h3",{className:"font-mono text-sm text-foreground",children:r.label??"(unlabelled)"}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:[tm(r.durationMs)," · ",r.sampleCount," samples · ",r.reason]})]}),c.jsx(x_e,{tree:r.tree}),c.jsx(V3e,{hot:r.hot})]})}function K3e({pendingManual:e}){const[t,n]=x.useState(1),[r,i]=x.useState(""),a=RX();return c.jsxs("div",{className:"flex flex-wrap items-center gap-2 aviary-surface rounded-lg border border-border px-3 py-2",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Capture next"}),c.jsx("input",{type:"number",min:1,value:t,onChange:o=>n(Math.max(1,Number(o.target.value))),className:"w-14 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"request(s) matching"}),c.jsx("input",{type:"text",placeholder:"any route (e.g. GET /users/:id)",value:r,onChange:o=>i(o.target.value),className:"w-56 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),c.jsx("button",{type:"button",disabled:a.isPending,onClick:()=>a.mutate({count:t,...r?{label:r}:{}}),className:"rounded bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50",children:a.isPending?"Arming…":"Arm capture"}),e>0&&c.jsxs("span",{className:"text-[10px] text-warn",children:[e," pending"]}),a.isError&&c.jsx("span",{className:"text-[10px] text-bad",children:a.error instanceof Error?a.error.message:"Failed to arm (mutations disabled?)"})]})}function Y3e(){var u,f,d,p,h;const e=Ks(),t=CX(),{data:n,isLoading:r}=_X(100),i=(n==null?void 0:n.data)??[],[a,o]=x.useState(null),s=((f=(u=e.data)==null?void 0:u.profiling)==null?void 0:f.enabled)??((d=t.data)==null?void 0:d.enabled)??!1,l=a??((p=i[0])==null?void 0:p.id)??null;return s?c.jsxs(id,{title:"CPU profiles",description:"Sampled V8 CPU profiles of requests and jobs, as flamegraphs.",actions:t.data&&c.jsxs("span",{className:"mono text-[11px] text-faint",children:["sampling ",(t.data.sampleRate*100).toFixed(0),"% · ",t.data.active," active"]}),children:[c.jsx(K3e,{pendingManual:((h=t.data)==null?void 0:h.pendingManual)??0}),c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row",children:[c.jsx("div",{className:"aviary-surface w-full shrink-0 overflow-hidden rounded-lg border border-border md:w-64",children:r?c.jsx(Fu,{rows:5,className:"border-0"}):i.length===0?c.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"No profiles captured yet."}):i.map(y=>c.jsx(q3e,{profile:y,selected:y.id===l,onSelect:()=>o(y.id)},y.id))}),c.jsx("div",{className:"min-w-0 flex-1",children:l?c.jsx(G3e,{id:l}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Select a profile to view its flamegraph."})})]})]}):c.jsx(id,{title:"CPU profiles",description:"Sampled V8 CPU profiles of requests and jobs, as flamegraphs.",children:c.jsxs("div",{className:"aviary-surface rounded-lg border border-border p-6 text-xs text-muted-foreground",children:[c.jsx("p",{className:"mb-2 text-foreground",children:"CPU profiling is disabled."}),c.jsxs("p",{children:["Enable it with"," ",c.jsxs("code",{className:"rounded bg-panel-2 px-1 text-brand",children:["profiling: ","{"," enabled: true ","}"]})," ","in ",c.jsx("code",{className:"rounded bg-panel-2 px-1",children:"TelescopeModule.forRoot"}),". Profiling is opt-in because it carries real CPU overhead; when off there is zero cost on the request path."]})]})})}const X3e={scheduled:"text-info bg-info/10",manual:"text-warn tint-warn"};function W3e({trigger:e}){return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${X3e[e]}`,children:e})}function Q3e({type:e,count:t}){return c.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[c.jsx("span",{className:"text-muted-foreground",children:hh(e)}),c.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function Z3e(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function J3e(e,t){if(e===null)return"—";const n=new Date(e).getTime()-t;if(Number.isNaN(n))return"—";if(n<=0)return"now";const r=Math.round(n/1e3);return r<60?`~${r}s`:`~${Math.floor(r/60)}m ${r%60}s`}function e5e(){const[e,t]=x.useState(()=>Date.now());return x.useEffect(()=>{const n=setInterval(()=>t(Date.now()),1e3);return()=>clearInterval(n)},[]),e}function t5e({config:e,nextRunAt:t,nowMs:n}){const r=Object.entries(e.perType??{});return c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[c.jsx(Ze,{label:"Window",value:Gp(e.afterMs),accent:"text-brand"}),c.jsx(Ze,{label:"Interval",value:Gp(e.intervalMs)}),c.jsx(Ze,{label:"Keep last",value:e.keepLast!=null?e.keepLast.toLocaleString():"unbounded"}),c.jsx(Ze,{label:"Next prune",value:J3e(t,n),accent:"text-info",...r.length>0?{hint:`${r.length} per-type override(s)`}:{}}),r.length>0&&c.jsxs("div",{className:"col-span-2 aviary-surface rounded-lg border border-border p-3 sm:col-span-4",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Per-type overrides"}),c.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(([i,a])=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[c.jsx("span",{className:"text-muted-foreground",children:hh(i)}),c.jsx("span",{className:"tabular-nums text-foreground",children:Gp(a)})]},i))})]})]})}function n5e({run:e}){const t=Object.entries(e.deletedByType);return c.jsxs(Dn,{className:"border-t border-line/60 align-top hover:bg-panel/40",children:[c.jsx(Me,{className:"text-xs text-muted-foreground",children:Lo(new Date(e.at).getTime())}),c.jsx(Me,{children:c.jsx(W3e,{trigger:e.trigger})}),c.jsx(Me,{className:"text-xs tabular-nums text-muted-foreground",children:Z3e(e.durationMs)}),c.jsx(Me,{className:"text-xs tabular-nums text-foreground",children:e.deletedTotal.toLocaleString()}),c.jsx(Me,{children:t.length>0?c.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(([n,r])=>c.jsx(Q3e,{type:n,count:r},n))}):c.jsx("span",{className:"text-muted-foreground",children:"—"})}),c.jsx(Me,{className:"text-xs tabular-nums text-muted-foreground",children:e.archivedTotal!=null?e.archivedTotal.toLocaleString():"—"}),c.jsx(Me,{className:"text-xs text-bad",children:e.error??""})]})}function r5e(){var f;const{data:e,isLoading:t,isError:n}=cX(),r=Ks(),i=dB(),a=e5e(),o=((f=r.data)==null?void 0:f.pruneEnabled)??!1,s=(e==null?void 0:e.runs)??[],l=(e==null?void 0:e.config)??null;async function u(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const d=await i.mutateAsync();globalThis.alert(`Pruned ${d.pruned} ${d.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"Prunes",description:"Retention prune runs on this pod: when they ran, what they removed, and the config.",actions:c.jsx(Tt,{onClick:u,disabled:!o||i.isPending,title:o?"Run a prune cycle now":"Mutations are disabled (set `mutations: true` to enable on-demand pruning).",children:i.isPending?"Pruning…":"Prune now"})}),l?c.jsx(t5e,{config:l,nextRunAt:(e==null?void 0:e.nextRunAt)??null,nowMs:a}):c.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-6 text-center text-xs text-muted-foreground",children:"No retention window is configured. Set a `prune` option to enable automatic pruning."}),t&&c.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading prune runs…"}),n&&c.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load prune runs."}),!t&&!n&&s.length===0&&c.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No prune runs recorded yet on this pod."}),s.length>0&&c.jsx("div",{className:"rounded-lg border border-line",children:c.jsxs(il,{className:"min-w-[760px] text-left text-sm",children:[c.jsx(al,{children:c.jsxs(Dn,{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx(_e,{children:"Time"}),c.jsx(_e,{children:"Trigger"}),c.jsx(_e,{children:"Duration"}),c.jsx(_e,{children:"Deleted"}),c.jsx(_e,{children:"By type"}),c.jsx(_e,{children:"Archived"}),c.jsx(_e,{children:"Error"})]})}),c.jsx(ol,{children:s.map((d,p)=>c.jsx(n5e,{run:d},`${d.at}:${p}`))})]})})]})}function i5e(){var s;const[e,t]=x.useState("1h"),n=Ra(),{data:r,isLoading:i}=hB(e),a=eA({window:e,buckets:60}),o=s_(((s=a.data)==null?void 0:s.buckets)??[]);return c.jsxs(id,{title:"Pulse",description:"Throughput by type, the slowest routes and queries, top exceptions and N+1 hotspots.",actions:c.jsx($d,{value:e,onChange:t}),children:[c.jsx($0,{title:"Throughput by type",series:o,data:cq(a.data)}),i||!r?c.jsx(Fu,{rows:6}):c.jsx(ONe,{report:r,onSelectEntry:l=>n(`/entries/view/${l}`),onSelectFamily:l=>n(`/entries/query?familyHash=${encodeURIComponent(l)}`),onSelectRoute:l=>n(`/entries/request?familyHash=${encodeURIComponent(l)}`),onSelectOutgoing:l=>n(`/entries/http_client?familyHash=${encodeURIComponent(l)}`)})]})}const a5e="var(--aviary-bad)",o5e="var(--aviary-good)";function s5e(e){return((e==null?void 0:e.queues)??[]).map(t=>({label:t.queue,value:Number((t.failureRate*100).toFixed(1)),color:t.failureRate>0?a5e:o5e}))}function l5e(){const[e,t]=x.useState("1h"),{data:n,isLoading:r}=mB(e);return c.jsxs("div",{className:"flex flex-col gap-4",children:[c.jsx("div",{className:"flex items-center justify-end",children:c.jsx($d,{value:e,onChange:t})}),c.jsx(Wl,{title:"Failure rate by queue",valueLabel:"fail %",data:s5e(n)}),r||!n?c.jsx(Fu,{rows:4}):c.jsx(jNe,{report:n,sparkline:i=>c.jsx(TNe,{queue:i,window:e})})]})}const u5e=[{to:"/queues",label:"Manage",end:!0},{to:"/queues/metrics",label:"Metrics",end:!1}];function c5e(){return c.jsxs(id,{title:"Queues",description:"Live queues with their jobs and actions, and failure and throughput metrics.",children:[c.jsx("nav",{"aria-label":"Queues",className:"flex gap-1 border-b border-border",children:u5e.map(e=>c.jsx(wY,{to:e.to,end:e.end,className:({isActive:t})=>ge("-mb-px border-b-2 px-3 py-2 text-[12.5px] font-medium transition-colors",t?"border-primary text-fg":"border-transparent text-dim hover:text-fg"),children:e.label},e.to))}),c.jsx(sY,{})]})}const f5e={cron:"tint-brand",interval:"tint-muted",timeout:"text-warn tint-warn"};function d5e({kind:e}){return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${f5e[e]}`,children:e})}function p5e({running:e}){return e==null?c.jsx("span",{className:"rounded bg-panel-2 px-1.5 py-0.5 text-[9px] uppercase tracking-[0.12em] text-faint",children:"unknown"}):c.jsxs("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${e?"tint-good":"tint-bad"}`,children:[c.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${e?"bg-good":"bg-bad"}`}),e?"active":"stopped"]})}function h5e({status:e}){if(e===null)return c.jsx("span",{className:"text-muted-foreground",children:"—"});const t=e==="completed"?"tint-good":"tint-bad";return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${t}`,children:e})}function m5e(e){return e===null?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function g5e(e){if(e===null)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString()}function v5e({task:e}){return c.jsxs(Dn,{className:"border-t border-line/60 hover:bg-panel/40",children:[c.jsx(Me,{className:"mono font-medium text-fg",children:e.name}),c.jsx(Me,{children:c.jsx(d5e,{kind:e.kind})}),c.jsx(Me,{children:c.jsx(p5e,{running:e.running})}),c.jsx(Me,{className:"mono text-xs text-dim",children:e.schedule}),c.jsx(Me,{className:"text-xs text-muted-foreground",children:g5e(e.nextRunAt)}),c.jsx(Me,{className:"text-xs text-muted-foreground",children:Lo(y5e(e.lastRunAt))}),c.jsx(Me,{className:"text-xs tabular-nums text-muted-foreground",children:m5e(e.lastDurationMs)}),c.jsx(Me,{children:c.jsx(h5e,{status:e.lastStatus})})]})}function y5e(e){if(e===null)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function b5e(){const{data:e,isLoading:t,isError:n}=iX(),r=(e==null?void 0:e.tasks)??[],i=r.filter(o=>o.running===!0).length,a=r.filter(o=>o.running===!1).length;return c.jsxs(id,{title:"Schedules",description:"Cron jobs, intervals and timeouts registered with @nestjs/schedule, live.",actions:r.length>0&&c.jsxs("div",{className:"mono flex items-center gap-3 text-[11px]",children:[c.jsxs("span",{className:"text-good",children:[i," active"]}),a>0&&c.jsxs("span",{className:"text-bad",children:[a," stopped"]}),c.jsxs("span",{className:"text-faint",children:[r.length," total"]})]}),children:[t&&c.jsx(Fu,{rows:5}),n&&c.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load schedules."}),!t&&!n&&r.length===0&&c.jsx(y_,{title:"No scheduled tasks",description:"No scheduled tasks detected. Register a ScheduleManager (the @nestjs/schedule watcher) to populate this console."}),r.length>0&&c.jsx("div",{className:"aviary-surface overflow-x-auto rounded-lg border border-border",children:c.jsxs(il,{className:"min-w-[760px] text-left text-sm",children:[c.jsx(al,{children:c.jsxs(Dn,{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx(_e,{children:"Name"}),c.jsx(_e,{children:"Kind"}),c.jsx(_e,{children:"Active"}),c.jsx(_e,{children:"Schedule"}),c.jsx(_e,{children:"Next run"}),c.jsx(_e,{children:"Last run"}),c.jsx(_e,{children:"Duration"}),c.jsx(_e,{children:"Status"})]})}),c.jsx(ol,{children:r.map(o=>c.jsx(v5e,{task:o},`${o.kind}:${o.name}`))})]})})]})}function x5e(){const{traceId:e=""}=cx(),t=Ra(),[n,r]=x.useState("waterfall"),{data:i,isLoading:a}=pB({traceId:e}),o=(i==null?void 0:i.data)??[],{data:s,isLoading:l}=jX(e);return c.jsxs(Bo,{children:[c.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),c.jsxs("div",{className:"mb-4 flex flex-wrap items-baseline gap-3 border-b border-line pb-3",children:[c.jsx("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Trace"}),c.jsx("span",{className:"max-w-md truncate font-mono text-xs text-foreground",title:e,children:e}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.length," ",o.length===1?"entry":"entries"]}),c.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[c.jsxs("div",{className:"flex overflow-hidden rounded border border-line text-[11px]",children:[c.jsx("button",{type:"button",onClick:()=>r("waterfall"),className:`px-2.5 py-1 transition-colors ${n==="waterfall"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Waterfall"}),c.jsx("button",{type:"button",onClick:()=>r("entries"),className:`border-l border-line px-2.5 py-1 transition-colors ${n==="entries"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Entries"})]}),o.length>0?c.jsx("button",{type:"button",onClick:()=>a_(`telescope-trace-${e}.json`,o),className:"rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground",children:"Download JSON"}):null]})]}),n==="waterfall"?l?c.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):s===void 0||s.spans.length===0?c.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):c.jsx(g_e,{waterfall:s,onSelect:u=>t(`/entries/view/${u}`)}):a?c.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):o.length===0?c.jsx("p",{className:"text-muted-foreground",children:"No entries in this trace"}):c.jsx(q6,{entries:o,onSelect:u=>t(`/entries/view/${u}`)})]})}function w5e(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function S5e({trace:e}){const t=Ra(),n=e.rootLabel??e.traceId;return c.jsxs("button",{type:"button",onClick:()=>t(`/traces/${e.traceId}`),className:"flex w-full items-center gap-3 border-b border-line-soft px-4 py-2.5 text-left transition-colors last:border-0 hover:bg-hover",children:[c.jsx("span",{className:"flex shrink-0 items-center gap-1","aria-hidden":"true",children:e.types.map(r=>c.jsx("span",{className:`h-2 w-2 rounded-full ${px(r)}`,title:r},r))}),c.jsx("span",{className:"mono min-w-0 flex-1 truncate text-xs text-fg",title:n,children:n}),c.jsxs("span",{className:"hidden shrink-0 text-xs text-dim sm:inline",children:[e.entryCount," ",e.entryCount===1?"entry":"entries"]}),c.jsx("span",{className:"mono tnum w-16 shrink-0 text-right text-xs text-fg-2",children:w5e(e.totalDurationMs)}),c.jsx("span",{className:"mono tnum w-16 shrink-0 text-right text-xs text-faint",children:Lo(new Date(e.lastAt).getTime())})]})}function O5e(){const[e,t]=x.useState("1h"),{data:n,isLoading:r}=OX(e),i=(n==null?void 0:n.data)??[];return c.jsx(id,{title:"Traces",description:"Every request, job and span that shared a trace id, newest first.",actions:c.jsx($d,{value:e,onChange:t}),children:r?c.jsx(Fu,{}):i.length===0?c.jsx(y_,{title:"No traces in this window",description:"Traces appear once a traceContext provider tags entries with a trace id."}):c.jsx("div",{className:"aviary-surface overflow-hidden rounded-lg border border-border",children:i.map(a=>c.jsx(S5e,{trace:a},a.traceId))})})}const j5e="#e879f9",E5e="aviary-telescope-theme",T5e="telescope-theme";function A5e(){try{return window.localStorage.getItem(T5e)==="light"?"light":"dark"}catch{return"dark"}}function C5e({children:e}){return c.jsx(rDe,{storageKey:E5e,accent:j5e,defaultTheme:A5e(),children:e})}const _5e=new l7;function N5e(){return c.jsx(yY,{children:c.jsx($De,{children:c.jsxs(uY,{children:[c.jsx(Bn,{path:"/",element:c.jsx(rIe,{})}),c.jsx(Bn,{path:"/entries",element:c.jsx(FI,{})}),c.jsx(Bn,{path:"/entries/view/:id",element:c.jsx(yIe,{})}),c.jsx(Bn,{path:"/entries/:type",element:c.jsx(FI,{})}),c.jsx(Bn,{path:"/traces",element:c.jsx(O5e,{})}),c.jsx(Bn,{path:"/traces/:traceId",element:c.jsx(x5e,{})}),c.jsx(Bn,{path:"/pulse",element:c.jsx(i5e,{})}),c.jsx(Bn,{path:"/ai",element:c.jsx(gIe,{})}),c.jsxs(Bn,{path:"/queues",element:c.jsx(c5e,{}),children:[c.jsx(Bn,{index:!0,element:c.jsx(iIe,{})}),c.jsx(Bn,{path:"metrics",element:c.jsx(l5e,{})})]}),c.jsx(Bn,{path:"/schedules",element:c.jsx(b5e,{})}),c.jsx(Bn,{path:"/prunes",element:c.jsx(r5e,{})}),c.jsx(Bn,{path:"/exports",element:c.jsx(EIe,{})}),c.jsx(Bn,{path:"/profiles",element:c.jsx(Y3e,{})}),c.jsx(Bn,{path:"/ext/:dashboardId",element:c.jsx(H3e,{})})]})})})}function R5e(){return c.jsx(C5e,{children:c.jsx(RY,{children:c.jsx(DK,{client:_5e,children:c.jsx(WNe,{children:c.jsx(N5e,{})})})})})}const ek=document.getElementById("root");ek&&$K.createRoot(ek).render(c.jsx(x.StrictMode,{children:c.jsx(R5e,{})}));
|