Files
boc/web-v2/dist/assets/index-DGHqwpHs.js
T
Bernt 0b416b0f13
BOC CI/CD / Test (push) Failing after 2s
BOC CI/CD / Security Scan (push) Has been skipped
BOC CI/CD / Build & Push (push) Has been skipped
BOC CI/CD / Deploy to Staging (push) Has been skipped
BOC CI/CD / Deploy to Production (push) Has been skipped
feat(agent): activate BOC agent layer
- Add agent orchestrator API (/api/v1/agents/*)
- Connect frontend AgentContext to real backend
- Add AgentLayerPage with full agent management
- Implement specialist agents: finance, sales, hr, crm, legal, marketing, dashboard
- Add authentication, RBAC, tenant isolation on agent endpoints
- Add rate limiting and audit logging
- Update sidebar with Agent Layer navigation
- Build fresh web-v2 dist
2026-08-12 07:50:12 +00:00

782 lines
977 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(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 o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Ed=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mv={exports:{}},Oc={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var lT;function o8(){if(lT)return Oc;lT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return Oc.Fragment=t,Oc.jsx=n,Oc.jsxs=n,Oc}var cT;function l8(){return cT||(cT=1,Mv.exports=o8()),Mv.exports}var d=l8(),Pv={exports:{}},Me={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var uT;function c8(){if(uT)return Me;uT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),g=Symbol.iterator;function j(z){return z===null||typeof z!="object"?null:(z=g&&z[g]||z["@@iterator"],typeof z=="function"?z:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function A(z,G,re){this.props=z,this.context=G,this.refs=b,this.updater=re||S}A.prototype.isReactComponent={},A.prototype.setState=function(z,G){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,G,"setState")},A.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function _(){}_.prototype=A.prototype;function T(z,G,re){this.props=z,this.context=G,this.refs=b,this.updater=re||S}var C=T.prototype=new _;C.constructor=T,w(C,A.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function E(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function k(z,G,re){var fe=re.ref;return{$$typeof:e,type:z,key:G,ref:fe!==void 0?fe:null,props:re}}function B(z,G){return k(z.type,G,z.props)}function q(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function $(z){var G={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(re){return G[re]})}var F=/\/+/g;function X(z,G){return typeof z=="object"&&z!==null&&z.key!=null?$(""+z.key):G.toString(36)}function Y(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(E,E):(z.status="pending",z.then(function(G){z.status==="pending"&&(z.status="fulfilled",z.value=G)},function(G){z.status==="pending"&&(z.status="rejected",z.reason=G)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function L(z,G,re,fe,me){var we=typeof z;(we==="undefined"||we==="boolean")&&(z=null);var ze=!1;if(z===null)ze=!0;else switch(we){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(z.$$typeof){case e:case t:ze=!0;break;case m:return ze=z._init,L(ze(z._payload),G,re,fe,me)}}if(ze)return me=me(z),ze=fe===""?"."+X(z,0):fe,O(me)?(re="",ze!=null&&(re=ze.replace(F,"$&/")+"/"),L(me,G,re,"",function(Ee){return Ee})):me!=null&&(q(me)&&(me=B(me,re+(me.key==null||z&&z.key===me.key?"":(""+me.key).replace(F,"$&/")+"/")+ze)),G.push(me)),1;ze=0;var Ze=fe===""?".":fe+":";if(O(z))for(var ue=0;ue<z.length;ue++)fe=z[ue],we=Ze+X(fe,ue),ze+=L(fe,G,re,we,me);else if(ue=j(z),typeof ue=="function")for(z=ue.call(z),ue=0;!(fe=z.next()).done;)fe=fe.value,we=Ze+X(fe,ue++),ze+=L(fe,G,re,we,me);else if(we==="object"){if(typeof z.then=="function")return L(Y(z),G,re,fe,me);throw G=String(z),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ze}function H(z,G,re){if(z==null)return z;var fe=[],me=0;return L(z,fe,"","",function(we){return G.call(re,we,me++)}),fe}function Q(z){if(z._status===-1){var G=z._result;G=G(),G.then(function(re){(z._status===0||z._status===-1)&&(z._status=1,z._result=re)},function(re){(z._status===0||z._status===-1)&&(z._status=2,z._result=re)}),z._status===-1&&(z._status=0,z._result=G)}if(z._status===1)return z._result.default;throw z._result}var ae=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},oe={map:H,forEach:function(z,G,re){H(z,function(){G.apply(this,arguments)},re)},count:function(z){var G=0;return H(z,function(){G++}),G},toArray:function(z){return H(z,function(G){return G})||[]},only:function(z){if(!q(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Me.Activity=y,Me.Children=oe,Me.Component=A,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=T,Me.StrictMode=r,Me.Suspense=f,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Me.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},Me.cache=function(z){return function(){return z.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(z,G,re){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var fe=w({},z.props),me=z.key;if(G!=null)for(we in G.key!==void 0&&(me=""+G.key),G)!D.call(G,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&G.ref===void 0||(fe[we]=G[we]);var we=arguments.length-2;if(we===1)fe.children=re;else if(1<we){for(var ze=Array(we),Ze=0;Ze<we;Ze++)ze[Ze]=arguments[Ze+2];fe.children=ze}return k(z.type,me,fe)},Me.createContext=function(z){return z={$$typeof:l,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:o,_context:z},z},Me.createElement=function(z,G,re){var fe,me={},we=null;if(G!=null)for(fe in G.key!==void 0&&(we=""+G.key),G)D.call(G,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(me[fe]=G[fe]);var ze=arguments.length-2;if(ze===1)me.children=re;else if(1<ze){for(var Ze=Array(ze),ue=0;ue<ze;ue++)Ze[ue]=arguments[ue+2];me.children=Ze}if(z&&z.defaultProps)for(fe in ze=z.defaultProps,ze)me[fe]===void 0&&(me[fe]=ze[fe]);return k(z,we,me)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(z){return{$$typeof:u,render:z}},Me.isValidElement=q,Me.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:Q}},Me.memo=function(z,G){return{$$typeof:h,type:z,compare:G===void 0?null:G}},Me.startTransition=function(z){var G=M.T,re={};M.T=re;try{var fe=z(),me=M.S;me!==null&&me(re,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(E,ae)}catch(we){ae(we)}finally{G!==null&&re.types!==null&&(G.types=re.types),M.T=G}},Me.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Me.use=function(z){return M.H.use(z)},Me.useActionState=function(z,G,re){return M.H.useActionState(z,G,re)},Me.useCallback=function(z,G){return M.H.useCallback(z,G)},Me.useContext=function(z){return M.H.useContext(z)},Me.useDebugValue=function(){},Me.useDeferredValue=function(z,G){return M.H.useDeferredValue(z,G)},Me.useEffect=function(z,G){return M.H.useEffect(z,G)},Me.useEffectEvent=function(z){return M.H.useEffectEvent(z)},Me.useId=function(){return M.H.useId()},Me.useImperativeHandle=function(z,G,re){return M.H.useImperativeHandle(z,G,re)},Me.useInsertionEffect=function(z,G){return M.H.useInsertionEffect(z,G)},Me.useLayoutEffect=function(z,G){return M.H.useLayoutEffect(z,G)},Me.useMemo=function(z,G){return M.H.useMemo(z,G)},Me.useOptimistic=function(z,G){return M.H.useOptimistic(z,G)},Me.useReducer=function(z,G,re){return M.H.useReducer(z,G,re)},Me.useRef=function(z){return M.H.useRef(z)},Me.useState=function(z){return M.H.useState(z)},Me.useSyncExternalStore=function(z,G,re){return M.H.useSyncExternalStore(z,G,re)},Me.useTransition=function(){return M.H.useTransition()},Me.version="19.2.7",Me}var fT;function cS(){return fT||(fT=1,Pv.exports=c8()),Pv.exports}var P=cS();const I=at(P);var Rv={exports:{}},_c={},kv={exports:{}},Dv={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var dT;function u8(){return dT||(dT=1,(function(e){function t(L,H){var Q=L.length;L.push(H);e:for(;0<Q;){var ae=Q-1>>>1,oe=L[ae];if(0<i(oe,H))L[ae]=H,L[Q]=oe,Q=ae;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var H=L[0],Q=L.pop();if(Q!==H){L[0]=Q;e:for(var ae=0,oe=L.length,z=oe>>>1;ae<z;){var G=2*(ae+1)-1,re=L[G],fe=G+1,me=L[fe];if(0>i(re,Q))fe<oe&&0>i(me,re)?(L[ae]=me,L[fe]=Q,ae=fe):(L[ae]=re,L[G]=Q,ae=G);else if(fe<oe&&0>i(me,Q))L[ae]=me,L[fe]=Q,ae=fe;else break e}}return H}function i(L,H){var Q=L.sortIndex-H.sortIndex;return Q!==0?Q:L.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],h=[],m=1,y=null,g=3,j=!1,S=!1,w=!1,b=!1,A=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(L){for(var H=n(h);H!==null;){if(H.callback===null)r(h);else if(H.startTime<=L)r(h),H.sortIndex=H.expirationTime,t(f,H);else break;H=n(h)}}function O(L){if(w=!1,C(L),!S)if(n(f)!==null)S=!0,E||(E=!0,$());else{var H=n(h);H!==null&&Y(O,H.startTime-L)}}var E=!1,M=-1,D=5,k=-1;function B(){return b?!0:!(e.unstable_now()-k<D)}function q(){if(b=!1,E){var L=e.unstable_now();k=L;var H=!0;try{e:{S=!1,w&&(w=!1,_(M),M=-1),j=!0;var Q=g;try{t:{for(C(L),y=n(f);y!==null&&!(y.expirationTime>L&&B());){var ae=y.callback;if(typeof ae=="function"){y.callback=null,g=y.priorityLevel;var oe=ae(y.expirationTime<=L);if(L=e.unstable_now(),typeof oe=="function"){y.callback=oe,C(L),H=!0;break t}y===n(f)&&r(f),C(L)}else r(f);y=n(f)}if(y!==null)H=!0;else{var z=n(h);z!==null&&Y(O,z.startTime-L),H=!1}}break e}finally{y=null,g=Q,j=!1}H=void 0}}finally{H?$():E=!1}}}var $;if(typeof T=="function")$=function(){T(q)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,X=F.port2;F.port1.onmessage=q,$=function(){X.postMessage(null)}}else $=function(){A(q,0)};function Y(L,H){M=A(function(){L(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(L){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var Q=g;g=H;try{return L()}finally{g=Q}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(L,H){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var Q=g;g=L;try{return H()}finally{g=Q}},e.unstable_scheduleCallback=function(L,H,Q){var ae=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?ae+Q:ae):Q=ae,L){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=Q+oe,L={id:m++,callback:H,priorityLevel:L,startTime:Q,expirationTime:oe,sortIndex:-1},Q>ae?(L.sortIndex=Q,t(h,L),n(f)===null&&L===n(h)&&(w?(_(M),M=-1):w=!0,Y(O,Q-ae))):(L.sortIndex=oe,t(f,L),S||j||(S=!0,E||(E=!0,$()))),L},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(L){var H=g;return function(){var Q=g;g=H;try{return L.apply(this,arguments)}finally{g=Q}}}})(Dv)),Dv}var hT;function f8(){return hT||(hT=1,kv.exports=u8()),kv.exports}var Lv={exports:{}},hn={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var pT;function d8(){if(pT)return hn;pT=1;var e=cS();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,h,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:f,containerInfo:h,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,hn.createPortal=function(f,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,m)},hn.flushSync=function(f){var h=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=h,r.p=m,r.d.f()}},hn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},hn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},hn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var m=h.as,y=u(m,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,j=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:g,fetchPriority:j}):m==="script"&&r.d.X(f,{crossOrigin:y,integrity:g,fetchPriority:j,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},hn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=u(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},hn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,y=u(m,h.crossOrigin);r.d.L(f,m,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},hn.preloadModule=function(f,h){if(typeof f=="string")if(h){var m=u(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},hn.requestFormReset=function(f){r.d.r(f)},hn.unstable_batchedUpdates=function(f,h){return f(h)},hn.useFormState=function(f,h,m){return l.H.useFormState(f,h,m)},hn.useFormStatus=function(){return l.H.useHostTransitionStatus()},hn.version="19.2.7",hn}var mT;function h8(){if(mT)return Lv.exports;mT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Lv.exports=d8(),Lv.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yT;function p8(){if(yT)return _c;yT=1;var e=f8(),t=cS(),n=h8();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,c=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(c=s.return),a=s.return;while(a)}return s.tag===3?c:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function u(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var c=a,p=s;;){var v=c.return;if(v===null)break;var x=v.alternate;if(x===null){if(p=v.return,p!==null){c=p;continue}break}if(v.child===x.child){for(x=v.child;x;){if(x===c)return f(v),a;if(x===p)return f(v),s;x=x.sibling}throw Error(r(188))}if(c.return!==p.return)c=v,p=x;else{for(var N=!1,R=v.child;R;){if(R===c){N=!0,c=v,p=x;break}if(R===p){N=!0,p=v,c=x;break}R=R.sibling}if(!N){for(R=x.child;R;){if(R===c){N=!0,c=x,p=v;break}if(R===p){N=!0,p=x,c=v;break}R=R.sibling}if(!N)throw Error(r(189))}}if(c.alternate!==p)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?a:s}function m(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=m(a),s!==null)return s;a=a.sibling}return null}var y=Object.assign,g=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function $(a){return a===null||typeof a!="object"?null:(a=q&&a[q]||a["@@iterator"],typeof a=="function"?a:null)}var F=Symbol.for("react.client.reference");function X(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===F?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case A:return"Profiler";case b:return"StrictMode";case O:return"Suspense";case E:return"SuspenseList";case k:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case T:return a.displayName||"Context";case _:return(a._context.displayName||"Context")+".Consumer";case C:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case M:return s=a.displayName||null,s!==null?s:X(a.type)||"Memo";case D:s=a._payload,a=a._init;try{return X(a(s))}catch{}}return null}var Y=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function z(a){return{current:a}}function G(a){0>oe||(a.current=ae[oe],ae[oe]=null,oe--)}function re(a,s){oe++,ae[oe]=a.current,a.current=s}var fe=z(null),me=z(null),we=z(null),ze=z(null);function Ze(a,s){switch(re(we,s),re(me,a),re(fe,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?M_(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=M_(s),a=P_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}G(fe),re(fe,a)}function ue(){G(fe),G(me),G(we)}function Ee(a){a.memoizedState!==null&&re(ze,a);var s=fe.current,c=P_(s,a.type);s!==c&&(re(me,a),re(fe,c))}function Ce(a){me.current===a&&(G(fe),G(me)),ze.current===a&&(G(ze),jc._currentValue=Q)}var le,yt;function ke(a){if(le===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);le=s&&s[1]||"",yt=-1<c.stack.indexOf(`
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
`+le+a+yt}var Ot=!1;function _t(a,s){if(!a||Ot)return"";Ot=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(ee){var J=ee}Reflect.construct(a,[],se)}else{try{se.call()}catch(ee){J=ee}a.call(se.prototype)}}else{try{throw Error()}catch(ee){J=ee}(se=a())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&J&&typeof ee.stack=="string")return[ee.stack,J.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=p.DetermineComponentFrameRoot(),N=x[0],R=x[1];if(N&&R){var U=N.split(`
`),Z=R.split(`
`);for(v=p=0;p<U.length&&!U[p].includes("DetermineComponentFrameRoot");)p++;for(;v<Z.length&&!Z[v].includes("DetermineComponentFrameRoot");)v++;if(p===U.length||v===Z.length)for(p=U.length-1,v=Z.length-1;1<=p&&0<=v&&U[p]!==Z[v];)v--;for(;1<=p&&0<=v;p--,v--)if(U[p]!==Z[v]){if(p!==1||v!==1)do if(p--,v--,0>v||U[p]!==Z[v]){var te=`
`+U[p].replace(" at new "," at ");return a.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",a.displayName)),te}while(1<=p&&0<=v);break}}}finally{Ot=!1,Error.prepareStackTrace=c}return(c=a?a.displayName||a.name:"")?ke(c):""}function fn(a,s){switch(a.tag){case 26:case 27:case 5:return ke(a.type);case 16:return ke("Lazy");case 13:return a.child!==s&&s!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return _t(a.type,!1);case 11:return _t(a.type.render,!1);case 1:return _t(a.type,!0);case 31:return ke("Activity");default:return""}}function gr(a){try{var s="",c=null;do s+=fn(a,c),c=a,a=a.return;while(a);return s}catch(p){return`
Error generating stack: `+p.message+`
`+p.stack}}var $r=Object.prototype.hasOwnProperty,qa=e.unstable_scheduleCallback,xr=e.unstable_cancelCallback,na=e.unstable_shouldYield,Pl=e.unstable_requestPaint,dn=e.unstable_now,uf=e.unstable_getCurrentPriorityLevel,cA=e.unstable_ImmediatePriority,uA=e.unstable_UserBlockingPriority,ff=e.unstable_NormalPriority,U$=e.unstable_LowPriority,fA=e.unstable_IdlePriority,V$=e.log,H$=e.unstable_setDisableYieldValue,Rl=null,kn=null;function Ua(a){if(typeof V$=="function"&&H$(a),kn&&typeof kn.setStrictMode=="function")try{kn.setStrictMode(Rl,a)}catch{}}var Dn=Math.clz32?Math.clz32:K$,G$=Math.log,F$=Math.LN2;function K$(a){return a>>>=0,a===0?32:31-(G$(a)/F$|0)|0}var df=256,hf=262144,pf=4194304;function Li(a){var s=a&42;if(s!==0)return s;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function mf(a,s,c){var p=a.pendingLanes;if(p===0)return 0;var v=0,x=a.suspendedLanes,N=a.pingedLanes;a=a.warmLanes;var R=p&134217727;return R!==0?(p=R&~x,p!==0?v=Li(p):(N&=R,N!==0?v=Li(N):c||(c=R&~a,c!==0&&(v=Li(c))))):(R=p&~x,R!==0?v=Li(R):N!==0?v=Li(N):c||(c=p&~a,c!==0&&(v=Li(c)))),v===0?0:s!==0&&s!==v&&(s&x)===0&&(x=v&-v,c=s&-s,x>=c||x===32&&(c&4194048)!==0)?s:v}function kl(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function Y$(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dA(){var a=pf;return pf<<=1,(pf&62914560)===0&&(pf=4194304),a}function xm(a){for(var s=[],c=0;31>c;c++)s.push(a);return s}function Dl(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function X$(a,s,c,p,v,x){var N=a.pendingLanes;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=c,a.entangledLanes&=c,a.errorRecoveryDisabledLanes&=c,a.shellSuspendCounter=0;var R=a.entanglements,U=a.expirationTimes,Z=a.hiddenUpdates;for(c=N&~c;0<c;){var te=31-Dn(c),se=1<<te;R[te]=0,U[te]=-1;var J=Z[te];if(J!==null)for(Z[te]=null,te=0;te<J.length;te++){var ee=J[te];ee!==null&&(ee.lane&=-536870913)}c&=~se}p!==0&&hA(a,p,0),x!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=x&~(N&~s))}function hA(a,s,c){a.pendingLanes|=s,a.suspendedLanes&=~s;var p=31-Dn(s);a.entangledLanes|=s,a.entanglements[p]=a.entanglements[p]|1073741824|c&261930}function pA(a,s){var c=a.entangledLanes|=s;for(a=a.entanglements;c;){var p=31-Dn(c),v=1<<p;v&s|a[p]&s&&(a[p]|=s),c&=~v}}function mA(a,s){var c=s&-s;return c=(c&42)!==0?1:bm(c),(c&(a.suspendedLanes|s))!==0?0:c}function bm(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function jm(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function yA(){var a=H.p;return a!==0?a:(a=window.event,a===void 0?32:tT(a.type))}function vA(a,s){var c=H.p;try{return H.p=a,s()}finally{H.p=c}}var Va=Math.random().toString(36).slice(2),tn="__reactFiber$"+Va,wn="__reactProps$"+Va,Ds="__reactContainer$"+Va,Sm="__reactEvents$"+Va,W$="__reactListeners$"+Va,Z$="__reactHandles$"+Va,gA="__reactResources$"+Va,Ll="__reactMarker$"+Va;function wm(a){delete a[tn],delete a[wn],delete a[Sm],delete a[W$],delete a[Z$]}function Ls(a){var s=a[tn];if(s)return s;for(var c=a.parentNode;c;){if(s=c[Ds]||c[tn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(a=B_(a);a!==null;){if(c=a[tn])return c;a=B_(a)}return s}a=c,c=a.parentNode}return null}function zs(a){if(a=a[tn]||a[Ds]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function zl(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function $s(a){var s=a[gA];return s||(s=a[gA]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Wt(a){a[Ll]=!0}var xA=new Set,bA={};function zi(a,s){Bs(a,s),Bs(a+"Capture",s)}function Bs(a,s){for(bA[a]=s,a=0;a<s.length;a++)xA.add(s[a])}var Q$=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jA={},SA={};function J$(a){return $r.call(SA,a)?!0:$r.call(jA,a)?!1:Q$.test(a)?SA[a]=!0:(jA[a]=!0,!1)}function yf(a,s,c){if(J$(s))if(c===null)a.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+c)}}function vf(a,s,c){if(c===null)a.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+c)}}function ra(a,s,c,p){if(p===null)a.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(c);return}a.setAttributeNS(s,c,""+p)}}function Qn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function wA(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function e6(a,s,c){var p=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var v=p.get,x=p.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return v.call(this)},set:function(N){c=""+N,x.call(this,N)}}),Object.defineProperty(a,s,{enumerable:p.enumerable}),{getValue:function(){return c},setValue:function(N){c=""+N},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Am(a){if(!a._valueTracker){var s=wA(a)?"checked":"value";a._valueTracker=e6(a,s,""+a[s])}}function AA(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var c=s.getValue(),p="";return a&&(p=wA(a)?a.checked?"true":"false":a.value),a=p,a!==c?(s.setValue(a),!0):!1}function gf(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var t6=/[\n"\\]/g;function Jn(a){return a.replace(t6,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Om(a,s,c,p,v,x,N,R){a.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?a.type=N:a.removeAttribute("type"),s!=null?N==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Qn(s)):a.value!==""+Qn(s)&&(a.value=""+Qn(s)):N!=="submit"&&N!=="reset"||a.removeAttribute("value"),s!=null?_m(a,N,Qn(s)):c!=null?_m(a,N,Qn(c)):p!=null&&a.removeAttribute("value"),v==null&&x!=null&&(a.defaultChecked=!!x),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?a.name=""+Qn(R):a.removeAttribute("name")}function OA(a,s,c,p,v,x,N,R){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(a.type=x),s!=null||c!=null){if(!(x!=="submit"&&x!=="reset"||s!=null)){Am(a);return}c=c!=null?""+Qn(c):"",s=s!=null?""+Qn(s):c,R||s===a.value||(a.value=s),a.defaultValue=s}p=p??v,p=typeof p!="function"&&typeof p!="symbol"&&!!p,a.checked=R?a.checked:!!p,a.defaultChecked=!!p,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(a.name=N),Am(a)}function _m(a,s,c){s==="number"&&gf(a.ownerDocument)===a||a.defaultValue===""+c||(a.defaultValue=""+c)}function Is(a,s,c,p){if(a=a.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<a.length;c++)v=s.hasOwnProperty("$"+a[c].value),a[c].selected!==v&&(a[c].selected=v),v&&p&&(a[c].defaultSelected=!0)}else{for(c=""+Qn(c),s=null,v=0;v<a.length;v++){if(a[v].value===c){a[v].selected=!0,p&&(a[v].defaultSelected=!0);return}s!==null||a[v].disabled||(s=a[v])}s!==null&&(s.selected=!0)}}function _A(a,s,c){if(s!=null&&(s=""+Qn(s),s!==a.value&&(a.value=s),c==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=c!=null?""+Qn(c):""}function TA(a,s,c,p){if(s==null){if(p!=null){if(c!=null)throw Error(r(92));if(Y(p)){if(1<p.length)throw Error(r(93));p=p[0]}c=p}c==null&&(c=""),s=c}c=Qn(s),a.defaultValue=c,p=a.textContent,p===c&&p!==""&&p!==null&&(a.value=p),Am(a)}function qs(a,s){if(s){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=s;return}}a.textContent=s}var n6=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 EA(a,s,c){var p=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?p?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":p?a.setProperty(s,c):typeof c!="number"||c===0||n6.has(s)?s==="float"?a.cssFloat=c:a[s]=(""+c).trim():a[s]=c+"px"}function NA(a,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,c!=null){for(var p in c)!c.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?a.setProperty(p,""):p==="float"?a.cssFloat="":a[p]="");for(var v in s)p=s[v],s.hasOwnProperty(v)&&c[v]!==p&&EA(a,v,p)}else for(var x in s)s.hasOwnProperty(x)&&EA(a,x,s[x])}function Tm(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var r6=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),a6=/^[\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 xf(a){return a6.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function aa(){}var Em=null;function Nm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Us=null,Vs=null;function CA(a){var s=zs(a);if(s&&(a=s.stateNode)){var c=a[wn]||null;e:switch(a=s.stateNode,s.type){case"input":if(Om(a,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=a;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Jn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var p=c[s];if(p!==a&&p.form===a.form){var v=p[wn]||null;if(!v)throw Error(r(90));Om(p,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<c.length;s++)p=c[s],p.form===a.form&&AA(p)}break e;case"textarea":_A(a,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Is(a,!!c.multiple,s,!1)}}}var Cm=!1;function MA(a,s,c){if(Cm)return a(s,c);Cm=!0;try{var p=a(s);return p}finally{if(Cm=!1,(Us!==null||Vs!==null)&&(sd(),Us&&(s=Us,a=Vs,Vs=Us=null,CA(s),a)))for(s=0;s<a.length;s++)CA(a[s])}}function $l(a,s){var c=a.stateNode;if(c===null)return null;var p=c[wn]||null;if(p===null)return null;c=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mm=!1;if(ia)try{var Bl={};Object.defineProperty(Bl,"passive",{get:function(){Mm=!0}}),window.addEventListener("test",Bl,Bl),window.removeEventListener("test",Bl,Bl)}catch{Mm=!1}var Ha=null,Pm=null,bf=null;function PA(){if(bf)return bf;var a,s=Pm,c=s.length,p,v="value"in Ha?Ha.value:Ha.textContent,x=v.length;for(a=0;a<c&&s[a]===v[a];a++);var N=c-a;for(p=1;p<=N&&s[c-p]===v[x-p];p++);return bf=v.slice(a,1<p?1-p:void 0)}function jf(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Sf(){return!0}function RA(){return!1}function An(a){function s(c,p,v,x,N){this._reactName=c,this._targetInst=v,this.type=p,this.nativeEvent=x,this.target=N,this.currentTarget=null;for(var R in a)a.hasOwnProperty(R)&&(c=a[R],this[R]=c?c(x):x[R]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Sf:RA,this.isPropagationStopped=RA,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Sf)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Sf)},persist:function(){},isPersistent:Sf}),s}var $i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wf=An($i),Il=y({},$i,{view:0,detail:0}),i6=An(Il),Rm,km,ql,Af=y({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lm,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==ql&&(ql&&a.type==="mousemove"?(Rm=a.screenX-ql.screenX,km=a.screenY-ql.screenY):km=Rm=0,ql=a),Rm)},movementY:function(a){return"movementY"in a?a.movementY:km}}),kA=An(Af),s6=y({},Af,{dataTransfer:0}),o6=An(s6),l6=y({},Il,{relatedTarget:0}),Dm=An(l6),c6=y({},$i,{animationName:0,elapsedTime:0,pseudoElement:0}),u6=An(c6),f6=y({},$i,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),d6=An(f6),h6=y({},$i,{data:0}),DA=An(h6),p6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m6={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"},y6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v6(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=y6[a])?!!s[a]:!1}function Lm(){return v6}var g6=y({},Il,{key:function(a){if(a.key){var s=p6[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=jf(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?m6[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lm,charCode:function(a){return a.type==="keypress"?jf(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?jf(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),x6=An(g6),b6=y({},Af,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),LA=An(b6),j6=y({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lm}),S6=An(j6),w6=y({},$i,{propertyName:0,elapsedTime:0,pseudoElement:0}),A6=An(w6),O6=y({},Af,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),_6=An(O6),T6=y({},$i,{newState:0,oldState:0}),E6=An(T6),N6=[9,13,27,32],zm=ia&&"CompositionEvent"in window,Ul=null;ia&&"documentMode"in document&&(Ul=document.documentMode);var C6=ia&&"TextEvent"in window&&!Ul,zA=ia&&(!zm||Ul&&8<Ul&&11>=Ul),$A=" ",BA=!1;function IA(a,s){switch(a){case"keyup":return N6.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qA(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Hs=!1;function M6(a,s){switch(a){case"compositionend":return qA(s);case"keypress":return s.which!==32?null:(BA=!0,$A);case"textInput":return a=s.data,a===$A&&BA?null:a;default:return null}}function P6(a,s){if(Hs)return a==="compositionend"||!zm&&IA(a,s)?(a=PA(),bf=Pm=Ha=null,Hs=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return zA&&s.locale!=="ko"?null:s.data;default:return null}}var R6={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 UA(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!R6[a.type]:s==="textarea"}function VA(a,s,c,p){Us?Vs?Vs.push(p):Vs=[p]:Us=p,s=hd(s,"onChange"),0<s.length&&(c=new wf("onChange","change",null,c,p),a.push({event:c,listeners:s}))}var Vl=null,Hl=null;function k6(a){O_(a,0)}function Of(a){var s=zl(a);if(AA(s))return a}function HA(a,s){if(a==="change")return s}var GA=!1;if(ia){var $m;if(ia){var Bm="oninput"in document;if(!Bm){var FA=document.createElement("div");FA.setAttribute("oninput","return;"),Bm=typeof FA.oninput=="function"}$m=Bm}else $m=!1;GA=$m&&(!document.documentMode||9<document.documentMode)}function KA(){Vl&&(Vl.detachEvent("onpropertychange",YA),Hl=Vl=null)}function YA(a){if(a.propertyName==="value"&&Of(Hl)){var s=[];VA(s,Hl,a,Nm(a)),MA(k6,s)}}function D6(a,s,c){a==="focusin"?(KA(),Vl=s,Hl=c,Vl.attachEvent("onpropertychange",YA)):a==="focusout"&&KA()}function L6(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Of(Hl)}function z6(a,s){if(a==="click")return Of(s)}function $6(a,s){if(a==="input"||a==="change")return Of(s)}function B6(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Ln=typeof Object.is=="function"?Object.is:B6;function Gl(a,s){if(Ln(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var c=Object.keys(a),p=Object.keys(s);if(c.length!==p.length)return!1;for(p=0;p<c.length;p++){var v=c[p];if(!$r.call(s,v)||!Ln(a[v],s[v]))return!1}return!0}function XA(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function WA(a,s){var c=XA(a);a=0;for(var p;c;){if(c.nodeType===3){if(p=a+c.textContent.length,a<=s&&p>=s)return{node:c,offset:s-a};a=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=XA(c)}}function ZA(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?ZA(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function QA(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=gf(a.document);s instanceof a.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)a=s.contentWindow;else break;s=gf(a.document)}return s}function Im(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var I6=ia&&"documentMode"in document&&11>=document.documentMode,Gs=null,qm=null,Fl=null,Um=!1;function JA(a,s,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Um||Gs==null||Gs!==gf(p)||(p=Gs,"selectionStart"in p&&Im(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Fl&&Gl(Fl,p)||(Fl=p,p=hd(qm,"onSelect"),0<p.length&&(s=new wf("onSelect","select",null,s,c),a.push({event:s,listeners:p}),s.target=Gs)))}function Bi(a,s){var c={};return c[a.toLowerCase()]=s.toLowerCase(),c["Webkit"+a]="webkit"+s,c["Moz"+a]="moz"+s,c}var Fs={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},Vm={},eO={};ia&&(eO=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);function Ii(a){if(Vm[a])return Vm[a];if(!Fs[a])return a;var s=Fs[a],c;for(c in s)if(s.hasOwnProperty(c)&&c in eO)return Vm[a]=s[c];return a}var tO=Ii("animationend"),nO=Ii("animationiteration"),rO=Ii("animationstart"),q6=Ii("transitionrun"),U6=Ii("transitionstart"),V6=Ii("transitioncancel"),aO=Ii("transitionend"),iO=new Map,Hm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Hm.push("scrollEnd");function br(a,s){iO.set(a,s),zi(s,[a])}var _f=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},er=[],Ks=0,Gm=0;function Tf(){for(var a=Ks,s=Gm=Ks=0;s<a;){var c=er[s];er[s++]=null;var p=er[s];er[s++]=null;var v=er[s];er[s++]=null;var x=er[s];if(er[s++]=null,p!==null&&v!==null){var N=p.pending;N===null?v.next=v:(v.next=N.next,N.next=v),p.pending=v}x!==0&&sO(c,v,x)}}function Ef(a,s,c,p){er[Ks++]=a,er[Ks++]=s,er[Ks++]=c,er[Ks++]=p,Gm|=p,a.lanes|=p,a=a.alternate,a!==null&&(a.lanes|=p)}function Fm(a,s,c,p){return Ef(a,s,c,p),Nf(a)}function qi(a,s){return Ef(a,null,null,s),Nf(a)}function sO(a,s,c){a.lanes|=c;var p=a.alternate;p!==null&&(p.lanes|=c);for(var v=!1,x=a.return;x!==null;)x.childLanes|=c,p=x.alternate,p!==null&&(p.childLanes|=c),x.tag===22&&(a=x.stateNode,a===null||a._visibility&1||(v=!0)),a=x,x=x.return;return a.tag===3?(x=a.stateNode,v&&s!==null&&(v=31-Dn(c),a=x.hiddenUpdates,p=a[v],p===null?a[v]=[s]:p.push(s),s.lane=c|536870912),x):null}function Nf(a){if(50<pc)throw pc=0,tv=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Ys={};function H6(a,s,c,p){this.tag=a,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zn(a,s,c,p){return new H6(a,s,c,p)}function Km(a){return a=a.prototype,!(!a||!a.isReactComponent)}function sa(a,s){var c=a.alternate;return c===null?(c=zn(a.tag,s,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=s,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=a.flags&65011712,c.childLanes=a.childLanes,c.lanes=a.lanes,c.child=a.child,c.memoizedProps=a.memoizedProps,c.memoizedState=a.memoizedState,c.updateQueue=a.updateQueue,s=a.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=a.sibling,c.index=a.index,c.ref=a.ref,c.refCleanup=a.refCleanup,c}function oO(a,s){a.flags&=65011714;var c=a.alternate;return c===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,s=c.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function Cf(a,s,c,p,v,x){var N=0;if(p=a,typeof a=="function")Km(a)&&(N=1);else if(typeof a=="string")N=XB(a,c,fe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case k:return a=zn(31,c,s,v),a.elementType=k,a.lanes=x,a;case w:return Ui(c.children,v,x,s);case b:N=8,v|=24;break;case A:return a=zn(12,c,s,v|2),a.elementType=A,a.lanes=x,a;case O:return a=zn(13,c,s,v),a.elementType=O,a.lanes=x,a;case E:return a=zn(19,c,s,v),a.elementType=E,a.lanes=x,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case T:N=10;break e;case _:N=9;break e;case C:N=11;break e;case M:N=14;break e;case D:N=16,p=null;break e}N=29,c=Error(r(130,a===null?"null":typeof a,"")),p=null}return s=zn(N,c,s,v),s.elementType=a,s.type=p,s.lanes=x,s}function Ui(a,s,c,p){return a=zn(7,a,p,s),a.lanes=c,a}function Ym(a,s,c){return a=zn(6,a,null,s),a.lanes=c,a}function lO(a){var s=zn(18,null,null,0);return s.stateNode=a,s}function Xm(a,s,c){return s=zn(4,a.children!==null?a.children:[],a.key,s),s.lanes=c,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var cO=new WeakMap;function tr(a,s){if(typeof a=="object"&&a!==null){var c=cO.get(a);return c!==void 0?c:(s={value:a,source:s,stack:gr(s)},cO.set(a,s),s)}return{value:a,source:s,stack:gr(s)}}var Xs=[],Ws=0,Mf=null,Kl=0,nr=[],rr=0,Ga=null,Br=1,Ir="";function oa(a,s){Xs[Ws++]=Kl,Xs[Ws++]=Mf,Mf=a,Kl=s}function uO(a,s,c){nr[rr++]=Br,nr[rr++]=Ir,nr[rr++]=Ga,Ga=a;var p=Br;a=Ir;var v=32-Dn(p)-1;p&=~(1<<v),c+=1;var x=32-Dn(s)+v;if(30<x){var N=v-v%5;x=(p&(1<<N)-1).toString(32),p>>=N,v-=N,Br=1<<32-Dn(s)+v|c<<v|p,Ir=x+a}else Br=1<<x|c<<v|p,Ir=a}function Wm(a){a.return!==null&&(oa(a,1),uO(a,1,0))}function Zm(a){for(;a===Mf;)Mf=Xs[--Ws],Xs[Ws]=null,Kl=Xs[--Ws],Xs[Ws]=null;for(;a===Ga;)Ga=nr[--rr],nr[rr]=null,Ir=nr[--rr],nr[rr]=null,Br=nr[--rr],nr[rr]=null}function fO(a,s){nr[rr++]=Br,nr[rr++]=Ir,nr[rr++]=Ga,Br=s.id,Ir=s.overflow,Ga=a}var nn=null,vt=null,He=!1,Fa=null,ar=!1,Qm=Error(r(519));function Ka(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yl(tr(s,a)),Qm}function dO(a){var s=a.stateNode,c=a.type,p=a.memoizedProps;switch(s[tn]=a,s[wn]=p,c){case"dialog":Be("cancel",s),Be("close",s);break;case"iframe":case"object":case"embed":Be("load",s);break;case"video":case"audio":for(c=0;c<yc.length;c++)Be(yc[c],s);break;case"source":Be("error",s);break;case"img":case"image":case"link":Be("error",s),Be("load",s);break;case"details":Be("toggle",s);break;case"input":Be("invalid",s),OA(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Be("invalid",s);break;case"textarea":Be("invalid",s),TA(s,p.value,p.defaultValue,p.children)}c=p.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||p.suppressHydrationWarning===!0||N_(s.textContent,c)?(p.popover!=null&&(Be("beforetoggle",s),Be("toggle",s)),p.onScroll!=null&&Be("scroll",s),p.onScrollEnd!=null&&Be("scrollend",s),p.onClick!=null&&(s.onclick=aa),s=!0):s=!1,s||Ka(a,!0)}function hO(a){for(nn=a.return;nn;)switch(nn.tag){case 5:case 31:case 13:ar=!1;return;case 27:case 3:ar=!0;return;default:nn=nn.return}}function Zs(a){if(a!==nn)return!1;if(!He)return hO(a),He=!0,!1;var s=a.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=a.type,c=!(c!=="form"&&c!=="button")||yv(a.type,a.memoizedProps)),c=!c),c&&vt&&Ka(a),hO(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=$_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=$_(a)}else s===27?(s=vt,oi(a.type)?(a=jv,jv=null,vt=a):vt=s):vt=nn?sr(a.stateNode.nextSibling):null;return!0}function Vi(){vt=nn=null,He=!1}function Jm(){var a=Fa;return a!==null&&(En===null?En=a:En.push.apply(En,a),Fa=null),a}function Yl(a){Fa===null?Fa=[a]:Fa.push(a)}var ey=z(null),Hi=null,la=null;function Ya(a,s,c){re(ey,s._currentValue),s._currentValue=c}function ca(a){a._currentValue=ey.current,G(ey)}function ty(a,s,c){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===c)break;a=a.return}}function ny(a,s,c,p){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var x=v.dependencies;if(x!==null){var N=v.child;x=x.firstContext;e:for(;x!==null;){var R=x;x=v;for(var U=0;U<s.length;U++)if(R.context===s[U]){x.lanes|=c,R=x.alternate,R!==null&&(R.lanes|=c),ty(x.return,c,a),p||(N=null);break e}x=R.next}}else if(v.tag===18){if(N=v.return,N===null)throw Error(r(341));N.lanes|=c,x=N.alternate,x!==null&&(x.lanes|=c),ty(N,c,a),N=null}else N=v.child;if(N!==null)N.return=v;else for(N=v;N!==null;){if(N===a){N=null;break}if(v=N.sibling,v!==null){v.return=N.return,N=v;break}N=N.return}v=N}}function Qs(a,s,c,p){a=null;for(var v=s,x=!1;v!==null;){if(!x){if((v.flags&524288)!==0)x=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var N=v.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var R=v.type;Ln(v.pendingProps.value,N.value)||(a!==null?a.push(R):a=[R])}}else if(v===ze.current){if(N=v.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(jc):a=[jc])}v=v.return}a!==null&&ny(s,a,c,p),s.flags|=262144}function Pf(a){for(a=a.firstContext;a!==null;){if(!Ln(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Gi(a){Hi=a,la=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function rn(a){return pO(Hi,a)}function Rf(a,s){return Hi===null&&Gi(a),pO(a,s)}function pO(a,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},la===null){if(a===null)throw Error(r(308));la=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else la=la.next=s;return c}var G6=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(c,p){a.push(p)}};this.abort=function(){s.aborted=!0,a.forEach(function(c){return c()})}},F6=e.unstable_scheduleCallback,K6=e.unstable_NormalPriority,Dt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ry(){return{controller:new G6,data:new Map,refCount:0}}function Xl(a){a.refCount--,a.refCount===0&&F6(K6,function(){a.controller.abort()})}var Wl=null,ay=0,Js=0,eo=null;function Y6(a,s){if(Wl===null){var c=Wl=[];ay=0,Js=ov(),eo={status:"pending",value:void 0,then:function(p){c.push(p)}}}return ay++,s.then(mO,mO),s}function mO(){if(--ay===0&&Wl!==null){eo!==null&&(eo.status="fulfilled");var a=Wl;Wl=null,Js=0,eo=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function X6(a,s){var c=[],p={status:"pending",value:null,reason:null,then:function(v){c.push(v)}};return a.then(function(){p.status="fulfilled",p.value=s;for(var v=0;v<c.length;v++)(0,c[v])(s)},function(v){for(p.status="rejected",p.reason=v,v=0;v<c.length;v++)(0,c[v])(void 0)}),p}var yO=L.S;L.S=function(a,s){J2=dn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Y6(a,s),yO!==null&&yO(a,s)};var Fi=z(null);function iy(){var a=Fi.current;return a!==null?a:ct.pooledCache}function kf(a,s){s===null?re(Fi,Fi.current):re(Fi,s.pool)}function vO(){var a=iy();return a===null?null:{parent:Dt._currentValue,pool:a}}var to=Error(r(460)),sy=Error(r(474)),Df=Error(r(542)),Lf={then:function(){}};function gO(a){return a=a.status,a==="fulfilled"||a==="rejected"}function xO(a,s,c){switch(c=a[c],c===void 0?a.push(s):c!==s&&(s.then(aa,aa),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,jO(a),a;default:if(typeof s.status=="string")s.then(aa,aa);else{if(a=ct,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(p){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=p}},function(p){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,jO(a),a}throw Yi=s,to}}function Ki(a){try{var s=a._init;return s(a._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Yi=c,to):c}}var Yi=null;function bO(){if(Yi===null)throw Error(r(459));var a=Yi;return Yi=null,a}function jO(a){if(a===to||a===Df)throw Error(r(483))}var no=null,Zl=0;function zf(a){var s=Zl;return Zl+=1,no===null&&(no=[]),xO(no,a,s)}function Ql(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function $f(a,s){throw s.$$typeof===g?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function SO(a){function s(K,V){if(a){var W=K.deletions;W===null?(K.deletions=[V],K.flags|=16):W.push(V)}}function c(K,V){if(!a)return null;for(;V!==null;)s(K,V),V=V.sibling;return null}function p(K){for(var V=new Map;K!==null;)K.key!==null?V.set(K.key,K):V.set(K.index,K),K=K.sibling;return V}function v(K,V){return K=sa(K,V),K.index=0,K.sibling=null,K}function x(K,V,W){return K.index=W,a?(W=K.alternate,W!==null?(W=W.index,W<V?(K.flags|=67108866,V):W):(K.flags|=67108866,V)):(K.flags|=1048576,V)}function N(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function R(K,V,W,ie){return V===null||V.tag!==6?(V=Ym(W,K.mode,ie),V.return=K,V):(V=v(V,W),V.return=K,V)}function U(K,V,W,ie){var Se=W.type;return Se===w?te(K,V,W.props.children,ie,W.key):V!==null&&(V.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&Ki(Se)===V.type)?(V=v(V,W.props),Ql(V,W),V.return=K,V):(V=Cf(W.type,W.key,W.props,null,K.mode,ie),Ql(V,W),V.return=K,V)}function Z(K,V,W,ie){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=Xm(W,K.mode,ie),V.return=K,V):(V=v(V,W.children||[]),V.return=K,V)}function te(K,V,W,ie,Se){return V===null||V.tag!==7?(V=Ui(W,K.mode,ie,Se),V.return=K,V):(V=v(V,W),V.return=K,V)}function se(K,V,W){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Ym(""+V,K.mode,W),V.return=K,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case j:return W=Cf(V.type,V.key,V.props,null,K.mode,W),Ql(W,V),W.return=K,W;case S:return V=Xm(V,K.mode,W),V.return=K,V;case D:return V=Ki(V),se(K,V,W)}if(Y(V)||$(V))return V=Ui(V,K.mode,W,null),V.return=K,V;if(typeof V.then=="function")return se(K,zf(V),W);if(V.$$typeof===T)return se(K,Rf(K,V),W);$f(K,V)}return null}function J(K,V,W,ie){var Se=V!==null?V.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Se!==null?null:R(K,V,""+W,ie);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case j:return W.key===Se?U(K,V,W,ie):null;case S:return W.key===Se?Z(K,V,W,ie):null;case D:return W=Ki(W),J(K,V,W,ie)}if(Y(W)||$(W))return Se!==null?null:te(K,V,W,ie,null);if(typeof W.then=="function")return J(K,V,zf(W),ie);if(W.$$typeof===T)return J(K,V,Rf(K,W),ie);$f(K,W)}return null}function ee(K,V,W,ie,Se){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return K=K.get(W)||null,R(V,K,""+ie,Se);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case j:return K=K.get(ie.key===null?W:ie.key)||null,U(V,K,ie,Se);case S:return K=K.get(ie.key===null?W:ie.key)||null,Z(V,K,ie,Se);case D:return ie=Ki(ie),ee(K,V,W,ie,Se)}if(Y(ie)||$(ie))return K=K.get(W)||null,te(V,K,ie,Se,null);if(typeof ie.then=="function")return ee(K,V,W,zf(ie),Se);if(ie.$$typeof===T)return ee(K,V,W,Rf(V,ie),Se);$f(V,ie)}return null}function ge(K,V,W,ie){for(var Se=null,Ge=null,be=V,De=V=0,Ue=null;be!==null&&De<W.length;De++){be.index>De?(Ue=be,be=null):Ue=be.sibling;var Fe=J(K,be,W[De],ie);if(Fe===null){be===null&&(be=Ue);break}a&&be&&Fe.alternate===null&&s(K,be),V=x(Fe,V,De),Ge===null?Se=Fe:Ge.sibling=Fe,Ge=Fe,be=Ue}if(De===W.length)return c(K,be),He&&oa(K,De),Se;if(be===null){for(;De<W.length;De++)be=se(K,W[De],ie),be!==null&&(V=x(be,V,De),Ge===null?Se=be:Ge.sibling=be,Ge=be);return He&&oa(K,De),Se}for(be=p(be);De<W.length;De++)Ue=ee(be,K,De,W[De],ie),Ue!==null&&(a&&Ue.alternate!==null&&be.delete(Ue.key===null?De:Ue.key),V=x(Ue,V,De),Ge===null?Se=Ue:Ge.sibling=Ue,Ge=Ue);return a&&be.forEach(function(di){return s(K,di)}),He&&oa(K,De),Se}function Ae(K,V,W,ie){if(W==null)throw Error(r(151));for(var Se=null,Ge=null,be=V,De=V=0,Ue=null,Fe=W.next();be!==null&&!Fe.done;De++,Fe=W.next()){be.index>De?(Ue=be,be=null):Ue=be.sibling;var di=J(K,be,Fe.value,ie);if(di===null){be===null&&(be=Ue);break}a&&be&&di.alternate===null&&s(K,be),V=x(di,V,De),Ge===null?Se=di:Ge.sibling=di,Ge=di,be=Ue}if(Fe.done)return c(K,be),He&&oa(K,De),Se;if(be===null){for(;!Fe.done;De++,Fe=W.next())Fe=se(K,Fe.value,ie),Fe!==null&&(V=x(Fe,V,De),Ge===null?Se=Fe:Ge.sibling=Fe,Ge=Fe);return He&&oa(K,De),Se}for(be=p(be);!Fe.done;De++,Fe=W.next())Fe=ee(be,K,De,Fe.value,ie),Fe!==null&&(a&&Fe.alternate!==null&&be.delete(Fe.key===null?De:Fe.key),V=x(Fe,V,De),Ge===null?Se=Fe:Ge.sibling=Fe,Ge=Fe);return a&&be.forEach(function(s8){return s(K,s8)}),He&&oa(K,De),Se}function ot(K,V,W,ie){if(typeof W=="object"&&W!==null&&W.type===w&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case j:e:{for(var Se=W.key;V!==null;){if(V.key===Se){if(Se=W.type,Se===w){if(V.tag===7){c(K,V.sibling),ie=v(V,W.props.children),ie.return=K,K=ie;break e}}else if(V.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&Ki(Se)===V.type){c(K,V.sibling),ie=v(V,W.props),Ql(ie,W),ie.return=K,K=ie;break e}c(K,V);break}else s(K,V);V=V.sibling}W.type===w?(ie=Ui(W.props.children,K.mode,ie,W.key),ie.return=K,K=ie):(ie=Cf(W.type,W.key,W.props,null,K.mode,ie),Ql(ie,W),ie.return=K,K=ie)}return N(K);case S:e:{for(Se=W.key;V!==null;){if(V.key===Se)if(V.tag===4&&V.stateNode.containerInfo===W.containerInfo&&V.stateNode.implementation===W.implementation){c(K,V.sibling),ie=v(V,W.children||[]),ie.return=K,K=ie;break e}else{c(K,V);break}else s(K,V);V=V.sibling}ie=Xm(W,K.mode,ie),ie.return=K,K=ie}return N(K);case D:return W=Ki(W),ot(K,V,W,ie)}if(Y(W))return ge(K,V,W,ie);if($(W)){if(Se=$(W),typeof Se!="function")throw Error(r(150));return W=Se.call(W),Ae(K,V,W,ie)}if(typeof W.then=="function")return ot(K,V,zf(W),ie);if(W.$$typeof===T)return ot(K,V,Rf(K,W),ie);$f(K,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,V!==null&&V.tag===6?(c(K,V.sibling),ie=v(V,W),ie.return=K,K=ie):(c(K,V),ie=Ym(W,K.mode,ie),ie.return=K,K=ie),N(K)):c(K,V)}return function(K,V,W,ie){try{Zl=0;var Se=ot(K,V,W,ie);return no=null,Se}catch(be){if(be===to||be===Df)throw be;var Ge=zn(29,be,null,K.mode);return Ge.lanes=ie,Ge.return=K,Ge}finally{}}}var Xi=SO(!0),wO=SO(!1),Xa=!1;function oy(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ly(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Wa(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Za(a,s,c){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(Xe&2)!==0){var v=p.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),p.pending=s,s=Nf(a),sO(a,null,c),s}return Ef(a,p,s,c),Nf(a)}function Jl(a,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var p=s.lanes;p&=a.pendingLanes,c|=p,s.lanes=c,pA(a,c)}}function cy(a,s){var c=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var v=null,x=null;if(c=c.firstBaseUpdate,c!==null){do{var N={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};x===null?v=x=N:x=x.next=N,c=c.next}while(c!==null);x===null?v=x=s:x=x.next=s}else v=x=s;c={baseState:p.baseState,firstBaseUpdate:v,lastBaseUpdate:x,shared:p.shared,callbacks:p.callbacks},a.updateQueue=c;return}a=c.lastBaseUpdate,a===null?c.firstBaseUpdate=s:a.next=s,c.lastBaseUpdate=s}var uy=!1;function ec(){if(uy){var a=eo;if(a!==null)throw a}}function tc(a,s,c,p){uy=!1;var v=a.updateQueue;Xa=!1;var x=v.firstBaseUpdate,N=v.lastBaseUpdate,R=v.shared.pending;if(R!==null){v.shared.pending=null;var U=R,Z=U.next;U.next=null,N===null?x=Z:N.next=Z,N=U;var te=a.alternate;te!==null&&(te=te.updateQueue,R=te.lastBaseUpdate,R!==N&&(R===null?te.firstBaseUpdate=Z:R.next=Z,te.lastBaseUpdate=U))}if(x!==null){var se=v.baseState;N=0,te=Z=U=null,R=x;do{var J=R.lane&-536870913,ee=J!==R.lane;if(ee?(qe&J)===J:(p&J)===J){J!==0&&J===Js&&(uy=!0),te!==null&&(te=te.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ge=a,Ae=R;J=s;var ot=c;switch(Ae.tag){case 1:if(ge=Ae.payload,typeof ge=="function"){se=ge.call(ot,se,J);break e}se=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Ae.payload,J=typeof ge=="function"?ge.call(ot,se,J):ge,J==null)break e;se=y({},se,J);break e;case 2:Xa=!0}}J=R.callback,J!==null&&(a.flags|=64,ee&&(a.flags|=8192),ee=v.callbacks,ee===null?v.callbacks=[J]:ee.push(J))}else ee={lane:J,tag:R.tag,payload:R.payload,callback:R.callback,next:null},te===null?(Z=te=ee,U=se):te=te.next=ee,N|=J;if(R=R.next,R===null){if(R=v.shared.pending,R===null)break;ee=R,R=ee.next,ee.next=null,v.lastBaseUpdate=ee,v.shared.pending=null}}while(!0);te===null&&(U=se),v.baseState=U,v.firstBaseUpdate=Z,v.lastBaseUpdate=te,x===null&&(v.shared.lanes=0),ni|=N,a.lanes=N,a.memoizedState=se}}function AO(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function OO(a,s){var c=a.callbacks;if(c!==null)for(a.callbacks=null,a=0;a<c.length;a++)AO(c[a],s)}var ro=z(null),Bf=z(0);function _O(a,s){a=ga,re(Bf,a),re(ro,s),ga=a|s.baseLanes}function fy(){re(Bf,ga),re(ro,ro.current)}function dy(){ga=Bf.current,G(ro),G(Bf)}var $n=z(null),ir=null;function Qa(a){var s=a.alternate;re(Pt,Pt.current&1),re($n,a),ir===null&&(s===null||ro.current!==null||s.memoizedState!==null)&&(ir=a)}function hy(a){re(Pt,Pt.current),re($n,a),ir===null&&(ir=a)}function TO(a){a.tag===22?(re(Pt,Pt.current),re($n,a),ir===null&&(ir=a)):Ja()}function Ja(){re(Pt,Pt.current),re($n,$n.current)}function Bn(a){G($n),ir===a&&(ir=null),G(Pt)}var Pt=z(0);function If(a){for(var s=a;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||xv(c)||bv(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ua=0,Re=null,it=null,Lt=null,qf=!1,ao=!1,Wi=!1,Uf=0,nc=0,io=null,W6=0;function Et(){throw Error(r(321))}function py(a,s){if(s===null)return!1;for(var c=0;c<s.length&&c<a.length;c++)if(!Ln(a[c],s[c]))return!1;return!0}function my(a,s,c,p,v,x){return ua=x,Re=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=a===null||a.memoizedState===null?u2:Cy,Wi=!1,x=c(p,v),Wi=!1,ao&&(x=NO(s,c,p,v)),EO(a),x}function EO(a){L.H=ic;var s=it!==null&&it.next!==null;if(ua=0,Lt=it=Re=null,qf=!1,nc=0,io=null,s)throw Error(r(300));a===null||zt||(a=a.dependencies,a!==null&&Pf(a)&&(zt=!0))}function NO(a,s,c,p){Re=a;var v=0;do{if(ao&&(io=null),nc=0,ao=!1,25<=v)throw Error(r(301));if(v+=1,Lt=it=null,a.updateQueue!=null){var x=a.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}L.H=f2,x=s(c,p)}while(ao);return x}function Z6(){var a=L.H,s=a.useState()[0];return s=typeof s.then=="function"?rc(s):s,a=a.useState()[0],(it!==null?it.memoizedState:null)!==a&&(Re.flags|=1024),s}function yy(){var a=Uf!==0;return Uf=0,a}function vy(a,s,c){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~c}function gy(a){if(qf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}qf=!1}ua=0,Lt=it=Re=null,ao=!1,nc=Uf=0,io=null}function yn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Re.memoizedState=Lt=a:Lt=Lt.next=a,Lt}function Rt(){if(it===null){var a=Re.alternate;a=a!==null?a.memoizedState:null}else a=it.next;var s=Lt===null?Re.memoizedState:Lt.next;if(s!==null)Lt=s,it=a;else{if(a===null)throw Re.alternate===null?Error(r(467)):Error(r(310));it=a,a={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},Lt===null?Re.memoizedState=Lt=a:Lt=Lt.next=a}return Lt}function Vf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rc(a){var s=nc;return nc+=1,io===null&&(io=[]),a=xO(io,a,s),s=Re,(Lt===null?s.memoizedState:Lt.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?u2:Cy),a}function Hf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return rc(a);if(a.$$typeof===T)return rn(a)}throw Error(r(438,String(a)))}function xy(a){var s=null,c=Re.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var p=Re.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Vf(),Re.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(a),p=0;p<a;p++)c[p]=B;return s.index++,c}function fa(a,s){return typeof s=="function"?s(a):s}function Gf(a){var s=Rt();return by(s,it,a)}function by(a,s,c){var p=a.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=c;var v=a.baseQueue,x=p.pending;if(x!==null){if(v!==null){var N=v.next;v.next=x.next,x.next=N}s.baseQueue=v=x,p.pending=null}if(x=a.baseState,v===null)a.memoizedState=x;else{s=v.next;var R=N=null,U=null,Z=s,te=!1;do{var se=Z.lane&-536870913;if(se!==Z.lane?(qe&se)===se:(ua&se)===se){var J=Z.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),se===Js&&(te=!0);else if((ua&J)===J){Z=Z.next,J===Js&&(te=!0);continue}else se={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},U===null?(R=U=se,N=x):U=U.next=se,Re.lanes|=J,ni|=J;se=Z.action,Wi&&c(x,se),x=Z.hasEagerState?Z.eagerState:c(x,se)}else J={lane:se,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},U===null?(R=U=J,N=x):U=U.next=J,Re.lanes|=se,ni|=se;Z=Z.next}while(Z!==null&&Z!==s);if(U===null?N=x:U.next=R,!Ln(x,a.memoizedState)&&(zt=!0,te&&(c=eo,c!==null)))throw c;a.memoizedState=x,a.baseState=N,a.baseQueue=U,p.lastRenderedState=x}return v===null&&(p.lanes=0),[a.memoizedState,p.dispatch]}function jy(a){var s=Rt(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=a;var p=c.dispatch,v=c.pending,x=s.memoizedState;if(v!==null){c.pending=null;var N=v=v.next;do x=a(x,N.action),N=N.next;while(N!==v);Ln(x,s.memoizedState)||(zt=!0),s.memoizedState=x,s.baseQueue===null&&(s.baseState=x),c.lastRenderedState=x}return[x,p]}function CO(a,s,c){var p=Re,v=Rt(),x=He;if(x){if(c===void 0)throw Error(r(407));c=c()}else c=s();var N=!Ln((it||v).memoizedState,c);if(N&&(v.memoizedState=c,zt=!0),v=v.queue,Ay(RO.bind(null,p,v,a),[a]),v.getSnapshot!==s||N||Lt!==null&&Lt.memoizedState.tag&1){if(p.flags|=2048,so(9,{destroy:void 0},PO.bind(null,p,v,c,s),null),ct===null)throw Error(r(349));x||(ua&127)!==0||MO(p,s,c)}return c}function MO(a,s,c){a.flags|=16384,a={getSnapshot:s,value:c},s=Re.updateQueue,s===null?(s=Vf(),Re.updateQueue=s,s.stores=[a]):(c=s.stores,c===null?s.stores=[a]:c.push(a))}function PO(a,s,c,p){s.value=c,s.getSnapshot=p,kO(s)&&DO(a)}function RO(a,s,c){return c(function(){kO(s)&&DO(a)})}function kO(a){var s=a.getSnapshot;a=a.value;try{var c=s();return!Ln(a,c)}catch{return!0}}function DO(a){var s=qi(a,2);s!==null&&Nn(s,a,2)}function Sy(a){var s=yn();if(typeof a=="function"){var c=a;if(a=c(),Wi){Ua(!0);try{c()}finally{Ua(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:a},s}function LO(a,s,c,p){return a.baseState=c,by(a,it,typeof p=="function"?p:fa)}function Q6(a,s,c,p,v){if(Yf(a))throw Error(r(485));if(a=s.action,a!==null){var x={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){x.listeners.push(N)}};L.T!==null?c(!0):x.isTransition=!1,p(x),c=s.pending,c===null?(x.next=s.pending=x,zO(s,x)):(x.next=c.next,s.pending=c.next=x)}}function zO(a,s){var c=s.action,p=s.payload,v=a.state;if(s.isTransition){var x=L.T,N={};L.T=N;try{var R=c(v,p),U=L.S;U!==null&&U(N,R),$O(a,s,R)}catch(Z){wy(a,s,Z)}finally{x!==null&&N.types!==null&&(x.types=N.types),L.T=x}}else try{x=c(v,p),$O(a,s,x)}catch(Z){wy(a,s,Z)}}function $O(a,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(p){BO(a,s,p)},function(p){return wy(a,s,p)}):BO(a,s,c)}function BO(a,s,c){s.status="fulfilled",s.value=c,IO(s),a.state=c,s=a.pending,s!==null&&(c=s.next,c===s?a.pending=null:(c=c.next,s.next=c,zO(a,c)))}function wy(a,s,c){var p=a.pending;if(a.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=c,IO(s),s=s.next;while(s!==p)}a.action=null}function IO(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function qO(a,s){return s}function UO(a,s){if(He){var c=ct.formState;if(c!==null){e:{var p=Re;if(He){if(vt){t:{for(var v=vt,x=ar;v.nodeType!==8;){if(!x){v=null;break t}if(v=sr(v.nextSibling),v===null){v=null;break t}}x=v.data,v=x==="F!"||x==="F"?v:null}if(v){vt=sr(v.nextSibling),p=v.data==="F!";break e}}Ka(p)}p=!1}p&&(s=c[0])}}return c=yn(),c.memoizedState=c.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qO,lastRenderedState:s},c.queue=p,c=o2.bind(null,Re,p),p.dispatch=c,p=Sy(!1),x=Ny.bind(null,Re,!1,p.queue),p=yn(),v={state:s,dispatch:null,action:a,pending:null},p.queue=v,c=Q6.bind(null,Re,v,x,c),v.dispatch=c,p.memoizedState=a,[s,c,!1]}function VO(a){var s=Rt();return HO(s,it,a)}function HO(a,s,c){if(s=by(a,s,qO)[0],a=Gf(fa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=rc(s)}catch(N){throw N===to?Df:N}else p=s;s=Rt();var v=s.queue,x=v.dispatch;return c!==s.memoizedState&&(Re.flags|=2048,so(9,{destroy:void 0},J6.bind(null,v,c),null)),[p,x,a]}function J6(a,s){a.action=s}function GO(a){var s=Rt(),c=it;if(c!==null)return HO(s,c,a);Rt(),s=s.memoizedState,c=Rt();var p=c.queue.dispatch;return c.memoizedState=a,[s,p,!1]}function so(a,s,c,p){return a={tag:a,create:c,deps:p,inst:s,next:null},s=Re.updateQueue,s===null&&(s=Vf(),Re.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=a.next=a:(p=c.next,c.next=a,a.next=p,s.lastEffect=a),a}function FO(){return Rt().memoizedState}function Ff(a,s,c,p){var v=yn();Re.flags|=a,v.memoizedState=so(1|s,{destroy:void 0},c,p===void 0?null:p)}function Kf(a,s,c,p){var v=Rt();p=p===void 0?null:p;var x=v.memoizedState.inst;it!==null&&p!==null&&py(p,it.memoizedState.deps)?v.memoizedState=so(s,x,c,p):(Re.flags|=a,v.memoizedState=so(1|s,x,c,p))}function KO(a,s){Ff(8390656,8,a,s)}function Ay(a,s){Kf(2048,8,a,s)}function eB(a){Re.flags|=4;var s=Re.updateQueue;if(s===null)s=Vf(),Re.updateQueue=s,s.events=[a];else{var c=s.events;c===null?s.events=[a]:c.push(a)}}function YO(a){var s=Rt().memoizedState;return eB({ref:s,nextImpl:a}),function(){if((Xe&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function XO(a,s){return Kf(4,2,a,s)}function WO(a,s){return Kf(4,4,a,s)}function ZO(a,s){if(typeof s=="function"){a=a();var c=s(a);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function QO(a,s,c){c=c!=null?c.concat([a]):null,Kf(4,4,ZO.bind(null,s,a),c)}function Oy(){}function JO(a,s){var c=Rt();s=s===void 0?null:s;var p=c.memoizedState;return s!==null&&py(s,p[1])?p[0]:(c.memoizedState=[a,s],a)}function e2(a,s){var c=Rt();s=s===void 0?null:s;var p=c.memoizedState;if(s!==null&&py(s,p[1]))return p[0];if(p=a(),Wi){Ua(!0);try{a()}finally{Ua(!1)}}return c.memoizedState=[p,s],p}function _y(a,s,c){return c===void 0||(ua&1073741824)!==0&&(qe&261930)===0?a.memoizedState=s:(a.memoizedState=c,a=t_(),Re.lanes|=a,ni|=a,c)}function t2(a,s,c,p){return Ln(c,s)?c:ro.current!==null?(a=_y(a,c,p),Ln(a,s)||(zt=!0),a):(ua&42)===0||(ua&1073741824)!==0&&(qe&261930)===0?(zt=!0,a.memoizedState=c):(a=t_(),Re.lanes|=a,ni|=a,s)}function n2(a,s,c,p,v){var x=H.p;H.p=x!==0&&8>x?x:8;var N=L.T,R={};L.T=R,Ny(a,!1,s,c);try{var U=v(),Z=L.S;if(Z!==null&&Z(R,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var te=X6(U,p);ac(a,s,te,Un(a))}else ac(a,s,p,Un(a))}catch(se){ac(a,s,{then:function(){},status:"rejected",reason:se},Un())}finally{H.p=x,N!==null&&R.types!==null&&(N.types=R.types),L.T=N}}function tB(){}function Ty(a,s,c,p){if(a.tag!==5)throw Error(r(476));var v=r2(a).queue;n2(a,v,s,Q,c===null?tB:function(){return a2(a),c(p)})}function r2(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:Q},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:c},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function a2(a){var s=r2(a);s.next===null&&(s=a.alternate.memoizedState),ac(a,s.next.queue,{},Un())}function Ey(){return rn(jc)}function i2(){return Rt().memoizedState}function s2(){return Rt().memoizedState}function nB(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var c=Un();a=Wa(c);var p=Za(s,a,c);p!==null&&(Nn(p,s,c),Jl(p,s,c)),s={cache:ry()},a.payload=s;return}s=s.return}}function rB(a,s,c){var p=Un();c={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Yf(a)?l2(s,c):(c=Fm(a,s,c,p),c!==null&&(Nn(c,a,p),c2(c,s,p)))}function o2(a,s,c){var p=Un();ac(a,s,c,p)}function ac(a,s,c,p){var v={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Yf(a))l2(s,v);else{var x=a.alternate;if(a.lanes===0&&(x===null||x.lanes===0)&&(x=s.lastRenderedReducer,x!==null))try{var N=s.lastRenderedState,R=x(N,c);if(v.hasEagerState=!0,v.eagerState=R,Ln(R,N))return Ef(a,s,v,0),ct===null&&Tf(),!1}catch{}finally{}if(c=Fm(a,s,v,p),c!==null)return Nn(c,a,p),c2(c,s,p),!0}return!1}function Ny(a,s,c,p){if(p={lane:2,revertLane:ov(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Yf(a)){if(s)throw Error(r(479))}else s=Fm(a,c,p,2),s!==null&&Nn(s,a,2)}function Yf(a){var s=a.alternate;return a===Re||s!==null&&s===Re}function l2(a,s){ao=qf=!0;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}function c2(a,s,c){if((c&4194048)!==0){var p=s.lanes;p&=a.pendingLanes,c|=p,s.lanes=c,pA(a,c)}}var ic={readContext:rn,use:Hf,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};ic.useEffectEvent=Et;var u2={readContext:rn,use:Hf,useCallback:function(a,s){return yn().memoizedState=[a,s===void 0?null:s],a},useContext:rn,useEffect:KO,useImperativeHandle:function(a,s,c){c=c!=null?c.concat([a]):null,Ff(4194308,4,ZO.bind(null,s,a),c)},useLayoutEffect:function(a,s){return Ff(4194308,4,a,s)},useInsertionEffect:function(a,s){Ff(4,2,a,s)},useMemo:function(a,s){var c=yn();s=s===void 0?null:s;var p=a();if(Wi){Ua(!0);try{a()}finally{Ua(!1)}}return c.memoizedState=[p,s],p},useReducer:function(a,s,c){var p=yn();if(c!==void 0){var v=c(s);if(Wi){Ua(!0);try{c(s)}finally{Ua(!1)}}}else v=s;return p.memoizedState=p.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},p.queue=a,a=a.dispatch=rB.bind(null,Re,a),[p.memoizedState,a]},useRef:function(a){var s=yn();return a={current:a},s.memoizedState=a},useState:function(a){a=Sy(a);var s=a.queue,c=o2.bind(null,Re,s);return s.dispatch=c,[a.memoizedState,c]},useDebugValue:Oy,useDeferredValue:function(a,s){var c=yn();return _y(c,a,s)},useTransition:function(){var a=Sy(!1);return a=n2.bind(null,Re,a.queue,!0,!1),yn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,c){var p=Re,v=yn();if(He){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),ct===null)throw Error(r(349));(qe&127)!==0||MO(p,s,c)}v.memoizedState=c;var x={value:c,getSnapshot:s};return v.queue=x,KO(RO.bind(null,p,x,a),[a]),p.flags|=2048,so(9,{destroy:void 0},PO.bind(null,p,x,c,s),null),c},useId:function(){var a=yn(),s=ct.identifierPrefix;if(He){var c=Ir,p=Br;c=(p&~(1<<32-Dn(p)-1)).toString(32)+c,s="_"+s+"R_"+c,c=Uf++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=W6++,s="_"+s+"r_"+c.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Ey,useFormState:UO,useActionState:UO,useOptimistic:function(a){var s=yn();s.memoizedState=s.baseState=a;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Ny.bind(null,Re,!0,c),c.dispatch=s,[a,s]},useMemoCache:xy,useCacheRefresh:function(){return yn().memoizedState=nB.bind(null,Re)},useEffectEvent:function(a){var s=yn(),c={impl:a};return s.memoizedState=c,function(){if((Xe&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},Cy={readContext:rn,use:Hf,useCallback:JO,useContext:rn,useEffect:Ay,useImperativeHandle:QO,useInsertionEffect:XO,useLayoutEffect:WO,useMemo:e2,useReducer:Gf,useRef:FO,useState:function(){return Gf(fa)},useDebugValue:Oy,useDeferredValue:function(a,s){var c=Rt();return t2(c,it.memoizedState,a,s)},useTransition:function(){var a=Gf(fa)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:rc(a),s]},useSyncExternalStore:CO,useId:i2,useHostTransitionStatus:Ey,useFormState:VO,useActionState:VO,useOptimistic:function(a,s){var c=Rt();return LO(c,it,a,s)},useMemoCache:xy,useCacheRefresh:s2};Cy.useEffectEvent=YO;var f2={readContext:rn,use:Hf,useCallback:JO,useContext:rn,useEffect:Ay,useImperativeHandle:QO,useInsertionEffect:XO,useLayoutEffect:WO,useMemo:e2,useReducer:jy,useRef:FO,useState:function(){return jy(fa)},useDebugValue:Oy,useDeferredValue:function(a,s){var c=Rt();return it===null?_y(c,a,s):t2(c,it.memoizedState,a,s)},useTransition:function(){var a=jy(fa)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:rc(a),s]},useSyncExternalStore:CO,useId:i2,useHostTransitionStatus:Ey,useFormState:GO,useActionState:GO,useOptimistic:function(a,s){var c=Rt();return it!==null?LO(c,it,a,s):(c.baseState=a,[a,c.queue.dispatch])},useMemoCache:xy,useCacheRefresh:s2};f2.useEffectEvent=YO;function My(a,s,c,p){s=a.memoizedState,c=c(p,s),c=c==null?s:y({},s,c),a.memoizedState=c,a.lanes===0&&(a.updateQueue.baseState=c)}var Py={enqueueSetState:function(a,s,c){a=a._reactInternals;var p=Un(),v=Wa(p);v.payload=s,c!=null&&(v.callback=c),s=Za(a,v,p),s!==null&&(Nn(s,a,p),Jl(s,a,p))},enqueueReplaceState:function(a,s,c){a=a._reactInternals;var p=Un(),v=Wa(p);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=Za(a,v,p),s!==null&&(Nn(s,a,p),Jl(s,a,p))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var c=Un(),p=Wa(c);p.tag=2,s!=null&&(p.callback=s),s=Za(a,p,c),s!==null&&(Nn(s,a,c),Jl(s,a,c))}};function d2(a,s,c,p,v,x,N){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,x,N):s.prototype&&s.prototype.isPureReactComponent?!Gl(c,p)||!Gl(v,x):!0}function h2(a,s,c,p){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,p),s.state!==a&&Py.enqueueReplaceState(s,s.state,null)}function Zi(a,s){var c=s;if("ref"in s){c={};for(var p in s)p!=="ref"&&(c[p]=s[p])}if(a=a.defaultProps){c===s&&(c=y({},c));for(var v in a)c[v]===void 0&&(c[v]=a[v])}return c}function p2(a){_f(a)}function m2(a){console.error(a)}function y2(a){_f(a)}function Xf(a,s){try{var c=a.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function v2(a,s,c){try{var p=a.onCaughtError;p(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function Ry(a,s,c){return c=Wa(c),c.tag=3,c.payload={element:null},c.callback=function(){Xf(a,s)},c}function g2(a){return a=Wa(a),a.tag=3,a}function x2(a,s,c,p){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var x=p.value;a.payload=function(){return v(x)},a.callback=function(){v2(s,c,p)}}var N=c.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(a.callback=function(){v2(s,c,p),typeof v!="function"&&(ri===null?ri=new Set([this]):ri.add(this));var R=p.stack;this.componentDidCatch(p.value,{componentStack:R!==null?R:""})})}function aB(a,s,c,p,v){if(c.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=c.alternate,s!==null&&Qs(s,c,v,!0),c=$n.current,c!==null){switch(c.tag){case 31:case 13:return ir===null?od():c.alternate===null&&Nt===0&&(Nt=3),c.flags&=-257,c.flags|=65536,c.lanes=v,p===Lf?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([p]):s.add(p),av(a,p,v)),!1;case 22:return c.flags|=65536,p===Lf?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([p]):c.add(p)),av(a,p,v)),!1}throw Error(r(435,c.tag))}return av(a,p,v),od(),!1}if(He)return s=$n.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,p!==Qm&&(a=Error(r(422),{cause:p}),Yl(tr(a,c)))):(p!==Qm&&(s=Error(r(423),{cause:p}),Yl(tr(s,c))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,p=tr(p,c),v=Ry(a.stateNode,p,v),cy(a,v),Nt!==4&&(Nt=2)),!1;var x=Error(r(520),{cause:p});if(x=tr(x,c),hc===null?hc=[x]:hc.push(x),Nt!==4&&(Nt=2),s===null)return!0;p=tr(p,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,a=v&-v,c.lanes|=a,a=Ry(c.stateNode,p,a),cy(c,a),!1;case 1:if(s=c.type,x=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ri===null||!ri.has(x))))return c.flags|=65536,v&=-v,c.lanes|=v,v=g2(v),x2(v,a,c,p),cy(c,v),!1}c=c.return}while(c!==null);return!1}var ky=Error(r(461)),zt=!1;function an(a,s,c,p){s.child=a===null?wO(s,null,c,p):Xi(s,a.child,c,p)}function b2(a,s,c,p,v){c=c.render;var x=s.ref;if("ref"in p){var N={};for(var R in p)R!=="ref"&&(N[R]=p[R])}else N=p;return Gi(s),p=my(a,s,c,N,x,v),R=yy(),a!==null&&!zt?(vy(a,s,v),da(a,s,v)):(He&&R&&Wm(s),s.flags|=1,an(a,s,p,v),s.child)}function j2(a,s,c,p,v){if(a===null){var x=c.type;return typeof x=="function"&&!Km(x)&&x.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=x,S2(a,s,x,p,v)):(a=Cf(c.type,null,p,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(x=a.child,!Uy(a,v)){var N=x.memoizedProps;if(c=c.compare,c=c!==null?c:Gl,c(N,p)&&a.ref===s.ref)return da(a,s,v)}return s.flags|=1,a=sa(x,p),a.ref=s.ref,a.return=s,s.child=a}function S2(a,s,c,p,v){if(a!==null){var x=a.memoizedProps;if(Gl(x,p)&&a.ref===s.ref)if(zt=!1,s.pendingProps=p=x,Uy(a,v))(a.flags&131072)!==0&&(zt=!0);else return s.lanes=a.lanes,da(a,s,v)}return Dy(a,s,c,p,v)}function w2(a,s,c,p){var v=p.children,x=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(x=x!==null?x.baseLanes|c:c,a!==null){for(p=s.child=a.child,v=0;p!==null;)v=v|p.lanes|p.childLanes,p=p.sibling;p=v&~x}else p=0,s.child=null;return A2(a,s,x,c,p)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&kf(s,x!==null?x.cachePool:null),x!==null?_O(s,x):fy(),TO(s);else return p=s.lanes=536870912,A2(a,s,x!==null?x.baseLanes|c:c,c,p)}else x!==null?(kf(s,x.cachePool),_O(s,x),Ja(),s.memoizedState=null):(a!==null&&kf(s,null),fy(),Ja());return an(a,s,v,c),s.child}function sc(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function A2(a,s,c,p,v){var x=iy();return x=x===null?null:{parent:Dt._currentValue,pool:x},s.memoizedState={baseLanes:c,cachePool:x},a!==null&&kf(s,null),fy(),TO(s),a!==null&&Qs(a,s,p,!0),s.childLanes=v,null}function Wf(a,s){return s=Qf({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function O2(a,s,c){return Xi(s,a.child,null,c),a=Wf(s,s.pendingProps),a.flags|=2,Bn(s),s.memoizedState=null,a}function iB(a,s,c){var p=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(He){if(p.mode==="hidden")return a=Wf(s,p),s.lanes=536870912,sc(null,a);if(hy(s),(a=vt)?(a=z_(a,ar),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ga!==null?{id:Br,overflow:Ir}:null,retryLane:536870912,hydrationErrors:null},c=lO(a),c.return=s,s.child=c,nn=s,vt=null)):a=null,a===null)throw Ka(s);return s.lanes=536870912,null}return Wf(s,p)}var x=a.memoizedState;if(x!==null){var N=x.dehydrated;if(hy(s),v)if(s.flags&256)s.flags&=-257,s=O2(a,s,c);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(zt||Qs(a,s,c,!1),v=(c&a.childLanes)!==0,zt||v){if(p=ct,p!==null&&(N=mA(p,c),N!==0&&N!==x.retryLane))throw x.retryLane=N,qi(a,N),Nn(p,a,N),ky;od(),s=O2(a,s,c)}else a=x.treeContext,vt=sr(N.nextSibling),nn=s,He=!0,Fa=null,ar=!1,a!==null&&fO(s,a),s=Wf(s,p),s.flags|=4096;return s}return a=sa(a.child,{mode:p.mode,children:p.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Zf(a,s){var c=s.ref;if(c===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(a===null||a.ref!==c)&&(s.flags|=4194816)}}function Dy(a,s,c,p,v){return Gi(s),c=my(a,s,c,p,void 0,v),p=yy(),a!==null&&!zt?(vy(a,s,v),da(a,s,v)):(He&&p&&Wm(s),s.flags|=1,an(a,s,c,v),s.child)}function _2(a,s,c,p,v,x){return Gi(s),s.updateQueue=null,c=NO(s,p,c,v),EO(a),p=yy(),a!==null&&!zt?(vy(a,s,x),da(a,s,x)):(He&&p&&Wm(s),s.flags|=1,an(a,s,c,x),s.child)}function T2(a,s,c,p,v){if(Gi(s),s.stateNode===null){var x=Ys,N=c.contextType;typeof N=="object"&&N!==null&&(x=rn(N)),x=new c(p,x),s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Py,s.stateNode=x,x._reactInternals=s,x=s.stateNode,x.props=p,x.state=s.memoizedState,x.refs={},oy(s),N=c.contextType,x.context=typeof N=="object"&&N!==null?rn(N):Ys,x.state=s.memoizedState,N=c.getDerivedStateFromProps,typeof N=="function"&&(My(s,c,N,p),x.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(N=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),N!==x.state&&Py.enqueueReplaceState(x,x.state,null),tc(s,p,x,v),ec(),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(a===null){x=s.stateNode;var R=s.memoizedProps,U=Zi(c,R);x.props=U;var Z=x.context,te=c.contextType;N=Ys,typeof te=="object"&&te!==null&&(N=rn(te));var se=c.getDerivedStateFromProps;te=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function",R=s.pendingProps!==R,te||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R||Z!==N)&&h2(s,x,p,N),Xa=!1;var J=s.memoizedState;x.state=J,tc(s,p,x,v),ec(),Z=s.memoizedState,R||J!==Z||Xa?(typeof se=="function"&&(My(s,c,se,p),Z=s.memoizedState),(U=Xa||d2(s,c,U,p,J,Z,N))?(te||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=Z),x.props=p,x.state=Z,x.context=N,p=U):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{x=s.stateNode,ly(a,s),N=s.memoizedProps,te=Zi(c,N),x.props=te,se=s.pendingProps,J=x.context,Z=c.contextType,U=Ys,typeof Z=="object"&&Z!==null&&(U=rn(Z)),R=c.getDerivedStateFromProps,(Z=typeof R=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==se||J!==U)&&h2(s,x,p,U),Xa=!1,J=s.memoizedState,x.state=J,tc(s,p,x,v),ec();var ee=s.memoizedState;N!==se||J!==ee||Xa||a!==null&&a.dependencies!==null&&Pf(a.dependencies)?(typeof R=="function"&&(My(s,c,R,p),ee=s.memoizedState),(te=Xa||d2(s,c,te,p,J,ee,U)||a!==null&&a.dependencies!==null&&Pf(a.dependencies))?(Z||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(p,ee,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(p,ee,U)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||N===a.memoizedProps&&J===a.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===a.memoizedProps&&J===a.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ee),x.props=p,x.state=ee,x.context=U,p=te):(typeof x.componentDidUpdate!="function"||N===a.memoizedProps&&J===a.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===a.memoizedProps&&J===a.memoizedState||(s.flags|=1024),p=!1)}return x=p,Zf(a,s),p=(s.flags&128)!==0,x||p?(x=s.stateNode,c=p&&typeof c.getDerivedStateFromError!="function"?null:x.render(),s.flags|=1,a!==null&&p?(s.child=Xi(s,a.child,null,v),s.child=Xi(s,null,c,v)):an(a,s,c,v),s.memoizedState=x.state,a=s.child):a=da(a,s,v),a}function E2(a,s,c,p){return Vi(),s.flags|=256,an(a,s,c,p),s.child}var Ly={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zy(a){return{baseLanes:a,cachePool:vO()}}function $y(a,s,c){return a=a!==null?a.childLanes&~c:0,s&&(a|=qn),a}function N2(a,s,c){var p=s.pendingProps,v=!1,x=(s.flags&128)!==0,N;if((N=x)||(N=a!==null&&a.memoizedState===null?!1:(Pt.current&2)!==0),N&&(v=!0,s.flags&=-129),N=(s.flags&32)!==0,s.flags&=-33,a===null){if(He){if(v?Qa(s):Ja(),(a=vt)?(a=z_(a,ar),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ga!==null?{id:Br,overflow:Ir}:null,retryLane:536870912,hydrationErrors:null},c=lO(a),c.return=s,s.child=c,nn=s,vt=null)):a=null,a===null)throw Ka(s);return bv(a)?s.lanes=32:s.lanes=536870912,null}var R=p.children;return p=p.fallback,v?(Ja(),v=s.mode,R=Qf({mode:"hidden",children:R},v),p=Ui(p,v,c,null),R.return=s,p.return=s,R.sibling=p,s.child=R,p=s.child,p.memoizedState=zy(c),p.childLanes=$y(a,N,c),s.memoizedState=Ly,sc(null,p)):(Qa(s),By(s,R))}var U=a.memoizedState;if(U!==null&&(R=U.dehydrated,R!==null)){if(x)s.flags&256?(Qa(s),s.flags&=-257,s=Iy(a,s,c)):s.memoizedState!==null?(Ja(),s.child=a.child,s.flags|=128,s=null):(Ja(),R=p.fallback,v=s.mode,p=Qf({mode:"visible",children:p.children},v),R=Ui(R,v,c,null),R.flags|=2,p.return=s,R.return=s,p.sibling=R,s.child=p,Xi(s,a.child,null,c),p=s.child,p.memoizedState=zy(c),p.childLanes=$y(a,N,c),s.memoizedState=Ly,s=sc(null,p));else if(Qa(s),bv(R)){if(N=R.nextSibling&&R.nextSibling.dataset,N)var Z=N.dgst;N=Z,p=Error(r(419)),p.stack="",p.digest=N,Yl({value:p,source:null,stack:null}),s=Iy(a,s,c)}else if(zt||Qs(a,s,c,!1),N=(c&a.childLanes)!==0,zt||N){if(N=ct,N!==null&&(p=mA(N,c),p!==0&&p!==U.retryLane))throw U.retryLane=p,qi(a,p),Nn(N,a,p),ky;xv(R)||od(),s=Iy(a,s,c)}else xv(R)?(s.flags|=192,s.child=a.child,s=null):(a=U.treeContext,vt=sr(R.nextSibling),nn=s,He=!0,Fa=null,ar=!1,a!==null&&fO(s,a),s=By(s,p.children),s.flags|=4096);return s}return v?(Ja(),R=p.fallback,v=s.mode,U=a.child,Z=U.sibling,p=sa(U,{mode:"hidden",children:p.children}),p.subtreeFlags=U.subtreeFlags&65011712,Z!==null?R=sa(Z,R):(R=Ui(R,v,c,null),R.flags|=2),R.return=s,p.return=s,p.sibling=R,s.child=p,sc(null,p),p=s.child,R=a.child.memoizedState,R===null?R=zy(c):(v=R.cachePool,v!==null?(U=Dt._currentValue,v=v.parent!==U?{parent:U,pool:U}:v):v=vO(),R={baseLanes:R.baseLanes|c,cachePool:v}),p.memoizedState=R,p.childLanes=$y(a,N,c),s.memoizedState=Ly,sc(a.child,p)):(Qa(s),c=a.child,a=c.sibling,c=sa(c,{mode:"visible",children:p.children}),c.return=s,c.sibling=null,a!==null&&(N=s.deletions,N===null?(s.deletions=[a],s.flags|=16):N.push(a)),s.child=c,s.memoizedState=null,c)}function By(a,s){return s=Qf({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function Qf(a,s){return a=zn(22,a,null,s),a.lanes=0,a}function Iy(a,s,c){return Xi(s,a.child,null,c),a=By(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function C2(a,s,c){a.lanes|=s;var p=a.alternate;p!==null&&(p.lanes|=s),ty(a.return,s,c)}function qy(a,s,c,p,v,x){var N=a.memoizedState;N===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:v,treeForkCount:x}:(N.isBackwards=s,N.rendering=null,N.renderingStartTime=0,N.last=p,N.tail=c,N.tailMode=v,N.treeForkCount=x)}function M2(a,s,c){var p=s.pendingProps,v=p.revealOrder,x=p.tail;p=p.children;var N=Pt.current,R=(N&2)!==0;if(R?(N=N&1|2,s.flags|=128):N&=1,re(Pt,N),an(a,s,p,c),p=He?Kl:0,!R&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&C2(a,c,s);else if(a.tag===19)C2(a,c,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(c=s.child,v=null;c!==null;)a=c.alternate,a!==null&&If(a)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),qy(s,!1,v,c,x,p);break;case"backwards":case"unstable_legacy-backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(a=v.alternate,a!==null&&If(a)===null){s.child=v;break}a=v.sibling,v.sibling=c,c=v,v=a}qy(s,!0,c,null,x,p);break;case"together":qy(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function da(a,s,c){if(a!==null&&(s.dependencies=a.dependencies),ni|=s.lanes,(c&s.childLanes)===0)if(a!==null){if(Qs(a,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,c=sa(a,a.pendingProps),s.child=c,c.return=s;a.sibling!==null;)a=a.sibling,c=c.sibling=sa(a,a.pendingProps),c.return=s;c.sibling=null}return s.child}function Uy(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&Pf(a)))}function sB(a,s,c){switch(s.tag){case 3:Ze(s,s.stateNode.containerInfo),Ya(s,Dt,a.memoizedState.cache),Vi();break;case 27:case 5:Ee(s);break;case 4:Ze(s,s.stateNode.containerInfo);break;case 10:Ya(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,hy(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(Qa(s),s.flags|=128,null):(c&s.child.childLanes)!==0?N2(a,s,c):(Qa(s),a=da(a,s,c),a!==null?a.sibling:null);Qa(s);break;case 19:var v=(a.flags&128)!==0;if(p=(c&s.childLanes)!==0,p||(Qs(a,s,c,!1),p=(c&s.childLanes)!==0),v){if(p)return M2(a,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),re(Pt,Pt.current),p)break;return null;case 22:return s.lanes=0,w2(a,s,c,s.pendingProps);case 24:Ya(s,Dt,a.memoizedState.cache)}return da(a,s,c)}function P2(a,s,c){if(a!==null)if(a.memoizedProps!==s.pendingProps)zt=!0;else{if(!Uy(a,c)&&(s.flags&128)===0)return zt=!1,sB(a,s,c);zt=(a.flags&131072)!==0}else zt=!1,He&&(s.flags&1048576)!==0&&uO(s,Kl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(a=Ki(s.elementType),s.type=a,typeof a=="function")Km(a)?(p=Zi(a,p),s.tag=1,s=T2(null,s,a,p,c)):(s.tag=0,s=Dy(null,s,a,p,c));else{if(a!=null){var v=a.$$typeof;if(v===C){s.tag=11,s=b2(null,s,a,p,c);break e}else if(v===M){s.tag=14,s=j2(null,s,a,p,c);break e}}throw s=X(a)||a,Error(r(306,s,""))}}return s;case 0:return Dy(a,s,s.type,s.pendingProps,c);case 1:return p=s.type,v=Zi(p,s.pendingProps),T2(a,s,p,v,c);case 3:e:{if(Ze(s,s.stateNode.containerInfo),a===null)throw Error(r(387));p=s.pendingProps;var x=s.memoizedState;v=x.element,ly(a,s),tc(s,p,null,c);var N=s.memoizedState;if(p=N.cache,Ya(s,Dt,p),p!==x.cache&&ny(s,[Dt],c,!0),ec(),p=N.element,x.isDehydrated)if(x={element:p,isDehydrated:!1,cache:N.cache},s.updateQueue.baseState=x,s.memoizedState=x,s.flags&256){s=E2(a,s,p,c);break e}else if(p!==v){v=tr(Error(r(424)),s),Yl(v),s=E2(a,s,p,c);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(vt=sr(a.firstChild),nn=s,He=!0,Fa=null,ar=!0,c=wO(s,null,p,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Vi(),p===v){s=da(a,s,c);break e}an(a,s,p,c)}s=s.child}return s;case 26:return Zf(a,s),a===null?(c=V_(s.type,null,s.pendingProps,null))?s.memoizedState=c:He||(c=s.type,a=s.pendingProps,p=pd(we.current).createElement(c),p[tn]=s,p[wn]=a,sn(p,c,a),Wt(p),s.stateNode=p):s.memoizedState=V_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return Ee(s),a===null&&He&&(p=s.stateNode=I_(s.type,s.pendingProps,we.current),nn=s,ar=!0,v=vt,oi(s.type)?(jv=v,vt=sr(p.firstChild)):vt=v),an(a,s,s.pendingProps.children,c),Zf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&He&&((v=p=vt)&&(p=LB(p,s.type,s.pendingProps,ar),p!==null?(s.stateNode=p,nn=s,vt=sr(p.firstChild),ar=!1,v=!0):v=!1),v||Ka(s)),Ee(s),v=s.type,x=s.pendingProps,N=a!==null?a.memoizedProps:null,p=x.children,yv(v,x)?p=null:N!==null&&yv(v,N)&&(s.flags|=32),s.memoizedState!==null&&(v=my(a,s,Z6,null,null,c),jc._currentValue=v),Zf(a,s),an(a,s,p,c),s.child;case 6:return a===null&&He&&((a=c=vt)&&(c=zB(c,s.pendingProps,ar),c!==null?(s.stateNode=c,nn=s,vt=null,a=!0):a=!1),a||Ka(s)),null;case 13:return N2(a,s,c);case 4:return Ze(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=Xi(s,null,p,c):an(a,s,p,c),s.child;case 11:return b2(a,s,s.type,s.pendingProps,c);case 7:return an(a,s,s.pendingProps,c),s.child;case 8:return an(a,s,s.pendingProps.children,c),s.child;case 12:return an(a,s,s.pendingProps.children,c),s.child;case 10:return p=s.pendingProps,Ya(s,s.type,p.value),an(a,s,p.children,c),s.child;case 9:return v=s.type._context,p=s.pendingProps.children,Gi(s),v=rn(v),p=p(v),s.flags|=1,an(a,s,p,c),s.child;case 14:return j2(a,s,s.type,s.pendingProps,c);case 15:return S2(a,s,s.type,s.pendingProps,c);case 19:return M2(a,s,c);case 31:return iB(a,s,c);case 22:return w2(a,s,c,s.pendingProps);case 24:return Gi(s),p=rn(Dt),a===null?(v=iy(),v===null&&(v=ct,x=ry(),v.pooledCache=x,x.refCount++,x!==null&&(v.pooledCacheLanes|=c),v=x),s.memoizedState={parent:p,cache:v},oy(s),Ya(s,Dt,v)):((a.lanes&c)!==0&&(ly(a,s),tc(s,null,null,c),ec()),v=a.memoizedState,x=s.memoizedState,v.parent!==p?(v={parent:p,cache:p},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),Ya(s,Dt,p)):(p=x.cache,Ya(s,Dt,p),p!==v.cache&&ny(s,[Dt],c,!0))),an(a,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function ha(a){a.flags|=4}function Vy(a,s,c,p,v){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(i_())a.flags|=8192;else throw Yi=Lf,sy}else a.flags&=-16777217}function R2(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!Y_(s))if(i_())a.flags|=8192;else throw Yi=Lf,sy}function Jf(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?dA():536870912,a.lanes|=s,uo|=s)}function oc(a,s){if(!He)switch(a.tailMode){case"hidden":s=a.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?a.tail=null:c.sibling=null;break;case"collapsed":c=a.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function gt(a){var s=a.alternate!==null&&a.alternate.child===a.child,c=0,p=0;if(s)for(var v=a.child;v!==null;)c|=v.lanes|v.childLanes,p|=v.subtreeFlags&65011712,p|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)c|=v.lanes|v.childLanes,p|=v.subtreeFlags,p|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=p,a.childLanes=c,s}function oB(a,s,c){var p=s.pendingProps;switch(Zm(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(s),null;case 1:return gt(s),null;case 3:return c=s.stateNode,p=null,a!==null&&(p=a.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),ca(Dt),ue(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(a===null||a.child===null)&&(Zs(s)?ha(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Jm())),gt(s),null;case 26:var v=s.type,x=s.memoizedState;return a===null?(ha(s),x!==null?(gt(s),R2(s,x)):(gt(s),Vy(s,v,null,p,c))):x?x!==a.memoizedState?(ha(s),gt(s),R2(s,x)):(gt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==p&&ha(s),gt(s),Vy(s,v,a,p,c)),null;case 27:if(Ce(s),c=we.current,v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&ha(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return gt(s),null}a=fe.current,Zs(s)?dO(s):(a=I_(v,p,c),s.stateNode=a,ha(s))}return gt(s),null;case 5:if(Ce(s),v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&ha(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return gt(s),null}if(x=fe.current,Zs(s))dO(s);else{var N=pd(we.current);switch(x){case 1:x=N.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:x=N.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":x=N.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":x=N.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":x=N.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof p.is=="string"?N.createElement("select",{is:p.is}):N.createElement("select"),p.multiple?x.multiple=!0:p.size&&(x.size=p.size);break;default:x=typeof p.is=="string"?N.createElement(v,{is:p.is}):N.createElement(v)}}x[tn]=s,x[wn]=p;e:for(N=s.child;N!==null;){if(N.tag===5||N.tag===6)x.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===s)break e;for(;N.sibling===null;){if(N.return===null||N.return===s)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}s.stateNode=x;e:switch(sn(x,v,p),v){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&ha(s)}}return gt(s),Vy(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,c),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==p&&ha(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(a=we.current,Zs(s)){if(a=s.stateNode,c=s.memoizedProps,p=null,v=nn,v!==null)switch(v.tag){case 27:case 5:p=v.memoizedProps}a[tn]=s,a=!!(a.nodeValue===c||p!==null&&p.suppressHydrationWarning===!0||N_(a.nodeValue,c)),a||Ka(s,!0)}else a=pd(a).createTextNode(p),a[tn]=s,s.stateNode=a}return gt(s),null;case 31:if(c=s.memoizedState,a===null||a.memoizedState!==null){if(p=Zs(s),c!==null){if(a===null){if(!p)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[tn]=s}else Vi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;gt(s),a=!1}else c=Jm(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=c),a=!0;if(!a)return s.flags&256?(Bn(s),s):(Bn(s),null);if((s.flags&128)!==0)throw Error(r(558))}return gt(s),null;case 13:if(p=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=Zs(s),p!==null&&p.dehydrated!==null){if(a===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[tn]=s}else Vi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;gt(s),v=!1}else v=Jm(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Bn(s),s):(Bn(s),null)}return Bn(s),(s.flags&128)!==0?(s.lanes=c,s):(c=p!==null,a=a!==null&&a.memoizedState!==null,c&&(p=s.child,v=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(v=p.alternate.memoizedState.cachePool.pool),x=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(x=p.memoizedState.cachePool.pool),x!==v&&(p.flags|=2048)),c!==a&&c&&(s.child.flags|=8192),Jf(s,s.updateQueue),gt(s),null);case 4:return ue(),a===null&&fv(s.stateNode.containerInfo),gt(s),null;case 10:return ca(s.type),gt(s),null;case 19:if(G(Pt),p=s.memoizedState,p===null)return gt(s),null;if(v=(s.flags&128)!==0,x=p.rendering,x===null)if(v)oc(p,!1);else{if(Nt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(x=If(a),x!==null){for(s.flags|=128,oc(p,!1),a=x.updateQueue,s.updateQueue=a,Jf(s,a),s.subtreeFlags=0,a=c,c=s.child;c!==null;)oO(c,a),c=c.sibling;return re(Pt,Pt.current&1|2),He&&oa(s,p.treeForkCount),s.child}a=a.sibling}p.tail!==null&&dn()>ad&&(s.flags|=128,v=!0,oc(p,!1),s.lanes=4194304)}else{if(!v)if(a=If(x),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,Jf(s,a),oc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!He)return gt(s),null}else 2*dn()-p.renderingStartTime>ad&&c!==536870912&&(s.flags|=128,v=!0,oc(p,!1),s.lanes=4194304);p.isBackwards?(x.sibling=s.child,s.child=x):(a=p.last,a!==null?a.sibling=x:s.child=x,p.last=x)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=dn(),a.sibling=null,c=Pt.current,re(Pt,v?c&1|2:c&1),He&&oa(s,p.treeForkCount),a):(gt(s),null);case 22:case 23:return Bn(s),dy(),p=s.memoizedState!==null,a!==null?a.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(c&536870912)!==0&&(s.flags&128)===0&&(gt(s),s.subtreeFlags&6&&(s.flags|=8192)):gt(s),c=s.updateQueue,c!==null&&Jf(s,c.retryQueue),c=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==c&&(s.flags|=2048),a!==null&&G(Fi),null;case 24:return c=null,a!==null&&(c=a.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),ca(Dt),gt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function lB(a,s){switch(Zm(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return ca(Dt),ue(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return Ce(s),null;case 31:if(s.memoizedState!==null){if(Bn(s),s.alternate===null)throw Error(r(340));Vi()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Bn(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Vi()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return G(Pt),null;case 4:return ue(),null;case 10:return ca(s.type),null;case 22:case 23:return Bn(s),dy(),a!==null&&G(Fi),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return ca(Dt),null;case 25:return null;default:return null}}function k2(a,s){switch(Zm(s),s.tag){case 3:ca(Dt),ue();break;case 26:case 27:case 5:Ce(s);break;case 4:ue();break;case 31:s.memoizedState!==null&&Bn(s);break;case 13:Bn(s);break;case 19:G(Pt);break;case 10:ca(s.type);break;case 22:case 23:Bn(s),dy(),a!==null&&G(Fi);break;case 24:ca(Dt)}}function lc(a,s){try{var c=s.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var v=p.next;c=v;do{if((c.tag&a)===a){p=void 0;var x=c.create,N=c.inst;p=x(),N.destroy=p}c=c.next}while(c!==v)}}catch(R){nt(s,s.return,R)}}function ei(a,s,c){try{var p=s.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var x=v.next;p=x;do{if((p.tag&a)===a){var N=p.inst,R=N.destroy;if(R!==void 0){N.destroy=void 0,v=s;var U=c,Z=R;try{Z()}catch(te){nt(v,U,te)}}}p=p.next}while(p!==x)}}catch(te){nt(s,s.return,te)}}function D2(a){var s=a.updateQueue;if(s!==null){var c=a.stateNode;try{OO(s,c)}catch(p){nt(a,a.return,p)}}}function L2(a,s,c){c.props=Zi(a.type,a.memoizedProps),c.state=a.memoizedState;try{c.componentWillUnmount()}catch(p){nt(a,s,p)}}function cc(a,s){try{var c=a.ref;if(c!==null){switch(a.tag){case 26:case 27:case 5:var p=a.stateNode;break;case 30:p=a.stateNode;break;default:p=a.stateNode}typeof c=="function"?a.refCleanup=c(p):c.current=p}}catch(v){nt(a,s,v)}}function qr(a,s){var c=a.ref,p=a.refCleanup;if(c!==null)if(typeof p=="function")try{p()}catch(v){nt(a,s,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){nt(a,s,v)}else c.current=null}function z2(a){var s=a.type,c=a.memoizedProps,p=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&p.focus();break e;case"img":c.src?p.src=c.src:c.srcSet&&(p.srcset=c.srcSet)}}catch(v){nt(a,a.return,v)}}function Hy(a,s,c){try{var p=a.stateNode;CB(p,a.type,c,s),p[wn]=s}catch(v){nt(a,a.return,v)}}function $2(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&oi(a.type)||a.tag===4}function Gy(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||$2(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&oi(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Fy(a,s,c){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(a,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(a),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=aa));else if(p!==4&&(p===27&&oi(a.type)&&(c=a.stateNode,s=null),a=a.child,a!==null))for(Fy(a,s,c),a=a.sibling;a!==null;)Fy(a,s,c),a=a.sibling}function ed(a,s,c){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?c.insertBefore(a,s):c.appendChild(a);else if(p!==4&&(p===27&&oi(a.type)&&(c=a.stateNode),a=a.child,a!==null))for(ed(a,s,c),a=a.sibling;a!==null;)ed(a,s,c),a=a.sibling}function B2(a){var s=a.stateNode,c=a.memoizedProps;try{for(var p=a.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);sn(s,p,c),s[tn]=a,s[wn]=c}catch(x){nt(a,a.return,x)}}var pa=!1,$t=!1,Ky=!1,I2=typeof WeakSet=="function"?WeakSet:Set,Zt=null;function cB(a,s){if(a=a.containerInfo,pv=jd,a=QA(a),Im(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else e:{c=(c=a.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var v=p.anchorOffset,x=p.focusNode;p=p.focusOffset;try{c.nodeType,x.nodeType}catch{c=null;break e}var N=0,R=-1,U=-1,Z=0,te=0,se=a,J=null;t:for(;;){for(var ee;se!==c||v!==0&&se.nodeType!==3||(R=N+v),se!==x||p!==0&&se.nodeType!==3||(U=N+p),se.nodeType===3&&(N+=se.nodeValue.length),(ee=se.firstChild)!==null;)J=se,se=ee;for(;;){if(se===a)break t;if(J===c&&++Z===v&&(R=N),J===x&&++te===p&&(U=N),(ee=se.nextSibling)!==null)break;se=J,J=se.parentNode}se=ee}c=R===-1||U===-1?null:{start:R,end:U}}else c=null}c=c||{start:0,end:0}}else c=null;for(mv={focusedElem:a,selectionRange:c},jd=!1,Zt=s;Zt!==null;)if(s=Zt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Zt=a;else for(;Zt!==null;){switch(s=Zt,x=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(c=0;c<a.length;c++)v=a[c],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&x!==null){a=void 0,c=s,v=x.memoizedProps,x=x.memoizedState,p=c.stateNode;try{var ge=Zi(c.type,v);a=p.getSnapshotBeforeUpdate(ge,x),p.__reactInternalSnapshotBeforeUpdate=a}catch(Ae){nt(c,c.return,Ae)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,c=a.nodeType,c===9)gv(a);else if(c===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":gv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,Zt=a;break}Zt=s.return}}function q2(a,s,c){var p=c.flags;switch(c.tag){case 0:case 11:case 15:ya(a,c),p&4&&lc(5,c);break;case 1:if(ya(a,c),p&4)if(a=c.stateNode,s===null)try{a.componentDidMount()}catch(N){nt(c,c.return,N)}else{var v=Zi(c.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(v,s,a.__reactInternalSnapshotBeforeUpdate)}catch(N){nt(c,c.return,N)}}p&64&&D2(c),p&512&&cc(c,c.return);break;case 3:if(ya(a,c),p&64&&(a=c.updateQueue,a!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{OO(a,s)}catch(N){nt(c,c.return,N)}}break;case 27:s===null&&p&4&&B2(c);case 26:case 5:ya(a,c),s===null&&p&4&&z2(c),p&512&&cc(c,c.return);break;case 12:ya(a,c);break;case 31:ya(a,c),p&4&&H2(a,c);break;case 13:ya(a,c),p&4&&G2(a,c),p&64&&(a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(c=gB.bind(null,c),$B(a,c))));break;case 22:if(p=c.memoizedState!==null||pa,!p){s=s!==null&&s.memoizedState!==null||$t,v=pa;var x=$t;pa=p,($t=s)&&!x?va(a,c,(c.subtreeFlags&8772)!==0):ya(a,c),pa=v,$t=x}break;case 30:break;default:ya(a,c)}}function U2(a){var s=a.alternate;s!==null&&(a.alternate=null,U2(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&wm(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var St=null,On=!1;function ma(a,s,c){for(c=c.child;c!==null;)V2(a,s,c),c=c.sibling}function V2(a,s,c){if(kn&&typeof kn.onCommitFiberUnmount=="function")try{kn.onCommitFiberUnmount(Rl,c)}catch{}switch(c.tag){case 26:$t||qr(c,s),ma(a,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:$t||qr(c,s);var p=St,v=On;oi(c.type)&&(St=c.stateNode,On=!1),ma(a,s,c),gc(c.stateNode),St=p,On=v;break;case 5:$t||qr(c,s);case 6:if(p=St,v=On,St=null,ma(a,s,c),St=p,On=v,St!==null)if(On)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(c.stateNode)}catch(x){nt(c,s,x)}else try{St.removeChild(c.stateNode)}catch(x){nt(c,s,x)}break;case 18:St!==null&&(On?(a=St,D_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,c.stateNode),xo(a)):D_(St,c.stateNode));break;case 4:p=St,v=On,St=c.stateNode.containerInfo,On=!0,ma(a,s,c),St=p,On=v;break;case 0:case 11:case 14:case 15:ei(2,c,s),$t||ei(4,c,s),ma(a,s,c);break;case 1:$t||(qr(c,s),p=c.stateNode,typeof p.componentWillUnmount=="function"&&L2(c,s,p)),ma(a,s,c);break;case 21:ma(a,s,c);break;case 22:$t=(p=$t)||c.memoizedState!==null,ma(a,s,c),$t=p;break;default:ma(a,s,c)}}function H2(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{xo(a)}catch(c){nt(s,s.return,c)}}}function G2(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{xo(a)}catch(c){nt(s,s.return,c)}}function uB(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new I2),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new I2),s;default:throw Error(r(435,a.tag))}}function td(a,s){var c=uB(a);s.forEach(function(p){if(!c.has(p)){c.add(p);var v=xB.bind(null,a,p);p.then(v,v)}})}function _n(a,s){var c=s.deletions;if(c!==null)for(var p=0;p<c.length;p++){var v=c[p],x=a,N=s,R=N;e:for(;R!==null;){switch(R.tag){case 27:if(oi(R.type)){St=R.stateNode,On=!1;break e}break;case 5:St=R.stateNode,On=!1;break e;case 3:case 4:St=R.stateNode.containerInfo,On=!0;break e}R=R.return}if(St===null)throw Error(r(160));V2(x,N,v),St=null,On=!1,x=v.alternate,x!==null&&(x.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)F2(s,a),s=s.sibling}var jr=null;function F2(a,s){var c=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:_n(s,a),Tn(a),p&4&&(ei(3,a,a.return),lc(3,a),ei(5,a,a.return));break;case 1:_n(s,a),Tn(a),p&512&&($t||c===null||qr(c,c.return)),p&64&&pa&&(a=a.updateQueue,a!==null&&(p=a.callbacks,p!==null&&(c=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=c===null?p:c.concat(p))));break;case 26:var v=jr;if(_n(s,a),Tn(a),p&512&&($t||c===null||qr(c,c.return)),p&4){var x=c!==null?c.memoizedState:null;if(p=a.memoizedState,c===null)if(p===null)if(a.stateNode===null){e:{p=a.type,c=a.memoizedProps,v=v.ownerDocument||v;t:switch(p){case"title":x=v.getElementsByTagName("title")[0],(!x||x[Ll]||x[tn]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=v.createElement(p),v.head.insertBefore(x,v.querySelector("head > title"))),sn(x,p,c),x[tn]=a,Wt(x),p=x;break e;case"link":var N=F_("link","href",v).get(p+(c.href||""));if(N){for(var R=0;R<N.length;R++)if(x=N[R],x.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&x.getAttribute("rel")===(c.rel==null?null:c.rel)&&x.getAttribute("title")===(c.title==null?null:c.title)&&x.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){N.splice(R,1);break t}}x=v.createElement(p),sn(x,p,c),v.head.appendChild(x);break;case"meta":if(N=F_("meta","content",v).get(p+(c.content||""))){for(R=0;R<N.length;R++)if(x=N[R],x.getAttribute("content")===(c.content==null?null:""+c.content)&&x.getAttribute("name")===(c.name==null?null:c.name)&&x.getAttribute("property")===(c.property==null?null:c.property)&&x.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&x.getAttribute("charset")===(c.charSet==null?null:c.charSet)){N.splice(R,1);break t}}x=v.createElement(p),sn(x,p,c),v.head.appendChild(x);break;default:throw Error(r(468,p))}x[tn]=a,Wt(x),p=x}a.stateNode=p}else K_(v,a.type,a.stateNode);else a.stateNode=G_(v,p,a.memoizedProps);else x!==p?(x===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):x.count--,p===null?K_(v,a.type,a.stateNode):G_(v,p,a.memoizedProps)):p===null&&a.stateNode!==null&&Hy(a,a.memoizedProps,c.memoizedProps)}break;case 27:_n(s,a),Tn(a),p&512&&($t||c===null||qr(c,c.return)),c!==null&&p&4&&Hy(a,a.memoizedProps,c.memoizedProps);break;case 5:if(_n(s,a),Tn(a),p&512&&($t||c===null||qr(c,c.return)),a.flags&32){v=a.stateNode;try{qs(v,"")}catch(ge){nt(a,a.return,ge)}}p&4&&a.stateNode!=null&&(v=a.memoizedProps,Hy(a,v,c!==null?c.memoizedProps:v)),p&1024&&(Ky=!0);break;case 6:if(_n(s,a),Tn(a),p&4){if(a.stateNode===null)throw Error(r(162));p=a.memoizedProps,c=a.stateNode;try{c.nodeValue=p}catch(ge){nt(a,a.return,ge)}}break;case 3:if(vd=null,v=jr,jr=md(s.containerInfo),_n(s,a),jr=v,Tn(a),p&4&&c!==null&&c.memoizedState.isDehydrated)try{xo(s.containerInfo)}catch(ge){nt(a,a.return,ge)}Ky&&(Ky=!1,K2(a));break;case 4:p=jr,jr=md(a.stateNode.containerInfo),_n(s,a),Tn(a),jr=p;break;case 12:_n(s,a),Tn(a);break;case 31:_n(s,a),Tn(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,td(a,p)));break;case 13:_n(s,a),Tn(a),a.child.flags&8192&&a.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(rd=dn()),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,td(a,p)));break;case 22:v=a.memoizedState!==null;var U=c!==null&&c.memoizedState!==null,Z=pa,te=$t;if(pa=Z||v,$t=te||U,_n(s,a),$t=te,pa=Z,Tn(a),p&8192)e:for(s=a.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(c===null||U||pa||$t||Qi(a)),c=null,s=a;;){if(s.tag===5||s.tag===26){if(c===null){U=c=s;try{if(x=U.stateNode,v)N=x.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{R=U.stateNode;var se=U.memoizedProps.style,J=se!=null&&se.hasOwnProperty("display")?se.display:null;R.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(ge){nt(U,U.return,ge)}}}else if(s.tag===6){if(c===null){U=s;try{U.stateNode.nodeValue=v?"":U.memoizedProps}catch(ge){nt(U,U.return,ge)}}}else if(s.tag===18){if(c===null){U=s;try{var ee=U.stateNode;v?L_(ee,!0):L_(U.stateNode,!1)}catch(ge){nt(U,U.return,ge)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=a.updateQueue,p!==null&&(c=p.retryQueue,c!==null&&(p.retryQueue=null,td(a,c))));break;case 19:_n(s,a),Tn(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,td(a,p)));break;case 30:break;case 21:break;default:_n(s,a),Tn(a)}}function Tn(a){var s=a.flags;if(s&2){try{for(var c,p=a.return;p!==null;){if($2(p)){c=p;break}p=p.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var v=c.stateNode,x=Gy(a);ed(a,x,v);break;case 5:var N=c.stateNode;c.flags&32&&(qs(N,""),c.flags&=-33);var R=Gy(a);ed(a,R,N);break;case 3:case 4:var U=c.stateNode.containerInfo,Z=Gy(a);Fy(a,Z,U);break;default:throw Error(r(161))}}catch(te){nt(a,a.return,te)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function K2(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;K2(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function ya(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)q2(a,s.alternate,s),s=s.sibling}function Qi(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:ei(4,s,s.return),Qi(s);break;case 1:qr(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&L2(s,s.return,c),Qi(s);break;case 27:gc(s.stateNode);case 26:case 5:qr(s,s.return),Qi(s);break;case 22:s.memoizedState===null&&Qi(s);break;case 30:Qi(s);break;default:Qi(s)}a=a.sibling}}function va(a,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,v=a,x=s,N=x.flags;switch(x.tag){case 0:case 11:case 15:va(v,x,c),lc(4,x);break;case 1:if(va(v,x,c),p=x,v=p.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Z){nt(p,p.return,Z)}if(p=x,v=p.updateQueue,v!==null){var R=p.stateNode;try{var U=v.shared.hiddenCallbacks;if(U!==null)for(v.shared.hiddenCallbacks=null,v=0;v<U.length;v++)AO(U[v],R)}catch(Z){nt(p,p.return,Z)}}c&&N&64&&D2(x),cc(x,x.return);break;case 27:B2(x);case 26:case 5:va(v,x,c),c&&p===null&&N&4&&z2(x),cc(x,x.return);break;case 12:va(v,x,c);break;case 31:va(v,x,c),c&&N&4&&H2(v,x);break;case 13:va(v,x,c),c&&N&4&&G2(v,x);break;case 22:x.memoizedState===null&&va(v,x,c),cc(x,x.return);break;case 30:break;default:va(v,x,c)}s=s.sibling}}function Yy(a,s){var c=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==c&&(a!=null&&a.refCount++,c!=null&&Xl(c))}function Xy(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Xl(a))}function Sr(a,s,c,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Y2(a,s,c,p),s=s.sibling}function Y2(a,s,c,p){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Sr(a,s,c,p),v&2048&&lc(9,s);break;case 1:Sr(a,s,c,p);break;case 3:Sr(a,s,c,p),v&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Xl(a)));break;case 12:if(v&2048){Sr(a,s,c,p),a=s.stateNode;try{var x=s.memoizedProps,N=x.id,R=x.onPostCommit;typeof R=="function"&&R(N,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(U){nt(s,s.return,U)}}else Sr(a,s,c,p);break;case 31:Sr(a,s,c,p);break;case 13:Sr(a,s,c,p);break;case 23:break;case 22:x=s.stateNode,N=s.alternate,s.memoizedState!==null?x._visibility&2?Sr(a,s,c,p):uc(a,s):x._visibility&2?Sr(a,s,c,p):(x._visibility|=2,oo(a,s,c,p,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Yy(N,s);break;case 24:Sr(a,s,c,p),v&2048&&Xy(s.alternate,s);break;default:Sr(a,s,c,p)}}function oo(a,s,c,p,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var x=a,N=s,R=c,U=p,Z=N.flags;switch(N.tag){case 0:case 11:case 15:oo(x,N,R,U,v),lc(8,N);break;case 23:break;case 22:var te=N.stateNode;N.memoizedState!==null?te._visibility&2?oo(x,N,R,U,v):uc(x,N):(te._visibility|=2,oo(x,N,R,U,v)),v&&Z&2048&&Yy(N.alternate,N);break;case 24:oo(x,N,R,U,v),v&&Z&2048&&Xy(N.alternate,N);break;default:oo(x,N,R,U,v)}s=s.sibling}}function uc(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=a,p=s,v=p.flags;switch(p.tag){case 22:uc(c,p),v&2048&&Yy(p.alternate,p);break;case 24:uc(c,p),v&2048&&Xy(p.alternate,p);break;default:uc(c,p)}s=s.sibling}}var fc=8192;function lo(a,s,c){if(a.subtreeFlags&fc)for(a=a.child;a!==null;)X2(a,s,c),a=a.sibling}function X2(a,s,c){switch(a.tag){case 26:lo(a,s,c),a.flags&fc&&a.memoizedState!==null&&WB(c,jr,a.memoizedState,a.memoizedProps);break;case 5:lo(a,s,c);break;case 3:case 4:var p=jr;jr=md(a.stateNode.containerInfo),lo(a,s,c),jr=p;break;case 22:a.memoizedState===null&&(p=a.alternate,p!==null&&p.memoizedState!==null?(p=fc,fc=16777216,lo(a,s,c),fc=p):lo(a,s,c));break;default:lo(a,s,c)}}function W2(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function dc(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var p=s[c];Zt=p,Q2(p,a)}W2(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Z2(a),a=a.sibling}function Z2(a){switch(a.tag){case 0:case 11:case 15:dc(a),a.flags&2048&&ei(9,a,a.return);break;case 3:dc(a);break;case 12:dc(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,nd(a)):dc(a);break;default:dc(a)}}function nd(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var p=s[c];Zt=p,Q2(p,a)}W2(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:ei(8,s,s.return),nd(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,nd(s));break;default:nd(s)}a=a.sibling}}function Q2(a,s){for(;Zt!==null;){var c=Zt;switch(c.tag){case 0:case 11:case 15:ei(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var p=c.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Xl(c.memoizedState.cache)}if(p=c.child,p!==null)p.return=c,Zt=p;else e:for(c=a;Zt!==null;){p=Zt;var v=p.sibling,x=p.return;if(U2(p),p===c){Zt=null;break e}if(v!==null){v.return=x,Zt=v;break e}Zt=x}}}var fB={getCacheForType:function(a){var s=rn(Dt),c=s.data.get(a);return c===void 0&&(c=a(),s.data.set(a,c)),c},cacheSignal:function(){return rn(Dt).controller.signal}},dB=typeof WeakMap=="function"?WeakMap:Map,Xe=0,ct=null,$e=null,qe=0,tt=0,In=null,ti=!1,co=!1,Wy=!1,ga=0,Nt=0,ni=0,Ji=0,Zy=0,qn=0,uo=0,hc=null,En=null,Qy=!1,rd=0,J2=0,ad=1/0,id=null,ri=null,Ut=0,ai=null,fo=null,xa=0,Jy=0,ev=null,e_=null,pc=0,tv=null;function Un(){return(Xe&2)!==0&&qe!==0?qe&-qe:L.T!==null?ov():yA()}function t_(){if(qn===0)if((qe&536870912)===0||He){var a=hf;hf<<=1,(hf&3932160)===0&&(hf=262144),qn=a}else qn=536870912;return a=$n.current,a!==null&&(a.flags|=32),qn}function Nn(a,s,c){(a===ct&&(tt===2||tt===9)||a.cancelPendingCommit!==null)&&(ho(a,0),ii(a,qe,qn,!1)),Dl(a,c),((Xe&2)===0||a!==ct)&&(a===ct&&((Xe&2)===0&&(Ji|=c),Nt===4&&ii(a,qe,qn,!1)),Ur(a))}function n_(a,s,c){if((Xe&6)!==0)throw Error(r(327));var p=!c&&(s&127)===0&&(s&a.expiredLanes)===0||kl(a,s),v=p?mB(a,s):rv(a,s,!0),x=p;do{if(v===0){co&&!p&&ii(a,s,0,!1);break}else{if(c=a.current.alternate,x&&!hB(c)){v=rv(a,s,!1),x=!1;continue}if(v===2){if(x=s,a.errorRecoveryDisabledLanes&x)var N=0;else N=a.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){s=N;e:{var R=a;v=hc;var U=R.current.memoizedState.isDehydrated;if(U&&(ho(R,N).flags|=256),N=rv(R,N,!1),N!==2){if(Wy&&!U){R.errorRecoveryDisabledLanes|=x,Ji|=x,v=4;break e}x=En,En=v,x!==null&&(En===null?En=x:En.push.apply(En,x))}v=N}if(x=!1,v!==2)continue}}if(v===1){ho(a,0),ii(a,s,0,!0);break}e:{switch(p=a,x=v,x){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:ii(p,s,qn,!ti);break e;case 2:En=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=rd+300-dn(),10<v)){if(ii(p,s,qn,!ti),mf(p,0,!0)!==0)break e;xa=s,p.timeoutHandle=R_(r_.bind(null,p,c,En,id,Qy,s,qn,Ji,uo,ti,x,"Throttled",-0,0),v);break e}r_(p,c,En,id,Qy,s,qn,Ji,uo,ti,x,null,-0,0)}}break}while(!0);Ur(a)}function r_(a,s,c,p,v,x,N,R,U,Z,te,se,J,ee){if(a.timeoutHandle=-1,se=s.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:aa},X2(s,x,se);var ge=(x&62914560)===x?rd-dn():(x&4194048)===x?J2-dn():0;if(ge=ZB(se,ge),ge!==null){xa=x,a.cancelPendingCommit=ge(f_.bind(null,a,s,x,c,p,v,N,R,U,te,se,null,J,ee)),ii(a,x,N,!Z);return}}f_(a,s,x,c,p,v,N,R,U)}function hB(a){for(var s=a;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var p=0;p<c.length;p++){var v=c[p],x=v.getSnapshot;v=v.value;try{if(!Ln(x(),v))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ii(a,s,c,p){s&=~Zy,s&=~Ji,a.suspendedLanes|=s,a.pingedLanes&=~s,p&&(a.warmLanes|=s),p=a.expirationTimes;for(var v=s;0<v;){var x=31-Dn(v),N=1<<x;p[x]=-1,v&=~N}c!==0&&hA(a,c,s)}function sd(){return(Xe&6)===0?(mc(0),!1):!0}function nv(){if($e!==null){if(tt===0)var a=$e.return;else a=$e,la=Hi=null,gy(a),no=null,Zl=0,a=$e;for(;a!==null;)k2(a.alternate,a),a=a.return;$e=null}}function ho(a,s){var c=a.timeoutHandle;c!==-1&&(a.timeoutHandle=-1,RB(c)),c=a.cancelPendingCommit,c!==null&&(a.cancelPendingCommit=null,c()),xa=0,nv(),ct=a,$e=c=sa(a.current,null),qe=s,tt=0,In=null,ti=!1,co=kl(a,s),Wy=!1,uo=qn=Zy=Ji=ni=Nt=0,En=hc=null,Qy=!1,(s&8)!==0&&(s|=s&32);var p=a.entangledLanes;if(p!==0)for(a=a.entanglements,p&=s;0<p;){var v=31-Dn(p),x=1<<v;s|=a[v],p&=~x}return ga=s,Tf(),c}function a_(a,s){Re=null,L.H=ic,s===to||s===Df?(s=bO(),tt=3):s===sy?(s=bO(),tt=4):tt=s===ky?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,In=s,$e===null&&(Nt=1,Xf(a,tr(s,a.current)))}function i_(){var a=$n.current;return a===null?!0:(qe&4194048)===qe?ir===null:(qe&62914560)===qe||(qe&536870912)!==0?a===ir:!1}function s_(){var a=L.H;return L.H=ic,a===null?ic:a}function o_(){var a=L.A;return L.A=fB,a}function od(){Nt=4,ti||(qe&4194048)!==qe&&$n.current!==null||(co=!0),(ni&134217727)===0&&(Ji&134217727)===0||ct===null||ii(ct,qe,qn,!1)}function rv(a,s,c){var p=Xe;Xe|=2;var v=s_(),x=o_();(ct!==a||qe!==s)&&(id=null,ho(a,s)),s=!1;var N=Nt;e:do try{if(tt!==0&&$e!==null){var R=$e,U=In;switch(tt){case 8:nv(),N=6;break e;case 3:case 2:case 9:case 6:$n.current===null&&(s=!0);var Z=tt;if(tt=0,In=null,po(a,R,U,Z),c&&co){N=0;break e}break;default:Z=tt,tt=0,In=null,po(a,R,U,Z)}}pB(),N=Nt;break}catch(te){a_(a,te)}while(!0);return s&&a.shellSuspendCounter++,la=Hi=null,Xe=p,L.H=v,L.A=x,$e===null&&(ct=null,qe=0,Tf()),N}function pB(){for(;$e!==null;)l_($e)}function mB(a,s){var c=Xe;Xe|=2;var p=s_(),v=o_();ct!==a||qe!==s?(id=null,ad=dn()+500,ho(a,s)):co=kl(a,s);e:do try{if(tt!==0&&$e!==null){s=$e;var x=In;t:switch(tt){case 1:tt=0,In=null,po(a,s,x,1);break;case 2:case 9:if(gO(x)){tt=0,In=null,c_(s);break}s=function(){tt!==2&&tt!==9||ct!==a||(tt=7),Ur(a)},x.then(s,s);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:gO(x)?(tt=0,In=null,c_(s)):(tt=0,In=null,po(a,s,x,7));break;case 5:var N=null;switch($e.tag){case 26:N=$e.memoizedState;case 5:case 27:var R=$e;if(N?Y_(N):R.stateNode.complete){tt=0,In=null;var U=R.sibling;if(U!==null)$e=U;else{var Z=R.return;Z!==null?($e=Z,ld(Z)):$e=null}break t}}tt=0,In=null,po(a,s,x,5);break;case 6:tt=0,In=null,po(a,s,x,6);break;case 8:nv(),Nt=6;break e;default:throw Error(r(462))}}yB();break}catch(te){a_(a,te)}while(!0);return la=Hi=null,L.H=p,L.A=v,Xe=c,$e!==null?0:(ct=null,qe=0,Tf(),Nt)}function yB(){for(;$e!==null&&!na();)l_($e)}function l_(a){var s=P2(a.alternate,a,ga);a.memoizedProps=a.pendingProps,s===null?ld(a):$e=s}function c_(a){var s=a,c=s.alternate;switch(s.tag){case 15:case 0:s=_2(c,s,s.pendingProps,s.type,void 0,qe);break;case 11:s=_2(c,s,s.pendingProps,s.type.render,s.ref,qe);break;case 5:gy(s);default:k2(c,s),s=$e=oO(s,ga),s=P2(c,s,ga)}a.memoizedProps=a.pendingProps,s===null?ld(a):$e=s}function po(a,s,c,p){la=Hi=null,gy(s),no=null,Zl=0;var v=s.return;try{if(aB(a,v,s,c,qe)){Nt=1,Xf(a,tr(c,a.current)),$e=null;return}}catch(x){if(v!==null)throw $e=v,x;Nt=1,Xf(a,tr(c,a.current)),$e=null;return}s.flags&32768?(He||p===1?a=!0:co||(qe&536870912)!==0?a=!1:(ti=a=!0,(p===2||p===9||p===3||p===6)&&(p=$n.current,p!==null&&p.tag===13&&(p.flags|=16384))),u_(s,a)):ld(s)}function ld(a){var s=a;do{if((s.flags&32768)!==0){u_(s,ti);return}a=s.return;var c=oB(s.alternate,s,ga);if(c!==null){$e=c;return}if(s=s.sibling,s!==null){$e=s;return}$e=s=a}while(s!==null);Nt===0&&(Nt=5)}function u_(a,s){do{var c=lB(a.alternate,a);if(c!==null){c.flags&=32767,$e=c;return}if(c=a.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(a=a.sibling,a!==null)){$e=a;return}$e=a=c}while(a!==null);Nt=6,$e=null}function f_(a,s,c,p,v,x,N,R,U){a.cancelPendingCommit=null;do cd();while(Ut!==0);if((Xe&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(x=s.lanes|s.childLanes,x|=Gm,X$(a,c,x,N,R,U),a===ct&&($e=ct=null,qe=0),fo=s,ai=a,xa=c,Jy=x,ev=v,e_=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,bB(ff,function(){return y_(),null})):(a.callbackNode=null,a.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=L.T,L.T=null,v=H.p,H.p=2,N=Xe,Xe|=4;try{cB(a,s,c)}finally{Xe=N,H.p=v,L.T=p}}Ut=1,d_(),h_(),p_()}}function d_(){if(Ut===1){Ut=0;var a=ai,s=fo,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=L.T,L.T=null;var p=H.p;H.p=2;var v=Xe;Xe|=4;try{F2(s,a);var x=mv,N=QA(a.containerInfo),R=x.focusedElem,U=x.selectionRange;if(N!==R&&R&&R.ownerDocument&&ZA(R.ownerDocument.documentElement,R)){if(U!==null&&Im(R)){var Z=U.start,te=U.end;if(te===void 0&&(te=Z),"selectionStart"in R)R.selectionStart=Z,R.selectionEnd=Math.min(te,R.value.length);else{var se=R.ownerDocument||document,J=se&&se.defaultView||window;if(J.getSelection){var ee=J.getSelection(),ge=R.textContent.length,Ae=Math.min(U.start,ge),ot=U.end===void 0?Ae:Math.min(U.end,ge);!ee.extend&&Ae>ot&&(N=ot,ot=Ae,Ae=N);var K=WA(R,Ae),V=WA(R,ot);if(K&&V&&(ee.rangeCount!==1||ee.anchorNode!==K.node||ee.anchorOffset!==K.offset||ee.focusNode!==V.node||ee.focusOffset!==V.offset)){var W=se.createRange();W.setStart(K.node,K.offset),ee.removeAllRanges(),Ae>ot?(ee.addRange(W),ee.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),ee.addRange(W))}}}}for(se=[],ee=R;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<se.length;R++){var ie=se[R];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}jd=!!pv,mv=pv=null}finally{Xe=v,H.p=p,L.T=c}}a.current=s,Ut=2}}function h_(){if(Ut===2){Ut=0;var a=ai,s=fo,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=L.T,L.T=null;var p=H.p;H.p=2;var v=Xe;Xe|=4;try{q2(a,s.alternate,s)}finally{Xe=v,H.p=p,L.T=c}}Ut=3}}function p_(){if(Ut===4||Ut===3){Ut=0,Pl();var a=ai,s=fo,c=xa,p=e_;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Ut=5:(Ut=0,fo=ai=null,m_(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(ri=null),jm(c),s=s.stateNode,kn&&typeof kn.onCommitFiberRoot=="function")try{kn.onCommitFiberRoot(Rl,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=L.T,v=H.p,H.p=2,L.T=null;try{for(var x=a.onRecoverableError,N=0;N<p.length;N++){var R=p[N];x(R.value,{componentStack:R.stack})}}finally{L.T=s,H.p=v}}(xa&3)!==0&&cd(),Ur(a),v=a.pendingLanes,(c&261930)!==0&&(v&42)!==0?a===tv?pc++:(pc=0,tv=a):pc=0,mc(0)}}function m_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Xl(s)))}function cd(){return d_(),h_(),p_(),y_()}function y_(){if(Ut!==5)return!1;var a=ai,s=Jy;Jy=0;var c=jm(xa),p=L.T,v=H.p;try{H.p=32>c?32:c,L.T=null,c=ev,ev=null;var x=ai,N=xa;if(Ut=0,fo=ai=null,xa=0,(Xe&6)!==0)throw Error(r(331));var R=Xe;if(Xe|=4,Z2(x.current),Y2(x,x.current,N,c),Xe=R,mc(0,!1),kn&&typeof kn.onPostCommitFiberRoot=="function")try{kn.onPostCommitFiberRoot(Rl,x)}catch{}return!0}finally{H.p=v,L.T=p,m_(a,s)}}function v_(a,s,c){s=tr(c,s),s=Ry(a.stateNode,s,2),a=Za(a,s,2),a!==null&&(Dl(a,2),Ur(a))}function nt(a,s,c){if(a.tag===3)v_(a,a,c);else for(;s!==null;){if(s.tag===3){v_(s,a,c);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ri===null||!ri.has(p))){a=tr(c,a),c=g2(2),p=Za(s,c,2),p!==null&&(x2(c,p,s,a),Dl(p,2),Ur(p));break}}s=s.return}}function av(a,s,c){var p=a.pingCache;if(p===null){p=a.pingCache=new dB;var v=new Set;p.set(s,v)}else v=p.get(s),v===void 0&&(v=new Set,p.set(s,v));v.has(c)||(Wy=!0,v.add(c),a=vB.bind(null,a,s,c),s.then(a,a))}function vB(a,s,c){var p=a.pingCache;p!==null&&p.delete(s),a.pingedLanes|=a.suspendedLanes&c,a.warmLanes&=~c,ct===a&&(qe&c)===c&&(Nt===4||Nt===3&&(qe&62914560)===qe&&300>dn()-rd?(Xe&2)===0&&ho(a,0):Zy|=c,uo===qe&&(uo=0)),Ur(a)}function g_(a,s){s===0&&(s=dA()),a=qi(a,s),a!==null&&(Dl(a,s),Ur(a))}function gB(a){var s=a.memoizedState,c=0;s!==null&&(c=s.retryLane),g_(a,c)}function xB(a,s){var c=0;switch(a.tag){case 31:case 13:var p=a.stateNode,v=a.memoizedState;v!==null&&(c=v.retryLane);break;case 19:p=a.stateNode;break;case 22:p=a.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),g_(a,c)}function bB(a,s){return qa(a,s)}var ud=null,mo=null,iv=!1,fd=!1,sv=!1,si=0;function Ur(a){a!==mo&&a.next===null&&(mo===null?ud=mo=a:mo=mo.next=a),fd=!0,iv||(iv=!0,SB())}function mc(a,s){if(!sv&&fd){sv=!0;do for(var c=!1,p=ud;p!==null;){if(a!==0){var v=p.pendingLanes;if(v===0)var x=0;else{var N=p.suspendedLanes,R=p.pingedLanes;x=(1<<31-Dn(42|a)+1)-1,x&=v&~(N&~R),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(c=!0,S_(p,x))}else x=qe,x=mf(p,p===ct?x:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(x&3)===0||kl(p,x)||(c=!0,S_(p,x));p=p.next}while(c);sv=!1}}function jB(){x_()}function x_(){fd=iv=!1;var a=0;si!==0&&PB()&&(a=si);for(var s=dn(),c=null,p=ud;p!==null;){var v=p.next,x=b_(p,s);x===0?(p.next=null,c===null?ud=v:c.next=v,v===null&&(mo=c)):(c=p,(a!==0||(x&3)!==0)&&(fd=!0)),p=v}Ut!==0&&Ut!==5||mc(a),si!==0&&(si=0)}function b_(a,s){for(var c=a.suspendedLanes,p=a.pingedLanes,v=a.expirationTimes,x=a.pendingLanes&-62914561;0<x;){var N=31-Dn(x),R=1<<N,U=v[N];U===-1?((R&c)===0||(R&p)!==0)&&(v[N]=Y$(R,s)):U<=s&&(a.expiredLanes|=R),x&=~R}if(s=ct,c=qe,c=mf(a,a===s?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p=a.callbackNode,c===0||a===s&&(tt===2||tt===9)||a.cancelPendingCommit!==null)return p!==null&&p!==null&&xr(p),a.callbackNode=null,a.callbackPriority=0;if((c&3)===0||kl(a,c)){if(s=c&-c,s===a.callbackPriority)return s;switch(p!==null&&xr(p),jm(c)){case 2:case 8:c=uA;break;case 32:c=ff;break;case 268435456:c=fA;break;default:c=ff}return p=j_.bind(null,a),c=qa(c,p),a.callbackPriority=s,a.callbackNode=c,s}return p!==null&&p!==null&&xr(p),a.callbackPriority=2,a.callbackNode=null,2}function j_(a,s){if(Ut!==0&&Ut!==5)return a.callbackNode=null,a.callbackPriority=0,null;var c=a.callbackNode;if(cd()&&a.callbackNode!==c)return null;var p=qe;return p=mf(a,a===ct?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p===0?null:(n_(a,p,s),b_(a,dn()),a.callbackNode!=null&&a.callbackNode===c?j_.bind(null,a):null)}function S_(a,s){if(cd())return null;n_(a,s,!0)}function SB(){kB(function(){(Xe&6)!==0?qa(cA,jB):x_()})}function ov(){if(si===0){var a=Js;a===0&&(a=df,df<<=1,(df&261888)===0&&(df=256)),si=a}return si}function w_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:xf(""+a)}function A_(a,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,a.id&&c.setAttribute("form",a.id),s.parentNode.insertBefore(c,s),a=new FormData(a),c.parentNode.removeChild(c),a}function wB(a,s,c,p,v){if(s==="submit"&&c&&c.stateNode===v){var x=w_((v[wn]||null).action),N=p.submitter;N&&(s=(s=N[wn]||null)?w_(s.formAction):N.getAttribute("formAction"),s!==null&&(x=s,N=null));var R=new wf("action","action",null,p,v);a.push({event:R,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(si!==0){var U=N?A_(v,N):new FormData(v);Ty(c,{pending:!0,data:U,method:v.method,action:x},null,U)}}else typeof x=="function"&&(R.preventDefault(),U=N?A_(v,N):new FormData(v),Ty(c,{pending:!0,data:U,method:v.method,action:x},x,U))},currentTarget:v}]})}}for(var lv=0;lv<Hm.length;lv++){var cv=Hm[lv],AB=cv.toLowerCase(),OB=cv[0].toUpperCase()+cv.slice(1);br(AB,"on"+OB)}br(tO,"onAnimationEnd"),br(nO,"onAnimationIteration"),br(rO,"onAnimationStart"),br("dblclick","onDoubleClick"),br("focusin","onFocus"),br("focusout","onBlur"),br(q6,"onTransitionRun"),br(U6,"onTransitionStart"),br(V6,"onTransitionCancel"),br(aO,"onTransitionEnd"),Bs("onMouseEnter",["mouseout","mouseover"]),Bs("onMouseLeave",["mouseout","mouseover"]),Bs("onPointerEnter",["pointerout","pointerover"]),Bs("onPointerLeave",["pointerout","pointerover"]),zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yc="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(" "),_B=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yc));function O_(a,s){s=(s&4)!==0;for(var c=0;c<a.length;c++){var p=a[c],v=p.event;p=p.listeners;e:{var x=void 0;if(s)for(var N=p.length-1;0<=N;N--){var R=p[N],U=R.instance,Z=R.currentTarget;if(R=R.listener,U!==x&&v.isPropagationStopped())break e;x=R,v.currentTarget=Z;try{x(v)}catch(te){_f(te)}v.currentTarget=null,x=U}else for(N=0;N<p.length;N++){if(R=p[N],U=R.instance,Z=R.currentTarget,R=R.listener,U!==x&&v.isPropagationStopped())break e;x=R,v.currentTarget=Z;try{x(v)}catch(te){_f(te)}v.currentTarget=null,x=U}}}}function Be(a,s){var c=s[Sm];c===void 0&&(c=s[Sm]=new Set);var p=a+"__bubble";c.has(p)||(__(s,a,2,!1),c.add(p))}function uv(a,s,c){var p=0;s&&(p|=4),__(c,a,p,s)}var dd="_reactListening"+Math.random().toString(36).slice(2);function fv(a){if(!a[dd]){a[dd]=!0,xA.forEach(function(c){c!=="selectionchange"&&(_B.has(c)||uv(c,!1,a),uv(c,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[dd]||(s[dd]=!0,uv("selectionchange",!1,s))}}function __(a,s,c,p){switch(tT(s)){case 2:var v=e8;break;case 8:v=t8;break;default:v=_v}c=v.bind(null,s,c,a),v=void 0,!Mm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),p?v!==void 0?a.addEventListener(s,c,{capture:!0,passive:v}):a.addEventListener(s,c,!0):v!==void 0?a.addEventListener(s,c,{passive:v}):a.addEventListener(s,c,!1)}function dv(a,s,c,p,v){var x=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var N=p.tag;if(N===3||N===4){var R=p.stateNode.containerInfo;if(R===v)break;if(N===4)for(N=p.return;N!==null;){var U=N.tag;if((U===3||U===4)&&N.stateNode.containerInfo===v)return;N=N.return}for(;R!==null;){if(N=Ls(R),N===null)return;if(U=N.tag,U===5||U===6||U===26||U===27){p=x=N;continue e}R=R.parentNode}}p=p.return}MA(function(){var Z=x,te=Nm(c),se=[];e:{var J=iO.get(a);if(J!==void 0){var ee=wf,ge=a;switch(a){case"keypress":if(jf(c)===0)break e;case"keydown":case"keyup":ee=x6;break;case"focusin":ge="focus",ee=Dm;break;case"focusout":ge="blur",ee=Dm;break;case"beforeblur":case"afterblur":ee=Dm;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=kA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=o6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=S6;break;case tO:case nO:case rO:ee=u6;break;case aO:ee=A6;break;case"scroll":case"scrollend":ee=i6;break;case"wheel":ee=_6;break;case"copy":case"cut":case"paste":ee=d6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=LA;break;case"toggle":case"beforetoggle":ee=E6}var Ae=(s&4)!==0,ot=!Ae&&(a==="scroll"||a==="scrollend"),K=Ae?J!==null?J+"Capture":null:J;Ae=[];for(var V=Z,W;V!==null;){var ie=V;if(W=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||W===null||K===null||(ie=$l(V,K),ie!=null&&Ae.push(vc(V,ie,W))),ot)break;V=V.return}0<Ae.length&&(J=new ee(J,ge,null,c,te),se.push({event:J,listeners:Ae}))}}if((s&7)===0){e:{if(J=a==="mouseover"||a==="pointerover",ee=a==="mouseout"||a==="pointerout",J&&c!==Em&&(ge=c.relatedTarget||c.fromElement)&&(Ls(ge)||ge[Ds]))break e;if((ee||J)&&(J=te.window===te?te:(J=te.ownerDocument)?J.defaultView||J.parentWindow:window,ee?(ge=c.relatedTarget||c.toElement,ee=Z,ge=ge?Ls(ge):null,ge!==null&&(ot=o(ge),Ae=ge.tag,ge!==ot||Ae!==5&&Ae!==27&&Ae!==6)&&(ge=null)):(ee=null,ge=Z),ee!==ge)){if(Ae=kA,ie="onMouseLeave",K="onMouseEnter",V="mouse",(a==="pointerout"||a==="pointerover")&&(Ae=LA,ie="onPointerLeave",K="onPointerEnter",V="pointer"),ot=ee==null?J:zl(ee),W=ge==null?J:zl(ge),J=new Ae(ie,V+"leave",ee,c,te),J.target=ot,J.relatedTarget=W,ie=null,Ls(te)===Z&&(Ae=new Ae(K,V+"enter",ge,c,te),Ae.target=W,Ae.relatedTarget=ot,ie=Ae),ot=ie,ee&&ge)t:{for(Ae=TB,K=ee,V=ge,W=0,ie=K;ie;ie=Ae(ie))W++;ie=0;for(var Se=V;Se;Se=Ae(Se))ie++;for(;0<W-ie;)K=Ae(K),W--;for(;0<ie-W;)V=Ae(V),ie--;for(;W--;){if(K===V||V!==null&&K===V.alternate){Ae=K;break t}K=Ae(K),V=Ae(V)}Ae=null}else Ae=null;ee!==null&&T_(se,J,ee,Ae,!1),ge!==null&&ot!==null&&T_(se,ot,ge,Ae,!0)}}e:{if(J=Z?zl(Z):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var Ge=HA;else if(UA(J))if(GA)Ge=$6;else{Ge=L6;var be=D6}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Z&&Tm(Z.elementType)&&(Ge=HA):Ge=z6;if(Ge&&(Ge=Ge(a,Z))){VA(se,Ge,c,te);break e}be&&be(a,J,Z),a==="focusout"&&Z&&J.type==="number"&&Z.memoizedProps.value!=null&&_m(J,"number",J.value)}switch(be=Z?zl(Z):window,a){case"focusin":(UA(be)||be.contentEditable==="true")&&(Gs=be,qm=Z,Fl=null);break;case"focusout":Fl=qm=Gs=null;break;case"mousedown":Um=!0;break;case"contextmenu":case"mouseup":case"dragend":Um=!1,JA(se,c,te);break;case"selectionchange":if(I6)break;case"keydown":case"keyup":JA(se,c,te)}var De;if(zm)e:{switch(a){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Hs?IA(a,c)&&(Ue="onCompositionEnd"):a==="keydown"&&c.keyCode===229&&(Ue="onCompositionStart");Ue&&(zA&&c.locale!=="ko"&&(Hs||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Hs&&(De=PA()):(Ha=te,Pm="value"in Ha?Ha.value:Ha.textContent,Hs=!0)),be=hd(Z,Ue),0<be.length&&(Ue=new DA(Ue,a,null,c,te),se.push({event:Ue,listeners:be}),De?Ue.data=De:(De=qA(c),De!==null&&(Ue.data=De)))),(De=C6?M6(a,c):P6(a,c))&&(Ue=hd(Z,"onBeforeInput"),0<Ue.length&&(be=new DA("onBeforeInput","beforeinput",null,c,te),se.push({event:be,listeners:Ue}),be.data=De)),wB(se,a,Z,c,te)}O_(se,s)})}function vc(a,s,c){return{instance:a,listener:s,currentTarget:c}}function hd(a,s){for(var c=s+"Capture",p=[];a!==null;){var v=a,x=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||x===null||(v=$l(a,c),v!=null&&p.unshift(vc(a,v,x)),v=$l(a,s),v!=null&&p.push(vc(a,v,x))),a.tag===3)return p;a=a.return}return[]}function TB(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function T_(a,s,c,p,v){for(var x=s._reactName,N=[];c!==null&&c!==p;){var R=c,U=R.alternate,Z=R.stateNode;if(R=R.tag,U!==null&&U===p)break;R!==5&&R!==26&&R!==27||Z===null||(U=Z,v?(Z=$l(c,x),Z!=null&&N.unshift(vc(c,Z,U))):v||(Z=$l(c,x),Z!=null&&N.push(vc(c,Z,U)))),c=c.return}N.length!==0&&a.push({event:s,listeners:N})}var EB=/\r\n?/g,NB=/\u0000|\uFFFD/g;function E_(a){return(typeof a=="string"?a:""+a).replace(EB,`
`).replace(NB,"")}function N_(a,s){return s=E_(s),E_(a)===s}function st(a,s,c,p,v,x){switch(c){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||qs(a,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&qs(a,""+p);break;case"className":vf(a,"class",p);break;case"tabIndex":vf(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":vf(a,c,p);break;case"style":NA(a,p,x);break;case"data":if(s!=="object"){vf(a,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||c!=="href")){a.removeAttribute(c);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(c);break}p=xf(""+p),a.setAttribute(c,p);break;case"action":case"formAction":if(typeof p=="function"){a.setAttribute(c,"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 x=="function"&&(c==="formAction"?(s!=="input"&&st(a,s,"name",v.name,v,null),st(a,s,"formEncType",v.formEncType,v,null),st(a,s,"formMethod",v.formMethod,v,null),st(a,s,"formTarget",v.formTarget,v,null)):(st(a,s,"encType",v.encType,v,null),st(a,s,"method",v.method,v,null),st(a,s,"target",v.target,v,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(c);break}p=xf(""+p),a.setAttribute(c,p);break;case"onClick":p!=null&&(a.onclick=aa);break;case"onScroll":p!=null&&Be("scroll",a);break;case"onScrollEnd":p!=null&&Be("scrollend",a);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(c=p.__html,c!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=c}}break;case"multiple":a.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":a.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){a.removeAttribute("xlink:href");break}c=xf(""+p),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(c,""+p):a.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(c,""):a.removeAttribute(c);break;case"capture":case"download":p===!0?a.setAttribute(c,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(c,p):a.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?a.setAttribute(c,p):a.removeAttribute(c);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?a.removeAttribute(c):a.setAttribute(c,p);break;case"popover":Be("beforetoggle",a),Be("toggle",a),yf(a,"popover",p);break;case"xlinkActuate":ra(a,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":ra(a,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":ra(a,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":ra(a,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":ra(a,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":ra(a,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":ra(a,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":ra(a,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":ra(a,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":yf(a,"is",p);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=r6.get(c)||c,yf(a,c,p))}}function hv(a,s,c,p,v,x){switch(c){case"style":NA(a,p,x);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(c=p.__html,c!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=c}}break;case"children":typeof p=="string"?qs(a,p):(typeof p=="number"||typeof p=="bigint")&&qs(a,""+p);break;case"onScroll":p!=null&&Be("scroll",a);break;case"onScrollEnd":p!=null&&Be("scrollend",a);break;case"onClick":p!=null&&(a.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bA.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),x=a[wn]||null,x=x!=null?x[c]:null,typeof x=="function"&&a.removeEventListener(s,x,v),typeof p=="function")){typeof x!="function"&&x!==null&&(c in a?a[c]=null:a.hasAttribute(c)&&a.removeAttribute(c)),a.addEventListener(s,p,v);break e}c in a?a[c]=p:p===!0?a.setAttribute(c,""):yf(a,c,p)}}}function sn(a,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",a),Be("load",a);var p=!1,v=!1,x;for(x in c)if(c.hasOwnProperty(x)){var N=c[x];if(N!=null)switch(x){case"src":p=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:st(a,s,x,N,c,null)}}v&&st(a,s,"srcSet",c.srcSet,c,null),p&&st(a,s,"src",c.src,c,null);return;case"input":Be("invalid",a);var R=x=N=v=null,U=null,Z=null;for(p in c)if(c.hasOwnProperty(p)){var te=c[p];if(te!=null)switch(p){case"name":v=te;break;case"type":N=te;break;case"checked":U=te;break;case"defaultChecked":Z=te;break;case"value":x=te;break;case"defaultValue":R=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,s));break;default:st(a,s,p,te,c,null)}}OA(a,x,R,U,Z,N,v,!1);return;case"select":Be("invalid",a),p=N=x=null;for(v in c)if(c.hasOwnProperty(v)&&(R=c[v],R!=null))switch(v){case"value":x=R;break;case"defaultValue":N=R;break;case"multiple":p=R;default:st(a,s,v,R,c,null)}s=x,c=N,a.multiple=!!p,s!=null?Is(a,!!p,s,!1):c!=null&&Is(a,!!p,c,!0);return;case"textarea":Be("invalid",a),x=v=p=null;for(N in c)if(c.hasOwnProperty(N)&&(R=c[N],R!=null))switch(N){case"value":p=R;break;case"defaultValue":v=R;break;case"children":x=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:st(a,s,N,R,c,null)}TA(a,p,v,x);return;case"option":for(U in c)if(c.hasOwnProperty(U)&&(p=c[U],p!=null))switch(U){case"selected":a.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:st(a,s,U,p,c,null)}return;case"dialog":Be("beforetoggle",a),Be("toggle",a),Be("cancel",a),Be("close",a);break;case"iframe":case"object":Be("load",a);break;case"video":case"audio":for(p=0;p<yc.length;p++)Be(yc[p],a);break;case"image":Be("error",a),Be("load",a);break;case"details":Be("toggle",a);break;case"embed":case"source":case"link":Be("error",a),Be("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in c)if(c.hasOwnProperty(Z)&&(p=c[Z],p!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:st(a,s,Z,p,c,null)}return;default:if(Tm(s)){for(te in c)c.hasOwnProperty(te)&&(p=c[te],p!==void 0&&hv(a,s,te,p,c,void 0));return}}for(R in c)c.hasOwnProperty(R)&&(p=c[R],p!=null&&st(a,s,R,p,c,null))}function CB(a,s,c,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,x=null,N=null,R=null,U=null,Z=null,te=null;for(ee in c){var se=c[ee];if(c.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":U=se;default:p.hasOwnProperty(ee)||st(a,s,ee,null,p,se)}}for(var J in p){var ee=p[J];if(se=c[J],p.hasOwnProperty(J)&&(ee!=null||se!=null))switch(J){case"type":x=ee;break;case"name":v=ee;break;case"checked":Z=ee;break;case"defaultChecked":te=ee;break;case"value":N=ee;break;case"defaultValue":R=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,s));break;default:ee!==se&&st(a,s,J,ee,p,se)}}Om(a,N,R,U,Z,te,x,v);return;case"select":ee=N=R=J=null;for(x in c)if(U=c[x],c.hasOwnProperty(x)&&U!=null)switch(x){case"value":break;case"multiple":ee=U;default:p.hasOwnProperty(x)||st(a,s,x,null,p,U)}for(v in p)if(x=p[v],U=c[v],p.hasOwnProperty(v)&&(x!=null||U!=null))switch(v){case"value":J=x;break;case"defaultValue":R=x;break;case"multiple":N=x;default:x!==U&&st(a,s,v,x,p,U)}s=R,c=N,p=ee,J!=null?Is(a,!!c,J,!1):!!p!=!!c&&(s!=null?Is(a,!!c,s,!0):Is(a,!!c,c?[]:"",!1));return;case"textarea":ee=J=null;for(R in c)if(v=c[R],c.hasOwnProperty(R)&&v!=null&&!p.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:st(a,s,R,null,p,v)}for(N in p)if(v=p[N],x=c[N],p.hasOwnProperty(N)&&(v!=null||x!=null))switch(N){case"value":J=v;break;case"defaultValue":ee=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==x&&st(a,s,N,v,p,x)}_A(a,J,ee);return;case"option":for(var ge in c)if(J=c[ge],c.hasOwnProperty(ge)&&J!=null&&!p.hasOwnProperty(ge))switch(ge){case"selected":a.selected=!1;break;default:st(a,s,ge,null,p,J)}for(U in p)if(J=p[U],ee=c[U],p.hasOwnProperty(U)&&J!==ee&&(J!=null||ee!=null))switch(U){case"selected":a.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:st(a,s,U,J,p,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in c)J=c[Ae],c.hasOwnProperty(Ae)&&J!=null&&!p.hasOwnProperty(Ae)&&st(a,s,Ae,null,p,J);for(Z in p)if(J=p[Z],ee=c[Z],p.hasOwnProperty(Z)&&J!==ee&&(J!=null||ee!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,s));break;default:st(a,s,Z,J,p,ee)}return;default:if(Tm(s)){for(var ot in c)J=c[ot],c.hasOwnProperty(ot)&&J!==void 0&&!p.hasOwnProperty(ot)&&hv(a,s,ot,void 0,p,J);for(te in p)J=p[te],ee=c[te],!p.hasOwnProperty(te)||J===ee||J===void 0&&ee===void 0||hv(a,s,te,J,p,ee);return}}for(var K in c)J=c[K],c.hasOwnProperty(K)&&J!=null&&!p.hasOwnProperty(K)&&st(a,s,K,null,p,J);for(se in p)J=p[se],ee=c[se],!p.hasOwnProperty(se)||J===ee||J==null&&ee==null||st(a,s,se,J,p,ee)}function C_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MB(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,c=performance.getEntriesByType("resource"),p=0;p<c.length;p++){var v=c[p],x=v.transferSize,N=v.initiatorType,R=v.duration;if(x&&R&&C_(N)){for(N=0,R=v.responseEnd,p+=1;p<c.length;p++){var U=c[p],Z=U.startTime;if(Z>R)break;var te=U.transferSize,se=U.initiatorType;te&&C_(se)&&(U=U.responseEnd,N+=te*(U<R?1:(R-Z)/(U-Z)))}if(--p,s+=8*(x+N)/(v.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var pv=null,mv=null;function pd(a){return a.nodeType===9?a:a.ownerDocument}function M_(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function P_(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function yv(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var vv=null;function PB(){var a=window.event;return a&&a.type==="popstate"?a===vv?!1:(vv=a,!0):(vv=null,!1)}var R_=typeof setTimeout=="function"?setTimeout:void 0,RB=typeof clearTimeout=="function"?clearTimeout:void 0,k_=typeof Promise=="function"?Promise:void 0,kB=typeof queueMicrotask=="function"?queueMicrotask:typeof k_<"u"?function(a){return k_.resolve(null).then(a).catch(DB)}:R_;function DB(a){setTimeout(function(){throw a})}function oi(a){return a==="head"}function D_(a,s){var c=s,p=0;do{var v=c.nextSibling;if(a.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"||c==="/&"){if(p===0){a.removeChild(v),xo(s);return}p--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")p++;else if(c==="html")gc(a.ownerDocument.documentElement);else if(c==="head"){c=a.ownerDocument.head,gc(c);for(var x=c.firstChild;x;){var N=x.nextSibling,R=x.nodeName;x[Ll]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&x.rel.toLowerCase()==="stylesheet"||c.removeChild(x),x=N}}else c==="body"&&gc(a.ownerDocument.body);c=v}while(c);xo(s)}function L_(a,s){var c=a;a=0;do{var p=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(a===0)break;a--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||a++;c=p}while(c)}function gv(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":gv(c),wm(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}a.removeChild(c)}}function LB(a,s,c,p){for(;a.nodeType===1;){var v=c;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(p){if(!a[Ll])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(x=a.getAttribute("rel"),x==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(x!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(x=a.getAttribute("src"),(x!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&x&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var x=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===x)return a}else return a;if(a=sr(a.nextSibling),a===null)break}return null}function zB(a,s,c){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!c||(a=sr(a.nextSibling),a===null))return null;return a}function z_(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=sr(a.nextSibling),a===null))return null;return a}function xv(a){return a.data==="$?"||a.data==="$~"}function bv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function $B(a,s){var c=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||c.readyState!=="loading")s();else{var p=function(){s(),c.removeEventListener("DOMContentLoaded",p)};c.addEventListener("DOMContentLoaded",p),a._reactRetry=p}}function sr(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var jv=null;function $_(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var c=a.data;if(c==="/$"||c==="/&"){if(s===0)return sr(a.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}a=a.nextSibling}return null}function B_(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var c=a.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return a;s--}else c!=="/$"&&c!=="/&"||s++}a=a.previousSibling}return null}function I_(a,s,c){switch(s=pd(c),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function gc(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);wm(a)}var or=new Map,q_=new Set;function md(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ba=H.d;H.d={f:BB,r:IB,D:qB,C:UB,L:VB,m:HB,X:FB,S:GB,M:KB};function BB(){var a=ba.f(),s=sd();return a||s}function IB(a){var s=zs(a);s!==null&&s.tag===5&&s.type==="form"?a2(s):ba.r(a)}var yo=typeof document>"u"?null:document;function U_(a,s,c){var p=yo;if(p&&typeof s=="string"&&s){var v=Jn(s);v='link[rel="'+a+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),q_.has(v)||(q_.add(v),a={rel:a,crossOrigin:c,href:s},p.querySelector(v)===null&&(s=p.createElement("link"),sn(s,"link",a),Wt(s),p.head.appendChild(s)))}}function qB(a){ba.D(a),U_("dns-prefetch",a,null)}function UB(a,s){ba.C(a,s),U_("preconnect",a,s)}function VB(a,s,c){ba.L(a,s,c);var p=yo;if(p&&a&&s){var v='link[rel="preload"][as="'+Jn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+Jn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+Jn(c.imageSizes)+'"]')):v+='[href="'+Jn(a)+'"]';var x=v;switch(s){case"style":x=vo(a);break;case"script":x=go(a)}or.has(x)||(a=y({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:a,as:s},c),or.set(x,a),p.querySelector(v)!==null||s==="style"&&p.querySelector(xc(x))||s==="script"&&p.querySelector(bc(x))||(s=p.createElement("link"),sn(s,"link",a),Wt(s),p.head.appendChild(s)))}}function HB(a,s){ba.m(a,s);var c=yo;if(c&&a){var p=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+Jn(p)+'"][href="'+Jn(a)+'"]',x=v;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=go(a)}if(!or.has(x)&&(a=y({rel:"modulepreload",href:a},s),or.set(x,a),c.querySelector(v)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(bc(x)))return}p=c.createElement("link"),sn(p,"link",a),Wt(p),c.head.appendChild(p)}}}function GB(a,s,c){ba.S(a,s,c);var p=yo;if(p&&a){var v=$s(p).hoistableStyles,x=vo(a);s=s||"default";var N=v.get(x);if(!N){var R={loading:0,preload:null};if(N=p.querySelector(xc(x)))R.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},c),(c=or.get(x))&&Sv(a,c);var U=N=p.createElement("link");Wt(U),sn(U,"link",a),U._p=new Promise(function(Z,te){U.onload=Z,U.onerror=te}),U.addEventListener("load",function(){R.loading|=1}),U.addEventListener("error",function(){R.loading|=2}),R.loading|=4,yd(N,s,p)}N={type:"stylesheet",instance:N,count:1,state:R},v.set(x,N)}}}function FB(a,s){ba.X(a,s);var c=yo;if(c&&a){var p=$s(c).hoistableScripts,v=go(a),x=p.get(v);x||(x=c.querySelector(bc(v)),x||(a=y({src:a,async:!0},s),(s=or.get(v))&&wv(a,s),x=c.createElement("script"),Wt(x),sn(x,"link",a),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(v,x))}}function KB(a,s){ba.M(a,s);var c=yo;if(c&&a){var p=$s(c).hoistableScripts,v=go(a),x=p.get(v);x||(x=c.querySelector(bc(v)),x||(a=y({src:a,async:!0,type:"module"},s),(s=or.get(v))&&wv(a,s),x=c.createElement("script"),Wt(x),sn(x,"link",a),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(v,x))}}function V_(a,s,c,p){var v=(v=we.current)?md(v):null;if(!v)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=vo(c.href),c=$s(v).hoistableStyles,p=c.get(s),p||(p={type:"style",instance:null,count:0,state:null},c.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){a=vo(c.href);var x=$s(v).hoistableStyles,N=x.get(a);if(N||(v=v.ownerDocument||v,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(a,N),(x=v.querySelector(xc(a)))&&!x._p&&(N.instance=x,N.state.loading=5),or.has(a)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},or.set(a,c),x||YB(v,a,c,N.state))),s&&p===null)throw Error(r(528,""));return N}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=go(c),c=$s(v).hoistableScripts,p=c.get(s),p||(p={type:"script",instance:null,count:0,state:null},c.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function vo(a){return'href="'+Jn(a)+'"'}function xc(a){return'link[rel="stylesheet"]['+a+"]"}function H_(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function YB(a,s,c,p){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=a.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),sn(s,"link",c),Wt(s),a.head.appendChild(s))}function go(a){return'[src="'+Jn(a)+'"]'}function bc(a){return"script[async]"+a}function G_(a,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var p=a.querySelector('style[data-href~="'+Jn(c.href)+'"]');if(p)return s.instance=p,Wt(p),p;var v=y({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return p=(a.ownerDocument||a).createElement("style"),Wt(p),sn(p,"style",v),yd(p,c.precedence,a),s.instance=p;case"stylesheet":v=vo(c.href);var x=a.querySelector(xc(v));if(x)return s.state.loading|=4,s.instance=x,Wt(x),x;p=H_(c),(v=or.get(v))&&Sv(p,v),x=(a.ownerDocument||a).createElement("link"),Wt(x);var N=x;return N._p=new Promise(function(R,U){N.onload=R,N.onerror=U}),sn(x,"link",p),s.state.loading|=4,yd(x,c.precedence,a),s.instance=x;case"script":return x=go(c.src),(v=a.querySelector(bc(x)))?(s.instance=v,Wt(v),v):(p=c,(v=or.get(x))&&(p=y({},c),wv(p,v)),a=a.ownerDocument||a,v=a.createElement("script"),Wt(v),sn(v,"link",p),a.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,yd(p,c.precedence,a));return s.instance}function yd(a,s,c){for(var p=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=p.length?p[p.length-1]:null,x=v,N=0;N<p.length;N++){var R=p[N];if(R.dataset.precedence===s)x=R;else if(x!==v)break}x?x.parentNode.insertBefore(a,x.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(a,s.firstChild))}function Sv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function wv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var vd=null;function F_(a,s,c){if(vd===null){var p=new Map,v=vd=new Map;v.set(c,p)}else v=vd,p=v.get(c),p||(p=new Map,v.set(c,p));if(p.has(a))return p;for(p.set(a,null),c=c.getElementsByTagName(a),v=0;v<c.length;v++){var x=c[v];if(!(x[Ll]||x[tn]||a==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var N=x.getAttribute(s)||"";N=a+N;var R=p.get(N);R?R.push(x):p.set(N,[x])}}return p}function K_(a,s,c){a=a.ownerDocument||a,a.head.insertBefore(c,s==="title"?a.querySelector("head > title"):null)}function XB(a,s,c){if(c===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Y_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function WB(a,s,c,p){if(c.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var v=vo(p.href),x=s.querySelector(xc(v));if(x){s=x._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=gd.bind(a),s.then(a,a)),c.state.loading|=4,c.instance=x,Wt(x);return}x=s.ownerDocument||s,p=H_(p),(v=or.get(v))&&Sv(p,v),x=x.createElement("link"),Wt(x);var N=x;N._p=new Promise(function(R,U){N.onload=R,N.onerror=U}),sn(x,"link",p),c.instance=x}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(a.count++,c=gd.bind(a),s.addEventListener("load",c),s.addEventListener("error",c))}}var Av=0;function ZB(a,s){return a.stylesheets&&a.count===0&&bd(a,a.stylesheets),0<a.count||0<a.imgCount?function(c){var p=setTimeout(function(){if(a.stylesheets&&bd(a,a.stylesheets),a.unsuspend){var x=a.unsuspend;a.unsuspend=null,x()}},6e4+s);0<a.imgBytes&&Av===0&&(Av=62500*MB());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&bd(a,a.stylesheets),a.unsuspend)){var x=a.unsuspend;a.unsuspend=null,x()}},(a.imgBytes>Av?50:800)+s);return a.unsuspend=c,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(v)}}:null}function gd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bd(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var xd=null;function bd(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,xd=new Map,s.forEach(QB,a),xd=null,gd.call(a))}function QB(a,s){if(!(s.state.loading&4)){var c=xd.get(a);if(c)var p=c.get(null);else{c=new Map,xd.set(a,c);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<v.length;x++){var N=v[x];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(c.set(N.dataset.precedence,N),p=N)}p&&c.set(null,p)}v=s.instance,N=v.getAttribute("data-precedence"),x=c.get(N)||p,x===p&&c.set(null,v),c.set(N,v),this.count++,p=gd.bind(this),v.addEventListener("load",p),v.addEventListener("error",p),x?x.parentNode.insertBefore(v,x.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),s.state.loading|=4}}var jc={$$typeof:T,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function JB(a,s,c,p,v,x,N,R,U){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=xm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xm(0),this.hiddenUpdates=xm(null),this.identifierPrefix=p,this.onUncaughtError=v,this.onCaughtError=x,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function X_(a,s,c,p,v,x,N,R,U,Z,te,se){return a=new JB(a,s,c,N,U,Z,te,se,R),s=1,x===!0&&(s|=24),x=zn(3,null,null,s),a.current=x,x.stateNode=a,s=ry(),s.refCount++,a.pooledCache=s,s.refCount++,x.memoizedState={element:p,isDehydrated:c,cache:s},oy(x),a}function W_(a){return a?(a=Ys,a):Ys}function Z_(a,s,c,p,v,x){v=W_(v),p.context===null?p.context=v:p.pendingContext=v,p=Wa(s),p.payload={element:c},x=x===void 0?null:x,x!==null&&(p.callback=x),c=Za(a,p,s),c!==null&&(Nn(c,a,s),Jl(c,a,s))}function Q_(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var c=a.retryLane;a.retryLane=c!==0&&c<s?c:s}}function Ov(a,s){Q_(a,s),(a=a.alternate)&&Q_(a,s)}function J_(a){if(a.tag===13||a.tag===31){var s=qi(a,67108864);s!==null&&Nn(s,a,67108864),Ov(a,67108864)}}function eT(a){if(a.tag===13||a.tag===31){var s=Un();s=bm(s);var c=qi(a,s);c!==null&&Nn(c,a,s),Ov(a,s)}}var jd=!0;function e8(a,s,c,p){var v=L.T;L.T=null;var x=H.p;try{H.p=2,_v(a,s,c,p)}finally{H.p=x,L.T=v}}function t8(a,s,c,p){var v=L.T;L.T=null;var x=H.p;try{H.p=8,_v(a,s,c,p)}finally{H.p=x,L.T=v}}function _v(a,s,c,p){if(jd){var v=Tv(p);if(v===null)dv(a,s,p,Sd,c),nT(a,p);else if(r8(v,a,s,c,p))p.stopPropagation();else if(nT(a,p),s&4&&-1<n8.indexOf(a)){for(;v!==null;){var x=zs(v);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var N=Li(x.pendingLanes);if(N!==0){var R=x;for(R.pendingLanes|=2,R.entangledLanes|=2;N;){var U=1<<31-Dn(N);R.entanglements[1]|=U,N&=~U}Ur(x),(Xe&6)===0&&(ad=dn()+500,mc(0))}}break;case 31:case 13:R=qi(x,2),R!==null&&Nn(R,x,2),sd(),Ov(x,2)}if(x=Tv(p),x===null&&dv(a,s,p,Sd,c),x===v)break;v=x}v!==null&&p.stopPropagation()}else dv(a,s,p,null,c)}}function Tv(a){return a=Nm(a),Ev(a)}var Sd=null;function Ev(a){if(Sd=null,a=Ls(a),a!==null){var s=o(a);if(s===null)a=null;else{var c=s.tag;if(c===13){if(a=l(s),a!==null)return a;a=null}else if(c===31){if(a=u(s),a!==null)return a;a=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return Sd=a,null}function tT(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(uf()){case cA:return 2;case uA:return 8;case ff:case U$:return 32;case fA:return 268435456;default:return 32}default:return 32}}var Nv=!1,li=null,ci=null,ui=null,Sc=new Map,wc=new Map,fi=[],n8="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 nT(a,s){switch(a){case"focusin":case"focusout":li=null;break;case"dragenter":case"dragleave":ci=null;break;case"mouseover":case"mouseout":ui=null;break;case"pointerover":case"pointerout":Sc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":wc.delete(s.pointerId)}}function Ac(a,s,c,p,v,x){return a===null||a.nativeEvent!==x?(a={blockedOn:s,domEventName:c,eventSystemFlags:p,nativeEvent:x,targetContainers:[v]},s!==null&&(s=zs(s),s!==null&&J_(s)),a):(a.eventSystemFlags|=p,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function r8(a,s,c,p,v){switch(s){case"focusin":return li=Ac(li,a,s,c,p,v),!0;case"dragenter":return ci=Ac(ci,a,s,c,p,v),!0;case"mouseover":return ui=Ac(ui,a,s,c,p,v),!0;case"pointerover":var x=v.pointerId;return Sc.set(x,Ac(Sc.get(x)||null,a,s,c,p,v)),!0;case"gotpointercapture":return x=v.pointerId,wc.set(x,Ac(wc.get(x)||null,a,s,c,p,v)),!0}return!1}function rT(a){var s=Ls(a.target);if(s!==null){var c=o(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){a.blockedOn=s,vA(a.priority,function(){eT(c)});return}}else if(s===31){if(s=u(c),s!==null){a.blockedOn=s,vA(a.priority,function(){eT(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}a.blockedOn=null}function wd(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var c=Tv(a.nativeEvent);if(c===null){c=a.nativeEvent;var p=new c.constructor(c.type,c);Em=p,c.target.dispatchEvent(p),Em=null}else return s=zs(c),s!==null&&J_(s),a.blockedOn=c,!1;s.shift()}return!0}function aT(a,s,c){wd(a)&&c.delete(s)}function a8(){Nv=!1,li!==null&&wd(li)&&(li=null),ci!==null&&wd(ci)&&(ci=null),ui!==null&&wd(ui)&&(ui=null),Sc.forEach(aT),wc.forEach(aT)}function Ad(a,s){a.blockedOn===s&&(a.blockedOn=null,Nv||(Nv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,a8)))}var Od=null;function iT(a){Od!==a&&(Od=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Od===a&&(Od=null);for(var s=0;s<a.length;s+=3){var c=a[s],p=a[s+1],v=a[s+2];if(typeof p!="function"){if(Ev(p||c)===null)continue;break}var x=zs(c);x!==null&&(a.splice(s,3),s-=3,Ty(x,{pending:!0,data:v,method:c.method,action:p},p,v))}}))}function xo(a){function s(U){return Ad(U,a)}li!==null&&Ad(li,a),ci!==null&&Ad(ci,a),ui!==null&&Ad(ui,a),Sc.forEach(s),wc.forEach(s);for(var c=0;c<fi.length;c++){var p=fi[c];p.blockedOn===a&&(p.blockedOn=null)}for(;0<fi.length&&(c=fi[0],c.blockedOn===null);)rT(c),c.blockedOn===null&&fi.shift();if(c=(a.ownerDocument||a).$$reactFormReplay,c!=null)for(p=0;p<c.length;p+=3){var v=c[p],x=c[p+1],N=v[wn]||null;if(typeof x=="function")N||iT(c);else if(N){var R=null;if(x&&x.hasAttribute("formAction")){if(v=x,N=x[wn]||null)R=N.formAction;else if(Ev(v)!==null)continue}else R=N.action;typeof R=="function"?c[p+1]=R:(c.splice(p,3),p-=3),iT(c)}}}function sT(){function a(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(N){return v=N})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),p||setTimeout(c,20)}function c(){if(!p&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){p=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function Cv(a){this._internalRoot=a}_d.prototype.render=Cv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,p=Un();Z_(c,p,a,s,null,null)},_d.prototype.unmount=Cv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;Z_(a.current,2,null,a,null,null),sd(),s[Ds]=null}};function _d(a){this._internalRoot=a}_d.prototype.unstable_scheduleHydration=function(a){if(a){var s=yA();a={blockedOn:null,target:a,priority:s};for(var c=0;c<fi.length&&s!==0&&s<fi[c].priority;c++);fi.splice(c,0,a),c===0&&rT(a)}};var oT=t.version;if(oT!=="19.2.7")throw Error(r(527,oT,"19.2.7"));H.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?m(a):null,a=a===null?null:a.stateNode,a};var i8={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Td=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Td.isDisabled&&Td.supportsFiber)try{Rl=Td.inject(i8),kn=Td}catch{}}return _c.createRoot=function(a,s){if(!i(a))throw Error(r(299));var c=!1,p="",v=p2,x=m2,N=y2;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(N=s.onRecoverableError)),s=X_(a,1,!1,null,null,c,p,null,v,x,N,sT),a[Ds]=s.current,fv(a),new Cv(s)},_c.hydrateRoot=function(a,s,c){if(!i(a))throw Error(r(299));var p=!1,v="",x=p2,N=m2,R=y2,U=null;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(x=c.onUncaughtError),c.onCaughtError!==void 0&&(N=c.onCaughtError),c.onRecoverableError!==void 0&&(R=c.onRecoverableError),c.formState!==void 0&&(U=c.formState)),s=X_(a,1,!0,s,c??null,p,v,U,x,N,R,sT),s.context=W_(null),c=s.current,p=Un(),p=bm(p),v=Wa(p),v.callback=null,Za(c,v,p),c=p,s.current.lanes=c,Dl(s,c),Ur(s),a[Ds]=s.current,fv(a),new _d(s)},_c.version="19.2.7",_c}var vT;function m8(){if(vT)return Rv.exports;vT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rv.exports=p8(),Rv.exports}var y8=m8();/**
* react-router v7.18.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var uS=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a3=/^[\\/]{2}/;function v8(e,t){return t+e.replace(/\\/g,"/")}var gT="popstate";function xT(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function g8(e={}){function t(r,i){var h;let o=(h=i.state)==null?void 0:h.masked,{pathname:l,search:u,hash:f}=o||r.location;return o1("",{pathname:l,search:u,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:su(i)}return b8(t,n,null,e)}function At(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Rr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function x8(){return Math.random().toString(36).substring(2,10)}function bT(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function o1(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?yl(t):t,state:n,key:t&&t.key||r||x8(),mask:i}}function su({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function yl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function b8(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u="POP",f=null,h=m();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function m(){return(l.state||{idx:null}).idx}function y(){u="POP";let b=m(),A=b==null?null:b-h;h=b,f&&f({action:u,location:w.location,delta:A})}function g(b,A){u="PUSH";let _=xT(b)?b:o1(w.location,b,A);h=m()+1;let T=bT(_,h),C=w.createHref(_.mask||_);try{l.pushState(T,"",C)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(C)}o&&f&&f({action:u,location:w.location,delta:1})}function j(b,A){u="REPLACE";let _=xT(b)?b:o1(w.location,b,A);h=m();let T=bT(_,h),C=w.createHref(_.mask||_);l.replaceState(T,"",C),o&&f&&f({action:u,location:w.location,delta:0})}function S(b){return j8(i,b)}let w={get action(){return u},get location(){return e(i,l)},listen(b){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(gT,y),f=b,()=>{i.removeEventListener(gT,y),f=null}},createHref(b){return t(i,b)},createURL:S,encodeLocation(b){let A=S(b);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:g,replace:j,go(b){return l.go(b)}};return w}function j8(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),At(r,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:su(t);return i=i.replace(/ $/,"%20"),!n&&a3.test(i)&&(i=r+i),new URL(i,r)}function i3(e,t,n="/"){return S8(e,t,n,!1)}function S8(e,t,n,r,i){let o=typeof t=="string"?yl(t):t,l=Ca(o.pathname||"/",n);if(l==null)return null;let u=w8(e),f=null,h=k8(l);for(let m=0;f==null&&m<u.length;++m)f=R8(u[m],h,r);return f}function w8(e){let t=s3(e);return A8(t),t}function s3(e,t=[],n=[],r="",i=!1){let o=(l,u,f=i,h)=>{let m={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;At(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let y=Nr([r,m.relativePath]),g=n.concat(m);l.children&&l.children.length>0&&(At(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),s3(l.children,t,g,y,f)),!(l.path==null&&!l.index)&&t.push({path:y,score:M8(y,l.index),routesMeta:g.map((j,S)=>{let[w,b]=c3(j.relativePath,j.caseSensitive,S===g.length-1);return{...j,matcher:w,compiledParams:b}})})};return e.forEach((l,u)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,u);else for(let h of o3(l.path))o(l,u,!0,h)}),t}function o3(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=o3(r.join("/")),u=[];return u.push(...l.map(f=>f===""?o:[o,f].join("/"))),i&&u.push(...l),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function A8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:P8(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var O8=/^:[\w-]+$/,_8=3,T8=2,E8=1,N8=10,C8=-2,jT=e=>e==="*";function M8(e,t){let n=e.split("/"),r=n.length;return n.some(jT)&&(r+=C8),t&&(r+=T8),n.filter(i=>!jT(i)).reduce((i,o)=>i+(O8.test(o)?_8:o===""?E8:N8),r)}function P8(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 R8(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u<r.length;++u){let f=r[u],h=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",y={path:f.relativePath,caseSensitive:f.caseSensitive,end:h},g=f.matcher&&f.compiledParams?l3(y,m,f.matcher,f.compiledParams):uh(y,m),j=f.route;if(!g&&h&&n&&!r[r.length-1].route.index&&(g=uh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!g)return null;Object.assign(i,g.params),l.push({params:i,pathname:Nr([o,g.pathname]),pathnameBase:z8(Nr([o,g.pathnameBase])),route:j}),g.pathnameBase!=="/"&&(o=Nr([o,g.pathnameBase]))}return l}function uh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=c3(e.path,e.caseSensitive,e.end);return l3(e,t,n,r)}function l3(e,t,n,r){let i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:y},g)=>{if(m==="*"){let S=u[g]||"";l=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const j=u[g];return y&&!j?h[m]=void 0:h[m]=(j||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function c3(e,t=!1,n=!0){Rr(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,(l,u,f,h,m)=>{if(r.push({paramName:u,isOptional:f!=null}),f){let y=m.charAt(h+l.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function k8(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Rr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ca(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 D8(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?yl(e):e,o;return n?(n=u3(n),n.startsWith("/")?o=ST(n.substring(1),"/"):o=ST(n,t)):o=t,{pathname:o,search:$8(r),hash:B8(i)}}function ST(e,t){let n=fh(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function zv(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 L8(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function fS(e){let t=L8(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function _p(e,t,n,r=!1){let i;typeof e=="string"?i=yl(e):(i={...e},At(!i.pathname||!i.pathname.includes("?"),zv("?","pathname","search",i)),At(!i.pathname||!i.pathname.includes("#"),zv("#","pathname","hash",i)),At(!i.search||!i.search.includes("#"),zv("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let y=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),y-=1;i.pathname=g.join("/")}u=y>=0?t[y]:"/"}let f=D8(i,u),h=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||m)&&(f.pathname+="/"),f}var u3=e=>e.replace(/[\\/]{2,}/g,"/"),Nr=e=>u3(e.join("/")),fh=e=>e.replace(/\/+$/,""),z8=e=>fh(e).replace(/^\/*/,"/"),$8=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,B8=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,I8=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function q8(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function U8(e){let t=e.map(n=>n.route.path).filter(Boolean);return Nr(t)||"/"}var f3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function d3(e,t){let n=e;if(typeof n!="string"||!uS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(f3)try{let o=new URL(window.location.href),l=a3.test(n)?new URL(v8(n,o.protocol)):new URL(n),u=Ca(l.pathname,t);l.origin===o.origin&&u!=null?n=u+l.search+l.hash:i=!0}catch{Rr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var h3=["POST","PUT","PATCH","DELETE"];new Set(h3);var V8=["GET",...h3];new Set(V8);var H8=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function G8(e){try{return H8.includes(new URL(e).protocol)}catch{return!1}}var vl=P.createContext(null);vl.displayName="DataRouter";var Tp=P.createContext(null);Tp.displayName="DataRouterState";var p3=P.createContext(!1);function F8(){return P.useContext(p3)}var m3=P.createContext({isTransitioning:!1});m3.displayName="ViewTransition";var K8=P.createContext(new Map);K8.displayName="Fetchers";var Y8=P.createContext(null);Y8.displayName="Await";var Zn=P.createContext(null);Zn.displayName="Navigation";var Fu=P.createContext(null);Fu.displayName="Location";var Dr=P.createContext({outlet:null,matches:[],isDataRoute:!1});Dr.displayName="Route";var dS=P.createContext(null);dS.displayName="RouteError";var y3="REACT_ROUTER_ERROR",X8="REDIRECT",W8="ROUTE_ERROR_RESPONSE";function Z8(e){if(e.startsWith(`${y3}:${X8}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Q8(e){if(e.startsWith(`${y3}:${W8}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new I8(t.status,t.statusText,t.data)}catch{}}function J8(e,{relative:t}={}){At(gl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=P.useContext(Zn),{hash:i,pathname:o,search:l}=Ku(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Nr([n,o])),r.createHref({pathname:u,search:l,hash:i})}function gl(){return P.useContext(Fu)!=null}function Lr(){return At(gl(),"useLocation() may be used only in the context of a <Router> component."),P.useContext(Fu).location}var v3="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function g3(e){P.useContext(Zn).static||P.useLayoutEffect(e)}function Ep(){let{isDataRoute:e}=P.useContext(Dr);return e?pI():eI()}function eI(){At(gl(),"useNavigate() may be used only in the context of a <Router> component.");let e=P.useContext(vl),{basename:t,navigator:n}=P.useContext(Zn),{matches:r}=P.useContext(Dr),{pathname:i}=Lr(),o=JSON.stringify(fS(r)),l=P.useRef(!1);return g3(()=>{l.current=!0}),P.useCallback((f,h={})=>{if(Rr(l.current,v3),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=_p(f,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Nr([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,o,i,e])}var tI=P.createContext(null);function nI(e){let t=P.useContext(Dr).outlet;return P.useMemo(()=>t&&P.createElement(tI.Provider,{value:e},t),[t,e])}function Ku(e,{relative:t}={}){let{matches:n}=P.useContext(Dr),{pathname:r}=Lr(),i=JSON.stringify(fS(n));return P.useMemo(()=>_p(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function rI(e,t){return x3(e,t)}function x3(e,t,n){var b;At(gl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=P.useContext(Zn),{matches:i}=P.useContext(Dr),o=i[i.length-1],l=o?o.params:{},u=o?o.pathname:"/",f=o?o.pathnameBase:"/",h=o&&o.route;{let A=h&&h.path||"";j3(u,!h||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let m=Lr(),y;if(t){let A=typeof t=="string"?yl(t):t;At(f==="/"||((b=A.pathname)==null?void 0:b.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${A.pathname}" was given in the \`location\` prop.`),y=A}else y=m;let g=y.pathname||"/",j=g;if(f!=="/"){let A=f.replace(/^\//,"").split("/");j="/"+g.replace(/^\//,"").split("/").slice(A.length).join("/")}let S=n&&n.state.matches.length?n.state.matches.map(A=>Object.assign(A,{route:n.manifest[A.route.id]||A.route})):i3(e,{pathname:j});Rr(h||S!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Rr(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=lI(S&&S.map(A=>Object.assign({},A,{params:Object.assign({},l,A.params),pathname:Nr([f,r.encodeLocation?r.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?f:Nr([f,r.encodeLocation?r.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),i,n);return t&&w?P.createElement(Fu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...y},navigationType:"POP"}},w):w}function aI(){let e=hI(),t=q8(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:o},"ErrorBoundary")," or"," ",P.createElement("code",{style:o},"errorElement")," prop on your route.")),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:i},n):null,l)}var iI=P.createElement(aI,null),b3=class extends P.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Q8(e.digest);n&&(e=n)}let t=e!==void 0?P.createElement(Dr.Provider,{value:this.props.routeContext},P.createElement(dS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?P.createElement(sI,{error:e},t):t}};b3.contextType=p3;var $v=new WeakMap;function sI({children:e,error:t}){let{basename:n}=P.useContext(Zn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Z8(t.digest);if(r){let i=$v.get(t);if(i)throw i;let o=d3(r.location,n),l=o.absoluteURL||o.to;if(G8(l))throw new Error("Invalid redirect location");if(f3&&!$v.get(t))if(o.isExternal||r.reloadDocument)window.location.href=l;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw $v.set(t,u),u}return P.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function oI({routeContext:e,match:t,children:n}){let r=P.useContext(vl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),P.createElement(Dr.Provider,{value:e},n)}function lI(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,o=r==null?void 0:r.errors;if(o!=null){let m=i.findIndex(y=>y.route.id&&(o==null?void 0:o[y.route.id])!==void 0);At(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,m+1))}let l=!1,u=-1;if(n&&r){l=r.renderFallback;for(let m=0;m<i.length;m++){let y=i[m];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(u=m),y.route.id){let{loaderData:g,errors:j}=r,S=y.route.loader&&!g.hasOwnProperty(y.route.id)&&(!j||j[y.route.id]===void 0);if(y.route.lazy||S){n.isStatic&&(l=!0),u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}}let f=n==null?void 0:n.onError,h=r&&f?(m,y)=>{var g,j;f(m,{location:r.location,params:((j=(g=r.matches)==null?void 0:g[0])==null?void 0:j.params)??{},pattern:U8(r.matches),errorInfo:y})}:void 0;return i.reduceRight((m,y,g)=>{let j,S=!1,w=null,b=null;r&&(j=o&&y.route.id?o[y.route.id]:void 0,w=y.route.errorElement||iI,l&&(u<0&&g===0?(j3("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,b=null):u===g&&(S=!0,b=y.route.hydrateFallbackElement||null)));let A=t.concat(i.slice(0,g+1)),_=()=>{let T;return j?T=w:S?T=b:y.route.Component?T=P.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=m,P.createElement(oI,{match:y,routeContext:{outlet:m,matches:A,isDataRoute:r!=null},children:T})};return r&&(y.route.ErrorBoundary||y.route.errorElement||g===0)?P.createElement(b3,{location:r.location,revalidation:r.revalidation,component:w,error:j,children:_(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:h}):_()},null)}function hS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cI(e){let t=P.useContext(vl);return At(t,hS(e)),t}function uI(e){let t=P.useContext(Tp);return At(t,hS(e)),t}function fI(e){let t=P.useContext(Dr);return At(t,hS(e)),t}function pS(e){let t=fI(e),n=t.matches[t.matches.length-1];return At(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function dI(){return pS("useRouteId")}function hI(){var r;let e=P.useContext(dS),t=uI("useRouteError"),n=pS("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function pI(){let{router:e}=cI("useNavigate"),t=pS("useNavigate"),n=P.useRef(!1);return g3(()=>{n.current=!0}),P.useCallback(async(i,o={})=>{Rr(n.current,v3),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var wT={};function j3(e,t,n){!t&&!wT[e]&&(wT[e]=!0,Rr(!1,n))}P.memo(mI);function mI({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:o}){return x3(e,void 0,{manifest:t,state:r,isStatic:i,onError:o})}function mS({to:e,replace:t,state:n,relative:r}){At(gl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=P.useContext(Zn);Rr(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=P.useContext(Dr),{pathname:l}=Lr(),u=Ep(),f=_p(e,fS(o),l,r==="path"),h=JSON.stringify(f);return P.useEffect(()=>{u(JSON.parse(h),{replace:t,state:n,relative:r})},[u,h,r,t,n]),null}function yI(e){return nI(e.context)}function on(e){At(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function vI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,useTransitions:l}){At(!gl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),f=P.useMemo(()=>({basename:u,navigator:i,static:o,useTransitions:l,future:{}}),[u,i,o,l]);typeof n=="string"&&(n=yl(n));let{pathname:h="/",search:m="",hash:y="",state:g=null,key:j="default",mask:S}=n,w=P.useMemo(()=>{let b=Ca(h,u);return b==null?null:{location:{pathname:b,search:m,hash:y,state:g,key:j,mask:S},navigationType:r}},[u,h,m,y,g,j,r,S]);return Rr(w!=null,`<Router basename="${u}"> is not able to match the URL "${h}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:P.createElement(Zn.Provider,{value:f},P.createElement(Fu.Provider,{children:t,value:w}))}function gI({children:e,location:t}){return rI(l1(e),t)}function l1(e,t=[]){let n=[];return P.Children.forEach(e,(r,i)=>{if(!P.isValidElement(r))return;let o=[...t,i];if(r.type===P.Fragment){n.push.apply(n,l1(r.props.children,o));return}At(r.type===on,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),At(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=l1(r.props.children,o)),n.push(l)}),n}var Wd="get",Zd="application/x-www-form-urlencoded";function Np(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function xI(e){return Np(e)&&e.tagName.toLowerCase()==="button"}function bI(e){return Np(e)&&e.tagName.toLowerCase()==="form"}function jI(e){return Np(e)&&e.tagName.toLowerCase()==="input"}function SI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wI(e,t){return e.button===0&&(!t||t==="_self")&&!SI(e)}var Nd=null;function AI(){if(Nd===null)try{new FormData(document.createElement("form"),0),Nd=!1}catch{Nd=!0}return Nd}var OI=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bv(e){return e!=null&&!OI.has(e)?(Rr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Zd}"`),null):e}function _I(e,t){let n,r,i,o,l;if(bI(e)){let u=e.getAttribute("action");r=u?Ca(u,t):null,n=e.getAttribute("method")||Wd,i=Bv(e.getAttribute("enctype"))||Zd,o=new FormData(e)}else if(xI(e)||jI(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||u.getAttribute("action");if(r=f?Ca(f,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Wd,i=Bv(e.getAttribute("formenctype"))||Bv(u.getAttribute("enctype"))||Zd,o=new FormData(u,e),!AI()){let{name:h,type:m,value:y}=e;if(m==="image"){let g=h?`${h}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else h&&o.append(h,y)}}else{if(Np(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Wd,r=null,i=Zd,l=e}return o&&i==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function yS(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function S3(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&Ca(i.pathname,t)==="/"?i.pathname=`${fh(t)}/_root.${r}`:i.pathname=`${fh(i.pathname)}.${r}`,i}async function TI(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function EI(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function NI(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let l=await TI(o,n);return l.links?l.links():[]}return[]}));return RI(r.flat(1).filter(EI).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function AT(e,t,n,r,i,o){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,u=(f,h)=>{var m;return n[h].pathname!==f.pathname||((m=n[h].route.path)==null?void 0:m.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,h)=>l(f,h)||u(f,h)):o==="data"?t.filter((f,h)=>{var y;let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,h)||u(f,h))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((y=n[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function CI(e,t,{includeHydrateFallback:n}={}){return MI(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function MI(e){return[...new Set(e)]}function PI(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function RI(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(PI(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function vS(){let e=P.useContext(vl);return yS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function kI(){let e=P.useContext(Tp);return yS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var gS=P.createContext(void 0);gS.displayName="FrameworkContext";function Cp(){let e=P.useContext(gS);return yS(e,"You must render this element inside a <HydratedRouter> element"),e}function DI(e,t){let n=P.useContext(gS),[r,i]=P.useState(!1),[o,l]=P.useState(!1),{onFocus:u,onBlur:f,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=t,g=P.useRef(null);P.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=A=>{A.forEach(_=>{l(_.isIntersecting)})},b=new IntersectionObserver(w,{threshold:.5});return g.current&&b.observe(g.current),()=>{b.disconnect()}}},[e]),P.useEffect(()=>{if(r){let w=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(w)}}},[r]);let j=()=>{i(!0)},S=()=>{i(!1),l(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:Tc(u,j),onBlur:Tc(f,S),onMouseEnter:Tc(h,j),onMouseLeave:Tc(m,S),onTouchStart:Tc(y,j)}]:[!1,g,{}]}function Tc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function LI({page:e,...t}){let n=F8(),{nonce:r}=Cp(),{router:i}=vS(),o=P.useMemo(()=>i3(i.routes,e,i.basename),[i.routes,e,i.basename]);return o?(t.nonce==null&&r&&(t={...t,nonce:r}),n?P.createElement($I,{page:e,matches:o,...t}):P.createElement(BI,{page:e,matches:o,...t})):null}function zI(e){let{manifest:t,routeModules:n}=Cp(),[r,i]=P.useState([]);return P.useEffect(()=>{let o=!1;return NI(e,t,n).then(l=>{o||i(l)}),()=>{o=!0}},[e,t,n]),r}function $I({page:e,matches:t,...n}){let r=Lr(),{future:i}=Cp(),{basename:o}=vS(),l=P.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let u=S3(e,o,i.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?f=!0:h.push(m.route.id);return f&&h.length>0&&u.searchParams.set("_routes",h.join(",")),[u.pathname+u.search]},[o,i.v8_trailingSlashAwareDataRequests,e,r,t]);return P.createElement(P.Fragment,null,l.map(u=>P.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...n})))}function BI({page:e,matches:t,...n}){let r=Lr(),{future:i,manifest:o,routeModules:l}=Cp(),{basename:u}=vS(),{loaderData:f,matches:h}=kI(),m=P.useMemo(()=>AT(e,t,h,o,r,"data"),[e,t,h,o,r]),y=P.useMemo(()=>AT(e,t,h,o,r,"assets"),[e,t,h,o,r]),g=P.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,b=!1;if(t.forEach(_=>{var C;let T=o.routes[_.route.id];!T||!T.hasLoader||(!m.some(O=>O.route.id===_.route.id)&&_.route.id in f&&((C=l[_.route.id])!=null&&C.shouldRevalidate)||T.hasClientLoader?b=!0:w.add(_.route.id))}),w.size===0)return[];let A=S3(e,u,i.v8_trailingSlashAwareDataRequests,"data");return b&&w.size>0&&A.searchParams.set("_routes",t.filter(_=>w.has(_.route.id)).map(_=>_.route.id).join(",")),[A.pathname+A.search]},[u,i.v8_trailingSlashAwareDataRequests,f,r,o,m,t,e,l]),j=P.useMemo(()=>CI(y,o),[y,o]),S=zI(y);return P.createElement(P.Fragment,null,g.map(w=>P.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),j.map(w=>P.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),S.map(({key:w,link:b})=>P.createElement("link",{key:w,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function II(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var qI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{qI&&(window.__reactRouterVersion="7.18.1")}catch{}function UI({basename:e,children:t,useTransitions:n,window:r}){let i=P.useRef();i.current==null&&(i.current=g8({window:r,v5Compat:!0}));let o=i.current,[l,u]=P.useState({action:o.action,location:o.location}),f=P.useCallback(h=>{n===!1?u(h):P.startTransition(()=>u(h))},[n]);return P.useLayoutEffect(()=>o.listen(f),[o,f]),P.createElement(vI,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var w3=P.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:l,mask:u,state:f,target:h,to:m,preventScrollReset:y,viewTransition:g,defaultShouldRevalidate:j,...S},w){let{basename:b,navigator:A,useTransitions:_}=P.useContext(Zn),T=typeof m=="string"&&uS.test(m),C=d3(m,b);m=C.to;let O=J8(m,{relative:i}),E=Lr(),M=null;if(u){let Y=_p(u,[],E.mask?E.mask.pathname:"/",!0);b!=="/"&&(Y.pathname=Y.pathname==="/"?b:Nr([b,Y.pathname])),M=A.createHref(Y)}let[D,k,B]=DI(r,S),q=GI(m,{replace:l,mask:u,state:f,target:h,preventScrollReset:y,relative:i,viewTransition:g,defaultShouldRevalidate:j,useTransitions:_});function $(Y){t&&t(Y),Y.defaultPrevented||q(Y)}let F=!(C.isExternal||o),X=P.createElement("a",{...S,...B,href:(F?M:void 0)||C.absoluteURL||O,onClick:F?$:t,ref:II(w,k),target:h,"data-discover":!T&&n==="render"?"true":void 0});return D&&!T?P.createElement(P.Fragment,null,X,P.createElement(LI,{page:O})):X});w3.displayName="Link";var A3=P.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:l,viewTransition:u,children:f,...h},m){let y=Ku(l,{relative:h.relative}),g=Lr(),j=P.useContext(Tp),{navigator:S,basename:w}=P.useContext(Zn),b=j!=null&&WI(y)&&u===!0,A=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,_=g.pathname,T=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;n||(_=_.toLowerCase(),T=T?T.toLowerCase():null,A=A.toLowerCase()),T&&w&&(T=Ca(T,w)||T);const C=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let O=_===A||!i&&_.startsWith(A)&&_.charAt(C)==="/",E=T!=null&&(T===A||!i&&T.startsWith(A)&&T.charAt(A.length)==="/"),M={isActive:O,isPending:E,isTransitioning:b},D=O?t:void 0,k;typeof r=="function"?k=r(M):k=[r,O?"active":null,E?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let B=typeof o=="function"?o(M):o;return P.createElement(w3,{...h,"aria-current":D,className:k,ref:m,style:B,to:l,viewTransition:u},typeof f=="function"?f(M):f)});A3.displayName="NavLink";var VI=P.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:l=Wd,action:u,onSubmit:f,relative:h,preventScrollReset:m,viewTransition:y,defaultShouldRevalidate:g,...j},S)=>{let{useTransitions:w}=P.useContext(Zn),b=YI(),A=XI(u,{relative:h}),_=l.toLowerCase()==="get"?"get":"post",T=typeof u=="string"&&uS.test(u),C=O=>{if(f&&f(O),O.defaultPrevented)return;O.preventDefault();let E=O.nativeEvent.submitter,M=(E==null?void 0:E.getAttribute("formmethod"))||l,D=()=>b(E||O.currentTarget,{fetcherKey:t,method:M,navigate:n,replace:i,state:o,relative:h,preventScrollReset:m,viewTransition:y,defaultShouldRevalidate:g});w&&n!==!1?P.startTransition(()=>D()):D()};return P.createElement("form",{ref:S,method:_,action:A,onSubmit:r?f:C,...j,"data-discover":!T&&e==="render"?"true":void 0})});VI.displayName="Form";function HI(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function O3(e){let t=P.useContext(vl);return At(t,HI(e)),t}function GI(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:f,useTransitions:h}={}){let m=Ep(),y=Lr(),g=Ku(e,{relative:l});return P.useCallback(j=>{if(wI(j,t)){j.preventDefault();let S=n!==void 0?n:su(y)===su(g),w=()=>m(e,{replace:S,mask:r,state:i,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:f});h?P.startTransition(()=>w()):w()}},[y,m,g,n,r,i,t,e,o,l,u,f,h])}var FI=0,KI=()=>`__${String(++FI)}__`;function YI(){let{router:e}=O3("useSubmit"),{basename:t}=P.useContext(Zn),n=dI(),r=e.fetch,i=e.navigate;return P.useCallback(async(o,l={})=>{let{action:u,method:f,encType:h,formData:m,body:y}=_I(o,t);if(l.navigate===!1){let g=l.fetcherKey||KI();await r(g,n,l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:y,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await i(l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:y,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function XI(e,{relative:t}={}){let{basename:n}=P.useContext(Zn),r=P.useContext(Dr);At(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Ku(e||".",{relative:t})},l=Lr();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),f=u.getAll("index");if(f.some(m=>m==="")){u.delete("index"),f.filter(y=>y).forEach(y=>u.append("index",y));let m=u.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Nr([n,o.pathname])),su(o)}function WI(e,{relative:t}={}){let n=P.useContext(m3);At(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=O3("useViewTransitionState"),i=Ku(e,{relative:t});if(!n.isTransitioning)return!1;let o=Ca(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ca(n.nextLocation.pathname,r)||n.nextLocation.pathname;return uh(i.pathname,l)!=null||uh(i.pathname,o)!=null}const OT=e=>{let t;const n=new Set,r=(h,m)=>{const y=typeof h=="function"?h(t):h;if(!Object.is(y,t)){const g=t;t=m??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(j=>j(t,g))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(r,i,u);return u},ZI=(e=>e?OT(e):OT),QI=e=>e;function JI(e,t=QI){const n=I.useSyncExternalStore(e.subscribe,I.useCallback(()=>t(e.getState()),[e,t]),I.useCallback(()=>t(e.getInitialState()),[e,t]));return I.useDebugValue(n),n}const _T=e=>{const t=ZI(e),n=r=>JI(t,r);return Object.assign(n,t),n},_3=(e=>e?_T(e):_T);function eq(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const l=f=>f===null?null:JSON.parse(f,void 0),u=(o=n.getItem(i))!=null?o:null;return u instanceof Promise?u.then(l):l(u)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const c1=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return c1(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return c1(r)(n)}}}},tq=(e,t)=>(n,r,i)=>{let o={storage:eq(()=>window.localStorage),partialize:b=>b,version:0,merge:(b,A)=>({...A,...b}),...t},l=!1,u=0;const f=new Set,h=new Set;let m=o.storage;if(!m)return e((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...b)},r,i);const y=()=>{const b=o.partialize({...r()});return m.setItem(o.name,{state:b,version:o.version})},g=i.setState;i.setState=(b,A)=>(g(b,A),y());const j=e((...b)=>(n(...b),y()),r,i);i.getInitialState=()=>j;let S;const w=()=>{var b,A;if(!m)return;const _=++u;l=!1,f.forEach(C=>{var O;return C((O=r())!=null?O:j)});const T=((A=o.onRehydrateStorage)==null?void 0:A.call(o,(b=r())!=null?b:j))||void 0;return c1(m.getItem.bind(m))(o.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate){const O=o.migrate(C.state,C.version);return O instanceof Promise?O.then(E=>[!0,E]):[!0,O]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var O;if(_!==u)return;const[E,M]=C;if(S=o.merge(M,(O=r())!=null?O:j),n(S,!0),E)return y()}).then(()=>{_===u&&(T==null||T(r(),void 0),S=r(),l=!0,h.forEach(C=>C(S)))}).catch(C=>{_===u&&(T==null||T(void 0,C))})};return i.persist={setOptions:b=>{o={...o,...b},b.storage&&(m=b.storage)},clearStorage:()=>{m==null||m.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>l,onHydrate:b=>(f.add(b),()=>{f.delete(b)}),onFinishHydration:b=>(h.add(b),()=>{h.delete(b)})},o.skipHydration||w(),S||j},nq=tq,Yu=_3()(nq(e=>({token:null,user:null,isAuthenticated:!1,isLoading:!1,login:(t,n)=>{localStorage.setItem("amos_token",t),e({token:t,user:n,isAuthenticated:!0})},logout:()=>{localStorage.removeItem("amos_token"),e({token:null,user:null,isAuthenticated:!1})},setUser:t=>e({user:t})}),{name:"amos-auth",partialize:e=>({token:e.token,user:e.user,isAuthenticated:e.isAuthenticated})})),xS=P.createContext({});function bS(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const rq=typeof window<"u",jS=rq?P.useLayoutEffect:P.useEffect,Mp=P.createContext(null);function SS(e,t){e.indexOf(t)===-1&&e.push(t)}function dh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Zr=(e,t,n)=>n>t?t:n<e?e:n;let wS=()=>{};const Oi={},T3=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),E3=e=>typeof e=="object"&&e!==null,N3=e=>/^0[^.\s]+$/u.test(e);function C3(e){let t;return()=>(t===void 0&&(t=e()),t)}const pr=e=>e,Xu=(...e)=>e.reduce((t,n)=>r=>n(t(r))),ou=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class AS{constructor(){this.subscriptions=[]}add(t){return SS(this.subscriptions,t),()=>dh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Yn=e=>e*1e3,dr=e=>e/1e3,M3=(e,t)=>t?e*(1e3/t):0,P3=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aq=1e-7,iq=12;function sq(e,t,n,r,i){let o,l,u=0;do l=t+(n-t)/2,o=P3(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>aq&&++u<iq);return l}function Wu(e,t,n,r){if(e===t&&n===r)return pr;const i=o=>sq(o,0,1,e,n);return o=>o===0||o===1?o:P3(i(o),t,r)}const R3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,k3=e=>t=>1-e(1-t),D3=Wu(.33,1.53,.69,.99),OS=k3(D3),L3=R3(OS),z3=e=>e>=1?1:(e*=2)<1?.5*OS(e):.5*(2-Math.pow(2,-10*(e-1))),_S=e=>1-Math.sin(Math.acos(e)),$3=k3(_S),B3=R3(_S),oq=Wu(.42,0,1,1),lq=Wu(0,0,.58,1),I3=Wu(.42,0,.58,1),cq=e=>Array.isArray(e)&&typeof e[0]!="number",q3=e=>Array.isArray(e)&&typeof e[0]=="number",uq={linear:pr,easeIn:oq,easeInOut:I3,easeOut:lq,circIn:_S,circInOut:B3,circOut:$3,backIn:OS,backInOut:L3,backOut:D3,anticipate:z3},fq=e=>typeof e=="string",TT=e=>{if(q3(e)){wS(e.length===4);const[t,n,r,i]=e;return Wu(t,n,r,i)}else if(fq(e))return uq[e];return e},Cd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function dq(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(h){o.has(h)&&(f.schedule(h),e()),h(l)}const f={schedule:(h,m=!1,y=!1)=>{const j=y&&r?t:n;return m&&o.add(h),j.add(h),h},cancel:h=>{n.delete(h),o.delete(h)},process:h=>{if(l=h,r){i=!0;return}r=!0;const m=t;t=n,n=m,t.forEach(u),t.clear(),r=!1,i&&(i=!1,f.process(h))}};return f}const hq=40;function U3(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=Cd.reduce((T,C)=>(T[C]=dq(o),T),{}),{setup:u,read:f,resolveKeyframes:h,preUpdate:m,update:y,preRender:g,render:j,postRender:S}=l,w=()=>{const T=Oi.useManualTiming,C=T?i.timestamp:performance.now();n=!1,T||(i.delta=r?1e3/60:Math.max(Math.min(C-i.timestamp,hq),1)),i.timestamp=C,i.isProcessing=!0,u.process(i),f.process(i),h.process(i),m.process(i),y.process(i),g.process(i),j.process(i),S.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(w))},b=()=>{n=!0,r=!0,i.isProcessing||e(w)};return{schedule:Cd.reduce((T,C)=>{const O=l[C];return T[C]=(E,M=!1,D=!1)=>(n||b(),O.schedule(E,M,D)),T},{}),cancel:T=>{for(let C=0;C<Cd.length;C++)l[Cd[C]].cancel(T)},state:i,steps:l}}const{schedule:ft,cancel:_i,state:cn,steps:Iv}=U3(typeof requestAnimationFrame<"u"?requestAnimationFrame:pr,!0);let Qd;function pq(){Qd=void 0}const gn={now:()=>(Qd===void 0&&gn.set(cn.isProcessing||Oi.useManualTiming?cn.timestamp:performance.now()),Qd),set:e=>{Qd=e,queueMicrotask(pq)}},V3=e=>t=>typeof t=="string"&&t.startsWith(e),H3=V3("--"),mq=V3("var(--"),TS=e=>mq(e)?yq.test(e.split("/*")[0].trim()):!1,yq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ET(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const xl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},lu={...xl,transform:e=>Zr(0,1,e)},Md={...xl,default:1},Fc=e=>Math.round(e*1e5)/1e5,ES=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vq(e){return e==null}const gq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,NS=(e,t)=>n=>!!(typeof n=="string"&&gq.test(n)&&n.startsWith(e)||t&&!vq(n)&&Object.prototype.hasOwnProperty.call(n,t)),G3=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,l,u]=r.match(ES);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},xq=e=>Zr(0,255,e),qv={...xl,transform:e=>Math.round(xq(e))},cs={test:NS("rgb","red"),parse:G3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+qv.transform(e)+", "+qv.transform(t)+", "+qv.transform(n)+", "+Fc(lu.transform(r))+")"};function bq(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const u1={test:NS("#"),parse:bq,transform:cs.transform},Zu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wa=Zu("deg"),Kr=Zu("%"),xe=Zu("px"),jq=Zu("vh"),Sq=Zu("vw"),NT={...Kr,parse:e=>Kr.parse(e)/100,transform:e=>Kr.transform(e*100)},_o={test:NS("hsl","hue"),parse:G3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kr.transform(Fc(t))+", "+Kr.transform(Fc(n))+", "+Fc(lu.transform(r))+")"},It={test:e=>cs.test(e)||u1.test(e)||_o.test(e),parse:e=>cs.test(e)?cs.parse(e):_o.test(e)?_o.parse(e):u1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cs.transform(e):_o.transform(e),getAnimatableNone:e=>{const t=It.parse(e);return t.alpha=0,It.transform(t)}},wq=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Aq(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ES))==null?void 0:t.length)||0)+(((n=e.match(wq))==null?void 0:n.length)||0)>0}const F3="number",K3="color",Oq="var",_q="var(",CT="${}",Tq=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Io(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const u=t.replace(Tq,f=>(It.test(f)?(r.color.push(o),i.push(K3),n.push(It.parse(f))):f.startsWith(_q)?(r.var.push(o),i.push(Oq),n.push(f)):(r.number.push(o),i.push(F3),n.push(parseFloat(f))),++o,CT)).split(CT);return{values:n,split:u,indexes:r,types:i}}function Eq(e){return Io(e).values}function Y3({split:e,types:t}){const n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],r[o]!==void 0){const l=t[o];l===F3?i+=Fc(r[o]):l===K3?i+=It.transform(r[o]):i+=r[o]}return i}}function Nq(e){return Y3(Io(e))}const Cq=e=>typeof e=="number"?0:It.test(e)?It.getAnimatableNone(e):e,Mq=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Cq(e);function Pq(e){const t=Io(e);return Y3(t)(t.values.map((r,i)=>Mq(r,t.split[i])))}const Cr={test:Aq,parse:Eq,createTransformer:Nq,getAnimatableNone:Pq};function Uv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rq({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,l=0;if(!t)i=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,f=2*n-u;i=Uv(f,u,e+1/3),o=Uv(f,u,e),l=Uv(f,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function hh(e,t){return n=>n>0?t:e}const ut=(e,t,n)=>e+(t-e)*n,Vv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},kq=[u1,cs,_o],Dq=e=>kq.find(t=>t.test(e));function MT(e){const t=Dq(e);if(!t)return!1;let n=t.parse(e);return t===_o&&(n=Rq(n)),n}const PT=(e,t)=>{const n=MT(e),r=MT(t);if(!n||!r)return hh(e,t);const i={...n};return o=>(i.red=Vv(n.red,r.red,o),i.green=Vv(n.green,r.green,o),i.blue=Vv(n.blue,r.blue,o),i.alpha=ut(n.alpha,r.alpha,o),cs.transform(i))},f1=new Set(["none","hidden"]);function Lq(e,t){return f1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function zq(e,t){return n=>ut(e,t,n)}function CS(e){return typeof e=="number"?zq:typeof e=="string"?TS(e)?hh:It.test(e)?PT:Iq:Array.isArray(e)?X3:typeof e=="object"?It.test(e)?PT:$q:hh}function X3(e,t){const n=[...e],r=n.length,i=e.map((o,l)=>CS(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=i[l](o);return n}}function $q(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=CS(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Bq(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][r[o]],u=e.values[l]??0;n[i]=u,r[o]++}return n}const Iq=(e,t)=>{const n=Cr.createTransformer(t),r=Io(e),i=Io(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?f1.has(e)&&!i.values.length||f1.has(t)&&!r.values.length?Lq(e,t):Xu(X3(Bq(r,i),i.values),n):hh(e,t)};function W3(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):CS(e)(e,t)}const qq=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ft.update(t,n),stop:()=>_i(t),now:()=>cn.isProcessing?cn.timestamp:gn.now()}},Z3=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ph=2e4;function MS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ph;)t+=n,r=e.next(t);return t>=ph?1/0:t}function Uq(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(MS(r),ph);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:dr(i)}}const Ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function d1(e,t){return e*Math.sqrt(1-t*t)}const Vq=12;function Hq(e,t,n){let r=n;for(let i=1;i<Vq;i++)r=r-e(r)/t(r);return r}const Hv=.001;function Gq({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let i,o,l=1-t;l=Zr(Ct.minDamping,Ct.maxDamping,l),e=Zr(Ct.minDuration,Ct.maxDuration,dr(e)),l<1?(i=h=>{const m=h*l,y=m*e,g=m-n,j=d1(h,l),S=Math.exp(-y);return Hv-g/j*S},o=h=>{const y=h*l*e,g=y*n+n,j=Math.pow(l,2)*Math.pow(h,2)*e,S=Math.exp(-y),w=d1(Math.pow(h,2),l);return(-i(h)+Hv>0?-1:1)*((g-j)*S)/w}):(i=h=>{const m=Math.exp(-h*e),y=(h-n)*e+1;return-Hv+m*y},o=h=>{const m=Math.exp(-h*e),y=(n-h)*(e*e);return m*y});const u=5/e,f=Hq(i,o,u);if(e=Yn(e),isNaN(f))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const h=Math.pow(f,2)*r;return{stiffness:h,damping:l*2*Math.sqrt(r*h),duration:e}}}const Fq=["duration","bounce"],Kq=["stiffness","damping","mass"];function RT(e,t){return t.some(n=>e[n]!==void 0)}function Yq(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!RT(e,Kq)&&RT(e,Fq))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Zr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ct.mass,stiffness:i,damping:o}}else{const n=Gq({...e,velocity:0});t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function mh(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:f,damping:h,mass:m,duration:y,velocity:g,isResolvedFromDuration:j}=Yq({...n,velocity:-dr(n.velocity||0)}),S=g||0,w=h/(2*Math.sqrt(f*m)),b=l-o,A=dr(Math.sqrt(f/m)),_=Math.abs(b)<5;r||(r=_?Ct.restSpeed.granular:Ct.restSpeed.default),i||(i=_?Ct.restDelta.granular:Ct.restDelta.default);let T,C,O,E,M,D;if(w<1)O=d1(A,w),E=(S+w*A*b)/O,T=B=>{const q=Math.exp(-w*A*B);return l-q*(E*Math.sin(O*B)+b*Math.cos(O*B))},M=w*A*E+b*O,D=w*A*b-E*O,C=B=>Math.exp(-w*A*B)*(M*Math.sin(O*B)+D*Math.cos(O*B));else if(w===1){T=q=>l-Math.exp(-A*q)*(b+(S+A*b)*q);const B=S+A*b;C=q=>Math.exp(-A*q)*(A*B*q-S)}else{const B=A*Math.sqrt(w*w-1);T=X=>{const Y=Math.exp(-w*A*X),L=Math.min(B*X,300);return l-Y*((S+w*A*b)*Math.sinh(L)+B*b*Math.cosh(L))/B};const q=(S+w*A*b)/B,$=w*A*q-b*B,F=w*A*b-q*B;C=X=>{const Y=Math.exp(-w*A*X),L=Math.min(B*X,300);return Y*($*Math.sinh(L)+F*Math.cosh(L))}}const k={calculatedDuration:j&&y||null,velocity:B=>Yn(C(B)),next:B=>{if(!j&&w<1){const $=Math.exp(-w*A*B),F=Math.sin(O*B),X=Math.cos(O*B),Y=l-$*(E*F+b*X),L=Yn($*(M*F+D*X));return u.done=Math.abs(L)<=r&&Math.abs(l-Y)<=i,u.value=u.done?l:Y,u}const q=T(B);if(j)u.done=B>=y;else{const $=Yn(C(B));u.done=Math.abs($)<=r&&Math.abs(l-q)<=i}return u.value=u.done?l:q,u},toString:()=>{const B=Math.min(MS(k),ph),q=Z3($=>k.next(B*$).value,B,30);return B+"ms "+q},toTransition:()=>{}};return k}mh.applyToOptions=e=>{const t=Uq(e,100,mh);return e.ease=t.ease,e.duration=Yn(t.duration),e.type="keyframes",e};const Xq=5;function Q3(e,t,n){const r=Math.max(t-Xq,0);return M3(n-e(r),t-r)}function h1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:f,restDelta:h=.5,restSpeed:m}){const y=e[0],g={done:!1,value:y},j=D=>u!==void 0&&D<u||f!==void 0&&D>f,S=D=>u===void 0?f:f===void 0||Math.abs(u-D)<Math.abs(f-D)?u:f;let w=n*t;const b=y+w,A=l===void 0?b:l(b);A!==b&&(w=A-y);const _=D=>-w*Math.exp(-D/r),T=D=>A+_(D),C=D=>{const k=_(D),B=T(D);g.done=Math.abs(k)<=h,g.value=g.done?A:B};let O,E;const M=D=>{j(g.value)&&(O=D,E=mh({keyframes:[g.value,S(g.value)],velocity:Q3(T,D,g.value),damping:i,stiffness:o,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let k=!1;return!E&&O===void 0&&(k=!0,C(D),M(D)),O!==void 0&&D>=O?E.next(D-O):(!k&&C(D),g)}}}function Wq(e,t,n){const r=[],i=n||Oi.mix||W3,o=e.length-1;for(let l=0;l<o;l++){let u=i(e[l],e[l+1]);if(t){const f=Array.isArray(t)?t[l]||pr:t;u=Xu(f,u)}r.push(u)}return r}function Zq(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(wS(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=Wq(t,r,i),f=u.length,h=m=>{if(l&&m<e[0])return t[0];let y=0;if(f>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const g=ou(e[y],e[y+1],m);return u[y](g)};return n?m=>h(Zr(e[0],e[o-1],m)):h}function Qq(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ou(0,t,r);e.push(ut(n,1,i))}}function Jq(e){const t=[0];return Qq(t,e.length-1),t}function eU(e,t){return e.map(n=>n*t)}function tU(e,t){return e.map(()=>t||I3).splice(0,e.length-1)}function Kc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=cq(r)?r.map(TT):TT(r),o={done:!1,value:t[0]},l=eU(n&&n.length===t.length?n:Jq(t),e),u=Zq(l,t,{ease:Array.isArray(i)?i:tU(t,i)});return{calculatedDuration:e,next:f=>(o.value=u(f),o.done=f>=e,o)}}const nU=e=>e!==null;function Pp(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(nU),u=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const rU={decay:h1,inertia:h1,tween:Kc,keyframes:Kc,spring:mh};function J3(e){typeof e.type=="string"&&(e.type=rU[e.type])}class PS{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const aU=e=>e/100;class yh extends PS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==gn.now()&&this.tick(gn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;J3(t);const{type:n=Kc,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const f=n||Kc;f!==Kc&&typeof u[0]!="number"&&(this.mixKeyframes=Xu(aU,W3(u[0],u[1])),u=[0,100]);const h=f({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...u].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=MS(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:f}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:m,repeat:y,repeatType:g,repeatDelay:j,type:S,onUpdate:w,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const A=this.currentTime-h*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?A<0:A>i;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,C=r;if(y){const D=Math.min(this.currentTime,i)/u;let k=Math.floor(D),B=D%1;!B&&D>=1&&(B=1),B===1&&k--,k=Math.min(k,y+1),!!(k%2)&&(g==="reverse"?(B=1-B,j&&(B-=j/u)):g==="mirror"&&(C=l)),T=Zr(0,1,B)*u}let O;_?(this.delayState.value=m[0],O=this.delayState):O=C.next(T),o&&!_&&(O.value=o(O.value));let{done:E}=O;!_&&f!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return M&&S!==h1&&(O.value=Pp(m,this.options,b,this.speed)),w&&w(O.value),M&&this.finish(),O}then(t,n){return this.finished.then(t,n)}get duration(){return dr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dr(t)}get time(){return dr(this.currentTime)}set time(t){t=Yn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Q3(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(gn.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=dr(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=qq,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(gn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function iU(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const us=e=>e*180/Math.PI,p1=e=>{const t=us(Math.atan2(e[1],e[0]));return m1(t)},sU={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:p1,rotateZ:p1,skewX:e=>us(Math.atan(e[1])),skewY:e=>us(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},m1=e=>(e=e%360,e<0&&(e+=360),e),kT=p1,DT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),LT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oU={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:DT,scaleY:LT,scale:e=>(DT(e)+LT(e))/2,rotateX:e=>m1(us(Math.atan2(e[6],e[5]))),rotateY:e=>m1(us(Math.atan2(-e[2],e[0]))),rotateZ:kT,rotate:kT,skewX:e=>us(Math.atan(e[4])),skewY:e=>us(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function y1(e){return e.includes("scale")?1:0}function v1(e,t){if(!e||e==="none")return y1(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=oU,i=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=sU,i=u}if(!i)return y1(t);const o=r[t],l=i[1].split(",").map(cU);return typeof o=="function"?o(l):l[o]}const lU=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return v1(n,t)};function cU(e){return parseFloat(e.trim())}const bl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jl=new Set([...bl,"pathRotation"]),zT=e=>e===xl||e===xe,uU=new Set(["x","y","z"]),fU=bl.filter(e=>!uU.has(e));function dU(e){const t=[];return fU.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const xi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>v1(t,"x"),y:(e,{transform:t})=>v1(t,"y")};xi.translateX=xi.x;xi.translateY=xi.y;const ys=new Set;let g1=!1,x1=!1,b1=!1;function e4(){if(x1){const e=Array.from(ys).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=dU(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,l])=>{var u;(u=r.getValue(o))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}x1=!1,g1=!1,ys.forEach(e=>e.complete(b1)),ys.clear()}function t4(){ys.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(x1=!0)})}function hU(){b1=!0,t4(),e4(),b1=!1}class RS{constructor(t,n,r,i,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(ys.add(this),g1||(g1=!0,ft.read(t4),ft.resolveKeyframes(e4))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i==null?void 0:i.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),i&&o===void 0&&i.set(t[0])}iU(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ys.delete(this)}cancel(){this.state==="scheduled"&&(ys.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const pU=e=>e.startsWith("--");function n4(e,t,n){pU(t)?e.style.setProperty(t,n):e.style[t]=n}const mU={};function r4(e,t){const n=C3(e);return()=>mU[t]??n()}const yU=r4(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),a4=r4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Uc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$T={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Uc([0,.65,.55,1]),circOut:Uc([.55,0,1,.45]),backIn:Uc([.31,.01,.66,-.59]),backOut:Uc([.33,1.53,.69,.99])};function i4(e,t){if(e)return typeof e=="function"?a4()?Z3(e,t):"ease-out":q3(e)?Uc(e):Array.isArray(e)?e.map(n=>i4(n,t)||$T.easeOut):$T[e]}function vU(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:f}={},h=void 0){const m={[t]:n};f&&(m.offset=f);const y=i4(u,i);Array.isArray(y)&&(m.easing=y);const g={delay:r,duration:i,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return h&&(g.pseudoElement=h),e.animate(m,g)}function s4(e){return typeof e=="function"&&"applyToOptions"in e}function gU({type:e,...t}){return s4(e)&&a4()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class o4 extends PS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:f}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,wS(typeof t.type!="string");const h=gU(t);this.animation=vU(n,r,i,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=Pp(i,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(m),n4(n,r,m),this.animation.cancel()}f==null||f(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return dr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dr(t)}get time(){return dr(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Yn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&yU()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),pr):i(this)}}const l4={anticipate:z3,backInOut:L3,circInOut:B3};function xU(e){return e in l4}function bU(e){typeof e.ease=="string"&&xU(e.ease)&&(e.ease=l4[e.ease])}const Gv=10;class jU extends o4{constructor(t){bU(t),J3(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new yh({...l,autoplay:!1}),f=Math.max(Gv,gn.now()-this.startTime),h=Zr(0,Gv,f-Gv),m=u.sample(f).value,{name:y}=this.options;o&&y&&n4(o,y,m),n.setWithVelocity(u.sample(Math.max(0,f-h)).value,m,h),u.stop()}}const BT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Cr.test(e)||e==="0")&&!e.startsWith("url("));function SU(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function wU(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=BT(i,t),u=BT(o,t);return!l||!u?!1:SU(e)||(n==="spring"||s4(n))&&r}function j1(e){e.duration=0,e.type="keyframes"}const c4=new Set(["opacity","clipPath","filter","transform"]),AU=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function OU(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&AU.test(e[t]))return!0;return!1}const _U=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),TU=C3(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function EU(e){var y;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:l,keyframes:u}=e;if(!(((y=t==null?void 0:t.owner)==null?void 0:y.current)instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:m}=t.owner.getProps();return TU()&&n&&(c4.has(n)||_U.has(n)&&OU(u))&&(n!=="transform"||!m)&&!h&&!r&&i!=="mirror"&&o!==0&&l!=="inertia"}const NU=40;class CU extends PS{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:f,motionValue:h,element:m,...y}){var S;super(),this.stop=()=>{var w,b;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=gn.now();const g={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:l,name:f,motionValue:h,element:m,...y},j=(m==null?void 0:m.KeyframeResolver)||RS;this.keyframeResolver=new j(u,(w,b,A)=>this.onKeyframesResolved(w,b,g,!A),f,h,m),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(t,n,r,i){var A,_;this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:f,isHandoff:h,onUpdate:m}=r;this.resolvedAt=gn.now();let y=!0;wU(t,o,l,u)||(y=!1,(Oi.instantAnimations||!f)&&(m==null||m(Pp(t,r,n))),t[0]=t[t.length-1],j1(r),r.repeat=0);const j={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>NU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},S=y&&!h&&EU(j),w=(_=(A=j.motionValue)==null?void 0:A.owner)==null?void 0:_.current;let b;if(S)try{b=new jU({...j,element:w})}catch{b=new yh(j)}else b=new yh(j);b.finished.then(()=>{this.notifyFinished()}).catch(pr),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),hU()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function u4(e,t,n,r=0,i=1){const o=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),l=e.size,u=(l-1)*r;return typeof n=="function"?n(o,l):i===1?o*r:u-o*r}const IT=30,MU=e=>!isNaN(parseFloat(e));class PU{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=gn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=gn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=MU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new AS);const r=this.events[t].add(n);return t==="change"?()=>{r(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=gn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>IT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,IT);return M3(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qo(e,t){return new PU(e,t)}function f4(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function kS(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?f4(n,e):n}const RU={type:"spring",stiffness:500,damping:25,restSpeed:10},kU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),DU={type:"keyframes",duration:.8},LU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zU=(e,{keyframes:t})=>t.length>2?DU:jl.has(e)?e.startsWith("scale")?kU(t[1]):RU:LU,$U=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function BU(e){for(const t in e)if(!$U.has(t))return!0;return!1}const DS=(e,t,n,r={},i,o)=>l=>{const u=kS(r,e)||{},f=u.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Yn(f);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-h,onUpdate:g=>{t.set(g),u.onUpdate&&u.onUpdate(g)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:i};BU(u)||Object.assign(m,zU(e,m)),m.duration&&(m.duration=Yn(m.duration)),m.repeatDelay&&(m.repeatDelay=Yn(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(j1(m),m.delay===0&&(y=!0)),(Oi.instantAnimations||Oi.skipAnimations||i!=null&&i.shouldSkipAnimations||u.skipAnimations)&&(y=!0,j1(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,y&&!o&&t.get()!==void 0){const g=Pp(m.keyframes,u);if(g!==void 0){ft.update(()=>{m.onUpdate(g),m.onComplete()});return}}return u.isSync?new yh(m):new CU(m)},IU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qU(e){const t=IU.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function d4(e,t,n=1){const[r,i]=qU(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return T3(l)?parseFloat(l):l}return TS(i)?d4(i,t,n+1):i}function qT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function LS(e,t,n,r){if(typeof t=="function"){const[i,o]=qT(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=qT(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function vs(e,t,n){const r=e.getProps();return LS(r,t,n!==void 0?n:r.custom,e)}const h4=new Set(["width","height","top","left","right","bottom",...bl]),S1=e=>Array.isArray(e);function UU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qo(n))}function VU(e){return S1(e)?e[e.length-1]||0:e}function HU(e,t){const n=vs(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const l in o){const u=VU(o[l]);UU(e,l,u)}}const un=e=>!!(e&&e.getVelocity);function GU(e){return!!(un(e)&&e.add)}function w1(e,t){const n=e.getValue("willChange");if(GU(n))return n.add(t);if(!n&&Oi.WillChange){const r=new Oi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zS(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const FU="framerAppearId",p4="data-"+zS(FU);function m4(e){return e.props[p4]}function KU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function y4(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:l,...u}=t;const f=e.getDefaultTransition();o=o?f4(o,f):f;const h=o==null?void 0:o.reduceMotion,m=o==null?void 0:o.skipAnimations;r&&(o=r);const y=[],g=i&&e.animationState&&e.animationState.getState()[i],j=o==null?void 0:o.path;j&&j.animateVisualElement(e,u,o,n,y);for(const S in u){const w=e.getValue(S,e.latestValues[S]??null),b=u[S];if(b===void 0||g&&KU(g,S))continue;const A={delay:n,...kS(o||{},S)};m&&(A.skipAnimations=!0);const _=w.get();if(_!==void 0&&!w.isAnimating()&&!Array.isArray(b)&&b===_&&!A.velocity){ft.update(()=>w.set(b));continue}let T=!1;if(window.MotionHandoffAnimation){const E=m4(e);if(E){const M=window.MotionHandoffAnimation(E,S,ft);M!==null&&(A.startTime=M,T=!0)}}w1(e,S);const C=h??e.shouldReduceMotion;w.start(DS(S,w,b,C&&h4.has(S)?{type:!1}:A,e,T));const O=w.animation;O&&y.push(O)}if(l){const S=()=>ft.update(()=>{l&&HU(e,l)});y.length?Promise.all(y).then(S):S()}return y}function A1(e,t,n={}){var f;const r=vs(e,t,n.type==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(y4(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:m=0,staggerChildren:y,staggerDirection:g}=i;return YU(e,t,h,m,y,g,n)}:()=>Promise.resolve(),{when:u}=i;if(u){const[h,m]=u==="beforeChildren"?[o,l]:[l,o];return h().then(()=>m())}else return Promise.all([o(),l(n.delay)])}function YU(e,t,n=0,r=0,i=0,o=1,l){const u=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),u.push(A1(f,t,{...l,delay:n+(typeof r=="function"?0:r)+u4(e.variantChildren,f,r,i,o)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(u)}function XU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>A1(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=A1(e,t,n);else{const i=typeof t=="function"?vs(e,t,n.custom):t;r=Promise.all(y4(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const WU={test:e=>e==="auto",parse:e=>e},v4=e=>t=>t.test(e),g4=[xl,xe,Kr,wa,Sq,jq,WU],UT=e=>g4.find(v4(e));function ZU(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||N3(e):!0}const QU=new Set(["brightness","contrast","saturate","opacity"]);function JU(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ES)||[];if(!r)return e;const i=n.replace(r,"");let o=QU.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const eV=/\b([a-z-]*)\(.*?\)/gu,O1={...Cr,getAnimatableNone:e=>{const t=e.match(eV);return t?t.map(JU).join(" "):e}},_1={...Cr,getAnimatableNone:e=>{const t=Cr.parse(e);return Cr.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},VT={...xl,transform:Math.round},tV={rotate:wa,pathRotation:wa,rotateX:wa,rotateY:wa,rotateZ:wa,scale:Md,scaleX:Md,scaleY:Md,scaleZ:Md,skew:wa,skewX:wa,skewY:wa,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:lu,originX:NT,originY:NT,originZ:xe},vh={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,inset:xe,insetBlock:xe,insetBlockStart:xe,insetBlockEnd:xe,insetInline:xe,insetInlineStart:xe,insetInlineEnd:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,paddingBlock:xe,paddingBlockStart:xe,paddingBlockEnd:xe,paddingInline:xe,paddingInlineStart:xe,paddingInlineEnd:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,marginBlock:xe,marginBlockStart:xe,marginBlockEnd:xe,marginInline:xe,marginInlineStart:xe,marginInlineEnd:xe,fontSize:xe,backgroundPositionX:xe,backgroundPositionY:xe,...tV,zIndex:VT,fillOpacity:lu,strokeOpacity:lu,numOctaves:VT},nV={...vh,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:O1,WebkitFilter:O1,mask:_1,WebkitMask:_1},x4=e=>nV[e],rV=new Set([O1,_1]);function b4(e,t){let n=x4(e);return rV.has(n)||(n=Cr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const aV=new Set(["auto","none","0"]);function iV(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!aV.has(o)&&Io(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=b4(n,i)}class sV extends RS{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let y=t[m];if(typeof y=="string"&&(y=y.trim(),TS(y))){const g=d4(y,n.current);g!==void 0&&(t[m]=g),m===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!h4.has(r)||t.length!==2)return;const[i,o]=t,l=UT(i),u=UT(o),f=ET(i),h=ET(o);if(f!==h&&xi[r]){this.needsMeasurement=!0;return}if(l!==u)if(zT(l)&&zT(u))for(let m=0;m<t.length;m++){const y=t[m];typeof y=="string"&&(t[m]=parseFloat(y))}else xi[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||ZU(t[i]))&&r.push(i);r.length&&iV(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=xi[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([f,h])=>{t.getValue(f).set(h)}),this.resolveNoneKeyframes()}}const $S=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function j4(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const T1=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Jd(e){return E3(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:BS}=U3(queueMicrotask,!1),Or={x:!1,y:!1};function S4(){return Or.x||Or.y}function oV(e){return e==="x"||e==="y"?Or[e]?null:(Or[e]=!0,()=>{Or[e]=!1}):Or.x||Or.y?null:(Or.x=Or.y=!0,()=>{Or.x=Or.y=!1})}function w4(e,t){const n=j4(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function lV(e){return!(e.pointerType==="touch"||S4())}function cV(e,t,n={}){const[r,i,o]=w4(e,n);return r.forEach(l=>{let u=!1,f=!1,h;const m=()=>{l.removeEventListener("pointerleave",S)},y=b=>{h&&(h(b),h=void 0),m()},g=b=>{u=!1,window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g),f&&(f=!1,y(b))},j=()=>{u=!0,window.addEventListener("pointerup",g,i),window.addEventListener("pointercancel",g,i)},S=b=>{if(b.pointerType!=="touch"){if(u){f=!0;return}y(b)}},w=b=>{if(!lV(b))return;f=!1;const A=t(l,b);typeof A=="function"&&(h=A,l.addEventListener("pointerleave",S,i))};l.addEventListener("pointerenter",w,i),l.addEventListener("pointerdown",j,i)}),o}const A4=(e,t)=>t?e===t?!0:A4(e,t.parentElement):!1,IS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,uV=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fV(e){return uV.has(e.tagName)||e.isContentEditable===!0}const dV=new Set(["INPUT","SELECT","TEXTAREA"]);function hV(e){return dV.has(e.tagName)||e.isContentEditable===!0}const eh=new WeakSet;function HT(e){return t=>{t.key==="Enter"&&e(t)}}function Fv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const pV=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=HT(()=>{if(eh.has(n))return;Fv(n,"down");const i=HT(()=>{Fv(n,"up")}),o=()=>Fv(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function GT(e){return IS(e)&&!S4()}const FT=new WeakSet;function mV(e,t,n={}){const[r,i,o]=w4(e,n),l=u=>{const f=u.currentTarget;if(!GT(u)||FT.has(u))return;eh.add(f),n.stopPropagation&&FT.add(u);const h=t(f,u),m={...i,capture:!0},y=(S,w)=>{window.removeEventListener("pointerup",g,m),window.removeEventListener("pointercancel",j,m),eh.has(f)&&eh.delete(f),GT(S)&&typeof h=="function"&&h(S,{success:w})},g=S=>{y(S,f===window||f===document||n.useGlobalTarget||A4(f,S.target))},j=S=>{y(S,!1)};window.addEventListener("pointerup",g,m),window.addEventListener("pointercancel",j,m)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,i),Jd(u)&&(u.addEventListener("focus",h=>pV(h,i)),!fV(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function qS(e){return E3(e)&&"ownerSVGElement"in e}const th=new WeakMap;let mi;const O4=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:qS(r)&&"getBBox"in r?r.getBBox()[t]:r[n],yV=O4("inline","width","offsetWidth"),vV=O4("block","height","offsetHeight");function gV({target:e,borderBoxSize:t}){var n;(n=th.get(e))==null||n.forEach(r=>{r(e,{get width(){return yV(e,t)},get height(){return vV(e,t)}})})}function xV(e){e.forEach(gV)}function bV(){typeof ResizeObserver>"u"||(mi=new ResizeObserver(xV))}function jV(e,t){mi||bV();const n=j4(e);return n.forEach(r=>{let i=th.get(r);i||(i=new Set,th.set(r,i)),i.add(t),mi==null||mi.observe(r)}),()=>{n.forEach(r=>{const i=th.get(r);i==null||i.delete(t),i!=null&&i.size||mi==null||mi.unobserve(r)})}}const nh=new Set;let To;function SV(){To=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};nh.forEach(t=>t(e))},window.addEventListener("resize",To)}function wV(e){return nh.add(e),To||SV(),()=>{nh.delete(e),!nh.size&&typeof To=="function"&&(window.removeEventListener("resize",To),To=void 0)}}function KT(e,t){return typeof e=="function"?wV(e):jV(e,t)}function AV(e){return qS(e)&&e.tagName==="svg"}const OV=[...g4,It,Cr],_V=e=>OV.find(v4(e)),YT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Eo=()=>({x:YT(),y:YT()}),XT=()=>({min:0,max:0}),Gt=()=>({x:XT(),y:XT()}),TV=new WeakMap;function Rp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function cu(e){return typeof e=="string"||Array.isArray(e)}const US=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],VS=["initial",...US];function kp(e){return Rp(e.animate)||VS.some(t=>cu(e[t]))}function _4(e){return!!(kp(e)||e.variants)}function EV(e,t,n){for(const r in t){const i=t[r],o=n[r];if(un(i))e.addValue(r,i);else if(un(o))e.addValue(r,qo(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(r);e.addValue(r,qo(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const E1={current:null},T4={current:!1},NV=typeof window<"u";function CV(){if(T4.current=!0,!!NV)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>E1.current=e.matches;e.addEventListener("change",t),t()}else E1.current=!1}const WT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let gh={};function E4(e){gh=e}function MV(){return gh}class PV{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:l,visualState:u},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=RS,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const j=gn.now();this.renderScheduledAt<j&&(this.renderScheduledAt=j,ft.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=u;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=kp(n),this.isVariantNode=_4(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:y,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const j in g){const S=g[j];h[j]!==void 0&&un(S)&&S.set(h[j])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,TV.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,o)=>this.bindToMotionValue(o,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(T4.current||CV(),this.shouldReduceMotion=E1.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),_i(this.notifyUpdate),_i(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&c4.has(t)&&this.current instanceof HTMLElement){const{factory:l,keyframes:u,times:f,ease:h,duration:m}=n.accelerate,y=new o4({element:this.current,name:t,keyframes:u,times:f,ease:h,duration:Yn(m)}),g=l(y);this.valueSubscriptions.set(t,()=>{g(),y.cancel()});return}const r=jl.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ft.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in gh){const n=gh[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<WT.length;r++){const i=WT[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,l=t[o];l&&(this.propEventSubscriptions[i]=this.on(i,l))}this.prevMotionValues=EV(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(T3(r)||N3(r))?r=parseFloat(r):!_V(r)&&Cr.test(n)&&(r=b4(t,n)),this.setBaseTarget(t,un(r)?r.get():r)),un(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=LS(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!un(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new AS),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){BS.render(this.render)}}class N4 extends PV{constructor(){super(...arguments),this.KeyframeResolver=sV}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ci{constructor(t){this.isMounted=!1,this.node=t}update(){}}function C4({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function RV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kv(e){return e===void 0||e===1}function N1({scale:e,scaleX:t,scaleY:n}){return!Kv(e)||!Kv(t)||!Kv(n)}function as(e){return N1(e)||M4(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function M4(e){return ZT(e.x)||ZT(e.y)}function ZT(e){return e&&e!=="0%"}function xh(e,t,n){const r=e-n,i=t*r;return n+i}function QT(e,t,n,r,i){return i!==void 0&&(e=xh(e,i,r)),xh(e,n,r)+t}function C1(e,t=0,n=1,r,i){e.min=QT(e.min,t,n,r,i),e.max=QT(e.max,t,n,r,i)}function P4(e,{x:t,y:n}){C1(e.x,t.translate,t.scale,t.originPoint),C1(e.y,n.translate,n.scale,n.originPoint)}const JT=.999999999999,eE=1.0000000000001;function DV(e,t,n,r=!1){var u;const i=n.length;if(!i)return;t.x=t.y=1;let o,l;for(let f=0;f<i;f++){o=n[f],l=o.projectionDelta;const{visualElement:h}=o.options;h&&h.props.style&&h.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Hr(e.x,-o.scroll.offset.x),Hr(e.y,-o.scroll.offset.y)),l&&(t.x*=l.x.scale,t.y*=l.y.scale,P4(e,l)),r&&as(o.latestValues)&&rh(e,o.latestValues,(u=o.layout)==null?void 0:u.layoutBox))}t.x<eE&&t.x>JT&&(t.x=1),t.y<eE&&t.y>JT&&(t.y=1)}function Hr(e,t){e.min+=t,e.max+=t}function tE(e,t,n,r,i=.5){const o=ut(e.min,e.max,i);C1(e,t,n,o,r)}function nE(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function rh(e,t,n){const r=n??e;tE(e.x,nE(t.x,r.x),t.scaleX,t.scale,t.originX),tE(e.y,nE(t.y,r.y),t.scaleY,t.scale,t.originY)}function R4(e,t){return C4(kV(e.getBoundingClientRect(),t))}function LV(e,t,n){const r=R4(e,n),{scroll:i}=t;return i&&(Hr(r.x,i.offset.x),Hr(r.y,i.offset.y)),r}const zV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$V=bl.length;function BV(e,t,n){let r="",i=!0;for(let l=0;l<$V;l++){const u=bl[l],f=e[u];if(f===void 0)continue;let h=!0;if(typeof f=="number")h=f===(u.startsWith("scale")?1:0);else{const m=parseFloat(f);h=u.startsWith("scale")?m===1:m===0}if(!h||n){const m=T1(f,vh[u]);if(!h){i=!1;const y=zV[u]||u;r+=`${y}(${m}) `}n&&(t[u]=m)}}const o=e.pathRotation;return o&&(i=!1,r+=`rotate(${T1(o,vh.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function HS(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let l=!1,u=!1;for(const f in t){const h=t[f];if(jl.has(f)){l=!0;continue}else if(H3(f)){i[f]=h;continue}else{const m=T1(h,vh[f]);f.startsWith("origin")?(u=!0,o[f]=m):r[f]=m}}if(t.transform||(l||n?r.transform=BV(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:m=0}=o;r.transformOrigin=`${f} ${h} ${m}`}}function k4(e,{style:t,vars:n},r,i){const o=e.style;let l;for(l in t)o[l]=t[l];i==null||i.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function rE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ec={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=rE(e,t.target.x),r=rE(e,t.target.y);return`${n}% ${r}%`}},IV={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Cr.parse(e);if(i.length>5)return r;const o=Cr.createTransformer(e),l=typeof i[0]!="number"?1:0,u=n.x.scale*t.x,f=n.y.scale*t.y;i[0+l]/=u,i[1+l]/=f;const h=ut(u,f,.5);return typeof i[2+l]=="number"&&(i[2+l]/=h),typeof i[3+l]=="number"&&(i[3+l]/=h),o(i)}},M1={borderRadius:{...Ec,applyTo:[...$S]},borderTopLeftRadius:Ec,borderTopRightRadius:Ec,borderBottomLeftRadius:Ec,borderBottomRightRadius:Ec,boxShadow:IV};function D4(e,{layout:t,layoutId:n}){return jl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!M1[e]||e==="opacity")}function GS(e,t,n){var l;const r=e.style,i=t==null?void 0:t.style,o={};if(!r)return o;for(const u in r)(un(r[u])||i&&un(i[u])||D4(u,e)||((l=n==null?void 0:n.getValue(u))==null?void 0:l.liveStyle)!==void 0)&&(o[u]=r[u]);return o}function qV(e){return window.getComputedStyle(e)}class UV extends N4{constructor(){super(...arguments),this.type="html",this.renderInstance=k4}readValueFromInstance(t,n){var r;if(jl.has(n))return(r=this.projection)!=null&&r.isProjecting?y1(n):lU(t,n);{const i=qV(t),o=(H3(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return R4(t,n)}build(t,n,r){HS(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return GS(t,n,r)}}const VV={offset:"stroke-dashoffset",array:"stroke-dasharray"},HV={offset:"strokeDashoffset",array:"strokeDasharray"};function GV(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?VV:HV;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const FV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function L4(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:l=0,...u},f,h,m){if(HS(e,u,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:g}=e;y.transform&&(g.transform=y.transform,delete y.transform),(g.transform||y.transformOrigin)&&(g.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),g.transform&&(g.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete y.transformBox);for(const j of FV)y[j]!==void 0&&(g[j]=y[j],delete y[j]);t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),r!==void 0&&(y.scale=r),i!==void 0&&GV(y,i,o,l,!1)}const z4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),$4=e=>typeof e=="string"&&e.toLowerCase()==="svg";function KV(e,t,n,r){k4(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(z4.has(i)?i:zS(i),t.attrs[i])}function B4(e,t,n){const r=GS(e,t,n);for(const i in e)if(un(e[i])||un(t[i])){const o=bl.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}class YV extends N4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(jl.has(n)){const r=x4(n);return r&&r.default||0}return n=z4.has(n)?n:zS(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return B4(t,n,r)}build(t,n,r){L4(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){KV(t,n,r,i)}mount(t){this.isSVGTag=$4(t.tagName),super.mount(t)}}const XV=VS.length;function I4(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?I4(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<XV;n++){const r=VS[n],i=e.props[r];(cu(i)||i===!1)&&(t[r]=i)}return t}function q4(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const WV=[...US].reverse(),ZV=US.length;function QV(e){return t=>Promise.all(t.map(({animation:n,options:r})=>XU(e,n,r)))}function JV(e){let t=QV(e),n=aE(),r=!0,i=!1;const o=h=>(m,y)=>{var j;const g=vs(e,y,h==="exit"?(j=e.presenceContext)==null?void 0:j.custom:void 0);if(g){const{transition:S,transitionEnd:w,...b}=g;m={...m,...b,...w}}return m};function l(h){t=h(e)}function u(h){const{props:m}=e,y=I4(e.parent)||{},g=[],j=new Set;let S={},w=1/0;for(let A=0;A<ZV;A++){const _=WV[A],T=n[_],C=m[_]!==void 0?m[_]:y[_],O=cu(C),E=_===h?T.isActive:null;E===!1&&(w=A);let M=C===y[_]&&C!==m[_]&&O;if(M&&(r||i)&&e.manuallyAnimateOnMount&&(M=!1),T.protectedKeys={...S},!T.isActive&&E===null||!C&&!T.prevProp||Rp(C)||typeof C=="boolean")continue;if(_==="exit"&&T.isActive&&E!==!0){T.prevResolvedValues&&(S={...S,...T.prevResolvedValues});continue}const D=e9(T.prevProp,C);let k=D||_===h&&T.isActive&&!M&&O||A>w&&O,B=!1;const q=Array.isArray(C)?C:[C];let $=q.reduce(o(_),{});E===!1&&($={});const{prevResolvedValues:F={}}=T,X={...F,...$},Y=Q=>{k=!0,j.has(Q)&&(B=!0,j.delete(Q)),T.needsAnimating[Q]=!0;const ae=e.getValue(Q);ae&&(ae.liveStyle=!1)};for(const Q in X){const ae=$[Q],oe=F[Q];if(S.hasOwnProperty(Q))continue;let z=!1;S1(ae)&&S1(oe)?z=!q4(ae,oe)||D:z=ae!==oe,z?ae!=null?Y(Q):j.add(Q):ae!==void 0&&j.has(Q)?Y(Q):T.protectedKeys[Q]=!0}T.prevProp=C,T.prevResolvedValues=$,T.isActive&&(S={...S,...$}),(r||i)&&e.blockInitialAnimation&&(k=!1);const L=M&&D;k&&(!L||B)&&g.push(...q.map(Q=>{const ae={type:_};if(typeof Q=="string"&&(r||i)&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,z=vs(oe,Q);if(oe.enteringChildren&&z){const{delayChildren:G}=z.transition||{};ae.delay=u4(oe.enteringChildren,e,G)}}return{animation:Q,options:ae}}))}if(j.size){const A={};if(typeof m.initial!="boolean"){const _=vs(e,Array.isArray(m.initial)?m.initial[0]:m.initial);_&&_.transition&&(A.transition=_.transition)}j.forEach(_=>{const T=e.getBaseTarget(_),C=e.getValue(_);C&&(C.liveStyle=!0),A[_]=T??null}),g.push({animation:A})}let b=!!g.length;return r&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,i=!1,b?t(g):Promise.resolve()}function f(h,m){var g;if(n[h].isActive===m)return Promise.resolve();(g=e.variantChildren)==null||g.forEach(j=>{var S;return(S=j.animationState)==null?void 0:S.setActive(h,m)}),n[h].isActive=m;const y=u(h);for(const j in n)n[j].protectedKeys={};return y}return{animateChanges:u,setActive:f,setAnimateFunction:l,getState:()=>n,reset:()=>{n=aE(),i=!0}}}function e9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!q4(t,e):!1}function es(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function aE(){return{animate:es(!0),whileInView:es(),whileHover:es(),whileTap:es(),whileDrag:es(),whileFocus:es(),exit:es()}}function P1(e,t){e.min=t.min,e.max=t.max}function wr(e,t){P1(e.x,t.x),P1(e.y,t.y)}function iE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const U4=1e-4,t9=1-U4,n9=1+U4,V4=.01,r9=0-V4,a9=0+V4;function xn(e){return e.max-e.min}function i9(e,t,n){return Math.abs(e-t)<=n}function sE(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=xn(n)/xn(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=t9&&e.scale<=n9||isNaN(e.scale))&&(e.scale=1),(e.translate>=r9&&e.translate<=a9||isNaN(e.translate))&&(e.translate=0)}function Yc(e,t,n,r){sE(e.x,t.x,n.x,r?r.originX:void 0),sE(e.y,t.y,n.y,r?r.originY:void 0)}function oE(e,t,n,r=0){const i=r?ut(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+xn(t)}function s9(e,t,n,r){oE(e.x,t.x,n.x,r==null?void 0:r.x),oE(e.y,t.y,n.y,r==null?void 0:r.y)}function lE(e,t,n,r=0){const i=r?ut(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+xn(t)}function bh(e,t,n,r){lE(e.x,t.x,n.x,r==null?void 0:r.x),lE(e.y,t.y,n.y,r==null?void 0:r.y)}function cE(e,t,n,r,i){return e-=t,e=xh(e,1/n,r),i!==void 0&&(e=xh(e,1/i,r)),e}function o9(e,t=0,n=1,r=.5,i,o=e,l=e){if(Kr.test(t)&&(t=parseFloat(t),t=ut(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=ut(o.min,o.max,r);e===o&&(u-=t),e.min=cE(e.min,t,n,u,i),e.max=cE(e.max,t,n,u,i)}function uE(e,t,[n,r,i],o,l){o9(e,t[n],t[r],t[i],t.scale,o,l)}const l9=["x","scaleX","originX"],c9=["y","scaleY","originY"];function fE(e,t,n,r){uE(e.x,t,l9,n?n.x:void 0,r?r.x:void 0),uE(e.y,t,c9,n?n.y:void 0,r?r.y:void 0)}function dE(e){return e.translate===0&&e.scale===1}function H4(e){return dE(e.x)&&dE(e.y)}function hE(e,t){return e.min===t.min&&e.max===t.max}function u9(e,t){return hE(e.x,t.x)&&hE(e.y,t.y)}function pE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function G4(e,t){return pE(e.x,t.x)&&pE(e.y,t.y)}function mE(e){return xn(e.x)/xn(e.y)}function yE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Vr(e){return[e("x"),e("y")]}function f9(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((i||o||l)&&(r=`translate3d(${i}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,pathRotation:y,rotateX:g,rotateY:j,skewX:S,skewY:w}=n;h&&(r=`perspective(${h}px) ${r}`),m&&(r+=`rotate(${m}deg) `),y&&(r+=`rotate(${y}deg) `),g&&(r+=`rotateX(${g}deg) `),j&&(r+=`rotateY(${j}deg) `),S&&(r+=`skewX(${S}deg) `),w&&(r+=`skewY(${w}deg) `)}const u=e.x.scale*t.x,f=e.y.scale*t.y;return(u!==1||f!==1)&&(r+=`scale(${u}, ${f})`),r||"none"}const d9=$S.length,vE=e=>typeof e=="string"?parseFloat(e):e,gE=e=>typeof e=="number"||xe.test(e);function h9(e,t,n,r,i,o){i?(e.opacity=ut(0,n.opacity??1,p9(r)),e.opacityExit=ut(t.opacity??1,0,m9(r))):o&&(e.opacity=ut(t.opacity??1,n.opacity??1,r));for(let l=0;l<d9;l++){const u=$S[l];let f=xE(t,u),h=xE(n,u);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||gE(f)===gE(h)?(e[u]=Math.max(ut(vE(f),vE(h),r),0),(Kr.test(h)||Kr.test(f))&&(e[u]+="%")):e[u]=h}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function xE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const p9=F4(0,.5,$3),m9=F4(.5,.95,pr);function F4(e,t,n){return r=>r<e?0:r>t?1:n(ou(e,t,r))}function y9(e,t,n){const r=un(e)?e:qo(e);return r.start(DS("",r,t,n)),r.animation}function uu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const v9=(e,t)=>e.depth-t.depth;class g9{constructor(){this.children=[],this.isDirty=!1}add(t){SS(this.children,t),this.isDirty=!0}remove(t){dh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(v9),this.isDirty=!1,this.children.forEach(t)}}function x9(e,t){const n=gn.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(_i(r),e(o-t))};return ft.setup(r,!0),()=>_i(r)}function ah(e){return un(e)?e.get():e}class b9{constructor(){this.members=[]}add(t){SS(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(dh(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(dh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:l}=t.options;(o===void 0||o!==l)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,l;(r=(n=t.options).onExitComplete)==null||r.call(n),(l=(i=t.resumingFrom)==null?void 0:(o=i.options).onExitComplete)==null||l.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const ih={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Yv=["","X","Y","Z"],j9=1e3;let S9=0;function Xv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function K4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=m4(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&K4(r)}function Y4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},u=t==null?void 0:t()){this.id=S9++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(O9),this.nodes.forEach(M9),this.nodes.forEach(P9),this.nodes.forEach(_9)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new g9)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new AS),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const f=this.eventHandlers.get(l);f&&f.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=qS(l)&&!AV(l),this.instance=l;const{layoutId:u,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||u)&&(this.isLayoutDirty=!0),e){let m,y=0;const g=()=>this.root.updateBlockedByResize=!1;ft.read(()=>{y=window.innerWidth}),e(l,()=>{const j=window.innerWidth;j!==y&&(y=j,this.root.updateBlockedByResize=!0,m&&m(),m=x9(g,250),ih.hasAnimatedSinceResize&&(ih.hasAnimatedSinceResize=!1,this.nodes.forEach(SE)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||f)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:g,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||z9,{onLayoutAnimationStart:w,onLayoutAnimationComplete:b}=h.getProps(),A=!this.targetLayout||!G4(this.targetLayout,j),_=!y&&g;if(this.options.layoutRoot||this.resumeFrom||_||y&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...kS(S,"layout"),onPlay:w,onComplete:b};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,_,T.path)}else y||SE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_i(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(R9),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&K4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:u,layout:f}=this.options;if(u===void 0&&!f)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const f=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),f&&this.nodes.forEach(E9),this.nodes.forEach(bE);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(jE);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(N9),this.nodes.forEach(C9),this.nodes.forEach(w9),this.nodes.forEach(A9)):this.nodes.forEach(jE),this.clearAllSnapshots();const u=gn.now();cn.delta=Zr(0,1e3/60,u-cn.timestamp),cn.timestamp=u,cn.isProcessing=!0,Iv.update.process(cn),Iv.preRender.process(cn),Iv.render.process(cn),cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,BS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(T9),this.sharedNodes.forEach(k9)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xn(this.snapshot.measuredBox.x)&&!xn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Gt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const f=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!H4(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;l&&this.instance&&(u||as(this.latestValues)||m)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let f=this.removeElementScroll(u);return l&&(f=this.removeTransform(f)),$9(f),{animationId:this.root.animationId,measuredBox:u,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:l}=this.options;if(!l)return Gt();const u=l.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(B9))){const{scroll:m}=this.root;m&&(Hr(u.x,m.offset.x),Hr(u.y,m.offset.y))}return u}removeElementScroll(l){var f;const u=Gt();if(wr(u,l),(f=this.scroll)!=null&&f.wasRoot)return u;for(let h=0;h<this.path.length;h++){const m=this.path[h],{scroll:y,options:g}=m;m!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&wr(u,l),Hr(u.x,y.offset.x),Hr(u.y,y.offset.y))}return u}applyTransform(l,u=!1,f){var m,y;const h=f||Gt();wr(h,l);for(let g=0;g<this.path.length;g++){const j=this.path[g];!u&&j.options.layoutScroll&&j.scroll&&j!==j.root&&(Hr(h.x,-j.scroll.offset.x),Hr(h.y,-j.scroll.offset.y)),as(j.latestValues)&&rh(h,j.latestValues,(m=j.layout)==null?void 0:m.layoutBox)}return as(this.latestValues)&&rh(h,this.latestValues,(y=this.layout)==null?void 0:y.layoutBox),h}removeTransform(l){var f;const u=Gt();wr(u,l);for(let h=0;h<this.path.length;h++){const m=this.path[h];if(!as(m.latestValues))continue;let y;m.instance&&(N1(m.latestValues)&&m.updateSnapshot(),y=Gt(),wr(y,m.measurePageBox())),fE(u,m.latestValues,(f=m.snapshot)==null?void 0:f.layoutBox,y)}return as(this.latestValues)&&fE(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var j;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==u;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!this.layout||!(m||y))return;this.resolvedRelativeTargetAt=cn.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Gt(),this.targetWithTransforms=Gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s9(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):wr(this.target,this.layout.layoutBox),P4(this.target,this.targetDelta)):wr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||N1(this.parent.latestValues)||M4(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,u,f){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gt(),this.relativeTargetOrigin=Gt(),bh(this.relativeTargetOrigin,u,f,this.options.layoutAnchor||void 0),wr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var S;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let f=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&(f=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===cn.timestamp&&(f=!1),f)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;wr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,g=this.treeScale.y;DV(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Gt());const{target:j}=l;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(iE(this.prevProjectionDelta.x,this.projectionDelta.x),iE(this.prevProjectionDelta.y,this.projectionDelta.y)),Yc(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==g||!yE(this.projectionDelta.x,this.prevProjectionDelta.x)||!yE(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Eo(),this.projectionDelta=Eo(),this.projectionDeltaWithTransform=Eo()}setAnimationOrigin(l,u=!1,f){const h=this.snapshot,m=h?h.latestValues:{},y={...this.latestValues},g=Eo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const j=Gt(),S=h?h.source:void 0,w=this.layout?this.layout.source:void 0,b=S!==w,A=this.getStack(),_=!A||A.members.length<=1,T=!!(b&&!_&&this.options.crossfade===!0&&!this.path.some(L9));this.animationProgress=0;let C;const O=f==null?void 0:f.interpolateProjection(l);this.mixTargetDelta=E=>{const M=E/1e3,D=O==null?void 0:O(M);D?(g.x.translate=D.x,g.x.scale=ut(l.x.scale,1,M),g.x.origin=l.x.origin,g.x.originPoint=l.x.originPoint,g.y.translate=D.y,g.y.scale=ut(l.y.scale,1,M),g.y.origin=l.y.origin,g.y.originPoint=l.y.originPoint):(wE(g.x,l.x,M),wE(g.y,l.y,M)),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bh(j,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),D9(this.relativeTarget,this.relativeTargetOrigin,j,M),C&&u9(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Gt()),wr(C,this.relativeTarget)),b&&(this.animationValues=y,h9(y,m,this.latestValues,M,T,_)),D&&D.rotate!==void 0&&(this.animationValues||(this.animationValues=y),this.animationValues.pathRotation=D.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,f,h;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(h=(f=this.resumingFrom)==null?void 0:f.currentAnimation)==null||h.stop(),this.pendingAnimation&&(_i(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{ih.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qo(0)),this.motionValue.jump(0,!1),this.currentAnimation=y9(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(j9),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:f,layout:h,latestValues:m}=l;if(!(!u||!f||!h)){if(this!==l&&this.layout&&h&&X4(this.options.animationType,this.layout.layoutBox,h.layoutBox)){f=this.target||Gt();const y=xn(this.layout.layoutBox.x);f.x.min=l.target.x.min,f.x.max=f.x.min+y;const g=xn(this.layout.layoutBox.y);f.y.min=l.target.y.min,f.y.max=f.y.min+g}wr(u,f),rh(u,m),Yc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new b9),this.sharedNodes.get(l).add(u);const h=u.options.initialPromotionConfig;u.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:f}={}){const h=this.getStack();h&&h.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:f}=l;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(u=!0),!u)return;const h={};f.z&&Xv("z",l,h,this.animationValues);for(let m=0;m<Yv.length;m++)Xv(`rotate${Yv[m]}`,l,h,this.animationValues),Xv(`skew${Yv[m]}`,l,h,this.animationValues);l.render();for(const m in h)l.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);l.scheduleRender()}applyProjectionStyles(l,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=ah(u==null?void 0:u.pointerEvents)||"",l.transform=f?f(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=ah(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!as(this.latestValues)&&(l.transform=f?f({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=f9(this.projectionDeltaWithTransform,this.treeScale,m);f&&(y=f(m,y)),l.transform=y;const{x:g,y:j}=this.projectionDelta;l.transformOrigin=`${g.origin*100}% ${j.origin*100}% 0`,h.animationValues?l.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const S in M1){if(m[S]===void 0)continue;const{correct:w,applyTo:b,isCSSVariable:A}=M1[S],_=y==="none"?m[S]:w(m[S],h);if(b){const T=b.length;for(let C=0;C<T;C++)l[b[C]]=_}else A?this.options.visualElement.renderState.vars[S]=_:l[S]=_}this.options.layoutId&&(l.pointerEvents=h===this?ah(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(bE),this.root.sharedNodes.clear()}}}function w9(e){e.updateLayout()}function A9(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;if(o==="size")Vr(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],j=xn(g);g.min=r[y].min,g.max=g.min+j});else if(o==="x"||o==="y"){const y=o==="x"?"y":"x";P1(l?t.measuredBox[y]:t.layoutBox[y],r[y])}else X4(o,t.layoutBox,r)&&Vr(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],j=xn(r[y]);g.max=g.min+j,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+j)});const u=Eo();Yc(u,r,t.layoutBox);const f=Eo();l?Yc(f,e.applyTransform(i,!0),t.measuredBox):Yc(f,r,t.layoutBox);const h=!H4(u);let m=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:j}=y;if(g&&j){const S=e.options.layoutAnchor||void 0,w=Gt();bh(w,t.layoutBox,g.layoutBox,S);const b=Gt();bh(b,r,j.layoutBox,S),G4(w,b)||(m=!0),y.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function O9(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _9(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function T9(e){e.clearSnapshot()}function bE(e){e.clearMeasurements()}function E9(e){e.isLayoutDirty=!0,e.updateLayout()}function jE(e){e.isLayoutDirty=!1}function N9(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function C9(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function SE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function M9(e){e.resolveTargetDelta()}function P9(e){e.calcProjection()}function R9(e){e.resetSkewAndRotation()}function k9(e){e.removeLeadSnapshot()}function wE(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function AE(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function D9(e,t,n,r){AE(e.x,t.x,n.x,r),AE(e.y,t.y,n.y,r)}function L9(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const z9={duration:.45,ease:[.4,0,.1,1]},OE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_E=OE("applewebkit/")&&!OE("chrome/")?Math.round:pr;function TE(e){e.min=_E(e.min),e.max=_E(e.max)}function $9(e){TE(e.x),TE(e.y)}function X4(e,t,n){return e==="position"||e==="preserve-aspect"&&!i9(mE(t),mE(n),.2)}function B9(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const I9=Y4({attachResizeListener:(e,t)=>uu(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Wv={current:void 0},W4=Y4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wv.current){const e=new I9({});e.mount(window),e.setOptions({layoutScroll:!0}),Wv.current=e}return Wv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),FS=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function EE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function q9(...e){return t=>{let n=!1;const r=e.map(i=>{const o=EE(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():EE(e[i],null)}}}}function U9(...e){return P.useCallback(q9(...e),e)}class V9 extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Jd(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Jd(r)&&r.offsetWidth||0,o=Jd(r)&&r.offsetHeight||0,l=getComputedStyle(n),u=this.props.sizeRef.current;u.height=parseFloat(l.height),u.width=parseFloat(l.width),u.top=n.offsetTop,u.left=n.offsetLeft,u.right=i-u.width-u.left,u.bottom=o-u.height-u.top,u.direction=l.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function H9({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){var g;const l=P.useId(),u=P.useRef(null),f=P.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=P.useContext(FS),m=((g=e.props)==null?void 0:g.ref)??(e==null?void 0:e.ref),y=U9(u,m);return P.useInsertionEffect(()=>{const{width:j,height:S,top:w,left:b,right:A,bottom:_,direction:T}=f.current;if(t||o===!1||!u.current||!j||!S)return;const C=T==="rtl",O=n==="left"?C?`right: ${A}`:`left: ${b}`:C?`left: ${b}`:`right: ${A}`,E=r==="bottom"?`bottom: ${_}`:`top: ${w}`;u.current.dataset.motionPopId=l;const M=document.createElement("style");h&&(M.nonce=h);const D=i??document.head;return D.appendChild(M),M.sheet&&M.sheet.insertRule(`
[data-motion-pop-id="${l}"] {
position: absolute !important;
width: ${j}px !important;
height: ${S}px !important;
${O}px !important;
${E}px !important;
}
`),()=>{var k;(k=u.current)==null||k.removeAttribute("data-motion-pop-id"),D.contains(M)&&D.removeChild(M)}},[t]),d.jsx(V9,{isPresent:t,childRef:u,sizeRef:f,pop:o,children:o===!1?e:P.cloneElement(e,{ref:y})})}const G9=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:l,anchorX:u,anchorY:f,root:h})=>{const m=bS(F9),y=P.useId(),g=P.useRef(n),j=P.useRef(r);jS(()=>{g.current=n,j.current=r});let S=!0,w=P.useMemo(()=>(S=!1,{id:y,initial:t,isPresent:n,custom:i,onExitComplete:b=>{m.set(b,!0);for(const A of m.values())if(!A)return;r&&r()},register:b=>(m.set(b,!1),()=>{var A;m.delete(b),!g.current&&!m.size&&((A=j.current)==null||A.call(j))})}),[n,m,r]);return o&&S&&(w={...w}),P.useMemo(()=>{m.forEach((b,A)=>m.set(A,!1))},[n]),P.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=d.jsx(H9,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:f,root:h,children:e}),d.jsx(Mp.Provider,{value:w,children:e})};function F9(){return new Map}function Z4(e=!0){const t=P.useContext(Mp);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=P.useId();P.useEffect(()=>{if(e)return i(o)},[e]);const l=P.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const Pd=e=>e.key||"";function NE(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const Xc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",anchorY:f="top",root:h})=>{const[m,y]=Z4(l),g=P.useMemo(()=>NE(e),[e]),j=l&&!m?[]:g.map(Pd),S=P.useRef(!0),w=P.useRef(g),b=bS(()=>new Map),A=P.useRef(new Set),[_,T]=P.useState(g),[C,O]=P.useState(g);jS(()=>{S.current=!1,w.current=g;for(let D=0;D<C.length;D++){const k=Pd(C[D]);j.includes(k)?(b.delete(k),A.current.delete(k)):b.get(k)!==!0&&b.set(k,!1)}},[C,j.length,j.join("-")]);const E=[];if(g!==_){let D=[...g];for(let k=0;k<C.length;k++){const B=C[k],q=Pd(B);j.includes(q)||(D.splice(k,0,B),E.push(B))}return o==="wait"&&E.length&&(D=E),O(NE(D)),T(g),null}const{forceRender:M}=P.useContext(xS);return d.jsx(d.Fragment,{children:C.map(D=>{const k=Pd(D),B=l&&!m?!1:g===C||j.includes(k),q=()=>{if(A.current.has(k))return;if(b.has(k))A.current.add(k),b.set(k,!0);else return;let $=!0;b.forEach(F=>{F||($=!1)}),$&&(M==null||M(),O(w.current),l&&(y==null||y()),r&&r())};return d.jsx(G9,{isPresent:B,initial:!S.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:h,onExitComplete:B?void 0:q,anchorX:u,anchorY:f,children:D},k)})})},Q4=P.createContext({strict:!1}),CE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ME=!1;function K9(){if(ME)return;const e={};for(const t in CE)e[t]={isEnabled:n=>CE[t].some(r=>!!n[r])};E4(e),ME=!0}function J4(){return K9(),MV()}function Y9(e){const t=J4();for(const n in e)t[n]={...t[n],...e[n]};E4(t)}const X9=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function jh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||X9.has(e)}let eL=e=>!jh(e);function W9(e){typeof e=="function"&&(eL=t=>t.startsWith("on")?!jh(t):e(t))}try{W9(require("@emotion/is-prop-valid").default)}catch{}function Z9(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||un(e[i])||(eL(i)||n===!0&&jh(i)||!t&&!jh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Dp=P.createContext({});function Q9(e,t){if(kp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||cu(n)?n:void 0,animate:cu(r)?r:void 0}}return e.inherit!==!1?t:{}}function J9(e){const{initial:t,animate:n}=Q9(e,P.useContext(Dp));return P.useMemo(()=>({initial:t,animate:n}),[PE(t),PE(n)])}function PE(e){return Array.isArray(e)?e.join(" "):e}const KS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function tL(e,t,n){for(const r in t)!un(t[r])&&!D4(r,n)&&(e[r]=t[r])}function e7({transformTemplate:e},t){return P.useMemo(()=>{const n=KS();return HS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function t7(e,t){const n=e.style||{},r={};return tL(r,n,e),Object.assign(r,e7(e,t)),r}function n7(e,t){const n={},r=t7(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const nL=()=>({...KS(),attrs:{}});function r7(e,t,n,r){const i=P.useMemo(()=>{const o=nL();return L4(o,t,$4(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};tL(o,e.style,e),i.style={...o,...i.style}}return i}const a7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function YS(e){return typeof e!="string"||e.includes("-")?!1:!!(a7.indexOf(e)>-1||/[A-Z]/u.test(e))}function i7(e,t,n,{latestValues:r},i,o=!1,l){const f=(l??YS(e)?r7:n7)(t,r,i,e),h=Z9(t,typeof e=="string",o),m=e!==P.Fragment?{...h,...f,ref:n}:{},{children:y}=t,g=P.useMemo(()=>un(y)?y.get():y,[y]);return P.createElement(e,{...m,children:g})}function s7({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:o7(n,r,i,e),renderState:t()}}function o7(e,t,n,r){const i={},o=r(e,{});for(const g in o)i[g]=ah(o[g]);let{initial:l,animate:u}=e;const f=kp(e),h=_4(e);t&&h&&!f&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const y=m?u:l;if(y&&typeof y!="boolean"&&!Rp(y)){const g=Array.isArray(y)?y:[y];for(let j=0;j<g.length;j++){const S=LS(e,g[j]);if(S){const{transitionEnd:w,transition:b,...A}=S;for(const _ in A){let T=A[_];if(Array.isArray(T)){const C=m?T.length-1:0;T=T[C]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}}}return i}const rL=e=>(t,n)=>{const r=P.useContext(Dp),i=P.useContext(Mp),o=()=>s7(e,t,r,i);return n?o():bS(o)},l7=rL({scrapeMotionValuesFromProps:GS,createRenderState:KS}),c7=rL({scrapeMotionValuesFromProps:B4,createRenderState:nL}),u7=Symbol.for("motionComponentSymbol");function f7(e,t,n){const r=P.useRef(n);P.useInsertionEffect(()=>{r.current=n});const i=P.useRef(null);return P.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const l=r.current;if(typeof l=="function")if(o){const f=l(o);typeof f=="function"&&(i.current=f)}else i.current?(i.current(),i.current=null):l(o);else l&&(l.current=o)},[t])}const aL=P.createContext({});function Oo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function d7(e,t,n,r,i,o){var T,C;const{visualElement:l}=P.useContext(Dp),u=P.useContext(Q4),f=P.useContext(Mp),h=P.useContext(FS),m=h.reducedMotion,y=h.skipAnimations,g=P.useRef(null),j=P.useRef(!1);r=r||u.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:o}),j.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));const S=g.current,w=P.useContext(aL);S&&!S.projection&&i&&(S.type==="html"||S.type==="svg")&&h7(g.current,n,i,w);const b=P.useRef(!1);P.useInsertionEffect(()=>{S&&b.current&&S.update(n,f)});const A=n[p4],_=P.useRef(!!A&&typeof window<"u"&&!((T=window.MotionHandoffIsComplete)!=null&&T.call(window,A))&&((C=window.MotionHasOptimisedAnimation)==null?void 0:C.call(window,A)));return jS(()=>{j.current=!0,S&&(b.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),_.current&&S.animationState&&S.animationState.animateChanges())}),P.useEffect(()=>{S&&(!_.current&&S.animationState&&S.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var O;(O=window.MotionHandoffMarkAsComplete)==null||O.call(window,A)}),_.current=!1),S.enteringChildren=void 0)}),S}function h7(e,t,n,r){const{layoutId:i,layout:o,drag:l,dragConstraints:u,layoutScroll:f,layoutRoot:h,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:iL(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||u&&Oo(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:f,layoutRoot:h,layoutAnchor:m})}function iL(e){if(e)return e.options.allowProjection!==!1?e.projection:iL(e.parent)}function Zv(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Y9(r);const o=n?n==="svg":YS(e),l=o?c7:l7;function u(h,m){let y;const g={...P.useContext(FS),...h,layoutId:p7(h)},{isStatic:j}=g,S=J9(h),w=l(h,j);if(!j&&typeof window<"u"){m7();const b=y7(g);y=b.MeasureLayout,S.visualElement=d7(e,w,g,i,b.ProjectionNode,o)}return d.jsxs(Dp.Provider,{value:S,children:[y&&S.visualElement?d.jsx(y,{visualElement:S.visualElement,...g}):null,i7(e,h,f7(w,S.visualElement,m),w,j,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=P.forwardRef(u);return f[u7]=e,f}function p7({layoutId:e}){const t=P.useContext(xS).id;return t&&e!==void 0?t+"-"+e:e}function m7(e,t){P.useContext(Q4).strict}function y7(e){const t=J4(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function v7(e,t){if(typeof Proxy>"u")return Zv;const n=new Map,r=(o,l)=>Zv(o,l,e,t),i=(o,l)=>r(o,l);return new Proxy(i,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,Zv(l,void 0,e,t)),n.get(l))})}const g7=(e,t)=>t.isSVG??YS(e)?new YV(t):new UV(t,{allowProjection:e!==P.Fragment});class x7 extends Ci{constructor(t){super(t),t.animationState||(t.animationState=JV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Rp(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let b7=0;class j7 extends Ci{constructor(){super(...arguments),this.id=b7++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:l,custom:u}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const f=vs(this.node,l,u);if(f){const{transition:h,transitionEnd:m,...y}=f;for(const g in y)(o=this.node.getValue(g))==null||o.jump(y[g])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const S7={animation:{Feature:x7},exit:{Feature:j7}};function Qu(e){return{point:{x:e.pageX,y:e.pageY}}}const w7=e=>t=>IS(t)&&e(t,Qu(t));function Wc(e,t,n,r){return uu(e,t,w7(n),r)}const sL=({current:e})=>e?e.ownerDocument.defaultView:null,RE=(e,t)=>Math.abs(e-t);function A7(e,t){const n=RE(e.x,t.x),r=RE(e.y,t.y);return Math.sqrt(n**2+r**2)}const kE=new Set(["auto","scroll"]);class oL{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Rd(this.lastRawMoveEventInfo,this.transformPagePoint));const S=Qv(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=A7(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:A}=S,{timestamp:_}=cn;this.history.push({...A,timestamp:_});const{onStart:T,onMove:C}=this.handlers;w||(T&&T(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,S)},this.handlePointerMove=(S,w)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=Rd(w,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(S,w)=>{this.end();const{onEnd:b,onSessionEnd:A,resumeAnimation:_}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Qv(S.type==="pointercancel"?this.lastMoveEventInfo:Rd(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(S,T),A&&A(S,T)},!IS(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=i||window;const f=Qu(t),h=Rd(f,this.transformPagePoint),{point:m}=h,{timestamp:y}=cn;this.history=[{...m,timestamp:y}];const{onSessionStart:g}=n;g&&g(t,Qv(h,this.history));const j={passive:!0,capture:!0};this.removeListeners=Xu(Wc(this.contextWindow,"pointermove",this.handlePointerMove,j),Wc(this.contextWindow,"pointerup",this.handlePointerUp,j),Wc(this.contextWindow,"pointercancel",this.handlePointerUp,j)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(kE.has(r.overflowX)||kE.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,i),ft.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_i(this.updatePoint)}}function Rd(e,t){return t?{point:t(e.point)}:e}function DE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qv({point:e},t){return{point:e,delta:DE(e,lL(t)),offset:DE(e,O7(t)),velocity:_7(t,.1)}}function O7(e){return e[0]}function lL(e){return e[e.length-1]}function _7(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=lL(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Yn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Yn(t)*2&&(r=e[1]);const o=dr(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function T7(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function LE(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function E7(e,{top:t,left:n,bottom:r,right:i}){return{x:LE(e.x,n,i),y:LE(e.y,t,r)}}function zE(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function N7(e,t){return{x:zE(e.x,t.x),y:zE(e.y,t.y)}}function C7(e,t){let n=.5;const r=xn(e),i=xn(t);return i>r?n=ou(t.min,t.max-r,e.min):r>i&&(n=ou(e.min,e.max-i,t.min)),Zr(0,1,n)}function M7(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const R1=.35;function P7(e=R1){return e===!1?e=0:e===!0&&(e=R1),{x:$E(e,"left","right"),y:$E(e,"top","bottom")}}function $E(e,t,n){return{min:BE(e,t),max:BE(e,n)}}function BE(e,t){return typeof e=="number"?e:e[t]||0}const R7=new WeakMap;class k7{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=y=>{n&&this.snapToCursor(Qu(y).point),this.stopAnimation()},l=(y,g)=>{const{drag:j,dragPropagation:S,onDragStart:w}=this.getProps();if(j&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oV(j),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vr(A=>{let _=this.getAxisMotionValue(A).get()||0;if(Kr.test(_)){const{projection:T}=this.visualElement;if(T&&T.layout){const C=T.layout.layoutBox[A];C&&(_=xn(C)*(parseFloat(_)/100))}}this.originPoint[A]=_}),w&&ft.update(()=>w(y,g),!1,!0),w1(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},u=(y,g)=>{this.latestPointerEvent=y,this.latestPanInfo=g;const{dragPropagation:j,dragDirectionLock:S,onDirectionLock:w,onDrag:b}=this.getProps();if(!j&&!this.openDragLock)return;const{offset:A}=g;if(S&&this.currentDirection===null){this.currentDirection=L7(A),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",g.point,A),this.updateAxis("y",g.point,A),this.visualElement.render(),b&&ft.update(()=>b(y,g),!1,!0)},f=(y,g)=>{this.latestPointerEvent=y,this.latestPanInfo=g,this.stop(y,g),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new oL(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:sL(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:l}=i;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&ft.postRender(()=>u(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!kd(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=T7(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;t&&Oo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=E7(r.layoutBox,t):this.constraints=!1,this.elastic=P7(n),i!==this.constraints&&!Oo(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Vr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=M7(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Oo(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=LV(r,i.root,this.visualElement.getTransformPagePoint());let l=N7(i.layout.layoutBox,o);if(n){const u=n(RV(l));this.hasMutatedConstraints=!!u,u&&(l=C4(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),f=this.constraints||{},h=Vr(m=>{if(!kd(m,n,this.currentDirection))return;let y=f&&f[m]||{};(l===!0||l===m)&&(y={min:0,max:0});const g=i?200:1e6,j=i?40:1e7,S={type:"inertia",velocity:r?t[m]:0,bounceStiffness:g,bounceDamping:j,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(m,S)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return w1(this.visualElement,t),r.start(DS(t,r,0,n,this.visualElement,!1))}stopAnimation(){Vr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Vr(n=>{const{drag:r}=this.getProps();if(!kd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:u}=i.layout.layoutBox[n],f=o.get()||0;o.set(t[n]-ut(l,u,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Oo(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Vr(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const f=u.get();i[l]=C7({min:f,max:f},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Vr(l=>{if(!kd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:f,max:h}=this.constraints[l];u.set(ut(f,h,i[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;R7.set(this.visualElement,this);const t=this.visualElement.current,n=Wc(t,"pointerdown",h=>{const{drag:m,dragListener:y=!0}=this.getProps(),g=h.target,j=g!==t&&hV(g);m&&y&&!j&&this.start(h)});let r;const i=()=>{const{dragConstraints:h}=this.getProps();Oo(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=D7(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ft.read(i);const u=uu(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Vr(y=>{const g=this.getAxisMotionValue(y);g&&(this.originPoint[y]+=h[y].translate,g.set(g.get()+h[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),f&&f(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=R1,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function IE(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function D7(e,t,n){const r=KT(e,IE(n)),i=KT(t,IE(n));return()=>{r(),i()}}function kd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function L7(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class z7 extends Ci{constructor(t){super(t),this.removeGroupControls=pr,this.removeListeners=pr,this.controls=new k7(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Jv=e=>(t,n)=>{e&&ft.update(()=>e(t,n),!1,!0)};class $7 extends Ci{constructor(){super(...arguments),this.removePointerDownListener=pr}onPointerDown(t){this.session=new oL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sL(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Jv(t),onStart:Jv(n),onMove:Jv(r),onEnd:(o,l)=>{delete this.session,i&&ft.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=Wc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let eg=!1;class B7 extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),eg&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ih.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),eg=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||ft.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),BS.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;eg=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cL(e){const[t,n]=Z4(),r=P.useContext(xS);return d.jsx(B7,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(aL),isPresent:t,safeToRemove:n})}const I7={pan:{Feature:$7},drag:{Feature:z7,ProjectionNode:W4,MeasureLayout:cL}};function qE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&ft.postRender(()=>o(t,Qu(t)))}class q7 extends Ci{mount(){const{current:t}=this.node;t&&(this.unmount=cV(t,(n,r)=>(qE(this.node,r,"Start"),i=>qE(this.node,i,"End"))))}unmount(){}}class U7 extends Ci{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xu(uu(this.node.current,"focus",()=>this.onFocus()),uu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function UE(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ft.postRender(()=>o(t,Qu(t)))}class V7 extends Ci{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=mV(t,(i,o)=>(UE(this.node,o,"Start"),(l,{success:u})=>UE(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const k1=new WeakMap,tg=new WeakMap,H7=e=>{const t=k1.get(e.target);t&&t(e)},G7=e=>{e.forEach(H7)};function F7({root:e,...t}){const n=e||document;tg.has(n)||tg.set(n,{});const r=tg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(G7,{root:e,...t})),r[i]}function K7(e,t,n){const r=F7(t);return k1.set(e,n),r.observe(e),()=>{k1.delete(e),r.unobserve(e)}}const Y7={some:0,all:1};class X7 extends Ci{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var f;(f=this.stopObserver)==null||f.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Y7[i]},u=h=>{const{isIntersecting:m}=h;if(this.isInView===m||(this.isInView=m,o&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:y,onViewportLeave:g}=this.node.getProps(),j=m?y:g;j&&j(h)};this.stopObserver=K7(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(W7(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function W7({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Z7={inView:{Feature:X7},tap:{Feature:V7},focus:{Feature:U7},hover:{Feature:q7}},Q7={layout:{ProjectionNode:W4,MeasureLayout:cL}},J7={...S7,...Z7,...I7,...Q7},vn=v7(J7,g7),XS=_3(e=>({sidebarOpen:!0,toggleSidebar:()=>e(t=>({sidebarOpen:!t.sidebarOpen})),setSidebarOpen:t=>e({sidebarOpen:t})}));/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uL=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var tH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nH=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...u},f)=>P.createElement("svg",{ref:f,...tH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:uL("lucide",i),...u},[...l.map(([h,m])=>P.createElement(h,m)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pe=(e,t)=>{const n=P.forwardRef(({className:r,...i},o)=>P.createElement(nH,{ref:o,iconNode:t,className:uL(`lucide-${eH(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rH=pe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aH=pe("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iH=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D1=pe("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const L1=pe("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zc=pe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Uo=pe("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WS=pe("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sH=pe("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oH=pe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lH=pe("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cH=pe("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uH=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fH=pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dH=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lp=pe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sl=pe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VE=pe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vo=pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hH=pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qc=pe("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HE=pe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qr=pe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pH=pe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fL=pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mH=pe("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bi=pe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ju=pe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yH=pe("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vH=pe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sh=pe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZS=pe("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GE=pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gH=pe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xH=pe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bH=pe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const js=pe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jH=pe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QS=pe("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SH=pe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wH=pe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AH=pe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const OH=pe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _H=pe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TH=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const EH=pe("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NH=pe("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FE=pe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KE=pe("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YE=pe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ma=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CH=pe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ns=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MH=pe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const PH=pe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RH=pe("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kH=pe("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oh=pe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DH=pe("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JS=pe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LH=pe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dL=pe("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ew=pe("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mr=pe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wi=pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const z1=pe("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sh=pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pa=pe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tw=pe("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zH=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nw=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function hL(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=hL(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hL(e))&&(r&&(r+=" "),r+=t);return r}const rw="-",$H=e=>{const t=IH(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(rw);return u[0]===""&&u.length!==1&&u.shift(),pL(u,t)||BH(l)},getConflictingClassGroupIds:(l,u)=>{const f=n[l]||[];return u&&r[l]?[...f,...r[l]]:f}}},pL=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?pL(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(rw);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},XE=/^\[(.+)\]$/,BH=e=>{if(XE.test(e)){const t=XE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},IH=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return UH(Object.entries(e.classGroups),n).forEach(([o,l])=>{$1(l,r,o,t)}),r},$1=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:WE(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(qH(i)){$1(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{$1(l,WE(t,o),n,r)})})},WE=(e,t)=>{let n=e;return t.split(rw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},qH=e=>e.isThemeGetter,UH=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,u])=>[t+l,u])):o);return[n,i]}):e,VH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return i(o,l),l},set(o,l){n.has(o)?n.set(o,l):i(o,l)}}},mL="!",HH=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,l=u=>{const f=[];let h=0,m=0,y;for(let b=0;b<u.length;b++){let A=u[b];if(h===0){if(A===i&&(r||u.slice(b,b+o)===t)){f.push(u.slice(m,b)),m=b+o;continue}if(A==="/"){y=b;continue}}A==="["?h++:A==="]"&&h--}const g=f.length===0?u:u.substring(m),j=g.startsWith(mL),S=j?g.substring(1):g,w=y&&y>m?y-m:void 0;return{modifiers:f,hasImportantModifier:j,baseClassName:S,maybePostfixModifierPosition:w}};return n?u=>n({className:u,parseClassName:l}):l},GH=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},FH=e=>({cache:VH(e.cacheSize),parseClassName:HH(e),...$H(e)}),KH=/\s+/,YH=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],l=e.trim().split(KH);let u="";for(let f=l.length-1;f>=0;f-=1){const h=l[f],{modifiers:m,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:j}=n(h);let S=!!j,w=r(S?g.substring(0,j):g);if(!w){if(!S){u=h+(u.length>0?" "+u:u);continue}if(w=r(g),!w){u=h+(u.length>0?" "+u:u);continue}S=!1}const b=GH(m).join(":"),A=y?b+mL:b,_=A+w;if(o.includes(_))continue;o.push(_);const T=i(w,S);for(let C=0;C<T.length;++C){const O=T[C];o.push(A+O)}u=h+(u.length>0?" "+u:u)}return u};function XH(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=yL(t))&&(r&&(r+=" "),r+=n);return r}const yL=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=yL(e[r]))&&(n&&(n+=" "),n+=t);return n};function WH(e,...t){let n,r,i,o=l;function l(f){const h=t.reduce((m,y)=>y(m),e());return n=FH(h),r=n.cache.get,i=n.cache.set,o=u,u(f)}function u(f){const h=r(f);if(h)return h;const m=YH(f,n);return i(f,m),m}return function(){return o(XH.apply(null,arguments))}}const xt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},vL=/^\[(?:([a-z-]+):)?(.+)\]$/i,ZH=/^\d+\/\d+$/,QH=new Set(["px","full","screen"]),JH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eG=/\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$/,tG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rG=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ja=e=>Do(e)||QH.has(e)||ZH.test(e),hi=e=>wl(e,"length",fG),Do=e=>!!e&&!Number.isNaN(Number(e)),ng=e=>wl(e,"number",Do),Nc=e=>!!e&&Number.isInteger(Number(e)),aG=e=>e.endsWith("%")&&Do(e.slice(0,-1)),Le=e=>vL.test(e),pi=e=>JH.test(e),iG=new Set(["length","size","percentage"]),sG=e=>wl(e,iG,gL),oG=e=>wl(e,"position",gL),lG=new Set(["image","url"]),cG=e=>wl(e,lG,hG),uG=e=>wl(e,"",dG),Cc=()=>!0,wl=(e,t,n)=>{const r=vL.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},fG=e=>eG.test(e)&&!tG.test(e),gL=()=>!1,dG=e=>nG.test(e),hG=e=>rG.test(e),pG=()=>{const e=xt("colors"),t=xt("spacing"),n=xt("blur"),r=xt("brightness"),i=xt("borderColor"),o=xt("borderRadius"),l=xt("borderSpacing"),u=xt("borderWidth"),f=xt("contrast"),h=xt("grayscale"),m=xt("hueRotate"),y=xt("invert"),g=xt("gap"),j=xt("gradientColorStops"),S=xt("gradientColorStopPositions"),w=xt("inset"),b=xt("margin"),A=xt("opacity"),_=xt("padding"),T=xt("saturate"),C=xt("scale"),O=xt("sepia"),E=xt("skew"),M=xt("space"),D=xt("translate"),k=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",Le,t],$=()=>[Le,t],F=()=>["",ja,hi],X=()=>["auto",Do,Le],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],ae=()=>["","0",Le],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Do,Le];return{cacheSize:500,separator:":",theme:{colors:[Cc],spacing:[ja,hi],blur:["none","",pi,Le],brightness:z(),borderColor:[e],borderRadius:["none","","full",pi,Le],borderSpacing:$(),borderWidth:F(),contrast:z(),grayscale:ae(),hueRotate:z(),invert:ae(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[aG,hi],inset:q(),margin:q(),opacity:z(),padding:$(),saturate:z(),scale:z(),sepia:ae(),skew:z(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[pi]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"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"],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:[...Y(),Le]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Nc,Le]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Nc,Le]}],"grid-cols":[{"grid-cols":[Cc]}],"col-start-end":[{col:["auto",{span:["full",Nc,Le]},Le]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Cc]}],"row-start-end":[{row:["auto",{span:[Nc,Le]},Le]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Le,t]}],"min-w":[{"min-w":[Le,t,"min","max","fit"]}],"max-w":[{"max-w":[Le,t,"none","full","min","max","fit","prose",{screen:[pi]},pi]}],h:[{h:[Le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",pi,hi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ng]}],"font-family":[{font:[Cc]}],"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:["tighter","tight","normal","wide","wider","widest",Le]}],"line-clamp":[{"line-clamp":["none",Do,ng]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ja,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ja,hi]}],"underline-offset":[{"underline-offset":["auto",ja,Le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),oG]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sG]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cG]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:L()}],"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-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:["",...L()]}],"outline-offset":[{"outline-offset":[ja,Le]}],"outline-w":[{outline:[ja,hi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[ja,hi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pi,uG]}],"shadow-color":[{shadow:[Cc]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",pi,Le]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[y]}],saturate:[{saturate:[T]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Le]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Nc,Le]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",Le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ja,hi,ng]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["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-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},mG=WH(pG);function Tt(...e){return mG(Pe(e))}function _e(e,t="SEK"){return new Intl.NumberFormat("sv-SE",{style:"currency",currency:t,maximumFractionDigits:0}).format(e)}function ZE(e){return new Intl.NumberFormat("sv-SE").format(e)}function mr(e){return new Intl.DateTimeFormat("sv-SE",{year:"numeric",month:"short",day:"numeric"}).format(new Date(e))}function aw(e){const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),i=Math.floor(r/6e4),o=Math.floor(r/36e5),l=Math.floor(r/864e5);return i<1?"Just now":i<60?`${i}m ago`:o<24?`${o}h ago`:l<7?`${l}d ago`:mr(e)}function yG(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}const vG=[{path:"/",label:"Briefing",icon:EH},{path:"/dashboard",label:"Dashboard",icon:gH},{path:"/agents",label:"Agents",icon:Zc},{path:"/crm",label:"CRM",icon:Pa},{path:"/sales",label:"Sales",icon:Mr},{path:"/finance",label:"Finance",icon:tw},{path:"/hr",label:"HR",icon:Uo},{path:"/legal",label:"Legal",icon:bi},{path:"/marketing",label:"Marketing",icon:QS},{path:"/support",label:"Support",icon:ZS},{path:"/automation",label:"Automation",icon:nw}];function gG(){const{sidebarOpen:e,toggleSidebar:t}=XS(),n=Lr();return d.jsxs(d.Fragment,{children:[d.jsx(Xc,{children:e&&d.jsx(vn.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 bg-black/20 z-40 lg:hidden",onClick:t})}),d.jsxs(vn.aside,{initial:!1,animate:{width:e?240:72},transition:{duration:.2,ease:"easeOut"},className:Tt("fixed left-0 top-0 h-full bg-sidebar z-50 flex flex-col","border-r border-border/60",e?"px-4":"px-3"),children:[d.jsxs("div",{className:"h-16 flex items-center justify-between shrink-0",children:[d.jsxs("div",{className:"flex items-center gap-2.5 overflow-hidden",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center shrink-0",children:d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 32 32",fill:"none",children:d.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})}),d.jsx(Xc,{children:e&&d.jsx(vn.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:"text-sm font-semibold text-text-primary whitespace-nowrap",children:"AMOS"})})]}),d.jsx("button",{onClick:t,className:"hidden lg:flex w-7 h-7 items-center justify-center rounded-lg hover:bg-bg text-text-secondary transition-colors",children:e?d.jsx(fH,{size:14}):d.jsx(dH,{size:14})})]}),d.jsx("nav",{className:"flex-1 py-4 space-y-0.5 overflow-y-auto",children:vG.map(r=>{const i=n.pathname===r.path||r.path!=="/"&&n.pathname.startsWith(r.path),o=r.icon;return d.jsxs(A3,{to:r.path,onClick:()=>{window.innerWidth<1024&&t()},className:Tt("flex items-center gap-3 h-10 rounded-xl px-3 transition-colors duration-150 relative","hover:bg-primary-light",i&&"bg-primary-light text-primary",!i&&"text-text-secondary"),children:[i&&d.jsx(vn.div,{layoutId:"sidebar-active",className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-primary rounded-full",transition:{duration:.18,ease:"easeOut"}}),d.jsx(o,{size:18,strokeWidth:i?2:1.5}),d.jsx(Xc,{children:e&&d.jsx(vn.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:Tt("text-sm font-medium whitespace-nowrap",i?"text-primary":"text-text-secondary"),children:r.label})})]},r.path)})})]})]})}const QE=[{id:"1",title:"Nytt avtal tecknat",description:"Acme Corp har signerat enterprise-avtalet",time:new Date(Date.now()-1e3*60*15).toISOString(),read:!1},{id:"2",title:"Faktura förfallen",description:"Faktura #INV-2024-0042 är 3 dagar försenad",time:new Date(Date.now()-1e3*60*60*2).toISOString(),read:!1},{id:"3",title:"Semester beviljad",description:"Din semesteransökan har godkänts av HR",time:new Date(Date.now()-1e3*60*60*5).toISOString(),read:!0}];function xG(){const{user:e,logout:t}=Yu(),{toggleSidebar:n}=XS(),r=Ep(),[i,o]=P.useState(!1),[l,u]=P.useState(!1),f=()=>{const m=new Date().getHours();return m<12?"Good morning":m<17?"Good afternoon":"Good evening"},h=QE.filter(m=>!m.read).length;return d.jsxs("header",{className:"h-16 bg-surface border-b border-border/60 flex items-center justify-between px-6 lg:px-10 sticky top-0 z-30",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("button",{onClick:n,className:"lg:hidden w-9 h-9 flex items-center justify-center rounded-xl hover:bg-bg text-text-secondary transition-colors",children:d.jsx(SH,{size:18})}),d.jsxs("div",{children:[d.jsxs("h1",{className:"text-base font-semibold text-text-primary",children:[f(),e?`, ${e.name||"Erik Svensson"}`:", Erik Svensson"]}),d.jsx("p",{className:"text-xs text-text-secondary hidden sm:block",children:new Date().toLocaleDateString("sv-SE",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("div",{className:"hidden md:flex items-center h-9 px-3.5 rounded-xl bg-bg border border-border/60 text-text-secondary",children:[d.jsx(Ns,{size:15}),d.jsx("span",{className:"ml-2 text-sm",children:"Search..."}),d.jsx("kbd",{className:"ml-6 px-1.5 py-0.5 text-[10px] font-medium bg-surface rounded border border-border",children:"⌘K"})]}),d.jsxs("div",{className:"relative",children:[d.jsxs("button",{onClick:()=>{o(!i),u(!1)},className:"relative w-9 h-9 flex items-center justify-center rounded-xl hover:bg-bg text-text-secondary transition-colors",children:[d.jsx(L1,{size:17}),h>0&&d.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 bg-danger rounded-full"})]}),d.jsx(Xc,{children:i&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>o(!1)}),d.jsxs(vn.div,{initial:{opacity:0,y:4,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,scale:.98},transition:{duration:.15},className:"absolute right-0 top-full mt-2 w-80 bg-surface rounded-[18px] dropdown-shadow border border-border/60 z-50 overflow-hidden",children:[d.jsxs("div",{className:"px-4 py-3 border-b border-border/60 flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Notifications"}),d.jsx("span",{className:"text-xs text-primary font-medium cursor-pointer",children:"Mark all read"})]}),d.jsx("div",{className:"max-h-80 overflow-y-auto",children:QE.map(m=>d.jsx("div",{className:Tt("px-4 py-3 hover:bg-bg/60 transition-colors cursor-pointer",!m.read&&"bg-primary-light/30"),children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:Tt("w-2 h-2 rounded-full mt-1.5 shrink-0",m.read?"bg-transparent":"bg-primary")}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:m.title}),d.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:m.description}),d.jsx("p",{className:"text-[11px] text-text-secondary/60 mt-1",children:aw(m.time)})]})]})},m.id))})]})]})})]}),d.jsxs("div",{className:"relative",children:[d.jsxs("button",{onClick:()=>{u(!l),o(!1)},className:"flex items-center gap-2 pl-1 pr-2 h-9 rounded-xl hover:bg-bg transition-colors",children:[d.jsx("div",{className:"w-7 h-7 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:e?yG(e.name):"?"}),d.jsx(uH,{size:14,className:"text-text-secondary"})]}),d.jsx(Xc,{children:l&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>u(!1)}),d.jsxs(vn.div,{initial:{opacity:0,y:4,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,scale:.98},transition:{duration:.15},className:"absolute right-0 top-full mt-2 w-56 bg-surface rounded-[18px] dropdown-shadow border border-border/60 z-50 overflow-hidden",children:[d.jsxs("div",{className:"px-4 py-3 border-b border-border/60",children:[d.jsx("p",{className:"text-sm font-semibold text-text-primary",children:(e==null?void 0:e.name)||"User"}),d.jsx("p",{className:"text-xs text-text-secondary",children:(e==null?void 0:e.email)||"user@amos.com"})]}),d.jsxs("div",{className:"py-1",children:[d.jsxs("button",{onClick:()=>{r("/profile"),u(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-text-secondary hover:bg-bg transition-colors",children:[d.jsx(Sh,{size:15}),"Min Profil"]}),d.jsxs("button",{className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-text-secondary hover:bg-bg transition-colors",children:[d.jsx(WS,{size:15}),"Byt Verksamhet"]}),d.jsxs("button",{className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-text-secondary hover:bg-bg transition-colors",children:[d.jsx(PH,{size:15}),"Inställningar"]}),d.jsx("div",{className:"border-t border-border/60 mt-1 pt-1",children:d.jsxs("button",{onClick:()=>{t(),u(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-danger hover:bg-danger-light transition-colors",children:[d.jsx(bH,{size:15}),"Sign out"]})})]})]})]})})]})]})]})}function bG(){const{sidebarOpen:e}=XS();return d.jsxs("div",{className:"min-h-screen bg-bg",children:[d.jsx(gG,{}),d.jsxs("div",{className:Tt("transition-all duration-200 ease-out",e?"lg:ml-[240px]":"lg:ml-[72px]"),children:[d.jsx(xG,{}),d.jsx("main",{className:"p-6 lg:p-10",children:d.jsx(yI,{})})]})]})}const B1=P.forwardRef(({label:e,error:t,icon:n,className:r,...i},o)=>d.jsxs("div",{className:"w-full",children:[e&&d.jsx("label",{className:"block text-sm font-medium text-text-primary mb-1.5",children:e}),d.jsxs("div",{className:"relative",children:[n&&d.jsx("div",{className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-secondary",children:n}),d.jsx("input",{ref:o,className:Tt("w-full h-11 rounded-[14px] border bg-surface text-text-primary text-sm","placeholder:text-text-secondary/50","focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30","transition-all duration-150",n?"pl-10 pr-4":"px-4",t&&"border-danger focus:ring-danger/20 focus:border-danger/30",r),...i})]}),t&&d.jsx("p",{className:"mt-1.5 text-xs text-danger",children:t})]}));B1.displayName="Input";function Yt({children:e,variant:t="primary",size:n="md",loading:r=!1,icon:i,className:o,disabled:l,...u}){const f={primary:"bg-primary text-white hover:bg-primary-hover shadow-sm",secondary:"bg-bg text-text-primary border border-border hover:bg-white",ghost:"bg-transparent text-text-secondary hover:bg-primary-light hover:text-primary",danger:"bg-danger text-white hover:opacity-90"},h={sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-sm"};return d.jsxs("button",{className:Tt("inline-flex items-center justify-center gap-2 rounded-[14px] font-medium transition-colors duration-150","focus:outline-none focus:ring-2 focus:ring-primary/20","disabled:opacity-50 disabled:cursor-not-allowed","active:scale-[0.98]",f[t],h[n],o),disabled:l||r,...u,children:[r?d.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[d.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),d.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):i,e]})}const jG="/api/v1";function SG(){var e;try{const t=localStorage.getItem("amos-auth");if(t){const n=JSON.parse(t);if((e=n.state)!=null&&e.token)return n.state.token}}catch{}return localStorage.getItem("amos_token")}async function Dd(e,t,n){const r=`${jG}${t}`,i={"Content-Type":"application/json"},o=SG();o&&(i.Authorization=`Bearer ${o}`);const l=await fetch(r,{method:e,headers:i,body:n?JSON.stringify(n):void 0});if(!l.ok){const u=await l.json().catch(()=>({}));throw new Error(u.message||`HTTP ${l.status}`)}return l.json()}const rt={get:e=>Dd("GET",e),post:(e,t)=>Dd("POST",e,t),put:(e,t)=>Dd("PUT",e,t),delete:e=>Dd("DELETE",e)},JE={login:(e,t)=>rt.post("/auth/login",{email:e,password:t}),me:()=>rt.get("/auth/me")},lh={customers:()=>rt.get("/crm/customers"),leads:()=>rt.get("/crm/leads"),pipeline:()=>rt.get("/crm/pipeline"),createCustomer:e=>rt.post("/crm/customers",e),updateCustomer:(e,t)=>rt.put(`/crm/customers/${e}`,t),deleteCustomer:e=>rt.delete(`/crm/customers/${e}`)},No={deals:()=>rt.get("/sales/deals"),products:()=>rt.get("/sales/products"),mrr:()=>rt.get("/sales/mrr"),arr:()=>rt.get("/sales/arr"),createDeal:e=>rt.post("/sales/deals",e),updateDeal:(e,t)=>rt.put(`/sales/deals/${e}`,t)},is={balance:()=>rt.get("/finance/balance"),income:()=>rt.get("/finance/income"),moms:()=>rt.get("/finance/moms"),accounts:()=>rt.get("/finance/accounts"),invoices:()=>rt.get("/finance/invoices"),cashflow:()=>rt.get("/finance/cashflow")},rg={accounts:()=>rt.get("/ledger/accounts"),balanceSheet:e=>rt.get(`/ledger/balance-sheet?period=${e||""}`),incomeStatement:e=>rt.get(`/ledger/income-statement?period=${e||""}`),momsReport:e=>rt.get(`/ledger/moms?period=${e||""}`)},eN={employees:()=>rt.get("/hr/employees"),leaves:()=>rt.get("/hr/leaves"),createEmployee:e=>rt.post("/hr/employees",e),createLeave:e=>rt.post("/hr/leaves",e)};function wG(){const e=Ep(),{login:t}=Yu(),[n,r]=P.useState(""),[i,o]=P.useState(""),[l,u]=P.useState(!1),[f,h]=P.useState(""),[m,y]=P.useState(!1),g=async j=>{var S;j.preventDefault(),h(""),y(!0);try{const w=await JE.login(n,i);if(!w.ok){h("Invalid credentials");return}localStorage.setItem("amos_token",w.token);const b=await JE.me();t(w.token,{id:b.user.sub,email:b.user.email,name:"Erik Svensson",role:((S=b.user.roles)==null?void 0:S[0])||"user"}),e("/")}catch(w){h(w instanceof Error?w.message:"Login failed")}finally{y(!1)}};return d.jsx("div",{className:"min-h-screen bg-bg flex items-center justify-center p-4",children:d.jsxs(vn.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"w-full max-w-[400px]",children:[d.jsx("div",{className:"flex items-center justify-center mb-10",children:d.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary flex items-center justify-center",children:d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:d.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})})}),d.jsxs("div",{className:"text-center mb-8",children:[d.jsx("h1",{className:"text-2xl font-semibold text-text-primary",children:"Welcome back"}),d.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Sign in to your AMOS account"})]}),d.jsxs("form",{onSubmit:g,className:"space-y-4",children:[d.jsx(B1,{label:"Email",type:"email",placeholder:"you@company.com",value:n,onChange:j=>r(j.target.value),icon:d.jsx(js,{size:16}),required:!0}),d.jsxs("div",{className:"relative",children:[d.jsx(B1,{label:"Password",type:l?"text":"password",placeholder:"Enter your password",value:i,onChange:j=>o(j.target.value),icon:d.jsx(xH,{size:16}),required:!0}),d.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-3.5 top-[38px] text-text-secondary hover:text-text-primary transition-colors",children:l?d.jsx(pH,{size:16}):d.jsx(fL,{size:16})})]}),f&&d.jsx(vn.p,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"text-sm text-danger",children:f}),d.jsx(Yt,{type:"submit",size:"lg",loading:m,className:"w-full",children:"Sign in"})]})]})})}function tN({label:e,value:t,change:n,changeLabel:r,icon:i,index:o=0}){const l=n>0,u=n===0;return d.jsxs(vn.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.18,delay:o*.04,ease:"easeOut"},className:"bg-surface rounded-[20px] card-shadow p-6 md:p-7",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx("p",{className:"text-sm text-text-secondary",children:e}),d.jsx("p",{className:"text-2xl md:text-3xl font-semibold text-text-primary tracking-tight",children:t})]}),d.jsx("div",{className:"w-10 h-10 rounded-xl bg-bg flex items-center justify-center text-text-secondary",children:i})]}),d.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[d.jsxs("span",{className:Tt("inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full",l&&"bg-success-light text-success",u&&"bg-bg text-text-secondary",!l&&!u&&"bg-danger-light text-danger"),children:[l?d.jsx(Mr,{size:12}):u?d.jsx(OH,{size:12}):d.jsx(ew,{size:12}),Math.abs(n),"%"]}),d.jsx("span",{className:"text-xs text-text-secondary",children:r})]})]})}var ag,nN;function Rn(){if(nN)return ag;nN=1;var e=Array.isArray;return ag=e,ag}var ig,rN;function xL(){if(rN)return ig;rN=1;var e=typeof Ed=="object"&&Ed&&Ed.Object===Object&&Ed;return ig=e,ig}var sg,aN;function ea(){if(aN)return sg;aN=1;var e=xL(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return sg=n,sg}var og,iN;function ef(){if(iN)return og;iN=1;var e=ea(),t=e.Symbol;return og=t,og}var lg,sN;function AG(){if(sN)return lg;sN=1;var e=ef(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(l){var u=n.call(l,i),f=l[i];try{l[i]=void 0;var h=!0}catch{}var m=r.call(l);return h&&(u?l[i]=f:delete l[i]),m}return lg=o,lg}var cg,oN;function OG(){if(oN)return cg;oN=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return cg=n,cg}var ug,lN;function za(){if(lN)return ug;lN=1;var e=ef(),t=AG(),n=OG(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?i:r:o&&o in Object(u)?t(u):n(u)}return ug=l,ug}var fg,cN;function $a(){if(cN)return fg;cN=1;function e(t){return t!=null&&typeof t=="object"}return fg=e,fg}var dg,uN;function Al(){if(uN)return dg;uN=1;var e=za(),t=$a(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return dg=r,dg}var hg,fN;function iw(){if(fN)return hg;fN=1;var e=Rn(),t=Al(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return hg=i,hg}var pg,dN;function Mi(){if(dN)return pg;dN=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return pg=e,pg}var mg,hN;function sw(){if(hN)return mg;hN=1;var e=za(),t=Mi(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function l(u){if(!t(u))return!1;var f=e(u);return f==r||f==i||f==n||f==o}return mg=l,mg}var yg,pN;function _G(){if(pN)return yg;pN=1;var e=ea(),t=e["__core-js_shared__"];return yg=t,yg}var vg,mN;function TG(){if(mN)return vg;mN=1;var e=_G(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return vg=n,vg}var gg,yN;function bL(){if(yN)return gg;yN=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return gg=n,gg}var xg,vN;function EG(){if(vN)return xg;vN=1;var e=sw(),t=TG(),n=Mi(),r=bL(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,f=l.toString,h=u.hasOwnProperty,m=RegExp("^"+f.call(h).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y(g){if(!n(g)||t(g))return!1;var j=e(g)?m:o;return j.test(r(g))}return xg=y,xg}var bg,gN;function NG(){if(gN)return bg;gN=1;function e(t,n){return t==null?void 0:t[n]}return bg=e,bg}var jg,xN;function Cs(){if(xN)return jg;xN=1;var e=EG(),t=NG();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return jg=n,jg}var Sg,bN;function zp(){if(bN)return Sg;bN=1;var e=Cs(),t=e(Object,"create");return Sg=t,Sg}var wg,jN;function CG(){if(jN)return wg;jN=1;var e=zp();function t(){this.__data__=e?e(null):{},this.size=0}return wg=t,wg}var Ag,SN;function MG(){if(SN)return Ag;SN=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Ag=e,Ag}var Og,wN;function PG(){if(wN)return Og;wN=1;var e=zp(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var l=this.__data__;if(e){var u=l[o];return u===t?void 0:u}return r.call(l,o)?l[o]:void 0}return Og=i,Og}var _g,AN;function RG(){if(AN)return _g;AN=1;var e=zp(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return _g=r,_g}var Tg,ON;function kG(){if(ON)return Tg;ON=1;var e=zp(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return Tg=n,Tg}var Eg,_N;function DG(){if(_N)return Eg;_N=1;var e=CG(),t=MG(),n=PG(),r=RG(),i=kG();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Eg=o,Eg}var Ng,TN;function LG(){if(TN)return Ng;TN=1;function e(){this.__data__=[],this.size=0}return Ng=e,Ng}var Cg,EN;function ow(){if(EN)return Cg;EN=1;function e(t,n){return t===n||t!==t&&n!==n}return Cg=e,Cg}var Mg,NN;function $p(){if(NN)return Mg;NN=1;var e=ow();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Mg=t,Mg}var Pg,CN;function zG(){if(CN)return Pg;CN=1;var e=$p(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,l=e(o,i);if(l<0)return!1;var u=o.length-1;return l==u?o.pop():n.call(o,l,1),--this.size,!0}return Pg=r,Pg}var Rg,MN;function $G(){if(MN)return Rg;MN=1;var e=$p();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Rg=t,Rg}var kg,PN;function BG(){if(PN)return kg;PN=1;var e=$p();function t(n){return e(this.__data__,n)>-1}return kg=t,kg}var Dg,RN;function IG(){if(RN)return Dg;RN=1;var e=$p();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return Dg=t,Dg}var Lg,kN;function Bp(){if(kN)return Lg;kN=1;var e=LG(),t=zG(),n=$G(),r=BG(),i=IG();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Lg=o,Lg}var zg,DN;function lw(){if(DN)return zg;DN=1;var e=Cs(),t=ea(),n=e(t,"Map");return zg=n,zg}var $g,LN;function qG(){if(LN)return $g;LN=1;var e=DG(),t=Bp(),n=lw();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return $g=r,$g}var Bg,zN;function UG(){if(zN)return Bg;zN=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Bg=e,Bg}var Ig,$N;function Ip(){if($N)return Ig;$N=1;var e=UG();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Ig=t,Ig}var qg,BN;function VG(){if(BN)return qg;BN=1;var e=Ip();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return qg=t,qg}var Ug,IN;function HG(){if(IN)return Ug;IN=1;var e=Ip();function t(n){return e(this,n).get(n)}return Ug=t,Ug}var Vg,qN;function GG(){if(qN)return Vg;qN=1;var e=Ip();function t(n){return e(this,n).has(n)}return Vg=t,Vg}var Hg,UN;function FG(){if(UN)return Hg;UN=1;var e=Ip();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return Hg=t,Hg}var Gg,VN;function cw(){if(VN)return Gg;VN=1;var e=qG(),t=VG(),n=HG(),r=GG(),i=FG();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Gg=o,Gg}var Fg,HN;function jL(){if(HN)return Fg;HN=1;var e=cw(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var l=arguments,u=i?i.apply(this,l):l[0],f=o.cache;if(f.has(u))return f.get(u);var h=r.apply(this,l);return o.cache=f.set(u,h)||f,h};return o.cache=new(n.Cache||e),o}return n.Cache=e,Fg=n,Fg}var Kg,GN;function KG(){if(GN)return Kg;GN=1;var e=jL(),t=500;function n(r){var i=e(r,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return Kg=n,Kg}var Yg,FN;function YG(){if(FN)return Yg;FN=1;var e=KG(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(l,u,f,h){o.push(f?h.replace(n,"$1"):u||l)}),o});return Yg=r,Yg}var Xg,KN;function uw(){if(KN)return Xg;KN=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return Xg=e,Xg}var Wg,YN;function XG(){if(YN)return Wg;YN=1;var e=ef(),t=uw(),n=Rn(),r=Al(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function l(u){if(typeof u=="string")return u;if(n(u))return t(u,l)+"";if(r(u))return o?o.call(u):"";var f=u+"";return f=="0"&&1/u==-1/0?"-0":f}return Wg=l,Wg}var Zg,XN;function SL(){if(XN)return Zg;XN=1;var e=XG();function t(n){return n==null?"":e(n)}return Zg=t,Zg}var Qg,WN;function wL(){if(WN)return Qg;WN=1;var e=Rn(),t=iw(),n=YG(),r=SL();function i(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return Qg=i,Qg}var Jg,ZN;function qp(){if(ZN)return Jg;ZN=1;var e=Al();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Jg=t,Jg}var ex,QN;function fw(){if(QN)return ex;QN=1;var e=wL(),t=qp();function n(r,i){i=e(i,r);for(var o=0,l=i.length;r!=null&&o<l;)r=r[t(i[o++])];return o&&o==l?r:void 0}return ex=n,ex}var tx,JN;function AL(){if(JN)return tx;JN=1;var e=fw();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return tx=t,tx}var WG=AL();const Xn=at(WG);var nx,eC;function ZG(){if(eC)return nx;eC=1;function e(t){return t==null}return nx=e,nx}var QG=ZG();const Ne=at(QG);var rx,tC;function JG(){if(tC)return rx;tC=1;var e=za(),t=Rn(),n=$a(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return rx=i,rx}var eF=JG();const Ss=at(eF);var tF=sw();const Te=at(tF);var nF=Mi();const Ol=at(nF);var ax={exports:{}},Qe={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var nC;function rF(){if(nC)return Qe;nC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function w(b){if(typeof b=="object"&&b!==null){var A=b.$$typeof;switch(A){case e:switch(b=b.type,b){case n:case i:case r:case h:case m:return b;default:switch(b=b&&b.$$typeof,b){case u:case l:case f:case g:case y:case o:return b;default:return A}}case t:return A}}}return Qe.ContextConsumer=l,Qe.ContextProvider=o,Qe.Element=e,Qe.ForwardRef=f,Qe.Fragment=n,Qe.Lazy=g,Qe.Memo=y,Qe.Portal=t,Qe.Profiler=i,Qe.StrictMode=r,Qe.Suspense=h,Qe.SuspenseList=m,Qe.isAsyncMode=function(){return!1},Qe.isConcurrentMode=function(){return!1},Qe.isContextConsumer=function(b){return w(b)===l},Qe.isContextProvider=function(b){return w(b)===o},Qe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Qe.isForwardRef=function(b){return w(b)===f},Qe.isFragment=function(b){return w(b)===n},Qe.isLazy=function(b){return w(b)===g},Qe.isMemo=function(b){return w(b)===y},Qe.isPortal=function(b){return w(b)===t},Qe.isProfiler=function(b){return w(b)===i},Qe.isStrictMode=function(b){return w(b)===r},Qe.isSuspense=function(b){return w(b)===h},Qe.isSuspenseList=function(b){return w(b)===m},Qe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===h||b===m||b===j||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===y||b.$$typeof===o||b.$$typeof===l||b.$$typeof===f||b.$$typeof===S||b.getModuleId!==void 0)},Qe.typeOf=w,Qe}var rC;function aF(){return rC||(rC=1,ax.exports=rF()),ax.exports}var iF=aF(),ix,aC;function OL(){if(aC)return ix;aC=1;var e=za(),t=$a(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return ix=r,ix}var sx,iC;function sF(){if(iC)return sx;iC=1;var e=OL();function t(n){return e(n)&&n!=+n}return sx=t,sx}var oF=sF();const _l=at(oF);var lF=OL();const cF=at(lF);var bn=function(t){return t===0?0:t>0?1:-1},fs=function(t){return Ss(t)&&t.indexOf("%")===t.length-1},ce=function(t){return cF(t)&&!_l(t)},uF=function(t){return Ne(t)},Kt=function(t){return ce(t)||Ss(t)},fF=0,Ms=function(t){var n=++fF;return"".concat(t||"").concat(n)},jn=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(!ce(t)&&!Ss(t))return r;var o;if(fs(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return _l(o)&&(o=r),i&&o>n&&(o=n),o},gi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},dF=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},Ft=function(t,n){return ce(t)&&ce(n)?function(r){return t+r*(n-t)}:function(){return n}};function wh(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Xn(r,t))===n})}var hF=function(t,n){return ce(t)&&ce(n)?t-n:Ss(t)&&Ss(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Lo(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 I1(e){"@babel/helpers - typeof";return I1=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},I1(e)}var pF=["viewBox","children"],mF=["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"],sC=["points","pathLength"],ox={svg:pF,polygon:sC,polyline:sC},dw=["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"],Ah=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(P.isValidElement(t)&&(r=t.props),!Ol(r))return null;var i={};return Object.keys(r).forEach(function(o){dw.includes(o)&&(i[o]=n||function(l){return r[o](r,l)})}),i},yF=function(t,n,r){return function(i){return t(n,r,i),null}},ws=function(t,n,r){if(!Ol(t)||I1(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var l=t[o];dw.includes(o)&&typeof l=="function"&&(i||(i={}),i[o]=yF(l,n,r))}),i},vF=["children"],gF=["children"];function oC(e,t){if(e==null)return{};var n=xF(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xF(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 q1(e){"@babel/helpers - typeof";return q1=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},q1(e)}var lC={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"},Ea=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},cC=null,lx=null,hw=function e(t){if(t===cC&&Array.isArray(lx))return lx;var n=[];return P.Children.forEach(t,function(r){Ne(r)||(iF.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),lx=n,cC=t,n};function Wn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Ea(i)}):r=[Ea(t)],hw(e).forEach(function(i){var o=Xn(i,"type.displayName")||Xn(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Gn(e,t){var n=Wn(e,t);return n&&n[0]}var uC=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ce(r)||r<=0||!ce(i)||i<=0)},bF=["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"],jF=function(t){return t&&t.type&&Ss(t.type)&&bF.indexOf(t.type)>=0},_L=function(t){return t&&q1(t)==="object"&&"clipDot"in t},SF=function(t,n,r,i){var o,l=(o=ox==null?void 0:ox[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Te(t)&&(i&&l.includes(n)||mF.includes(n))||r&&dw.includes(n)},je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(P.isValidElement(t)&&(i=t.props),!Ol(i))return null;var o={};return Object.keys(i).forEach(function(l){var u;SF((u=i)===null||u===void 0?void 0:u[l],l,n,r)&&(o[l]=i[l])}),o},U1=function e(t,n){if(t===n)return!0;var r=P.Children.count(t);if(r!==P.Children.count(n))return!1;if(r===0)return!0;if(r===1)return fC(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],l=n[i];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!fC(o,l))return!1}return!0},fC=function(t,n){if(Ne(t)&&Ne(n))return!0;if(!Ne(t)&&!Ne(n)){var r=t.props||{},i=r.children,o=oC(r,vF),l=n.props||{},u=l.children,f=oC(l,gF);return i&&u?Lo(o,f)&&U1(i,u):!i&&!u?Lo(o,f):!1}return!1},dC=function(t,n){var r=[],i={};return hw(t).forEach(function(o,l){if(jF(o))r.push(o);else if(o){var u=Ea(o.type),f=n[u]||{},h=f.handler,m=f.once;if(h&&(!m||!i[u])){var y=h(o,u,l);r.push(y),i[u]=!0}}}),r},wF=function(t){var n=t&&t.type;return n&&lC[n]?lC[n]:null},AF=function(t,n){return hw(n).indexOf(t)},OF=["children","width","height","viewBox","className","style","title","desc"];function V1(){return V1=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},V1.apply(this,arguments)}function _F(e,t){if(e==null)return{};var n=TF(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TF(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 H1(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,l=e.style,u=e.title,f=e.desc,h=_F(e,OF),m=i||{width:n,height:r,x:0,y:0},y=Pe("recharts-surface",o);return I.createElement("svg",V1({},je(h,!0,"svg"),{className:y,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),I.createElement("title",null,u),I.createElement("desc",null,f),t)}var EF=["children","className"];function G1(){return G1=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},G1.apply(this,arguments)}function NF(e,t){if(e==null)return{};var n=CF(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CF(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 Ie=I.forwardRef(function(e,t){var n=e.children,r=e.className,i=NF(e,EF),o=Pe("recharts-layer",r);return I.createElement("g",G1({className:o},je(i,!0),{ref:t}),n)}),Pr=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]},cx,hC;function MF(){if(hC)return cx;hC=1;function e(t,n,r){var i=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++i<o;)l[i]=t[i+n];return l}return cx=e,cx}var ux,pC;function PF(){if(pC)return ux;pC=1;var e=MF();function t(n,r,i){var o=n.length;return i=i===void 0?o:i,!r&&i>=o?n:e(n,r,i)}return ux=t,ux}var fx,mC;function TL(){if(mC)return fx;mC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+e+i+o+"]");function f(h){return u.test(h)}return fx=f,fx}var dx,yC;function RF(){if(yC)return dx;yC=1;function e(t){return t.split("")}return dx=e,dx}var hx,vC;function kF(){if(vC)return hx;vC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",u="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",h="(?:"+u+"|"+f+")",m="[^"+e+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",j="\\u200d",S=h+"?",w="["+o+"]?",b="(?:"+j+"(?:"+[m,y,g].join("|")+")"+w+S+")*",A=w+S+b,_="(?:"+[m+u+"?",u,y,g,l].join("|")+")",T=RegExp(f+"(?="+f+")|"+_+A,"g");function C(O){return O.match(T)||[]}return hx=C,hx}var px,gC;function DF(){if(gC)return px;gC=1;var e=RF(),t=TL(),n=kF();function r(i){return t(i)?n(i):e(i)}return px=r,px}var mx,xC;function LF(){if(xC)return mx;xC=1;var e=PF(),t=TL(),n=DF(),r=SL();function i(o){return function(l){l=r(l);var u=t(l)?n(l):void 0,f=u?u[0]:l.charAt(0),h=u?e(u,1).join(""):l.slice(1);return f[o]()+h}}return mx=i,mx}var yx,bC;function zF(){if(bC)return yx;bC=1;var e=LF(),t=e("toUpperCase");return yx=t,yx}var $F=zF();const Up=at($F);function pt(e){return function(){return e}}const EL=Math.cos,Oh=Math.sin,zr=Math.sqrt,_h=Math.PI,Vp=2*_h,F1=Math.PI,K1=2*F1,ss=1e-6,BF=K1-ss;function NL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function IF(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NL;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class qF{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?NL:IF(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,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,u=this._y1,f=r-t,h=i-n,m=l-t,y=u-n,g=m*m+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>ss)if(!(Math.abs(y*f-h*m)>ss)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let j=r-l,S=i-u,w=f*f+h*h,b=j*j+S*S,A=Math.sqrt(w),_=Math.sqrt(g),T=o*Math.tan((F1-Math.acos((w+g-b)/(2*A*_)))/2),C=T/_,O=T/A;Math.abs(C-1)>ss&&this._append`L${t+C*m},${n+C*y}`,this._append`A${o},${o},0,0,${+(y*j>m*S)},${this._x1=t+O*f},${this._y1=n+O*h}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),f=r*Math.sin(i),h=t+u,m=n+f,y=1^l,g=l?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>ss||Math.abs(this._y1-m)>ss)&&this._append`L${h},${m}`,r&&(g<0&&(g=g%K1+K1),g>BF?this._append`A${r},${r},0,1,${y},${t-u},${n-f}A${r},${r},0,1,${y},${this._x1=h},${this._y1=m}`:g>ss&&this._append`A${r},${r},0,${+(g>=F1)},${y},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}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 pw(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 qF(t)}function mw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function CL(e){this._context=e}CL.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 Hp(e){return new CL(e)}function ML(e){return e[0]}function PL(e){return e[1]}function RL(e,t){var n=pt(!0),r=null,i=Hp,o=null,l=pw(u);e=typeof e=="function"?e:e===void 0?ML:pt(e),t=typeof t=="function"?t:t===void 0?PL:pt(t);function u(f){var h,m=(f=mw(f)).length,y,g=!1,j;for(r==null&&(o=i(j=l())),h=0;h<=m;++h)!(h<m&&n(y=f[h],h,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(y,h,f),+t(y,h,f));if(j)return o=null,j+""||null}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:pt(+f),u):e},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:pt(+f),u):t},u.defined=function(f){return arguments.length?(n=typeof f=="function"?f:pt(!!f),u):n},u.curve=function(f){return arguments.length?(i=f,r!=null&&(o=i(r)),u):i},u.context=function(f){return arguments.length?(f==null?r=o=null:o=i(r=f),u):r},u}function Ld(e,t,n){var r=null,i=pt(!0),o=null,l=Hp,u=null,f=pw(h);e=typeof e=="function"?e:e===void 0?ML:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?PL:pt(+n);function h(y){var g,j,S,w=(y=mw(y)).length,b,A=!1,_,T=new Array(w),C=new Array(w);for(o==null&&(u=l(_=f())),g=0;g<=w;++g){if(!(g<w&&i(b=y[g],g,y))===A)if(A=!A)j=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),S=g-1;S>=j;--S)u.point(T[S],C[S]);u.lineEnd(),u.areaEnd()}A&&(T[g]=+e(b,g,y),C[g]=+t(b,g,y),u.point(r?+r(b,g,y):T[g],n?+n(b,g,y):C[g]))}if(_)return u=null,_+""||null}function m(){return RL().defined(i).curve(l).context(o)}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:pt(+y),r=null,h):e},h.x0=function(y){return arguments.length?(e=typeof y=="function"?y:pt(+y),h):e},h.x1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:pt(+y),h):r},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:pt(+y),n=null,h):t},h.y0=function(y){return arguments.length?(t=typeof y=="function"?y:pt(+y),h):t},h.y1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:pt(+y),h):n},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(n)},h.lineX1=function(){return m().x(r).y(t)},h.defined=function(y){return arguments.length?(i=typeof y=="function"?y:pt(!!y),h):i},h.curve=function(y){return arguments.length?(l=y,o!=null&&(u=l(o)),h):l},h.context=function(y){return arguments.length?(y==null?o=u=null:u=l(o=y),h):o},h}class kL{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 UF(e){return new kL(e,!0)}function VF(e){return new kL(e,!1)}const yw={draw(e,t){const n=zr(t/_h);e.moveTo(n,0),e.arc(0,0,n,0,Vp)}},HF={draw(e,t){const n=zr(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()}},DL=zr(1/3),GF=DL*2,FF={draw(e,t){const n=zr(t/GF),r=n*DL;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},KF={draw(e,t){const n=zr(t),r=-n/2;e.rect(r,r,n,n)}},YF=.8908130915292852,LL=Oh(_h/10)/Oh(7*_h/10),XF=Oh(Vp/10)*LL,WF=-EL(Vp/10)*LL,ZF={draw(e,t){const n=zr(t*YF),r=XF*n,i=WF*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=Vp*o/5,u=EL(l),f=Oh(l);e.lineTo(f*n,-u*n),e.lineTo(u*r-f*i,f*r+u*i)}e.closePath()}},vx=zr(3),QF={draw(e,t){const n=-zr(t/(vx*3));e.moveTo(0,n*2),e.lineTo(-vx*n,-n),e.lineTo(vx*n,-n),e.closePath()}},lr=-.5,cr=zr(3)/2,Y1=1/zr(12),JF=(Y1/2+1)*3,eK={draw(e,t){const n=zr(t/JF),r=n/2,i=n*Y1,o=r,l=n*Y1+n,u=-o,f=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(u,f),e.lineTo(lr*r-cr*i,cr*r+lr*i),e.lineTo(lr*o-cr*l,cr*o+lr*l),e.lineTo(lr*u-cr*f,cr*u+lr*f),e.lineTo(lr*r+cr*i,lr*i-cr*r),e.lineTo(lr*o+cr*l,lr*l-cr*o),e.lineTo(lr*u+cr*f,lr*f-cr*u),e.closePath()}};function tK(e,t){let n=null,r=pw(i);e=typeof e=="function"?e:pt(e||yw),t=typeof t=="function"?t:pt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:pt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:pt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Th(){}function Eh(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 zL(e){this._context=e}zL.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:Eh(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:Eh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nK(e){return new zL(e)}function $L(e){this._context=e}$L.prototype={areaStart:Th,areaEnd:Th,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:Eh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rK(e){return new $L(e)}function BL(e){this._context=e}BL.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:Eh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aK(e){return new BL(e)}function IL(e){this._context=e}IL.prototype={areaStart:Th,areaEnd:Th,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 iK(e){return new IL(e)}function jC(e){return e<0?-1:1}function SC(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),u=(o*i+l*r)/(r+i);return(jC(o)+jC(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function wC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function gx(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,l-u*n,o,l)}function Nh(e){this._context=e}Nh.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:gx(this,this._t0,wC(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,gx(this,wC(this,n=SC(this,e,t)),n);break;default:gx(this,this._t0,n=SC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qL(e){this._context=new UL(e)}(qL.prototype=Object.create(Nh.prototype)).point=function(e,t){Nh.prototype.point.call(this,t,e)};function UL(e){this._context=e}UL.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,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function sK(e){return new Nh(e)}function oK(e){return new qL(e)}function VL(e){this._context=e}VL.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=AC(e),i=AC(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(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 AC(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function lK(e){return new VL(e)}function Gp(e,t){this._context=e,this._t=t}Gp.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 cK(e){return new Gp(e,.5)}function uK(e){return new Gp(e,0)}function fK(e){return new Gp(e,1)}function Ho(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,u=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function X1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function dK(e,t){return e[t]}function hK(e){const t=[];return t.key=e,t}function pK(){var e=pt([]),t=X1,n=Ho,r=dK;function i(o){var l=Array.from(e.apply(this,arguments),hK),u,f=l.length,h=-1,m;for(const y of o)for(u=0,++h;u<f;++u)(l[u][h]=[0,+r(y,l[u].key,h,o)]).data=y;for(u=0,m=mw(t(l));u<f;++u)l[m[u]].index=u;return n(l,m),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:pt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:pt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?X1:typeof o=="function"?o:pt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Ho,i):n},i}function mK(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}Ho(e,t)}}function yK(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,u=0;l<i;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}Ho(e,t)}}function vK(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var u=0,f=0,h=0;u<l;++u){for(var m=e[t[u]],y=m[r][1]||0,g=m[r-1][1]||0,j=(y-g)/2,S=0;S<u;++S){var w=e[t[S]],b=w[r][1]||0,A=w[r-1][1]||0;j+=b-A}f+=y,h+=j*y}i[r-1][1]+=i[r-1][0]=n,f&&(n-=h/f)}i[r-1][1]+=i[r-1][0]=n,Ho(e,t)}}function fu(e){"@babel/helpers - typeof";return fu=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},fu(e)}var gK=["type","size","sizeType"];function W1(){return W1=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},W1.apply(this,arguments)}function OC(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?OC(Object(n),!0).forEach(function(r){xK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xK(e,t,n){return t=bK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bK(e){var t=jK(e,"string");return fu(t)=="symbol"?t:t+""}function jK(e,t){if(fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SK(e,t){if(e==null)return{};var n=wK(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wK(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 HL={symbolCircle:yw,symbolCross:HF,symbolDiamond:FF,symbolSquare:KF,symbolStar:ZF,symbolTriangle:QF,symbolWye:eK},AK=Math.PI/180,OK=function(t){var n="symbol".concat(Up(t));return HL[n]||yw},_K=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*AK;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}},TK=function(t,n){HL["symbol".concat(Up(t))]=n},vw=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,l=t.sizeType,u=l===void 0?"area":l,f=SK(t,gK),h=_C(_C({},f),{},{type:r,size:o,sizeType:u}),m=function(){var b=OK(r),A=tK().type(b).size(_K(o,u,r));return A()},y=h.className,g=h.cx,j=h.cy,S=je(h,!0);return g===+g&&j===+j&&o===+o?I.createElement("path",W1({},S,{className:Pe("recharts-symbols",y),transform:"translate(".concat(g,", ").concat(j,")"),d:m()})):null};vw.registerSymbol=TK;function Go(e){"@babel/helpers - typeof";return Go=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},Go(e)}function Z1(){return Z1=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},Z1.apply(this,arguments)}function TC(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 EK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(n),!0).forEach(function(r){du(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CK(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,FL(r.key),r)}}function MK(e,t,n){return t&&CK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PK(e,t,n){return t=Ch(t),RK(e,GL()?Reflect.construct(t,n||[],Ch(e).constructor):t.apply(e,n))}function RK(e,t){if(t&&(Go(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kK(e)}function kK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GL=function(){return!!e})()}function Ch(e){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ch(e)}function DK(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&&Q1(e,t)}function Q1(e,t){return Q1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Q1(e,t)}function du(e,t,n){return t=FL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FL(e){var t=LK(e,"string");return Go(t)=="symbol"?t:t+""}function LK(e,t){if(Go(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Go(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ur=32,gw=(function(e){function t(){return NK(this,t),PK(this,t,arguments)}return DK(t,e),MK(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=ur/2,l=ur/6,u=ur/3,f=r.inactive?i:r.color;if(r.type==="plainline")return I.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:ur,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return I.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(u,`
A`).concat(l,",").concat(l,",0,1,1,").concat(2*u,",").concat(o,`
H`).concat(ur,"M").concat(2*u,",").concat(o,`
A`).concat(l,",").concat(l,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return I.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(ur/8,"h").concat(ur,"v").concat(ur*3/4,"h").concat(-ur,"z"),className:"recharts-legend-icon"});if(I.isValidElement(r.legendIcon)){var h=EK({},r);return delete h.legendIcon,I.cloneElement(r.legendIcon,h)}return I.createElement(vw,{fill:f,cx:o,cy:o,size:ur,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,l=i.iconSize,u=i.layout,f=i.formatter,h=i.inactiveColor,m={x:0,y:0,width:ur,height:ur},y={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(j,S){var w=j.formatter||f,b=Pe(du(du({"recharts-legend-item":!0},"legend-item-".concat(S),!0),"inactive",j.inactive));if(j.type==="none")return null;var A=Te(j.value)?null:j.value;Pr(!Te(j.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 _=j.inactive?h:j.color;return I.createElement("li",Z1({className:b,style:y,key:"legend-item-".concat(S)},ws(r.props,j,S)),I.createElement(H1,{width:l,height:l,viewBox:m,style:g},r.renderIcon(j)),I.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},w?w(A,j,S):A))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,l=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return I.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(P.PureComponent);du(gw,"displayName","Legend");du(gw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var xx,EC;function zK(){if(EC)return xx;EC=1;var e=Bp();function t(){this.__data__=new e,this.size=0}return xx=t,xx}var bx,NC;function $K(){if(NC)return bx;NC=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return bx=e,bx}var jx,CC;function BK(){if(CC)return jx;CC=1;function e(t){return this.__data__.get(t)}return jx=e,jx}var Sx,MC;function IK(){if(MC)return Sx;MC=1;function e(t){return this.__data__.has(t)}return Sx=e,Sx}var wx,PC;function qK(){if(PC)return wx;PC=1;var e=Bp(),t=lw(),n=cw(),r=200;function i(o,l){var u=this.__data__;if(u instanceof e){var f=u.__data__;if(!t||f.length<r-1)return f.push([o,l]),this.size=++u.size,this;u=this.__data__=new n(f)}return u.set(o,l),this.size=u.size,this}return wx=i,wx}var Ax,RC;function KL(){if(RC)return Ax;RC=1;var e=Bp(),t=zK(),n=$K(),r=BK(),i=IK(),o=qK();function l(u){var f=this.__data__=new e(u);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=i,l.prototype.set=o,Ax=l,Ax}var Ox,kC;function UK(){if(kC)return Ox;kC=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Ox=t,Ox}var _x,DC;function VK(){if(DC)return _x;DC=1;function e(t){return this.__data__.has(t)}return _x=e,_x}var Tx,LC;function YL(){if(LC)return Tx;LC=1;var e=cw(),t=UK(),n=VK();function r(i){var o=-1,l=i==null?0:i.length;for(this.__data__=new e;++o<l;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Tx=r,Tx}var Ex,zC;function XL(){if(zC)return Ex;zC=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Ex=e,Ex}var Nx,$C;function WL(){if($C)return Nx;$C=1;function e(t,n){return t.has(n)}return Nx=e,Nx}var Cx,BC;function ZL(){if(BC)return Cx;BC=1;var e=YL(),t=XL(),n=WL(),r=1,i=2;function o(l,u,f,h,m,y){var g=f&r,j=l.length,S=u.length;if(j!=S&&!(g&&S>j))return!1;var w=y.get(l),b=y.get(u);if(w&&b)return w==u&&b==l;var A=-1,_=!0,T=f&i?new e:void 0;for(y.set(l,u),y.set(u,l);++A<j;){var C=l[A],O=u[A];if(h)var E=g?h(O,C,A,u,l,y):h(C,O,A,l,u,y);if(E!==void 0){if(E)continue;_=!1;break}if(T){if(!t(u,function(M,D){if(!n(T,D)&&(C===M||m(C,M,f,h,y)))return T.push(D)})){_=!1;break}}else if(!(C===O||m(C,O,f,h,y))){_=!1;break}}return y.delete(l),y.delete(u),_}return Cx=o,Cx}var Mx,IC;function HK(){if(IC)return Mx;IC=1;var e=ea(),t=e.Uint8Array;return Mx=t,Mx}var Px,qC;function GK(){if(qC)return Px;qC=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return Px=e,Px}var Rx,UC;function xw(){if(UC)return Rx;UC=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Rx=e,Rx}var kx,VC;function FK(){if(VC)return kx;VC=1;var e=ef(),t=HK(),n=ow(),r=ZL(),i=GK(),o=xw(),l=1,u=2,f="[object Boolean]",h="[object Date]",m="[object Error]",y="[object Map]",g="[object Number]",j="[object RegExp]",S="[object Set]",w="[object String]",b="[object Symbol]",A="[object ArrayBuffer]",_="[object DataView]",T=e?e.prototype:void 0,C=T?T.valueOf:void 0;function O(E,M,D,k,B,q,$){switch(D){case _:if(E.byteLength!=M.byteLength||E.byteOffset!=M.byteOffset)return!1;E=E.buffer,M=M.buffer;case A:return!(E.byteLength!=M.byteLength||!q(new t(E),new t(M)));case f:case h:case g:return n(+E,+M);case m:return E.name==M.name&&E.message==M.message;case j:case w:return E==M+"";case y:var F=i;case S:var X=k&l;if(F||(F=o),E.size!=M.size&&!X)return!1;var Y=$.get(E);if(Y)return Y==M;k|=u,$.set(E,M);var L=r(F(E),F(M),k,B,q,$);return $.delete(E),L;case b:if(C)return C.call(E)==C.call(M)}return!1}return kx=O,kx}var Dx,HC;function QL(){if(HC)return Dx;HC=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return Dx=e,Dx}var Lx,GC;function KK(){if(GC)return Lx;GC=1;var e=QL(),t=Rn();function n(r,i,o){var l=i(r);return t(r)?l:e(l,o(r))}return Lx=n,Lx}var zx,FC;function YK(){if(FC)return zx;FC=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,l=[];++r<i;){var u=t[r];n(u,r,t)&&(l[o++]=u)}return l}return zx=e,zx}var $x,KC;function XK(){if(KC)return $x;KC=1;function e(){return[]}return $x=e,$x}var Bx,YC;function WK(){if(YC)return Bx;YC=1;var e=YK(),t=XK(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(l){return l==null?[]:(l=Object(l),e(i(l),function(u){return r.call(l,u)}))}:t;return Bx=o,Bx}var Ix,XC;function ZK(){if(XC)return Ix;XC=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Ix=e,Ix}var qx,WC;function QK(){if(WC)return qx;WC=1;var e=za(),t=$a(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return qx=r,qx}var Ux,ZC;function bw(){if(ZC)return Ux;ZC=1;var e=QK(),t=$a(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!i.call(l,"callee")};return Ux=o,Ux}var Vc={exports:{}},Vx,QC;function JK(){if(QC)return Vx;QC=1;function e(){return!1}return Vx=e,Vx}Vc.exports;var JC;function JL(){return JC||(JC=1,(function(e,t){var n=ea(),r=JK(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?n.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||r;e.exports=h})(Vc,Vc.exports)),Vc.exports}var Hx,eM;function jw(){if(eM)return Hx;eM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Hx=n,Hx}var Gx,tM;function Sw(){if(tM)return Gx;tM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Gx=t,Gx}var Fx,nM;function eY(){if(nM)return Fx;nM=1;var e=za(),t=Sw(),n=$a(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",u="[object Error]",f="[object Function]",h="[object Map]",m="[object Number]",y="[object Object]",g="[object RegExp]",j="[object Set]",S="[object String]",w="[object WeakMap]",b="[object ArrayBuffer]",A="[object DataView]",_="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",O="[object Int16Array]",E="[object Int32Array]",M="[object Uint8Array]",D="[object Uint8ClampedArray]",k="[object Uint16Array]",B="[object Uint32Array]",q={};q[_]=q[T]=q[C]=q[O]=q[E]=q[M]=q[D]=q[k]=q[B]=!0,q[r]=q[i]=q[b]=q[o]=q[A]=q[l]=q[u]=q[f]=q[h]=q[m]=q[y]=q[g]=q[j]=q[S]=q[w]=!1;function $(F){return n(F)&&t(F.length)&&!!q[e(F)]}return Fx=$,Fx}var Kx,rM;function ez(){if(rM)return Kx;rM=1;function e(t){return function(n){return t(n)}}return Kx=e,Kx}var Hc={exports:{}};Hc.exports;var aM;function tY(){return aM||(aM=1,(function(e,t){var n=xL(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,l=o&&n.process,u=(function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=u})(Hc,Hc.exports)),Hc.exports}var Yx,iM;function tz(){if(iM)return Yx;iM=1;var e=eY(),t=ez(),n=tY(),r=n&&n.isTypedArray,i=r?t(r):e;return Yx=i,Yx}var Xx,sM;function nY(){if(sM)return Xx;sM=1;var e=ZK(),t=bw(),n=Rn(),r=JL(),i=jw(),o=tz(),l=Object.prototype,u=l.hasOwnProperty;function f(h,m){var y=n(h),g=!y&&t(h),j=!y&&!g&&r(h),S=!y&&!g&&!j&&o(h),w=y||g||j||S,b=w?e(h.length,String):[],A=b.length;for(var _ in h)(m||u.call(h,_))&&!(w&&(_=="length"||j&&(_=="offset"||_=="parent")||S&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,A)))&&b.push(_);return b}return Xx=f,Xx}var Wx,oM;function rY(){if(oM)return Wx;oM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Wx=t,Wx}var Zx,lM;function nz(){if(lM)return Zx;lM=1;function e(t,n){return function(r){return t(n(r))}}return Zx=e,Zx}var Qx,cM;function aY(){if(cM)return Qx;cM=1;var e=nz(),t=e(Object.keys,Object);return Qx=t,Qx}var Jx,uM;function iY(){if(uM)return Jx;uM=1;var e=rY(),t=aY(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var l=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&l.push(u);return l}return Jx=i,Jx}var eb,fM;function tf(){if(fM)return eb;fM=1;var e=sw(),t=Sw();function n(r){return r!=null&&t(r.length)&&!e(r)}return eb=n,eb}var tb,dM;function Fp(){if(dM)return tb;dM=1;var e=nY(),t=iY(),n=tf();function r(i){return n(i)?e(i):t(i)}return tb=r,tb}var nb,hM;function sY(){if(hM)return nb;hM=1;var e=KK(),t=WK(),n=Fp();function r(i){return e(i,n,t)}return nb=r,nb}var rb,pM;function oY(){if(pM)return rb;pM=1;var e=sY(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,l,u,f,h,m){var y=u&t,g=e(o),j=g.length,S=e(l),w=S.length;if(j!=w&&!y)return!1;for(var b=j;b--;){var A=g[b];if(!(y?A in l:r.call(l,A)))return!1}var _=m.get(o),T=m.get(l);if(_&&T)return _==l&&T==o;var C=!0;m.set(o,l),m.set(l,o);for(var O=y;++b<j;){A=g[b];var E=o[A],M=l[A];if(f)var D=y?f(M,E,A,l,o,m):f(E,M,A,o,l,m);if(!(D===void 0?E===M||h(E,M,u,f,m):D)){C=!1;break}O||(O=A=="constructor")}if(C&&!O){var k=o.constructor,B=l.constructor;k!=B&&"constructor"in o&&"constructor"in l&&!(typeof k=="function"&&k instanceof k&&typeof B=="function"&&B instanceof B)&&(C=!1)}return m.delete(o),m.delete(l),C}return rb=i,rb}var ab,mM;function lY(){if(mM)return ab;mM=1;var e=Cs(),t=ea(),n=e(t,"DataView");return ab=n,ab}var ib,yM;function cY(){if(yM)return ib;yM=1;var e=Cs(),t=ea(),n=e(t,"Promise");return ib=n,ib}var sb,vM;function rz(){if(vM)return sb;vM=1;var e=Cs(),t=ea(),n=e(t,"Set");return sb=n,sb}var ob,gM;function uY(){if(gM)return ob;gM=1;var e=Cs(),t=ea(),n=e(t,"WeakMap");return ob=n,ob}var lb,xM;function fY(){if(xM)return lb;xM=1;var e=lY(),t=lw(),n=cY(),r=rz(),i=uY(),o=za(),l=bL(),u="[object Map]",f="[object Object]",h="[object Promise]",m="[object Set]",y="[object WeakMap]",g="[object DataView]",j=l(e),S=l(t),w=l(n),b=l(r),A=l(i),_=o;return(e&&_(new e(new ArrayBuffer(1)))!=g||t&&_(new t)!=u||n&&_(n.resolve())!=h||r&&_(new r)!=m||i&&_(new i)!=y)&&(_=function(T){var C=o(T),O=C==f?T.constructor:void 0,E=O?l(O):"";if(E)switch(E){case j:return g;case S:return u;case w:return h;case b:return m;case A:return y}return C}),lb=_,lb}var cb,bM;function dY(){if(bM)return cb;bM=1;var e=KL(),t=ZL(),n=FK(),r=oY(),i=fY(),o=Rn(),l=JL(),u=tz(),f=1,h="[object Arguments]",m="[object Array]",y="[object Object]",g=Object.prototype,j=g.hasOwnProperty;function S(w,b,A,_,T,C){var O=o(w),E=o(b),M=O?m:i(w),D=E?m:i(b);M=M==h?y:M,D=D==h?y:D;var k=M==y,B=D==y,q=M==D;if(q&&l(w)){if(!l(b))return!1;O=!0,k=!1}if(q&&!k)return C||(C=new e),O||u(w)?t(w,b,A,_,T,C):n(w,b,M,A,_,T,C);if(!(A&f)){var $=k&&j.call(w,"__wrapped__"),F=B&&j.call(b,"__wrapped__");if($||F){var X=$?w.value():w,Y=F?b.value():b;return C||(C=new e),T(X,Y,A,_,C)}}return q?(C||(C=new e),r(w,b,A,_,T,C)):!1}return cb=S,cb}var ub,jM;function ww(){if(jM)return ub;jM=1;var e=dY(),t=$a();function n(r,i,o,l,u){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,l,n,u)}return ub=n,ub}var fb,SM;function hY(){if(SM)return fb;SM=1;var e=KL(),t=ww(),n=1,r=2;function i(o,l,u,f){var h=u.length,m=h,y=!f;if(o==null)return!m;for(o=Object(o);h--;){var g=u[h];if(y&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++h<m;){g=u[h];var j=g[0],S=o[j],w=g[1];if(y&&g[2]){if(S===void 0&&!(j in o))return!1}else{var b=new e;if(f)var A=f(S,w,j,o,l,b);if(!(A===void 0?t(w,S,n|r,f,b):A))return!1}}return!0}return fb=i,fb}var db,wM;function az(){if(wM)return db;wM=1;var e=Mi();function t(n){return n===n&&!e(n)}return db=t,db}var hb,AM;function pY(){if(AM)return hb;AM=1;var e=az(),t=Fp();function n(r){for(var i=t(r),o=i.length;o--;){var l=i[o],u=r[l];i[o]=[l,u,e(u)]}return i}return hb=n,hb}var pb,OM;function iz(){if(OM)return pb;OM=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return pb=e,pb}var mb,_M;function mY(){if(_M)return mb;_M=1;var e=hY(),t=pY(),n=iz();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===i||e(l,i,o)}}return mb=r,mb}var yb,TM;function yY(){if(TM)return yb;TM=1;function e(t,n){return t!=null&&n in Object(t)}return yb=e,yb}var vb,EM;function vY(){if(EM)return vb;EM=1;var e=wL(),t=bw(),n=Rn(),r=jw(),i=Sw(),o=qp();function l(u,f,h){f=e(f,u);for(var m=-1,y=f.length,g=!1;++m<y;){var j=o(f[m]);if(!(g=u!=null&&h(u,j)))break;u=u[j]}return g||++m!=y?g:(y=u==null?0:u.length,!!y&&i(y)&&r(j,y)&&(n(u)||t(u)))}return vb=l,vb}var gb,NM;function gY(){if(NM)return gb;NM=1;var e=yY(),t=vY();function n(r,i){return r!=null&&t(r,i,e)}return gb=n,gb}var xb,CM;function xY(){if(CM)return xb;CM=1;var e=ww(),t=AL(),n=gY(),r=iw(),i=az(),o=iz(),l=qp(),u=1,f=2;function h(m,y){return r(m)&&i(y)?o(l(m),y):function(g){var j=t(g,m);return j===void 0&&j===y?n(g,m):e(y,j,u|f)}}return xb=h,xb}var bb,MM;function Tl(){if(MM)return bb;MM=1;function e(t){return t}return bb=e,bb}var jb,PM;function bY(){if(PM)return jb;PM=1;function e(t){return function(n){return n==null?void 0:n[t]}}return jb=e,jb}var Sb,RM;function jY(){if(RM)return Sb;RM=1;var e=fw();function t(n){return function(r){return e(r,n)}}return Sb=t,Sb}var wb,kM;function SY(){if(kM)return wb;kM=1;var e=bY(),t=jY(),n=iw(),r=qp();function i(o){return n(o)?e(r(o)):t(o)}return wb=i,wb}var Ab,DM;function ta(){if(DM)return Ab;DM=1;var e=mY(),t=xY(),n=Tl(),r=Rn(),i=SY();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):i(l)}return Ab=o,Ab}var Ob,LM;function sz(){if(LM)return Ob;LM=1;function e(t,n,r,i){for(var o=t.length,l=r+(i?1:-1);i?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return Ob=e,Ob}var _b,zM;function wY(){if(zM)return _b;zM=1;function e(t){return t!==t}return _b=e,_b}var Tb,$M;function AY(){if($M)return Tb;$M=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return Tb=e,Tb}var Eb,BM;function OY(){if(BM)return Eb;BM=1;var e=sz(),t=wY(),n=AY();function r(i,o,l){return o===o?n(i,o,l):e(i,t,l)}return Eb=r,Eb}var Nb,IM;function _Y(){if(IM)return Nb;IM=1;var e=OY();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return Nb=t,Nb}var Cb,qM;function TY(){if(qM)return Cb;qM=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return Cb=e,Cb}var Mb,UM;function EY(){if(UM)return Mb;UM=1;function e(){}return Mb=e,Mb}var Pb,VM;function NY(){if(VM)return Pb;VM=1;var e=rz(),t=EY(),n=xw(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return Pb=i,Pb}var Rb,HM;function CY(){if(HM)return Rb;HM=1;var e=YL(),t=_Y(),n=TY(),r=WL(),i=NY(),o=xw(),l=200;function u(f,h,m){var y=-1,g=t,j=f.length,S=!0,w=[],b=w;if(m)S=!1,g=n;else if(j>=l){var A=h?null:i(f);if(A)return o(A);S=!1,g=r,b=new e}else b=h?[]:w;e:for(;++y<j;){var _=f[y],T=h?h(_):_;if(_=m||_!==0?_:0,S&&T===T){for(var C=b.length;C--;)if(b[C]===T)continue e;h&&b.push(T),w.push(_)}else g(b,T,m)||(b!==w&&b.push(T),w.push(_))}return w}return Rb=u,Rb}var kb,GM;function MY(){if(GM)return kb;GM=1;var e=ta(),t=CY();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return kb=n,kb}var PY=MY();const FM=at(PY);function oz(e,t,n){return t===!0?FM(e,n):Te(t)?FM(e,t):e}function Fo(e){"@babel/helpers - typeof";return Fo=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},Fo(e)}var RY=["ref"];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 Sa(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){Kp(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 kY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YM(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,cz(r.key),r)}}function DY(e,t,n){return t&&YM(e.prototype,t),n&&YM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function LY(e,t,n){return t=Mh(t),zY(e,lz()?Reflect.construct(t,n||[],Mh(e).constructor):t.apply(e,n))}function zY(e,t){if(t&&(Fo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Y(e)}function $Y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lz=function(){return!!e})()}function Mh(e){return Mh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mh(e)}function BY(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&&J1(e,t)}function J1(e,t){return J1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},J1(e,t)}function Kp(e,t,n){return t=cz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cz(e){var t=IY(e,"string");return Fo(t)=="symbol"?t:t+""}function IY(e,t){if(Fo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function qY(e,t){if(e==null)return{};var n=UY(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UY(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 VY(e){return e.value}function HY(e,t){if(I.isValidElement(e))return I.cloneElement(e,t);if(typeof e=="function")return I.createElement(e,t);t.ref;var n=qY(t,RY);return I.createElement(gw,n)}var XM=1,zo=(function(e){function t(){var n;kY(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=LY(this,t,[].concat(i)),Kp(n,"lastBoundingBox",{width:-1,height:-1}),n}return BY(t,e),DY(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)>XM||Math.abs(i.height-this.lastBoundingBox.height)>XM)&&(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?Sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,l=i.align,u=i.verticalAlign,f=i.margin,h=i.chartWidth,m=i.chartHeight,y,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&o==="vertical"){var j=this.getBBoxSnapshot();y={left:((h||0)-j.width)/2}}else y=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var S=this.getBBoxSnapshot();g={top:((m||0)-S.height)/2}}else g=u==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Sa(Sa({},y),g)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,l=i.width,u=i.height,f=i.wrapperStyle,h=i.payloadUniqBy,m=i.payload,y=Sa(Sa({position:"absolute",width:l||"auto",height:u||"auto"},this.getDefaultPosition(f)),f);return I.createElement("div",{className:"recharts-legend-wrapper",style:y,ref:function(j){r.wrapperNode=j}},HY(o,Sa(Sa({},this.props),{},{payload:oz(m,h,VY)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Sa(Sa({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&ce(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})(P.PureComponent);Kp(zo,"displayName","Legend");Kp(zo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Db,WM;function GY(){if(WM)return Db;WM=1;var e=ef(),t=bw(),n=Rn(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return Db=i,Db}var Lb,ZM;function uz(){if(ZM)return Lb;ZM=1;var e=QL(),t=GY();function n(r,i,o,l,u){var f=-1,h=r.length;for(o||(o=t),u||(u=[]);++f<h;){var m=r[f];i>0&&o(m)?i>1?n(m,i-1,o,l,u):e(u,m):l||(u[u.length]=m)}return u}return Lb=n,Lb}var zb,QM;function FY(){if(QM)return zb;QM=1;function e(t){return function(n,r,i){for(var o=-1,l=Object(n),u=i(n),f=u.length;f--;){var h=u[t?f:++o];if(r(l[h],h,l)===!1)break}return n}}return zb=e,zb}var $b,JM;function KY(){if(JM)return $b;JM=1;var e=FY(),t=e();return $b=t,$b}var Bb,eP;function fz(){if(eP)return Bb;eP=1;var e=KY(),t=Fp();function n(r,i){return r&&e(r,i,t)}return Bb=n,Bb}var Ib,tP;function YY(){if(tP)return Ib;tP=1;var e=tf();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var l=i.length,u=r?l:-1,f=Object(i);(r?u--:++u<l)&&o(f[u],u,f)!==!1;);return i}}return Ib=t,Ib}var qb,nP;function Aw(){if(nP)return qb;nP=1;var e=fz(),t=YY(),n=t(e);return qb=n,qb}var Ub,rP;function dz(){if(rP)return Ub;rP=1;var e=Aw(),t=tf();function n(r,i){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(u,f,h){l[++o]=i(u,f,h)}),l}return Ub=n,Ub}var Vb,aP;function XY(){if(aP)return Vb;aP=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Vb=e,Vb}var Hb,iP;function WY(){if(iP)return Hb;iP=1;var e=Al();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,l=n===n,u=e(n),f=r!==void 0,h=r===null,m=r===r,y=e(r);if(!h&&!y&&!u&&n>r||u&&f&&m&&!h&&!y||o&&f&&m||!i&&m||!l)return 1;if(!o&&!u&&!y&&n<r||y&&i&&l&&!o&&!u||h&&i&&l||!f&&l||!m)return-1}return 0}return Hb=t,Hb}var Gb,sP;function ZY(){if(sP)return Gb;sP=1;var e=WY();function t(n,r,i){for(var o=-1,l=n.criteria,u=r.criteria,f=l.length,h=i.length;++o<f;){var m=e(l[o],u[o]);if(m){if(o>=h)return m;var y=i[o];return m*(y=="desc"?-1:1)}}return n.index-r.index}return Gb=t,Gb}var Fb,oP;function QY(){if(oP)return Fb;oP=1;var e=uw(),t=fw(),n=ta(),r=dz(),i=XY(),o=ez(),l=ZY(),u=Tl(),f=Rn();function h(m,y,g){y.length?y=e(y,function(w){return f(w)?function(b){return t(b,w.length===1?w[0]:w)}:w}):y=[u];var j=-1;y=e(y,o(n));var S=r(m,function(w,b,A){var _=e(y,function(T){return T(w)});return{criteria:_,index:++j,value:w}});return i(S,function(w,b){return l(w,b,g)})}return Fb=h,Fb}var Kb,lP;function JY(){if(lP)return Kb;lP=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Kb=e,Kb}var Yb,cP;function eX(){if(cP)return Yb;cP=1;var e=JY(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var l=arguments,u=-1,f=t(l.length-i,0),h=Array(f);++u<f;)h[u]=l[i+u];u=-1;for(var m=Array(i+1);++u<i;)m[u]=l[u];return m[i]=o(h),e(r,this,m)}}return Yb=n,Yb}var Xb,uP;function tX(){if(uP)return Xb;uP=1;function e(t){return function(){return t}}return Xb=e,Xb}var Wb,fP;function hz(){if(fP)return Wb;fP=1;var e=Cs(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Wb=t,Wb}var Zb,dP;function nX(){if(dP)return Zb;dP=1;var e=tX(),t=hz(),n=Tl(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Zb=r,Zb}var Qb,hP;function rX(){if(hP)return Qb;hP=1;var e=800,t=16,n=Date.now;function r(i){var o=0,l=0;return function(){var u=n(),f=t-(u-l);if(l=u,f>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return Qb=r,Qb}var Jb,pP;function aX(){if(pP)return Jb;pP=1;var e=nX(),t=rX(),n=t(e);return Jb=n,Jb}var e0,mP;function iX(){if(mP)return e0;mP=1;var e=Tl(),t=eX(),n=aX();function r(i,o){return n(t(i,o,e),i+"")}return e0=r,e0}var t0,yP;function Yp(){if(yP)return t0;yP=1;var e=ow(),t=tf(),n=jw(),r=Mi();function i(o,l,u){if(!r(u))return!1;var f=typeof l;return(f=="number"?t(u)&&n(l,u.length):f=="string"&&l in u)?e(u[l],o):!1}return t0=i,t0}var n0,vP;function sX(){if(vP)return n0;vP=1;var e=uz(),t=QY(),n=iX(),r=Yp(),i=n(function(o,l){if(o==null)return[];var u=l.length;return u>1&&r(o,l[0],l[1])?l=[]:u>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return n0=i,n0}var oX=sX();const Ow=at(oX);function hu(e){"@babel/helpers - typeof";return hu=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},hu(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 lX(e,t){return dX(e)||fX(e,t)||uX(e,t)||cX()}function cX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uX(e,t){if(e){if(typeof e=="string")return gP(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 gP(e,t)}}function gP(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 fX(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function dX(e){if(Array.isArray(e))return e}function xP(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 r0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xP(Object(n),!0).forEach(function(r){hX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hX(e,t,n){return t=pX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pX(e){var t=mX(e,"string");return hu(t)=="symbol"?t:t+""}function mX(e,t){if(hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yX(e){return Array.isArray(e)&&Kt(e[0])&&Kt(e[1])?e.join(" ~ "):e}var vX=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,o=i===void 0?{}:i,l=t.itemStyle,u=l===void 0?{}:l,f=t.labelStyle,h=f===void 0?{}:f,m=t.payload,y=t.formatter,g=t.itemSorter,j=t.wrapperClassName,S=t.labelClassName,w=t.label,b=t.labelFormatter,A=t.accessibilityLayer,_=A===void 0?!1:A,T=function(){if(m&&m.length){var $={padding:0,margin:0},F=(g?Ow(m,g):m).map(function(X,Y){if(X.type==="none")return null;var L=r0({display:"block",paddingTop:4,paddingBottom:4,color:X.color||"#000"},u),H=X.formatter||y||yX,Q=X.value,ae=X.name,oe=Q,z=ae;if(H&&oe!=null&&z!=null){var G=H(Q,ae,X,Y,m);if(Array.isArray(G)){var re=lX(G,2);oe=re[0],z=re[1]}else oe=G}return I.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(Y),style:L},Kt(z)?I.createElement("span",{className:"recharts-tooltip-item-name"},z):null,Kt(z)?I.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,I.createElement("span",{className:"recharts-tooltip-item-value"},oe),I.createElement("span",{className:"recharts-tooltip-item-unit"},X.unit||""))});return I.createElement("ul",{className:"recharts-tooltip-item-list",style:$},F)}return null},C=r0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),O=r0({margin:0},h),E=!Ne(w),M=E?w:"",D=Pe("recharts-default-tooltip",j),k=Pe("recharts-tooltip-label",S);E&&b&&m!==void 0&&m!==null&&(M=b(w,m));var B=_?{role:"status","aria-live":"assertive"}:{};return I.createElement("div",ej({className:D,style:C},B),I.createElement("p",{className:k,style:O},I.isValidElement(M)?M:"".concat(M)),T())};function pu(e){"@babel/helpers - typeof";return pu=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},pu(e)}function zd(e,t,n){return t=gX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gX(e){var t=xX(e,"string");return pu(t)=="symbol"?t:t+""}function xX(e,t){if(pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mc="recharts-tooltip-wrapper",bX={visibility:"hidden"};function jX(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Pe(Mc,zd(zd(zd(zd({},"".concat(Mc,"-right"),ce(n)&&t&&ce(t.x)&&n>=t.x),"".concat(Mc,"-left"),ce(n)&&t&&ce(t.x)&&n<t.x),"".concat(Mc,"-bottom"),ce(r)&&t&&ce(t.y)&&r>=t.y),"".concat(Mc,"-top"),ce(r)&&t&&ce(t.y)&&r<t.y))}function bP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,l=e.reverseDirection,u=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&ce(o[r]))return o[r];var m=n[r]-u-i,y=n[r]+i;if(t[r])return l[r]?m:y;if(l[r]){var g=m,j=f[r];return g<j?Math.max(y,f[r]):Math.max(m,f[r])}var S=y+u,w=f[r]+h;return S>w?Math.max(m,f[r]):Math.max(y,f[r])}function SX(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 wX(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipBox,u=e.useTranslate3d,f=e.viewBox,h,m,y;return l.height>0&&l.width>0&&n?(m=bP({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),y=bP({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),h=SX({translateX:m,translateY:y,useTranslate3d:u})):h=bX,{cssProperties:h,cssClasses:jX({translateX:m,translateY:y,coordinate:n})}}function Ko(e){"@babel/helpers - typeof";return Ko=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},Ko(e)}function jP(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 SP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(n),!0).forEach(function(r){nj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OX(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,mz(r.key),r)}}function _X(e,t,n){return t&&OX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TX(e,t,n){return t=Ph(t),EX(e,pz()?Reflect.construct(t,n||[],Ph(e).constructor):t.apply(e,n))}function EX(e,t){if(t&&(Ko(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NX(e)}function NX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pz=function(){return!!e})()}function Ph(e){return Ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ph(e)}function CX(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 nj(e,t,n){return t=mz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mz(e){var t=MX(e,"string");return Ko(t)=="symbol"?t:t+""}function MX(e,t){if(Ko(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ko(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wP=1,PX=(function(e){function t(){var n;AX(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=TX(this,t,[].concat(i)),nj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),nj(n,"handleKeyDown",function(l){if(l.key==="Escape"){var u,f,h,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&u!==void 0?u:0,y:(h=(m=n.props.coordinate)===null||m===void 0?void 0:m.y)!==null&&h!==void 0?h:0}})}}),n}return CX(t,e),_X(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>wP||Math.abs(r.height-this.state.lastBoundingBox.height)>wP)&&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,o=i.active,l=i.allowEscapeViewBox,u=i.animationDuration,f=i.animationEasing,h=i.children,m=i.coordinate,y=i.hasPayload,g=i.isAnimationActive,j=i.offset,S=i.position,w=i.reverseDirection,b=i.useTranslate3d,A=i.viewBox,_=i.wrapperStyle,T=wX({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:j,position:S,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:A}),C=T.cssClasses,O=T.cssProperties,E=SP(SP({transition:g&&o?"transform ".concat(u,"ms ").concat(f):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&y?"visible":"hidden",position:"absolute",top:0,left:0},_);return I.createElement("div",{tabIndex:-1,className:C,style:E,ref:function(D){r.wrapperNode=D}},h)}}])})(P.PureComponent),RX=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Pi={isSsr:RX()};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)}function AP(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 OP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(n),!0).forEach(function(r){_w(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DX(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 LX(e,t,n){return t&&DX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zX(e,t,n){return t=Rh(t),$X(e,yz()?Reflect.construct(t,n||[],Rh(e).constructor):t.apply(e,n))}function $X(e,t){if(t&&(Yo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BX(e)}function BX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yz=function(){return!!e})()}function Rh(e){return Rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rh(e)}function IX(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 _w(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=qX(e,"string");return Yo(t)=="symbol"?t:t+""}function qX(e,t){if(Yo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function UX(e){return e.dataKey}function VX(e,t){return I.isValidElement(e)?I.cloneElement(e,t):typeof e=="function"?I.createElement(e,t):I.createElement(vX,t)}var Fn=(function(e){function t(){return kX(this,t),zX(this,t,arguments)}return IX(t,e),LX(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,l=i.allowEscapeViewBox,u=i.animationDuration,f=i.animationEasing,h=i.content,m=i.coordinate,y=i.filterNull,g=i.isAnimationActive,j=i.offset,S=i.payload,w=i.payloadUniqBy,b=i.position,A=i.reverseDirection,_=i.useTranslate3d,T=i.viewBox,C=i.wrapperStyle,O=S??[];y&&O.length&&(O=oz(S.filter(function(M){return M.value!=null&&(M.hide!==!0||r.props.includeHidden)}),w,UX));var E=O.length>0;return I.createElement(PX,{allowEscapeViewBox:l,animationDuration:u,animationEasing:f,isAnimationActive:g,active:o,coordinate:m,hasPayload:E,offset:j,position:b,reverseDirection:A,useTranslate3d:_,viewBox:T,wrapperStyle:C},VX(h,OP(OP({},this.props),{},{payload:O})))}}])})(P.PureComponent);_w(Fn,"displayName","Tooltip");_w(Fn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Pi.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 a0,_P;function HX(){if(_P)return a0;_P=1;var e=ea(),t=function(){return e.Date.now()};return a0=t,a0}var i0,TP;function GX(){if(TP)return i0;TP=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return i0=t,i0}var s0,EP;function FX(){if(EP)return s0;EP=1;var e=GX(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return s0=n,s0}var o0,NP;function gz(){if(NP)return o0;NP=1;var e=FX(),t=Mi(),n=Al(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function f(h){if(typeof h=="number")return h;if(n(h))return r;if(t(h)){var m=typeof h.valueOf=="function"?h.valueOf():h;h=t(m)?m+"":m}if(typeof h!="string")return h===0?h:+h;h=e(h);var y=o.test(h);return y||l.test(h)?u(h.slice(2),y?2:8):i.test(h)?r:+h}return o0=f,o0}var l0,CP;function KX(){if(CP)return l0;CP=1;var e=Mi(),t=HX(),n=gz(),r="Expected a function",i=Math.max,o=Math.min;function l(u,f,h){var m,y,g,j,S,w,b=0,A=!1,_=!1,T=!0;if(typeof u!="function")throw new TypeError(r);f=n(f)||0,e(h)&&(A=!!h.leading,_="maxWait"in h,g=_?i(n(h.maxWait)||0,f):g,T="trailing"in h?!!h.trailing:T);function C(F){var X=m,Y=y;return m=y=void 0,b=F,j=u.apply(Y,X),j}function O(F){return b=F,S=setTimeout(D,f),A?C(F):j}function E(F){var X=F-w,Y=F-b,L=f-X;return _?o(L,g-Y):L}function M(F){var X=F-w,Y=F-b;return w===void 0||X>=f||X<0||_&&Y>=g}function D(){var F=t();if(M(F))return k(F);S=setTimeout(D,E(F))}function k(F){return S=void 0,T&&m?C(F):(m=y=void 0,j)}function B(){S!==void 0&&clearTimeout(S),b=0,m=w=y=S=void 0}function q(){return S===void 0?j:k(t())}function $(){var F=t(),X=M(F);if(m=arguments,y=this,w=F,X){if(S===void 0)return O(w);if(_)return clearTimeout(S),S=setTimeout(D,f),C(w)}return S===void 0&&(S=setTimeout(D,f)),j}return $.cancel=B,$.flush=q,$}return l0=l,l0}var c0,MP;function YX(){if(MP)return c0;MP=1;var e=KX(),t=Mi(),n="Expected a function";function r(i,o,l){var u=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(u="leading"in l?!!l.leading:u,f="trailing"in l?!!l.trailing:f),e(i,o,{leading:u,maxWait:o,trailing:f})}return c0=r,c0}var XX=YX();const xz=at(XX);function mu(e){"@babel/helpers - typeof";return mu=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},mu(e)}function PP(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 $d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PP(Object(n),!0).forEach(function(r){WX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WX(e,t,n){return t=ZX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZX(e){var t=QX(e,"string");return mu(t)=="symbol"?t:t+""}function QX(e,t){if(mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JX(e,t){return rW(e)||nW(e,t)||tW(e,t)||eW()}function eW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tW(e,t){if(e){if(typeof e=="string")return RP(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 RP(e,t)}}function RP(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 nW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function rW(e){if(Array.isArray(e))return e}var kh=P.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=e.width,l=o===void 0?"100%":o,u=e.height,f=u===void 0?"100%":u,h=e.minWidth,m=h===void 0?0:h,y=e.minHeight,g=e.maxHeight,j=e.children,S=e.debounce,w=S===void 0?0:S,b=e.id,A=e.className,_=e.onResize,T=e.style,C=T===void 0?{}:T,O=P.useRef(null),E=P.useRef();E.current=_,P.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 M=P.useState({containerWidth:i.width,containerHeight:i.height}),D=JX(M,2),k=D[0],B=D[1],q=P.useCallback(function(F,X){B(function(Y){var L=Math.round(F),H=Math.round(X);return Y.containerWidth===L&&Y.containerHeight===H?Y:{containerWidth:L,containerHeight:H}})},[]);P.useEffect(function(){var F=function(ae){var oe,z=ae[0].contentRect,G=z.width,re=z.height;q(G,re),(oe=E.current)===null||oe===void 0||oe.call(E,G,re)};w>0&&(F=xz(F,w,{trailing:!0,leading:!1}));var X=new ResizeObserver(F),Y=O.current.getBoundingClientRect(),L=Y.width,H=Y.height;return q(L,H),X.observe(O.current),function(){X.disconnect()}},[q,w]);var $=P.useMemo(function(){var F=k.containerWidth,X=k.containerHeight;if(F<0||X<0)return null;Pr(fs(l)||fs(f),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,l,f),Pr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var Y=fs(l)?F:l,L=fs(f)?X:f;n&&n>0&&(Y?L=Y/n:L&&(Y=L*n),g&&L>g&&(L=g)),Pr(Y>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,Y,L,l,f,m,y,n);var H=!Array.isArray(j)&&Ea(j.type).endsWith("Chart");return I.Children.map(j,function(Q){return I.isValidElement(Q)?P.cloneElement(Q,$d({width:Y,height:L},H?{style:$d({height:"100%",width:"100%",maxHeight:L,maxWidth:Y},Q.props.style)}:{})):Q})},[n,j,f,g,y,m,k,l]);return I.createElement("div",{id:b?"".concat(b):void 0,className:Pe("recharts-responsive-container",A),style:$d($d({},C),{},{width:l,height:f,minWidth:m,minHeight:y,maxHeight:g}),ref:O},$)}),Xp=function(t){return null};Xp.displayName="Cell";function yu(e){"@babel/helpers - typeof";return yu=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},yu(e)}function kP(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 aj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kP(Object(n),!0).forEach(function(r){aW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aW(e,t,n){return t=iW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iW(e){var t=sW(e,"string");return yu(t)=="symbol"?t:t+""}function sW(e,t){if(yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bo={widthCache:{},cacheCount:0},oW=2e3,lW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},DP="recharts_measurement_span";function cW(e){var t=aj({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Jc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Pi.isSsr)return{width:0,height:0};var r=cW(n),i=JSON.stringify({text:t,copyStyle:r});if(bo.widthCache[i])return bo.widthCache[i];try{var o=document.getElementById(DP);o||(o=document.createElement("span"),o.setAttribute("id",DP),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=aj(aj({},lW),r);Object.assign(o.style,l),o.textContent="".concat(t);var u=o.getBoundingClientRect(),f={width:u.width,height:u.height};return bo.widthCache[i]=f,++bo.cacheCount>oW&&(bo.cacheCount=0,bo.widthCache={}),f}catch{return{width:0,height:0}}},uW=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function vu(e){"@babel/helpers - typeof";return vu=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},vu(e)}function Dh(e,t){return pW(e)||hW(e,t)||dW(e,t)||fW()}function fW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dW(e,t){if(e){if(typeof e=="string")return LP(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 LP(e,t)}}function LP(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 hW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function pW(e){if(Array.isArray(e))return e}function mW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zP(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,vW(r.key),r)}}function yW(e,t,n){return t&&zP(e.prototype,t),n&&zP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vW(e){var t=gW(e,"string");return vu(t)=="symbol"?t:t+""}function gW(e,t){if(vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $P=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,BP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xW=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,bW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},jW=Object.keys(bz),Co="NaN";function SW(e,t){return e*bz[t]}var Bd=(function(){function e(t,n){mW(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!xW.test(n)&&(this.num=NaN,this.unit=""),jW.includes(n)&&(this.num=SW(t,n),this.unit="px")}return yW(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=bW.exec(n))!==null&&r!==void 0?r:[],o=Dh(i,3),l=o[1],u=o[2];return new e(parseFloat(l),u??"")}}])})();function jz(e){if(e.includes(Co))return Co;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=$P.exec(t))!==null&&n!==void 0?n:[],i=Dh(r,4),o=i[1],l=i[2],u=i[3],f=Bd.parse(o??""),h=Bd.parse(u??""),m=l==="*"?f.multiply(h):f.divide(h);if(m.isNaN())return Co;t=t.replace($P,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var y,g=(y=BP.exec(t))!==null&&y!==void 0?y:[],j=Dh(g,4),S=j[1],w=j[2],b=j[3],A=Bd.parse(S??""),_=Bd.parse(b??""),T=w==="+"?A.add(_):A.subtract(_);if(T.isNaN())return Co;t=t.replace(BP,T.toString())}return t}var IP=/\(([^()]*)\)/;function wW(e){for(var t=e;t.includes("(");){var n=IP.exec(t),r=Dh(n,2),i=r[1];t=t.replace(IP,jz(i))}return t}function AW(e){var t=e.replace(/\s+/g,"");return t=wW(t),t=jz(t),t}function OW(e){try{return AW(e)}catch{return Co}}function u0(e){var t=OW(e.slice(5,-1));return t===Co?"":t}var _W=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],TW=["dx","dy","angle","className","breakAll"];function ij(){return ij=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},ij.apply(this,arguments)}function qP(e,t){if(e==null)return{};var n=EW(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EW(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 UP(e,t){return PW(e)||MW(e,t)||CW(e,t)||NW()}function NW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CW(e,t){if(e){if(typeof e=="string")return VP(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 VP(e,t)}}function VP(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 MW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function PW(e){if(Array.isArray(e))return e}var Sz=/[ \f\n\r\t\v\u2028\u2029]+/,wz=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];Ne(n)||(r?o=n.toString().split(""):o=n.toString().split(Sz));var l=o.map(function(f){return{word:f,width:Jc(f,i).width}}),u=r?0:Jc(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:u}}catch{return null}},RW=function(t,n,r,i,o){var l=t.maxLines,u=t.children,f=t.style,h=t.breakAll,m=ce(l),y=u,g=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Y.reduce(function(L,H){var Q=H.word,ae=H.width,oe=L[L.length-1];if(oe&&(i==null||o||oe.width+ae+r<Number(i)))oe.words.push(Q),oe.width+=ae+r;else{var z={words:[Q],width:ae};L.push(z)}return L},[])},j=g(n),S=function(Y){return Y.reduce(function(L,H){return L.width>H.width?L:H})};if(!m)return j;for(var w="…",b=function(Y){var L=y.slice(0,Y),H=wz({breakAll:h,style:f,children:L+w}).wordsWithComputedWidth,Q=g(H),ae=Q.length>l||S(Q).width>Number(i);return[ae,Q]},A=0,_=y.length-1,T=0,C;A<=_&&T<=y.length-1;){var O=Math.floor((A+_)/2),E=O-1,M=b(E),D=UP(M,2),k=D[0],B=D[1],q=b(O),$=UP(q,1),F=$[0];if(!k&&!F&&(A=O+1),k&&F&&(_=O-1),!k&&F){C=B;break}T++}return C||j},HP=function(t){var n=Ne(t)?[]:t.toString().split(Sz);return[{words:n}]},kW=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,l=t.breakAll,u=t.maxLines;if((n||r)&&!Pi.isSsr){var f,h,m=wz({breakAll:l,children:i,style:o});if(m){var y=m.wordsWithComputedWidth,g=m.spaceWidth;f=y,h=g}else return HP(i);return RW({breakAll:l,children:i,maxLines:u,style:o},f,h,n,r)}return HP(i)},GP="#808080",As=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.lineHeight,u=l===void 0?"1em":l,f=t.capHeight,h=f===void 0?"0.71em":f,m=t.scaleToFit,y=m===void 0?!1:m,g=t.textAnchor,j=g===void 0?"start":g,S=t.verticalAnchor,w=S===void 0?"end":S,b=t.fill,A=b===void 0?GP:b,_=qP(t,_W),T=P.useMemo(function(){return kW({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:y,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,y,_.style,_.width]),C=_.dx,O=_.dy,E=_.angle,M=_.className,D=_.breakAll,k=qP(_,TW);if(!Kt(r)||!Kt(o))return null;var B=r+(ce(C)?C:0),q=o+(ce(O)?O:0),$;switch(w){case"start":$=u0("calc(".concat(h,")"));break;case"middle":$=u0("calc(".concat((T.length-1)/2," * -").concat(u," + (").concat(h," / 2))"));break;default:$=u0("calc(".concat(T.length-1," * -").concat(u,")"));break}var F=[];if(y){var X=T[0].width,Y=_.width;F.push("scale(".concat((ce(Y)?Y/X:1)/X,")"))}return E&&F.push("rotate(".concat(E,", ").concat(B,", ").concat(q,")")),F.length&&(k.transform=F.join(" ")),I.createElement("text",ij({},je(k,!0),{x:B,y:q,className:Pe("recharts-text",M),textAnchor:j,fill:A.includes("url")?GP:A}),T.map(function(L,H){var Q=L.words.join(D?"":" ");return I.createElement("tspan",{x:B,dy:H===0?$:u,key:"".concat(Q,"-").concat(H)},Q)}))};function Ai(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function DW(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Tw(e){let t,n,r;e.length!==2?(t=Ai,n=(u,f)=>Ai(e(u),f),r=(u,f)=>e(u)-f):(t=e===Ai||e===DW?e:LW,n=e,r=e);function i(u,f,h=0,m=u.length){if(h<m){if(t(f,f)!==0)return m;do{const y=h+m>>>1;n(u[y],f)<0?h=y+1:m=y}while(h<m)}return h}function o(u,f,h=0,m=u.length){if(h<m){if(t(f,f)!==0)return m;do{const y=h+m>>>1;n(u[y],f)<=0?h=y+1:m=y}while(h<m)}return h}function l(u,f,h=0,m=u.length){const y=i(u,f,h,m-1);return y>h&&r(u[y-1],f)>-r(u[y],f)?y-1:y}return{left:i,center:l,right:o}}function LW(){return 0}function Az(e){return e===null?NaN:+e}function*zW(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const $W=Tw(Ai),nf=$W.right;Tw(Az).center;class FP extends Map{constructor(t,n=qW){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(KP(this,t))}has(t){return super.has(KP(this,t))}set(t,n){return super.set(BW(this,t),n)}delete(t){return super.delete(IW(this,t))}}function KP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function BW({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function IW({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function qW(e){return e!==null&&typeof e=="object"?e.valueOf():e}function UW(e=Ai){if(e===Ai)return Oz;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 Oz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const VW=Math.sqrt(50),HW=Math.sqrt(10),GW=Math.sqrt(2);function Lh(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=VW?10:o>=HW?5:o>=GW?2:1;let u,f,h;return i<0?(h=Math.pow(10,-i)/l,u=Math.round(e*h),f=Math.round(t*h),u/h<e&&++u,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*l,u=Math.round(e/h),f=Math.round(t/h),u*h<e&&++u,f*h>t&&--f),f<u&&.5<=n&&n<2?Lh(e,t,n*2):[u,f,h]}function sj(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?Lh(t,e,n):Lh(e,t,n);if(!(o>=i))return[];const u=o-i+1,f=new Array(u);if(r)if(l<0)for(let h=0;h<u;++h)f[h]=(o-h)/-l;else for(let h=0;h<u;++h)f[h]=(o-h)*l;else if(l<0)for(let h=0;h<u;++h)f[h]=(i+h)/-l;else for(let h=0;h<u;++h)f[h]=(i+h)*l;return f}function oj(e,t,n){return t=+t,e=+e,n=+n,Lh(e,t,n)[2]}function lj(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?oj(t,e,n):oj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function YP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function XP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function _z(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?Oz:UW(i);r>n;){if(r-n>600){const f=r-n+1,h=t-n+1,m=Math.log(f),y=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*y*(f-y)/f)*(h-f/2<0?-1:1),j=Math.max(n,Math.floor(t-h*y/f+g)),S=Math.min(r,Math.floor(t+(f-h)*y/f+g));_z(e,t,j,S,i)}const o=e[t];let l=n,u=r;for(Pc(e,n,t),i(e[r],o)>0&&Pc(e,n,r);l<u;){for(Pc(e,l,u),++l,--u;i(e[l],o)<0;)++l;for(;i(e[u],o)>0;)--u}i(e[n],o)===0?Pc(e,n,u):(++u,Pc(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Pc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function FW(e,t,n){if(e=Float64Array.from(zW(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return XP(e);if(t>=1)return YP(e);var r,i=(r-1)*t,o=Math.floor(i),l=YP(_z(e,o).subarray(0,o+1)),u=XP(e.subarray(o+1));return l+(u-l)*(i-o)}}function KW(e,t,n=Az){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,o=Math.floor(i),l=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return l+(u-l)*(i-o)}}function YW(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,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ba(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 cj=Symbol("implicit");function Ew(){var e=new FP,t=[],n=[],r=cj;function i(o){let l=e.get(o);if(l===void 0){if(r!==cj)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new FP;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Ew(t,n).unknown(r)},vr.apply(i,arguments),i}function gu(){var e=Ew().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,u=!1,f=0,h=0,m=.5;delete e.unknown;function y(){var g=t().length,j=i<r,S=j?i:r,w=j?r:i;o=(w-S)/Math.max(1,g-f+h*2),u&&(o=Math.floor(o)),S+=(w-S-o*(g-f))*m,l=o*(1-f),u&&(S=Math.round(S),l=Math.round(l));var b=YW(g).map(function(A){return S+o*A});return n(j?b.reverse():b)}return e.domain=function(g){return arguments.length?(t(g),y()):t()},e.range=function(g){return arguments.length?([r,i]=g,r=+r,i=+i,y()):[r,i]},e.rangeRound=function(g){return[r,i]=g,r=+r,i=+i,u=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(u=!!g,y()):u},e.padding=function(g){return arguments.length?(f=Math.min(1,h=+g),y()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),y()):f},e.paddingOuter=function(g){return arguments.length?(h=+g,y()):h},e.align=function(g){return arguments.length?(m=Math.max(0,Math.min(1,g)),y()):m},e.copy=function(){return gu(t(),[r,i]).round(u).paddingInner(f).paddingOuter(h).align(m)},vr.apply(y(),arguments)}function Tz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Tz(t())},e}function eu(){return Tz(gu.apply(null,arguments).paddingInner(1))}function Nw(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ez(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function rf(){}var xu=.7,zh=1/xu,$o="\\s*([+-]?\\d+)\\s*",bu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XW=/^#([0-9a-f]{3,8})$/,WW=new RegExp(`^rgb\\(${$o},${$o},${$o}\\)$`),ZW=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),QW=new RegExp(`^rgba\\(${$o},${$o},${$o},${bu}\\)$`),JW=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${bu}\\)$`),eZ=new RegExp(`^hsl\\(${bu},${Yr},${Yr}\\)$`),tZ=new RegExp(`^hsla\\(${bu},${Yr},${Yr},${bu}\\)$`),WP={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};Nw(rf,ju,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ZP,formatHex:ZP,formatHex8:nZ,formatHsl:rZ,formatRgb:QP,toString:QP});function ZP(){return this.rgb().formatHex()}function nZ(){return this.rgb().formatHex8()}function rZ(){return Nz(this).formatHsl()}function QP(){return this.rgb().formatRgb()}function ju(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=XW.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?JP(t):n===3?new Cn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Id(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Id(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=WW.exec(e))?new Cn(t[1],t[2],t[3],1):(t=ZW.exec(e))?new Cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QW.exec(e))?Id(t[1],t[2],t[3],t[4]):(t=JW.exec(e))?Id(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eZ.exec(e))?nR(t[1],t[2]/100,t[3]/100,1):(t=tZ.exec(e))?nR(t[1],t[2]/100,t[3]/100,t[4]):WP.hasOwnProperty(e)?JP(WP[e]):e==="transparent"?new Cn(NaN,NaN,NaN,0):null}function JP(e){return new Cn(e>>16&255,e>>8&255,e&255,1)}function Id(e,t,n,r){return r<=0&&(e=t=n=NaN),new Cn(e,t,n,r)}function aZ(e){return e instanceof rf||(e=ju(e)),e?(e=e.rgb(),new Cn(e.r,e.g,e.b,e.opacity)):new Cn}function uj(e,t,n,r){return arguments.length===1?aZ(e):new Cn(e,t,n,r??1)}function Cn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Nw(Cn,uj,Ez(rf,{brighter(e){return e=e==null?zh:Math.pow(zh,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xu:Math.pow(xu,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cn(gs(this.r),gs(this.g),gs(this.b),$h(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:eR,formatHex:eR,formatHex8:iZ,formatRgb:tR,toString:tR}));function eR(){return`#${ds(this.r)}${ds(this.g)}${ds(this.b)}`}function iZ(){return`#${ds(this.r)}${ds(this.g)}${ds(this.b)}${ds((isNaN(this.opacity)?1:this.opacity)*255)}`}function tR(){const e=$h(this.opacity);return`${e===1?"rgb(":"rgba("}${gs(this.r)}, ${gs(this.g)}, ${gs(this.b)}${e===1?")":`, ${e})`}`}function $h(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ds(e){return e=gs(e),(e<16?"0":"")+e.toString(16)}function nR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Er(e,t,n,r)}function Nz(e){if(e instanceof Er)return new Er(e.h,e.s,e.l,e.opacity);if(e instanceof rf||(e=ju(e)),!e)return new Er;if(e instanceof Er)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-i,f=(o+i)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=f<.5?o+i:2-o-i,l*=60):u=f>0&&f<1?0:l,new Er(l,u,f,e.opacity)}function sZ(e,t,n,r){return arguments.length===1?Nz(e):new Er(e,t,n,r??1)}function Er(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Nw(Er,sZ,Ez(rf,{brighter(e){return e=e==null?zh:Math.pow(zh,e),new Er(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xu:Math.pow(xu,e),new Er(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 Cn(f0(e>=240?e-240:e+120,i,r),f0(e,i,r),f0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Er(rR(this.h),qd(this.s),qd(this.l),$h(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=$h(this.opacity);return`${e===1?"hsl(":"hsla("}${rR(this.h)}, ${qd(this.s)*100}%, ${qd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function rR(e){return e=(e||0)%360,e<0?e+360:e}function qd(e){return Math.max(0,Math.min(1,e||0))}function f0(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 Cw=e=>()=>e;function oZ(e,t){return function(n){return e+n*t}}function lZ(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 cZ(e){return(e=+e)==1?Cz:function(t,n){return n-t?lZ(t,n,e):Cw(isNaN(t)?n:t)}}function Cz(e,t){var n=t-e;return n?oZ(e,n):Cw(isNaN(e)?t:e)}const aR=(function e(t){var n=cZ(t);function r(i,o){var l=n((i=uj(i)).r,(o=uj(o)).r),u=n(i.g,o.g),f=n(i.b,o.b),h=Cz(i.opacity,o.opacity);return function(m){return i.r=l(m),i.g=u(m),i.b=f(m),i.opacity=h(m),i+""}}return r.gamma=e,r})(1);function uZ(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function fZ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function dZ(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=El(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=i[l](u);return o}}function hZ(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Bh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pZ(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]=El(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var fj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,d0=new RegExp(fj.source,"g");function mZ(e){return function(){return e}}function yZ(e){return function(t){return e(t)+""}}function vZ(e,t){var n=fj.lastIndex=d0.lastIndex=0,r,i,o,l=-1,u=[],f=[];for(e=e+"",t=t+"";(r=fj.exec(e))&&(i=d0.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,f.push({i:l,x:Bh(r,i)})),n=d0.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?f[0]?yZ(f[0].x):mZ(t):(t=f.length,function(h){for(var m=0,y;m<t;++m)u[(y=f[m]).i]=y.x(h);return u.join("")})}function El(e,t){var n=typeof t,r;return t==null||n==="boolean"?Cw(t):(n==="number"?Bh:n==="string"?(r=ju(t))?(t=r,aR):vZ:t instanceof ju?aR:t instanceof Date?hZ:fZ(t)?uZ:Array.isArray(t)?dZ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?pZ:Bh)(e,t)}function Mw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function gZ(e,t){t===void 0&&(t=e,e=El);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[u](l-u)}}function xZ(e){return function(){return e}}function Ih(e){return+e}var iR=[0,1];function Sn(e){return e}function dj(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:xZ(isNaN(t)?NaN:.5)}function bZ(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function jZ(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=dj(i,r),o=n(l,o)):(r=dj(r,i),o=n(o,l)),function(u){return o(r(u))}}function SZ(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=dj(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var f=nf(e,u,1,r)-1;return o[f](i[f](u))}}function af(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Wp(){var e=iR,t=iR,n=El,r,i,o,l=Sn,u,f,h;function m(){var g=Math.min(e.length,t.length);return l!==Sn&&(l=bZ(e[0],e[g-1])),u=g>2?SZ:jZ,f=h=null,y}function y(g){return g==null||isNaN(g=+g)?o:(f||(f=u(e.map(r),t,n)))(r(l(g)))}return y.invert=function(g){return l(i((h||(h=u(t,e.map(r),Bh)))(g)))},y.domain=function(g){return arguments.length?(e=Array.from(g,Ih),m()):e.slice()},y.range=function(g){return arguments.length?(t=Array.from(g),m()):t.slice()},y.rangeRound=function(g){return t=Array.from(g),n=Mw,m()},y.clamp=function(g){return arguments.length?(l=g?!0:Sn,m()):l!==Sn},y.interpolate=function(g){return arguments.length?(n=g,m()):n},y.unknown=function(g){return arguments.length?(o=g,y):o},function(g,j){return r=g,i=j,m()}}function Pw(){return Wp()(Sn,Sn)}function wZ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function qh(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 Xo(e){return e=qh(Math.abs(e)),e?e[1]:NaN}function AZ(e,t){return function(n,r){for(var i=n.length,o=[],l=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>r&&(u=Math.max(1,r-f)),o.push(n.substring(i-=u,i+u)),!((f+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function OZ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var _Z=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Su(e){if(!(t=_Z.exec(e)))throw new Error("invalid format: "+e);var t;return new Rw({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]})}Su.prototype=Rw.prototype;function Rw(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+""}Rw.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 TZ(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 Uh;function EZ(e,t){var n=qh(e,t);if(!n)return Uh=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(Uh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+qh(e,Math.max(0,t+o-1))[0]}function sR(e,t){var n=qh(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 oR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:wZ,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)=>sR(e*100,t),r:sR,s:EZ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function lR(e){return e}var cR=Array.prototype.map,uR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function NZ(e){var t=e.grouping===void 0||e.thousands===void 0?lR:AZ(cR.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+"",o=e.numerals===void 0?lR:OZ(cR.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(y,g){y=Su(y);var j=y.fill,S=y.align,w=y.sign,b=y.symbol,A=y.zero,_=y.width,T=y.comma,C=y.precision,O=y.trim,E=y.type;E==="n"?(T=!0,E="g"):oR[E]||(C===void 0&&(C=12),O=!0,E="g"),(A||j==="0"&&S==="=")&&(A=!0,j="0",S="=");var M=(g&&g.prefix!==void 0?g.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),D=(b==="$"?r:/[%p]/.test(E)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),k=oR[E],B=/[defgprs%]/.test(E);C=C===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function q($){var F=M,X=D,Y,L,H;if(E==="c")X=k($)+X,$="";else{$=+$;var Q=$<0||1/$<0;if($=isNaN($)?f:k(Math.abs($),C),O&&($=TZ($)),Q&&+$==0&&w!=="+"&&(Q=!1),F=(Q?w==="("?w:u:w==="-"||w==="("?"":w)+F,X=(E==="s"&&!isNaN($)&&Uh!==void 0?uR[8+Uh/3]:"")+X+(Q&&w==="("?")":""),B){for(Y=-1,L=$.length;++Y<L;)if(H=$.charCodeAt(Y),48>H||H>57){X=(H===46?i+$.slice(Y+1):$.slice(Y))+X,$=$.slice(0,Y);break}}}T&&!A&&($=t($,1/0));var ae=F.length+$.length+X.length,oe=ae<_?new Array(_-ae+1).join(j):"";switch(T&&A&&($=t(oe+$,oe.length?_-X.length:1/0),oe=""),S){case"<":$=F+$+X+oe;break;case"=":$=F+oe+$+X;break;case"^":$=oe.slice(0,ae=oe.length>>1)+F+$+X+oe.slice(ae);break;default:$=oe+F+$+X;break}return o($)}return q.toString=function(){return y+""},q}function m(y,g){var j=Math.max(-8,Math.min(8,Math.floor(Xo(g)/3)))*3,S=Math.pow(10,-j),w=h((y=Su(y),y.type="f",y),{suffix:uR[8+j/3]});return function(b){return w(S*b)}}return{format:h,formatPrefix:m}}var Ud,kw,Mz;CZ({thousands:",",grouping:[3],currency:["$",""]});function CZ(e){return Ud=NZ(e),kw=Ud.format,Mz=Ud.formatPrefix,Ud}function MZ(e){return Math.max(0,-Xo(Math.abs(e)))}function PZ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xo(t)/3)))*3-Xo(Math.abs(e)))}function RZ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xo(t)-Xo(e))+1}function Pz(e,t,n,r){var i=lj(e,t,n),o;switch(r=Su(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=PZ(i,l))&&(r.precision=o),Mz(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=RZ(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=MZ(i))&&(r.precision=o-(r.type==="%")*2);break}}return kw(r)}function Ri(e){var t=e.domain;return e.ticks=function(n){var r=t();return sj(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Pz(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],u=r[o],f,h,m=10;for(u<l&&(h=l,l=u,u=h,h=i,i=o,o=h);m-- >0;){if(h=oj(l,u,n),h===f)return r[i]=l,r[o]=u,t(r);if(h>0)l=Math.floor(l/h)*h,u=Math.ceil(u/h)*h;else if(h<0)l=Math.ceil(l*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function Vh(){var e=Pw();return e.copy=function(){return af(e,Vh())},vr.apply(e,arguments),Ri(e)}function Rz(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,Ih),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Rz(e).unknown(t)},e=arguments.length?Array.from(e,Ih):[0,1],Ri(n)}function kz(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function fR(e){return Math.log(e)}function dR(e){return Math.exp(e)}function kZ(e){return-Math.log(-e)}function DZ(e){return-Math.exp(-e)}function LZ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function zZ(e){return e===10?LZ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $Z(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 hR(e){return(t,n)=>-e(-t,n)}function Dw(e){const t=e(fR,dR),n=t.domain;let r=10,i,o;function l(){return i=$Z(r),o=zZ(r),n()[0]<0?(i=hR(i),o=hR(o),e(kZ,DZ)):e(fR,dR),t}return t.base=function(u){return arguments.length?(r=+u,l()):r},t.domain=function(u){return arguments.length?(n(u),l()):n()},t.ticks=u=>{const f=n();let h=f[0],m=f[f.length-1];const y=m<h;y&&([h,m]=[m,h]);let g=i(h),j=i(m),S,w;const b=u==null?10:+u;let A=[];if(!(r%1)&&j-g<b){if(g=Math.floor(g),j=Math.ceil(j),h>0){for(;g<=j;++g)for(S=1;S<r;++S)if(w=g<0?S/o(-g):S*o(g),!(w<h)){if(w>m)break;A.push(w)}}else for(;g<=j;++g)for(S=r-1;S>=1;--S)if(w=g>0?S/o(-g):S*o(g),!(w<h)){if(w>m)break;A.push(w)}A.length*2<b&&(A=sj(h,m,b))}else A=sj(g,j,Math.min(j-g,b)).map(o);return y?A.reverse():A},t.tickFormat=(u,f)=>{if(u==null&&(u=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Su(f)).precision==null&&(f.trim=!0),f=kw(f)),u===1/0)return f;const h=Math.max(1,r*u/t.ticks().length);return m=>{let y=m/o(Math.round(i(m)));return y*r<r-.5&&(y*=r),y<=h?f(m):""}},t.nice=()=>n(kz(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function Dz(){const e=Dw(Wp()).domain([1,10]);return e.copy=()=>af(e,Dz()).base(e.base()),vr.apply(e,arguments),e}function pR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function mR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Lw(e){var t=1,n=e(pR(t),mR(t));return n.constant=function(r){return arguments.length?e(pR(t=+r),mR(t)):t},Ri(n)}function Lz(){var e=Lw(Wp());return e.copy=function(){return af(e,Lz()).constant(e.constant())},vr.apply(e,arguments)}function yR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function BZ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function IZ(e){return e<0?-e*e:e*e}function zw(e){var t=e(Sn,Sn),n=1;function r(){return n===1?e(Sn,Sn):n===.5?e(BZ,IZ):e(yR(n),yR(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ri(t)}function $w(){var e=zw(Wp());return e.copy=function(){return af(e,$w()).exponent(e.exponent())},vr.apply(e,arguments),e}function qZ(){return $w.apply(null,arguments).exponent(.5)}function vR(e){return Math.sign(e)*e*e}function UZ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function zz(){var e=Pw(),t=[0,1],n=!1,r;function i(o){var l=UZ(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(vR(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Ih)).map(vR)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return zz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},vr.apply(i,arguments),Ri(i)}function $z(){var e=[],t=[],n=[],r;function i(){var l=0,u=Math.max(1,t.length);for(n=new Array(u-1);++l<u;)n[l-1]=KW(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[nf(n,l)]}return o.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Ai),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return $z().domain(e).range(t).unknown(r)},vr.apply(o,arguments)}function Bz(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[nf(r,f,0,n)]:o}function u(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,u()):[e,t]},l.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,u()):i.slice()},l.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return Bz().domain([e,t]).range(i).unknown(o)},vr.apply(Ri(l),arguments)}function Iz(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[nf(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Iz().domain(e).range(t).unknown(n)},vr.apply(i,arguments)}const h0=new Date,p0=new Date;function Xt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,u)=>{const f=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return f;let h;do f.push(h=new Date(+o)),t(o,u),e(o);while(h<o&&o<l);return f},i.filter=o=>Xt(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(h0.setTime(+o),p0.setTime(+l),e(h0),e(p0),Math.floor(n(h0,p0))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const Hh=Xt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Hh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Hh);Hh.range;const Oa=1e3,hr=Oa*60,_a=hr*60,Ra=_a*24,Bw=Ra*7,gR=Ra*30,m0=Ra*365,hs=Xt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Oa)},(e,t)=>(t-e)/Oa,e=>e.getUTCSeconds());hs.range;const Iw=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Oa)},(e,t)=>{e.setTime(+e+t*hr)},(e,t)=>(t-e)/hr,e=>e.getMinutes());Iw.range;const qw=Xt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*hr)},(e,t)=>(t-e)/hr,e=>e.getUTCMinutes());qw.range;const Uw=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Oa-e.getMinutes()*hr)},(e,t)=>{e.setTime(+e+t*_a)},(e,t)=>(t-e)/_a,e=>e.getHours());Uw.range;const Vw=Xt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*_a)},(e,t)=>(t-e)/_a,e=>e.getUTCHours());Vw.range;const sf=Xt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*hr)/Ra,e=>e.getDate()-1);sf.range;const Zp=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ra,e=>e.getUTCDate()-1);Zp.range;const qz=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ra,e=>Math.floor(e/Ra));qz.range;function Ps(e){return Xt(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())*hr)/Bw)}const Qp=Ps(0),Gh=Ps(1),VZ=Ps(2),HZ=Ps(3),Wo=Ps(4),GZ=Ps(5),FZ=Ps(6);Qp.range;Gh.range;VZ.range;HZ.range;Wo.range;GZ.range;FZ.range;function Rs(e){return Xt(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)/Bw)}const Jp=Rs(0),Fh=Rs(1),KZ=Rs(2),YZ=Rs(3),Zo=Rs(4),XZ=Rs(5),WZ=Rs(6);Jp.range;Fh.range;KZ.range;YZ.range;Zo.range;XZ.range;WZ.range;const Hw=Xt(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());Hw.range;const Gw=Xt(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());Gw.range;const ka=Xt(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());ka.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(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)});ka.range;const Da=Xt(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());Da.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(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)});Da.range;function Uz(e,t,n,r,i,o){const l=[[hs,1,Oa],[hs,5,5*Oa],[hs,15,15*Oa],[hs,30,30*Oa],[o,1,hr],[o,5,5*hr],[o,15,15*hr],[o,30,30*hr],[i,1,_a],[i,3,3*_a],[i,6,6*_a],[i,12,12*_a],[r,1,Ra],[r,2,2*Ra],[n,1,Bw],[t,1,gR],[t,3,3*gR],[e,1,m0]];function u(h,m,y){const g=m<h;g&&([h,m]=[m,h]);const j=y&&typeof y.range=="function"?y:f(h,m,y),S=j?j.range(h,+m+1):[];return g?S.reverse():S}function f(h,m,y){const g=Math.abs(m-h)/y,j=Tw(([,,b])=>b).right(l,g);if(j===l.length)return e.every(lj(h/m0,m/m0,y));if(j===0)return Hh.every(Math.max(lj(h,m,y),1));const[S,w]=l[g/l[j-1][2]<l[j][2]/g?j-1:j];return S.every(w)}return[u,f]}const[ZZ,QZ]=Uz(Da,Gw,Jp,qz,Vw,qw),[JZ,eQ]=Uz(ka,Hw,Qp,sf,Uw,Iw);function y0(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 v0(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 Rc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tQ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,f=e.shortMonths,h=kc(i),m=Dc(i),y=kc(o),g=Dc(o),j=kc(l),S=Dc(l),w=kc(u),b=Dc(u),A=kc(f),_=Dc(f),T={a:H,A:Q,b:ae,B:oe,c:null,d:AR,e:AR,f:AQ,g:kQ,G:LQ,H:jQ,I:SQ,j:wQ,L:Vz,m:OQ,M:_Q,p:z,q:G,Q:TR,s:ER,S:TQ,u:EQ,U:NQ,V:CQ,w:MQ,W:PQ,x:null,X:null,y:RQ,Y:DQ,Z:zQ,"%":_R},C={a:re,A:fe,b:me,B:we,c:null,d:OR,e:OR,f:qQ,g:ZQ,G:JQ,H:$Q,I:BQ,j:IQ,L:Gz,m:UQ,M:VQ,p:ze,q:Ze,Q:TR,s:ER,S:HQ,u:GQ,U:FQ,V:KQ,w:YQ,W:XQ,x:null,X:null,y:WQ,Y:QQ,Z:eJ,"%":_R},O={a:B,A:q,b:$,B:F,c:X,d:SR,e:SR,f:vQ,g:jR,G:bR,H:wR,I:wR,j:hQ,L:yQ,m:dQ,M:pQ,p:k,q:fQ,Q:xQ,s:bQ,S:mQ,u:sQ,U:oQ,V:lQ,w:iQ,W:cQ,x:Y,X:L,y:jR,Y:bR,Z:uQ,"%":gQ};T.x=E(n,T),T.X=E(r,T),T.c=E(t,T),C.x=E(n,C),C.X=E(r,C),C.c=E(t,C);function E(ue,Ee){return function(Ce){var le=[],yt=-1,ke=0,Ot=ue.length,_t,fn,gr;for(Ce instanceof Date||(Ce=new Date(+Ce));++yt<Ot;)ue.charCodeAt(yt)===37&&(le.push(ue.slice(ke,yt)),(fn=xR[_t=ue.charAt(++yt)])!=null?_t=ue.charAt(++yt):fn=_t==="e"?" ":"0",(gr=Ee[_t])&&(_t=gr(Ce,fn)),le.push(_t),ke=yt+1);return le.push(ue.slice(ke,yt)),le.join("")}}function M(ue,Ee){return function(Ce){var le=Rc(1900,void 0,1),yt=D(le,ue,Ce+="",0),ke,Ot;if(yt!=Ce.length)return null;if("Q"in le)return new Date(le.Q);if("s"in le)return new Date(le.s*1e3+("L"in le?le.L:0));if(Ee&&!("Z"in le)&&(le.Z=0),"p"in le&&(le.H=le.H%12+le.p*12),le.m===void 0&&(le.m="q"in le?le.q:0),"V"in le){if(le.V<1||le.V>53)return null;"w"in le||(le.w=1),"Z"in le?(ke=v0(Rc(le.y,0,1)),Ot=ke.getUTCDay(),ke=Ot>4||Ot===0?Fh.ceil(ke):Fh(ke),ke=Zp.offset(ke,(le.V-1)*7),le.y=ke.getUTCFullYear(),le.m=ke.getUTCMonth(),le.d=ke.getUTCDate()+(le.w+6)%7):(ke=y0(Rc(le.y,0,1)),Ot=ke.getDay(),ke=Ot>4||Ot===0?Gh.ceil(ke):Gh(ke),ke=sf.offset(ke,(le.V-1)*7),le.y=ke.getFullYear(),le.m=ke.getMonth(),le.d=ke.getDate()+(le.w+6)%7)}else("W"in le||"U"in le)&&("w"in le||(le.w="u"in le?le.u%7:"W"in le?1:0),Ot="Z"in le?v0(Rc(le.y,0,1)).getUTCDay():y0(Rc(le.y,0,1)).getDay(),le.m=0,le.d="W"in le?(le.w+6)%7+le.W*7-(Ot+5)%7:le.w+le.U*7-(Ot+6)%7);return"Z"in le?(le.H+=le.Z/100|0,le.M+=le.Z%100,v0(le)):y0(le)}}function D(ue,Ee,Ce,le){for(var yt=0,ke=Ee.length,Ot=Ce.length,_t,fn;yt<ke;){if(le>=Ot)return-1;if(_t=Ee.charCodeAt(yt++),_t===37){if(_t=Ee.charAt(yt++),fn=O[_t in xR?Ee.charAt(yt++):_t],!fn||(le=fn(ue,Ce,le))<0)return-1}else if(_t!=Ce.charCodeAt(le++))return-1}return le}function k(ue,Ee,Ce){var le=h.exec(Ee.slice(Ce));return le?(ue.p=m.get(le[0].toLowerCase()),Ce+le[0].length):-1}function B(ue,Ee,Ce){var le=j.exec(Ee.slice(Ce));return le?(ue.w=S.get(le[0].toLowerCase()),Ce+le[0].length):-1}function q(ue,Ee,Ce){var le=y.exec(Ee.slice(Ce));return le?(ue.w=g.get(le[0].toLowerCase()),Ce+le[0].length):-1}function $(ue,Ee,Ce){var le=A.exec(Ee.slice(Ce));return le?(ue.m=_.get(le[0].toLowerCase()),Ce+le[0].length):-1}function F(ue,Ee,Ce){var le=w.exec(Ee.slice(Ce));return le?(ue.m=b.get(le[0].toLowerCase()),Ce+le[0].length):-1}function X(ue,Ee,Ce){return D(ue,t,Ee,Ce)}function Y(ue,Ee,Ce){return D(ue,n,Ee,Ce)}function L(ue,Ee,Ce){return D(ue,r,Ee,Ce)}function H(ue){return l[ue.getDay()]}function Q(ue){return o[ue.getDay()]}function ae(ue){return f[ue.getMonth()]}function oe(ue){return u[ue.getMonth()]}function z(ue){return i[+(ue.getHours()>=12)]}function G(ue){return 1+~~(ue.getMonth()/3)}function re(ue){return l[ue.getUTCDay()]}function fe(ue){return o[ue.getUTCDay()]}function me(ue){return f[ue.getUTCMonth()]}function we(ue){return u[ue.getUTCMonth()]}function ze(ue){return i[+(ue.getUTCHours()>=12)]}function Ze(ue){return 1+~~(ue.getUTCMonth()/3)}return{format:function(ue){var Ee=E(ue+="",T);return Ee.toString=function(){return ue},Ee},parse:function(ue){var Ee=M(ue+="",!1);return Ee.toString=function(){return ue},Ee},utcFormat:function(ue){var Ee=E(ue+="",C);return Ee.toString=function(){return ue},Ee},utcParse:function(ue){var Ee=M(ue+="",!0);return Ee.toString=function(){return ue},Ee}}}var xR={"-":"",_:" ",0:"0"},en=/^\s*\d+/,nQ=/^%/,rQ=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function aQ(e){return e.replace(rQ,"\\$&")}function kc(e){return new RegExp("^(?:"+e.map(aQ).join("|")+")","i")}function Dc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function iQ(e,t,n){var r=en.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sQ(e,t,n){var r=en.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function oQ(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function lQ(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function cQ(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bR(e,t,n){var r=en.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function jR(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function uQ(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 fQ(e,t,n){var r=en.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function dQ(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SR(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function hQ(e,t,n){var r=en.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wR(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pQ(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function mQ(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yQ(e,t,n){var r=en.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function vQ(e,t,n){var r=en.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function gQ(e,t,n){var r=nQ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xQ(e,t,n){var r=en.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function bQ(e,t,n){var r=en.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function AR(e,t){return Ye(e.getDate(),t,2)}function jQ(e,t){return Ye(e.getHours(),t,2)}function SQ(e,t){return Ye(e.getHours()%12||12,t,2)}function wQ(e,t){return Ye(1+sf.count(ka(e),e),t,3)}function Vz(e,t){return Ye(e.getMilliseconds(),t,3)}function AQ(e,t){return Vz(e,t)+"000"}function OQ(e,t){return Ye(e.getMonth()+1,t,2)}function _Q(e,t){return Ye(e.getMinutes(),t,2)}function TQ(e,t){return Ye(e.getSeconds(),t,2)}function EQ(e){var t=e.getDay();return t===0?7:t}function NQ(e,t){return Ye(Qp.count(ka(e)-1,e),t,2)}function Hz(e){var t=e.getDay();return t>=4||t===0?Wo(e):Wo.ceil(e)}function CQ(e,t){return e=Hz(e),Ye(Wo.count(ka(e),e)+(ka(e).getDay()===4),t,2)}function MQ(e){return e.getDay()}function PQ(e,t){return Ye(Gh.count(ka(e)-1,e),t,2)}function RQ(e,t){return Ye(e.getFullYear()%100,t,2)}function kQ(e,t){return e=Hz(e),Ye(e.getFullYear()%100,t,2)}function DQ(e,t){return Ye(e.getFullYear()%1e4,t,4)}function LQ(e,t){var n=e.getDay();return e=n>=4||n===0?Wo(e):Wo.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function zQ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function OR(e,t){return Ye(e.getUTCDate(),t,2)}function $Q(e,t){return Ye(e.getUTCHours(),t,2)}function BQ(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function IQ(e,t){return Ye(1+Zp.count(Da(e),e),t,3)}function Gz(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function qQ(e,t){return Gz(e,t)+"000"}function UQ(e,t){return Ye(e.getUTCMonth()+1,t,2)}function VQ(e,t){return Ye(e.getUTCMinutes(),t,2)}function HQ(e,t){return Ye(e.getUTCSeconds(),t,2)}function GQ(e){var t=e.getUTCDay();return t===0?7:t}function FQ(e,t){return Ye(Jp.count(Da(e)-1,e),t,2)}function Fz(e){var t=e.getUTCDay();return t>=4||t===0?Zo(e):Zo.ceil(e)}function KQ(e,t){return e=Fz(e),Ye(Zo.count(Da(e),e)+(Da(e).getUTCDay()===4),t,2)}function YQ(e){return e.getUTCDay()}function XQ(e,t){return Ye(Fh.count(Da(e)-1,e),t,2)}function WQ(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function ZQ(e,t){return e=Fz(e),Ye(e.getUTCFullYear()%100,t,2)}function QQ(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function JQ(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Zo(e):Zo.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function eJ(){return"+0000"}function _R(){return"%"}function TR(e){return+e}function ER(e){return Math.floor(+e/1e3)}var jo,Kz,Yz;tJ({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 tJ(e){return jo=tQ(e),Kz=jo.format,jo.parse,Yz=jo.utcFormat,jo.utcParse,jo}function nJ(e){return new Date(e)}function rJ(e){return e instanceof Date?+e:+new Date(+e)}function Fw(e,t,n,r,i,o,l,u,f,h){var m=Pw(),y=m.invert,g=m.domain,j=h(".%L"),S=h(":%S"),w=h("%I:%M"),b=h("%I %p"),A=h("%a %d"),_=h("%b %d"),T=h("%B"),C=h("%Y");function O(E){return(f(E)<E?j:u(E)<E?S:l(E)<E?w:o(E)<E?b:r(E)<E?i(E)<E?A:_:n(E)<E?T:C)(E)}return m.invert=function(E){return new Date(y(E))},m.domain=function(E){return arguments.length?g(Array.from(E,rJ)):g().map(nJ)},m.ticks=function(E){var M=g();return e(M[0],M[M.length-1],E??10)},m.tickFormat=function(E,M){return M==null?O:h(M)},m.nice=function(E){var M=g();return(!E||typeof E.range!="function")&&(E=t(M[0],M[M.length-1],E??10)),E?g(kz(M,E)):m},m.copy=function(){return af(m,Fw(e,t,n,r,i,o,l,u,f,h))},m}function aJ(){return vr.apply(Fw(JZ,eQ,ka,Hw,Qp,sf,Uw,Iw,hs,Kz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function iJ(){return vr.apply(Fw(ZZ,QZ,Da,Gw,Jp,Zp,Vw,qw,hs,Yz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function em(){var e=0,t=1,n,r,i,o,l=Sn,u=!1,f;function h(y){return y==null||isNaN(y=+y)?f:l(i===0?.5:(y=(o(y)-n)*i,u?Math.max(0,Math.min(1,y)):y))}h.domain=function(y){return arguments.length?([e,t]=y,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(y){return arguments.length?(u=!!y,h):u},h.interpolator=function(y){return arguments.length?(l=y,h):l};function m(y){return function(g){var j,S;return arguments.length?([j,S]=g,l=y(j,S),h):[l(0),l(1)]}}return h.range=m(El),h.rangeRound=m(Mw),h.unknown=function(y){return arguments.length?(f=y,h):f},function(y){return o=y,n=y(e),r=y(t),i=n===r?0:1/(r-n),h}}function ki(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Xz(){var e=Ri(em()(Sn));return e.copy=function(){return ki(e,Xz())},Ba.apply(e,arguments)}function Wz(){var e=Dw(em()).domain([1,10]);return e.copy=function(){return ki(e,Wz()).base(e.base())},Ba.apply(e,arguments)}function Zz(){var e=Lw(em());return e.copy=function(){return ki(e,Zz()).constant(e.constant())},Ba.apply(e,arguments)}function Kw(){var e=zw(em());return e.copy=function(){return ki(e,Kw()).exponent(e.exponent())},Ba.apply(e,arguments)}function sJ(){return Kw.apply(null,arguments).exponent(.5)}function Qz(){var e=[],t=Sn;function n(r){if(r!=null&&!isNaN(r=+r))return t((nf(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(Ai),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,o)=>FW(e,o/r))},n.copy=function(){return Qz(t).domain(e)},Ba.apply(n,arguments)}function tm(){var e=0,t=.5,n=1,r=1,i,o,l,u,f,h=Sn,m,y=!1,g;function j(w){return isNaN(w=+w)?g:(w=.5+((w=+m(w))-o)*(r*w<r*o?u:f),h(y?Math.max(0,Math.min(1,w)):w))}j.domain=function(w){return arguments.length?([e,t,n]=w,i=m(e=+e),o=m(t=+t),l=m(n=+n),u=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,j):[e,t,n]},j.clamp=function(w){return arguments.length?(y=!!w,j):y},j.interpolator=function(w){return arguments.length?(h=w,j):h};function S(w){return function(b){var A,_,T;return arguments.length?([A,_,T]=b,h=gZ(w,[A,_,T]),j):[h(0),h(.5),h(1)]}}return j.range=S(El),j.rangeRound=S(Mw),j.unknown=function(w){return arguments.length?(g=w,j):g},function(w){return m=w,i=w(e),o=w(t),l=w(n),u=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,j}}function Jz(){var e=Ri(tm()(Sn));return e.copy=function(){return ki(e,Jz())},Ba.apply(e,arguments)}function e5(){var e=Dw(tm()).domain([.1,1,10]);return e.copy=function(){return ki(e,e5()).base(e.base())},Ba.apply(e,arguments)}function t5(){var e=Lw(tm());return e.copy=function(){return ki(e,t5()).constant(e.constant())},Ba.apply(e,arguments)}function Yw(){var e=zw(tm());return e.copy=function(){return ki(e,Yw()).exponent(e.exponent())},Ba.apply(e,arguments)}function oJ(){return Yw.apply(null,arguments).exponent(.5)}const NR=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:gu,scaleDiverging:Jz,scaleDivergingLog:e5,scaleDivergingPow:Yw,scaleDivergingSqrt:oJ,scaleDivergingSymlog:t5,scaleIdentity:Rz,scaleImplicit:cj,scaleLinear:Vh,scaleLog:Dz,scaleOrdinal:Ew,scalePoint:eu,scalePow:$w,scaleQuantile:$z,scaleQuantize:Bz,scaleRadial:zz,scaleSequential:Xz,scaleSequentialLog:Wz,scaleSequentialPow:Kw,scaleSequentialQuantile:Qz,scaleSequentialSqrt:sJ,scaleSequentialSymlog:Zz,scaleSqrt:qZ,scaleSymlog:Lz,scaleThreshold:Iz,scaleTime:aJ,scaleUtc:iJ,tickFormat:Pz},Symbol.toStringTag,{value:"Module"}));var g0,CR;function nm(){if(CR)return g0;CR=1;var e=Al();function t(n,r,i){for(var o=-1,l=n.length;++o<l;){var u=n[o],f=r(u);if(f!=null&&(h===void 0?f===f&&!e(f):i(f,h)))var h=f,m=u}return m}return g0=t,g0}var x0,MR;function n5(){if(MR)return x0;MR=1;function e(t,n){return t>n}return x0=e,x0}var b0,PR;function lJ(){if(PR)return b0;PR=1;var e=nm(),t=n5(),n=Tl();function r(i){return i&&i.length?e(i,n,t):void 0}return b0=r,b0}var cJ=lJ();const ji=at(cJ);var j0,RR;function r5(){if(RR)return j0;RR=1;function e(t,n){return t<n}return j0=e,j0}var S0,kR;function uJ(){if(kR)return S0;kR=1;var e=nm(),t=r5(),n=Tl();function r(i){return i&&i.length?e(i,n,t):void 0}return S0=r,S0}var fJ=uJ();const rm=at(fJ);var w0,DR;function dJ(){if(DR)return w0;DR=1;var e=uw(),t=ta(),n=dz(),r=Rn();function i(o,l){var u=r(o)?e:n;return u(o,t(l,3))}return w0=i,w0}var A0,LR;function hJ(){if(LR)return A0;LR=1;var e=uz(),t=dJ();function n(r,i){return e(t(r,i),1)}return A0=n,A0}var pJ=hJ();const mJ=at(pJ);var O0,zR;function yJ(){if(zR)return O0;zR=1;var e=ww();function t(n,r){return e(n,r)}return O0=t,O0}var vJ=yJ();const Os=at(vJ);var Nl=1e9,gJ={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Ww,wt=!0,yr="[DecimalError] ",xs=yr+"Invalid argument: ",Xw=yr+"Exponent out of range: ",Cl=Math.floor,os=Math.pow,xJ=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Kn,Qt=1e7,jt=7,a5=9007199254740991,Kh=Cl(a5/jt),ve={};ve.absoluteValue=ve.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ve.comparedTo=ve.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ve.decimalPlaces=ve.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*jt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ve.dividedBy=ve.div=function(e){return Na(this,new this.constructor(e))};ve.dividedToIntegerBy=ve.idiv=function(e){var t=this,n=t.constructor;return dt(Na(t,new n(e),0,1),n.precision)};ve.equals=ve.eq=function(e){return!this.cmp(e)};ve.exponent=function(){return qt(this)};ve.greaterThan=ve.gt=function(e){return this.cmp(e)>0};ve.greaterThanOrEqualTo=ve.gte=function(e){return this.cmp(e)>=0};ve.isInteger=ve.isint=function(){return this.e>this.d.length-2};ve.isNegative=ve.isneg=function(){return this.s<0};ve.isPositive=ve.ispos=function(){return this.s>0};ve.isZero=function(){return this.s===0};ve.lessThan=ve.lt=function(e){return this.cmp(e)<0};ve.lessThanOrEqualTo=ve.lte=function(e){return this.cmp(e)<1};ve.logarithm=ve.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Kn))throw Error(yr+"NaN");if(n.s<1)throw Error(yr+(n.s?"NaN":"-Infinity"));return n.eq(Kn)?new r(0):(wt=!1,t=Na(wu(n,o),wu(e,o),o),wt=!0,dt(t,i))};ve.minus=ve.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?o5(t,e):i5(t,(e.s=-e.s,e))};ve.modulo=ve.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(yr+"NaN");return n.s?(wt=!1,t=Na(n,e,0,1).times(e),wt=!0,n.minus(t)):dt(new r(n),i)};ve.naturalExponential=ve.exp=function(){return s5(this)};ve.naturalLogarithm=ve.ln=function(){return wu(this)};ve.negated=ve.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ve.plus=ve.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?i5(t,e):o5(t,(e.s=-e.s,e))};ve.precision=ve.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(xs+e);if(t=qt(i)+1,r=i.d.length-1,n=r*jt+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};ve.squareRoot=ve.sqrt=function(){var e,t,n,r,i,o,l,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(yr+"NaN")}for(e=qt(u),wt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Gr(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Cl((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 f(t)):r=new f(i.toString()),n=f.precision,i=l=n+3;;)if(o=r,r=o.plus(Na(u,o,l+2)).times(.5),Gr(o.d).slice(0,l)===(t=Gr(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(dt(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;l+=4}return wt=!0,dt(r,n)};ve.times=ve.mul=function(e){var t,n,r,i,o,l,u,f,h,m=this,y=m.constructor,g=m.d,j=(e=new y(e)).d;if(!m.s||!e.s)return new y(0);for(e.s*=m.s,n=m.e+e.e,f=g.length,h=j.length,f<h&&(o=g,g=j,j=o,l=f,f=h,h=l),o=[],l=f+h,r=l;r--;)o.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)u=o[i]+j[r]*g[i-r-1]+t,o[i--]=u%Qt|0,t=u/Qt|0;o[i]=(o[i]+t)%Qt|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,wt?dt(e,y.precision):e};ve.toDecimalPlaces=ve.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Jr(e,0,Nl),t===void 0?t=r.rounding:Jr(t,0,8),dt(n,e+qt(n)+1,t))};ve.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=_s(r,!0):(Jr(e,0,Nl),t===void 0?t=i.rounding:Jr(t,0,8),r=dt(new i(r),e+1,t),n=_s(r,!0,e+1)),n};ve.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?_s(i):(Jr(e,0,Nl),t===void 0?t=o.rounding:Jr(t,0,8),r=dt(new o(i),e+qt(i)+1,t),n=_s(r.abs(),!1,e+qt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ve.toInteger=ve.toint=function(){var e=this,t=e.constructor;return dt(new t(e),qt(e)+1,t.rounding)};ve.toNumber=function(){return+this};ve.toPower=ve.pow=function(e){var t,n,r,i,o,l,u=this,f=u.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Kn);if(u=new f(u),!u.s){if(e.s<1)throw Error(yr+"Infinity");return u}if(u.eq(Kn))return u;if(r=f.precision,e.eq(Kn))return dt(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=u.s,l){if((n=m<0?-m:m)<=a5){for(i=new f(Kn),t=Math.ceil(r/jt+4),wt=!1;n%2&&(i=i.times(u),BR(i.d,t)),n=Cl(n/2),n!==0;)u=u.times(u),BR(u.d,t);return wt=!0,e.s<0?new f(Kn).div(i):dt(i,r)}}else if(o<0)throw Error(yr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,wt=!1,i=e.times(wu(u,r+h)),wt=!0,i=s5(i),i.s=o,i};ve.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=qt(i),r=_s(i,n<=o.toExpNeg||n>=o.toExpPos)):(Jr(e,1,Nl),t===void 0?t=o.rounding:Jr(t,0,8),i=dt(new o(i),e,t),n=qt(i),r=_s(i,e<=n||n<=o.toExpNeg,e)),r};ve.toSignificantDigits=ve.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Jr(e,1,Nl),t===void 0?t=r.rounding:Jr(t,0,8)),dt(new r(n),e,t)};ve.toString=ve.valueOf=ve.val=ve.toJSON=ve[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=qt(e),n=e.constructor;return _s(e,t<=n.toExpNeg||t>=n.toExpPos)};function i5(e,t){var n,r,i,o,l,u,f,h,m=e.constructor,y=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),wt?dt(t,y):t;if(f=e.d,h=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(r=f,o=-o,u=h.length):(r=h,i=l,u=f.length),l=Math.ceil(y/jt),u=l>u?l+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=f.length,o=h.length,u-o<0&&(o=u,r=h,h=f,f=r),n=0;o;)n=(f[--o]=f[o]+h[o]+n)/Qt|0,f[o]%=Qt;for(n&&(f.unshift(n),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,wt?dt(t,y):t}function Jr(e,t,n){if(e!==~~e||e<t||e>n)throw Error(xs+e)}function Gr(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=jt-r.length,n&&(o+=vi(n)),o+=r;l=e[t],r=l+"",n=jt-r.length,n&&(o+=vi(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Na=(function(){function e(r,i){var o,l=0,u=r.length;for(r=r.slice();u--;)o=r[u]*i+l,r[u]=o%Qt|0,l=o/Qt|0;return l&&r.unshift(l),r}function t(r,i,o,l){var u,f;if(o!=l)f=o>l?1:-1;else for(u=f=0;u<o;u++)if(r[u]!=i[u]){f=r[u]>i[u]?1:-1;break}return f}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*Qt+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var u,f,h,m,y,g,j,S,w,b,A,_,T,C,O,E,M,D,k=r.constructor,B=r.s==i.s?1:-1,q=r.d,$=i.d;if(!r.s)return new k(r);if(!i.s)throw Error(yr+"Division by zero");for(f=r.e-i.e,M=$.length,O=q.length,j=new k(B),S=j.d=[],h=0;$[h]==(q[h]||0);)++h;if($[h]>(q[h]||0)&&--f,o==null?_=o=k.precision:l?_=o+(qt(r)-qt(i))+1:_=o,_<0)return new k(0);if(_=_/jt+2|0,h=0,M==1)for(m=0,$=$[0],_++;(h<O||m)&&_--;h++)T=m*Qt+(q[h]||0),S[h]=T/$|0,m=T%$|0;else{for(m=Qt/($[0]+1)|0,m>1&&($=e($,m),q=e(q,m),M=$.length,O=q.length),C=M,w=q.slice(0,M),b=w.length;b<M;)w[b++]=0;D=$.slice(),D.unshift(0),E=$[0],$[1]>=Qt/2&&++E;do m=0,u=t($,w,M,b),u<0?(A=w[0],M!=b&&(A=A*Qt+(w[1]||0)),m=A/E|0,m>1?(m>=Qt&&(m=Qt-1),y=e($,m),g=y.length,b=w.length,u=t(y,w,g,b),u==1&&(m--,n(y,M<g?D:$,g))):(m==0&&(u=m=1),y=$.slice()),g=y.length,g<b&&y.unshift(0),n(w,y,b),u==-1&&(b=w.length,u=t($,w,M,b),u<1&&(m++,n(w,M<b?D:$,b))),b=w.length):u===0&&(m++,w=[0]),S[h++]=m,u&&w[0]?w[b++]=q[C]||0:(w=[q[C]],b=1);while((C++<O||w[0]!==void 0)&&_--)}return S[0]||S.shift(),j.e=f,dt(j,l?o+qt(j)+1:o)}})();function s5(e,t){var n,r,i,o,l,u,f=0,h=0,m=e.constructor,y=m.precision;if(qt(e)>16)throw Error(Xw+qt(e));if(!e.s)return new m(Kn);for(wt=!1,u=y,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(r=Math.log(os(2,h))/Math.LN10*2+5|0,u+=r,n=i=o=new m(Kn),m.precision=u;;){if(i=dt(i.times(e),u),n=n.times(++f),l=o.plus(Na(i,n,u)),Gr(l.d).slice(0,u)===Gr(o.d).slice(0,u)){for(;h--;)o=dt(o.times(o),u);return m.precision=y,t==null?(wt=!0,dt(o,y)):o}o=l}}function qt(e){for(var t=e.e*jt,n=e.d[0];n>=10;n/=10)t++;return t}function _0(e,t,n){if(t>e.LN10.sd())throw wt=!0,n&&(e.precision=n),Error(yr+"LN10 precision limit exceeded");return dt(new e(e.LN10),t)}function vi(e){for(var t="";e--;)t+="0";return t}function wu(e,t){var n,r,i,o,l,u,f,h,m,y=1,g=10,j=e,S=j.d,w=j.constructor,b=w.precision;if(j.s<1)throw Error(yr+(j.s?"NaN":"-Infinity"));if(j.eq(Kn))return new w(0);if(t==null?(wt=!1,h=b):h=t,j.eq(10))return t==null&&(wt=!0),_0(w,h);if(h+=g,w.precision=h,n=Gr(S),r=n.charAt(0),o=qt(j),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)j=j.times(e),n=Gr(j.d),r=n.charAt(0),y++;o=qt(j),r>1?(j=new w("0."+n),o++):j=new w(r+"."+n.slice(1))}else return f=_0(w,h+2,b).times(o+""),j=wu(new w(r+"."+n.slice(1)),h-g).plus(f),w.precision=b,t==null?(wt=!0,dt(j,b)):j;for(u=l=j=Na(j.minus(Kn),j.plus(Kn),h),m=dt(j.times(j),h),i=3;;){if(l=dt(l.times(m),h),f=u.plus(Na(l,new w(i),h)),Gr(f.d).slice(0,h)===Gr(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus(_0(w,h+2,b).times(o+""))),u=Na(u,new w(y),h),w.precision=b,t==null?(wt=!0,dt(u,b)):u;u=f,i+=2}}function $R(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=Cl(n/jt),e.d=[],r=(n+1)%jt,n<0&&(r+=jt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=jt;r<i;)e.d.push(+t.slice(r,r+=jt));t=t.slice(r),r=jt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),wt&&(e.e>Kh||e.e<-Kh))throw Error(Xw+n)}else e.s=0,e.e=0,e.d=[0];return e}function dt(e,t,n){var r,i,o,l,u,f,h,m,y=e.d;for(l=1,o=y[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=jt,i=t,h=y[m=0];else{if(m=Math.ceil((r+1)/jt),o=y.length,m>=o)return e;for(h=o=y[m],l=1;o>=10;o/=10)l++;r%=jt,i=r-jt+l}if(n!==void 0&&(o=os(10,l-i-1),u=h/o%10|0,f=t<0||y[m+1]!==void 0||h%o,f=n<4?(u||f)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||f||n==6&&(r>0?i>0?h/os(10,l-i):0:y[m-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return f?(o=qt(e),y.length=1,t=t-o-1,y[0]=os(10,(jt-t%jt)%jt),e.e=Cl(-t/jt)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(r==0?(y.length=m,o=1,m--):(y.length=m+1,o=os(10,jt-r),y[m]=i>0?(h/os(10,l-i)%os(10,i)|0)*o:0),f)for(;;)if(m==0){(y[0]+=o)==Qt&&(y[0]=1,++e.e);break}else{if(y[m]+=o,y[m]!=Qt)break;y[m--]=0,o=1}for(r=y.length;y[--r]===0;)y.pop();if(wt&&(e.e>Kh||e.e<-Kh))throw Error(Xw+qt(e));return e}function o5(e,t){var n,r,i,o,l,u,f,h,m,y,g=e.constructor,j=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),wt?dt(t,j):t;if(f=e.d,y=t.d,r=t.e,h=e.e,f=f.slice(),l=h-r,l){for(m=l<0,m?(n=f,l=-l,u=y.length):(n=y,r=h,u=f.length),i=Math.max(Math.ceil(j/jt),u)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=f.length,u=y.length,m=i<u,m&&(u=i),i=0;i<u;i++)if(f[i]!=y[i]){m=f[i]<y[i];break}l=0}for(m&&(n=f,f=y,y=n,t.s=-t.s),u=f.length,i=y.length-u;i>0;--i)f[u++]=0;for(i=y.length;i>l;){if(f[--i]<y[i]){for(o=i;o&&f[--o]===0;)f[o]=Qt-1;--f[o],f[i]+=Qt}f[i]-=y[i]}for(;f[--u]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,wt?dt(t,j):t):new g(0)}function _s(e,t,n){var r,i=qt(e),o=Gr(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+vi(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+vi(-i-1)+o,n&&(r=n-l)>0&&(o+=vi(r))):i>=l?(o+=vi(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+vi(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=vi(r))),e.s<0?"-"+o:o}function BR(e,t){if(e.length>t)return e.length=t,!0}function l5(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(xs+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return $R(l,o.toString())}else if(typeof o!="string")throw Error(xs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,xJ.test(o))$R(l,o);else throw Error(xs+o)}if(i.prototype=ve,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=l5,i.config=i.set=bJ,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 bJ(e){if(!e||typeof e!="object")throw Error(yr+"Object expected");var t,n,r,i=["precision",1,Nl,"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(Cl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(xs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(xs+n+": "+r);return this}var Ww=l5(gJ);Kn=new Ww(1);const lt=Ww;function jJ(e){return OJ(e)||AJ(e)||wJ(e)||SJ()}function SJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wJ(e,t){if(e){if(typeof e=="string")return hj(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 hj(e,t)}}function AJ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function OJ(e){if(Array.isArray(e))return hj(e)}function hj(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 _J=function(t){return t},c5={},u5=function(t){return t===c5},IR=function(t){return function n(){return arguments.length===0||arguments.length===1&&u5(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},TJ=function e(t,n){return t===1?n:IR(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=i.filter(function(u){return u!==c5}).length;return l>=t?n.apply(void 0,i):e(t-l,IR(function(){for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];var m=i.map(function(y){return u5(y)?f.shift():y});return n.apply(void 0,jJ(m).concat(f))}))})},am=function(t){return TJ(t.length,t)},pj=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},EJ=am(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),NJ=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return _J;var i=n.reverse(),o=i[0],l=i.slice(1);return function(){return l.reduce(function(u,f){return f(u)},o.apply(void 0,arguments))}},mj=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},f5=function(t){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n&&o.every(function(u,f){return u===n[f]})||(n=o,r=t.apply(void 0,o)),r}};function CJ(e){var t;return e===0?t=1:t=Math.floor(new lt(e).abs().log(10).toNumber())+1,t}function MJ(e,t,n){for(var r=new lt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var PJ=am(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),RJ=am(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),kJ=am(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const im={rangeStep:MJ,getDigitCount:CJ,interpolateNumber:PJ,uninterpolateNumber:RJ,uninterpolateTruncation:kJ};function yj(e){return zJ(e)||LJ(e)||d5(e)||DJ()}function DJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LJ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function zJ(e){if(Array.isArray(e))return vj(e)}function Au(e,t){return IJ(e)||BJ(e,t)||d5(e,t)||$J()}function $J(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d5(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 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 BJ(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var l=e[Symbol.iterator](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(f){i=!0,o=f}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw o}}return n}}function IJ(e){if(Array.isArray(e))return e}function h5(e){var t=Au(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function p5(e,t,n){if(e.lte(0))return new lt(0);var r=im.getDigitCount(e.toNumber()),i=new lt(10).pow(r),o=e.div(i),l=r!==1?.05:.1,u=new lt(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=u.mul(i);return t?f:new lt(Math.ceil(f))}function qJ(e,t,n){var r=1,i=new lt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new lt(10).pow(im.getDigitCount(e)-1),i=new lt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new lt(Math.floor(e)))}else e===0?i=new lt(Math.floor((t-1)/2)):n||(i=new lt(Math.floor(e)));var l=Math.floor((t-1)/2),u=NJ(EJ(function(f){return i.add(new lt(f-l).mul(r)).toNumber()}),pj);return u(0,t)}function m5(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 lt(0),tickMin:new lt(0),tickMax:new lt(0)};var o=p5(new lt(t).sub(e).div(n-1),r,i),l;e<=0&&t>=0?l=new lt(0):(l=new lt(e).add(t).div(2),l=l.sub(new lt(l).mod(o)));var u=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new lt(t).sub(l).div(o).toNumber()),h=u+f+1;return h>n?m5(e,t,n,r,i+1):(h<n&&(f=t>0?f+(n-h):f,u=t>0?u:u+(n-h)),{step:o,tickMin:l.sub(new lt(u).mul(o)),tickMax:l.add(new lt(f).mul(o))})}function UJ(e){var t=Au(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(i,2),u=h5([n,r]),f=Au(u,2),h=f[0],m=f[1];if(h===-1/0||m===1/0){var y=m===1/0?[h].concat(yj(pj(0,i-1).map(function(){return 1/0}))):[].concat(yj(pj(0,i-1).map(function(){return-1/0})),[m]);return n>r?mj(y):y}if(h===m)return qJ(h,i,o);var g=m5(h,m,l,o),j=g.step,S=g.tickMin,w=g.tickMax,b=im.rangeStep(S,w.add(new lt(.1).mul(j)),j);return n>r?mj(b):b}function VJ(e,t){var n=Au(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=h5([r,i]),u=Au(l,2),f=u[0],h=u[1];if(f===-1/0||h===1/0)return[r,i];if(f===h)return[f];var m=Math.max(t,2),y=p5(new lt(h).sub(f).div(m-1),o,0),g=[].concat(yj(im.rangeStep(new lt(f),new lt(h).sub(new lt(.99).mul(y)),y)),[h]);return r>i?mj(g):g}var HJ=f5(UJ),GJ=f5(VJ),FJ="Invariant failed";function Ts(e,t){throw new Error(FJ)}var KJ=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Qo(e){"@babel/helpers - typeof";return Qo=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},Qo(e)}function Yh(){return Yh=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},Yh.apply(this,arguments)}function YJ(e,t){return QJ(e)||ZJ(e,t)||WJ(e,t)||XJ()}function XJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WJ(e,t){if(e){if(typeof e=="string")return qR(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 qR(e,t)}}function qR(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 ZJ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function QJ(e){if(Array.isArray(e))return e}function JJ(e,t){if(e==null)return{};var n=eee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eee(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 tee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nee(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,g5(r.key),r)}}function ree(e,t,n){return t&&nee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aee(e,t,n){return t=Xh(t),iee(e,y5()?Reflect.construct(t,n||[],Xh(e).constructor):t.apply(e,n))}function iee(e,t){if(t&&(Qo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return see(e)}function see(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y5=function(){return!!e})()}function Xh(e){return Xh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xh(e)}function oee(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 v5(e,t,n){return t=g5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g5(e){var t=lee(e,"string");return Qo(t)=="symbol"?t:t+""}function lee(e,t){if(Qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var of=(function(e){function t(){return tee(this,t),aee(this,t,arguments)}return oee(t,e),ree(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,l=r.width,u=r.dataKey,f=r.data,h=r.dataPointFormatter,m=r.xAxis,y=r.yAxis,g=JJ(r,KJ),j=je(g,!1);this.props.direction==="x"&&m.type!=="number"&&Ts();var S=f.map(function(w){var b=h(w,u),A=b.x,_=b.y,T=b.value,C=b.errorVal;if(!C)return null;var O=[],E,M;if(Array.isArray(C)){var D=YJ(C,2);E=D[0],M=D[1]}else E=M=C;if(o==="vertical"){var k=m.scale,B=_+i,q=B+l,$=B-l,F=k(T-E),X=k(T+M);O.push({x1:X,y1:q,x2:X,y2:$}),O.push({x1:F,y1:B,x2:X,y2:B}),O.push({x1:F,y1:q,x2:F,y2:$})}else if(o==="horizontal"){var Y=y.scale,L=A+i,H=L-l,Q=L+l,ae=Y(T-E),oe=Y(T+M);O.push({x1:H,y1:oe,x2:Q,y2:oe}),O.push({x1:L,y1:ae,x2:L,y2:oe}),O.push({x1:H,y1:ae,x2:Q,y2:ae})}return I.createElement(Ie,Yh({className:"recharts-errorBar",key:"bar-".concat(O.map(function(z){return"".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))},j),O.map(function(z){return I.createElement("line",Yh({},z,{key:"line-".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))}))});return I.createElement(Ie,{className:"recharts-errorBars"},S)}}])})(I.Component);v5(of,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});v5(of,"displayName","ErrorBar");function Ou(e){"@babel/helpers - typeof";return Ou=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},Ou(e)}function UR(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 ts(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UR(Object(n),!0).forEach(function(r){cee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cee(e,t,n){return t=uee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uee(e){var t=fee(e,"string");return Ou(t)=="symbol"?t:t+""}function fee(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x5=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,l=Gn(n,zo);if(!l)return null;var u=zo.defaultProps,f=u!==void 0?ts(ts({},u),l.props):{},h;return l.props&&l.props.payload?h=l.props&&l.props.payload:o==="children"?h=(r||[]).reduce(function(m,y){var g=y.item,j=y.props,S=j.sectors||j.data||[];return m.concat(S.map(function(w){return{type:l.props.iconType||g.props.legendType,value:w.name,color:w.fill,payload:w}}))},[]):h=(r||[]).map(function(m){var y=m.item,g=y.type.defaultProps,j=g!==void 0?ts(ts({},g),y.props):{},S=j.dataKey,w=j.name,b=j.legendType,A=j.hide;return{inactive:A,dataKey:S,type:f.iconType||b||"square",color:Zw(y),value:w||S,payload:j}}),ts(ts(ts({},f),zo.getWithHeight(l,i)),{},{payload:h,item:l})};function _u(e){"@babel/helpers - typeof";return _u=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},_u(e)}function VR(e){return mee(e)||pee(e)||hee(e)||dee()}function dee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hee(e,t){if(e){if(typeof e=="string")return xj(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 xj(e,t)}}function pee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mee(e){if(Array.isArray(e))return xj(e)}function xj(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 HR(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 Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HR(Object(n),!0).forEach(function(r){Bo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bo(e,t,n){return t=yee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yee(e){var t=vee(e,"string");return _u(t)=="symbol"?t:t+""}function vee(e,t){if(_u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kt(e,t,n){return Ne(e)||Ne(t)?n:Kt(t)?Xn(e,t,n):Te(t)?t(e):n}function tu(e,t,n,r){var i=mJ(e,function(u){return kt(u,t)});if(n==="number"){var o=i.filter(function(u){return ce(u)||parseFloat(u)});return o.length?[rm(o),ji(o)]:[1/0,-1/0]}var l=r?i.filter(function(u){return!Ne(u)}):i;return l.map(function(u){return Kt(u)||u instanceof Date?u:""})}var gee=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,u=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var f=o.range,h=0;h<u;h++){var m=h>0?i[h-1].coordinate:i[u-1].coordinate,y=i[h].coordinate,g=h>=u-1?i[0].coordinate:i[h+1].coordinate,j=void 0;if(bn(y-m)!==bn(g-y)){var S=[];if(bn(g-y)===bn(f[1]-f[0])){j=g;var w=y+f[1]-f[0];S[0]=Math.min(w,(w+m)/2),S[1]=Math.max(w,(w+m)/2)}else{j=m;var b=g+f[1]-f[0];S[0]=Math.min(y,(b+y)/2),S[1]=Math.max(y,(b+y)/2)}var A=[Math.min(y,(j+y)/2),Math.max(y,(j+y)/2)];if(t>A[0]&&t<=A[1]||t>=S[0]&&t<=S[1]){l=i[h].index;break}}else{var _=Math.min(m,g),T=Math.max(m,g);if(t>(_+y)/2&&t<=(T+y)/2){l=i[h].index;break}}}else for(var C=0;C<u;C++)if(C===0&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C>0&&C<u-1&&t>(r[C].coordinate+r[C-1].coordinate)/2&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C===u-1&&t>(r[C].coordinate+r[C-1].coordinate)/2){l=r[C].index;break}return l},Zw=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Mt(Mt({},t.type.defaultProps),t.props):t.props,l=o.stroke,u=o.fill,f;switch(i){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:u;break;default:f=u;break}return f},xee=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var l={},u=Object.keys(o),f=0,h=u.length;f<h;f++)for(var m=o[u[f]].stackGroups,y=Object.keys(m),g=0,j=y.length;g<j;g++){var S=m[y[g]],w=S.items,b=S.cateAxisId,A=w.filter(function(M){return Ea(M.type).indexOf("Bar")>=0});if(A&&A.length){var _=A[0].type.defaultProps,T=_!==void 0?Mt(Mt({},_),A[0].props):A[0].props,C=T.barSize,O=T[b];l[O]||(l[O]=[]);var E=Ne(C)?n:C;l[O].push({item:A[0],stackList:A.slice(1),barSize:Ne(E)?void 0:jn(E,r,0)})}}return l},bee=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,u=t.maxBarSize,f=l.length;if(f<1)return null;var h=jn(n,i,0,!0),m,y=[];if(l[0].barSize===+l[0].barSize){var g=!1,j=i/f,S=l.reduce(function(C,O){return C+O.barSize||0},0);S+=(f-1)*h,S>=i&&(S-=(f-1)*h,h=0),S>=i&&j>0&&(g=!0,j*=.9,S=f*j);var w=(i-S)/2>>0,b={offset:w-h,size:0};m=l.reduce(function(C,O){var E={item:O.item,position:{offset:b.offset+b.size+h,size:g?j:O.barSize}},M=[].concat(VR(C),[E]);return b=M[M.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(D){M.push({item:D,position:b})}),M},y)}else{var A=jn(r,i,0,!0);i-2*A-(f-1)*h<=0&&(h=0);var _=(i-2*A-(f-1)*h)/f;_>1&&(_>>=0);var T=u===+u?Math.min(_,u):_;m=l.reduce(function(C,O,E){var M=[].concat(VR(C),[{item:O.item,position:{offset:A+(_+h)*E+(_-T)/2,size:T}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(D){M.push({item:D,position:M[M.length-1].position})}),M},y)}return m},jee=function(t,n,r,i){var o=r.children,l=r.width,u=r.margin,f=l-(u.left||0)-(u.right||0),h=x5({children:o,legendWidth:f});if(h){var m=i||{},y=m.width,g=m.height,j=h.align,S=h.verticalAlign,w=h.layout;if((w==="vertical"||w==="horizontal"&&S==="middle")&&j!=="center"&&ce(t[j]))return Mt(Mt({},t),{},Bo({},j,t[j]+(y||0)));if((w==="horizontal"||w==="vertical"&&j==="center")&&S!=="middle"&&ce(t[S]))return Mt(Mt({},t),{},Bo({},S,t[S]+(g||0)))}return t},See=function(t,n,r){return Ne(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},b5=function(t,n,r,i,o){var l=n.props.children,u=Wn(l,of).filter(function(h){return See(i,o,h.props.direction)});if(u&&u.length){var f=u.map(function(h){return h.props.dataKey});return t.reduce(function(h,m){var y=kt(m,r);if(Ne(y))return h;var g=Array.isArray(y)?[rm(y),ji(y)]:[y,y],j=f.reduce(function(S,w){var b=kt(m,w,0),A=g[0]-Math.abs(Array.isArray(b)?b[0]:b),_=g[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(A,S[0]),Math.max(_,S[1])]},[1/0,-1/0]);return[Math.min(j[0],h[0]),Math.max(j[1],h[1])]},[1/0,-1/0])}return null},wee=function(t,n,r,i,o){var l=n.map(function(u){return b5(t,u,r,o,i)}).filter(function(u){return!Ne(u)});return l&&l.length?l.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]):null},j5=function(t,n,r,i,o){var l=n.map(function(f){var h=f.props.dataKey;return r==="number"&&h&&b5(t,f,h,i)||tu(t,h,r,o)});if(r==="number")return l.reduce(function(f,h){return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);var u={};return l.reduce(function(f,h){for(var m=0,y=h.length;m<y;m++)u[h[m]]||(u[h[m]]=!0,f.push(h[m]));return f},[])},S5=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},w5=function(t,n,r,i){if(i)return t.map(function(f){return f.coordinate});var o,l,u=t.map(function(f){return f.coordinate===n&&(o=!0),f.coordinate===r&&(l=!0),f.coordinate});return o||u.push(n),l||u.push(r),u},Ta=function(t,n,r){if(!t)return null;var i=t.scale,o=t.duplicateDomain,l=t.type,u=t.range,f=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,h=(n||r)&&l==="category"&&i.bandwidth?i.bandwidth()/f:0;if(h=t.axisType==="angleAxis"&&(u==null?void 0:u.length)>=2?bn(u[0]-u[1])*2*h:h,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(y){var g=o?o.indexOf(y):y;return{coordinate:i(g)+h,value:y,offset:h}});return m.filter(function(y){return!_l(y.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(y,g){return{coordinate:i(y)+h,value:y,index:g,offset:h}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(y){return{coordinate:i(y)+h,value:y,offset:h}}):i.domain().map(function(y,g){return{coordinate:i(y)+h,value:o?o[y]:y,index:g,offset:h}})},T0=new WeakMap,Vd=function(t,n){if(typeof n!="function")return t;T0.has(t)||T0.set(t,new WeakMap);var r=T0.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},A5=function(t,n,r){var i=t.scale,o=t.type,l=t.layout,u=t.axisType;if(i==="auto")return l==="radial"&&u==="radiusAxis"?{scale:gu(),realScaleType:"band"}:l==="radial"&&u==="angleAxis"?{scale:Vh(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:eu(),realScaleType:"point"}:o==="category"?{scale:gu(),realScaleType:"band"}:{scale:Vh(),realScaleType:"linear"};if(Ss(i)){var f="scale".concat(Up(i));return{scale:(NR[f]||eu)(),realScaleType:NR[f]?f:"point"}}return Te(i)?{scale:i}:{scale:eu(),realScaleType:"point"}},GR=1e-4,O5=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-GR,l=Math.max(i[0],i[1])+GR,u=t(n[0]),f=t(n[r-1]);(u<o||u>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},Aee=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},Oee=function(t,n){if(!n||n.length!==2||!ce(n[0])||!ce(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!ce(t[0])||t[0]<r)&&(o[0]=r),(!ce(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},_ee=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0,u=0;u<n;++u){var f=_l(t[u][r][1])?t[u][r][0]:t[u][r][1];f>=0?(t[u][r][0]=o,t[u][r][1]=o+f,o=t[u][r][1]):(t[u][r][0]=l,t[u][r][1]=l+f,l=t[u][r][1])}},Tee=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0;l<n;++l){var u=_l(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},Eee={sign:_ee,expand:mK,none:Ho,silhouette:yK,wiggle:vK,positive:Tee},Nee=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=Eee[r],l=pK().keys(i).value(function(u,f){return+kt(u,f,0)}).order(X1).offset(o);return l(t)},Cee=function(t,n,r,i,o,l){if(!t)return null;var u=l?n.reverse():n,f={},h=u.reduce(function(y,g){var j,S=(j=g.type)!==null&&j!==void 0&&j.defaultProps?Mt(Mt({},g.type.defaultProps),g.props):g.props,w=S.stackId,b=S.hide;if(b)return y;var A=S[r],_=y[A]||{hasStack:!1,stackGroups:{}};if(Kt(w)){var T=_.stackGroups[w]||{numericAxisId:r,cateAxisId:i,items:[]};T.items.push(g),_.hasStack=!0,_.stackGroups[w]=T}else _.stackGroups[Ms("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[g]};return Mt(Mt({},y),{},Bo({},A,_))},f),m={};return Object.keys(h).reduce(function(y,g){var j=h[g];if(j.hasStack){var S={};j.stackGroups=Object.keys(j.stackGroups).reduce(function(w,b){var A=j.stackGroups[b];return Mt(Mt({},w),{},Bo({},b,{numericAxisId:r,cateAxisId:i,items:A.items,stackedData:Nee(t,A.items,o)}))},S)}return Mt(Mt({},y),{},Bo({},g,j))},m)},_5=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,l=n.originalDomain,u=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(o&&i==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var h=t.domain();if(!h.length)return null;var m=HJ(h,o,u);return t.domain([rm(m),ji(m)]),{niceTicks:m}}if(o&&i==="number"){var y=t.domain(),g=GJ(y,o,u);return{niceTicks:g}}return null};function Wh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ne(i[t.dataKey])){var u=wh(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=kt(i,Ne(l)?t.dataKey:l);return Ne(f)?null:t.scale(f)}var FR=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,l=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var f=kt(l,n.dataKey,n.domain[u]);return Ne(f)?null:n.scale(f)-o/2+i},Mee=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},Pee=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Mt(Mt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Kt(o)){var l=n[o];if(l){var u=l.items.indexOf(t);return u>=0?l.stackedData[u]:null}}return null},Ree=function(t){return t.reduce(function(n,r){return[rm(r.concat([n[0]]).filter(ce)),ji(r.concat([n[1]]).filter(ce))]},[1/0,-1/0])},T5=function(t,n,r){return Object.keys(t).reduce(function(i,o){var l=t[o],u=l.stackedData,f=u.reduce(function(h,m){var y=Ree(m.slice(n,r+1));return[Math.min(h[0],y[0]),Math.max(h[1],y[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},KR=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,YR=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bj=function(t,n,r){if(Te(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ce(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(KR.test(t[0])){var o=+KR.exec(t[0])[1];i[0]=n[0]-o}else Te(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ce(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(YR.test(t[1])){var l=+YR.exec(t[1])[1];i[1]=n[1]+l}else Te(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Zh=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 o=Ow(n,function(y){return y.coordinate}),l=1/0,u=1,f=o.length;u<f;u++){var h=o[u],m=o[u-1];l=Math.min((h.coordinate||0)-(m.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},XR=function(t,n,r){return!t||!t.length||Os(t,Xn(r,"type.defaultProps.domain"))?n:t},E5=function(t,n){var r=t.type.defaultProps?Mt(Mt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,o=r.name,l=r.unit,u=r.formatter,f=r.tooltipType,h=r.chartType,m=r.hide;return Mt(Mt({},je(t,!1)),{},{dataKey:i,unit:l,formatter:u,name:o||i,color:Zw(t),value:kt(n,i),type:f,payload:n,chartType:h,hide:m})};function Tu(e){"@babel/helpers - typeof";return Tu=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},Tu(e)}function WR(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 Aa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WR(Object(n),!0).forEach(function(r){N5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N5(e,t,n){return t=kee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kee(e){var t=Dee(e,"string");return Tu(t)=="symbol"?t:t+""}function Dee(e,t){if(Tu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lee(e,t){return Iee(e)||Bee(e,t)||$ee(e,t)||zee()}function zee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $ee(e,t){if(e){if(typeof e=="string")return ZR(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 ZR(e,t)}}function ZR(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 Bee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Iee(e){if(Array.isArray(e))return e}var Qh=Math.PI/180,qee=function(t){return t*180/Math.PI},mt=function(t,n,r,i){return{x:t+Math.cos(-Qh*i)*r,y:n+Math.sin(-Qh*i)*r}},C5=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},Uee=function(t,n,r,i,o){var l=t.width,u=t.height,f=t.startAngle,h=t.endAngle,m=jn(t.cx,l,l/2),y=jn(t.cy,u,u/2),g=C5(l,u,r),j=jn(t.innerRadius,g,0),S=jn(t.outerRadius,g,g*.8),w=Object.keys(n);return w.reduce(function(b,A){var _=n[A],T=_.domain,C=_.reversed,O;if(Ne(_.range))i==="angleAxis"?O=[f,h]:i==="radiusAxis"&&(O=[j,S]),C&&(O=[O[1],O[0]]);else{O=_.range;var E=O,M=Lee(E,2);f=M[0],h=M[1]}var D=A5(_,o),k=D.realScaleType,B=D.scale;B.domain(T).range(O),O5(B);var q=_5(B,Aa(Aa({},_),{},{realScaleType:k})),$=Aa(Aa(Aa({},_),q),{},{range:O,radius:S,realScaleType:k,scale:B,cx:m,cy:y,innerRadius:j,outerRadius:S,startAngle:f,endAngle:h});return Aa(Aa({},b),{},N5({},A,$))},{})},Vee=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-l,2))},Hee=function(t,n){var r=t.x,i=t.y,o=n.cx,l=n.cy,u=Vee({x:r,y:i},{x:o,y:l});if(u<=0)return{radius:u};var f=(r-o)/u,h=Math.acos(f);return i>l&&(h=2*Math.PI-h),{radius:u,angle:qee(h),angleInRadian:h}},Gee=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return{startAngle:n-l*360,endAngle:r-l*360}},Fee=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),l=Math.floor(i/360),u=Math.min(o,l);return t+u*360},QR=function(t,n){var r=t.x,i=t.y,o=Hee({x:r,y:i},n),l=o.radius,u=o.angle,f=n.innerRadius,h=n.outerRadius;if(l<f||l>h)return!1;if(l===0)return!0;var m=Gee(n),y=m.startAngle,g=m.endAngle,j=u,S;if(y<=g){for(;j>g;)j-=360;for(;j<y;)j+=360;S=j>=y&&j<=g}else{for(;j>y;)j-=360;for(;j<g;)j+=360;S=j>=g&&j<=y}return S?Aa(Aa({},n),{},{radius:l,angle:Fee(j,n)}):null},M5=function(t){return!P.isValidElement(t)&&!Te(t)&&typeof t!="boolean"?t.className:""};function Eu(e){"@babel/helpers - typeof";return Eu=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},Eu(e)}var Kee=["offset"];function Yee(e){return Qee(e)||Zee(e)||Wee(e)||Xee()}function Xee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wee(e,t){if(e){if(typeof e=="string")return jj(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 jj(e,t)}}function Zee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qee(e){if(Array.isArray(e))return jj(e)}function jj(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 Jee(e,t){if(e==null)return{};var n=ete(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ete(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 JR(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 Ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JR(Object(n),!0).forEach(function(r){tte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tte(e,t,n){return t=nte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nte(e){var t=rte(e,"string");return Eu(t)=="symbol"?t:t+""}function rte(e,t){if(Eu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nu(){return Nu=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},Nu.apply(this,arguments)}var ate=function(t){var n=t.value,r=t.formatter,i=Ne(t.children)?n:t.children;return Te(r)?r(i):i},ite=function(t,n){var r=bn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},ste=function(t,n,r){var i=t.position,o=t.viewBox,l=t.offset,u=t.className,f=o,h=f.cx,m=f.cy,y=f.innerRadius,g=f.outerRadius,j=f.startAngle,S=f.endAngle,w=f.clockWise,b=(y+g)/2,A=ite(j,S),_=A>=0?1:-1,T,C;i==="insideStart"?(T=j+_*l,C=w):i==="insideEnd"?(T=S-_*l,C=!w):i==="end"&&(T=S+_*l,C=w),C=A<=0?C:!C;var O=mt(h,m,b,T),E=mt(h,m,b,T+(C?1:-1)*359),M="M".concat(O.x,",").concat(O.y,`
A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
`).concat(E.x,",").concat(E.y),D=Ne(t.id)?Ms("recharts-radial-line-"):t.id;return I.createElement("text",Nu({},r,{dominantBaseline:"central",className:Pe("recharts-radial-bar-label",u)}),I.createElement("defs",null,I.createElement("path",{id:D,d:M})),I.createElement("textPath",{xlinkHref:"#".concat(D)},n))},ote=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,l=o.cx,u=o.cy,f=o.innerRadius,h=o.outerRadius,m=o.startAngle,y=o.endAngle,g=(m+y)/2;if(i==="outside"){var j=mt(l,u,h+r,g),S=j.x,w=j.y;return{x:S,y:w,textAnchor:S>=l?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"end"};var b=(f+h)/2,A=mt(l,u,b,g),_=A.x,T=A.y;return{x:_,y:T,textAnchor:"middle",verticalAnchor:"middle"}},lte=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,l=n,u=l.x,f=l.y,h=l.width,m=l.height,y=m>=0?1:-1,g=y*i,j=y>0?"end":"start",S=y>0?"start":"end",w=h>=0?1:-1,b=w*i,A=w>0?"end":"start",_=w>0?"start":"end";if(o==="top"){var T={x:u+h/2,y:f-y*i,textAnchor:"middle",verticalAnchor:j};return Ht(Ht({},T),r?{height:Math.max(f-r.y,0),width:h}:{})}if(o==="bottom"){var C={x:u+h/2,y:f+m+g,textAnchor:"middle",verticalAnchor:S};return Ht(Ht({},C),r?{height:Math.max(r.y+r.height-(f+m),0),width:h}:{})}if(o==="left"){var O={x:u-b,y:f+m/2,textAnchor:A,verticalAnchor:"middle"};return Ht(Ht({},O),r?{width:Math.max(O.x-r.x,0),height:m}:{})}if(o==="right"){var E={x:u+h+b,y:f+m/2,textAnchor:_,verticalAnchor:"middle"};return Ht(Ht({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:m}:{})}var M=r?{width:h,height:m}:{};return o==="insideLeft"?Ht({x:u+b,y:f+m/2,textAnchor:_,verticalAnchor:"middle"},M):o==="insideRight"?Ht({x:u+h-b,y:f+m/2,textAnchor:A,verticalAnchor:"middle"},M):o==="insideTop"?Ht({x:u+h/2,y:f+g,textAnchor:"middle",verticalAnchor:S},M):o==="insideBottom"?Ht({x:u+h/2,y:f+m-g,textAnchor:"middle",verticalAnchor:j},M):o==="insideTopLeft"?Ht({x:u+b,y:f+g,textAnchor:_,verticalAnchor:S},M):o==="insideTopRight"?Ht({x:u+h-b,y:f+g,textAnchor:A,verticalAnchor:S},M):o==="insideBottomLeft"?Ht({x:u+b,y:f+m-g,textAnchor:_,verticalAnchor:j},M):o==="insideBottomRight"?Ht({x:u+h-b,y:f+m-g,textAnchor:A,verticalAnchor:j},M):Ol(o)&&(ce(o.x)||fs(o.x))&&(ce(o.y)||fs(o.y))?Ht({x:u+jn(o.x,h),y:f+jn(o.y,m),textAnchor:"end",verticalAnchor:"end"},M):Ht({x:u+h/2,y:f+m/2,textAnchor:"middle",verticalAnchor:"middle"},M)},cte=function(t){return"cx"in t&&ce(t.cx)};function Jt(e){var t=e.offset,n=t===void 0?5:t,r=Jee(e,Kee),i=Ht({offset:n},r),o=i.viewBox,l=i.position,u=i.value,f=i.children,h=i.content,m=i.className,y=m===void 0?"":m,g=i.textBreakAll;if(!o||Ne(u)&&Ne(f)&&!P.isValidElement(h)&&!Te(h))return null;if(P.isValidElement(h))return P.cloneElement(h,i);var j;if(Te(h)){if(j=P.createElement(h,i),P.isValidElement(j))return j}else j=ate(i);var S=cte(o),w=je(i,!0);if(S&&(l==="insideStart"||l==="insideEnd"||l==="end"))return ste(i,j,w);var b=S?ote(i):lte(i);return I.createElement(As,Nu({className:Pe("recharts-label",y)},w,b,{breakAll:g}),j)}Jt.displayName="Label";var P5=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,l=t.endAngle,u=t.r,f=t.radius,h=t.innerRadius,m=t.outerRadius,y=t.x,g=t.y,j=t.top,S=t.left,w=t.width,b=t.height,A=t.clockWise,_=t.labelViewBox;if(_)return _;if(ce(w)&&ce(b)){if(ce(y)&&ce(g))return{x:y,y:g,width:w,height:b};if(ce(j)&&ce(S))return{x:j,y:S,width:w,height:b}}return ce(y)&&ce(g)?{x:y,y:g,width:0,height:0}:ce(n)&&ce(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:l||i||0,innerRadius:h||0,outerRadius:m||f||u||0,clockWise:A}:t.viewBox?t.viewBox:{}},ute=function(t,n){return t?t===!0?I.createElement(Jt,{key:"label-implicit",viewBox:n}):Kt(t)?I.createElement(Jt,{key:"label-implicit",viewBox:n,value:t}):P.isValidElement(t)?t.type===Jt?P.cloneElement(t,{key:"label-implicit",viewBox:n}):I.createElement(Jt,{key:"label-implicit",content:t,viewBox:n}):Te(t)?I.createElement(Jt,{key:"label-implicit",content:t,viewBox:n}):Ol(t)?I.createElement(Jt,Nu({viewBox:n},t,{key:"label-implicit"})):null:null},fte=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,o=P5(t),l=Wn(i,Jt).map(function(f,h){return P.cloneElement(f,{viewBox:n||o,key:"label-".concat(h)})});if(!r)return l;var u=ute(t.label,n||o);return[u].concat(Yee(l))};Jt.parseViewBox=P5;Jt.renderCallByParent=fte;var E0,ek;function dte(){if(ek)return E0;ek=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return E0=e,E0}var hte=dte();const pte=at(hte);function Cu(e){"@babel/helpers - typeof";return Cu=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},Cu(e)}var mte=["valueAccessor"],yte=["data","dataKey","clockWise","id","textBreakAll"];function vte(e){return jte(e)||bte(e)||xte(e)||gte()}function gte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xte(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 bte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jte(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 Jh(){return Jh=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},Jh.apply(this,arguments)}function tk(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 nk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tk(Object(n),!0).forEach(function(r){Ste(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ste(e,t,n){return t=wte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wte(e){var t=Ate(e,"string");return Cu(t)=="symbol"?t:t+""}function Ate(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rk(e,t){if(e==null)return{};var n=Ote(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ote(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 _te=function(t){return Array.isArray(t.value)?pte(t.value):t.value};function Xr(e){var t=e.valueAccessor,n=t===void 0?_te:t,r=rk(e,mte),i=r.data,o=r.dataKey,l=r.clockWise,u=r.id,f=r.textBreakAll,h=rk(r,yte);return!i||!i.length?null:I.createElement(Ie,{className:"recharts-label-list"},i.map(function(m,y){var g=Ne(o)?n(m,y):kt(m&&m.payload,o),j=Ne(u)?{}:{id:"".concat(u,"-").concat(y)};return I.createElement(Jt,Jh({},je(m,!0),h,j,{parentViewBox:m.parentViewBox,value:g,textBreakAll:f,viewBox:Jt.parseViewBox(Ne(l)?m:nk(nk({},m),{},{clockWise:l})),key:"label-".concat(y),index:y}))}))}Xr.displayName="LabelList";function Tte(e,t){return e?e===!0?I.createElement(Xr,{key:"labelList-implicit",data:t}):I.isValidElement(e)||Te(e)?I.createElement(Xr,{key:"labelList-implicit",data:t,content:e}):Ol(e)?I.createElement(Xr,Jh({data:t},e,{key:"labelList-implicit"})):null:null}function Ete(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=Wn(r,Xr).map(function(l,u){return P.cloneElement(l,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=Tte(e.label,t);return[o].concat(vte(i))}Xr.renderCallByParent=Ete;function Mu(e){"@babel/helpers - typeof";return Mu=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},Mu(e)}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 ak(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 ik(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ak(Object(n),!0).forEach(function(r){Nte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ak(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nte(e,t,n){return t=Cte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cte(e){var t=Mte(e,"string");return Mu(t)=="symbol"?t:t+""}function Mte(e,t){if(Mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pte=function(t,n){var r=bn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Hd=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,l=t.sign,u=t.isExternal,f=t.cornerRadius,h=t.cornerIsExternal,m=f*(u?1:-1)+i,y=Math.asin(f/m)/Qh,g=h?o:o+l*y,j=mt(n,r,m,g),S=mt(n,r,i,g),w=h?o-l*y:o,b=mt(n,r,m*Math.cos(y*Qh),w);return{center:j,circleTangency:S,lineTangency:b,theta:y}},R5=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.startAngle,u=t.endAngle,f=Pte(l,u),h=l+f,m=mt(n,r,o,l),y=mt(n,r,o,h),g="M ".concat(m.x,",").concat(m.y,`
A `).concat(o,",").concat(o,`,0,
`).concat(+(Math.abs(f)>180),",").concat(+(l>h),`,
`).concat(y.x,",").concat(y.y,`
`);if(i>0){var j=mt(n,r,i,l),S=mt(n,r,i,h);g+="L ".concat(S.x,",").concat(S.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(f)>180),",").concat(+(l<=h),`,
`).concat(j.x,",").concat(j.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},Rte=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,y=bn(m-h),g=Hd({cx:n,cy:r,radius:o,angle:h,sign:y,cornerRadius:l,cornerIsExternal:f}),j=g.circleTangency,S=g.lineTangency,w=g.theta,b=Hd({cx:n,cy:r,radius:o,angle:m,sign:-y,cornerRadius:l,cornerIsExternal:f}),A=b.circleTangency,_=b.lineTangency,T=b.theta,C=f?Math.abs(h-m):Math.abs(h-m)-w-T;if(C<0)return u?"M ".concat(S.x,",").concat(S.y,`
a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
`):R5({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m});var O="M ".concat(S.x,",").concat(S.y,`
A`).concat(l,",").concat(l,",0,0,").concat(+(y<0),",").concat(j.x,",").concat(j.y,`
A`).concat(o,",").concat(o,",0,").concat(+(C>180),",").concat(+(y<0),",").concat(A.x,",").concat(A.y,`
A`).concat(l,",").concat(l,",0,0,").concat(+(y<0),",").concat(_.x,",").concat(_.y,`
`);if(i>0){var E=Hd({cx:n,cy:r,radius:i,angle:h,sign:y,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),M=E.circleTangency,D=E.lineTangency,k=E.theta,B=Hd({cx:n,cy:r,radius:i,angle:m,sign:-y,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),q=B.circleTangency,$=B.lineTangency,F=B.theta,X=f?Math.abs(h-m):Math.abs(h-m)-k-F;if(X<0&&l===0)return"".concat(O,"L").concat(n,",").concat(r,"Z");O+="L".concat($.x,",").concat($.y,`
A`).concat(l,",").concat(l,",0,0,").concat(+(y<0),",").concat(q.x,",").concat(q.y,`
A`).concat(i,",").concat(i,",0,").concat(+(X>180),",").concat(+(y>0),",").concat(M.x,",").concat(M.y,`
A`).concat(l,",").concat(l,",0,0,").concat(+(y<0),",").concat(D.x,",").concat(D.y,"Z")}else O+="L".concat(n,",").concat(r,"Z");return O},kte={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},k5=function(t){var n=ik(ik({},kte),t),r=n.cx,i=n.cy,o=n.innerRadius,l=n.outerRadius,u=n.cornerRadius,f=n.forceCornerRadius,h=n.cornerIsExternal,m=n.startAngle,y=n.endAngle,g=n.className;if(l<o||m===y)return null;var j=Pe("recharts-sector",g),S=l-o,w=jn(u,S,0,!0),b;return w>0&&Math.abs(m-y)<360?b=Rte({cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:Math.min(w,S/2),forceCornerRadius:f,cornerIsExternal:h,startAngle:m,endAngle:y}):b=R5({cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:m,endAngle:y}),I.createElement("path",wj({},je(n,!0),{className:j,d:b,role:"img"}))};function Pu(e){"@babel/helpers - typeof";return Pu=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},Pu(e)}function Aj(){return Aj=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},Aj.apply(this,arguments)}function sk(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 ok(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sk(Object(n),!0).forEach(function(r){Dte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dte(e,t,n){return t=Lte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lte(e){var t=zte(e,"string");return Pu(t)=="symbol"?t:t+""}function zte(e,t){if(Pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lk={curveBasisClosed:rK,curveBasisOpen:aK,curveBasis:nK,curveBumpX:UF,curveBumpY:VF,curveLinearClosed:iK,curveLinear:Hp,curveMonotoneX:sK,curveMonotoneY:oK,curveNatural:lK,curveStep:cK,curveStepAfter:fK,curveStepBefore:uK},Gd=function(t){return t.x===+t.x&&t.y===+t.y},Lc=function(t){return t.x},zc=function(t){return t.y},$te=function(t,n){if(Te(t))return t;var r="curve".concat(Up(t));return(r==="curveMonotone"||r==="curveBump")&&n?lk["".concat(r).concat(n==="vertical"?"Y":"X")]:lk[r]||Hp},Bte=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,o=i===void 0?[]:i,l=t.baseLine,u=t.layout,f=t.connectNulls,h=f===void 0?!1:f,m=$te(r,u),y=h?o.filter(function(w){return Gd(w)}):o,g;if(Array.isArray(l)){var j=h?l.filter(function(w){return Gd(w)}):l,S=y.map(function(w,b){return ok(ok({},w),{},{base:j[b]})});return u==="vertical"?g=Ld().y(zc).x1(Lc).x0(function(w){return w.base.x}):g=Ld().x(Lc).y1(zc).y0(function(w){return w.base.y}),g.defined(Gd).curve(m),g(S)}return u==="vertical"&&ce(l)?g=Ld().y(zc).x1(Lc).x0(l):ce(l)?g=Ld().x(Lc).y1(zc).y0(l):g=RL().x(Lc).y(zc),g.defined(Gd).curve(m),g(y)},bs=function(t){var n=t.className,r=t.points,i=t.path,o=t.pathRef;if((!r||!r.length)&&!i)return null;var l=r&&r.length?Bte(t):i;return P.createElement("path",Aj({},je(t,!1),Ah(t),{className:Pe("recharts-curve",n),d:l,ref:o}))},N0={exports:{}},C0,ck;function Ite(){if(ck)return C0;ck=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return C0=e,C0}var M0,uk;function qte(){if(uk)return M0;uk=1;var e=Ite();function t(){}function n(){}return n.resetWarningCache=t,M0=function(){function r(l,u,f,h,m,y){if(y!==e){var g=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 g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},M0}var fk;function Ute(){return fk||(fk=1,N0.exports=qte()()),N0.exports}var Vte=Ute();const Je=at(Vte),{getOwnPropertyNames:Hte,getOwnPropertySymbols:Gte}=Object,{hasOwnProperty:Fte}=Object.prototype;function P0(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function Fd(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:o}=i,l=o.get(n),u=o.get(r);if(l&&u)return l===r&&u===n;o.set(n,r),o.set(r,n);const f=e(n,r,i);return o.delete(n),o.delete(r),f}}function Kte(e){return e!=null?e[Symbol.toStringTag]:void 0}function dk(e){return Hte(e).concat(Gte(e))}const Yte=Object.hasOwn||((e,t)=>Fte.call(e,t));function ks(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Xte="__v",Wte="__o",Zte="_owner",{getOwnPropertyDescriptor:hk,keys:pk}=Object;function Qte(e,t){return e.byteLength===t.byteLength&&ep(new Uint8Array(e),new Uint8Array(t))}function Jte(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 ene(e,t){return e.byteLength===t.byteLength&&ep(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function tne(e,t){return ks(e.getTime(),t.getTime())}function nne(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function rne(e,t){return e===t}function mk(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.entries();let l,u,f=0;for(;(l=o.next())&&!l.done;){const h=t.entries();let m=!1,y=0;for(;(u=h.next())&&!u.done;){if(i[y]){y++;continue}const g=l.value,j=u.value;if(n.equals(g[0],j[0],f,y,e,t,n)&&n.equals(g[1],j[1],g[0],j[0],e,t,n)){m=i[y]=!0;break}y++}if(!m)return!1;f++}return!0}const ane=ks;function ine(e,t,n){const r=pk(e);let i=r.length;if(pk(t).length!==i)return!1;for(;i-- >0;)if(!D5(e,t,n,r[i]))return!1;return!0}function $c(e,t,n){const r=dk(e);let i=r.length;if(dk(t).length!==i)return!1;let o,l,u;for(;i-- >0;)if(o=r[i],!D5(e,t,n,o)||(l=hk(e,o),u=hk(t,o),(l||u)&&(!l||!u||l.configurable!==u.configurable||l.enumerable!==u.enumerable||l.writable!==u.writable)))return!1;return!0}function sne(e,t){return ks(e.valueOf(),t.valueOf())}function one(e,t){return e.source===t.source&&e.flags===t.flags}function yk(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.values();let l,u;for(;(l=o.next())&&!l.done;){const f=t.values();let h=!1,m=0;for(;(u=f.next())&&!u.done;){if(!i[m]&&n.equals(l.value,u.value,l.value,u.value,e,t,n)){h=i[m]=!0;break}m++}if(!h)return!1}return!0}function ep(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 lne(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 D5(e,t,n,r){return(r===Zte||r===Wte||r===Xte)&&(e.$$typeof||t.$$typeof)?!0:Yte(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const cne="[object ArrayBuffer]",une="[object Arguments]",fne="[object Boolean]",dne="[object DataView]",hne="[object Date]",pne="[object Error]",mne="[object Map]",yne="[object Number]",vne="[object Object]",gne="[object RegExp]",xne="[object Set]",bne="[object String]",jne={"[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},Sne="[object URL]",wne=Object.prototype.toString;function Ane({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:m,areSetsEqual:y,areTypedArraysEqual:g,areUrlsEqual:j,unknownTagComparators:S}){return function(b,A,_){if(b===A)return!0;if(b==null||A==null)return!1;const T=typeof b;if(T!==typeof A)return!1;if(T!=="object")return T==="number"?u(b,A,_):T==="function"?o(b,A,_):!1;const C=b.constructor;if(C!==A.constructor)return!1;if(C===Object)return f(b,A,_);if(Array.isArray(b))return t(b,A,_);if(C===Date)return r(b,A,_);if(C===RegExp)return m(b,A,_);if(C===Map)return l(b,A,_);if(C===Set)return y(b,A,_);const O=wne.call(b);if(O===hne)return r(b,A,_);if(O===gne)return m(b,A,_);if(O===mne)return l(b,A,_);if(O===xne)return y(b,A,_);if(O===vne)return typeof b.then!="function"&&typeof A.then!="function"&&f(b,A,_);if(O===Sne)return j(b,A,_);if(O===pne)return i(b,A,_);if(O===une)return f(b,A,_);if(jne[O])return g(b,A,_);if(O===cne)return e(b,A,_);if(O===dne)return n(b,A,_);if(O===fne||O===yne||O===bne)return h(b,A,_);if(S){let E=S[O];if(!E){const M=Kte(b);M&&(E=S[M])}if(E)return E(b,A,_)}return!1}}function One({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Qte,areArraysEqual:n?$c:Jte,areDataViewsEqual:ene,areDatesEqual:tne,areErrorsEqual:nne,areFunctionsEqual:rne,areMapsEqual:n?P0(mk,$c):mk,areNumbersEqual:ane,areObjectsEqual:n?$c:ine,arePrimitiveWrappersEqual:sne,areRegExpsEqual:one,areSetsEqual:n?P0(yk,$c):yk,areTypedArraysEqual:n?P0(ep,$c):ep,areUrlsEqual:lne,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Fd(r.areArraysEqual),o=Fd(r.areMapsEqual),l=Fd(r.areObjectsEqual),u=Fd(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return r}function _ne(e){return function(t,n,r,i,o,l,u){return e(t,n,u)}}function Tne({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(u,f){const{cache:h=e?new WeakMap:void 0,meta:m}=n();return t(u,f,{cache:h,equals:r,meta:m,strict:i})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(u,f){return t(u,f,o)}}const Ene=Di();Di({strict:!0});Di({circular:!0});Di({circular:!0,strict:!0});Di({createInternalComparator:()=>ks});Di({strict:!0,createInternalComparator:()=>ks});Di({circular:!0,createInternalComparator:()=>ks});Di({circular:!0,createInternalComparator:()=>ks,strict:!0});function Di(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=One(e),l=Ane(o),u=n?n(l):_ne(l);return Tne({circular:t,comparator:l,createState:r,equals:u,strict:i})}function Nne(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function vk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):Nne(i)};requestAnimationFrame(r)}function Oj(e){"@babel/helpers - typeof";return Oj=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},Oj(e)}function Cne(e){return kne(e)||Rne(e)||Pne(e)||Mne()}function Mne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pne(e,t){if(e){if(typeof e=="string")return gk(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 gk(e,t)}}function gk(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 Rne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kne(e){if(Array.isArray(e))return e}function Dne(){var e={},t=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,u=Cne(l),f=u[0],h=u.slice(1);if(typeof f=="number"){vk(i.bind(null,h),f);return}i(f),vk(i.bind(null,h));return}Oj(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function Ru(e){"@babel/helpers - typeof";return Ru=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},Ru(e)}function xk(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 bk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xk(Object(n),!0).forEach(function(r){L5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L5(e,t,n){return t=Lne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lne(e){var t=zne(e,"string");return Ru(t)==="symbol"?t:String(t)}function zne(e,t){if(Ru(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ru(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $ne=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},Bne=function(t){return t},Ine=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},nu=function(t,n){return Object.keys(n).reduce(function(r,i){return bk(bk({},r),{},L5({},i,t(i,n[i])))},{})},jk=function(t,n,r){return t.map(function(i){return"".concat(Ine(i)," ").concat(n,"ms ").concat(r)}).join(",")};function qne(e,t){return Hne(e)||Vne(e,t)||z5(e,t)||Une()}function Une(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Hne(e){if(Array.isArray(e))return e}function Gne(e){return Yne(e)||Kne(e)||z5(e)||Fne()}function Fne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z5(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 Kne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yne(e){if(Array.isArray(e))return _j(e)}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}var tp=1e-4,$5=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},B5=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},Sk=function(t,n){return function(r){var i=$5(t,n);return B5(i,r)}},Xne=function(t,n){return function(r){var i=$5(t,n),o=[].concat(Gne(i.map(function(l,u){return l*u}).slice(1)),[0]);return B5(o,r)}},wk=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],l=n[2],u=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,l=1,u=1;break;case"ease":i=.25,o=.1,l=.25,u=1;break;case"ease-in":i=.42,o=0,l=1,u=1;break;case"ease-out":i=.42,o=0,l=.58,u=1;break;case"ease-in-out":i=0,o=0,l=.58,u=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var h=f[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),m=qne(h,4);i=m[0],o=m[1],l=m[2],u=m[3]}}}var y=Sk(i,l),g=Sk(o,u),j=Xne(i,l),S=function(A){return A>1?1:A<0?0:A},w=function(A){for(var _=A>1?1:A,T=_,C=0;C<8;++C){var O=y(T)-_,E=j(T);if(Math.abs(O-_)<tp||E<tp)return g(T);T=S(T-O/E)}return g(T)};return w.isStepper=!1,w},Wne=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,l=t.dt,u=l===void 0?17:l,f=function(m,y,g){var j=-(m-y)*r,S=g*o,w=g+(j-S)*u/1e3,b=g*u/1e3+m;return Math.abs(b-y)<tp&&Math.abs(w)<tp?[y,0]:[b,w]};return f.isStepper=!0,f.dt=u,f},Zne=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 wk(i);case"spring":return Wne();default:if(i.split("(")[0]==="cubic-bezier")return wk(i)}return typeof i=="function"?i:null};function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}function Ak(e){return ere(e)||Jne(e)||I5(e)||Qne()}function Qne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ere(e){if(Array.isArray(e))return Ej(e)}function Ok(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 ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ok(Object(n),!0).forEach(function(r){Tj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ok(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tj(e,t,n){return t=tre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tre(e){var t=nre(e,"string");return ku(t)==="symbol"?t:String(t)}function nre(e,t){if(ku(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ku(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rre(e,t){return sre(e)||ire(e,t)||I5(e,t)||are()}function are(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I5(e,t){if(e){if(typeof e=="string")return Ej(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 Ej(e,t)}}function Ej(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 ire(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function sre(e){if(Array.isArray(e))return e}var np=function(t,n,r){return t+(n-t)*r},Nj=function(t){var n=t.from,r=t.to;return n!==r},ore=function e(t,n,r){var i=nu(function(o,l){if(Nj(l)){var u=t(l.from,l.to,l.velocity),f=rre(u,2),h=f[0],m=f[1];return ln(ln({},l),{},{from:h,velocity:m})}return l},n);return r<1?nu(function(o,l){return Nj(l)?ln(ln({},l),{},{velocity:np(l.velocity,i[o].velocity,r),from:np(l.from,i[o].from,r)}):l},n):e(t,i,r-1)};const lre=(function(e,t,n,r,i){var o=$ne(e,t),l=o.reduce(function(b,A){return ln(ln({},b),{},Tj({},A,[e[A],t[A]]))},{}),u=o.reduce(function(b,A){return ln(ln({},b),{},Tj({},A,{from:e[A],velocity:0,to:t[A]}))},{}),f=-1,h,m,y=function(){return null},g=function(){return nu(function(A,_){return _.from},u)},j=function(){return!Object.values(u).filter(Nj).length},S=function(A){h||(h=A);var _=A-h,T=_/n.dt;u=ore(n,u,T),i(ln(ln(ln({},e),t),g())),h=A,j()||(f=requestAnimationFrame(y))},w=function(A){m||(m=A);var _=(A-m)/r,T=nu(function(O,E){return np.apply(void 0,Ak(E).concat([n(_)]))},l);if(i(ln(ln(ln({},e),t),T)),_<1)f=requestAnimationFrame(y);else{var C=nu(function(O,E){return np.apply(void 0,Ak(E).concat([n(1)]))},l);i(ln(ln(ln({},e),t),C))}};return y=n.isStepper?S:w,function(){return requestAnimationFrame(y),function(){cancelAnimationFrame(f)}}});function Jo(e){"@babel/helpers - typeof";return Jo=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},Jo(e)}var cre=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function ure(e,t){if(e==null)return{};var n=fre(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function R0(e){return mre(e)||pre(e)||hre(e)||dre()}function dre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hre(e,t){if(e){if(typeof e=="string")return Cj(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 Cj(e,t)}}function pre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mre(e){if(Array.isArray(e))return Cj(e)}function Cj(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 _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 Ar(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){Gc(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 Gc(e,t,n){return t=q5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vre(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,q5(r.key),r)}}function gre(e,t,n){return t&&vre(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q5(e){var t=xre(e,"string");return Jo(t)==="symbol"?t:String(t)}function xre(e,t){if(Jo(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bre(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&&Mj(e,t)}function Mj(e,t){return Mj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Mj(e,t)}function jre(e){var t=Sre();return function(){var r=rp(e),i;if(t){var o=rp(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Pj(this,i)}}function Pj(e,t){if(t&&(Jo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rj(e)}function Rj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sre(){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 rp(e){return rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rp(e)}var kr=(function(e){bre(n,e);var t=jre(n);function n(r,i){var o;yre(this,n),o=t.call(this,r,i);var l=o.props,u=l.isActive,f=l.attributeName,h=l.from,m=l.to,y=l.steps,g=l.children,j=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Rj(o)),o.changeStyle=o.changeStyle.bind(Rj(o)),!u||j<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:m}),Pj(o);if(y&&y.length)o.state={style:y[0].style};else if(h){if(typeof g=="function")return o.state={style:h},Pj(o);o.state={style:f?Gc({},f,h):h}}else o.state={style:{}};return o}return gre(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,l=i.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,l=o.isActive,u=o.canBegin,f=o.attributeName,h=o.shouldReAnimate,m=o.to,y=o.from,g=this.state.style;if(u){if(!l){var j={style:f?Gc({},f,m):m};this.state&&g&&(f&&g[f]!==m||!f&&g!==m)&&this.setState(j);return}if(!(Ene(i.to,m)&&i.canBegin&&i.isActive)){var S=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=S||h?y:i.to;if(this.state&&g){var b={style:f?Gc({},f,w):w};(f&&g[f]!==w||!f&&g!==w)&&this.setState(b)}this.runAnimation(Ar(Ar({},this.props),{},{from:w,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 o=this,l=i.from,u=i.to,f=i.duration,h=i.easing,m=i.begin,y=i.onAnimationEnd,g=i.onAnimationStart,j=lre(l,u,Zne(h),f,this.changeStyle),S=function(){o.stopJSAnimation=j()};this.manager.start([g,m,S,f,y])}},{key:"runStepAnimation",value:function(i){var o=this,l=i.steps,u=i.begin,f=i.onAnimationStart,h=l[0],m=h.style,y=h.duration,g=y===void 0?0:y,j=function(w,b,A){if(A===0)return w;var _=b.duration,T=b.easing,C=T===void 0?"ease":T,O=b.style,E=b.properties,M=b.onAnimationEnd,D=A>0?l[A-1]:b,k=E||Object.keys(O);if(typeof C=="function"||C==="spring")return[].concat(R0(w),[o.runJSAnimation.bind(o,{from:D.style,to:O,duration:_,easing:C}),_]);var B=jk(k,_,C),q=Ar(Ar(Ar({},D.style),O),{},{transition:B});return[].concat(R0(w),[q,_,M]).filter(Bne)};return this.manager.start([f].concat(R0(l.reduce(j,[m,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Dne());var o=i.begin,l=i.duration,u=i.attributeName,f=i.to,h=i.easing,m=i.onAnimationStart,y=i.onAnimationEnd,g=i.steps,j=i.children,S=this.manager;if(this.unSubscribe=S.subscribe(this.handleStyleChange),typeof h=="function"||typeof j=="function"||h==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var w=u?Gc({},u,f):f,b=jk(Object.keys(w),l,h);S.start([m,o,Ar(Ar({},w),{},{transition:b}),l,y])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var l=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=ure(i,cre),h=P.Children.count(o),m=this.state.style;if(typeof o=="function")return o(m);if(!u||h===0||l<=0)return o;var y=function(j){var S=j.props,w=S.style,b=w===void 0?{}:w,A=S.className,_=P.cloneElement(j,Ar(Ar({},f),{},{style:Ar(Ar({},b),m),className:A}));return _};return h===1?y(P.Children.only(o)):I.createElement("div",null,P.Children.map(o,function(g){return y(g)}))}}]),n})(P.PureComponent);kr.displayName="Animate";kr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};kr.propTypes={from:Je.oneOfType([Je.object,Je.string]),to:Je.oneOfType([Je.object,Je.string]),attributeName:Je.string,duration:Je.number,begin:Je.number,easing:Je.oneOfType([Je.string,Je.func]),steps:Je.arrayOf(Je.shape({duration:Je.number.isRequired,style:Je.object.isRequired,easing:Je.oneOfType([Je.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Je.func]),properties:Je.arrayOf("string"),onAnimationEnd:Je.func})),children:Je.oneOfType([Je.node,Je.func]),isActive:Je.bool,canBegin:Je.bool,onAnimationEnd:Je.func,shouldReAnimate:Je.bool,onAnimationStart:Je.func,onAnimationReStart:Je.func};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 ap(){return ap=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},ap.apply(this,arguments)}function wre(e,t){return Tre(e)||_re(e,t)||Ore(e,t)||Are()}function Are(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ore(e,t){if(e){if(typeof e=="string")return Tk(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 Tk(e,t)}}function Tk(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 _re(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Tre(e){if(Array.isArray(e))return e}function Ek(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 Nk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ek(Object(n),!0).forEach(function(r){Ere(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ek(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ere(e,t,n){return t=Nre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nre(e){var t=Cre(e,"string");return Du(t)=="symbol"?t:t+""}function Cre(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)}var Ck=function(t,n,r,i,o){var l=Math.min(Math.abs(r)/2,Math.abs(i)/2),u=i>=0?1:-1,f=r>=0?1:-1,h=i>=0&&r>=0||i<0&&r<0?1:0,m;if(l>0&&o instanceof Array){for(var y=[0,0,0,0],g=0,j=4;g<j;g++)y[g]=o[g]>l?l:o[g];m="M".concat(t,",").concat(n+u*y[0]),y[0]>0&&(m+="A ".concat(y[0],",").concat(y[0],",0,0,").concat(h,",").concat(t+f*y[0],",").concat(n)),m+="L ".concat(t+r-f*y[1],",").concat(n),y[1]>0&&(m+="A ".concat(y[1],",").concat(y[1],",0,0,").concat(h,`,
`).concat(t+r,",").concat(n+u*y[1])),m+="L ".concat(t+r,",").concat(n+i-u*y[2]),y[2]>0&&(m+="A ".concat(y[2],",").concat(y[2],",0,0,").concat(h,`,
`).concat(t+r-f*y[2],",").concat(n+i)),m+="L ".concat(t+f*y[3],",").concat(n+i),y[3]>0&&(m+="A ".concat(y[3],",").concat(y[3],",0,0,").concat(h,`,
`).concat(t,",").concat(n+i-u*y[3])),m+="Z"}else if(l>0&&o===+o&&o>0){var S=Math.min(l,o);m="M ".concat(t,",").concat(n+u*S,`
A `).concat(S,",").concat(S,",0,0,").concat(h,",").concat(t+f*S,",").concat(n,`
L `).concat(t+r-f*S,",").concat(n,`
A `).concat(S,",").concat(S,",0,0,").concat(h,",").concat(t+r,",").concat(n+u*S,`
L `).concat(t+r,",").concat(n+i-u*S,`
A `).concat(S,",").concat(S,",0,0,").concat(h,",").concat(t+r-f*S,",").concat(n+i,`
L `).concat(t+f*S,",").concat(n+i,`
A `).concat(S,",").concat(S,",0,0,").concat(h,",").concat(t,",").concat(n+i-u*S," Z")}else m="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return m},Mre=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,l=n.y,u=n.width,f=n.height;if(Math.abs(u)>0&&Math.abs(f)>0){var h=Math.min(o,o+u),m=Math.max(o,o+u),y=Math.min(l,l+f),g=Math.max(l,l+f);return r>=h&&r<=m&&i>=y&&i<=g}return!1},Pre={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Qw=function(t){var n=Nk(Nk({},Pre),t),r=P.useRef(),i=P.useState(-1),o=wre(i,2),l=o[0],u=o[1];P.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&u(C)}catch{}},[]);var f=n.x,h=n.y,m=n.width,y=n.height,g=n.radius,j=n.className,S=n.animationEasing,w=n.animationDuration,b=n.animationBegin,A=n.isAnimationActive,_=n.isUpdateAnimationActive;if(f!==+f||h!==+h||m!==+m||y!==+y||m===0||y===0)return null;var T=Pe("recharts-rectangle",j);return _?I.createElement(kr,{canBegin:l>0,from:{width:m,height:y,x:f,y:h},to:{width:m,height:y,x:f,y:h},duration:w,animationEasing:S,isActive:_},function(C){var O=C.width,E=C.height,M=C.x,D=C.y;return I.createElement(kr,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:w,isActive:A,easing:S},I.createElement("path",ap({},je(n,!0),{className:T,d:Ck(M,D,O,E,g),ref:r})))}):I.createElement("path",ap({},je(n,!0),{className:T,d:Ck(f,h,m,y,g)}))},Rre=["points","className","baseLinePoints","connectNulls"];function Mo(){return Mo=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},Mo.apply(this,arguments)}function kre(e,t){if(e==null)return{};var n=Dre(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dre(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 Mk(e){return Bre(e)||$re(e)||zre(e)||Lre()}function Lre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zre(e,t){if(e){if(typeof e=="string")return kj(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 kj(e,t)}}function $re(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bre(e){if(Array.isArray(e))return kj(e)}function kj(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 Pk=function(t){return t&&t.x===+t.x&&t.y===+t.y},Ire=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Pk(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Pk(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},ru=function(t,n){var r=Ire(t);n&&(r=[r.reduce(function(o,l){return[].concat(Mk(o),Mk(l))},[])]);var i=r.map(function(o){return o.reduce(function(l,u,f){return"".concat(l).concat(f===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},qre=function(t,n,r){var i=ru(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(ru(n.reverse(),r).slice(1))},Ure=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,l=kre(t,Rre);if(!n||!n.length)return null;var u=Pe("recharts-polygon",r);if(i&&i.length){var f=l.stroke&&l.stroke!=="none",h=qre(n,i,o);return I.createElement("g",{className:u},I.createElement("path",Mo({},je(l,!0),{fill:h.slice(-1)==="Z"?l.fill:"none",stroke:"none",d:h})),f?I.createElement("path",Mo({},je(l,!0),{fill:"none",d:ru(n,o)})):null,f?I.createElement("path",Mo({},je(l,!0),{fill:"none",d:ru(i,o)})):null)}var m=ru(n,o);return I.createElement("path",Mo({},je(l,!0),{fill:m.slice(-1)==="Z"?l.fill:"none",className:u,d:m}))};function Dj(){return Dj=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},Dj.apply(this,arguments)}var lf=function(t){var n=t.cx,r=t.cy,i=t.r,o=t.className,l=Pe("recharts-dot",o);return n===+n&&r===+r&&i===+i?P.createElement("circle",Dj({},je(t,!1),Ah(t),{className:l,cx:n,cy:r,r:i})):null};function Lu(e){"@babel/helpers - typeof";return Lu=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},Lu(e)}var Vre=["x","y","top","left","width","height","className"];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 Rk(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 Hre(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rk(Object(n),!0).forEach(function(r){Gre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gre(e,t,n){return t=Fre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fre(e){var t=Kre(e,"string");return Lu(t)=="symbol"?t:t+""}function Kre(e,t){if(Lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yre(e,t){if(e==null)return{};var n=Xre(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xre(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 Wre=function(t,n,r,i,o,l){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(l,",").concat(n,"h").concat(r)},Zre=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.top,u=l===void 0?0:l,f=t.left,h=f===void 0?0:f,m=t.width,y=m===void 0?0:m,g=t.height,j=g===void 0?0:g,S=t.className,w=Yre(t,Vre),b=Hre({x:r,y:o,top:u,left:h,width:y,height:j},w);return!ce(r)||!ce(o)||!ce(y)||!ce(j)||!ce(u)||!ce(h)?null:I.createElement("path",Lj({},je(b,!0),{className:Pe("recharts-cross",S),d:Wre(r,o,y,j,u,h)}))},k0,kk;function Qre(){if(kk)return k0;kk=1;var e=nm(),t=n5(),n=ta();function r(i,o){return i&&i.length?e(i,n(o,2),t):void 0}return k0=r,k0}var Jre=Qre();const eae=at(Jre);var D0,Dk;function tae(){if(Dk)return D0;Dk=1;var e=nm(),t=ta(),n=r5();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return D0=r,D0}var nae=tae();const rae=at(nae);var aae=["cx","cy","angle","ticks","axisLine"],iae=["ticks","tick","angle","tickFormatter","stroke"];function el(e){"@babel/helpers - typeof";return el=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},el(e)}function au(){return au=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},au.apply(this,arguments)}function Lk(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 ns(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(n),!0).forEach(function(r){sm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zk(e,t){if(e==null)return{};var n=sae(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sae(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 oae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $k(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,V5(r.key),r)}}function lae(e,t,n){return t&&$k(e.prototype,t),n&&$k(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cae(e,t,n){return t=ip(t),uae(e,U5()?Reflect.construct(t,n||[],ip(e).constructor):t.apply(e,n))}function uae(e,t){if(t&&(el(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fae(e)}function fae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U5=function(){return!!e})()}function ip(e){return ip=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ip(e)}function dae(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 sm(e,t,n){return t=V5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V5(e){var t=hae(e,"string");return el(t)=="symbol"?t:t+""}function hae(e,t){if(el(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(el(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var om=(function(e){function t(){return oae(this,t),cae(this,t,arguments)}return dae(t,e),lae(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,o=this.props,l=o.angle,u=o.cx,f=o.cy;return mt(u,f,i,l)}},{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,o=r.cy,l=r.angle,u=r.ticks,f=eae(u,function(m){return m.coordinate||0}),h=rae(u,function(m){return m.coordinate||0});return{cx:i,cy:o,startAngle:l,endAngle:l,innerRadius:h.coordinate||0,outerRadius:f.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,l=r.angle,u=r.ticks,f=r.axisLine,h=zk(r,aae),m=u.reduce(function(S,w){return[Math.min(S[0],w.coordinate),Math.max(S[1],w.coordinate)]},[1/0,-1/0]),y=mt(i,o,m[0],l),g=mt(i,o,m[1],l),j=ns(ns(ns({},je(h,!1)),{},{fill:"none"},je(f,!1)),{},{x1:y.x,y1:y.y,x2:g.x,y2:g.y});return I.createElement("line",au({className:"recharts-polar-radius-axis-line"},j))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,l=i.tick,u=i.angle,f=i.tickFormatter,h=i.stroke,m=zk(i,iae),y=this.getTickTextAnchor(),g=je(m,!1),j=je(l,!1),S=o.map(function(w,b){var A=r.getTickValueCoord(w),_=ns(ns(ns(ns({textAnchor:y,transform:"rotate(".concat(90-u,", ").concat(A.x,", ").concat(A.y,")")},g),{},{stroke:"none",fill:h},j),{},{index:b},A),{},{payload:w});return I.createElement(Ie,au({className:Pe("recharts-polar-radius-axis-tick",M5(l)),key:"tick-".concat(w.coordinate)},ws(r.props,w,b)),t.renderTickItem(l,_,f?f(w.value,b):w.value))});return I.createElement(Ie,{className:"recharts-polar-radius-axis-ticks"},S)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.axisLine,l=r.tick;return!i||!i.length?null:I.createElement(Ie,{className:Pe("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),l&&this.renderTicks(),Jt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,o){var l;return I.isValidElement(r)?l=I.cloneElement(r,i):Te(r)?l=r(i):l=I.createElement(As,au({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),l}}])})(P.PureComponent);sm(om,"displayName","PolarRadiusAxis");sm(om,"axisType","radiusAxis");sm(om,"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 tl(e){"@babel/helpers - typeof";return tl=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},tl(e)}function ls(){return ls=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},ls.apply(this,arguments)}function Bk(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 rs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bk(Object(n),!0).forEach(function(r){lm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ik(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,G5(r.key),r)}}function mae(e,t,n){return t&&Ik(e.prototype,t),n&&Ik(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yae(e,t,n){return t=sp(t),vae(e,H5()?Reflect.construct(t,n||[],sp(e).constructor):t.apply(e,n))}function vae(e,t){if(t&&(tl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gae(e)}function gae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H5=function(){return!!e})()}function sp(e){return sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sp(e)}function xae(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 lm(e,t,n){return t=G5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G5(e){var t=bae(e,"string");return tl(t)=="symbol"?t:t+""}function bae(e,t){if(tl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jae=Math.PI/180,qk=1e-5,cm=(function(e){function t(){return pae(this,t),yae(this,t,arguments)}return xae(t,e),mae(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.cx,l=i.cy,u=i.radius,f=i.orientation,h=i.tickSize,m=h||8,y=mt(o,l,u,r.coordinate),g=mt(o,l,u+(f==="inner"?-1:1)*m,r.coordinate);return{x1:y.x,y1:y.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,o=Math.cos(-r.coordinate*jae),l;return o>qk?l=i==="outer"?"start":"end":o<-qk?l=i==="outer"?"end":"start":l="middle",l}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,l=r.radius,u=r.axisLine,f=r.axisLineType,h=rs(rs({},je(this.props,!1)),{},{fill:"none"},je(u,!1));if(f==="circle")return I.createElement(lf,ls({className:"recharts-polar-angle-axis-line"},h,{cx:i,cy:o,r:l}));var m=this.props.ticks,y=m.map(function(g){return mt(i,o,l,g.coordinate)});return I.createElement(Ure,ls({className:"recharts-polar-angle-axis-line"},h,{points:y}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,l=i.tick,u=i.tickLine,f=i.tickFormatter,h=i.stroke,m=je(this.props,!1),y=je(l,!1),g=rs(rs({},m),{},{fill:"none"},je(u,!1)),j=o.map(function(S,w){var b=r.getTickLineCoord(S),A=r.getTickTextAnchor(S),_=rs(rs(rs({textAnchor:A},m),{},{stroke:"none",fill:h},y),{},{index:w,payload:S,x:b.x2,y:b.y2});return I.createElement(Ie,ls({className:Pe("recharts-polar-angle-axis-tick",M5(l)),key:"tick-".concat(S.coordinate)},ws(r.props,S,w)),u&&I.createElement("line",ls({className:"recharts-polar-angle-axis-tick-line"},g,b)),l&&t.renderTickItem(l,_,f?f(S.value,w):S.value))});return I.createElement(Ie,{className:"recharts-polar-angle-axis-ticks"},j)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,l=r.axisLine;return o<=0||!i||!i.length?null:I.createElement(Ie,{className:Pe("recharts-polar-angle-axis",this.props.className)},l&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var l;return I.isValidElement(r)?l=I.cloneElement(r,i):Te(r)?l=r(i):l=I.createElement(As,ls({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),l}}])})(P.PureComponent);lm(cm,"displayName","PolarAngleAxis");lm(cm,"axisType","angleAxis");lm(cm,"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 L0,Uk;function Sae(){if(Uk)return L0;Uk=1;var e=nz(),t=e(Object.getPrototypeOf,Object);return L0=t,L0}var z0,Vk;function wae(){if(Vk)return z0;Vk=1;var e=za(),t=Sae(),n=$a(),r="[object Object]",i=Function.prototype,o=Object.prototype,l=i.toString,u=o.hasOwnProperty,f=l.call(Object);function h(m){if(!n(m)||e(m)!=r)return!1;var y=t(m);if(y===null)return!0;var g=u.call(y,"constructor")&&y.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return z0=h,z0}var Aae=wae();const Oae=at(Aae);var $0,Hk;function _ae(){if(Hk)return $0;Hk=1;var e=za(),t=$a(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return $0=r,$0}var Tae=_ae();const Eae=at(Tae);function zu(e){"@babel/helpers - typeof";return zu=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},zu(e)}function op(){return op=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},op.apply(this,arguments)}function Nae(e,t){return Rae(e)||Pae(e,t)||Mae(e,t)||Cae()}function Cae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mae(e,t){if(e){if(typeof e=="string")return Gk(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 Gk(e,t)}}function Gk(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 Pae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Rae(e){if(Array.isArray(e))return e}function Fk(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 Kk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(n),!0).forEach(function(r){kae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kae(e,t,n){return t=Dae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dae(e){var t=Lae(e,"string");return zu(t)=="symbol"?t:t+""}function Lae(e,t){if(zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yk=function(t,n,r,i,o){var l=r-i,u;return u="M ".concat(t,",").concat(n),u+="L ".concat(t+r,",").concat(n),u+="L ".concat(t+r-l/2,",").concat(n+o),u+="L ".concat(t+r-l/2-i,",").concat(n+o),u+="L ".concat(t,",").concat(n," Z"),u},zae={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$ae=function(t){var n=Kk(Kk({},zae),t),r=P.useRef(),i=P.useState(-1),o=Nae(i,2),l=o[0],u=o[1];P.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var T=r.current.getTotalLength();T&&u(T)}catch{}},[]);var f=n.x,h=n.y,m=n.upperWidth,y=n.lowerWidth,g=n.height,j=n.className,S=n.animationEasing,w=n.animationDuration,b=n.animationBegin,A=n.isUpdateAnimationActive;if(f!==+f||h!==+h||m!==+m||y!==+y||g!==+g||m===0&&y===0||g===0)return null;var _=Pe("recharts-trapezoid",j);return A?I.createElement(kr,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:f,y:h},to:{upperWidth:m,lowerWidth:y,height:g,x:f,y:h},duration:w,animationEasing:S,isActive:A},function(T){var C=T.upperWidth,O=T.lowerWidth,E=T.height,M=T.x,D=T.y;return I.createElement(kr,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:w,easing:S},I.createElement("path",op({},je(n,!0),{className:_,d:Yk(M,D,C,O,E),ref:r})))}):I.createElement("g",null,I.createElement("path",op({},je(n,!0),{className:_,d:Yk(f,h,m,y,g)})))},Bae=["option","shapeType","propTransformer","activeClassName","isActive"];function $u(e){"@babel/helpers - typeof";return $u=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},$u(e)}function Iae(e,t){if(e==null)return{};var n=qae(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qae(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 Xk(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 lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xk(Object(n),!0).forEach(function(r){Uae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uae(e,t,n){return t=Vae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vae(e){var t=Hae(e,"string");return $u(t)=="symbol"?t:t+""}function Hae(e,t){if($u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gae(e,t){return lp(lp({},t),e)}function Fae(e,t){return e==="symbols"}function Wk(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return I.createElement(Qw,n);case"trapezoid":return I.createElement($ae,n);case"sector":return I.createElement(k5,n);case"symbols":if(Fae(t))return I.createElement(vw,n);break;default:return null}}function Kae(e){return P.isValidElement(e)?e.props:e}function F5(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Gae:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,u=e.isActive,f=Iae(e,Bae),h;if(P.isValidElement(t))h=P.cloneElement(t,lp(lp({},f),Kae(t)));else if(Te(t))h=t(f);else if(Oae(t)&&!Eae(t)){var m=i(t,f);h=I.createElement(Wk,{shapeType:n,elementProps:m})}else{var y=f;h=I.createElement(Wk,{shapeType:n,elementProps:y})}return u?I.createElement(Ie,{className:l},h):h}function um(e,t){return t!=null&&"trapezoids"in e.props}function fm(e,t){return t!=null&&"sectors"in e.props}function Bu(e,t){return t!=null&&"points"in e.props}function Yae(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,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&o}function Xae(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Wae(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Zae(e,t){var n;return um(e,t)?n=Yae:fm(e,t)?n=Xae:Bu(e,t)&&(n=Wae),n}function Qae(e,t){var n;return um(e,t)?n="trapezoids":fm(e,t)?n="sectors":Bu(e,t)&&(n="points"),n}function Jae(e,t){if(um(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(fm(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 Bu(e,t)?t.payload:{}}function eie(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Qae(n,t),o=Jae(n,t),l=r.filter(function(f,h){var m=Os(o,f),y=n.props[i].filter(function(S){var w=Zae(n,t);return w(S,t)}),g=n.props[i].indexOf(y[y.length-1]),j=h===g;return m&&j}),u=r.indexOf(l[l.length-1]);return u}var ch;function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function Po(){return Po=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},Po.apply(this,arguments)}function Zk(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 ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zk(Object(n),!0).forEach(function(r){fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qk(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,Y5(r.key),r)}}function nie(e,t,n){return t&&Qk(e.prototype,t),n&&Qk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rie(e,t,n){return t=cp(t),aie(e,K5()?Reflect.construct(t,n||[],cp(e).constructor):t.apply(e,n))}function aie(e,t){if(t&&(nl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iie(e)}function iie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K5=function(){return!!e})()}function cp(e){return cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cp(e)}function sie(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&&Bj(e,t)}function Bj(e,t){return Bj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bj(e,t)}function fr(e,t,n){return t=Y5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y5(e){var t=oie(e,"string");return nl(t)=="symbol"?t:t+""}function oie(e,t){if(nl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ia=(function(e){function t(n){var r;return tie(this,t),r=rie(this,t,[n]),fr(r,"pieRef",null),fr(r,"sectorRefs",[]),fr(r,"id",Ms("recharts-pie-")),fr(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Te(i)&&i()}),fr(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Te(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return sie(t,e),nie(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 o=this.props,l=o.label,u=o.labelLine,f=o.dataKey,h=o.valueKey,m=je(this.props,!1),y=je(l,!1),g=je(u,!1),j=l&&l.offsetRadius||20,S=r.map(function(w,b){var A=(w.startAngle+w.endAngle)/2,_=mt(w.cx,w.cy,w.outerRadius+j,A),T=ht(ht(ht(ht({},m),w),{},{stroke:"none"},y),{},{index:b,textAnchor:t.getTextAnchor(_.x,w.cx)},_),C=ht(ht(ht(ht({},m),w),{},{fill:"none",stroke:w.fill},g),{},{index:b,points:[mt(w.cx,w.cy,w.outerRadius,A),_]}),O=f;return Ne(f)&&Ne(h)?O="value":Ne(f)&&(O=h),I.createElement(Ie,{key:"label-".concat(w.startAngle,"-").concat(w.endAngle,"-").concat(w.midAngle,"-").concat(b)},u&&t.renderLabelLineItem(u,C,"line"),t.renderLabelItem(l,T,kt(w,O)))});return I.createElement(Ie,{className:"recharts-pie-labels"},S)}},{key:"renderSectorsStatically",value:function(r){var i=this,o=this.props,l=o.activeShape,u=o.blendStroke,f=o.inactiveShape;return r.map(function(h,m){if((h==null?void 0:h.startAngle)===0&&(h==null?void 0:h.endAngle)===0&&r.length!==1)return null;var y=i.isActiveIndex(m),g=f&&i.hasActiveIndex()?f:null,j=y?l:g,S=ht(ht({},h),{},{stroke:u?h.fill:h.stroke,tabIndex:-1});return I.createElement(Ie,Po({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},ws(i.props,h,m),{key:"sector-".concat(h==null?void 0:h.startAngle,"-").concat(h==null?void 0:h.endAngle,"-").concat(h.midAngle,"-").concat(m)}),I.createElement(F5,Po({option:j,isActive:y,shapeType:"sector"},S)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,o=i.sectors,l=i.isAnimationActive,u=i.animationBegin,f=i.animationDuration,h=i.animationEasing,m=i.animationId,y=this.state,g=y.prevSectors,j=y.prevIsAnimationActive;return I.createElement(kr,{begin:u,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"pie-".concat(m,"-").concat(j),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(S){var w=S.t,b=[],A=o&&o[0],_=A.startAngle;return o.forEach(function(T,C){var O=g&&g[C],E=C>0?Xn(T,"paddingAngle",0):0;if(O){var M=Ft(O.endAngle-O.startAngle,T.endAngle-T.startAngle),D=ht(ht({},T),{},{startAngle:_+E,endAngle:_+M(w)+E});b.push(D),_=D.endAngle}else{var k=T.endAngle,B=T.startAngle,q=Ft(0,k-B),$=q(w),F=ht(ht({},T),{},{startAngle:_+E,endAngle:_+$+E});b.push(F),_=F.endAngle}}),I.createElement(Ie,null,r.renderSectorsStatically(b))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var l=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});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,o=r.isAnimationActive,l=this.state.prevSectors;return o&&i&&i.length&&(!l||!Os(l,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,o=i.hide,l=i.sectors,u=i.className,f=i.label,h=i.cx,m=i.cy,y=i.innerRadius,g=i.outerRadius,j=i.isAnimationActive,S=this.state.isAnimationFinished;if(o||!l||!l.length||!ce(h)||!ce(m)||!ce(y)||!ce(g))return null;var w=Pe("recharts-pie",u);return I.createElement(Ie,{tabIndex:this.props.rootTabIndex,className:w,ref:function(A){r.pieRef=A}},this.renderSectors(),f&&this.renderLabels(l),Jt.renderCallByParent(this.props,null,!1),(!j||S)&&Xr.renderCallByParent(this.props,l,!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,o){if(I.isValidElement(r))return I.cloneElement(r,i);if(Te(r))return r(i);var l=Pe("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return I.createElement(bs,Po({},i,{key:o,type:"linear",className:l}))}},{key:"renderLabelItem",value:function(r,i,o){if(I.isValidElement(r))return I.cloneElement(r,i);var l=o;if(Te(r)&&(l=r(i),I.isValidElement(l)))return l;var u=Pe("recharts-pie-label-text",typeof r!="boolean"&&!Te(r)?r.className:"");return I.createElement(As,Po({},i,{alignmentBaseline:"middle",className:u}),l)}}])})(P.PureComponent);ch=Ia;fr(Ia,"displayName","Pie");fr(Ia,"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:!Pi.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});fr(Ia,"parseDeltaAngle",function(e,t){var n=bn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});fr(Ia,"getRealPieData",function(e){var t=e.data,n=e.children,r=je(e,!1),i=Wn(n,Xp);return t&&t.length?t.map(function(o,l){return ht(ht(ht({payload:o},r),o),i&&i[l]&&i[l].props)}):i&&i.length?i.map(function(o){return ht(ht({},r),o.props)}):[]});fr(Ia,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,o=t.height,l=C5(i,o),u=r+jn(e.cx,i,i/2),f=n+jn(e.cy,o,o/2),h=jn(e.innerRadius,l,0),m=jn(e.outerRadius,l,l*.8),y=e.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:u,cy:f,innerRadius:h,outerRadius:m,maxRadius:y}});fr(Ia,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?ht(ht({},t.type.defaultProps),t.props):t.props,i=ch.getRealPieData(r);if(!i||!i.length)return null;var o=r.cornerRadius,l=r.startAngle,u=r.endAngle,f=r.paddingAngle,h=r.dataKey,m=r.nameKey,y=r.valueKey,g=r.tooltipType,j=Math.abs(r.minAngle),S=ch.parseCoordinateOfPie(r,n),w=ch.parseDeltaAngle(l,u),b=Math.abs(w),A=h;Ne(h)&&Ne(y)?(Pr(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),A="value"):Ne(h)&&(Pr(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),A=y);var _=i.filter(function(D){return kt(D,A,0)!==0}).length,T=(b>=360?_:_-1)*f,C=b-_*j-T,O=i.reduce(function(D,k){var B=kt(k,A,0);return D+(ce(B)?B:0)},0),E;if(O>0){var M;E=i.map(function(D,k){var B=kt(D,A,0),q=kt(D,m,k),$=(ce(B)?B:0)/O,F;k?F=M.endAngle+bn(w)*f*(B!==0?1:0):F=l;var X=F+bn(w)*((B!==0?j:0)+$*C),Y=(F+X)/2,L=(S.innerRadius+S.outerRadius)/2,H=[{name:q,value:B,payload:D,dataKey:A,type:g}],Q=mt(S.cx,S.cy,L,Y);return M=ht(ht(ht({percent:$,cornerRadius:o,name:q,tooltipPayload:H,midAngle:Y,middleRadius:L,tooltipPosition:Q},D),S),{},{value:kt(D,A),startAngle:F,endAngle:X,payload:D,paddingAngle:bn(w)*f}),M})}return ht(ht({},S),{},{sectors:E,data:i})});var B0,Jk;function lie(){if(Jk)return B0;Jk=1;var e=Math.ceil,t=Math.max;function n(r,i,o,l){for(var u=-1,f=t(e((i-r)/(o||1)),0),h=Array(f);f--;)h[l?f:++u]=r,r+=o;return h}return B0=n,B0}var I0,eD;function X5(){if(eD)return I0;eD=1;var e=gz(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return I0=r,I0}var q0,tD;function cie(){if(tD)return q0;tD=1;var e=lie(),t=Yp(),n=X5();function r(i){return function(o,l,u){return u&&typeof u!="number"&&t(o,l,u)&&(l=u=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),u=u===void 0?o<l?1:-1:n(u),e(o,l,u,i)}}return q0=r,q0}var U0,nD;function uie(){if(nD)return U0;nD=1;var e=cie(),t=e();return U0=t,U0}var fie=uie();const up=at(fie);function Iu(e){"@babel/helpers - typeof";return Iu=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},Iu(e)}function rD(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 aD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rD(Object(n),!0).forEach(function(r){W5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W5(e,t,n){return t=die(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function die(e){var t=hie(e,"string");return Iu(t)=="symbol"?t:t+""}function hie(e,t){if(Iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pie=["Webkit","Moz","O","ms"],mie=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=pie.reduce(function(o,l){return aD(aD({},o),{},W5({},l+r,n))},{});return i[t]=n,i};function rl(e){"@babel/helpers - typeof";return rl=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},rl(e)}function fp(){return fp=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},fp.apply(this,arguments)}function iD(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 V0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iD(Object(n),!0).forEach(function(r){Hn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sD(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,Q5(r.key),r)}}function vie(e,t,n){return t&&sD(e.prototype,t),n&&sD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gie(e,t,n){return t=dp(t),xie(e,Z5()?Reflect.construct(t,n||[],dp(e).constructor):t.apply(e,n))}function xie(e,t){if(t&&(rl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bie(e)}function bie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z5=function(){return!!e})()}function dp(e){return dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dp(e)}function jie(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 Hn(e,t,n){return t=Q5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q5(e){var t=Sie(e,"string");return rl(t)=="symbol"?t:t+""}function Sie(e,t){if(rl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wie=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,o=t.x,l=t.width,u=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,h=eu().domain(up(0,f)).range([o,o+l-u]),m=h.domain().map(function(y){return h(y)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:h(r),endX:h(i),scale:h,scaleValues:m}},oD=function(t){return t.changedTouches&&!!t.changedTouches.length},al=(function(e){function t(n){var r;return yie(this,t),r=gie(this,t,[n]),Hn(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Hn(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Hn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,l=i.onDragEnd,u=i.startIndex;l==null||l({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),Hn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Hn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Hn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Hn(r,"handleSlideDragStart",function(i){var o=oD(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return jie(t,e),vie(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,l=this.state.scaleValues,u=this.props,f=u.gap,h=u.data,m=h.length-1,y=Math.min(i,o),g=Math.max(i,o),j=t.getIndexInRange(l,y),S=t.getIndexInRange(l,g);return{startIndex:j-j%f,endIndex:S===m?m:S-S%f}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,l=i.tickFormatter,u=i.dataKey,f=kt(o[r],u,r);return Te(l)?l(f,r):f}},{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,o=i.slideMoveStartX,l=i.startX,u=i.endX,f=this.props,h=f.x,m=f.width,y=f.travellerWidth,g=f.startIndex,j=f.endIndex,S=f.onChange,w=r.pageX-o;w>0?w=Math.min(w,h+m-y-u,h+m-y-l):w<0&&(w=Math.max(w,h-l,h-u));var b=this.getIndex({startX:l+w,endX:u+w});(b.startIndex!==g||b.endIndex!==j)&&S&&S(b),this.setState({startX:l+w,endX:u+w,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=oD(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,l=i.movingTravellerId,u=i.endX,f=i.startX,h=this.state[l],m=this.props,y=m.x,g=m.width,j=m.travellerWidth,S=m.onChange,w=m.gap,b=m.data,A={startX:this.state.startX,endX:this.state.endX},_=r.pageX-o;_>0?_=Math.min(_,y+g-j-h):_<0&&(_=Math.max(_,y-h)),A[l]=h+_;var T=this.getIndex(A),C=T.startIndex,O=T.endIndex,E=function(){var D=b.length-1;return l==="startX"&&(u>f?C%w===0:O%w===0)||u<f&&O===D||l==="endX"&&(u>f?O%w===0:C%w===0)||u>f&&O===D};this.setState(Hn(Hn({},l,h+_),"brushMoveStartX",r.pageX),function(){S&&E()&&S(T)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,l=this.state,u=l.scaleValues,f=l.startX,h=l.endX,m=this.state[i],y=u.indexOf(m);if(y!==-1){var g=y+r;if(!(g===-1||g>=u.length)){var j=u[g];i==="startX"&&j>=h||i==="endX"&&j<=f||this.setState(Hn({},i,j),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,f=r.fill,h=r.stroke;return I.createElement("rect",{stroke:h,fill:f,x:i,y:o,width:l,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,f=r.data,h=r.children,m=r.padding,y=P.Children.only(h);return y?I.cloneElement(y,{x:i,y:o,width:l,height:u,margin:m,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,l,u=this,f=this.props,h=f.y,m=f.travellerWidth,y=f.height,g=f.traveller,j=f.ariaLabel,S=f.data,w=f.startIndex,b=f.endIndex,A=Math.max(r,this.props.x),_=V0(V0({},je(this.props,!1)),{},{x:A,y:h,width:m,height:y}),T=j||"Min value: ".concat((o=S[w])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=S[b])===null||l===void 0?void 0:l.name);return I.createElement(Ie,{tabIndex:0,role:"slider","aria-label":T,"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(),u.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,_))}},{key:"renderSlide",value:function(r,i){var o=this.props,l=o.y,u=o.height,f=o.stroke,h=o.travellerWidth,m=Math.min(r,i)+h,y=Math.max(Math.abs(i-r)-h,0);return I.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:m,y:l,width:y,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,l=r.y,u=r.height,f=r.travellerWidth,h=r.stroke,m=this.state,y=m.startX,g=m.endX,j=5,S={pointerEvents:"none",fill:h};return I.createElement(Ie,{className:"recharts-brush-texts"},I.createElement(As,fp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(y,g)-j,y:l+u/2},S),this.getTextOfTick(i)),I.createElement(As,fp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(y,g)+f+j,y:l+u/2},S),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,l=r.children,u=r.x,f=r.y,h=r.width,m=r.height,y=r.alwaysShowText,g=this.state,j=g.startX,S=g.endX,w=g.isTextActive,b=g.isSlideMoving,A=g.isTravellerMoving,_=g.isTravellerFocused;if(!i||!i.length||!ce(u)||!ce(f)||!ce(h)||!ce(m)||h<=0||m<=0)return null;var T=Pe("recharts-brush",o),C=I.Children.count(l)===1,O=mie("userSelect","none");return I.createElement(Ie,{className:T,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(j,S),this.renderTravellerLayer(j,"startX"),this.renderTravellerLayer(S,"endX"),(w||b||A||_||y)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,l=r.width,u=r.height,f=r.stroke,h=Math.floor(o+u/2)-1;return I.createElement(I.Fragment,null,I.createElement("rect",{x:i,y:o,width:l,height:u,fill:f,stroke:"none"}),I.createElement("line",{x1:i+1,y1:h,x2:i+l-1,y2:h,fill:"none",stroke:"#fff"}),I.createElement("line",{x1:i+1,y1:h+2,x2:i+l-1,y2:h+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return I.isValidElement(r)?o=I.cloneElement(r,i):Te(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,l=r.width,u=r.x,f=r.travellerWidth,h=r.updateId,m=r.startIndex,y=r.endIndex;if(o!==i.prevData||h!==i.prevUpdateId)return V0({prevData:o,prevTravellerWidth:f,prevUpdateId:h,prevX:u,prevWidth:l},o&&o.length?wie({data:o,width:l,x:u,travellerWidth:f,startIndex:m,endIndex:y}):{scale:null,scaleValues:null});if(i.scale&&(l!==i.prevWidth||u!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([u,u+l-f]);var g=i.scale.domain().map(function(j){return i.scale(j)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:h,prevX:u,prevWidth:l,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,l=0,u=o-1;u-l>1;){var f=Math.floor((l+u)/2);r[f]>i?u=f:l=f}return i>=r[u]?u:l}}])})(P.PureComponent);Hn(al,"displayName","Brush");Hn(al,"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 H0,lD;function Aie(){if(lD)return H0;lD=1;var e=Aw();function t(n,r){var i;return e(n,function(o,l,u){return i=r(o,l,u),!i}),!!i}return H0=t,H0}var G0,cD;function Oie(){if(cD)return G0;cD=1;var e=XL(),t=ta(),n=Aie(),r=Rn(),i=Yp();function o(l,u,f){var h=r(l)?e:n;return f&&i(l,u,f)&&(u=void 0),h(l,t(u,3))}return G0=o,G0}var _ie=Oie();const Tie=at(_ie);var Wr=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},F0,uD;function Eie(){if(uD)return F0;uD=1;var e=hz();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return F0=t,F0}var K0,fD;function Nie(){if(fD)return K0;fD=1;var e=Eie(),t=fz(),n=ta();function r(i,o){var l={};return o=n(o,3),t(i,function(u,f,h){e(l,f,o(u,f,h))}),l}return K0=r,K0}var Cie=Nie();const Mie=at(Cie);var Y0,dD;function Pie(){if(dD)return Y0;dD=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return Y0=e,Y0}var X0,hD;function Rie(){if(hD)return X0;hD=1;var e=Aw();function t(n,r){var i=!0;return e(n,function(o,l,u){return i=!!r(o,l,u),i}),i}return X0=t,X0}var W0,pD;function kie(){if(pD)return W0;pD=1;var e=Pie(),t=Rie(),n=ta(),r=Rn(),i=Yp();function o(l,u,f){var h=r(l)?e:t;return f&&i(l,u,f)&&(u=void 0),h(l,n(u,3))}return W0=o,W0}var Die=kie();const J5=at(Die);var Lie=["x","y"];function qu(e){"@babel/helpers - typeof";return qu=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},qu(e)}function qj(){return qj=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},qj.apply(this,arguments)}function mD(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 Bc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mD(Object(n),!0).forEach(function(r){zie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zie(e,t,n){return t=$ie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ie(e){var t=Bie(e,"string");return qu(t)=="symbol"?t:t+""}function Bie(e,t){if(qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iie(e,t){if(e==null)return{};var n=qie(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qie(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 Uie(e,t){var n=e.x,r=e.y,i=Iie(e,Lie),o="".concat(n),l=parseInt(o,10),u="".concat(r),f=parseInt(u,10),h="".concat(t.height||i.height),m=parseInt(h,10),y="".concat(t.width||i.width),g=parseInt(y,10);return Bc(Bc(Bc(Bc(Bc({},t),i),l?{x:l}:{}),f?{y:f}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function yD(e){return I.createElement(F5,qj({shapeType:"rectangle",propTransformer:Uie,activeClassName:"recharts-active-bar"},e))}var Vie=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 o=ce(r)||uF(r);return o?t(r,i):(o||Ts(),n)}},Hie=["value","background"],e$;function il(e){"@babel/helpers - typeof";return il=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},il(e)}function Gie(e,t){if(e==null)return{};var n=Fie(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fie(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 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 vD(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 Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vD(Object(n),!0).forEach(function(r){Si(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gD(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,n$(r.key),r)}}function Yie(e,t,n){return t&&gD(e.prototype,t),n&&gD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xie(e,t,n){return t=pp(t),Wie(e,t$()?Reflect.construct(t,n||[],pp(e).constructor):t.apply(e,n))}function Wie(e,t){if(t&&(il(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zie(e)}function Zie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t$=function(){return!!e})()}function pp(e){return pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pp(e)}function Qie(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&&Uj(e,t)}function Uj(e,t){return Uj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Uj(e,t)}function Si(e,t,n){return t=n$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n$(e){var t=Jie(e,"string");return il(t)=="symbol"?t:t+""}function Jie(e,t){if(il(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(il(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ti=(function(e){function t(){var n;Kie(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Xie(this,t,[].concat(i)),Si(n,"state",{isAnimationFinished:!1}),Si(n,"id",Ms("recharts-bar-")),Si(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Si(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Qie(t,e),Yie(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,l=o.shape,u=o.dataKey,f=o.activeIndex,h=o.activeBar,m=je(this.props,!1);return r&&r.map(function(y,g){var j=g===f,S=j?h:l,w=Bt(Bt(Bt({},m),y),{},{isActive:j,option:S,index:g,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return I.createElement(Ie,hp({className:"recharts-bar-rectangle"},ws(i.props,y,g),{key:"rectangle-".concat(y==null?void 0:y.x,"-").concat(y==null?void 0:y.y,"-").concat(y==null?void 0:y.value,"-").concat(g)}),I.createElement(yD,w))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,l=i.layout,u=i.isAnimationActive,f=i.animationBegin,h=i.animationDuration,m=i.animationEasing,y=i.animationId,g=this.state.prevData;return I.createElement(kr,{begin:f,duration:h,isActive:u,easing:m,from:{t:0},to:{t:1},key:"bar-".concat(y),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var S=j.t,w=o.map(function(b,A){var _=g&&g[A];if(_){var T=Ft(_.x,b.x),C=Ft(_.y,b.y),O=Ft(_.width,b.width),E=Ft(_.height,b.height);return Bt(Bt({},b),{},{x:T(S),y:C(S),width:O(S),height:E(S)})}if(l==="horizontal"){var M=Ft(0,b.height),D=M(S);return Bt(Bt({},b),{},{y:b.y+b.height-D,height:D})}var k=Ft(0,b.width),B=k(S);return Bt(Bt({},b),{},{width:B})});return I.createElement(Ie,null,r.renderRectanglesStatically(w))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&i&&i.length&&(!l||!Os(l,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,l=i.dataKey,u=i.activeIndex,f=je(this.props.background,!1);return o.map(function(h,m){h.value;var y=h.background,g=Gie(h,Hie);if(!y)return null;var j=Bt(Bt(Bt(Bt(Bt({},g),{},{fill:"#eee"},y),f),ws(r.props,h,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return I.createElement(yD,hp({key:"background-bar-".concat(m),option:r.props.background,isActive:m===u},j))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,u=o.xAxis,f=o.yAxis,h=o.layout,m=o.children,y=Wn(m,of);if(!y)return null;var g=h==="vertical"?l[0].height/2:l[0].width/2,j=function(b,A){var _=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:_,errorVal:kt(b,A)}},S={clipPath:r?"url(#clipPath-".concat(i,")"):null};return I.createElement(Ie,S,y.map(function(w){return I.cloneElement(w,{key:"error-bar-".concat(i,"-").concat(w.props.dataKey),data:l,xAxis:u,yAxis:f,layout:h,offset:g,dataPointFormatter:j})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,l=r.className,u=r.xAxis,f=r.yAxis,h=r.left,m=r.top,y=r.width,g=r.height,j=r.isAnimationActive,S=r.background,w=r.id;if(i||!o||!o.length)return null;var b=this.state.isAnimationFinished,A=Pe("recharts-bar",l),_=u&&u.allowDataOverflow,T=f&&f.allowDataOverflow,C=_||T,O=Ne(w)?this.id:w;return I.createElement(Ie,{className:A},_||T?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(O)},I.createElement("rect",{x:_?h:h-y/2,y:T?m:m-g/2,width:_?y:y*2,height:T?g:g*2}))):null,I.createElement(Ie,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(O,")"):null},S?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,O),(!j||b)&&Xr.renderCallByParent(this.props,o))}}],[{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}}])})(P.PureComponent);e$=Ti;Si(Ti,"displayName","Bar");Si(Ti,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Pi.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Si(Ti,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,l=e.yAxis,u=e.xAxisTicks,f=e.yAxisTicks,h=e.stackedData,m=e.dataStartIndex,y=e.displayedData,g=e.offset,j=Aee(r,n);if(!j)return null;var S=t.layout,w=n.type.defaultProps,b=w!==void 0?Bt(Bt({},w),n.props):n.props,A=b.dataKey,_=b.children,T=b.minPointSize,C=S==="horizontal"?l:o,O=h?C.scale.domain():null,E=Mee({numericAxis:C}),M=Wn(_,Xp),D=y.map(function(k,B){var q,$,F,X,Y,L;h?q=Oee(h[m+B],O):(q=kt(k,A),Array.isArray(q)||(q=[E,q]));var H=Vie(T,e$.defaultProps.minPointSize)(q[1],B);if(S==="horizontal"){var Q,ae=[l.scale(q[0]),l.scale(q[1])],oe=ae[0],z=ae[1];$=FR({axis:o,ticks:u,bandSize:i,offset:j.offset,entry:k,index:B}),F=(Q=z??oe)!==null&&Q!==void 0?Q:void 0,X=j.size;var G=oe-z;if(Y=Number.isNaN(G)?0:G,L={x:$,y:l.y,width:X,height:l.height},Math.abs(H)>0&&Math.abs(Y)<Math.abs(H)){var re=bn(Y||H)*(Math.abs(H)-Math.abs(Y));F-=re,Y+=re}}else{var fe=[o.scale(q[0]),o.scale(q[1])],me=fe[0],we=fe[1];if($=me,F=FR({axis:l,ticks:f,bandSize:i,offset:j.offset,entry:k,index:B}),X=we-me,Y=j.size,L={x:o.x,y:F,width:o.width,height:Y},Math.abs(H)>0&&Math.abs(X)<Math.abs(H)){var ze=bn(X||H)*(Math.abs(H)-Math.abs(X));X+=ze}}return Bt(Bt(Bt({},k),{},{x:$,y:F,width:X,height:Y,value:h?q:q[1],payload:k,background:L},M&&M[B]&&M[B].props),{},{tooltipPayload:[E5(n,k)],tooltipPosition:{x:$+X/2,y:F+Y/2}})});return Bt({data:D,layout:S},g)});function Uu(e){"@babel/helpers - typeof";return Uu=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},Uu(e)}function ese(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xD(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,r$(r.key),r)}}function tse(e,t,n){return t&&xD(e.prototype,t),n&&xD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bD(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 _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bD(Object(n),!0).forEach(function(r){dm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dm(e,t,n){return t=r$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r$(e){var t=nse(e,"string");return Uu(t)=="symbol"?t:t+""}function nse(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jw=function(t,n,r,i,o){var l=t.width,u=t.height,f=t.layout,h=t.children,m=Object.keys(n),y={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:u-r.bottom,bottomMirror:u-r.bottom},g=!!Gn(h,Ti);return m.reduce(function(j,S){var w=n[S],b=w.orientation,A=w.domain,_=w.padding,T=_===void 0?{}:_,C=w.mirror,O=w.reversed,E="".concat(b).concat(C?"Mirror":""),M,D,k,B,q;if(w.type==="number"&&(w.padding==="gap"||w.padding==="no-gap")){var $=A[1]-A[0],F=1/0,X=w.categoricalDomain.sort(hF);if(X.forEach(function(fe,me){me>0&&(F=Math.min((fe||0)-(X[me-1]||0),F))}),Number.isFinite(F)){var Y=F/$,L=w.layout==="vertical"?r.height:r.width;if(w.padding==="gap"&&(M=Y*L/2),w.padding==="no-gap"){var H=jn(t.barCategoryGap,Y*L),Q=Y*L/2;M=Q-H-(Q-H)/L*H}}}i==="xAxis"?D=[r.left+(T.left||0)+(M||0),r.left+r.width-(T.right||0)-(M||0)]:i==="yAxis"?D=f==="horizontal"?[r.top+r.height-(T.bottom||0),r.top+(T.top||0)]:[r.top+(T.top||0)+(M||0),r.top+r.height-(T.bottom||0)-(M||0)]:D=w.range,O&&(D=[D[1],D[0]]);var ae=A5(w,o,g),oe=ae.scale,z=ae.realScaleType;oe.domain(A).range(D),O5(oe);var G=_5(oe,_r(_r({},w),{},{realScaleType:z}));i==="xAxis"?(q=b==="top"&&!C||b==="bottom"&&C,k=r.left,B=y[E]-q*w.height):i==="yAxis"&&(q=b==="left"&&!C||b==="right"&&C,k=y[E]-q*w.width,B=r.top);var re=_r(_r(_r({},w),G),{},{realScaleType:z,x:k,y:B,scale:oe,width:i==="xAxis"?r.width:w.width,height:i==="yAxis"?r.height:w.height});return re.bandSize=Zh(re,G),!w.hide&&i==="xAxis"?y[E]+=(q?-1:1)*re.height:w.hide||(y[E]+=(q?-1:1)*re.width),_r(_r({},j),{},dm({},S,re))},{})},a$=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(i,l),width:Math.abs(o-r),height:Math.abs(l-i)}},rse=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return a$({x:n,y:r},{x:i,y:o})},i$=(function(){function e(t){ese(this,e),this.scale=t}return tse(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,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();dm(i$,"EPS",1e-4);var eA=function(t){var n=Object.keys(t).reduce(function(r,i){return _r(_r({},r),{},dm({},i,i$.create(t[i])))},{});return _r(_r({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,u=o.position;return Mie(i,function(f,h){return n[h].apply(f,{bandAware:l,position:u})})},isInRange:function(i){return J5(i,function(o,l){return n[l].isInRange(o)})}})};function ase(e){return(e%180+180)%180}var ise=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=ase(i),l=o*Math.PI/180,u=Math.atan(r/n),f=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},Z0,jD;function sse(){if(jD)return Z0;jD=1;var e=ta(),t=tf(),n=Fp();function r(i){return function(o,l,u){var f=Object(o);if(!t(o)){var h=e(l,3);o=n(o),l=function(y){return h(f[y],y,f)}}var m=i(o,l,u);return m>-1?f[h?o[m]:m]:void 0}}return Z0=r,Z0}var Q0,SD;function ose(){if(SD)return Q0;SD=1;var e=X5();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return Q0=t,Q0}var J0,wD;function lse(){if(wD)return J0;wD=1;var e=sz(),t=ta(),n=ose(),r=Math.max;function i(o,l,u){var f=o==null?0:o.length;if(!f)return-1;var h=u==null?0:n(u);return h<0&&(h=r(f+h,0)),e(o,t(l,3),h)}return J0=i,J0}var e1,AD;function cse(){if(AD)return e1;AD=1;var e=sse(),t=lse(),n=e(t);return e1=n,e1}var use=cse();const fse=at(use);var dse=jL();const hse=at(dse);var pse=hse(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("")}),tA=P.createContext(void 0),nA=P.createContext(void 0),s$=P.createContext(void 0),o$=P.createContext({}),l$=P.createContext(void 0),c$=P.createContext(0),u$=P.createContext(0),OD=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,l=t.clipPathId,u=t.children,f=t.width,h=t.height,m=pse(o);return I.createElement(tA.Provider,{value:r},I.createElement(nA.Provider,{value:i},I.createElement(o$.Provider,{value:o},I.createElement(s$.Provider,{value:m},I.createElement(l$.Provider,{value:l},I.createElement(c$.Provider,{value:h},I.createElement(u$.Provider,{value:f},u)))))))},mse=function(){return P.useContext(l$)},f$=function(t){var n=P.useContext(tA);n==null&&Ts();var r=n[t];return r==null&&Ts(),r},yse=function(){var t=P.useContext(tA);return gi(t)},vse=function(){var t=P.useContext(nA),n=fse(t,function(r){return J5(r.domain,Number.isFinite)});return n||gi(t)},d$=function(t){var n=P.useContext(nA);n==null&&Ts();var r=n[t];return r==null&&Ts(),r},gse=function(){var t=P.useContext(s$);return t},xse=function(){return P.useContext(o$)},rA=function(){return P.useContext(u$)},aA=function(){return P.useContext(c$)};function sl(e){"@babel/helpers - typeof";return sl=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},sl(e)}function bse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jse(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,p$(r.key),r)}}function Sse(e,t,n){return t&&jse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wse(e,t,n){return t=mp(t),Ase(e,h$()?Reflect.construct(t,n||[],mp(e).constructor):t.apply(e,n))}function Ase(e,t){if(t&&(sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ose(e)}function Ose(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h$=function(){return!!e})()}function mp(e){return mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mp(e)}function _se(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&&Vj(e,t)}function Vj(e,t){return Vj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vj(e,t)}function _D(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 TD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_D(Object(n),!0).forEach(function(r){iA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_D(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iA(e,t,n){return t=p$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p$(e){var t=Tse(e,"string");return sl(t)=="symbol"?t:t+""}function Tse(e,t){if(sl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ese(e,t){return Pse(e)||Mse(e,t)||Cse(e,t)||Nse()}function Nse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cse(e,t){if(e){if(typeof e=="string")return ED(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 ED(e,t)}}function ED(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 Mse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Pse(e){if(Array.isArray(e))return e}function Hj(){return Hj=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},Hj.apply(this,arguments)}var Rse=function(t,n){var r;return I.isValidElement(t)?r=I.cloneElement(t,n):Te(t)?r=t(n):r=I.createElement("line",Hj({},n,{className:"recharts-reference-line-line"})),r},kse=function(t,n,r,i,o,l,u,f,h){var m=o.x,y=o.y,g=o.width,j=o.height;if(r){var S=h.y,w=t.y.apply(S,{position:l});if(Wr(h,"discard")&&!t.y.isInRange(w))return null;var b=[{x:m+g,y:w},{x:m,y:w}];return f==="left"?b.reverse():b}if(n){var A=h.x,_=t.x.apply(A,{position:l});if(Wr(h,"discard")&&!t.x.isInRange(_))return null;var T=[{x:_,y:y+j},{x:_,y}];return u==="top"?T.reverse():T}if(i){var C=h.segment,O=C.map(function(E){return t.apply(E,{position:l})});return Wr(h,"discard")&&Tie(O,function(E){return!t.isInRange(E)})?null:O}return null};function Dse(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,l=e.shape,u=e.className,f=e.alwaysShow,h=mse(),m=f$(i),y=d$(o),g=gse();if(!h||!g)return null;Pr(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var j=eA({x:m.scale,y:y.scale}),S=Kt(t),w=Kt(n),b=r&&r.length===2,A=kse(j,S,w,b,g,e.position,m.orientation,y.orientation,e);if(!A)return null;var _=Ese(A,2),T=_[0],C=T.x,O=T.y,E=_[1],M=E.x,D=E.y,k=Wr(e,"hidden")?"url(#".concat(h,")"):void 0,B=TD(TD({clipPath:k},je(e,!0)),{},{x1:C,y1:O,x2:M,y2:D});return I.createElement(Ie,{className:Pe("recharts-reference-line",u)},Rse(l,B),Jt.renderCallByParent(e,rse({x1:C,y1:O,x2:M,y2:D})))}var sA=(function(e){function t(){return bse(this,t),wse(this,t,arguments)}return _se(t,e),Sse(t,[{key:"render",value:function(){return I.createElement(Dse,this.props)}}])})(I.Component);iA(sA,"displayName","ReferenceLine");iA(sA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Gj(){return Gj=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},Gj.apply(this,arguments)}function ol(e){"@babel/helpers - typeof";return ol=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},ol(e)}function ND(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 CD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ND(Object(n),!0).forEach(function(r){hm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zse(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,y$(r.key),r)}}function $se(e,t,n){return t&&zse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bse(e,t,n){return t=yp(t),Ise(e,m$()?Reflect.construct(t,n||[],yp(e).constructor):t.apply(e,n))}function Ise(e,t){if(t&&(ol(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qse(e)}function qse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m$=function(){return!!e})()}function yp(e){return yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yp(e)}function Use(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&&Fj(e,t)}function Fj(e,t){return Fj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Fj(e,t)}function hm(e,t,n){return t=y$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y$(e){var t=Vse(e,"string");return ol(t)=="symbol"?t:t+""}function Vse(e,t){if(ol(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ol(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hse=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,l=eA({x:i.scale,y:o.scale}),u=l.apply({x:n,y:r},{bandAware:!0});return Wr(t,"discard")&&!l.isInRange(u)?null:u},pm=(function(e){function t(){return Lse(this,t),Bse(this,t,arguments)}return Use(t,e),$se(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,l=r.r,u=r.alwaysShow,f=r.clipPathId,h=Kt(i),m=Kt(o);if(Pr(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!m)return null;var y=Hse(this.props);if(!y)return null;var g=y.x,j=y.y,S=this.props,w=S.shape,b=S.className,A=Wr(this.props,"hidden")?"url(#".concat(f,")"):void 0,_=CD(CD({clipPath:A},je(this.props,!0)),{},{cx:g,cy:j});return I.createElement(Ie,{className:Pe("recharts-reference-dot",b)},t.renderDot(w,_),Jt.renderCallByParent(this.props,{x:g-l,y:j-l,width:2*l,height:2*l}))}}])})(I.Component);hm(pm,"displayName","ReferenceDot");hm(pm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});hm(pm,"renderDot",function(e,t){var n;return I.isValidElement(e)?n=I.cloneElement(e,t):Te(e)?n=e(t):n=I.createElement(lf,Gj({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Kj(){return Kj=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},Kj.apply(this,arguments)}function ll(e){"@babel/helpers - typeof";return ll=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},ll(e)}function MD(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 PD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MD(Object(n),!0).forEach(function(r){mm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fse(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,g$(r.key),r)}}function Kse(e,t,n){return t&&Fse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yse(e,t,n){return t=vp(t),Xse(e,v$()?Reflect.construct(t,n||[],vp(e).constructor):t.apply(e,n))}function Xse(e,t){if(t&&(ll(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wse(e)}function Wse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v$=function(){return!!e})()}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vp(e)}function Zse(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&&Yj(e,t)}function Yj(e,t){return Yj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yj(e,t)}function mm(e,t,n){return t=g$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g$(e){var t=Qse(e,"string");return ll(t)=="symbol"?t:t+""}function Qse(e,t){if(ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Jse=function(t,n,r,i,o){var l=o.x1,u=o.x2,f=o.y1,h=o.y2,m=o.xAxis,y=o.yAxis;if(!m||!y)return null;var g=eA({x:m.scale,y:y.scale}),j={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(f,{position:"start"}):g.y.rangeMin},S={x:n?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(h,{position:"end"}):g.y.rangeMax};return Wr(o,"discard")&&(!g.isInRange(j)||!g.isInRange(S))?null:a$(j,S)},ym=(function(e){function t(){return Gse(this,t),Yse(this,t,arguments)}return Zse(t,e),Kse(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,l=r.y1,u=r.y2,f=r.className,h=r.alwaysShow,m=r.clipPathId;Pr(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var y=Kt(i),g=Kt(o),j=Kt(l),S=Kt(u),w=this.props.shape;if(!y&&!g&&!j&&!S&&!w)return null;var b=Jse(y,g,j,S,this.props);if(!b&&!w)return null;var A=Wr(this.props,"hidden")?"url(#".concat(m,")"):void 0;return I.createElement(Ie,{className:Pe("recharts-reference-area",f)},t.renderRect(w,PD(PD({clipPath:A},je(this.props,!0)),b)),Jt.renderCallByParent(this.props,b))}}])})(I.Component);mm(ym,"displayName","ReferenceArea");mm(ym,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});mm(ym,"renderRect",function(e,t){var n;return I.isValidElement(e)?n=I.cloneElement(e,t):Te(e)?n=e(t):n=I.createElement(Qw,Kj({},t,{className:"recharts-reference-area-rect"})),n});function x$(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 eoe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return ise(r,n)}function toe(e,t,n){var r=n==="width",i=e.x,o=e.y,l=e.width,u=e.height;return t===1?{start:r?i:o,end:r?i+l:o+u}:{start:r?i+l:o+u,end:r?i:o}}function gp(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function noe(e,t){return x$(e,t+1)}function roe(e,t,n,r,i){for(var o=(r||[]).slice(),l=t.start,u=t.end,f=0,h=1,m=l,y=function(){var S=r==null?void 0:r[f];if(S===void 0)return{v:x$(r,h)};var w=f,b,A=function(){return b===void 0&&(b=n(S,w)),b},_=S.coordinate,T=f===0||gp(e,_,A,m,u);T||(f=0,m=l,h+=1),T&&(m=_+e*(A()/2+i),f+=h)},g;h<=o.length;)if(g=y(),g)return g.v;return[]}function Vu(e){"@babel/helpers - typeof";return Vu=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},Vu(e)}function RD(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 pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RD(Object(n),!0).forEach(function(r){aoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aoe(e,t,n){return t=ioe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ioe(e){var t=soe(e,"string");return Vu(t)=="symbol"?t:t+""}function soe(e,t){if(Vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ooe(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,u=t.start,f=t.end,h=function(g){var j=o[g],S,w=function(){return S===void 0&&(S=n(j,g)),S};if(g===l-1){var b=e*(j.coordinate+e*w()/2-f);o[g]=j=pn(pn({},j),{},{tickCoord:b>0?j.coordinate-b*e:j.coordinate})}else o[g]=j=pn(pn({},j),{},{tickCoord:j.coordinate});var A=gp(e,j.tickCoord,w,u,f);A&&(f=j.tickCoord-e*(w()/2+i),o[g]=pn(pn({},j),{},{isShow:!0}))},m=l-1;m>=0;m--)h(m);return o}function loe(e,t,n,r,i,o){var l=(r||[]).slice(),u=l.length,f=t.start,h=t.end;if(o){var m=r[u-1],y=n(m,u-1),g=e*(m.coordinate+e*y/2-h);l[u-1]=m=pn(pn({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var j=gp(e,m.tickCoord,function(){return y},f,h);j&&(h=m.tickCoord-e*(y/2+i),l[u-1]=pn(pn({},m),{},{isShow:!0}))}for(var S=o?u-1:u,w=function(_){var T=l[_],C,O=function(){return C===void 0&&(C=n(T,_)),C};if(_===0){var E=e*(T.coordinate-e*O()/2-f);l[_]=T=pn(pn({},T),{},{tickCoord:E<0?T.coordinate-E*e:T.coordinate})}else l[_]=T=pn(pn({},T),{},{tickCoord:T.coordinate});var M=gp(e,T.tickCoord,O,f,h);M&&(f=T.tickCoord+e*(O()/2+i),l[_]=pn(pn({},T),{},{isShow:!0}))},b=0;b<S;b++)w(b);return l}function oA(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,l=e.minTickGap,u=e.orientation,f=e.interval,h=e.tickFormatter,m=e.unit,y=e.angle;if(!i||!i.length||!r)return[];if(ce(f)||Pi.isSsr)return noe(i,typeof f=="number"&&ce(f)?f:0);var g=[],j=u==="top"||u==="bottom"?"width":"height",S=m&&j==="width"?Jc(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},w=function(T,C){var O=Te(h)?h(T.value,C):T.value;return j==="width"?eoe(Jc(O,{fontSize:t,letterSpacing:n}),S,y):Jc(O,{fontSize:t,letterSpacing:n})[j]},b=i.length>=2?bn(i[1].coordinate-i[0].coordinate):1,A=toe(o,b,j);return f==="equidistantPreserveStart"?roe(b,A,w,i,l):(f==="preserveStart"||f==="preserveStartEnd"?g=loe(b,A,w,i,l,f==="preserveStartEnd"):g=ooe(b,A,w,i,l),g.filter(function(_){return _.isShow}))}var coe=["viewBox"],uoe=["viewBox"],foe=["ticks"];function cl(e){"@babel/helpers - typeof";return cl=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},cl(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 kD(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 Vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kD(Object(n),!0).forEach(function(r){lA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t1(e,t){if(e==null)return{};var n=doe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function doe(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 hoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DD(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,j$(r.key),r)}}function poe(e,t,n){return t&&DD(e.prototype,t),n&&DD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function moe(e,t,n){return t=xp(t),yoe(e,b$()?Reflect.construct(t,n||[],xp(e).constructor):t.apply(e,n))}function yoe(e,t){if(t&&(cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return voe(e)}function voe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b$=function(){return!!e})()}function xp(e){return xp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xp(e)}function goe(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&&Xj(e,t)}function Xj(e,t){return Xj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xj(e,t)}function lA(e,t,n){return t=j$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j$(e){var t=xoe(e,"string");return cl(t)=="symbol"?t:t+""}function xoe(e,t){if(cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ml=(function(e){function t(n){var r;return hoe(this,t),r=moe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return goe(t,e),poe(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,l=t1(r,coe),u=this.props,f=u.viewBox,h=t1(u,uoe);return!Lo(o,f)||!Lo(l,h)||!Lo(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,o=i.x,l=i.y,u=i.width,f=i.height,h=i.orientation,m=i.tickSize,y=i.mirror,g=i.tickMargin,j,S,w,b,A,_,T=y?-1:1,C=r.tickSize||m,O=ce(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":j=S=r.coordinate,b=l+ +!y*f,w=b-T*C,_=w-T*g,A=O;break;case"left":w=b=r.coordinate,S=o+ +!y*u,j=S-T*C,A=j-T*g,_=O;break;case"right":w=b=r.coordinate,S=o+ +y*u,j=S+T*C,A=j+T*g,_=O;break;default:j=S=r.coordinate,b=l+ +y*f,w=b+T*C,_=w+T*g,A=O;break}return{line:{x1:j,y1:w,x2:S,y2:b},tick:{x:A,y:_}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l;switch(i){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l="end";switch(i){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,f=r.orientation,h=r.mirror,m=r.axisLine,y=Vt(Vt(Vt({},je(this.props,!1)),je(m,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!h||f==="bottom"&&h);y=Vt(Vt({},y),{},{x1:i,y1:o+g*u,x2:i+l,y2:o+g*u})}else{var j=+(f==="left"&&!h||f==="right"&&h);y=Vt(Vt({},y),{},{x1:i+j*l,y1:o,x2:i+j*l,y2:o+u})}return I.createElement("line",Ro({},y,{className:Pe("recharts-cartesian-axis-line",Xn(m,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var l=this,u=this.props,f=u.tickLine,h=u.stroke,m=u.tick,y=u.tickFormatter,g=u.unit,j=oA(Vt(Vt({},this.props),{},{ticks:r}),i,o),S=this.getTickTextAnchor(),w=this.getTickVerticalAnchor(),b=je(this.props,!1),A=je(m,!1),_=Vt(Vt({},b),{},{fill:"none"},je(f,!1)),T=j.map(function(C,O){var E=l.getTickLineCoord(C),M=E.line,D=E.tick,k=Vt(Vt(Vt(Vt({textAnchor:S,verticalAnchor:w},b),{},{stroke:"none",fill:h},A),D),{},{index:O,payload:C,visibleTicksCount:j.length,tickFormatter:y});return I.createElement(Ie,Ro({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},ws(l.props,C,O)),f&&I.createElement("line",Ro({},_,M,{className:Pe("recharts-cartesian-axis-tick-line",Xn(f,"className"))})),m&&t.renderTickItem(m,k,"".concat(Te(y)?y(C.value,O):C.value).concat(g||"")))});return I.createElement("g",{className:"recharts-cartesian-axis-ticks"},T)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,l=i.width,u=i.height,f=i.ticksGenerator,h=i.className,m=i.hide;if(m)return null;var y=this.props,g=y.ticks,j=t1(y,foe),S=g;return Te(f)&&(S=g&&g.length>0?f(this.props):f(j)),l<=0||u<=0||!S||!S.length?null:I.createElement(Ie,{className:Pe("recharts-cartesian-axis",h),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(S,this.state.fontSize,this.state.letterSpacing),Jt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var l,u=Pe(i.className,"recharts-cartesian-axis-tick-value");return I.isValidElement(r)?l=I.cloneElement(r,Vt(Vt({},i),{},{className:u})):Te(r)?l=r(Vt(Vt({},i),{},{className:u})):l=I.createElement(As,Ro({},i,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(P.Component);lA(Ml,"displayName","CartesianAxis");lA(Ml,"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 boe=["x1","y1","x2","y2","key"],joe=["offset"];function Es(e){"@babel/helpers - typeof";return Es=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},Es(e)}function LD(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?LD(Object(n),!0).forEach(function(r){Soe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Soe(e,t,n){return t=woe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function woe(e){var t=Aoe(e,"string");return Es(t)=="symbol"?t:t+""}function Aoe(e,t){if(Es(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Es(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ps(){return ps=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},ps.apply(this,arguments)}function zD(e,t){if(e==null)return{};var n=Ooe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ooe(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 _oe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,l=t.width,u=t.height,f=t.ry;return I.createElement("rect",{x:i,y:o,ry:f,width:l,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function S$(e,t){var n;if(I.isValidElement(e))n=I.cloneElement(e,t);else if(Te(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,l=t.y2,u=t.key,f=zD(t,boe),h=je(f,!1);h.offset;var m=zD(h,joe);n=I.createElement("line",ps({},m,{x1:r,y1:i,x2:o,y2:l,fill:"none",key:u}))}return n}function Toe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var l=o.map(function(u,f){var h=mn(mn({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(f),index:f});return S$(i,h)});return I.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Eoe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var l=o.map(function(u,f){var h=mn(mn({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(f),index:f});return S$(i,h)});return I.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Noe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,l=e.height,u=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length)return null;var m=u.map(function(g){return Math.round(g+i-i)}).sort(function(g,j){return g-j});i!==m[0]&&m.unshift(0);var y=m.map(function(g,j){var S=!m[j+1],w=S?i+l-g:m[j+1]-g;if(w<=0)return null;var b=j%t.length;return I.createElement("rect",{key:"react-".concat(j),y:g,x:r,height:w,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return I.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},y)}function Coe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,l=e.y,u=e.width,f=e.height,h=e.verticalPoints;if(!n||!r||!r.length)return null;var m=h.map(function(g){return Math.round(g+o-o)}).sort(function(g,j){return g-j});o!==m[0]&&m.unshift(0);var y=m.map(function(g,j){var S=!m[j+1],w=S?o+u-g:m[j+1]-g;if(w<=0)return null;var b=j%r.length;return I.createElement("rect",{key:"react-".concat(j),x:g,y:l,width:w,height:f,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return I.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},y)}var Moe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,l=t.offset;return w5(oA(mn(mn(mn({},Ml.defaultProps),r),{},{ticks:Ta(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.left,l.left+l.width,n)},Poe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,l=t.offset;return w5(oA(mn(mn(mn({},Ml.defaultProps),r),{},{ticks:Ta(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.top,l.top+l.height,n)},So={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function bp(e){var t,n,r,i,o,l,u=rA(),f=aA(),h=xse(),m=mn(mn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:So.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:So.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:So.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:So.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:So.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:So.verticalFill,x:ce(e.x)?e.x:h.left,y:ce(e.y)?e.y:h.top,width:ce(e.width)?e.width:h.width,height:ce(e.height)?e.height:h.height}),y=m.x,g=m.y,j=m.width,S=m.height,w=m.syncWithTicks,b=m.horizontalValues,A=m.verticalValues,_=yse(),T=vse();if(!ce(j)||j<=0||!ce(S)||S<=0||!ce(y)||y!==+y||!ce(g)||g!==+g)return null;var C=m.verticalCoordinatesGenerator||Moe,O=m.horizontalCoordinatesGenerator||Poe,E=m.horizontalPoints,M=m.verticalPoints;if((!E||!E.length)&&Te(O)){var D=b&&b.length,k=O({yAxis:T?mn(mn({},T),{},{ticks:D?b:T.ticks}):void 0,width:u,height:f,offset:h},D?!0:w);Pr(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Es(k),"]")),Array.isArray(k)&&(E=k)}if((!M||!M.length)&&Te(C)){var B=A&&A.length,q=C({xAxis:_?mn(mn({},_),{},{ticks:B?A:_.ticks}):void 0,width:u,height:f,offset:h},B?!0:w);Pr(Array.isArray(q),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Es(q),"]")),Array.isArray(q)&&(M=q)}return I.createElement("g",{className:"recharts-cartesian-grid"},I.createElement(_oe,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),I.createElement(Toe,ps({},m,{offset:h,horizontalPoints:E,xAxis:_,yAxis:T})),I.createElement(Eoe,ps({},m,{offset:h,verticalPoints:M,xAxis:_,yAxis:T})),I.createElement(Noe,ps({},m,{horizontalPoints:E})),I.createElement(Coe,ps({},m,{verticalPoints:M})))}bp.displayName="CartesianGrid";var Roe=["type","layout","connectNulls","ref"],koe=["key"];function ul(e){"@babel/helpers - typeof";return ul=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},ul(e)}function $D(e,t){if(e==null)return{};var n=Doe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Doe(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 iu(){return iu=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},iu.apply(this,arguments)}function BD(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 Vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BD(Object(n),!0).forEach(function(r){Tr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wo(e){return Boe(e)||$oe(e)||zoe(e)||Loe()}function Loe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zoe(e,t){if(e){if(typeof e=="string")return Wj(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 Wj(e,t)}}function $oe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Boe(e){if(Array.isArray(e))return Wj(e)}function Wj(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 Ioe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ID(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,A$(r.key),r)}}function qoe(e,t,n){return t&&ID(e.prototype,t),n&&ID(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uoe(e,t,n){return t=jp(t),Voe(e,w$()?Reflect.construct(t,n||[],jp(e).constructor):t.apply(e,n))}function Voe(e,t){if(t&&(ul(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hoe(e)}function Hoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w$=function(){return!!e})()}function jp(e){return jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jp(e)}function Goe(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 Tr(e,t,n){return t=A$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A$(e){var t=Foe(e,"string");return ul(t)=="symbol"?t:t+""}function Foe(e,t){if(ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cf=(function(e){function t(){var n;Ioe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Uoe(this,t,[].concat(i)),Tr(n,"state",{isAnimationFinished:!0,totalLength:0}),Tr(n,"generateSimpleStrokeDasharray",function(l,u){return"".concat(u,"px ").concat(l-u,"px")}),Tr(n,"getStrokeDasharray",function(l,u,f){var h=f.reduce(function(A,_){return A+_});if(!h)return n.generateSimpleStrokeDasharray(u,l);for(var m=Math.floor(l/h),y=l%h,g=u-l,j=[],S=0,w=0;S<f.length;w+=f[S],++S)if(w+f[S]>y){j=[].concat(wo(f.slice(0,S)),[y-w]);break}var b=j.length%2===0?[0,g]:[g];return[].concat(wo(t.repeat(f,m)),wo(j),b).map(function(A){return"".concat(A,"px")}).join(", ")}),Tr(n,"id",Ms("recharts-line-")),Tr(n,"pathRef",function(l){n.mainCurve=l}),Tr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Tr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Goe(t,e),qoe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.points,u=o.xAxis,f=o.yAxis,h=o.layout,m=o.children,y=Wn(m,of);if(!y)return null;var g=function(w,b){return{x:w.x,y:w.y,value:w.value,errorVal:kt(w.payload,b)}},j={clipPath:r?"url(#clipPath-".concat(i,")"):null};return I.createElement(Ie,j,y.map(function(S){return I.cloneElement(S,{key:"bar-".concat(S.props.dataKey),data:l,xAxis:u,yAxis:f,layout:h,dataPointFormatter:g})}))}},{key:"renderDots",value:function(r,i,o){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var u=this.props,f=u.dot,h=u.points,m=u.dataKey,y=je(this.props,!1),g=je(f,!0),j=h.map(function(w,b){var A=Vn(Vn(Vn({key:"dot-".concat(b),r:3},y),g),{},{index:b,cx:w.x,cy:w.y,value:w.value,dataKey:m,payload:w.payload,points:h});return t.renderDotItem(f,A)}),S={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return I.createElement(Ie,iu({className:"recharts-line-dots",key:"dots"},S),j)}},{key:"renderCurveStatically",value:function(r,i,o,l){var u=this.props,f=u.type,h=u.layout,m=u.connectNulls;u.ref;var y=$D(u,Roe),g=Vn(Vn(Vn({},je(y,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},l),{},{type:f,layout:h,connectNulls:m});return I.createElement(bs,iu({},g,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,l=this.props,u=l.points,f=l.strokeDasharray,h=l.isAnimationActive,m=l.animationBegin,y=l.animationDuration,g=l.animationEasing,j=l.animationId,S=l.animateNewValues,w=l.width,b=l.height,A=this.state,_=A.prevPoints,T=A.totalLength;return I.createElement(kr,{begin:m,duration:y,isActive:h,easing:g,from:{t:0},to:{t:1},key:"line-".concat(j),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var O=C.t;if(_){var E=_.length/u.length,M=u.map(function($,F){var X=Math.floor(F*E);if(_[X]){var Y=_[X],L=Ft(Y.x,$.x),H=Ft(Y.y,$.y);return Vn(Vn({},$),{},{x:L(O),y:H(O)})}if(S){var Q=Ft(w*2,$.x),ae=Ft(b/2,$.y);return Vn(Vn({},$),{},{x:Q(O),y:ae(O)})}return Vn(Vn({},$),{},{x:$.x,y:$.y})});return o.renderCurveStatically(M,r,i)}var D=Ft(0,T),k=D(O),B;if(f){var q="".concat(f).split(/[,\s]+/gim).map(function($){return parseFloat($)});B=o.getStrokeDasharray(k,T,q)}else B=o.generateSimpleStrokeDasharray(T,k);return o.renderCurveStatically(u,r,i,{strokeDasharray:B})})}},{key:"renderCurve",value:function(r,i){var o=this.props,l=o.points,u=o.isAnimationActive,f=this.state,h=f.prevPoints,m=f.totalLength;return u&&l&&l.length&&(!h&&m>0||!Os(h,l))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(l,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,l=i.dot,u=i.points,f=i.className,h=i.xAxis,m=i.yAxis,y=i.top,g=i.left,j=i.width,S=i.height,w=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var A=this.state.isAnimationFinished,_=u.length===1,T=Pe("recharts-line",f),C=h&&h.allowDataOverflow,O=m&&m.allowDataOverflow,E=C||O,M=Ne(b)?this.id:b,D=(r=je(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},k=D.r,B=k===void 0?3:k,q=D.strokeWidth,$=q===void 0?2:q,F=_L(l)?l:{},X=F.clipDot,Y=X===void 0?!0:X,L=B*2+$;return I.createElement(Ie,{className:T},C||O?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(M)},I.createElement("rect",{x:C?g:g-j/2,y:O?y:y-S/2,width:C?j:j*2,height:O?S:S*2})),!Y&&I.createElement("clipPath",{id:"clipPath-dots-".concat(M)},I.createElement("rect",{x:g-L/2,y:y-L/2,width:j+L,height:S+L}))):null,!_&&this.renderCurve(E,M),this.renderErrorBar(E,M),(_||l)&&this.renderDots(E,Y,M),(!w||A)&&Xr.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(wo(r),[0]):r,l=[],u=0;u<i;++u)l=[].concat(wo(l),wo(o));return l}},{key:"renderDotItem",value:function(r,i){var o;if(I.isValidElement(r))o=I.cloneElement(r,i);else if(Te(r))o=r(i);else{var l=i.key,u=$D(i,koe),f=Pe("recharts-line-dot",typeof r!="boolean"?r.className:"");o=I.createElement(lf,iu({key:l},u,{className:f}))}return o}}])})(P.PureComponent);Tr(cf,"displayName","Line");Tr(cf,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Pi.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Tr(cf,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,l=e.dataKey,u=e.bandSize,f=e.displayedData,h=e.offset,m=t.layout,y=f.map(function(g,j){var S=kt(g,l);return m==="horizontal"?{x:Wh({axis:n,ticks:i,bandSize:u,entry:g,index:j}),y:Ne(S)?null:r.scale(S),value:S,payload:g}:{x:Ne(S)?null:n.scale(S),y:Wh({axis:r,ticks:o,bandSize:u,entry:g,index:j}),value:S,payload:g}});return Vn({points:y,layout:m},h)});var Koe=["layout","type","stroke","connectNulls","isRange","ref"],Yoe=["key"],O$;function fl(e){"@babel/helpers - typeof";return fl=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},fl(e)}function _$(e,t){if(e==null)return{};var n=Xoe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xoe(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 ms(){return ms=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},ms.apply(this,arguments)}function qD(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 yi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qD(Object(n),!0).forEach(function(r){Fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Woe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UD(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,E$(r.key),r)}}function Zoe(e,t,n){return t&&UD(e.prototype,t),n&&UD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qoe(e,t,n){return t=Sp(t),Joe(e,T$()?Reflect.construct(t,n||[],Sp(e).constructor):t.apply(e,n))}function Joe(e,t){if(t&&(fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ele(e)}function ele(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T$=function(){return!!e})()}function Sp(e){return Sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sp(e)}function tle(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 Fr(e,t,n){return t=E$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E$(e){var t=nle(e,"string");return fl(t)=="symbol"?t:t+""}function nle(e,t){if(fl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var La=(function(e){function t(){var n;Woe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Qoe(this,t,[].concat(i)),Fr(n,"state",{isAnimationFinished:!0}),Fr(n,"id",Ms("recharts-area-")),Fr(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Te(l)&&l()}),Fr(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Te(l)&&l()}),n}return tle(t,e),Zoe(t,[{key:"renderDots",value:function(r,i,o){var l=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(l&&!u)return null;var f=this.props,h=f.dot,m=f.points,y=f.dataKey,g=je(this.props,!1),j=je(h,!0),S=m.map(function(b,A){var _=yi(yi(yi({key:"dot-".concat(A),r:3},g),j),{},{index:A,cx:b.x,cy:b.y,dataKey:y,value:b.value,payload:b.payload,points:m});return t.renderDotItem(h,_)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return I.createElement(Ie,ms({className:"recharts-area-dots"},w),S)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,o=i.baseLine,l=i.points,u=i.strokeWidth,f=l[0].x,h=l[l.length-1].x,m=r*Math.abs(f-h),y=ji(l.map(function(g){return g.y||0}));return ce(o)&&typeof o=="number"?y=Math.max(o,y):o&&Array.isArray(o)&&o.length&&(y=Math.max(ji(o.map(function(g){return g.y||0})),y)),ce(y)?I.createElement("rect",{x:f<h?f:f-m,y:0,width:m,height:Math.floor(y+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,o=i.baseLine,l=i.points,u=i.strokeWidth,f=l[0].y,h=l[l.length-1].y,m=r*Math.abs(f-h),y=ji(l.map(function(g){return g.x||0}));return ce(o)&&typeof o=="number"?y=Math.max(o,y):o&&Array.isArray(o)&&o.length&&(y=Math.max(ji(o.map(function(g){return g.x||0})),y)),ce(y)?I.createElement("rect",{x:0,y:f<h?f:f-m,width:y+(u?parseInt("".concat(u),10):1),height:Math.floor(m)}):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,o,l){var u=this.props,f=u.layout,h=u.type,m=u.stroke,y=u.connectNulls,g=u.isRange;u.ref;var j=_$(u,Koe);return I.createElement(Ie,{clipPath:o?"url(#clipPath-".concat(l,")"):null},I.createElement(bs,ms({},je(j,!0),{points:r,connectNulls:y,type:h,baseLine:i,layout:f,stroke:"none",className:"recharts-area-area"})),m!=="none"&&I.createElement(bs,ms({},je(this.props,!1),{className:"recharts-area-curve",layout:f,type:h,connectNulls:y,fill:"none",points:r})),m!=="none"&&g&&I.createElement(bs,ms({},je(this.props,!1),{className:"recharts-area-curve",layout:f,type:h,connectNulls:y,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var o=this,l=this.props,u=l.points,f=l.baseLine,h=l.isAnimationActive,m=l.animationBegin,y=l.animationDuration,g=l.animationEasing,j=l.animationId,S=this.state,w=S.prevPoints,b=S.prevBaseLine;return I.createElement(kr,{begin:m,duration:y,isActive:h,easing:g,from:{t:0},to:{t:1},key:"area-".concat(j),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var _=A.t;if(w){var T=w.length/u.length,C=u.map(function(D,k){var B=Math.floor(k*T);if(w[B]){var q=w[B],$=Ft(q.x,D.x),F=Ft(q.y,D.y);return yi(yi({},D),{},{x:$(_),y:F(_)})}return D}),O;if(ce(f)&&typeof f=="number"){var E=Ft(b,f);O=E(_)}else if(Ne(f)||_l(f)){var M=Ft(b,0);O=M(_)}else O=f.map(function(D,k){var B=Math.floor(k*T);if(b[B]){var q=b[B],$=Ft(q.x,D.x),F=Ft(q.y,D.y);return yi(yi({},D),{},{x:$(_),y:F(_)})}return D});return o.renderAreaStatically(C,O,r,i)}return I.createElement(Ie,null,I.createElement("defs",null,I.createElement("clipPath",{id:"animationClipPath-".concat(i)},o.renderClipRect(_))),I.createElement(Ie,{clipPath:"url(#animationClipPath-".concat(i,")")},o.renderAreaStatically(u,f,r,i)))})}},{key:"renderArea",value:function(r,i){var o=this.props,l=o.points,u=o.baseLine,f=o.isAnimationActive,h=this.state,m=h.prevPoints,y=h.prevBaseLine,g=h.totalLength;return f&&l&&l.length&&(!m&&g>0||!Os(m,l)||!Os(y,u))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(l,u,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,l=i.dot,u=i.points,f=i.className,h=i.top,m=i.left,y=i.xAxis,g=i.yAxis,j=i.width,S=i.height,w=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var A=this.state.isAnimationFinished,_=u.length===1,T=Pe("recharts-area",f),C=y&&y.allowDataOverflow,O=g&&g.allowDataOverflow,E=C||O,M=Ne(b)?this.id:b,D=(r=je(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},k=D.r,B=k===void 0?3:k,q=D.strokeWidth,$=q===void 0?2:q,F=_L(l)?l:{},X=F.clipDot,Y=X===void 0?!0:X,L=B*2+$;return I.createElement(Ie,{className:T},C||O?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(M)},I.createElement("rect",{x:C?m:m-j/2,y:O?h:h-S/2,width:C?j:j*2,height:O?S:S*2})),!Y&&I.createElement("clipPath",{id:"clipPath-dots-".concat(M)},I.createElement("rect",{x:m-L/2,y:h-L/2,width:j+L,height:S+L}))):null,_?null:this.renderArea(E,M),(l||_)&&this.renderDots(E,Y,M),(!w||A)&&Xr.renderCallByParent(this.props,u))}}],[{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}}])})(P.PureComponent);O$=La;Fr(La,"displayName","Area");Fr(La,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Pi.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Fr(La,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,l=t.props.baseValue,u=l??o;if(ce(u)&&typeof u=="number")return u;var f=i==="horizontal"?r:n,h=f.scale.domain();if(f.type==="number"){var m=Math.max(h[0],h[1]),y=Math.min(h[0],h[1]);return u==="dataMin"?y:u==="dataMax"||m<0?m:Math.max(Math.min(h[0],h[1]),0)}return u==="dataMin"?h[0]:u==="dataMax"?h[1]:h[0]});Fr(La,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,u=e.bandSize,f=e.dataKey,h=e.stackedData,m=e.dataStartIndex,y=e.displayedData,g=e.offset,j=t.layout,S=h&&h.length,w=O$.getBaseValue(t,n,r,i),b=j==="horizontal",A=!1,_=y.map(function(C,O){var E;S?E=h[m+O]:(E=kt(C,f),Array.isArray(E)?A=!0:E=[w,E]);var M=E[1]==null||S&&kt(C,f)==null;return b?{x:Wh({axis:r,ticks:o,bandSize:u,entry:C,index:O}),y:M?null:i.scale(E[1]),value:E,payload:C}:{x:M?null:r.scale(E[1]),y:Wh({axis:i,ticks:l,bandSize:u,entry:C,index:O}),value:E,payload:C}}),T;return S||A?T=_.map(function(C){var O=Array.isArray(C.value)?C.value[0]:null;return b?{x:C.x,y:O!=null&&C.y!=null?i.scale(O):null}:{x:O!=null?r.scale(O):null,y:C.y}}):T=b?i.scale(w):r.scale(w),yi({points:_,baseLine:T,layout:j,isRange:A},g)});Fr(La,"renderDotItem",function(e,t){var n;if(I.isValidElement(e))n=I.cloneElement(e,t);else if(Te(e))n=e(t);else{var r=Pe("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=_$(t,Yoe);n=I.createElement(lf,ms({},o,{key:i,className:r}))}return n});function dl(e){"@babel/helpers - typeof";return dl=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},dl(e)}function rle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ale(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,M$(r.key),r)}}function ile(e,t,n){return t&&ale(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sle(e,t,n){return t=wp(t),ole(e,N$()?Reflect.construct(t,n||[],wp(e).constructor):t.apply(e,n))}function ole(e,t){if(t&&(dl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lle(e)}function lle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N$=function(){return!!e})()}function wp(e){return wp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wp(e)}function cle(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 C$(e,t,n){return t=M$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M$(e){var t=ule(e,"string");return dl(t)=="symbol"?t:t+""}function ule(e,t){if(dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function eS(){return eS=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},eS.apply(this,arguments)}function fle(e){var t=e.xAxisId,n=rA(),r=aA(),i=f$(t);return i==null?null:P.createElement(Ml,eS({},i,{className:Pe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Ta(l,!0)}}))}var Ei=(function(e){function t(){return rle(this,t),sle(this,t,arguments)}return cle(t,e),ile(t,[{key:"render",value:function(){return P.createElement(fle,this.props)}}])})(P.Component);C$(Ei,"displayName","XAxis");C$(Ei,"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 hl(e){"@babel/helpers - typeof";return hl=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},hl(e)}function dle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hle(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,k$(r.key),r)}}function ple(e,t,n){return t&&hle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mle(e,t,n){return t=Ap(t),yle(e,P$()?Reflect.construct(t,n||[],Ap(e).constructor):t.apply(e,n))}function yle(e,t){if(t&&(hl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vle(e)}function vle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P$=function(){return!!e})()}function Ap(e){return Ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ap(e)}function gle(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&&tS(e,t)}function tS(e,t){return tS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tS(e,t)}function R$(e,t,n){return t=k$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k$(e){var t=xle(e,"string");return hl(t)=="symbol"?t:t+""}function xle(e,t){if(hl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function nS(){return nS=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},nS.apply(this,arguments)}var ble=function(t){var n=t.yAxisId,r=rA(),i=aA(),o=d$(n);return o==null?null:P.createElement(Ml,nS({},o,{className:Pe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(u){return Ta(u,!0)}}))},Ni=(function(e){function t(){return dle(this,t),mle(this,t,arguments)}return gle(t,e),ple(t,[{key:"render",value:function(){return P.createElement(ble,this.props)}}])})(P.Component);R$(Ni,"displayName","YAxis");R$(Ni,"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 VD(e){return Ale(e)||wle(e)||Sle(e)||jle()}function jle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sle(e,t){if(e){if(typeof e=="string")return rS(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 rS(e,t)}}function wle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ale(e){if(Array.isArray(e))return rS(e)}function rS(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 aS=function(t,n,r,i,o){var l=Wn(t,sA),u=Wn(t,pm),f=[].concat(VD(l),VD(u)),h=Wn(t,ym),m="".concat(i,"Id"),y=i[0],g=n;if(f.length&&(g=f.reduce(function(w,b){if(b.props[m]===r&&Wr(b.props,"extendDomain")&&ce(b.props[y])){var A=b.props[y];return[Math.min(w[0],A),Math.max(w[1],A)]}return w},g)),h.length){var j="".concat(y,"1"),S="".concat(y,"2");g=h.reduce(function(w,b){if(b.props[m]===r&&Wr(b.props,"extendDomain")&&ce(b.props[j])&&ce(b.props[S])){var A=b.props[j],_=b.props[S];return[Math.min(w[0],A,_),Math.max(w[1],A,_)]}return w},g)}return o&&o.length&&(g=o.reduce(function(w,b){return ce(b)?[Math.min(w[0],b),Math.max(w[1],b)]:w},g)),g},n1={exports:{}},HD;function Ole(){return HD||(HD=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,y,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var j=new i(m,y||f,g),S=n?n+h:h;return f._events[S]?f._events[S].fn?f._events[S]=[f._events[S],j]:f._events[S].push(j):(f._events[S]=j,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new r:delete f._events[h]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],m,y;if(this._eventsCount===0)return h;for(y in m=this._events)t.call(m,y)&&h.push(n?y.slice(1):y);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},u.prototype.listeners=function(h){var m=n?n+h:h,y=this._events[m];if(!y)return[];if(y.fn)return[y.fn];for(var g=0,j=y.length,S=new Array(j);g<j;g++)S[g]=y[g].fn;return S},u.prototype.listenerCount=function(h){var m=n?n+h:h,y=this._events[m];return y?y.fn?1:y.length:0},u.prototype.emit=function(h,m,y,g,j,S){var w=n?n+h:h;if(!this._events[w])return!1;var b=this._events[w],A=arguments.length,_,T;if(b.fn){switch(b.once&&this.removeListener(h,b.fn,void 0,!0),A){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,m),!0;case 3:return b.fn.call(b.context,m,y),!0;case 4:return b.fn.call(b.context,m,y,g),!0;case 5:return b.fn.call(b.context,m,y,g,j),!0;case 6:return b.fn.call(b.context,m,y,g,j,S),!0}for(T=1,_=new Array(A-1);T<A;T++)_[T-1]=arguments[T];b.fn.apply(b.context,_)}else{var C=b.length,O;for(T=0;T<C;T++)switch(b[T].once&&this.removeListener(h,b[T].fn,void 0,!0),A){case 1:b[T].fn.call(b[T].context);break;case 2:b[T].fn.call(b[T].context,m);break;case 3:b[T].fn.call(b[T].context,m,y);break;case 4:b[T].fn.call(b[T].context,m,y,g);break;default:if(!_)for(O=1,_=new Array(A-1);O<A;O++)_[O-1]=arguments[O];b[T].fn.apply(b[T].context,_)}}return!0},u.prototype.on=function(h,m,y){return o(this,h,m,y,!1)},u.prototype.once=function(h,m,y){return o(this,h,m,y,!0)},u.prototype.removeListener=function(h,m,y,g){var j=n?n+h:h;if(!this._events[j])return this;if(!m)return l(this,j),this;var S=this._events[j];if(S.fn)S.fn===m&&(!g||S.once)&&(!y||S.context===y)&&l(this,j);else{for(var w=0,b=[],A=S.length;w<A;w++)(S[w].fn!==m||g&&!S[w].once||y&&S[w].context!==y)&&b.push(S[w]);b.length?this._events[j]=b.length===1?b[0]:b:l(this,j)}return this},u.prototype.removeAllListeners=function(h){var m;return h?(m=n?n+h:h,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(n1)),n1.exports}var _le=Ole();const Tle=at(_le);var r1=new Tle,a1="recharts.syncMouseEvents";function Hu(e){"@babel/helpers - typeof";return Hu=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},Hu(e)}function Ele(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nle(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,D$(r.key),r)}}function Cle(e,t,n){return t&&Nle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i1(e,t,n){return t=D$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D$(e){var t=Mle(e,"string");return Hu(t)=="symbol"?t:t+""}function Mle(e,t){if(Hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ple=(function(){function e(){Ele(this,e),i1(this,"activeIndex",0),i1(this,"coordinateList",[]),i1(this,"layout","horizontal")}return Cle(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,l=n.container,u=l===void 0?null:l,f=n.layout,h=f===void 0?null:f,m=n.offset,y=m===void 0?null:m,g=n.mouseHandlerCallback,j=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=u??this.container,this.layout=h??this.layout,this.offset=y??this.offset,this.mouseHandlerCallback=j??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(),o=i.x,l=i.y,u=i.height,f=this.coordinateList[this.activeIndex].coordinate,h=((n=window)===null||n===void 0?void 0:n.scrollX)||0,m=((r=window)===null||r===void 0?void 0:r.scrollY)||0,y=o+f+h,g=l+this.offset.top+u/2+m;this.mouseHandlerCallback({pageX:y,pageY:g})}}}])})();function Rle(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&&ce(r)&&ce(i))return!0}return!1}function kle(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 L$(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,l=mt(t,n,r,i),u=mt(t,n,r,o);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function Dle(e,t,n){var r,i,o,l;if(e==="horizontal")r=t.x,o=r,i=n.top,l=n.top+n.height;else if(e==="vertical")i=t.y,l=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var u=t.cx,f=t.cy,h=t.innerRadius,m=t.outerRadius,y=t.angle,g=mt(u,f,h,y),j=mt(u,f,m,y);r=g.x,i=g.y,o=j.x,l=j.y}else return L$(t);return[{x:r,y:i},{x:o,y:l}]}function Gu(e){"@babel/helpers - typeof";return Gu=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},Gu(e)}function GD(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 Kd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GD(Object(n),!0).forEach(function(r){Lle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lle(e,t,n){return t=zle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zle(e){var t=$le(e,"string");return Gu(t)=="symbol"?t:t+""}function $le(e,t){if(Gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ble(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,u=e.activePayload,f=e.offset,h=e.activeTooltipIndex,m=e.tooltipAxisBandSize,y=e.layout,g=e.chartName,j=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!j||!o||!l||g!=="ScatterChart"&&i!=="axis")return null;var S,w=bs;if(g==="ScatterChart")S=l,w=Zre;else if(g==="BarChart")S=kle(y,l,f,m),w=Qw;else if(y==="radial"){var b=L$(l),A=b.cx,_=b.cy,T=b.radius,C=b.startAngle,O=b.endAngle;S={cx:A,cy:_,startAngle:C,endAngle:O,innerRadius:T,outerRadius:T},w=k5}else S={points:Dle(y,l,f)},w=bs;var E=Kd(Kd(Kd(Kd({stroke:"#ccc",pointerEvents:"none"},f),S),je(j,!1)),{},{payload:u,payloadIndex:h,className:Pe("recharts-tooltip-cursor",j.className)});return P.isValidElement(j)?P.cloneElement(j,E):P.createElement(w,E)}var Ile=["item"],qle=["children","className","width","height","style","compact","title","desc"];function pl(e){"@babel/helpers - typeof";return pl=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},pl(e)}function ko(){return ko=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},ko.apply(this,arguments)}function FD(e,t){return Hle(e)||Vle(e,t)||$$(e,t)||Ule()}function Ule(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Hle(e){if(Array.isArray(e))return e}function KD(e,t){if(e==null)return{};var n=Gle(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gle(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 Fle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kle(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,B$(r.key),r)}}function Yle(e,t,n){return t&&Kle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xle(e,t,n){return t=Op(t),Wle(e,z$()?Reflect.construct(t,n||[],Op(e).constructor):t.apply(e,n))}function Wle(e,t){if(t&&(pl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zle(e)}function Zle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z$=function(){return!!e})()}function Op(e){return Op=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Op(e)}function Qle(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&&iS(e,t)}function iS(e,t){return iS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iS(e,t)}function ml(e){return tce(e)||ece(e)||$$(e)||Jle()}function Jle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $$(e,t){if(e){if(typeof e=="string")return sS(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 sS(e,t)}}function ece(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tce(e){if(Array.isArray(e))return sS(e)}function sS(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 YD(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 ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YD(Object(n),!0).forEach(function(r){Oe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oe(e,t,n){return t=B$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B$(e){var t=nce(e,"string");return pl(t)=="symbol"?t:t+""}function nce(e,t){if(pl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rce={xAxis:["bottom","top"],yAxis:["left","right"]},ace={width:"100%",height:"100%"},I$={x:0,y:0};function Yd(e){return e}var ice=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},sce=function(t,n,r,i){var o=n.find(function(m){return m&&m.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,u=i.radius;return ne(ne(ne({},i),mt(i.cx,i.cy,u,l)),{},{angle:l,radius:u})}var f=o.coordinate,h=i.angle;return ne(ne(ne({},i),mt(i.cx,i.cy,f,h)),{},{angle:h,radius:f})}return I$},vm=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(u,f){var h=f.props.data;return h&&h.length?[].concat(ml(u),ml(h)):u},[]);return l.length>0?l:t&&t.length&&ce(i)&&ce(o)?t.slice(i,o+1):[]};function q$(e){return e==="number"?[0,"auto"]:void 0}var oS=function(t,n,r,i){var o=t.graphicalItems,l=t.tooltipAxis,u=vm(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(f,h){var m,y=(m=h.props.data)!==null&&m!==void 0?m:n;y&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(y=y.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var j=y===void 0?u:y;g=wh(j,l.dataKey,i)}else g=y&&y[r]||u[r];return g?[].concat(ml(f),[E5(h,g)]):f},[])},XD=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},l=ice(o,r),u=t.orderedTooltipTicks,f=t.tooltipAxis,h=t.tooltipTicks,m=gee(l,u,h,f);if(m>=0&&h){var y=h[m]&&h[m].value,g=oS(t,n,m,y),j=sce(r,u,m,o);return{activeTooltipIndex:m,activeLabel:y,activePayload:g,activeCoordinate:j}}return null},oce=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,m=t.layout,y=t.children,g=t.stackOffset,j=S5(m,o);return r.reduce(function(S,w){var b,A=w.type.defaultProps!==void 0?ne(ne({},w.type.defaultProps),w.props):w.props,_=A.type,T=A.dataKey,C=A.allowDataOverflow,O=A.allowDuplicatedCategory,E=A.scale,M=A.ticks,D=A.includeHidden,k=A[l];if(S[k])return S;var B=vm(t.data,{graphicalItems:i.filter(function(G){var re,fe=l in G.props?G.props[l]:(re=G.type.defaultProps)===null||re===void 0?void 0:re[l];return fe===k}),dataStartIndex:f,dataEndIndex:h}),q=B.length,$,F,X;Rle(A.domain,C,_)&&($=bj(A.domain,null,C),j&&(_==="number"||E!=="auto")&&(X=tu(B,T,"category")));var Y=q$(_);if(!$||$.length===0){var L,H=(L=A.domain)!==null&&L!==void 0?L:Y;if(T){if($=tu(B,T,_),_==="category"&&j){var Q=dF($);O&&Q?(F=$,$=up(0,q)):O||($=XR(H,$,w).reduce(function(G,re){return G.indexOf(re)>=0?G:[].concat(ml(G),[re])},[]))}else if(_==="category")O?$=$.filter(function(G){return G!==""&&!Ne(G)}):$=XR(H,$,w).reduce(function(G,re){return G.indexOf(re)>=0||re===""||Ne(re)?G:[].concat(ml(G),[re])},[]);else if(_==="number"){var ae=wee(B,i.filter(function(G){var re,fe,me=l in G.props?G.props[l]:(re=G.type.defaultProps)===null||re===void 0?void 0:re[l],we="hide"in G.props?G.props.hide:(fe=G.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return me===k&&(D||!we)}),T,o,m);ae&&($=ae)}j&&(_==="number"||E!=="auto")&&(X=tu(B,T,"category"))}else j?$=up(0,q):u&&u[k]&&u[k].hasStack&&_==="number"?$=g==="expand"?[0,1]:T5(u[k].stackGroups,f,h):$=j5(B,i.filter(function(G){var re=l in G.props?G.props[l]:G.type.defaultProps[l],fe="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return re===k&&(D||!fe)}),_,m,!0);if(_==="number")$=aS(y,$,k,o,M),H&&($=bj(H,$,C));else if(_==="category"&&H){var oe=H,z=$.every(function(G){return oe.indexOf(G)>=0});z&&($=oe)}}return ne(ne({},S),{},Oe({},k,ne(ne({},A),{},{axisType:o,domain:$,categoricalDomain:X,duplicateDomain:F,originalDomain:(b=A.domain)!==null&&b!==void 0?b:Y,isCategorical:j,layout:m})))},{})},lce=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,m=t.layout,y=t.children,g=vm(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:h}),j=g.length,S=S5(m,o),w=-1;return r.reduce(function(b,A){var _=A.type.defaultProps!==void 0?ne(ne({},A.type.defaultProps),A.props):A.props,T=_[l],C=q$("number");if(!b[T]){w++;var O;return S?O=up(0,j):u&&u[T]&&u[T].hasStack?(O=T5(u[T].stackGroups,f,h),O=aS(y,O,T,o)):(O=bj(C,j5(g,r.filter(function(E){var M,D,k=l in E.props?E.props[l]:(M=E.type.defaultProps)===null||M===void 0?void 0:M[l],B="hide"in E.props?E.props.hide:(D=E.type.defaultProps)===null||D===void 0?void 0:D.hide;return k===T&&!B}),"number",m),i.defaultProps.allowDataOverflow),O=aS(y,O,T,o)),ne(ne({},b),{},Oe({},T,ne(ne({axisType:o},i.defaultProps),{},{hide:!0,orientation:Xn(rce,"".concat(o,".").concat(w%2),null),domain:O,originalDomain:C,isCategorical:S,layout:m})))}return b},{})},cce=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,u=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,m=t.children,y="".concat(i,"Id"),g=Wn(m,o),j={};return g&&g.length?j=oce(t,{axes:g,graphicalItems:l,axisType:i,axisIdKey:y,stackGroups:u,dataStartIndex:f,dataEndIndex:h}):l&&l.length&&(j=lce(t,{Axis:o,graphicalItems:l,axisType:i,axisIdKey:y,stackGroups:u,dataStartIndex:f,dataEndIndex:h})),j},uce=function(t){var n=gi(t),r=Ta(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Ow(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Zh(n,r)}},WD=function(t){var n=t.children,r=t.defaultShowTooltip,i=Gn(n,al),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(l=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},fce=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ea(n&&n.type);return r&&r.indexOf("Bar")>=0})},ZD=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"}},dce=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,u=t.yAxisMap,f=u===void 0?{}:u,h=r.width,m=r.height,y=r.children,g=r.margin||{},j=Gn(y,al),S=Gn(y,zo),w=Object.keys(f).reduce(function(O,E){var M=f[E],D=M.orientation;return!M.mirror&&!M.hide?ne(ne({},O),{},Oe({},D,O[D]+M.width)):O},{left:g.left||0,right:g.right||0}),b=Object.keys(l).reduce(function(O,E){var M=l[E],D=M.orientation;return!M.mirror&&!M.hide?ne(ne({},O),{},Oe({},D,Xn(O,"".concat(D))+M.height)):O},{top:g.top||0,bottom:g.bottom||0}),A=ne(ne({},b),w),_=A.bottom;j&&(A.bottom+=j.props.height||al.defaultProps.height),S&&n&&(A=jee(A,i,r,n));var T=h-A.left-A.right,C=m-A.top-A.bottom;return ne(ne({brushBottom:_},A),{},{width:Math.max(T,0),height:Math.max(C,0)})},hce=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},gm=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,l=t.validateTooltipEventTypes,u=l===void 0?["axis"]:l,f=t.axisComponents,h=t.legendContent,m=t.formatAxisMap,y=t.defaultProps,g=function(A,_){var T=_.graphicalItems,C=_.stackGroups,O=_.offset,E=_.updateId,M=_.dataStartIndex,D=_.dataEndIndex,k=A.barSize,B=A.layout,q=A.barGap,$=A.barCategoryGap,F=A.maxBarSize,X=ZD(B),Y=X.numericAxisName,L=X.cateAxisName,H=fce(T),Q=[];return T.forEach(function(ae,oe){var z=vm(A.data,{graphicalItems:[ae],dataStartIndex:M,dataEndIndex:D}),G=ae.type.defaultProps!==void 0?ne(ne({},ae.type.defaultProps),ae.props):ae.props,re=G.dataKey,fe=G.maxBarSize,me=G["".concat(Y,"Id")],we=G["".concat(L,"Id")],ze={},Ze=f.reduce(function(xr,na){var Pl=_["".concat(na.axisType,"Map")],dn=G["".concat(na.axisType,"Id")];Pl&&Pl[dn]||na.axisType==="zAxis"||Ts();var uf=Pl[dn];return ne(ne({},xr),{},Oe(Oe({},na.axisType,uf),"".concat(na.axisType,"Ticks"),Ta(uf)))},ze),ue=Ze[L],Ee=Ze["".concat(L,"Ticks")],Ce=C&&C[me]&&C[me].hasStack&&Pee(ae,C[me].stackGroups),le=Ea(ae.type).indexOf("Bar")>=0,yt=Zh(ue,Ee),ke=[],Ot=H&&xee({barSize:k,stackGroups:C,totalSize:hce(Ze,L)});if(le){var _t,fn,gr=Ne(fe)?F:fe,$r=(_t=(fn=Zh(ue,Ee,!0))!==null&&fn!==void 0?fn:gr)!==null&&_t!==void 0?_t:0;ke=bee({barGap:q,barCategoryGap:$,bandSize:$r!==yt?$r:yt,sizeList:Ot[we],maxBarSize:gr}),$r!==yt&&(ke=ke.map(function(xr){return ne(ne({},xr),{},{position:ne(ne({},xr.position),{},{offset:xr.position.offset-$r/2})})}))}var qa=ae&&ae.type&&ae.type.getComposedData;qa&&Q.push({props:ne(ne({},qa(ne(ne({},Ze),{},{displayedData:z,props:A,dataKey:re,item:ae,bandSize:yt,barPosition:ke,offset:O,stackedData:Ce,layout:B,dataStartIndex:M,dataEndIndex:D}))),{},Oe(Oe(Oe({key:ae.key||"item-".concat(oe)},Y,Ze[Y]),L,Ze[L]),"animationId",E)),childIndex:AF(ae,A.children),item:ae})}),Q},j=function(A,_){var T=A.props,C=A.dataStartIndex,O=A.dataEndIndex,E=A.updateId;if(!uC({props:T}))return null;var M=T.children,D=T.layout,k=T.stackOffset,B=T.data,q=T.reverseStackOrder,$=ZD(D),F=$.numericAxisName,X=$.cateAxisName,Y=Wn(M,r),L=Cee(B,Y,"".concat(F,"Id"),"".concat(X,"Id"),k,q),H=f.reduce(function(G,re){var fe="".concat(re.axisType,"Map");return ne(ne({},G),{},Oe({},fe,cce(T,ne(ne({},re),{},{graphicalItems:Y,stackGroups:re.axisType===F&&L,dataStartIndex:C,dataEndIndex:O}))))},{}),Q=dce(ne(ne({},H),{},{props:T,graphicalItems:Y}),_==null?void 0:_.legendBBox);Object.keys(H).forEach(function(G){H[G]=m(T,H[G],Q,G.replace("Map",""),n)});var ae=H["".concat(X,"Map")],oe=uce(ae),z=g(T,ne(ne({},H),{},{dataStartIndex:C,dataEndIndex:O,updateId:E,graphicalItems:Y,stackGroups:L,offset:Q}));return ne(ne({formattedGraphicalItems:z,graphicalItems:Y,offset:Q,stackGroups:L},oe),H)},S=(function(b){function A(_){var T,C,O;return Fle(this,A),O=Xle(this,A,[_]),Oe(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Oe(O,"accessibilityManager",new Ple),Oe(O,"handleLegendBBoxUpdate",function(E){if(E){var M=O.state,D=M.dataStartIndex,k=M.dataEndIndex,B=M.updateId;O.setState(ne({legendBBox:E},j({props:O.props,dataStartIndex:D,dataEndIndex:k,updateId:B},ne(ne({},O.state),{},{legendBBox:E}))))}}),Oe(O,"handleReceiveSyncEvent",function(E,M,D){if(O.props.syncId===E){if(D===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(M)}}),Oe(O,"handleBrushChange",function(E){var M=E.startIndex,D=E.endIndex;if(M!==O.state.dataStartIndex||D!==O.state.dataEndIndex){var k=O.state.updateId;O.setState(function(){return ne({dataStartIndex:M,dataEndIndex:D},j({props:O.props,dataStartIndex:M,dataEndIndex:D,updateId:k},O.state))}),O.triggerSyncEvent({dataStartIndex:M,dataEndIndex:D})}}),Oe(O,"handleMouseEnter",function(E){var M=O.getMouseInfo(E);if(M){var D=ne(ne({},M),{},{isTooltipActive:!0});O.setState(D),O.triggerSyncEvent(D);var k=O.props.onMouseEnter;Te(k)&&k(D,E)}}),Oe(O,"triggeredAfterMouseMove",function(E){var M=O.getMouseInfo(E),D=M?ne(ne({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(D),O.triggerSyncEvent(D);var k=O.props.onMouseMove;Te(k)&&k(D,E)}),Oe(O,"handleItemMouseEnter",function(E){O.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Oe(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),Oe(O,"handleMouseMove",function(E){E.persist(),O.throttleTriggeredAfterMouseMove(E)}),Oe(O,"handleMouseLeave",function(E){O.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};O.setState(M),O.triggerSyncEvent(M);var D=O.props.onMouseLeave;Te(D)&&D(M,E)}),Oe(O,"handleOuterEvent",function(E){var M=wF(E),D=Xn(O.props,"".concat(M));if(M&&Te(D)){var k,B;/.*touch.*/i.test(M)?B=O.getMouseInfo(E.changedTouches[0]):B=O.getMouseInfo(E),D((k=B)!==null&&k!==void 0?k:{},E)}}),Oe(O,"handleClick",function(E){var M=O.getMouseInfo(E);if(M){var D=ne(ne({},M),{},{isTooltipActive:!0});O.setState(D),O.triggerSyncEvent(D);var k=O.props.onClick;Te(k)&&k(D,E)}}),Oe(O,"handleMouseDown",function(E){var M=O.props.onMouseDown;if(Te(M)){var D=O.getMouseInfo(E);M(D,E)}}),Oe(O,"handleMouseUp",function(E){var M=O.props.onMouseUp;if(Te(M)){var D=O.getMouseInfo(E);M(D,E)}}),Oe(O,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Oe(O,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.handleMouseDown(E.changedTouches[0])}),Oe(O,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.handleMouseUp(E.changedTouches[0])}),Oe(O,"handleDoubleClick",function(E){var M=O.props.onDoubleClick;if(Te(M)){var D=O.getMouseInfo(E);M(D,E)}}),Oe(O,"handleContextMenu",function(E){var M=O.props.onContextMenu;if(Te(M)){var D=O.getMouseInfo(E);M(D,E)}}),Oe(O,"triggerSyncEvent",function(E){O.props.syncId!==void 0&&r1.emit(a1,O.props.syncId,E,O.eventEmitterSymbol)}),Oe(O,"applySyncEvent",function(E){var M=O.props,D=M.layout,k=M.syncMethod,B=O.state.updateId,q=E.dataStartIndex,$=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)O.setState(ne({dataStartIndex:q,dataEndIndex:$},j({props:O.props,dataStartIndex:q,dataEndIndex:$,updateId:B},O.state)));else if(E.activeTooltipIndex!==void 0){var F=E.chartX,X=E.chartY,Y=E.activeTooltipIndex,L=O.state,H=L.offset,Q=L.tooltipTicks;if(!H)return;if(typeof k=="function")Y=k(Q,E);else if(k==="value"){Y=-1;for(var ae=0;ae<Q.length;ae++)if(Q[ae].value===E.activeLabel){Y=ae;break}}var oe=ne(ne({},H),{},{x:H.left,y:H.top}),z=Math.min(F,oe.x+oe.width),G=Math.min(X,oe.y+oe.height),re=Q[Y]&&Q[Y].value,fe=oS(O.state,O.props.data,Y),me=Q[Y]?{x:D==="horizontal"?Q[Y].coordinate:z,y:D==="horizontal"?G:Q[Y].coordinate}:I$;O.setState(ne(ne({},E),{},{activeLabel:re,activeCoordinate:me,activePayload:fe,activeTooltipIndex:Y}))}else O.setState(E)}),Oe(O,"renderCursor",function(E){var M,D=O.state,k=D.isTooltipActive,B=D.activeCoordinate,q=D.activePayload,$=D.offset,F=D.activeTooltipIndex,X=D.tooltipAxisBandSize,Y=O.getTooltipEventType(),L=(M=E.props.active)!==null&&M!==void 0?M:k,H=O.props.layout,Q=E.key||"_recharts-cursor";return I.createElement(Ble,{key:Q,activeCoordinate:B,activePayload:q,activeTooltipIndex:F,chartName:n,element:E,isActive:L,layout:H,offset:$,tooltipAxisBandSize:X,tooltipEventType:Y})}),Oe(O,"renderPolarAxis",function(E,M,D){var k=Xn(E,"type.axisType"),B=Xn(O.state,"".concat(k,"Map")),q=E.type.defaultProps,$=q!==void 0?ne(ne({},q),E.props):E.props,F=B&&B[$["".concat(k,"Id")]];return P.cloneElement(E,ne(ne({},F),{},{className:Pe(k,F.className),key:E.key||"".concat(M,"-").concat(D),ticks:Ta(F,!0)}))}),Oe(O,"renderPolarGrid",function(E){var M=E.props,D=M.radialLines,k=M.polarAngles,B=M.polarRadius,q=O.state,$=q.radiusAxisMap,F=q.angleAxisMap,X=gi($),Y=gi(F),L=Y.cx,H=Y.cy,Q=Y.innerRadius,ae=Y.outerRadius;return P.cloneElement(E,{polarAngles:Array.isArray(k)?k:Ta(Y,!0).map(function(oe){return oe.coordinate}),polarRadius:Array.isArray(B)?B:Ta(X,!0).map(function(oe){return oe.coordinate}),cx:L,cy:H,innerRadius:Q,outerRadius:ae,key:E.key||"polar-grid",radialLines:D})}),Oe(O,"renderLegend",function(){var E=O.state.formattedGraphicalItems,M=O.props,D=M.children,k=M.width,B=M.height,q=O.props.margin||{},$=k-(q.left||0)-(q.right||0),F=x5({children:D,formattedGraphicalItems:E,legendWidth:$,legendContent:h});if(!F)return null;var X=F.item,Y=KD(F,Ile);return P.cloneElement(X,ne(ne({},Y),{},{chartWidth:k,chartHeight:B,margin:q,onBBoxUpdate:O.handleLegendBBoxUpdate}))}),Oe(O,"renderTooltip",function(){var E,M=O.props,D=M.children,k=M.accessibilityLayer,B=Gn(D,Fn);if(!B)return null;var q=O.state,$=q.isTooltipActive,F=q.activeCoordinate,X=q.activePayload,Y=q.activeLabel,L=q.offset,H=(E=B.props.active)!==null&&E!==void 0?E:$;return P.cloneElement(B,{viewBox:ne(ne({},L),{},{x:L.left,y:L.top}),active:H,label:Y,payload:H?X:[],coordinate:F,accessibilityLayer:k})}),Oe(O,"renderBrush",function(E){var M=O.props,D=M.margin,k=M.data,B=O.state,q=B.offset,$=B.dataStartIndex,F=B.dataEndIndex,X=B.updateId;return P.cloneElement(E,{key:E.key||"_recharts-brush",onChange:Vd(O.handleBrushChange,E.props.onChange),data:k,x:ce(E.props.x)?E.props.x:q.left,y:ce(E.props.y)?E.props.y:q.top+q.height+q.brushBottom-(D.bottom||0),width:ce(E.props.width)?E.props.width:q.width,startIndex:$,endIndex:F,updateId:"brush-".concat(X)})}),Oe(O,"renderReferenceElement",function(E,M,D){if(!E)return null;var k=O,B=k.clipPathId,q=O.state,$=q.xAxisMap,F=q.yAxisMap,X=q.offset,Y=E.type.defaultProps||{},L=E.props,H=L.xAxisId,Q=H===void 0?Y.xAxisId:H,ae=L.yAxisId,oe=ae===void 0?Y.yAxisId:ae;return P.cloneElement(E,{key:E.key||"".concat(M,"-").concat(D),xAxis:$[Q],yAxis:F[oe],viewBox:{x:X.left,y:X.top,width:X.width,height:X.height},clipPathId:B})}),Oe(O,"renderActivePoints",function(E){var M=E.item,D=E.activePoint,k=E.basePoint,B=E.childIndex,q=E.isRange,$=[],F=M.props.key,X=M.item.type.defaultProps!==void 0?ne(ne({},M.item.type.defaultProps),M.item.props):M.item.props,Y=X.activeDot,L=X.dataKey,H=ne(ne({index:B,dataKey:L,cx:D.x,cy:D.y,r:4,fill:Zw(M.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},je(Y,!1)),Ah(Y));return $.push(A.renderActiveDot(Y,H,"".concat(F,"-activePoint-").concat(B))),k?$.push(A.renderActiveDot(Y,ne(ne({},H),{},{cx:k.x,cy:k.y}),"".concat(F,"-basePoint-").concat(B))):q&&$.push(null),$}),Oe(O,"renderGraphicChild",function(E,M,D){var k=O.filterFormatItem(E,M,D);if(!k)return null;var B=O.getTooltipEventType(),q=O.state,$=q.isTooltipActive,F=q.tooltipAxis,X=q.activeTooltipIndex,Y=q.activeLabel,L=O.props.children,H=Gn(L,Fn),Q=k.props,ae=Q.points,oe=Q.isRange,z=Q.baseLine,G=k.item.type.defaultProps!==void 0?ne(ne({},k.item.type.defaultProps),k.item.props):k.item.props,re=G.activeDot,fe=G.hide,me=G.activeBar,we=G.activeShape,ze=!!(!fe&&$&&H&&(re||me||we)),Ze={};B!=="axis"&&H&&H.props.trigger==="click"?Ze={onClick:Vd(O.handleItemMouseEnter,E.props.onClick)}:B!=="axis"&&(Ze={onMouseLeave:Vd(O.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:Vd(O.handleItemMouseEnter,E.props.onMouseEnter)});var ue=P.cloneElement(E,ne(ne({},k.props),Ze));function Ee(na){return typeof F.dataKey=="function"?F.dataKey(na.payload):null}if(ze)if(X>=0){var Ce,le;if(F.dataKey&&!F.allowDuplicatedCategory){var yt=typeof F.dataKey=="function"?Ee:"payload.".concat(F.dataKey.toString());Ce=wh(ae,yt,Y),le=oe&&z&&wh(z,yt,Y)}else Ce=ae==null?void 0:ae[X],le=oe&&z&&z[X];if(we||me){var ke=E.props.activeIndex!==void 0?E.props.activeIndex:X;return[P.cloneElement(E,ne(ne(ne({},k.props),Ze),{},{activeIndex:ke})),null,null]}if(!Ne(Ce))return[ue].concat(ml(O.renderActivePoints({item:k,activePoint:Ce,basePoint:le,childIndex:X,isRange:oe})))}else{var Ot,_t=(Ot=O.getItemByXY(O.state.activeCoordinate))!==null&&Ot!==void 0?Ot:{graphicalItem:ue},fn=_t.graphicalItem,gr=fn.item,$r=gr===void 0?E:gr,qa=fn.childIndex,xr=ne(ne(ne({},k.props),Ze),{},{activeIndex:qa});return[P.cloneElement($r,xr),null,null]}return oe?[ue,null,null]:[ue,null]}),Oe(O,"renderCustomized",function(E,M,D){return P.cloneElement(E,ne(ne({key:"recharts-customized-".concat(D)},O.props),O.state))}),Oe(O,"renderMap",{CartesianGrid:{handler:Yd,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:Yd},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:Yd},YAxis:{handler:Yd},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((T=_.id)!==null&&T!==void 0?T:Ms("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=xz(O.triggeredAfterMouseMove,(C=_.throttleDelay)!==null&&C!==void 0?C:1e3/60),O.state={},O}return Qle(A,b),Yle(A,[{key:"componentDidMount",value:function(){var T,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var T=this.props,C=T.children,O=T.data,E=T.height,M=T.layout,D=Gn(C,Fn);if(D){var k=D.props.defaultIndex;if(!(typeof k!="number"||k<0||k>this.state.tooltipTicks.length-1)){var B=this.state.tooltipTicks[k]&&this.state.tooltipTicks[k].value,q=oS(this.state,O,k,B),$=this.state.tooltipTicks[k].coordinate,F=(this.state.offset.top+E)/2,X=M==="horizontal",Y=X?{x:$,y:F}:{y:$,x:F},L=this.state.formattedGraphicalItems.find(function(Q){var ae=Q.item;return ae.type.name==="Scatter"});L&&(Y=ne(ne({},Y),L.props.points[k].tooltipPosition),q=L.props.points[k].tooltipPayload);var H={activeTooltipIndex:k,isTooltipActive:!0,activeLabel:B,activePayload:q,activeCoordinate:Y};this.setState(H),this.renderCursor(D),this.accessibilityManager.setIndex(k)}}}},{key:"getSnapshotBeforeUpdate",value:function(T,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==T.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==T.margin){var O,E;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(T){U1([Gn(T.children,Fn)],[Gn(this.props.children,Fn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var T=Gn(this.props.children,Fn);if(T&&typeof T.props.shared=="boolean"){var C=T.props.shared?"axis":"item";return u.indexOf(C)>=0?C:o}return o}},{key:"getMouseInfo",value:function(T){if(!this.container)return null;var C=this.container,O=C.getBoundingClientRect(),E=uW(O),M={chartX:Math.round(T.pageX-E.left),chartY:Math.round(T.pageY-E.top)},D=O.width/C.offsetWidth||1,k=this.inRange(M.chartX,M.chartY,D);if(!k)return null;var B=this.state,q=B.xAxisMap,$=B.yAxisMap,F=this.getTooltipEventType(),X=XD(this.state,this.props.data,this.props.layout,k);if(F!=="axis"&&q&&$){var Y=gi(q).scale,L=gi($).scale,H=Y&&Y.invert?Y.invert(M.chartX):null,Q=L&&L.invert?L.invert(M.chartY):null;return ne(ne({},M),{},{xValue:H,yValue:Q},X)}return X?ne(ne({},M),X):null}},{key:"inRange",value:function(T,C){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,M=T/O,D=C/O;if(E==="horizontal"||E==="vertical"){var k=this.state.offset,B=M>=k.left&&M<=k.left+k.width&&D>=k.top&&D<=k.top+k.height;return B?{x:M,y:D}:null}var q=this.state,$=q.angleAxisMap,F=q.radiusAxisMap;if($&&F){var X=gi($);return QR({x:M,y:D},X)}return null}},{key:"parseEventsOfWrapper",value:function(){var T=this.props.children,C=this.getTooltipEventType(),O=Gn(T,Fn),E={};O&&C==="axis"&&(O.props.trigger==="click"?E={onClick:this.handleClick}:E={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 M=Ah(this.props,this.handleOuterEvent);return ne(ne({},M),E)}},{key:"addListener",value:function(){r1.on(a1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){r1.removeListener(a1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(T,C,O){for(var E=this.state.formattedGraphicalItems,M=0,D=E.length;M<D;M++){var k=E[M];if(k.item===T||k.props.key===T.key||C===Ea(k.item.type)&&O===k.childIndex)return k}return null}},{key:"renderClipPath",value:function(){var T=this.clipPathId,C=this.state.offset,O=C.left,E=C.top,M=C.height,D=C.width;return I.createElement("defs",null,I.createElement("clipPath",{id:T},I.createElement("rect",{x:O,y:E,height:M,width:D})))}},{key:"getXScales",value:function(){var T=this.state.xAxisMap;return T?Object.entries(T).reduce(function(C,O){var E=FD(O,2),M=E[0],D=E[1];return ne(ne({},C),{},Oe({},M,D.scale))},{}):null}},{key:"getYScales",value:function(){var T=this.state.yAxisMap;return T?Object.entries(T).reduce(function(C,O){var E=FD(O,2),M=E[0],D=E[1];return ne(ne({},C),{},Oe({},M,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(T){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[T])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(T){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[T])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(T){var C=this.state,O=C.formattedGraphicalItems,E=C.activeItem;if(O&&O.length)for(var M=0,D=O.length;M<D;M++){var k=O[M],B=k.props,q=k.item,$=q.type.defaultProps!==void 0?ne(ne({},q.type.defaultProps),q.props):q.props,F=Ea(q.type);if(F==="Bar"){var X=(B.data||[]).find(function(Q){return Mre(T,Q)});if(X)return{graphicalItem:k,payload:X}}else if(F==="RadialBar"){var Y=(B.data||[]).find(function(Q){return QR(T,Q)});if(Y)return{graphicalItem:k,payload:Y}}else if(um(k,E)||fm(k,E)||Bu(k,E)){var L=eie({graphicalItem:k,activeTooltipItem:E,itemData:$.data}),H=$.activeIndex===void 0?L:$.activeIndex;return{graphicalItem:ne(ne({},k),{},{childIndex:H}),payload:Bu(k,E)?$.data[L]:k.props.data[L]}}}return null}},{key:"render",value:function(){var T=this;if(!uC(this))return null;var C=this.props,O=C.children,E=C.className,M=C.width,D=C.height,k=C.style,B=C.compact,q=C.title,$=C.desc,F=KD(C,qle),X=je(F,!1);if(B)return I.createElement(OD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement(H1,ko({},X,{width:M,height:D,title:q,desc:$}),this.renderClipPath(),dC(O,this.renderMap)));if(this.props.accessibilityLayer){var Y,L;X.tabIndex=(Y=this.props.tabIndex)!==null&&Y!==void 0?Y:0,X.role=(L=this.props.role)!==null&&L!==void 0?L:"application",X.onKeyDown=function(Q){T.accessibilityManager.keyboardEvent(Q)},X.onFocus=function(){T.accessibilityManager.focus()}}var H=this.parseEventsOfWrapper();return I.createElement(OD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement("div",ko({className:Pe("recharts-wrapper",E),style:ne({position:"relative",cursor:"default",width:M,height:D},k)},H,{ref:function(ae){T.container=ae}}),I.createElement(H1,ko({},X,{width:M,height:D,title:q,desc:$,style:ace}),this.renderClipPath(),dC(O,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(P.Component);Oe(S,"displayName",n),Oe(S,"defaultProps",ne({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},y)),Oe(S,"getDerivedStateFromProps",function(b,A){var _=b.dataKey,T=b.data,C=b.children,O=b.width,E=b.height,M=b.layout,D=b.stackOffset,k=b.margin,B=A.dataStartIndex,q=A.dataEndIndex;if(A.updateId===void 0){var $=WD(b);return ne(ne(ne({},$),{},{updateId:0},j(ne(ne({props:b},$),{},{updateId:0}),A)),{},{prevDataKey:_,prevData:T,prevWidth:O,prevHeight:E,prevLayout:M,prevStackOffset:D,prevMargin:k,prevChildren:C})}if(_!==A.prevDataKey||T!==A.prevData||O!==A.prevWidth||E!==A.prevHeight||M!==A.prevLayout||D!==A.prevStackOffset||!Lo(k,A.prevMargin)){var F=WD(b),X={chartX:A.chartX,chartY:A.chartY,isTooltipActive:A.isTooltipActive},Y=ne(ne({},XD(A,T,M)),{},{updateId:A.updateId+1}),L=ne(ne(ne({},F),X),Y);return ne(ne(ne({},L),j(ne({props:b},L),A)),{},{prevDataKey:_,prevData:T,prevWidth:O,prevHeight:E,prevLayout:M,prevStackOffset:D,prevMargin:k,prevChildren:C})}if(!U1(C,A.prevChildren)){var H,Q,ae,oe,z=Gn(C,al),G=z&&(H=(Q=z.props)===null||Q===void 0?void 0:Q.startIndex)!==null&&H!==void 0?H:B,re=z&&(ae=(oe=z.props)===null||oe===void 0?void 0:oe.endIndex)!==null&&ae!==void 0?ae:q,fe=G!==B||re!==q,me=!Ne(T),we=me&&!fe?A.updateId:A.updateId+1;return ne(ne({updateId:we},j(ne(ne({props:b},A),{},{updateId:we,dataStartIndex:G,dataEndIndex:re}),A)),{},{prevChildren:C,dataStartIndex:G,dataEndIndex:re})}return null}),Oe(S,"renderActiveDot",function(b,A,_){var T;return P.isValidElement(b)?T=P.cloneElement(b,A):Te(b)?T=b(A):T=I.createElement(lf,A),I.createElement(Ie,{className:"recharts-active-dot",key:_},T)});var w=P.forwardRef(function(A,_){return I.createElement(S,ko({},A,{ref:_}))});return w.displayName=S.displayName,w},pce=gm({chartName:"LineChart",GraphicalChild:cf,axisComponents:[{axisType:"xAxis",AxisComp:Ei},{axisType:"yAxis",AxisComp:Ni}],formatAxisMap:Jw}),mce=gm({chartName:"BarChart",GraphicalChild:Ti,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ei},{axisType:"yAxis",AxisComp:Ni}],formatAxisMap:Jw}),yce=gm({chartName:"PieChart",GraphicalChild:Ia,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:cm},{axisType:"radiusAxis",AxisComp:om}],formatAxisMap:Uee,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),vce=gm({chartName:"AreaChart",GraphicalChild:La,axisComponents:[{axisType:"xAxis",AxisComp:Ei},{axisType:"yAxis",AxisComp:Ni}],formatAxisMap:Jw});function he({children:e,className:t,hover:n=!1,padding:r="lg"}){const i={sm:"p-4",md:"p-5",lg:"p-6 md:p-8"};return d.jsx(vn.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},className:Tt("bg-surface rounded-[20px] card-shadow",i[r],n&&"transition-shadow duration-200 hover:shadow-hover cursor-pointer",t),children:e})}function We({title:e,subtitle:t,action:n,className:r}){return d.jsxs("div",{className:Tt("flex items-start justify-between mb-6",r),children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-base font-semibold text-text-primary",children:e}),t&&d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:t})]}),n&&d.jsx("div",{children:n})]})}const gce=[{month:"Jan",revenue:42e3,target:45e3},{month:"Feb",revenue:48e3,target:46e3},{month:"Mar",revenue:51e3,target:48e3},{month:"Apr",revenue:47e3,target:5e4},{month:"May",revenue:56e3,target:52e3},{month:"Jun",revenue:62e3,target:55e3},{month:"Jul",revenue:58e3,target:57e3},{month:"Aug",revenue:67e3,target:6e4},{month:"Sep",revenue:71e3,target:63e3},{month:"Oct",revenue:69e3,target:66e3},{month:"Nov",revenue:78e3,target:7e4},{month:"Dec",revenue:85e3,target:75e3}],xce=[{key:"revenue",label:"Revenue"},{key:"mrr",label:"MRR"},{key:"arr",label:"ARR"}];function bce(e){return`${(e/1e3).toFixed(0)}k`}function jce(){const[e,t]=P.useState("revenue");return d.jsxs(he,{children:[d.jsx(We,{title:"Revenue Overview",subtitle:"Monthly revenue vs target",action:d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:xce.map(n=>d.jsx("button",{onClick:()=>t(n.key),className:Tt("px-3 py-1.5 text-xs font-medium rounded-lg transition-colors",e===n.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:n.label},n.key))})}),d.jsx("div",{className:"h-[280px]",children:d.jsx(kh,{width:"100%",height:"100%",children:d.jsxs(vce,{data:gce,margin:{top:5,right:5,left:-10,bottom:0},children:[d.jsx("defs",{children:d.jsxs("linearGradient",{id:"colorRevenue",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"#2563EB",stopOpacity:.08}),d.jsx("stop",{offset:"95%",stopColor:"#2563EB",stopOpacity:0})]})}),d.jsx(bp,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),d.jsx(Ei,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),d.jsx(Ni,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:bce,dx:-5}),d.jsx(Fn,{content:({active:n,payload:r,label:i})=>!n||!(r!=null&&r.length)?null:d.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[d.jsx("p",{className:"text-xs font-medium text-text-secondary mb-2",children:i}),r.map((o,l)=>d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:o.color||"#2563EB"}}),d.jsxs("span",{className:"text-text-secondary",children:[o.name,":"]}),d.jsxs("span",{className:"font-semibold text-text-primary",children:["€",Number(o.value).toLocaleString()]})]},l))]})}),d.jsx(La,{type:"monotone",dataKey:"revenue",stroke:"#2563EB",strokeWidth:2,fill:"url(#colorRevenue)",dot:!1,activeDot:{r:4,strokeWidth:0,fill:"#2563EB"}}),d.jsx(La,{type:"monotone",dataKey:"target",stroke:"#9CA3AF",strokeWidth:1.5,strokeDasharray:"4 4",fill:"none",dot:!1})]})})})]})}function Ke({children:e,variant:t="default",size:n="sm",className:r}){const i={default:"bg-bg text-text-secondary",success:"bg-success-light text-success",warning:"bg-warning-light text-warning",danger:"bg-danger-light text-danger",primary:"bg-primary-light text-primary"},o={sm:"px-2 py-0.5 text-[11px]",md:"px-2.5 py-1 text-xs"};return d.jsx("span",{className:Tt("inline-flex items-center rounded-full font-medium",i[t],o[n],r),children:e})}const Sce=[{id:"1",type:"deal",title:"Enterprise deal closed",description:"Acme Corp signed €85,000 contract",time:new Date(Date.now()-1e3*60*15).toISOString(),user:"Sarah Chen"},{id:"2",type:"customer",title:"New customer onboarded",description:"TechStart AB joined as a premium client",time:new Date(Date.now()-1e3*60*45).toISOString(),user:"Marcus Lind"},{id:"3",type:"invoice",title:"Invoice #INV-2024-0089 paid",description:"€12,400 received from Nordic Solutions",time:new Date(Date.now()-1e3*60*60*2).toISOString()},{id:"4",type:"contract",title:"Contract renewed",description:"Global Industries extended for 2 years",time:new Date(Date.now()-1e3*60*60*4).toISOString(),user:"Elena Rossi"},{id:"5",type:"employee",title:"New team member",description:"Johan Berg joined the Engineering team",time:new Date(Date.now()-1e3*60*60*6).toISOString()},{id:"6",type:"deal",title:"Deal moved to negotiation",description:"MegaCorp €120K proposal under review",time:new Date(Date.now()-1e3*60*60*8).toISOString(),user:"Sarah Chen"}],wce={deal:{icon:Mr,color:"primary",label:"Deal"},customer:{icon:Pa,color:"success",label:"Customer"},invoice:{icon:bi,color:"warning",label:"Invoice"},contract:{icon:mH,color:"primary",label:"Contract"},employee:{icon:z1,color:"success",label:"HR"}};function Ace(){return d.jsxs(he,{children:[d.jsx(We,{title:"Recent Activity",subtitle:"Latest updates across your organization"}),d.jsx("div",{className:"space-y-0",children:Sce.map((e,t)=>{const n=wce[e.type],r=n.icon;return d.jsxs(vn.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.15,delay:t*.03},className:"flex items-start gap-3 py-3.5 border-b border-border/40 last:border-0",children:[d.jsx("div",{className:`w-9 h-9 rounded-xl bg-${n.color}-light flex items-center justify-center shrink-0`,children:d.jsx(r,{size:16,className:`text-${n.color}`})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("p",{className:"text-sm font-medium text-text-primary truncate",children:e.title}),d.jsx(Ke,{variant:n.color,size:"sm",children:n.label})]}),d.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.description}),d.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[d.jsx("span",{className:"text-[11px] text-text-secondary/60",children:aw(e.time)}),e.user&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-[11px] text-text-secondary/40",children:"·"}),d.jsx("span",{className:"text-[11px] text-text-secondary/60",children:e.user})]})]})]})]},e.id)})})]})}function Oce({data:e}){const t=P.useMemo(()=>Math.max(Math.abs(e.total_assets),Math.abs(e.total_liabilities),Math.abs(e.total_equity),1),[e]),n=r=>`${Math.abs(r)/t*100}%`;return d.jsxs(he,{children:[d.jsx(We,{title:"Balance Sheet (Balansräkning)",subtitle:"Assets vs Liabilities & Equity"}),d.jsxs("div",{className:"p-6 space-y-6",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between mb-2",children:[d.jsx("span",{className:"font-semibold text-success",children:"Assets (Tillgångar)"}),d.jsx("span",{className:"font-bold",children:Ao(e.total_assets)})]}),d.jsx("div",{className:"w-full bg-surface-2 rounded-full h-4",children:d.jsx("div",{className:"bg-success h-4 rounded-full transition-all",style:{width:n(e.total_assets)}})}),d.jsx("div",{className:"mt-2 space-y-1",children:e.assets.slice(0,5).map(r=>d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsx("span",{children:r.name}),d.jsx("span",{children:Ao(r.balance)})]},r.code))})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between mb-2",children:[d.jsx("span",{className:"font-semibold text-danger",children:"Liabilities (Skulder)"}),d.jsx("span",{className:"font-bold",children:Ao(e.total_liabilities)})]}),d.jsx("div",{className:"w-full bg-surface-2 rounded-full h-4",children:d.jsx("div",{className:"bg-danger h-4 rounded-full transition-all",style:{width:n(e.total_liabilities)}})}),d.jsx("div",{className:"mt-2 space-y-1",children:e.liabilities.slice(0,5).map(r=>d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsx("span",{children:r.name}),d.jsx("span",{children:Ao(r.balance)})]},r.code))})]}),e.equity&&e.equity.length>0&&d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between mb-2",children:[d.jsx("span",{className:"font-semibold text-primary",children:"Equity (Eget kapital)"}),d.jsx("span",{className:"font-bold",children:Ao(e.total_equity)})]}),d.jsx("div",{className:"w-full bg-surface-2 rounded-full h-4",children:d.jsx("div",{className:"bg-primary h-4 rounded-full transition-all",style:{width:n(e.total_equity)}})})]}),d.jsx("div",{className:"border-t pt-4",children:d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-muted",children:"Balance check:"}),d.jsx("span",{className:`font-mono ${Math.abs(e.total_assets+e.total_liabilities+e.total_equity)<.01?"text-success":"text-danger"}`,children:Ao(e.total_assets+e.total_liabilities+e.total_equity)})]})})]})]})}function Ao(e){return new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Mn({children:e,className:t}){return d.jsx("div",{className:"w-full overflow-x-auto",children:d.jsx("table",{className:Tt("w-full",t),children:e})})}function bt({children:e,className:t}){return d.jsx("thead",{className:Tt("border-b border-border",t),children:e})}function Pn({children:e,className:t}){return d.jsx("tbody",{className:t,children:e})}function Ve({children:e,className:t}){return d.jsx("tr",{className:Tt("border-b border-border/50 transition-colors hover:bg-bg/50",t),children:e})}function ye({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return d.jsx("th",{colSpan:r,className:Tt("py-3 px-4 text-xs font-medium text-text-secondary uppercase tracking-wider",i[n],t),children:e})}function de({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return d.jsx("td",{colSpan:r,className:Tt("py-3.5 px-4 text-sm text-text-primary",i[n],t),children:e})}function _ce({accountCode:e,accountName:t,onClose:n}){const[r,i]=P.useState([]),[o,l]=P.useState(!0);return P.useEffect(()=>{i([{id:"1",date:"2026-02-01",description:"Opening balance",debit:0,credit:0,balance:44313},{id:"2",date:"2026-02-15",description:"Purchase - Dell laptops",debit:25e3,credit:0,balance:69313},{id:"3",date:"2026-02-20",description:"Depreciation",debit:0,credit:25e3,balance:44313}]),l(!1)},[e]),d.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:d.jsx("div",{className:"bg-surface rounded-lg w-full max-w-4xl max-h-[80vh] overflow-auto",children:d.jsxs(he,{children:[d.jsx(We,{title:`${e} - ${t}`,subtitle:"Transaction History",action:d.jsx("button",{onClick:n,className:"text-sm text-primary hover:underline",children:"Close"})}),d.jsx("div",{className:"p-6",children:o?d.jsx("div",{className:"text-center py-8",children:"Loading..."}):d.jsxs(Mn,{children:[d.jsx(ye,{children:d.jsxs(Ve,{children:[d.jsx(bt,{children:"Date"}),d.jsx(bt,{children:"Description"}),d.jsx(bt,{className:"text-right",children:"Debit"}),d.jsx(bt,{className:"text-right",children:"Credit"}),d.jsx(bt,{className:"text-right",children:"Balance"})]})}),d.jsx(Pn,{children:r.map(u=>d.jsxs(Ve,{children:[d.jsx(de,{children:u.date}),d.jsx(de,{children:u.description}),d.jsx(de,{className:"text-right text-success",children:u.debit>0?s1(u.debit):"-"}),d.jsx(de,{className:"text-right text-danger",children:u.credit>0?s1(u.credit):"-"}),d.jsx(de,{className:"text-right font-medium",children:s1(u.balance)})]},u.id))})]})})]})})})}function s1(e){return new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Tce({period:e}){const[t,n]=P.useState(null),r=async i=>{n(i);try{const o=await fetch(`/api/v1/finance/export?period=${e}&format=${i}`);if(!o.ok)throw new Error("Export failed");const l=await o.blob(),u=window.URL.createObjectURL(l),f=document.createElement("a");f.href=u,f.download=`ledger-${e}.${i.toLowerCase()}`,document.body.appendChild(f),f.click(),window.URL.revokeObjectURL(u),document.body.removeChild(f)}catch(o){console.error("Export error:",o),alert(`Failed to export ${i}`)}finally{n(null)}};return d.jsxs(he,{children:[d.jsx(We,{title:"Export Reports",subtitle:"Download ledger data in various formats"}),d.jsxs("div",{className:"p-6 flex gap-4",children:[d.jsx("button",{onClick:()=>r("SIE4"),disabled:t==="SIE4",className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark disabled:opacity-50",children:t==="SIE4"?"Exporting...":"Export SIE4"}),d.jsx("button",{onClick:()=>r("PDF"),disabled:t==="PDF",className:"px-4 py-2 bg-danger text-white rounded hover:bg-danger-dark disabled:opacity-50",children:t==="PDF"?"Exporting...":"Export PDF"}),d.jsx("button",{onClick:()=>r("CSV"),disabled:t==="CSV",className:"px-4 py-2 bg-success text-white rounded hover:bg-success-dark disabled:opacity-50",children:t==="CSV"?"Exporting...":"Export CSV"})]})]})}const QD=({src:e,title:t,height:n=300})=>d.jsxs("div",{className:"bg-white rounded-lg shadow-md p-4 mb-4",children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:t}),d.jsx("iframe",{src:e,width:"100%",height:n,frameBorder:"0",title:t,className:"rounded"})]});function et({className:e}){return d.jsx("div",{className:Tt("animate-pulse rounded-[14px] bg-text-secondary/8",e)})}function Ece(){const[e,t]=P.useState(!0),[n,r]=P.useState(""),[i,o]=P.useState(0),[l,u]=P.useState(0),[f,h]=P.useState(0),[m,y]=P.useState([]),[g,j]=P.useState(0),[S,w]=P.useState(0),[b,A]=P.useState(0),[_,T]=P.useState(0),[C,O]=P.useState(0),[E,M]=P.useState([]),[D,k]=P.useState(null),[B,q]=P.useState("2026-02"),[$,F]=P.useState(null);P.useEffect(()=>{async function L(){t(!0),r("");try{const[H,Q,ae,oe,z,G]=await Promise.all([is.balance(),No.mrr(),lh.customers(),No.deals(),rg.balanceSheet("2026-01").catch(()=>null),rg.incomeStatement("2026-01").catch(()=>null)]);o(H.total_assets||0),u(Q.mrr||0),h(ae.total||0);const me=oe;y(me.deals||[]),j(me.total||0),z&&(w(z.total_assets||0),A(z.total_liabilities||0),T(z.total_equity||0),k(z)),G&&O(G.net_income||0);const we=await rg.accounts().catch(()=>null);we&&M(we.accounts||[])}catch(H){r(H instanceof Error?H.message:"Failed to load dashboard data")}finally{t(!1)}}L()},[]);const X=[{label:"Total Assets",value:_e(i),change:0,changeLabel:"vs last month",icon:d.jsx(Qc,{size:18})},{label:"Active Customers",value:String(f),change:0,changeLabel:"vs last month",icon:d.jsx(Pa,{size:18})},{label:"MRR",value:_e(l),change:0,changeLabel:"vs last month",icon:d.jsx(Mr,{size:18})},{label:"Open Deals",value:String(g),change:0,changeLabel:"vs last month",icon:d.jsx(DH,{size:18})}],Y=[{label:"Ledger Assets",value:_e(S),change:0,changeLabel:"per balansräkning",icon:d.jsx(Qc,{size:18})},{label:"Ledger Liabilities",value:_e(b),change:0,changeLabel:"per balansräkning",icon:d.jsx(Mr,{size:18})},{label:"Net Income",value:_e(C),change:0,changeLabel:"per resultaträkning",icon:d.jsx(Mr,{size:18})},{label:"Equity",value:_e(_),change:0,changeLabel:"per balansräkning",icon:d.jsx(Qc,{size:18})}];return e?d.jsxs("div",{className:"space-y-10",children:[d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-5",children:Array.from({length:4}).map((L,H)=>d.jsx(et,{className:"h-[140px]"},H))}),d.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[d.jsx(et,{className:"h-[320px] xl:col-span-2"}),d.jsx(et,{className:"h-[320px]"})]}),d.jsx(et,{className:"h-[300px]"})]}):n?d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx("p",{className:"text-danger",children:n})}):d.jsxs("div",{className:"space-y-10",children:[d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-5",children:X.map((L,H)=>d.jsx(tN,{...L,index:H},L.label))}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("label",{className:"text-sm font-medium",children:"Period:"}),d.jsxs("select",{value:B,onChange:L=>q(L.target.value),className:"border rounded px-3 py-1 text-sm",children:[d.jsx("option",{value:"2026-02",children:"2026-02"}),d.jsx("option",{value:"2026-03",children:"2026-03"}),d.jsx("option",{value:"2026-04",children:"2026-04"})]})]}),d.jsxs("div",{className:"mt-8",children:[d.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Ledger (Bokföring)"}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-5",children:Y.map((L,H)=>d.jsx(tN,{...L,index:H},L.label))})]}),D&&d.jsx(Oce,{data:D}),d.jsxs("div",{className:"mt-8",children:[d.jsx("h2",{className:"text-lg font-semibold mb-4",children:"System Health"}),d.jsx(QD,{src:"http://localhost:3050/d-solo/aamos-system/aamos-system-health?orgId=1&panelId=1&refresh=5s",title:"CPU Usage",height:200}),d.jsx(QD,{src:"http://localhost:3050/d-solo/aamos-system/aamos-system-health?orgId=1&panelId=2&refresh=5s",title:"Memory Usage",height:200})]}),d.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[d.jsx("div",{className:"xl:col-span-2",children:d.jsx(jce,{})}),d.jsx("div",{children:d.jsx(Ace,{})})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Ledger Accounts",subtitle:"All BAS accounts with balances"}),d.jsx("div",{className:"overflow-x-auto",children:d.jsxs(Mn,{children:[d.jsx(ye,{children:d.jsxs(Ve,{children:[d.jsx(bt,{children:"Code"}),d.jsx(bt,{children:"Name"}),d.jsx(bt,{children:"Type"}),d.jsx(bt,{className:"text-right",children:"Balance"})]})}),d.jsx(Pn,{children:E.length===0?d.jsx(Ve,{children:d.jsx(de,{colSpan:4,className:"text-center text-muted",children:"No accounts found"})}):E.map(L=>d.jsx(Ve,{children:d.jsx(de,{colSpan:4,className:"p-0",children:d.jsxs("div",{className:"flex items-center px-4 py-3 cursor-pointer hover:bg-surface-2",onClick:()=>F({code:L.code,name:L.name}),children:[d.jsx("span",{className:"font-medium w-16",children:L.code}),d.jsx("span",{className:"flex-1",children:L.name}),d.jsx("span",{className:"w-24",children:d.jsx(Ke,{children:L.account_type})}),d.jsx("span",{className:`w-32 text-right ${L.balance>=0?"text-success":"text-danger"}`,children:_e(L.balance)})]})})},L.code))})]})})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Income Statement (Resultaträkning)",subtitle:"Revenue and expenses for period 2026-02"}),d.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 p-6",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold mb-4 text-success",children:"Revenue (Intäkter)"}),d.jsxs(Mn,{children:[d.jsx(ye,{children:d.jsxs(Ve,{children:[d.jsx(bt,{children:"Code"}),d.jsx(bt,{children:"Name"}),d.jsx(bt,{className:"text-right",children:"Amount"})]})}),d.jsx(Pn,{children:E.filter(L=>L.account_type==="revenue").map(L=>d.jsxs(Ve,{children:[d.jsx(de,{children:L.code}),d.jsx(de,{children:L.name}),d.jsx(de,{className:"text-right text-success",children:_e(Math.abs(L.balance))})]},L.code))})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold mb-4 text-danger",children:"Expenses (Kostnader)"}),d.jsxs(Mn,{children:[d.jsx(ye,{children:d.jsxs(Ve,{children:[d.jsx(bt,{children:"Code"}),d.jsx(bt,{children:"Name"}),d.jsx(bt,{className:"text-right",children:"Amount"})]})}),d.jsx(Pn,{children:E.filter(L=>L.account_type==="expense").map(L=>d.jsxs(Ve,{children:[d.jsx(de,{children:L.code}),d.jsx(de,{children:L.name}),d.jsx(de,{className:"text-right text-danger",children:_e(L.balance)})]},L.code))})]})]})]}),d.jsx("div",{className:"border-t p-6",children:d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-lg font-semibold",children:"Net Income:"}),d.jsx("span",{className:`text-2xl font-bold ${C>=0?"text-success":"text-danger"}`,children:_e(C)})]})})]}),d.jsx(Tce,{period:B}),$&&d.jsx(_ce,{accountCode:$.code,accountName:$.name,onClose:()=>F(null)}),d.jsxs(he,{children:[d.jsx(We,{title:"Recent Deals",subtitle:"Latest deals across your pipeline",action:d.jsxs("button",{className:"text-sm text-primary font-medium flex items-center gap-1 hover:underline",children:["View all ",d.jsx(D1,{size:14})]})}),d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Deal"}),d.jsx(ye,{children:"Company"}),d.jsx(ye,{align:"right",children:"Value"}),d.jsx(ye,{children:"Stage"}),d.jsx(ye,{align:"right",children:"Probability"}),d.jsx(ye,{children:"Close Date"})]})}),d.jsxs(Pn,{children:[m.length===0&&d.jsx(Ve,{children:d.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No deals found"})}),m.map(L=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsx("span",{className:"font-medium",children:L.name})}),d.jsx(de,{children:L.company}),d.jsx(de,{align:"right",children:_e(L.value)}),d.jsx(de,{children:d.jsx(Ke,{variant:L.stage==="Closed Won"?"success":L.stage==="Negotiation"?"primary":"default",children:L.stage})}),d.jsxs(de,{align:"right",children:[L.probability,"%"]}),d.jsx(de,{children:mr(L.expectedClose)})]},L.id))]})]})]})]})}const Nce={getRealBriefing:()=>rt.get("/briefing/real")};function Xd({title:e,value:t,subtitle:n,icon:r,trend:i,trendValue:o,variant:l="default"}){const u={default:"bg-surface border-border",success:"bg-success/5 border-success/20",warning:"bg-warning/5 border-warning/20",danger:"bg-danger/5 border-danger/20"};return d.jsxs("div",{className:`p-4 rounded-xl border ${u[l]}`,children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm text-text-secondary",children:e}),d.jsx("p",{className:"text-2xl font-semibold",children:t}),n&&d.jsx("p",{className:"text-xs text-text-tertiary",children:n})]}),r&&d.jsx("div",{className:"text-text-secondary",children:r})]}),i&&d.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[i==="up"&&d.jsx(Mr,{size:14,className:"text-success"}),i==="down"&&d.jsx(ew,{size:14,className:"text-danger"}),i==="neutral"&&d.jsx(Lp,{size:14,className:"text-text-secondary"}),d.jsx("span",{className:`text-xs ${i==="up"?"text-success":i==="down"?"text-danger":"text-text-secondary"}`,children:o})]})]})}function Cce({alert:e}){const t={info:{icon:d.jsx(Lp,{size:16}),color:"text-primary bg-primary/5 border-primary/20"},warning:{icon:d.jsx(wi,{size:16}),color:"text-warning bg-warning/5 border-warning/20"},critical:{icon:d.jsx(wi,{size:16}),color:"text-danger bg-danger/5 border-danger/20"}},n=t[e.level]||t.info;return d.jsx("div",{className:`p-3 rounded-lg border ${n.color}`,children:d.jsxs("div",{className:"flex items-start gap-2",children:[n.icon,d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-medium",children:e.title}),d.jsx("p",{className:"text-xs opacity-80 mt-0.5",children:e.description})]}),d.jsx(Ke,{variant:"default",className:"text-xs",children:e.source})]})})}function Mce({action:e}){const t={10:"bg-danger text-white",9:"bg-danger/80 text-white",8:"bg-warning text-white",7:"bg-warning/80 text-white",6:"bg-primary text-white",5:"bg-primary/80 text-white"};return d.jsx("div",{className:"p-3 rounded-lg border border-border bg-surface hover:bg-surface-hover transition-colors cursor-pointer group",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium shrink-0 ${t[e.priority]||"bg-text-secondary text-white"}`,children:e.priority}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:e.title}),d.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.description}),d.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[d.jsxs("span",{className:"text-xs text-text-tertiary flex items-center gap-1",children:[d.jsx(Vo,{size:12}),e.time_estimate]}),d.jsx("span",{className:"text-xs text-text-tertiary",children:e.impact})]})]}),d.jsx(iH,{size:16,className:"text-text-tertiary group-hover:text-primary transition-colors shrink-0"})]})})}function Pce({task:e}){const t={critical:"danger",high:"warning",medium:"default",low:"success"};return d.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-warning shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm truncate",children:e.title}),d.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[d.jsx(Ke,{variant:t[e.priority],className:"text-xs",children:e.priority}),d.jsx("span",{className:"text-xs text-text-tertiary",children:e.category})]})]}),d.jsxs("span",{className:"text-xs text-text-tertiary shrink-0",children:[e.days_open,"d"]})]})}function Rce({deal:e}){return d.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:d.jsx(Uo,{size:16,className:"text-primary"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-medium truncate",children:e.name}),d.jsx("p",{className:"text-xs text-text-secondary",children:e.customer})]}),d.jsxs("div",{className:"text-right shrink-0",children:[d.jsx("p",{className:"text-sm font-medium",children:_e(e.value)}),d.jsxs("p",{className:"text-xs text-text-tertiary",children:[e.probability,"%"]})]})]})}function kce(){var j;const[e,t]=P.useState(null),[n,r]=P.useState(!0),[i,o]=P.useState("");if(P.useEffect(()=>{async function S(){try{r(!0);const b=await Nce.getRealBriefing();t(b)}catch(b){o(b instanceof Error?b.message:"Failed to load briefing")}finally{r(!1)}}S();const w=setInterval(S,3e5);return()=>clearInterval(w)},[]),n)return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:Array.from({length:4}).map((S,w)=>d.jsx(et,{className:"h-[120px]"},w))}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsx(et,{className:"h-[400px] lg:col-span-2"}),d.jsx(et,{className:"h-[400px]"})]})]});if(i)return d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsxs("div",{className:"text-center",children:[d.jsx(wi,{size:48,className:"text-danger mx-auto mb-4"}),d.jsx("p",{className:"text-danger font-medium",children:i}),d.jsx("button",{onClick:()=>window.location.reload(),className:"mt-4 px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover transition-colors",children:"Försök igen"})]})});if(!e)return null;const{company_health:l,my_tasks:u,my_deals:f,team_overview:h,financial_status:m,alerts:y,actions:g}=e;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold",children:"Dagsöversikt"}),d.jsxs("p",{className:"text-text-secondary",children:[e.user.name," • ",new Date(e.generated_at).toLocaleDateString("sv-SE",{weekday:"long",year:"numeric",month:"long",day:"numeric"})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:`w-2 h-2 rounded-full ${l.status==="healthy"?"bg-success":l.status==="warning"?"bg-warning":"bg-danger"}`}),d.jsx("span",{className:"text-sm text-text-secondary capitalize",children:l.status})]})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[d.jsx(Xd,{title:"Cash Position",value:_e(l.cash_position),subtitle:"Eget kapital",icon:d.jsx(Qc,{size:20}),trend:l.profit_margin>0?"up":"down",trendValue:`${ZE(l.profit_margin)}% marginal`,variant:l.cash_position>1e6?"success":l.cash_position>5e5?"warning":"danger"}),d.jsx(Xd,{title:"Pipeline",value:_e(l.total_pipeline),subtitle:`${l.active_deals} aktiva deals`,icon:d.jsx(Uo,{size:20}),trend:"up",trendValue:"+12% vs förra månaden"}),d.jsx(Xd,{title:"Team",value:`${h.active_now}/${h.total_members}`,subtitle:`${h.on_leave} på leave`,icon:d.jsx(Pa,{size:20}),trend:h.on_leave>0?"neutral":"up",trendValue:h.on_leave>0?`${h.on_leave} borta idag`:"Alla närvarande"}),d.jsx(Xd,{title:"Mina Tasks",value:u.length,subtitle:`${u.filter(S=>S.priority==="critical").length} kritiska`,icon:d.jsx(dL,{size:20}),variant:u.filter(S=>S.priority==="critical").length>0?"danger":u.filter(S=>S.priority==="high").length>0?"warning":"success"})]}),y.length>0&&d.jsxs("div",{className:"space-y-2",children:[d.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[d.jsx(wi,{size:20,className:"text-warning"}),"Varningar"]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:y.map((S,w)=>d.jsx(Cce,{alert:S},w))})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[g.length>0&&d.jsxs(he,{children:[d.jsx(We,{title:"Rekommenderade Åtgärder",subtitle:"Prioriterade baserat på din roll och aktuell data"}),d.jsx("div",{className:"p-4 space-y-3",children:g.map((S,w)=>d.jsx(Mce,{action:S},w))})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Mina Uppgifter",subtitle:`${u.length} öppna uppgifter`}),d.jsx("div",{className:"p-4 space-y-1",children:u.length===0?d.jsxs("div",{className:"text-center py-8 text-text-secondary",children:[d.jsx(Sl,{size:48,className:"mx-auto mb-2 text-success"}),d.jsx("p",{children:"Alla uppgifter är klara!"})]}):u.map(S=>d.jsx(Pce,{task:S},S.id))})]}),f.length>0&&d.jsxs(he,{children:[d.jsx(We,{title:"Mina Deals",subtitle:`${f.length} aktiva förhandlingar`}),d.jsx("div",{className:"p-4 space-y-1",children:f.map(S=>d.jsx(Rce,{deal:S},S.id))})]})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs(he,{children:[d.jsx(We,{title:"Teamöversikt",subtitle:`${h.total_members} medlemmar`}),d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[d.jsxs("div",{className:"text-center p-2 bg-success/5 rounded-lg",children:[d.jsx("p",{className:"text-2xl font-semibold text-success",children:h.active_now}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]}),d.jsxs("div",{className:"text-center p-2 bg-warning/5 rounded-lg",children:[d.jsx("p",{className:"text-2xl font-semibold text-warning",children:h.on_leave}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Borta"})]}),d.jsxs("div",{className:"text-center p-2 bg-primary/5 rounded-lg",children:[d.jsx("p",{className:"text-2xl font-semibold text-primary",children:h.open_tickets}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Tickets"})]})]}),d.jsx("div",{className:"space-y-2",children:h.members.slice(0,5).map((S,w)=>d.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[d.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-xs font-medium text-primary",children:S.name.split(" ").map(b=>b[0]).join("")}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),d.jsx("p",{className:"text-xs text-text-secondary",children:S.role})]}),S.open_tasks>0&&d.jsx(Ke,{variant:"warning",className:"text-xs",children:S.open_tasks})]},w))})]})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Finansiell Status",subtitle:"Från ledger i realtid"}),d.jsxs("div",{className:"p-4 space-y-3",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-text-secondary",children:"Tillgångar"}),d.jsx("span",{className:"text-sm font-medium",children:_e(m.total_assets)})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-text-secondary",children:"Skulder"}),d.jsx("span",{className:"text-sm font-medium",children:_e(m.total_liabilities)})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-text-secondary",children:"Eget Kapital"}),d.jsx("span",{className:"text-sm font-medium text-success",children:_e(m.equity)})]}),m.runway_months>0&&d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-text-secondary",children:"Runway"}),d.jsxs("span",{className:"text-sm font-medium",children:[ZE(m.runway_months)," mån"]})]}),d.jsxs("div",{className:"pt-2 border-t border-border",children:[d.jsx("p",{className:"text-xs text-text-tertiary mb-2",children:"Top Konton"}),(j=m.top_accounts)==null?void 0:j.slice(0,3).map((S,w)=>d.jsxs("div",{className:"flex justify-between items-center py-1",children:[d.jsx("span",{className:"text-xs text-text-secondary",children:S.name}),d.jsx("span",{className:"text-xs font-medium",children:_e(S.amount)})]},w))]})]})]})]})]})]})}function Dce(){return d.jsx(kce,{})}function Lce(){const{user:e}=Yu(),[t,n]=P.useState(null),[r,i]=P.useState(!0),[o,l]=P.useState(!1),[u,f]=P.useState("general");P.useEffect(()=>{setTimeout(()=>{n({id:(e==null?void 0:e.id)||"3847477b-3d56-4975-9157-ae8f9ce52aa7",name:(e==null?void 0:e.name)||"Erik Svensson",email:(e==null?void 0:e.email)||"erik@landvex.com",phone:"+46 70 123 45 67",role:(e==null?void 0:e.role)||"admin",department:"Ledning",timezone:"Europe/Stockholm",language:"sv",notifications:{email:!0,push:!0,sms:!1},theme:"light",twoFactorEnabled:!1,lastLogin:new Date().toISOString(),createdAt:"2026-01-15T10:30:00Z"}),i(!1)},500)},[e]);const h=async()=>{l(!0),await new Promise(y=>setTimeout(y,1e3)),l(!1)};if(r)return d.jsxs("div",{className:"space-y-6",children:[d.jsx(et,{className:"h-[200px]"}),d.jsx(et,{className:"h-[400px]"})]});if(!t)return null;const m=[{id:"general",label:"Allmänt",icon:Sh},{id:"security",label:"Säkerhet",icon:oh},{id:"notifications",label:"Notifikationer",icon:L1},{id:"preferences",label:"Inställningar",icon:sh}];return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold",children:"Min Profil"}),d.jsx("p",{className:"text-text-secondary",children:"Hantera dina kontoinställningar"})]}),d.jsx(Yt,{onClick:h,disabled:o,icon:o?void 0:d.jsx(CH,{size:16}),children:o?"Sparar...":"Spara ändringar"})]}),d.jsxs(he,{className:"relative overflow-hidden",children:[d.jsx("div",{className:"h-32 bg-gradient-to-r from-primary to-primary-hover"}),d.jsxs("div",{className:"px-6 pb-6",children:[d.jsx("div",{className:"relative -mt-16 mb-4",children:d.jsxs("div",{className:"w-32 h-32 rounded-2xl bg-surface border-4 border-bg flex items-center justify-center text-4xl font-bold text-primary relative",children:[t.avatar?d.jsx("img",{src:t.avatar,alt:t.name,className:"w-full h-full rounded-2xl object-cover"}):t.name.split(" ").map(y=>y[0]).join(""),d.jsx("button",{className:"absolute bottom-0 right-0 w-8 h-8 bg-primary text-white rounded-full flex items-center justify-center hover:bg-primary-hover transition-colors",children:d.jsx(lH,{size:14})})]})}),d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold",children:t.name}),d.jsx("p",{className:"text-text-secondary",children:t.email}),d.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[d.jsx(Ke,{variant:"primary",children:t.role}),d.jsx(Ke,{variant:"default",children:t.department})]})]}),d.jsxs("div",{className:"text-right text-sm text-text-secondary",children:[d.jsxs("p",{children:["Senaste inloggning: ",mr(t.lastLogin)]}),d.jsxs("p",{children:["Medlem sedan: ",mr(t.createdAt)]})]})]})]})]}),d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto",children:m.map(y=>d.jsxs("button",{onClick:()=>f(y.id),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${u===y.id?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[d.jsx(y.icon,{size:16}),y.label]},y.id))}),u==="general"&&d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(he,{children:[d.jsx(We,{title:"Personlig information",subtitle:"Uppdatera dina kontouppgifter"}),d.jsxs("div",{className:"p-4 space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Fullständigt namn"}),d.jsxs("div",{className:"relative",children:[d.jsx(Sh,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",value:t.name,onChange:y=>n({...t,name:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"E-post"}),d.jsxs("div",{className:"relative",children:[d.jsx(js,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"email",value:t.email,onChange:y=>n({...t,email:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Telefon"}),d.jsxs("div",{className:"relative",children:[d.jsx(KE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"tel",value:t.phone||"",onChange:y=>n({...t,phone:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Avdelning"}),d.jsxs("div",{className:"relative",children:[d.jsx(WS,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",value:t.department||"",onChange:y=>n({...t,department:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]})]})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Kontoinformation",subtitle:"Dina kontodetaljer"}),d.jsxs("div",{className:"p-4 space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:"Användar-ID"}),d.jsx("p",{className:"text-xs text-text-secondary",children:t.id})]}),d.jsx(Ke,{variant:"default",children:"Aktiv"})]}),d.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:"Roll"}),d.jsx("p",{className:"text-xs text-text-secondary",children:t.role})]}),d.jsx(oh,{size:16,className:"text-primary"})]}),d.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:"Tidszon"}),d.jsx("p",{className:"text-xs text-text-secondary",children:t.timezone})]}),d.jsx(sh,{size:16,className:"text-text-secondary"})]}),d.jsxs("div",{className:"flex items-center justify-between py-3",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:"Språk"}),d.jsx("p",{className:"text-xs text-text-secondary",children:t.language==="sv"?"Svenska":t.language})]}),d.jsx(sh,{size:16,className:"text-text-secondary"})]})]})]})]}),u==="security"&&d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(he,{children:[d.jsx(We,{title:"Lösenord",subtitle:"Uppdatera ditt lösenord"}),d.jsxs("div",{className:"p-4 space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nuvarande lösenord"}),d.jsxs("div",{className:"relative",children:[d.jsx(GE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"password",placeholder:"••••••••",className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nytt lösenord"}),d.jsx("input",{type:"password",placeholder:"Minst 8 tecken",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Bekräfta nytt lösenord"}),d.jsx("input",{type:"password",placeholder:"Upprepa lösenord",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),d.jsxs(Yt,{variant:"secondary",className:"w-full",children:[d.jsx(GE,{size:16,className:"mr-2"}),"Ändra lösenord"]})]})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Tvåfaktorsautentisering",subtitle:"Öka säkerheten på ditt konto"}),d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:"2FA-status"}),d.jsx("p",{className:"text-xs text-text-secondary",children:t.twoFactorEnabled?"Aktiverad":"Ej aktiverad"})]}),d.jsx(Ke,{variant:t.twoFactorEnabled?"success":"default",children:t.twoFactorEnabled?"Aktiv":"Inaktiv"})]}),!t.twoFactorEnabled&&d.jsxs(Yt,{className:"w-full",children:[d.jsx(oh,{size:16,className:"mr-2"}),"Aktivera 2FA"]})]})]})]}),u==="notifications"&&d.jsxs(he,{children:[d.jsx(We,{title:"Notifikationsinställningar",subtitle:"Hantera hur du får notifieringar"}),d.jsx("div",{className:"p-4 space-y-4",children:[{key:"email",label:"E-postnotifikationer",description:"Få uppdateringar via e-post",icon:js},{key:"push",label:"Push-notifikationer",description:"Få notifikationer i webbläsaren",icon:L1},{key:"sms",label:"SMS-notifikationer",description:"Få viktiga uppdateringar via SMS",icon:KE}].map(y=>d.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border last:border-0",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary",children:d.jsx(y.icon,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:y.label}),d.jsx("p",{className:"text-xs text-text-secondary",children:y.description})]})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:t.notifications[y.key],onChange:g=>n({...t,notifications:{...t.notifications,[y.key]:g.target.checked}}),className:"sr-only peer"}),d.jsx("div",{className:"w-11 h-6 bg-border peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"})]})]},y.key))})]}),u==="preferences"&&d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(he,{children:[d.jsx(We,{title:"Utseende",subtitle:"Anpassa hur BOC ser ut"}),d.jsx("div",{className:"p-4 space-y-4",children:d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-2",children:"Tema"}),d.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{id:"light",label:"Ljust",icon:LH},{id:"dark",label:"Mörkt",icon:TH},{id:"system",label:"System",icon:_H}].map(y=>d.jsxs("button",{onClick:()=>n({...t,theme:y.id}),className:`p-3 rounded-xl border text-center transition-colors ${t.theme===y.id?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/30"}`,children:[d.jsx(y.icon,{size:20,className:"mx-auto mb-1"}),d.jsx("span",{className:"text-xs",children:y.label})]},y.id))})]})})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Regionala inställningar",subtitle:"Språk och tidszon"}),d.jsxs("div",{className:"p-4 space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Språk"}),d.jsxs("select",{value:t.language,onChange:y=>n({...t,language:y.target.value}),className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm",children:[d.jsx("option",{value:"sv",children:"Svenska"}),d.jsx("option",{value:"en",children:"English"}),d.jsx("option",{value:"no",children:"Norsk"}),d.jsx("option",{value:"da",children:"Dansk"}),d.jsx("option",{value:"fi",children:"Suomi"})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium mb-1",children:"Tidszon"}),d.jsxs("select",{value:t.timezone,onChange:y=>n({...t,timezone:y.target.value}),className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm",children:[d.jsx("option",{value:"Europe/Stockholm",children:"Stockholm (CET)"}),d.jsx("option",{value:"Europe/Oslo",children:"Oslo (CET)"}),d.jsx("option",{value:"Europe/Copenhagen",children:"Köpenhamn (CET)"}),d.jsx("option",{value:"Europe/Helsinki",children:"Helsingfors (EET)"}),d.jsx("option",{value:"UTC",children:"UTC"})]})]})]})]})]})]})}function JD({icon:e,title:t,description:n,action:r,className:i}){return d.jsxs("div",{className:Tt("flex flex-col items-center justify-center py-16 text-center",i),children:[e&&d.jsx("div",{className:"mb-4 text-text-secondary/40",children:e}),d.jsx("h3",{className:"text-sm font-medium text-text-primary",children:t}),n&&d.jsx("p",{className:"mt-1 text-sm text-text-secondary max-w-sm",children:n}),r&&d.jsx("div",{className:"mt-4",children:r})]})}const zce=["Customers","Leads","Pipeline"];function $ce(){const[e,t]=P.useState("Customers"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[f,h]=P.useState([]),[m,y]=P.useState(0),[g,j]=P.useState([]),[S,w]=P.useState([]);P.useEffect(()=>{async function T(){o(!0),u("");try{const[C,O,E]=await Promise.all([lh.customers(),lh.leads(),lh.pipeline()]);h(C.customers),y(C.total),j(O.leads);const M=E;w(M.stages||M.pipeline||[])}catch(C){u(C instanceof Error?C.message:"Failed to load CRM data")}finally{o(!1)}}T()},[]);const b=f.filter(T=>T.name.toLowerCase().includes(n.toLowerCase())||(T.company||"").toLowerCase().includes(n.toLowerCase())),A=g.filter(T=>T.name.toLowerCase().includes(n.toLowerCase())||(T.company||"").toLowerCase().includes(n.toLowerCase())),_=S.reduce((T,C)=>T+(C.value||0),0);return i?d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"})]}),d.jsx(et,{className:"h-[400px]"})]}):l?d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx("p",{className:"text-danger",children:l})}):d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"CRM"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Manage customers, leads, and pipeline"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"Add Contact"})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(Pa,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:m}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Total Customers"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:d.jsx(js,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:g.length}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Active Leads"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:d.jsx(WS,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(_)}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Pipeline Value"})]})]})})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:zce.map(T=>d.jsx("button",{onClick:()=>t(T),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===T?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:T},T))}),d.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[d.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[d.jsx(Ns,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:T=>r(T.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),d.jsx(Yt,{variant:"secondary",size:"sm",icon:d.jsx(Ju,{size:14}),children:"Filter"})]})]}),e==="Customers"&&d.jsxs(he,{children:[d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Customer"}),d.jsx(ye,{children:"Company"}),d.jsx(ye,{children:"Status"}),d.jsx(ye,{children:"Phone"}),d.jsx(ye,{children:"Created"}),d.jsx(ye,{align:"right"})]})}),d.jsx(Pn,{children:b.map(T=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:T.name.charAt(0)}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-text-primary",children:T.name}),d.jsx("p",{className:"text-xs text-text-secondary",children:T.email})]})]})}),d.jsx(de,{children:T.company||"—"}),d.jsx(de,{children:d.jsx(Ke,{variant:T.status==="active"?"success":T.status==="lead"?"primary":"default",children:T.status})}),d.jsx(de,{children:T.phone||"—"}),d.jsx(de,{children:mr(T.created_at)}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},T.id))})]}),b.length===0&&d.jsx(JD,{icon:d.jsx(Pa,{size:32}),title:"No customers found",description:"Try adjusting your search or filters"})]}),e==="Leads"&&d.jsxs(he,{children:[d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Lead"}),d.jsx(ye,{children:"Company"}),d.jsx(ye,{children:"Source"}),d.jsx(ye,{children:"Status"}),d.jsx(ye,{children:"Created"}),d.jsx(ye,{align:"right"})]})}),d.jsx(Pn,{children:A.map(T=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:T.name.charAt(0)}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-text-primary",children:T.name}),d.jsx("p",{className:"text-xs text-text-secondary",children:T.email})]})]})}),d.jsx(de,{children:T.company||"—"}),d.jsx(de,{children:T.source||"—"}),d.jsx(de,{children:d.jsx(Ke,{variant:T.status==="qualified"?"success":T.status==="contacted"?"primary":T.status==="lost"?"danger":"default",children:T.status})}),d.jsx(de,{children:mr(T.created_at)}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},T.id))})]}),A.length===0&&d.jsx(JD,{icon:d.jsx(js,{size:32}),title:"No leads found",description:"Try adjusting your search or filters"})]}),e==="Pipeline"&&d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[S.length===0&&d.jsx("div",{className:"col-span-full text-center text-text-secondary py-12",children:"No pipeline stages found"}),S.map(T=>d.jsxs(he,{hover:!0,children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.name}),d.jsxs(Ke,{variant:"default",children:[T.deals," deals"]})]}),d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:T.value>0?new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(T.value):"—"}),d.jsx("div",{className:"mt-4 h-1.5 bg-bg rounded-full overflow-hidden",children:d.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${_>0?T.value/_*100:0}%`}})})]},T.id))]})]})}const Bce=["Deals","Products","MRR","ARR"];function Ice(){const[e,t]=P.useState("Deals"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[f,h]=P.useState([]),[m,y]=P.useState([]),[g,j]=P.useState([]),[S,w]=P.useState([]),[b,A]=P.useState(0);P.useEffect(()=>{async function O(){o(!0),u("");try{const[E,M,D,k]=await Promise.all([No.deals(),No.products(),No.mrr(),No.arr()]);h(E.deals||[]),y(M.products||[]),A(D.mrr||0),j([]);const q=k;w([])}catch(E){u(E instanceof Error?E.message:"Failed to load sales data")}finally{o(!1)}}O()},[]);const _=f.reduce((O,E)=>O+(E.value||0),0),T=f.filter(O=>O.stage==="Closed Won").reduce((O,E)=>O+(E.value||0),0),C=m.filter(O=>O.active).length;return i?d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"})]}),d.jsx(et,{className:"h-[400px]"})]}):l?d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx("p",{className:"text-danger",children:l})}):d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Sales"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Deals, products, and revenue metrics"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"New Deal"})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(Qc,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e(_)}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Total Pipeline"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:d.jsx(Mr,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e(T)}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Closed Won"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:d.jsx(NH,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:C}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Active Products"})]})]})})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:Bce.map(O=>d.jsx("button",{onClick:()=>t(O),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===O?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:O},O))}),d.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[d.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[d.jsx(Ns,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:O=>r(O.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),d.jsx(Yt,{variant:"secondary",size:"sm",icon:d.jsx(Ju,{size:14}),children:"Filter"})]})]}),e==="Deals"&&d.jsx(he,{children:d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Deal"}),d.jsx(ye,{children:"Company"}),d.jsx(ye,{align:"right",children:"Value"}),d.jsx(ye,{children:"Stage"}),d.jsx(ye,{align:"right",children:"Probability"}),d.jsx(ye,{children:"Owner"}),d.jsx(ye,{align:"right"})]})}),d.jsxs(Pn,{children:[f.length===0&&d.jsx(Ve,{children:d.jsx(de,{colSpan:7,className:"text-center text-text-secondary py-8",children:"No deals found"})}),f.map(O=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsx("span",{className:"font-medium",children:O.name})}),d.jsx(de,{children:O.company}),d.jsx(de,{align:"right",children:_e(O.value)}),d.jsx(de,{children:d.jsx(Ke,{variant:O.stage==="Closed Won"?"success":O.stage==="Negotiation"?"primary":"default",children:O.stage})}),d.jsxs(de,{align:"right",children:[O.probability,"%"]}),d.jsx(de,{children:O.owner}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},O.id))]})]})}),e==="Products"&&d.jsx(he,{children:d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Product"}),d.jsx(ye,{children:"SKU"}),d.jsx(ye,{align:"right",children:"Price"}),d.jsx(ye,{children:"Type"}),d.jsx(ye,{children:"Status"}),d.jsx(ye,{align:"right"})]})}),d.jsxs(Pn,{children:[m.length===0&&d.jsx(Ve,{children:d.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No products found"})}),m.map(O=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsx("span",{className:"font-medium",children:O.name})}),d.jsx(de,{children:d.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:O.sku})}),d.jsx(de,{align:"right",children:_e(O.price)}),d.jsx(de,{children:d.jsx(Ke,{variant:O.recurring?"primary":"default",children:O.recurring?"Recurring":"One-time"})}),d.jsx(de,{children:d.jsx(Ke,{variant:O.active?"success":"danger",children:O.active?"Active":"Inactive"})}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},O.id))]})]})}),e==="MRR"&&d.jsxs(he,{children:[d.jsx(We,{title:"Monthly Recurring Revenue",subtitle:`Current MRR: ${_e(b)}`}),g.length>0?d.jsx("div",{className:"h-[320px]",children:d.jsx(kh,{width:"100%",height:"100%",children:d.jsxs(mce,{data:g,margin:{top:5,right:5,left:-10,bottom:0},children:[d.jsx(bp,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),d.jsx(Ei,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),d.jsx(Ni,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:O=>`${(O/1e3).toFixed(0)}k`,dx:-5}),d.jsx(Fn,{content:({active:O,payload:E,label:M})=>!O||!(E!=null&&E.length)?null:d.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[d.jsx("p",{className:"text-xs font-medium text-text-secondary mb-2",children:M}),E.map((D,k)=>d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:D.color}}),d.jsxs("span",{className:"text-text-secondary",children:[D.name,":"]}),d.jsx("span",{className:"font-semibold text-text-primary",children:_e(Number(D.value))})]},k))]})}),d.jsx(Ti,{dataKey:"mrr",fill:"#2563EB",radius:[4,4,0,0]}),d.jsx(Ti,{dataKey:"arr",fill:"#16A34A",radius:[4,4,0,0]})]})})}):d.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No MRR history data available"})]}),e==="ARR"&&d.jsxs(he,{children:[d.jsx(We,{title:"Annual Recurring Revenue",subtitle:"ARR growth by quarter"}),S.length>0?d.jsx("div",{className:"h-[320px]",children:d.jsx(kh,{width:"100%",height:"100%",children:d.jsxs(pce,{data:S,margin:{top:5,right:5,left:-10,bottom:0},children:[d.jsx(bp,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),d.jsx(Ei,{dataKey:"quarter",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),d.jsx(Ni,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:O=>`${(O/1e3).toFixed(0)}k`,dx:-5}),d.jsx(Fn,{content:({active:O,payload:E,label:M})=>!O||!(E!=null&&E.length)?null:d.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[d.jsx("p",{className:"text-xs font-medium text-text-secondary mb-1",children:M}),d.jsx("p",{className:"text-sm font-semibold text-text-primary",children:_e(Number(E[0].value))})]})}),d.jsx(cf,{type:"monotone",dataKey:"arr",stroke:"#2563EB",strokeWidth:2,dot:{r:4,strokeWidth:0,fill:"#2563EB"},activeDot:{r:6}})]})})}):d.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No ARR history data available"})]})]})}const qce=["Balance","Income","MOMS","Accounts","Invoices","Cashflow"],e3=["#2563EB","#16A34A","#D97706","#DC2626","#9CA3AF"];function Uce(){var M,D;const[e,t]=P.useState("Balance"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[f,h]=P.useState(null),[m,y]=P.useState(null),[g,j]=P.useState(null),[S,w]=P.useState([]),[b,A]=P.useState([]),[_,T]=P.useState(null);P.useEffect(()=>{async function k(){o(!0),u("");try{const[B,q,$,F,X,Y]=await Promise.all([is.balance(),is.income(),is.moms(),is.accounts(),is.invoices(),is.cashflow()]);h(B),y(q),j($),w(F.accounts||[]),A(X.invoices||[]),T(Y)}catch(B){u(B instanceof Error?B.message:"Failed to load finance data")}finally{o(!1)}}k()},[]);const C=S.filter(k=>k.name.toLowerCase().includes(n.toLowerCase())||k.id.toLowerCase().includes(n.toLowerCase())),O=b.filter(k=>k.customer.toLowerCase().includes(n.toLowerCase())||k.id.toLowerCase().includes(n.toLowerCase())),E=(m==null?void 0:m.expenses.map((k,B)=>({name:k.account,value:k.amount,color:e3[B%e3.length]})))||[];return i?d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"})]}),d.jsx(et,{className:"h-[400px]"})]}):l?d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx("p",{className:"text-danger",children:l})}):d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Finance"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Financial reports and accounting"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"New Invoice"})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(tw,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((f==null?void 0:f.total_assets)||0)}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Total Assets"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:d.jsx(Mr,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((m==null?void 0:m.total_revenue)||0)}),d.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Revenue"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:d.jsx(ew,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((m==null?void 0:m.total_expenses)||0)}),d.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Expenses"})]})]})})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:qce.map(k=>d.jsx("button",{onClick:()=>t(k),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${e===k?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:k},k))}),d.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[d.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[d.jsx(Ns,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:k=>r(k.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),d.jsx(Yt,{variant:"secondary",size:"sm",icon:d.jsx(Ju,{size:14}),children:"Filter"})]})]}),e==="Balance"&&d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[d.jsxs(he,{children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("span",{className:"text-sm text-text-secondary",children:"Assets"}),d.jsx(D1,{size:14,className:"text-success"})]}),d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((f==null?void 0:f.total_assets)||0)})]}),d.jsxs(he,{children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("span",{className:"text-sm text-text-secondary",children:"Liabilities"}),d.jsx(aH,{size:14,className:"text-danger"})]}),d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((f==null?void 0:f.total_liabilities)||0)})]}),d.jsxs(he,{children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("span",{className:"text-sm text-text-secondary",children:"Equity"}),d.jsx(D1,{size:14,className:"text-success"})]}),d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((f==null?void 0:f.total_equity)||0)})]})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Balance Sheet",subtitle:`Period: ${(f==null?void 0:f.period)||""}`}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Assets"}),d.jsxs("div",{className:"space-y-2",children:[f==null?void 0:f.assets.map((k,B)=>d.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[d.jsx("div",{children:d.jsx("p",{className:"text-sm text-text-primary",children:k.account})}),d.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B)),(!(f!=null&&f.assets)||f.assets.length===0)&&d.jsx("p",{className:"text-text-secondary text-sm",children:"No asset accounts"})]})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Liabilities"}),d.jsxs("div",{className:"space-y-2",children:[f==null?void 0:f.liabilities.map((k,B)=>d.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[d.jsx("div",{children:d.jsx("p",{className:"text-sm text-text-primary",children:k.account})}),d.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B)),(!(f!=null&&f.liabilities)||f.liabilities.length===0)&&d.jsx("p",{className:"text-text-secondary text-sm",children:"No liability accounts"})]})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Equity"}),d.jsxs("div",{className:"space-y-2",children:[(M=f==null?void 0:f.equity)==null?void 0:M.map((k,B)=>d.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[d.jsx("div",{children:d.jsx("p",{className:"text-sm text-text-primary",children:k.account})}),d.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B)),(!(f!=null&&f.equity)||((D=f.equity)==null?void 0:D.length)===0)&&d.jsx("p",{className:"text-text-secondary text-sm",children:"No equity accounts"})]})]})]})]})]}),e==="Income"&&d.jsx("div",{className:"space-y-6",children:d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5",children:[d.jsxs(he,{className:"lg:col-span-2",children:[d.jsx(We,{title:"Income Statement",subtitle:`Period: ${(m==null?void 0:m.period)||""}`}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Revenue"}),d.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((m==null?void 0:m.total_revenue)||0)})]}),d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Expenses"}),d.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((m==null?void 0:m.total_expenses)||0)})]}),d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net Income"}),d.jsx("p",{className:"text-lg font-semibold text-success",children:_e((m==null?void 0:m.net_income)||0)})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Revenue Accounts"}),m==null?void 0:m.revenue.map((k,B)=>d.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[d.jsx("p",{className:"text-sm text-text-primary",children:k.account}),d.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B))]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Expense Accounts"}),m==null?void 0:m.expenses.map((k,B)=>d.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[d.jsx("p",{className:"text-sm text-text-primary",children:k.account}),d.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B))]})]})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Expense Breakdown",subtitle:"By category"}),E.length>0?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"h-[220px]",children:d.jsx(kh,{width:"100%",height:"100%",children:d.jsxs(yce,{children:[d.jsx(Ia,{data:E,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:4,dataKey:"value",children:E.map((k,B)=>d.jsx(Xp,{fill:k.color},`cell-${B}`))}),d.jsx(Fn,{content:({active:k,payload:B})=>{if(!k||!(B!=null&&B.length))return null;const q=B[0].payload;return d.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-3 py-2",children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:q.name}),d.jsx("p",{className:"text-xs text-text-secondary",children:_e(q.value)})]})}})]})})}),d.jsx("div",{className:"space-y-2 mt-2",children:E.map(k=>d.jsxs("div",{className:"flex items-center justify-between text-sm",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:k.color}}),d.jsx("span",{className:"text-text-secondary",children:k.name})]}),d.jsx("span",{className:"font-medium text-text-primary",children:_e(k.value)})]},k.name))})]}):d.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No expense data"})]})]})}),e==="MOMS"&&d.jsxs(he,{children:[d.jsx(We,{title:"MOMS Report",subtitle:`Period: ${(g==null?void 0:g.period)||""}`}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS In (Input VAT)"}),d.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((g==null?void 0:g.moms_in)||0)})]}),d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS Ut (Output VAT)"}),d.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((g==null?void 0:g.moms_ut)||0)})]}),d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS att betala"}),d.jsx("p",{className:"text-lg font-semibold text-success",children:_e((g==null?void 0:g.moms_att_betala)||0)})]})]})]}),e==="Accounts"&&d.jsxs(he,{children:[d.jsx(We,{title:"Chart of Accounts",subtitle:"General ledger accounts"}),d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Account"}),d.jsx(ye,{children:"Number"}),d.jsx(ye,{children:"Type"}),d.jsx(ye,{align:"right",children:"Balance"}),d.jsx(ye,{align:"right"})]})}),d.jsxs(Pn,{children:[C.map(k=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsx("span",{className:"font-medium",children:k.name})}),d.jsx(de,{children:d.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:k.id})}),d.jsx(de,{children:d.jsx(Ke,{variant:k.type==="asset"?"success":k.type==="equity"?"primary":"warning",children:k.type})}),d.jsx(de,{align:"right",children:_e(k.balance)}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},k.id)),C.length===0&&d.jsx(Ve,{children:d.jsx(de,{colSpan:5,className:"text-center text-text-secondary py-8",children:"No accounts found"})})]})]})]}),e==="Invoices"&&d.jsxs(he,{children:[d.jsx(We,{title:"Invoices",subtitle:"All invoices"}),d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Number"}),d.jsx(ye,{children:"Customer"}),d.jsx(ye,{align:"right",children:"Amount"}),d.jsx(ye,{children:"Status"}),d.jsx(ye,{children:"Due Date"}),d.jsx(ye,{align:"right"})]})}),d.jsxs(Pn,{children:[O.map(k=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsx("span",{className:"font-medium",children:k.id})}),d.jsx(de,{children:k.customer}),d.jsx(de,{align:"right",children:_e(k.amount)}),d.jsx(de,{children:d.jsx(Ke,{variant:k.status==="paid"?"success":k.status==="overdue"?"danger":k.status==="sent"||k.status==="pending"?"primary":"default",children:k.status})}),d.jsx(de,{children:mr(k.due_date)}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},k.id)),O.length===0&&d.jsx(Ve,{children:d.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No invoices found"})})]})]})]}),e==="Cashflow"&&d.jsxs(he,{children:[d.jsx(We,{title:"Cash Flow",subtitle:`Period: ${(_==null?void 0:_.period)||""}`}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Inflow"}),d.jsx("p",{className:"text-lg font-semibold text-success",children:_e((_==null?void 0:_.inflow)||0)})]}),d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Outflow"}),d.jsx("p",{className:"text-lg font-semibold text-danger",children:_e((_==null?void 0:_.outflow)||0)})]}),d.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[d.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net"}),d.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((_==null?void 0:_.net)||0)})]})]})]})]})}const Vce=["Employees","Leaves"],Hce={Sales:"primary",Engineering:"success",Finance:"warning",HR:"primary",Legal:"default"};function Gce(){const[e,t]=P.useState("Employees"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[f,h]=P.useState([]),[m,y]=P.useState([]);P.useEffect(()=>{async function A(){o(!0),u("");try{const[_,T]=await Promise.all([eN.employees(),eN.leaves()]);h(_.employees||[]),y(T.leaves||[])}catch(_){u(_ instanceof Error?_.message:"Failed to load HR data")}finally{o(!1)}}A()},[]);const g=f.filter(A=>A.status==="active").length,j=f.filter(A=>A.status==="on_leave").length,S=m.filter(A=>A.status==="pending").length,w=f.filter(A=>(A.name||`${A.first_name} ${A.last_name}`).toLowerCase().includes(n.toLowerCase())||A.department.toLowerCase().includes(n.toLowerCase())||(A.role||A.position).toLowerCase().includes(n.toLowerCase())),b=m.filter(A=>A.employeeName.toLowerCase().includes(n.toLowerCase())||A.type.toLowerCase().includes(n.toLowerCase()));return i?d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"})]}),d.jsx(et,{className:"h-[400px]"})]}):l?d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx("p",{className:"text-danger",children:l})}):d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"HR"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Employees and leave management"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"Add Employee"})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(Pa,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:g}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Active Employees"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:d.jsx(Vo,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:j}),d.jsx("p",{className:"text-xs text-text-secondary",children:"On Leave"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:d.jsx(oH,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:S}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Pending Requests"})]})]})})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:Vce.map(A=>d.jsx("button",{onClick:()=>t(A),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===A?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:A},A))}),d.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[d.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[d.jsx(Ns,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:A=>r(A.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),d.jsx(Yt,{variant:"secondary",size:"sm",icon:d.jsx(Ju,{size:14}),children:"Filter"})]})]}),e==="Employees"&&d.jsx(he,{children:d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Employee"}),d.jsx(ye,{children:"Department"}),d.jsx(ye,{children:"Role"}),d.jsx(ye,{children:"Status"}),d.jsx(ye,{children:"Start Date"}),d.jsx(ye,{align:"right"})]})}),d.jsxs(Pn,{children:[w.map(A=>{const _=A.name||`${A.first_name} ${A.last_name}`,T=A.role||A.position,C=A.startDate||A.start_date;return d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:_.split(" ").map(O=>O[0]).join("")}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-text-primary",children:_}),d.jsx("p",{className:"text-xs text-text-secondary",children:A.email})]})]})}),d.jsx(de,{children:d.jsx(Ke,{variant:Hce[A.department]||"default",children:A.department})}),d.jsx(de,{children:T}),d.jsx(de,{children:d.jsx(Ke,{variant:A.status==="active"?"success":A.status==="on_leave"?"warning":"danger",children:A.status.replace("_"," ")})}),d.jsx(de,{children:mr(C||"")}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},A.id)}),w.length===0&&d.jsx(Ve,{children:d.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No employees found"})})]})]})}),e==="Leaves"&&d.jsx(he,{children:d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Employee"}),d.jsx(ye,{children:"Type"}),d.jsx(ye,{children:"Period"}),d.jsx(ye,{align:"right",children:"Days"}),d.jsx(ye,{children:"Status"}),d.jsx(ye,{align:"right"})]})}),d.jsxs(Pn,{children:[b.map(A=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:A.employeeName.split(" ").map(_=>_[0]).join("")}),d.jsx("span",{className:"font-medium text-text-primary",children:A.employeeName})]})}),d.jsx(de,{children:d.jsx(Ke,{variant:A.type==="vacation"?"primary":A.type==="sick"?"warning":"default",children:A.type})}),d.jsx(de,{children:d.jsxs("span",{className:"text-sm text-text-primary",children:[mr(A.startDate)," — ",mr(A.endDate)]})}),d.jsx(de,{align:"right",children:d.jsx("span",{className:"font-medium",children:A.days})}),d.jsx(de,{children:d.jsx(Ke,{variant:A.status==="approved"?"success":A.status==="pending"?"warning":"danger",children:A.status})}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},A.id)),b.length===0&&d.jsx(Ve,{children:d.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No leave requests found"})})]})]})})]})}const t3={draft:{variant:"default",icon:Vo},pending_signature:{variant:"warning",icon:Vo},active:{variant:"success",icon:Sl},expired:{variant:"danger",icon:wi},terminated:{variant:"default",icon:wi},disputed:{variant:"danger",icon:wi}},Fce={aamos:"primary",quixzoom:"success",legal:"warning",hr:"default"};function n3(){const[e,t]=P.useState("contracts"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[f,h]=P.useState([]),[m,y]=P.useState([]),[g,j]=P.useState([]),[S,w]=P.useState(null),[b,A]=P.useState(!1);P.useEffect(()=>{async function O(){o(!0),u("");try{const[E,M,D]=await Promise.all([fetch("/api/v1/legal/contracts").then(k=>k.json()),fetch("/api/v1/legal/templates").then(k=>k.json()),fetch("/api/v1/legal/product-links").then(k=>k.json())]);h(E.contracts||[]),y(M.templates||[]),j(D.links||[])}catch(E){u(E instanceof Error?E.message:"Failed to load legal data")}finally{o(!1)}}O()},[]);const _=f.filter(O=>O.name.toLowerCase().includes(n.toLowerCase())||O.counterparty.toLowerCase().includes(n.toLowerCase())||O.template_type.toLowerCase().includes(n.toLowerCase())),T=m.filter(O=>O.name.toLowerCase().includes(n.toLowerCase())||O.description.toLowerCase().includes(n.toLowerCase())||O.category.toLowerCase().includes(n.toLowerCase()));if(i)return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"}),d.jsx(et,{className:"h-[80px]"})]}),d.jsx(et,{className:"h-[400px]"})]});if(l)return d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx("p",{className:"text-danger",children:l})});const C=[{id:"contracts",label:"Avtal",icon:bi},{id:"templates",label:"Mallar",icon:hH},{id:"products",label:"Produktkopplingar",icon:Uo}];return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Legal"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Avtal, mallar och produktkopplingar"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"Nytt avtal"})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:d.jsx(bi,{size:20})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold",children:f.length}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Totalt avtal"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success/10 text-success flex items-center justify-center",children:d.jsx(Sl,{size:20})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold",children:f.filter(O=>O.status==="active").length}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning/10 text-warning flex items-center justify-center",children:d.jsx(Vo,{size:20})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold",children:f.filter(O=>O.status==="pending_signature").length}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Väntar signering"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger/10 text-danger flex items-center justify-center",children:d.jsx(wi,{size:20})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold",children:f.filter(O=>O.status==="expired"||O.status==="terminated").length}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Utgångna"})]})]})})]}),d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto",children:C.map(O=>d.jsxs("button",{onClick:()=>t(O.id),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===O.id?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[d.jsx(O.icon,{size:16}),O.label]},O.id))}),d.jsxs("div",{className:"relative",children:[d.jsx(Ns,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",placeholder:"Sök avtal, mallar eller produkter...",value:n,onChange:O=>r(O.target.value),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]}),e==="contracts"&&d.jsx(he,{children:d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border",children:[d.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Avtal"}),d.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Motpart"}),d.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Typ"}),d.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Status"}),d.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Värde"}),d.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Period"}),d.jsx("th",{className:"text-right text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3"})]})}),d.jsxs("tbody",{className:"divide-y divide-border",children:[_.map(O=>{const E=t3[O.status]||t3.draft;return d.jsxs("tr",{className:"hover:bg-bg transition-colors",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center",children:d.jsx(bi,{size:14})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:O.name}),d.jsx("p",{className:"text-xs text-text-secondary",children:O.template_type})]})]})}),d.jsxs("td",{className:"px-4 py-3",children:[d.jsx("p",{className:"text-sm text-text-primary",children:O.counterparty}),O.counterparty_org&&d.jsx("p",{className:"text-xs text-text-secondary",children:O.counterparty_org})]}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(Ke,{variant:"default",className:"text-xs",children:O.template_type})}),d.jsx("td",{className:"px-4 py-3",children:d.jsxs(Ke,{variant:E.variant,className:"text-xs flex items-center gap-1",children:[d.jsx(E.icon,{size:12}),O.status]})}),d.jsx("td",{className:"px-4 py-3",children:O.value?d.jsxs("p",{className:"text-sm font-medium",children:[_e(O.value)," ",O.currency]}):d.jsx("p",{className:"text-sm text-text-secondary",children:"—"})}),d.jsx("td",{className:"px-4 py-3",children:d.jsxs("p",{className:"text-sm text-text-secondary",children:[O.start_date?mr(O.start_date):"—",O.end_date&&`${mr(O.end_date)}`]})}),d.jsx("td",{className:"px-4 py-3 text-right",children:d.jsxs("div",{className:"flex items-center justify-end gap-1",children:[d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(fL,{size:14})}),d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(HE,{size:14})}),d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:14})})]})})]},O.id)}),_.length===0&&d.jsx("tr",{children:d.jsx("td",{colSpan:7,className:"text-center text-text-secondary py-8",children:"Inga avtal hittades"})})]})]})})}),e==="templates"&&d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[T.map(O=>d.jsx("div",{className:"cursor-pointer hover:border-primary transition-colors",onClick:()=>{w(O),A(!0)},children:d.jsx(he,{children:d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-start justify-between mb-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:d.jsx(bi,{size:20})}),d.jsx(Ke,{variant:Fce[O.category],className:"text-xs",children:O.category})]}),d.jsx("h3",{className:"font-semibold text-text-primary mb-1",children:O.name}),d.jsx("p",{className:"text-sm text-text-secondary mb-3",children:O.description}),d.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-tertiary",children:[d.jsx(sh,{size:12}),O.jurisdiction,d.jsx("span",{className:"mx-1",children:"•"}),d.jsx(oh,{size:12}),"v",O.version,d.jsx("span",{className:"mx-1",children:"•"}),O.sections.length," sektioner"]})]})})},O.id)),T.length===0&&d.jsx("div",{className:"col-span-full text-center text-text-secondary py-8",children:"Inga mallar hittades"})]}),e==="products"&&d.jsx("div",{className:"space-y-6",children:g.map(O=>d.jsx(he,{children:d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:d.jsx(Uo,{size:20})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-text-primary",children:O.product_name}),d.jsx("p",{className:"text-sm text-text-secondary",children:O.product_type})]})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Krävs"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:O.required_contracts.map(E=>d.jsx(Ke,{variant:"primary",className:"text-xs",children:E},E))})]}),O.optional_contracts.length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Valbart"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:O.optional_contracts.map(E=>d.jsx(Ke,{variant:"default",className:"text-xs",children:E},E))})]})]})]})},O.product_id))}),b&&S&&d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:d.jsx("div",{className:"w-full max-w-3xl max-h-[90vh] overflow-y-auto",children:d.jsx(he,{children:d.jsxs("div",{className:"p-6",children:[d.jsxs("div",{className:"flex items-start justify-between mb-6",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold",children:S.name}),d.jsx("p",{className:"text-text-secondary",children:S.description})]}),d.jsx("button",{onClick:()=>A(!1),className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:"✕"})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Kategori"}),d.jsx("p",{className:"font-medium",children:S.category})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Jurisdiktion"}),d.jsx("p",{className:"font-medium",children:S.jurisdiction})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Språk"}),d.jsx("p",{className:"font-medium",children:S.language})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Version"}),d.jsx("p",{className:"font-medium",children:S.version})]})]}),d.jsx("h3",{className:"font-semibold mb-3",children:"Avtalssektioner"}),d.jsx("div",{className:"space-y-2 mb-6",children:S.sections.map(O=>d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsxs("span",{className:"text-xs text-text-tertiary",children:[O.order,"."]}),d.jsx("p",{className:"font-medium text-sm",children:O.title}),O.required&&d.jsx(Ke,{variant:"danger",className:"text-xs",children:"Krävs"})]}),d.jsx("p",{className:"text-sm text-text-secondary",children:O.content}),O.variables&&O.variables.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:O.variables.map(E=>d.jsx("code",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded",children:"{{"+E+"}}"},E))})]},O.id))}),d.jsx("h3",{className:"font-semibold mb-3",children:"Standardvillkor"}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Betalningsvillkor"}),d.jsx("p",{className:"text-sm",children:S.default_terms.payment_terms})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Valuta"}),d.jsx("p",{className:"text-sm",children:S.default_terms.currency})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Avtalsperiod"}),d.jsx("p",{className:"text-sm",children:S.default_terms.contract_period})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Uppsägningstid"}),d.jsx("p",{className:"text-sm",children:S.default_terms.notice_period})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"Auto-förnyelse"}),d.jsx("p",{className:"text-sm",children:S.default_terms.auto_renewal?"Ja":"Nej"})]}),d.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[d.jsx("p",{className:"text-xs text-text-secondary",children:"SLA"}),d.jsx("p",{className:"text-sm",children:S.default_terms.sla_enabled?`${S.default_terms.sla_uptime}% uptime`:"Ej aktiverat"})]})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(Yt,{className:"flex-1",children:[d.jsx(Ma,{size:16,className:"mr-2"}),"Skapa avtal från mall"]}),d.jsxs(Yt,{variant:"secondary",children:[d.jsx(HE,{size:16,className:"mr-2"}),"Förhandsgranska"]})]})]})})})})]})}const Kce=[{id:"1",name:"Q4 Product Launch",status:"active",channel:"Email",reach:12500,engagement:8.2,conversions:340},{id:"2",name:"Holiday Special",status:"scheduled",channel:"Social",reach:0,engagement:0,conversions:0},{id:"3",name:"Customer Retention",status:"active",channel:"Email",reach:8400,engagement:12.5,conversions:520},{id:"4",name:"Partner Webinar",status:"completed",channel:"Webinar",reach:3200,engagement:45,conversions:180}];function Yce(){return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Marketing"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Campaigns and marketing metrics"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"New Campaign"})]}),d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(QS,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"4"}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Campaigns"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:d.jsx(Pa,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"24.1K"}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Total Reach"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:d.jsx(dL,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"10.4%"}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Avg. Engagement"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(Mr,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"1,040"}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Conversions"})]})]})})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Campaigns",subtitle:"Active and recent marketing campaigns"}),d.jsx("div",{className:"space-y-4",children:Kce.map(e=>d.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl bg-bg/50 hover:bg-bg transition-colors",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:e.channel==="Email"?d.jsx(js,{size:18}):d.jsx(cH,{size:18})}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-medium text-text-primary",children:e.name}),d.jsx(Ke,{variant:e.status==="active"?"success":e.status==="scheduled"?"primary":"default",size:"sm",children:e.status})]}),d.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.channel})]})]}),d.jsxs("div",{className:"flex items-center gap-8 text-right",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:e.reach>0?e.reach.toLocaleString():"—"}),d.jsx("p",{className:"text-[11px] text-text-secondary",children:"Reach"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:e.engagement>0?`${e.engagement}%`:"—"}),d.jsx("p",{className:"text-[11px] text-text-secondary",children:"Engagement"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:e.conversions>0?e.conversions.toLocaleString():"—"}),d.jsx("p",{className:"text-[11px] text-text-secondary",children:"Conversions"})]})]})]},e.id))})]})]})}const Ic=[{id:"SUP-2024-001",subject:"Login issues after password reset",customer:"Acme Corp",priority:"high",status:"open",assigned:"Johan Berg",created:new Date(Date.now()-1e3*60*30).toISOString()},{id:"SUP-2024-002",subject:"API rate limit questions",customer:"Nordic Solutions",priority:"medium",status:"in_progress",assigned:"Johan Berg",created:new Date(Date.now()-1e3*60*120).toISOString()},{id:"SUP-2024-003",subject:"Feature request: bulk export",customer:"TechStart AB",priority:"low",status:"open",assigned:"Unassigned",created:new Date(Date.now()-1e3*60*60*4).toISOString()},{id:"SUP-2024-004",subject:"Billing discrepancy on invoice #89",customer:"Global Industries",priority:"high",status:"in_progress",assigned:"Elena Rossi",created:new Date(Date.now()-1e3*60*60*6).toISOString()},{id:"SUP-2024-005",subject:"Integration documentation outdated",customer:"ScandiTech",priority:"medium",status:"resolved",assigned:"Johan Berg",created:new Date(Date.now()-1e3*60*60*24).toISOString()},{id:"SUP-2024-006",subject:"Mobile app crash on iOS",customer:"MegaCorp",priority:"high",status:"open",assigned:"Unassigned",created:new Date(Date.now()-1e3*60*60*2).toISOString()}],Xce=["All","Open","In Progress","Resolved"];function Wce(){const[e,t]=P.useState("All"),[n,r]=P.useState(""),i=Ic.filter(f=>f.status==="open").length,o=Ic.filter(f=>f.status==="in_progress").length,l=Ic.filter(f=>f.status==="resolved").length,u=Ic.filter(f=>{const h=f.subject.toLowerCase().includes(n.toLowerCase())||f.customer.toLowerCase().includes(n.toLowerCase())||f.id.toLowerCase().includes(n.toLowerCase()),m=e==="All"||f.status===e.toLowerCase().replace(" ","_");return h&&m});return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Support"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Customer support tickets"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"New Ticket"})]}),d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(ZS,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ic.length}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Total Tickets"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:d.jsx(Lp,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Open"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(Vo,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:o}),d.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:d.jsx(Sl,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:l}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Resolved"})]})]})})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[d.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:Xce.map(f=>d.jsx("button",{onClick:()=>t(f),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===f?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:f},f))}),d.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[d.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[d.jsx(Ns,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),d.jsx("input",{type:"text",placeholder:"Search tickets...",value:n,onChange:f=>r(f.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),d.jsx(Yt,{variant:"secondary",size:"sm",icon:d.jsx(Ju,{size:14}),children:"Filter"})]})]}),d.jsx(he,{children:d.jsxs(Mn,{children:[d.jsx(bt,{children:d.jsxs(Ve,{children:[d.jsx(ye,{children:"Ticket"}),d.jsx(ye,{children:"Subject"}),d.jsx(ye,{children:"Customer"}),d.jsx(ye,{children:"Priority"}),d.jsx(ye,{children:"Status"}),d.jsx(ye,{children:"Assigned"}),d.jsx(ye,{children:"Created"}),d.jsx(ye,{align:"right"})]})}),d.jsx(Pn,{children:u.map(f=>d.jsxs(Ve,{children:[d.jsx(de,{children:d.jsx("span",{className:"font-medium text-sm",children:f.id})}),d.jsx(de,{children:d.jsx("span",{className:"text-sm text-text-primary",children:f.subject})}),d.jsx(de,{children:f.customer}),d.jsx(de,{children:d.jsx(Ke,{variant:f.priority==="high"?"danger":f.priority==="medium"?"warning":"default",size:"sm",children:f.priority})}),d.jsx(de,{children:d.jsx(Ke,{variant:f.status==="resolved"?"success":f.status==="in_progress"?"primary":"warning",size:"sm",children:f.status.replace("_"," ")})}),d.jsx(de,{children:f.assigned}),d.jsx(de,{children:d.jsx("span",{className:"text-xs text-text-secondary",children:aw(f.created)})}),d.jsx(de,{align:"right",children:d.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:d.jsx(Qr,{size:16})})})]},f.id))})]})})]})}const qc=[{id:"1",name:"New Lead Notification",description:"Send Slack notification when a new lead is created",status:"active",trigger:"Lead Created",actions:["Send Email","Slack Message"],lastRun:"2 min ago",runs:1240},{id:"2",name:"Invoice Reminder",description:"Send reminder 3 days before invoice due date",status:"active",trigger:"Schedule",actions:["Send Email"],lastRun:"1 hour ago",runs:856},{id:"3",name:"Customer Onboarding",description:"Welcome email series for new customers",status:"active",trigger:"Customer Created",actions:["Send Email","Create Task","Add to CRM"],lastRun:"15 min ago",runs:342},{id:"4",name:"Deal Stage Alert",description:"Notify sales team when deal reaches negotiation",status:"paused",trigger:"Deal Updated",actions:["Send Email","Slack Message"],lastRun:"3 days ago",runs:89},{id:"5",name:"Employee Offboarding",description:"Automated offboarding checklist",status:"active",trigger:"Employee Terminated",actions:["Create Task","Send Email","Update HR"],lastRun:"1 week ago",runs:12}],Zce={"Send Email":d.jsx(js,{size:12}),"Slack Message":d.jsx(wH,{size:12}),"Create Task":d.jsx(bi,{size:12}),"Add to CRM":d.jsx(z1,{size:12}),"Update HR":d.jsx(z1,{size:12})};function Qce(){const e=qc.filter(n=>n.status==="active").length,t=qc.reduce((n,r)=>n+r.runs,0);return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Automation"}),d.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Workflows and automated tasks"})]}),d.jsx(Yt,{icon:d.jsx(Ma,{size:16}),children:"New Workflow"})]}),d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(nw,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:qc.length}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Workflows"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:d.jsx(YE,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:e}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:d.jsx(FE,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:qc.length-e}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Paused"})]})]})}),d.jsx(he,{padding:"md",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:d.jsx(Sl,{size:18})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:t.toLocaleString()}),d.jsx("p",{className:"text-xs text-text-secondary",children:"Total Runs"})]})]})})]}),d.jsxs(he,{children:[d.jsx(We,{title:"Workflows",subtitle:"Automated processes and triggers"}),d.jsx("div",{className:"space-y-3",children:qc.map(n=>d.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl bg-bg/50 hover:bg-bg transition-colors",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center ${n.status==="active"?"bg-success-light text-success":"bg-warning-light text-warning"}`,children:n.status==="active"?d.jsx(YE,{size:18}):d.jsx(FE,{size:18})}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-medium text-text-primary",children:n.name}),d.jsx(Ke,{variant:n.status==="active"?"success":"warning",size:"sm",children:n.status})]}),d.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:n.description}),d.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(vH,{size:12,className:"text-text-secondary/60"}),d.jsx("span",{className:"text-[11px] text-text-secondary",children:n.trigger})]}),d.jsx("div",{className:"flex items-center gap-1",children:n.actions.map((r,i)=>d.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 bg-bg rounded text-[10px] text-text-secondary",children:[Zce[r],r]},i))})]})]})]}),d.jsxs("div",{className:"flex items-center gap-6 text-right",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:n.runs.toLocaleString()}),d.jsx("p",{className:"text-[11px] text-text-secondary",children:"runs"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-text-primary",children:n.lastRun}),d.jsx("p",{className:"text-[11px] text-text-secondary",children:"last run"})]}),d.jsx("div",{className:"flex items-center",children:d.jsx("div",{className:"w-9 h-5 rounded-full bg-success/20 relative cursor-pointer",children:d.jsx("div",{className:"absolute right-0.5 top-0.5 w-4 h-4 rounded-full bg-success"})})})]})]},n.id))})]})]})}const lS={crm:{rum:"crm",titel:"CRM Agent",systemPrompt:`Du är CRM Agent — en specialist på kundrelationer och CRM för BOC.
DINA ANSVARSOMRÅDEN:
• Kunder, leads, contacts, accounts
• Kundhistorik och aktiviteter
• Pipeline-relaterad information
• Uppföljningar och nästa bästa åtgärd
• Kundrisker och churn-analys
• CRM-data hygiene
DU HAR TILLGÅNG TILL:
• /api/v1/crm/customers — kunddatabas
• /api/v1/crm/leads — leads
• /api/v1/crm/pipeline — pipeline
• /api/v1/crm/interactions — kundinteraktioner
REGler:
• Svara alltid på svenska
• Var professionell och datadriven
• Föreslå alltid nästa steg
• Eskalera vid komplexa ärenden
• Dokumentera dina rekommendationer`,kompetenser:["kundhantering","lead-kvalificering","pipeline-analys","kundrisk","uppföljning"],dataTyp:"crm",status:"operational",capabilities:["read","analyze","propose","execute"]},sales:{rum:"sales",titel:"Sales Agent",systemPrompt:`Du är Sales Agent — en specialist på försäljning och affärsutveckling för BOC.
DINA ANSVARSOMRÅDEN:
• Opportunities, deals, pipelines
• Forecasting och conversion
• Sales activities och offerter
• Win/loss-analys
• Pipeline risks och nästa steg
• Försäljningsprognoser
DU HAR TILLGÅNG TILL:
• /api/v1/sales/deals — alla deals
• /api/v1/sales/mrr — månatlig återkommande intäkt
• /api/v1/sales/arr — årlig återkommande intäkt
• /api/v1/sales/products — produkter
REGler:
• Svara alltid på svenska
• Var resultatorienterad och datadriven
• Fokusera på nästa steg och action
• Identifiera alltid risksignaler
• Föreslå konkreta åtgärder`,kompetenser:["försäljning","pipeline","forecasting","offert","win/loss"],dataTyp:"sales",status:"operational",capabilities:["read","analyze","propose","execute"]},marketing:{rum:"marketing",titel:"Marketing Agent",systemPrompt:`Du är Marketing Agent — en specialist på marknadsföring och tillväxt för BOC.
DINA ANSVARSOMRÅDEN:
• Campaigns och acquisition
• Attribution och marketing performance
• Segments och content performance
• Campaign planning och conversion
• CAC-relaterade signaler
• Marketing opportunities
DU HAR TILLGÅNG TILL:
• /api/v1/marketing/campaigns — kampanjer
• /api/v1/marketing/content — innehåll
REGler:
• Svara alltid på svenska
• Var kreativ men datadriven
• Fokusera på ROI och conversion
• Föreslå alltid testbara hypoteser
• Tracka alltid resultat`,kompetenser:["marknadsföring","kampanjer","content","SEO","analys"],dataTyp:"marketing",status:"operational",capabilities:["read","analyze","propose"]},social:{rum:"social",titel:"Social Agent",systemPrompt:`Du är Social Agent — en specialist på sociala medier och community för BOC.
DINA ANSVARSOMRÅDEN:
• Social channels och publicering
• Content calendar och engagement
• Mentions och sentiment/signaler
• Community activity och moderation
• Social performance
• Content opportunities
DU HAR TILLGÅNG TILL:
• Sociala kanaler och publiceringsdata
• Engagement-metrics
• Sentiment-analys
REGler:
• Svara alltid på svenska
• Var engagerande och autentisk
• Fokusera på community-värde
• Övervaka alltid sentiment
• Föreslå content baserat på data`,kompetenser:["sociala medier","content","engagement","community","sentiment"],dataTyp:"social",status:"operational",capabilities:["read","analyze","propose"]},finance:{rum:"finance",titel:"Finance Agent",systemPrompt:`Du är Finance Agent — en specialist på finansiell analys och styrning för BOC.
DINA ANSVARSOMRÅDEN:
• Financial overview och cash position
• Cash flow och forecasts
• Financial risks och budgets
• Financial KPIs och deviations
• Alerts och decision support
DU HAR TILLGÅNG TILL:
• /api/v1/finance/balance — balansräkning
• /api/v1/finance/income — resultaträkning
• /api/v1/finance/moms — MOMS-rapport
• /api/v1/finance/cashflow — kassaflöde
• /api/v1/finance/budget — budget
REGler:
• Svara alltid på svenska
• Var noggrann och precis
• Alla siffror måste stämma
• Flagga alltid avvikelser
• Föreslå alltid nästa steg`,kompetenser:["finansanalys","kassaflöde","budget","prognoser","risk"],dataTyp:"finance",status:"operational",capabilities:["read","analyze","propose","execute"]},accounting:{rum:"accounting",titel:"Accounting Agent",systemPrompt:`Du är Accounting Agent — en specialist på redovisning och bokföring för BOC.
DINA ANSVARSOMRÅDEN:
• Accounting data och transactions
• Reconciliation och avstämning
• Invoices och payments
• Accounts och kontoplan
• Accounting anomalies
• Period closing och bookkeeping workflows
• Audit preparation
DU HAR TILLGÅNG TILL:
• /api/v1/finance/accounts — kontoplan
• /api/v1/finance/transactions — transaktioner
• /api/v1/finance/invoices — fakturor
• /api/v1/journal/entries — journalposter
REGler:
• Svara alltid på svenska
• Var noggrann och följ Bokföringslagen
• Alla belopp måste stämma
• Flagga alltid avvikelser
• Förbered alltid audit trail
• ESKALERA vid komplexa redovisningsfrågor`,kompetenser:["redovisning","bokföring","avstämning","bokslut","audit"],dataTyp:"accounting",status:"operational",capabilities:["read","analyze","propose","escalate"]},hr:{rum:"hr",titel:"HR Agent",systemPrompt:`Du är HR Agent — en specialist på personal och organisation för BOC.
DINA ANSVARSOMRÅDEN:
• Employees och organization
• Onboarding och offboarding
• Skills och staffing
• HR workflows och policies
• People-related operational signals
DU HAR TILLGÅNG TILL:
• /api/v1/hr/employees — anställda
• /api/v1/hr/leaves — ledigheter
• /api/v1/hr/timesheets — tidrapporter
• /api/v1/employees — employee lifecycle
REGler:
• Svara alltid på svenska
• Hantera personuppgifter konfidentiellt
• Följ GDPR och personuppgiftslagen
• Var empatisk men professionell
• ESKALERA vid personalärenden`,kompetenser:["HR","rekrytering","personal","onboarding","kompetens"],dataTyp:"hr",status:"operational",capabilities:["read","analyze","propose","escalate"]},legal:{rum:"legal",titel:"Legal Agent",systemPrompt:`Du är Legal Agent — en specialist på juridik och avtal för BOC.
DINA ANSVARSOMRÅDEN:
• Contracts och legal documents
• Obligations och deadlines
• Clauses och legal workflows
• Document classification
• Contract risks och legal escalations
DU HAR TILLGÅNG TILL:
• /api/v1/legal/contracts — avtal
• /api/v1/legal/templates — mallar
• /api/v1/legal/product-links — produktlänkar
VIKTIGT:
• Du ersätter INTE en advokat
• Vid komplexa juridiska frågor, hänvisa ALLTID till jurist
• Granska men ge inte juridiskt bindande råd
• Flagga alltid risker
• ESKALERA vid tvivel`,kompetenser:["juridik","avtal","GDPR","compliance","risk"],dataTyp:"legal",status:"operational",capabilities:["read","analyze","propose","escalate"]},compliance:{rum:"compliance",titel:"Compliance Agent",systemPrompt:`Du är Compliance Agent — en specialist på regelverk och efterlevnad för BOC.
DINA ANSVARSOMRÅDEN:
• Compliance controls och policies
• Evidence och regulatory workflows
• Control status och deviations
• Risk signals och compliance deadlines
• Audit readiness
DU HAR TILLGÅNG TILL:
• Compliance-kontroller och status
• Policy-dokument
• Audit-evidence
• Regulatoriska deadlines
REGler:
• Svara alltid på svenska
• Var noggrann och dokumenterad
• Alla kontroller måste spåras
• Flagga alltid avvikelser
• Förbered alltid audit trail
• ESKALERA vid regulatoriska risker`,kompetenser:["compliance","regelverk","audit","kontroller","risk"],dataTyp:"compliance",status:"operational",capabilities:["read","analyze","propose","escalate"]},support:{rum:"support",titel:"Support Agent",systemPrompt:`Du är Support Agent — en specialist på kundsupport och ärendehantering för BOC.
DINA ANSVARSOMRÅDEN:
• Support cases och tickets
• Conversations och customer issues
• Triage och prioritization
• SLA och escalation
• Resolution suggestions
• Recurring problems
DU HAR TILLGÅNG TILL:
• /api/v1/support/tickets — supportärenden
• /api/v1/support/csat — kundnöjdhet
REGler:
• Svara alltid på svenska
• Var hjälpsam och effektiv
• Prioritera alltid efter SLA
• Eskalera vid L2/L3-behov
• Dokumentera alla lösningar
• Föreslå alltid förebyggande åtgärder`,kompetenser:["support","triage","SLA","eskalerings","lösningar"],dataTyp:"support",status:"operational",capabilities:["read","analyze","propose","execute"]},projects:{rum:"projects",titel:"Projects Agent",systemPrompt:`Du är Projects Agent — en specialist på projektledning och leverans för BOC.
DINA ANSVARSOMRÅDEN:
• Projects och milestones
• Tasks och dependencies
• Resources och deadlines
• Blockers och project health
• Delivery risks och status reporting
DU HAR TILLGÅNG TILL:
• Projektdata och milstolpar
• Task-hantering
• Resursallokering
• Riskregister
REGler:
• Svara alltid på svenska
• Var strukturerad och tydlig
• Fokusera på leverans och kvalitet
• Identifiera alltid blockers
• Föreslå alltid mitigeringsåtgärder
• Rapportera alltid status tydligt`,kompetenser:["projekt","milestones","tasks","resurser","risk"],dataTyp:"projects",status:"operational",capabilities:["read","analyze","propose"]},automation:{rum:"automation",titel:"Automation Agent",systemPrompt:`Du är Automation Agent — en specialist på automatisering och integrationer för BOC.
DINA ANSVARSOMRÅDEN:
• Workflows och automations
• Triggers och scheduled jobs
• Integrations och failures
• Retries och automation health
• Process optimization
DU HAR TILLGÅNG TILL:
• /api/v1/automation/workflows — workflows
• /api/v1/automation/jobs — schemalagda jobb
• /api/v1/automation/runs — körningshistorik
REGler:
• Svara alltid på svenska
• Var teknisk men tydlig
• Fokusera på pålitlighet
• Övervaka alltid health
• Föreslå alltid förbättringar
• Dokumentera alla ändringar`,kompetenser:["automation","workflows","integrationer","schemaläggning","optimering"],dataTyp:"automation",status:"operational",capabilities:["read","analyze","propose","execute"]},dashboard:{rum:"dashboard",titel:"AMOS Assistant",systemPrompt:`Du är AMOS Assistant — en generell AI-assistent för hela AAMOS-plattformen.
DU HJÄLPER ANVÄNDAREN MED:
• Översikt och navigering i systemet
• Tekniska frågor om AAMOS-produkter
• Integrationer och API:er
• Felsökning och support
• Allmänna frågor om Landvex och quiXzoom
DU HAR BRED KUNSKAP OM:
• CRM, Sales, Marketing
• Finance, Accounting
• HR, Legal, Compliance
• Support, Projects, Automation
• Social Media
REGler:
• Svara på svenska eller engelska beroende på användarens språk
• Var hjälpsam, kunnig och effektiv
• Navigera användaren till rätt modul
• Föreslå alltid nästa steg`,kompetenser:["generell","support","teknik","navigering","översikt"],dataTyp:"general",status:"operational",capabilities:["read","analyze","propose"]}};function Jce(e){return lS[e]||lS.dashboard}function eue(){return Object.values(lS).filter(e=>e.rum!=="dashboard")}function tue({rum:e,isOpen:t,onToggle:n}){const r=Jce(e),[i,o]=P.useState([{id:"welcome",roll:"assistant",innehall:`Hej! Jag är ${r.titel}. Jag kan hjälpa dig med ${r.kompetenser.join(", ")}. Vad kan jag göra för dig?`,tid:new Date().toISOString()}]),[l,u]=P.useState(""),[f,h]=P.useState(!1),[m,y]=P.useState(!1),g=P.useRef(null),j=P.useRef(null);P.useEffect(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[i]);const S=async()=>{if(!l.trim()||f)return;const b={id:`user-${Date.now()}`,roll:"user",innehall:l.trim(),tid:new Date().toISOString()};o(A=>[...A,b]),u(""),h(!0);try{const A=await fetch("/api/agent/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rum:r.rum,systemPrompt:r.systemPrompt,meddelanden:[...i,b].map(_=>({roll:_.roll,innehall:_.innehall}))})});if(A.ok){const _=await A.json();o(T=>[...T,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:_.svar,tid:new Date().toISOString()}])}else{const _=r3(r,l.trim());o(T=>[...T,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:_,tid:new Date().toISOString()}])}}catch{const _=r3(r,l.trim());o(T=>[...T,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:_,tid:new Date().toISOString()}])}h(!1)},w=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),S())};return t?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 bg-black/20 z-40",onClick:n}),d.jsxs(vn.div,{initial:{opacity:0,x:100},animate:{opacity:1,x:0},exit:{opacity:0,x:100},className:`fixed right-0 top-0 h-full bg-surface border-l border-border z-50 flex flex-col shadow-xl ${m?"w-[500px]":"w-[380px]"}`,children:[d.jsxs("div",{className:"h-14 border-b border-border flex items-center justify-between px-4 bg-primary/5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:d.jsx(Zc,{size:18,className:"text-white"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-sm",children:r.titel}),d.jsx("p",{className:"text-xs text-text-secondary",children:"AI Assistant"})]})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("button",{onClick:()=>y(!m),className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:m?d.jsx(AH,{size:16}):d.jsx(jH,{size:16})}),d.jsx("button",{onClick:n,className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:d.jsx(zH,{size:16})})]})]}),d.jsxs("div",{ref:g,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[i.map(b=>d.jsxs("div",{className:`flex gap-3 ${b.roll==="user"?"flex-row-reverse":""}`,children:[d.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${b.roll==="assistant"?"bg-primary text-white":"bg-bg text-text-secondary"}`,children:b.roll==="assistant"?d.jsx(Zc,{size:16}):d.jsx(Sh,{size:16})}),d.jsx("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${b.roll==="assistant"?"bg-bg text-text-primary rounded-tl-none":"bg-primary text-white rounded-tr-none"}`,children:d.jsx("p",{className:"whitespace-pre-wrap",children:b.innehall})})]},b.id)),f&&d.jsxs("div",{className:"flex gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-white flex items-center justify-center",children:d.jsx(Zc,{size:16})}),d.jsx("div",{className:"bg-bg rounded-2xl rounded-tl-none px-4 py-3",children:d.jsxs("div",{className:"flex gap-1",children:[d.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce"}),d.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-100"}),d.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-200"})]})})]})]}),d.jsxs("div",{className:"p-4 border-t border-border",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("textarea",{ref:j,value:l,onChange:b=>u(b.target.value),onKeyDown:w,placeholder:"Skriv ett meddelande...",className:"flex-1 min-h-[44px] max-h-[120px] px-4 py-2.5 rounded-xl border bg-surface text-sm resize-none focus:outline-none focus:ring-2 focus:ring-primary/20",rows:1}),d.jsx("button",{onClick:S,disabled:!l.trim()||f,className:"w-11 h-11 bg-primary text-white rounded-xl flex items-center justify-center hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:d.jsx(MH,{size:18})})]}),d.jsx("p",{className:"text-xs text-text-secondary mt-2 text-center",children:"AI kan göra misstag. Verifiera viktig information."})]})]})]}):d.jsx(vn.button,{initial:{scale:0},animate:{scale:1},className:"fixed bottom-6 right-6 z-50 w-14 h-14 bg-primary rounded-full shadow-lg flex items-center justify-center text-white hover:bg-primary/90 transition-colors",onClick:n,children:d.jsx(JS,{size:24})})}function r3(e,t){const n=t.toLowerCase();return e.rum==="finance"?n.includes("moms")?"MOMS (mervärdesskatt) ska redovisas månadsvis eller kvartalsvis beroende på företagets omsättning. Nuvarande MOMS-att-betala är 336 006 kr för perioden. Vill du se detaljerad MOMS-rapport?":n.includes("faktura")||n.includes("invoice")?"Det finns för närvarande 3 fakturor som väntar på betalning. Faktura #INV-2024-0042 är 3 dagar försenad. Vill du skicka en påminnelse?":n.includes("balans")?"Totala tillgångar är 1 842 278 kr, skulder 435 657 kr och eget kapital 1 406 621 kr. Soliditeten är 76.4% vilket är mycket starkt.":"Jag kan hjälpa dig med finansiell analys, MOMS-rapportering, fakturahantering och kassaflödesprognoser. Vad vill du veta mer om?":e.rum==="sales"?n.includes("lead")?"Just nu har vi 12 aktiva leads i pipelinen. 3 är i förhandlingsfas och beräknas stängas denna månad. Vill du se detaljerad pipeline?":"Jag kan hjälpa dig med lead-hantering, offertförfrågningar och säljrapporter. Vad behöver du hjälp med?":e.rum==="hr"?n.includes("semester")?"Du har 25 semesterdagar kvar att ta ut i år. Nästa planerade semester är vecka 32. Vill du ansöka om ny semester?":"Jag kan hjälpa dig med HR-frågor, semesterplanering och personalärenden. Vad kan jag göra för dig?":`Jag förstår. Som ${e.titel} kan jag hjälpa dig med ${e.kompetenser.join(", ")}. Kan du specificera vad du behöver hjälp med?`}const nue={crm:Pa,sales:Mr,marketing:QS,social:RH,finance:tw,accounting:sH,hr:Uo,legal:bi,compliance:kH,support:ZS,projects:yH,automation:nw,dashboard:JS},rue={operational:{icon:Sl,color:"text-green-500",bg:"bg-green-500/10",label:"Operational"},degraded:{icon:Lp,color:"text-yellow-500",bg:"bg-yellow-500/10",label:"Degraded"},error:{icon:VE,color:"text-red-500",bg:"bg-red-500/10",label:"Error"},disabled:{icon:VE,color:"text-gray-400",bg:"bg-gray-400/10",label:"Disabled"}};function aue(){const[e,t]=P.useState(null),[n,r]=P.useState([]),[i,o]=P.useState(!1);P.useEffect(()=>{r(eue())},[]);const l=u=>{t(u),o(!0)};return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-text-primary",children:"BOC Agent Layer"}),d.jsx("p",{className:"text-text-secondary mt-1",children:"Professionellt agentlager för hela organisationen"})]}),d.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-green-500/10 rounded-lg",children:[d.jsx(rH,{size:16,className:"text-green-500"}),d.jsxs("span",{className:"text-sm font-medium text-green-600",children:[n.filter(u=>u.status==="operational").length," / ",n.length," Operational"]})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:n.map((u,f)=>{const h=nue[u.rum]||Zc,m=rue[u.status],y=m.icon;return d.jsxs(vn.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:f*.05},onClick:()=>l(u.rum),className:Tt("group relative p-5 rounded-2xl border border-border bg-surface","hover:border-primary/30 hover:shadow-lg hover:shadow-primary/5","cursor-pointer transition-all duration-200"),children:[d.jsx("div",{className:"absolute top-4 right-4",children:d.jsxs("div",{className:Tt("flex items-center gap-1.5 px-2 py-1 rounded-full",m.bg),children:[d.jsx(y,{size:12,className:m.color}),d.jsx("span",{className:Tt("text-xs font-medium",m.color),children:m.label})]})}),d.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:d.jsx(h,{size:24,className:"text-primary"})}),d.jsx("h3",{className:"font-semibold text-text-primary mb-1",children:u.titel}),d.jsx("p",{className:"text-sm text-text-secondary mb-3 line-clamp-2",children:u.kompetenser.slice(0,3).join(", ")}),d.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.capabilities.map(g=>d.jsx("span",{className:"text-xs px-2 py-0.5 rounded-md bg-bg text-text-secondary",children:g},g))}),d.jsx("div",{className:"mt-4 pt-4 border-t border-border opacity-0 group-hover:opacity-100 transition-opacity",children:d.jsxs("div",{className:"flex items-center gap-2 text-sm text-primary",children:[d.jsx(JS,{size:14}),d.jsx("span",{children:"Öppna agent"})]})})]},u.rum)})}),e&&d.jsx(tue,{rum:e,isOpen:i,onToggle:()=>o(!i)})]})}function iue({children:e}){const{isAuthenticated:t}=Yu();return t?d.jsx(d.Fragment,{children:e}):d.jsx(mS,{to:"/login",replace:!0})}function sue({children:e}){const{isAuthenticated:t}=Yu();return t?d.jsx(mS,{to:"/",replace:!0}):d.jsx(d.Fragment,{children:e})}function oue(){return d.jsxs(gI,{children:[d.jsx(on,{path:"/login",element:d.jsx(sue,{children:d.jsx(wG,{})})}),d.jsxs(on,{element:d.jsx(iue,{children:d.jsx(bG,{})}),children:[d.jsx(on,{path:"/",element:d.jsx(Dce,{})}),d.jsx(on,{path:"/dashboard",element:d.jsx(Ece,{})}),d.jsx(on,{path:"/crm",element:d.jsx($ce,{})}),d.jsx(on,{path:"/sales",element:d.jsx(Ice,{})}),d.jsx(on,{path:"/finance",element:d.jsx(Uce,{})}),d.jsx(on,{path:"/hr",element:d.jsx(Gce,{})}),d.jsx(on,{path:"/legal",element:d.jsx(n3,{})}),d.jsx(on,{path:"/marketing",element:d.jsx(Yce,{})}),d.jsx(on,{path:"/support",element:d.jsx(Wce,{})}),d.jsx(on,{path:"/automation",element:d.jsx(Qce,{})}),d.jsx(on,{path:"/agents",element:d.jsx(aue,{})}),d.jsx(on,{path:"/legal",element:d.jsx(n3,{})}),d.jsx(on,{path:"/profile",element:d.jsx(Lce,{})})]}),d.jsx(on,{path:"*",element:d.jsx(mS,{to:"/",replace:!0})})]})}y8.createRoot(document.getElementById("root")).render(d.jsx(P.StrictMode,{children:d.jsx(UI,{children:d.jsx(oue,{})})}));