Files
boc/web-v2/dist/assets/index-CZzJtMVa.js
T
Bernt 0124fc0186
BOC CI/CD / Test (push) Failing after 1s
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): integrate agents into all BOC modules
- Add AgentFAB floating button to CRM, Sales, Finance, HR, Legal, Marketing, Support, Automation
- Update AgentChat to use /api/v1/agents/chat with auth token
- Add error handling and fallback to mock responses
- Update Anthropic model to claude-sonnet-4-6
- Show agent context in chat footer (title + competencies)
- Build fresh web-v2 dist
2026-08-12 09:04:42 +00:00

790 lines
979 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 Nd=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 Pv={exports:{}},Nc={};/**
* @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 uT;function u8(){if(uT)return Nc;uT=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 Nc.Fragment=t,Nc.jsx=n,Nc.jsxs=n,Nc}var fT;function f8(){return fT||(fT=1,Pv.exports=u8()),Pv.exports}var f=f8(),Rv={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 dT;function d8(){if(dT)return Me;dT=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"),d=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 O(z,F,re){this.props=z,this.context=F,this.refs=b,this.updater=re||S}O.prototype.isReactComponent={},O.prototype.setState=function(z,F){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,F,"setState")},O.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function T(){}T.prototype=O.prototype;function _(z,F,re){this.props=z,this.context=F,this.refs=b,this.updater=re||S}var C=_.prototype=new T;C.constructor=_,w(C,O.prototype),C.isPureReactComponent=!0;var A=Array.isArray;function E(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function k(z,F,re){var fe=re.ref;return{$$typeof:e,type:z,key:F,ref:fe!==void 0?fe:null,props:re}}function B(z,F){return k(z.type,F,z.props)}function q(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function $(z){var F={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(re){return F[re]})}var G=/\/+/g;function X(z,F){return typeof z=="object"&&z!==null&&z.key!=null?$(""+z.key):F.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(F){z.status==="pending"&&(z.status="fulfilled",z.value=F)},function(F){z.status==="pending"&&(z.status="rejected",z.reason=F)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function L(z,F,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),F,re,fe,me)}}if(ze)return me=me(z),ze=fe===""?"."+X(z,0):fe,A(me)?(re="",ze!=null&&(re=ze.replace(G,"$&/")+"/"),L(me,F,re,"",function(Ee){return Ee})):me!=null&&(q(me)&&(me=B(me,re+(me.key==null||z&&z.key===me.key?"":(""+me.key).replace(G,"$&/")+"/")+ze)),F.push(me)),1;ze=0;var Ze=fe===""?".":fe+":";if(A(z))for(var ue=0;ue<z.length;ue++)fe=z[ue],we=Ze+X(fe,ue),ze+=L(fe,F,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,F,re,we,me);else if(we==="object"){if(typeof z.then=="function")return L(Y(z),F,re,fe,me);throw F=String(z),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return ze}function H(z,F,re){if(z==null)return z;var fe=[],me=0;return L(z,fe,"","",function(we){return F.call(re,we,me++)}),fe}function Q(z){if(z._status===-1){var F=z._result;F=F(),F.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=F)}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 F=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(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},oe={map:H,forEach:function(z,F,re){H(z,function(){F.apply(this,arguments)},re)},count:function(z){var F=0;return H(z,function(){F++}),F},toArray:function(z){return H(z,function(F){return F})||[]},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=O,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=_,Me.StrictMode=r,Me.Suspense=d,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,F,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(F!=null)for(we in F.key!==void 0&&(me=""+F.key),F)!D.call(F,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&F.ref===void 0||(fe[we]=F[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,F,re){var fe,me={},we=null;if(F!=null)for(fe in F.key!==void 0&&(we=""+F.key),F)D.call(F,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(me[fe]=F[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,F){return{$$typeof:h,type:z,compare:F===void 0?null:F}},Me.startTransition=function(z){var F=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{F!==null&&re.types!==null&&(F.types=re.types),M.T=F}},Me.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Me.use=function(z){return M.H.use(z)},Me.useActionState=function(z,F,re){return M.H.useActionState(z,F,re)},Me.useCallback=function(z,F){return M.H.useCallback(z,F)},Me.useContext=function(z){return M.H.useContext(z)},Me.useDebugValue=function(){},Me.useDeferredValue=function(z,F){return M.H.useDeferredValue(z,F)},Me.useEffect=function(z,F){return M.H.useEffect(z,F)},Me.useEffectEvent=function(z){return M.H.useEffectEvent(z)},Me.useId=function(){return M.H.useId()},Me.useImperativeHandle=function(z,F,re){return M.H.useImperativeHandle(z,F,re)},Me.useInsertionEffect=function(z,F){return M.H.useInsertionEffect(z,F)},Me.useLayoutEffect=function(z,F){return M.H.useLayoutEffect(z,F)},Me.useMemo=function(z,F){return M.H.useMemo(z,F)},Me.useOptimistic=function(z,F){return M.H.useOptimistic(z,F)},Me.useReducer=function(z,F,re){return M.H.useReducer(z,F,re)},Me.useRef=function(z){return M.H.useRef(z)},Me.useState=function(z){return M.H.useState(z)},Me.useSyncExternalStore=function(z,F,re){return M.H.useSyncExternalStore(z,F,re)},Me.useTransition=function(){return M.H.useTransition()},Me.version="19.2.7",Me}var hT;function fS(){return hT||(hT=1,Rv.exports=d8()),Rv.exports}var P=fS();const I=at(P);var kv={exports:{}},Cc={},Dv={exports:{}},Lv={};/**
* @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 pT;function h8(){return pT||(pT=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 F=2*(ae+1)-1,re=L[F],fe=F+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[F]=Q,ae=F);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 d=[],h=[],m=1,y=null,g=3,j=!1,S=!1,w=!1,b=!1,O=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,_=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(d,H);else break;H=n(h)}}function A(L){if(w=!1,C(L),!S)if(n(d)!==null)S=!0,E||(E=!0,$());else{var H=n(h);H!==null&&Y(A,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,T(M),M=-1),j=!0;var Q=g;try{t:{for(C(L),y=n(d);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(d)&&r(d),C(L)}else r(d);y=n(d)}if(y!==null)H=!0;else{var z=n(h);z!==null&&Y(A,z.startTime-L),H=!1}}break e}finally{y=null,g=Q,j=!1}H=void 0}}finally{H?$():E=!1}}}var $;if(typeof _=="function")$=function(){_(q)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,X=G.port2;G.port1.onmessage=q,$=function(){X.postMessage(null)}}else $=function(){O(q,0)};function Y(L,H){M=O(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(d)===null&&L===n(h)&&(w?(T(M),M=-1):w=!0,Y(A,Q-ae))):(L.sortIndex=oe,t(d,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}}}})(Lv)),Lv}var mT;function p8(){return mT||(mT=1,Dv.exports=h8()),Dv.exports}var zv={exports:{}},pn={};/**
* @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 yT;function m8(){if(yT)return pn;yT=1;var e=fS();function t(d){var h="https://react.dev/errors/"+d;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 #"+d+"; 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(d,h,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:d,containerInfo:h,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pn.createPortal=function(d,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(d,h,null,m)},pn.flushSync=function(d){var h=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=m,r.d.f()}},pn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},pn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},pn.preinit=function(d,h){if(typeof d=="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(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:g,fetchPriority:j}):m==="script"&&r.d.X(d,{crossOrigin:y,integrity:g,fetchPriority:j,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},pn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=u(h.as,h.crossOrigin);r.d.M(d,{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(d)},pn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,y=u(m,h.crossOrigin);r.d.L(d,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})}},pn.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=u(h.as,h.crossOrigin);r.d.m(d,{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(d)},pn.requestFormReset=function(d){r.d.r(d)},pn.unstable_batchedUpdates=function(d,h){return d(h)},pn.useFormState=function(d,h,m){return l.H.useFormState(d,h,m)},pn.useFormStatus=function(){return l.H.useHostTransitionStatus()},pn.version="19.2.7",pn}var vT;function y8(){if(vT)return zv.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(),zv.exports=m8(),zv.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 gT;function v8(){if(gT)return Cc;gT=1;var e=p8(),t=fS(),n=y8();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 d(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 d(v),a;if(x===p)return d(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"),O=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),A=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 G=Symbol.for("react.client.reference");function X(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===G?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case O:return"Profiler";case b:return"StrictMode";case A:return"Suspense";case E:return"SuspenseList";case k:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case _:return a.displayName||"Context";case T: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 F(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)?R_(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=R_(s),a=k_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}F(fe),re(fe,a)}function ue(){F(fe),F(me),F(we)}function Ee(a){a.memoizedState!==null&&re(ze,a);var s=fe.current,c=k_(s,a.type);s!==c&&(re(me,a),re(fe,c))}function Ce(a){me.current===a&&(F(fe),F(me)),ze.current===a&&(F(ze),Oc._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 _t=!1;function Tt(a,s){if(!a||_t)return"";_t=!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{_t=!1,Error.prepareStackTrace=c}return(c=a?a.displayName||a.name:"")?ke(c):""}function dn(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 Tt(a.type,!1);case 11:return Tt(a.type.render,!1);case 1:return Tt(a.type,!0);case 31:return ke("Activity");default:return""}}function gr(a){try{var s="",c=null;do s+=dn(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,Ll=e.unstable_requestPaint,hn=e.unstable_now,ff=e.unstable_getCurrentPriorityLevel,fA=e.unstable_ImmediatePriority,dA=e.unstable_UserBlockingPriority,df=e.unstable_NormalPriority,F$=e.unstable_LowPriority,hA=e.unstable_IdlePriority,G$=e.log,K$=e.unstable_setDisableYieldValue,zl=null,kn=null;function Ua(a){if(typeof G$=="function"&&K$(a),kn&&typeof kn.setStrictMode=="function")try{kn.setStrictMode(zl,a)}catch{}}var Dn=Math.clz32?Math.clz32:W$,Y$=Math.log,X$=Math.LN2;function W$(a){return a>>>=0,a===0?32:31-(Y$(a)/X$|0)|0}var hf=256,pf=262144,mf=4194304;function zi(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 yf(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=zi(p):(N&=R,N!==0?v=zi(N):c||(c=R&~a,c!==0&&(v=zi(c))))):(R=p&~x,R!==0?v=zi(R):N!==0?v=zi(N):c||(c=p&~a,c!==0&&(v=zi(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 $l(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function Z$(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 pA(){var a=mf;return mf<<=1,(mf&62914560)===0&&(mf=4194304),a}function bm(a){for(var s=[],c=0;31>c;c++)s.push(a);return s}function Bl(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Q$(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&&mA(a,p,0),x!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=x&~(N&~s))}function mA(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 yA(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 vA(a,s){var c=s&-s;return c=(c&42)!==0?1:jm(c),(c&(a.suspendedLanes|s))!==0?0:c}function jm(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 Sm(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function gA(){var a=H.p;return a!==0?a:(a=window.event,a===void 0?32:rT(a.type))}function xA(a,s){var c=H.p;try{return H.p=a,s()}finally{H.p=c}}var Va=Math.random().toString(36).slice(2),nn="__reactFiber$"+Va,wn="__reactProps$"+Va,Ls="__reactContainer$"+Va,wm="__reactEvents$"+Va,J$="__reactListeners$"+Va,e6="__reactHandles$"+Va,bA="__reactResources$"+Va,Il="__reactMarker$"+Va;function Am(a){delete a[nn],delete a[wn],delete a[wm],delete a[J$],delete a[e6]}function zs(a){var s=a[nn];if(s)return s;for(var c=a.parentNode;c;){if(s=c[Ls]||c[nn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(a=q_(a);a!==null;){if(c=a[nn])return c;a=q_(a)}return s}a=c,c=a.parentNode}return null}function $s(a){if(a=a[nn]||a[Ls]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function ql(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function Bs(a){var s=a[bA];return s||(s=a[bA]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Wt(a){a[Il]=!0}var jA=new Set,SA={};function $i(a,s){Is(a,s),Is(a+"Capture",s)}function Is(a,s){for(SA[a]=s,a=0;a<s.length;a++)jA.add(s[a])}var t6=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]*$"),wA={},AA={};function n6(a){return $r.call(AA,a)?!0:$r.call(wA,a)?!1:t6.test(a)?AA[a]=!0:(wA[a]=!0,!1)}function vf(a,s,c){if(n6(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 gf(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 OA(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function r6(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 Om(a){if(!a._valueTracker){var s=OA(a)?"checked":"value";a._valueTracker=r6(a,s,""+a[s])}}function _A(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var c=s.getValue(),p="";return a&&(p=OA(a)?a.checked?"true":"false":a.value),a=p,a!==c?(s.setValue(a),!0):!1}function xf(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 a6=/[\n"\\]/g;function Jn(a){return a.replace(a6,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function _m(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?Tm(a,N,Qn(s)):c!=null?Tm(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 TA(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)){Om(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),Om(a)}function Tm(a,s,c){s==="number"&&xf(a.ownerDocument)===a||a.defaultValue===""+c||(a.defaultValue=""+c)}function qs(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 EA(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 NA(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),Om(a)}function Us(a,s){if(s){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=s;return}}a.textContent=s}var i6=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 CA(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||i6.has(s)?s==="float"?a.cssFloat=c:a[s]=(""+c).trim():a[s]=c+"px"}function MA(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&&CA(a,v,p)}else for(var x in s)s.hasOwnProperty(x)&&CA(a,x,s[x])}function Em(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 s6=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"]]),o6=/^[\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 bf(a){return o6.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function aa(){}var Nm=null;function Cm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Vs=null,Hs=null;function PA(a){var s=$s(a);if(s&&(a=s.stateNode)){var c=a[wn]||null;e:switch(a=s.stateNode,s.type){case"input":if(_m(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));_m(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&&_A(p)}break e;case"textarea":EA(a,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&qs(a,!!c.multiple,s,!1)}}}var Mm=!1;function RA(a,s,c){if(Mm)return a(s,c);Mm=!0;try{var p=a(s);return p}finally{if(Mm=!1,(Vs!==null||Hs!==null)&&(od(),Vs&&(s=Vs,a=Hs,Hs=Vs=null,PA(s),a)))for(s=0;s<a.length;s++)PA(a[s])}}function Ul(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"),Pm=!1;if(ia)try{var Vl={};Object.defineProperty(Vl,"passive",{get:function(){Pm=!0}}),window.addEventListener("test",Vl,Vl),window.removeEventListener("test",Vl,Vl)}catch{Pm=!1}var Ha=null,Rm=null,jf=null;function kA(){if(jf)return jf;var a,s=Rm,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 jf=v.slice(a,1<p?1-p:void 0)}function Sf(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 wf(){return!0}function DA(){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)?wf:DA,this.isPropagationStopped=DA,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=wf)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=wf)},persist:function(){},isPersistent:wf}),s}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Af=An(Bi),Hl=y({},Bi,{view:0,detail:0}),l6=An(Hl),km,Dm,Fl,Of=y({},Hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zm,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!==Fl&&(Fl&&a.type==="mousemove"?(km=a.screenX-Fl.screenX,Dm=a.screenY-Fl.screenY):Dm=km=0,Fl=a),km)},movementY:function(a){return"movementY"in a?a.movementY:Dm}}),LA=An(Of),c6=y({},Of,{dataTransfer:0}),u6=An(c6),f6=y({},Hl,{relatedTarget:0}),Lm=An(f6),d6=y({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),h6=An(d6),p6=y({},Bi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),m6=An(p6),y6=y({},Bi,{data:0}),zA=An(y6),v6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g6={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"},x6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function b6(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=x6[a])?!!s[a]:!1}function zm(){return b6}var j6=y({},Hl,{key:function(a){if(a.key){var s=v6[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Sf(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?g6[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zm,charCode:function(a){return a.type==="keypress"?Sf(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Sf(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),S6=An(j6),w6=y({},Of,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$A=An(w6),A6=y({},Hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zm}),O6=An(A6),_6=y({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),T6=An(_6),E6=y({},Of,{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}),N6=An(E6),C6=y({},Bi,{newState:0,oldState:0}),M6=An(C6),P6=[9,13,27,32],$m=ia&&"CompositionEvent"in window,Gl=null;ia&&"documentMode"in document&&(Gl=document.documentMode);var R6=ia&&"TextEvent"in window&&!Gl,BA=ia&&(!$m||Gl&&8<Gl&&11>=Gl),IA=" ",qA=!1;function UA(a,s){switch(a){case"keyup":return P6.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VA(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Fs=!1;function k6(a,s){switch(a){case"compositionend":return VA(s);case"keypress":return s.which!==32?null:(qA=!0,IA);case"textInput":return a=s.data,a===IA&&qA?null:a;default:return null}}function D6(a,s){if(Fs)return a==="compositionend"||!$m&&UA(a,s)?(a=kA(),jf=Rm=Ha=null,Fs=!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 BA&&s.locale!=="ko"?null:s.data;default:return null}}var L6={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 HA(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!L6[a.type]:s==="textarea"}function FA(a,s,c,p){Vs?Hs?Hs.push(p):Hs=[p]:Vs=p,s=pd(s,"onChange"),0<s.length&&(c=new Af("onChange","change",null,c,p),a.push({event:c,listeners:s}))}var Kl=null,Yl=null;function z6(a){T_(a,0)}function _f(a){var s=ql(a);if(_A(s))return a}function GA(a,s){if(a==="change")return s}var KA=!1;if(ia){var Bm;if(ia){var Im="oninput"in document;if(!Im){var YA=document.createElement("div");YA.setAttribute("oninput","return;"),Im=typeof YA.oninput=="function"}Bm=Im}else Bm=!1;KA=Bm&&(!document.documentMode||9<document.documentMode)}function XA(){Kl&&(Kl.detachEvent("onpropertychange",WA),Yl=Kl=null)}function WA(a){if(a.propertyName==="value"&&_f(Yl)){var s=[];FA(s,Yl,a,Cm(a)),RA(z6,s)}}function $6(a,s,c){a==="focusin"?(XA(),Kl=s,Yl=c,Kl.attachEvent("onpropertychange",WA)):a==="focusout"&&XA()}function B6(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return _f(Yl)}function I6(a,s){if(a==="click")return _f(s)}function q6(a,s){if(a==="input"||a==="change")return _f(s)}function U6(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Ln=typeof Object.is=="function"?Object.is:U6;function Xl(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 ZA(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function QA(a,s){var c=ZA(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=ZA(c)}}function JA(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?JA(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function e2(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=xf(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=xf(a.document)}return s}function qm(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 V6=ia&&"documentMode"in document&&11>=document.documentMode,Gs=null,Um=null,Wl=null,Vm=!1;function t2(a,s,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Vm||Gs==null||Gs!==xf(p)||(p=Gs,"selectionStart"in p&&qm(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}),Wl&&Xl(Wl,p)||(Wl=p,p=pd(Um,"onSelect"),0<p.length&&(s=new Af("onSelect","select",null,s,c),a.push({event:s,listeners:p}),s.target=Gs)))}function Ii(a,s){var c={};return c[a.toLowerCase()]=s.toLowerCase(),c["Webkit"+a]="webkit"+s,c["Moz"+a]="moz"+s,c}var Ks={animationend:Ii("Animation","AnimationEnd"),animationiteration:Ii("Animation","AnimationIteration"),animationstart:Ii("Animation","AnimationStart"),transitionrun:Ii("Transition","TransitionRun"),transitionstart:Ii("Transition","TransitionStart"),transitioncancel:Ii("Transition","TransitionCancel"),transitionend:Ii("Transition","TransitionEnd")},Hm={},n2={};ia&&(n2=document.createElement("div").style,"AnimationEvent"in window||(delete Ks.animationend.animation,delete Ks.animationiteration.animation,delete Ks.animationstart.animation),"TransitionEvent"in window||delete Ks.transitionend.transition);function qi(a){if(Hm[a])return Hm[a];if(!Ks[a])return a;var s=Ks[a],c;for(c in s)if(s.hasOwnProperty(c)&&c in n2)return Hm[a]=s[c];return a}var r2=qi("animationend"),a2=qi("animationiteration"),i2=qi("animationstart"),H6=qi("transitionrun"),F6=qi("transitionstart"),G6=qi("transitioncancel"),s2=qi("transitionend"),o2=new Map,Fm="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(" ");Fm.push("scrollEnd");function br(a,s){o2.set(a,s),$i(s,[a])}var Tf=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=[],Ys=0,Gm=0;function Ef(){for(var a=Ys,s=Gm=Ys=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&&l2(c,v,x)}}function Nf(a,s,c,p){er[Ys++]=a,er[Ys++]=s,er[Ys++]=c,er[Ys++]=p,Gm|=p,a.lanes|=p,a=a.alternate,a!==null&&(a.lanes|=p)}function Km(a,s,c,p){return Nf(a,s,c,p),Cf(a)}function Ui(a,s){return Nf(a,null,null,s),Cf(a)}function l2(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 Cf(a){if(50<gc)throw gc=0,nv=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Xs={};function K6(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 K6(a,s,c,p)}function Ym(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 c2(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 Mf(a,s,c,p,v,x){var N=0;if(p=a,typeof a=="function")Ym(a)&&(N=1);else if(typeof a=="string")N=QB(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 Vi(c.children,v,x,s);case b:N=8,v|=24;break;case O:return a=zn(12,c,s,v|2),a.elementType=O,a.lanes=x,a;case A:return a=zn(13,c,s,v),a.elementType=A,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 _:N=10;break e;case T: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 Vi(a,s,c,p){return a=zn(7,a,p,s),a.lanes=c,a}function Xm(a,s,c){return a=zn(6,a,null,s),a.lanes=c,a}function u2(a){var s=zn(18,null,null,0);return s.stateNode=a,s}function Wm(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 f2=new WeakMap;function tr(a,s){if(typeof a=="object"&&a!==null){var c=f2.get(a);return c!==void 0?c:(s={value:a,source:s,stack:gr(s)},f2.set(a,s),s)}return{value:a,source:s,stack:gr(s)}}var Ws=[],Zs=0,Pf=null,Zl=0,nr=[],rr=0,Fa=null,Br=1,Ir="";function oa(a,s){Ws[Zs++]=Zl,Ws[Zs++]=Pf,Pf=a,Zl=s}function d2(a,s,c){nr[rr++]=Br,nr[rr++]=Ir,nr[rr++]=Fa,Fa=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 Zm(a){a.return!==null&&(oa(a,1),d2(a,1,0))}function Qm(a){for(;a===Pf;)Pf=Ws[--Zs],Ws[Zs]=null,Zl=Ws[--Zs],Ws[Zs]=null;for(;a===Fa;)Fa=nr[--rr],nr[rr]=null,Ir=nr[--rr],nr[rr]=null,Br=nr[--rr],nr[rr]=null}function h2(a,s){nr[rr++]=Br,nr[rr++]=Ir,nr[rr++]=Fa,Br=s.id,Ir=s.overflow,Fa=a}var rn=null,vt=null,He=!1,Ga=null,ar=!1,Jm=Error(r(519));function Ka(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ql(tr(s,a)),Jm}function p2(a){var s=a.stateNode,c=a.type,p=a.memoizedProps;switch(s[nn]=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<bc.length;c++)Be(bc[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),TA(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),NA(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||M_(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 m2(a){for(rn=a.return;rn;)switch(rn.tag){case 5:case 31:case 13:ar=!1;return;case 27:case 3:ar=!0;return;default:rn=rn.return}}function Qs(a){if(a!==rn)return!1;if(!He)return m2(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")||vv(a.type,a.memoizedProps)),c=!c),c&&vt&&Ka(a),m2(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=I_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=I_(a)}else s===27?(s=vt,oi(a.type)?(a=Sv,Sv=null,vt=a):vt=s):vt=rn?sr(a.stateNode.nextSibling):null;return!0}function Hi(){vt=rn=null,He=!1}function ey(){var a=Ga;return a!==null&&(En===null?En=a:En.push.apply(En,a),Ga=null),a}function Ql(a){Ga===null?Ga=[a]:Ga.push(a)}var ty=z(null),Fi=null,la=null;function Ya(a,s,c){re(ty,s._currentValue),s._currentValue=c}function ca(a){a._currentValue=ty.current,F(ty)}function ny(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 ry(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),ny(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),ny(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 Js(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(Oc):a=[Oc])}v=v.return}a!==null&&ry(s,a,c,p),s.flags|=262144}function Rf(a){for(a=a.firstContext;a!==null;){if(!Ln(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Gi(a){Fi=a,la=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function an(a){return y2(Fi,a)}function kf(a,s){return Fi===null&&Gi(a),y2(a,s)}function y2(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 Y6=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()})}},X6=e.unstable_scheduleCallback,W6=e.unstable_NormalPriority,Dt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ay(){return{controller:new Y6,data:new Map,refCount:0}}function Jl(a){a.refCount--,a.refCount===0&&X6(W6,function(){a.controller.abort()})}var ec=null,iy=0,eo=0,to=null;function Z6(a,s){if(ec===null){var c=ec=[];iy=0,eo=lv(),to={status:"pending",value:void 0,then:function(p){c.push(p)}}}return iy++,s.then(v2,v2),s}function v2(){if(--iy===0&&ec!==null){to!==null&&(to.status="fulfilled");var a=ec;ec=null,eo=0,to=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function Q6(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 g2=L.S;L.S=function(a,s){t_=hn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Z6(a,s),g2!==null&&g2(a,s)};var Ki=z(null);function sy(){var a=Ki.current;return a!==null?a:ct.pooledCache}function Df(a,s){s===null?re(Ki,Ki.current):re(Ki,s.pool)}function x2(){var a=sy();return a===null?null:{parent:Dt._currentValue,pool:a}}var no=Error(r(460)),oy=Error(r(474)),Lf=Error(r(542)),zf={then:function(){}};function b2(a){return a=a.status,a==="fulfilled"||a==="rejected"}function j2(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,w2(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,w2(a),a}throw Xi=s,no}}function Yi(a){try{var s=a._init;return s(a._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Xi=c,no):c}}var Xi=null;function S2(){if(Xi===null)throw Error(r(459));var a=Xi;return Xi=null,a}function w2(a){if(a===no||a===Lf)throw Error(r(483))}var ro=null,tc=0;function $f(a){var s=tc;return tc+=1,ro===null&&(ro=[]),j2(ro,a,s)}function nc(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Bf(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 A2(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=Xm(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&&Yi(Se)===V.type)?(V=v(V,W.props),nc(V,W),V.return=K,V):(V=Mf(W.type,W.key,W.props,null,K.mode,ie),nc(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=Wm(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=Vi(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=Xm(""+V,K.mode,W),V.return=K,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case j:return W=Mf(V.type,V.key,V.props,null,K.mode,W),nc(W,V),W.return=K,W;case S:return V=Wm(V,K.mode,W),V.return=K,V;case D:return V=Yi(V),se(K,V,W)}if(Y(V)||$(V))return V=Vi(V,K.mode,W,null),V.return=K,V;if(typeof V.then=="function")return se(K,$f(V),W);if(V.$$typeof===_)return se(K,kf(K,V),W);Bf(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=Yi(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,$f(W),ie);if(W.$$typeof===_)return J(K,V,kf(K,W),ie);Bf(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=Yi(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,$f(ie),Se);if(ie.$$typeof===_)return ee(K,V,W,kf(V,ie),Se);Bf(V,ie)}return null}function ge(K,V,W,ie){for(var Se=null,Fe=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 Ge=J(K,be,W[De],ie);if(Ge===null){be===null&&(be=Ue);break}a&&be&&Ge.alternate===null&&s(K,be),V=x(Ge,V,De),Fe===null?Se=Ge:Fe.sibling=Ge,Fe=Ge,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),Fe===null?Se=be:Fe.sibling=be,Fe=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),Fe===null?Se=Ue:Fe.sibling=Ue,Fe=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,Fe=null,be=V,De=V=0,Ue=null,Ge=W.next();be!==null&&!Ge.done;De++,Ge=W.next()){be.index>De?(Ue=be,be=null):Ue=be.sibling;var di=J(K,be,Ge.value,ie);if(di===null){be===null&&(be=Ue);break}a&&be&&di.alternate===null&&s(K,be),V=x(di,V,De),Fe===null?Se=di:Fe.sibling=di,Fe=di,be=Ue}if(Ge.done)return c(K,be),He&&oa(K,De),Se;if(be===null){for(;!Ge.done;De++,Ge=W.next())Ge=se(K,Ge.value,ie),Ge!==null&&(V=x(Ge,V,De),Fe===null?Se=Ge:Fe.sibling=Ge,Fe=Ge);return He&&oa(K,De),Se}for(be=p(be);!Ge.done;De++,Ge=W.next())Ge=ee(be,K,De,Ge.value,ie),Ge!==null&&(a&&Ge.alternate!==null&&be.delete(Ge.key===null?De:Ge.key),V=x(Ge,V,De),Fe===null?Se=Ge:Fe.sibling=Ge,Fe=Ge);return a&&be.forEach(function(c8){return s(K,c8)}),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&&Yi(Se)===V.type){c(K,V.sibling),ie=v(V,W.props),nc(ie,W),ie.return=K,K=ie;break e}c(K,V);break}else s(K,V);V=V.sibling}W.type===w?(ie=Vi(W.props.children,K.mode,ie,W.key),ie.return=K,K=ie):(ie=Mf(W.type,W.key,W.props,null,K.mode,ie),nc(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=Wm(W,K.mode,ie),ie.return=K,K=ie}return N(K);case D:return W=Yi(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,$f(W),ie);if(W.$$typeof===_)return ot(K,V,kf(K,W),ie);Bf(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=Xm(W,K.mode,ie),ie.return=K,K=ie),N(K)):c(K,V)}return function(K,V,W,ie){try{tc=0;var Se=ot(K,V,W,ie);return ro=null,Se}catch(be){if(be===no||be===Lf)throw be;var Fe=zn(29,be,null,K.mode);return Fe.lanes=ie,Fe.return=K,Fe}finally{}}}var Wi=A2(!0),O2=A2(!1),Xa=!1;function ly(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cy(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=Cf(a),l2(a,null,c),s}return Nf(a,p,s,c),Cf(a)}function rc(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,yA(a,c)}}function uy(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 fy=!1;function ac(){if(fy){var a=to;if(a!==null)throw a}}function ic(a,s,c,p){fy=!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===eo&&(fy=!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 _2(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function T2(a,s){var c=a.callbacks;if(c!==null)for(a.callbacks=null,a=0;a<c.length;a++)_2(c[a],s)}var ao=z(null),If=z(0);function E2(a,s){a=ga,re(If,a),re(ao,s),ga=a|s.baseLanes}function dy(){re(If,ga),re(ao,ao.current)}function hy(){ga=If.current,F(ao),F(If)}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||ao.current!==null||s.memoizedState!==null)&&(ir=a)}function py(a){re(Pt,Pt.current),re($n,a),ir===null&&(ir=a)}function N2(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){F($n),ir===a&&(ir=null),F(Pt)}var Pt=z(0);function qf(a){for(var s=a;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||bv(c)||jv(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,Uf=!1,io=!1,Zi=!1,Vf=0,sc=0,so=null,J6=0;function Et(){throw Error(r(321))}function my(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 yy(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?dO:My,Zi=!1,x=c(p,v),Zi=!1,io&&(x=M2(s,c,p,v)),C2(a),x}function C2(a){L.H=cc;var s=it!==null&&it.next!==null;if(ua=0,Lt=it=Re=null,Uf=!1,sc=0,so=null,s)throw Error(r(300));a===null||zt||(a=a.dependencies,a!==null&&Rf(a)&&(zt=!0))}function M2(a,s,c,p){Re=a;var v=0;do{if(io&&(so=null),sc=0,io=!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=hO,x=s(c,p)}while(io);return x}function eB(){var a=L.H,s=a.useState()[0];return s=typeof s.then=="function"?oc(s):s,a=a.useState()[0],(it!==null?it.memoizedState:null)!==a&&(Re.flags|=1024),s}function vy(){var a=Vf!==0;return Vf=0,a}function gy(a,s,c){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~c}function xy(a){if(Uf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Uf=!1}ua=0,Lt=it=Re=null,io=!1,sc=Vf=0,so=null}function vn(){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 Hf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oc(a){var s=sc;return sc+=1,so===null&&(so=[]),a=j2(so,a,s),s=Re,(Lt===null?s.memoizedState:Lt.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?dO:My),a}function Ff(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return oc(a);if(a.$$typeof===_)return an(a)}throw Error(r(438,String(a)))}function by(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=Hf(),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 jy(s,it,a)}function jy(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===eo&&(te=!0);else if((ua&J)===J){Z=Z.next,J===eo&&(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,Zi&&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=to,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 Sy(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 P2(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,Oy(D2.bind(null,p,v,a),[a]),v.getSnapshot!==s||N||Lt!==null&&Lt.memoizedState.tag&1){if(p.flags|=2048,oo(9,{destroy:void 0},k2.bind(null,p,v,c,s),null),ct===null)throw Error(r(349));x||(ua&127)!==0||R2(p,s,c)}return c}function R2(a,s,c){a.flags|=16384,a={getSnapshot:s,value:c},s=Re.updateQueue,s===null?(s=Hf(),Re.updateQueue=s,s.stores=[a]):(c=s.stores,c===null?s.stores=[a]:c.push(a))}function k2(a,s,c,p){s.value=c,s.getSnapshot=p,L2(s)&&z2(a)}function D2(a,s,c){return c(function(){L2(s)&&z2(a)})}function L2(a){var s=a.getSnapshot;a=a.value;try{var c=s();return!Ln(a,c)}catch{return!0}}function z2(a){var s=Ui(a,2);s!==null&&Nn(s,a,2)}function wy(a){var s=vn();if(typeof a=="function"){var c=a;if(a=c(),Zi){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 $2(a,s,c,p){return a.baseState=c,jy(a,it,typeof p=="function"?p:fa)}function tB(a,s,c,p,v){if(Xf(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,B2(s,x)):(x.next=c.next,s.pending=c.next=x)}}function B2(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),I2(a,s,R)}catch(Z){Ay(a,s,Z)}finally{x!==null&&N.types!==null&&(x.types=N.types),L.T=x}}else try{x=c(v,p),I2(a,s,x)}catch(Z){Ay(a,s,Z)}}function I2(a,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(p){q2(a,s,p)},function(p){return Ay(a,s,p)}):q2(a,s,c)}function q2(a,s,c){s.status="fulfilled",s.value=c,U2(s),a.state=c,s=a.pending,s!==null&&(c=s.next,c===s?a.pending=null:(c=c.next,s.next=c,B2(a,c)))}function Ay(a,s,c){var p=a.pending;if(a.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=c,U2(s),s=s.next;while(s!==p)}a.action=null}function U2(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function V2(a,s){return s}function H2(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=vn(),c.memoizedState=c.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:V2,lastRenderedState:s},c.queue=p,c=cO.bind(null,Re,p),p.dispatch=c,p=wy(!1),x=Cy.bind(null,Re,!1,p.queue),p=vn(),v={state:s,dispatch:null,action:a,pending:null},p.queue=v,c=tB.bind(null,Re,v,x,c),v.dispatch=c,p.memoizedState=a,[s,c,!1]}function F2(a){var s=Rt();return G2(s,it,a)}function G2(a,s,c){if(s=jy(a,s,V2)[0],a=Gf(fa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=oc(s)}catch(N){throw N===no?Lf:N}else p=s;s=Rt();var v=s.queue,x=v.dispatch;return c!==s.memoizedState&&(Re.flags|=2048,oo(9,{destroy:void 0},nB.bind(null,v,c),null)),[p,x,a]}function nB(a,s){a.action=s}function K2(a){var s=Rt(),c=it;if(c!==null)return G2(s,c,a);Rt(),s=s.memoizedState,c=Rt();var p=c.queue.dispatch;return c.memoizedState=a,[s,p,!1]}function oo(a,s,c,p){return a={tag:a,create:c,deps:p,inst:s,next:null},s=Re.updateQueue,s===null&&(s=Hf(),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 Y2(){return Rt().memoizedState}function Kf(a,s,c,p){var v=vn();Re.flags|=a,v.memoizedState=oo(1|s,{destroy:void 0},c,p===void 0?null:p)}function Yf(a,s,c,p){var v=Rt();p=p===void 0?null:p;var x=v.memoizedState.inst;it!==null&&p!==null&&my(p,it.memoizedState.deps)?v.memoizedState=oo(s,x,c,p):(Re.flags|=a,v.memoizedState=oo(1|s,x,c,p))}function X2(a,s){Kf(8390656,8,a,s)}function Oy(a,s){Yf(2048,8,a,s)}function rB(a){Re.flags|=4;var s=Re.updateQueue;if(s===null)s=Hf(),Re.updateQueue=s,s.events=[a];else{var c=s.events;c===null?s.events=[a]:c.push(a)}}function W2(a){var s=Rt().memoizedState;return rB({ref:s,nextImpl:a}),function(){if((Xe&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function Z2(a,s){return Yf(4,2,a,s)}function Q2(a,s){return Yf(4,4,a,s)}function J2(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 eO(a,s,c){c=c!=null?c.concat([a]):null,Yf(4,4,J2.bind(null,s,a),c)}function _y(){}function tO(a,s){var c=Rt();s=s===void 0?null:s;var p=c.memoizedState;return s!==null&&my(s,p[1])?p[0]:(c.memoizedState=[a,s],a)}function nO(a,s){var c=Rt();s=s===void 0?null:s;var p=c.memoizedState;if(s!==null&&my(s,p[1]))return p[0];if(p=a(),Zi){Ua(!0);try{a()}finally{Ua(!1)}}return c.memoizedState=[p,s],p}function Ty(a,s,c){return c===void 0||(ua&1073741824)!==0&&(qe&261930)===0?a.memoizedState=s:(a.memoizedState=c,a=r_(),Re.lanes|=a,ni|=a,c)}function rO(a,s,c,p){return Ln(c,s)?c:ao.current!==null?(a=Ty(a,c,p),Ln(a,s)||(zt=!0),a):(ua&42)===0||(ua&1073741824)!==0&&(qe&261930)===0?(zt=!0,a.memoizedState=c):(a=r_(),Re.lanes|=a,ni|=a,s)}function aO(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,Cy(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=Q6(U,p);lc(a,s,te,Un(a))}else lc(a,s,p,Un(a))}catch(se){lc(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 aB(){}function Ey(a,s,c,p){if(a.tag!==5)throw Error(r(476));var v=iO(a).queue;aO(a,v,s,Q,c===null?aB:function(){return sO(a),c(p)})}function iO(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 sO(a){var s=iO(a);s.next===null&&(s=a.alternate.memoizedState),lc(a,s.next.queue,{},Un())}function Ny(){return an(Oc)}function oO(){return Rt().memoizedState}function lO(){return Rt().memoizedState}function iB(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),rc(p,s,c)),s={cache:ay()},a.payload=s;return}s=s.return}}function sB(a,s,c){var p=Un();c={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Xf(a)?uO(s,c):(c=Km(a,s,c,p),c!==null&&(Nn(c,a,p),fO(c,s,p)))}function cO(a,s,c){var p=Un();lc(a,s,c,p)}function lc(a,s,c,p){var v={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Xf(a))uO(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 Nf(a,s,v,0),ct===null&&Ef(),!1}catch{}finally{}if(c=Km(a,s,v,p),c!==null)return Nn(c,a,p),fO(c,s,p),!0}return!1}function Cy(a,s,c,p){if(p={lane:2,revertLane:lv(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Xf(a)){if(s)throw Error(r(479))}else s=Km(a,c,p,2),s!==null&&Nn(s,a,2)}function Xf(a){var s=a.alternate;return a===Re||s!==null&&s===Re}function uO(a,s){io=Uf=!0;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}function fO(a,s,c){if((c&4194048)!==0){var p=s.lanes;p&=a.pendingLanes,c|=p,s.lanes=c,yA(a,c)}}var cc={readContext:an,use:Ff,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};cc.useEffectEvent=Et;var dO={readContext:an,use:Ff,useCallback:function(a,s){return vn().memoizedState=[a,s===void 0?null:s],a},useContext:an,useEffect:X2,useImperativeHandle:function(a,s,c){c=c!=null?c.concat([a]):null,Kf(4194308,4,J2.bind(null,s,a),c)},useLayoutEffect:function(a,s){return Kf(4194308,4,a,s)},useInsertionEffect:function(a,s){Kf(4,2,a,s)},useMemo:function(a,s){var c=vn();s=s===void 0?null:s;var p=a();if(Zi){Ua(!0);try{a()}finally{Ua(!1)}}return c.memoizedState=[p,s],p},useReducer:function(a,s,c){var p=vn();if(c!==void 0){var v=c(s);if(Zi){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=sB.bind(null,Re,a),[p.memoizedState,a]},useRef:function(a){var s=vn();return a={current:a},s.memoizedState=a},useState:function(a){a=wy(a);var s=a.queue,c=cO.bind(null,Re,s);return s.dispatch=c,[a.memoizedState,c]},useDebugValue:_y,useDeferredValue:function(a,s){var c=vn();return Ty(c,a,s)},useTransition:function(){var a=wy(!1);return a=aO.bind(null,Re,a.queue,!0,!1),vn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,c){var p=Re,v=vn();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||R2(p,s,c)}v.memoizedState=c;var x={value:c,getSnapshot:s};return v.queue=x,X2(D2.bind(null,p,x,a),[a]),p.flags|=2048,oo(9,{destroy:void 0},k2.bind(null,p,x,c,s),null),c},useId:function(){var a=vn(),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=Vf++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=J6++,s="_"+s+"r_"+c.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Ny,useFormState:H2,useActionState:H2,useOptimistic:function(a){var s=vn();s.memoizedState=s.baseState=a;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Cy.bind(null,Re,!0,c),c.dispatch=s,[a,s]},useMemoCache:by,useCacheRefresh:function(){return vn().memoizedState=iB.bind(null,Re)},useEffectEvent:function(a){var s=vn(),c={impl:a};return s.memoizedState=c,function(){if((Xe&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},My={readContext:an,use:Ff,useCallback:tO,useContext:an,useEffect:Oy,useImperativeHandle:eO,useInsertionEffect:Z2,useLayoutEffect:Q2,useMemo:nO,useReducer:Gf,useRef:Y2,useState:function(){return Gf(fa)},useDebugValue:_y,useDeferredValue:function(a,s){var c=Rt();return rO(c,it.memoizedState,a,s)},useTransition:function(){var a=Gf(fa)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:oc(a),s]},useSyncExternalStore:P2,useId:oO,useHostTransitionStatus:Ny,useFormState:F2,useActionState:F2,useOptimistic:function(a,s){var c=Rt();return $2(c,it,a,s)},useMemoCache:by,useCacheRefresh:lO};My.useEffectEvent=W2;var hO={readContext:an,use:Ff,useCallback:tO,useContext:an,useEffect:Oy,useImperativeHandle:eO,useInsertionEffect:Z2,useLayoutEffect:Q2,useMemo:nO,useReducer:Sy,useRef:Y2,useState:function(){return Sy(fa)},useDebugValue:_y,useDeferredValue:function(a,s){var c=Rt();return it===null?Ty(c,a,s):rO(c,it.memoizedState,a,s)},useTransition:function(){var a=Sy(fa)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:oc(a),s]},useSyncExternalStore:P2,useId:oO,useHostTransitionStatus:Ny,useFormState:K2,useActionState:K2,useOptimistic:function(a,s){var c=Rt();return it!==null?$2(c,it,a,s):(c.baseState=a,[a,c.queue.dispatch])},useMemoCache:by,useCacheRefresh:lO};hO.useEffectEvent=W2;function Py(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 Ry={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),rc(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),rc(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),rc(s,a,c))}};function pO(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?!Xl(c,p)||!Xl(v,x):!0}function mO(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&&Ry.enqueueReplaceState(s,s.state,null)}function Qi(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 yO(a){Tf(a)}function vO(a){console.error(a)}function gO(a){Tf(a)}function Wf(a,s){try{var c=a.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function xO(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 ky(a,s,c){return c=Wa(c),c.tag=3,c.payload={element:null},c.callback=function(){Wf(a,s)},c}function bO(a){return a=Wa(a),a.tag=3,a}function jO(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(){xO(s,c,p)}}var N=c.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(a.callback=function(){xO(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 oB(a,s,c,p,v){if(c.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=c.alternate,s!==null&&Js(s,c,v,!0),c=$n.current,c!==null){switch(c.tag){case 31:case 13:return ir===null?ld():c.alternate===null&&Nt===0&&(Nt=3),c.flags&=-257,c.flags|=65536,c.lanes=v,p===zf?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([p]):s.add(p),iv(a,p,v)),!1;case 22:return c.flags|=65536,p===zf?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)),iv(a,p,v)),!1}throw Error(r(435,c.tag))}return iv(a,p,v),ld(),!1}if(He)return s=$n.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,p!==Jm&&(a=Error(r(422),{cause:p}),Ql(tr(a,c)))):(p!==Jm&&(s=Error(r(423),{cause:p}),Ql(tr(s,c))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,p=tr(p,c),v=ky(a.stateNode,p,v),uy(a,v),Nt!==4&&(Nt=2)),!1;var x=Error(r(520),{cause:p});if(x=tr(x,c),vc===null?vc=[x]:vc.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=ky(c.stateNode,p,a),uy(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=bO(v),jO(v,a,c,p),uy(c,v),!1}c=c.return}while(c!==null);return!1}var Dy=Error(r(461)),zt=!1;function sn(a,s,c,p){s.child=a===null?O2(s,null,c,p):Wi(s,a.child,c,p)}function SO(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=yy(a,s,c,N,x,v),R=vy(),a!==null&&!zt?(gy(a,s,v),da(a,s,v)):(He&&R&&Zm(s),s.flags|=1,sn(a,s,p,v),s.child)}function wO(a,s,c,p,v){if(a===null){var x=c.type;return typeof x=="function"&&!Ym(x)&&x.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=x,AO(a,s,x,p,v)):(a=Mf(c.type,null,p,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(x=a.child,!Vy(a,v)){var N=x.memoizedProps;if(c=c.compare,c=c!==null?c:Xl,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 AO(a,s,c,p,v){if(a!==null){var x=a.memoizedProps;if(Xl(x,p)&&a.ref===s.ref)if(zt=!1,s.pendingProps=p=x,Vy(a,v))(a.flags&131072)!==0&&(zt=!0);else return s.lanes=a.lanes,da(a,s,v)}return Ly(a,s,c,p,v)}function OO(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 _O(a,s,x,c,p)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Df(s,x!==null?x.cachePool:null),x!==null?E2(s,x):dy(),N2(s);else return p=s.lanes=536870912,_O(a,s,x!==null?x.baseLanes|c:c,c,p)}else x!==null?(Df(s,x.cachePool),E2(s,x),Ja(),s.memoizedState=null):(a!==null&&Df(s,null),dy(),Ja());return sn(a,s,v,c),s.child}function uc(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function _O(a,s,c,p,v){var x=sy();return x=x===null?null:{parent:Dt._currentValue,pool:x},s.memoizedState={baseLanes:c,cachePool:x},a!==null&&Df(s,null),dy(),N2(s),a!==null&&Js(a,s,p,!0),s.childLanes=v,null}function Zf(a,s){return s=Jf({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function TO(a,s,c){return Wi(s,a.child,null,c),a=Zf(s,s.pendingProps),a.flags|=2,Bn(s),s.memoizedState=null,a}function lB(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=Zf(s,p),s.lanes=536870912,uc(null,a);if(py(s),(a=vt)?(a=B_(a,ar),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Fa!==null?{id:Br,overflow:Ir}:null,retryLane:536870912,hydrationErrors:null},c=u2(a),c.return=s,s.child=c,rn=s,vt=null)):a=null,a===null)throw Ka(s);return s.lanes=536870912,null}return Zf(s,p)}var x=a.memoizedState;if(x!==null){var N=x.dehydrated;if(py(s),v)if(s.flags&256)s.flags&=-257,s=TO(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||Js(a,s,c,!1),v=(c&a.childLanes)!==0,zt||v){if(p=ct,p!==null&&(N=vA(p,c),N!==0&&N!==x.retryLane))throw x.retryLane=N,Ui(a,N),Nn(p,a,N),Dy;ld(),s=TO(a,s,c)}else a=x.treeContext,vt=sr(N.nextSibling),rn=s,He=!0,Ga=null,ar=!1,a!==null&&h2(s,a),s=Zf(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 Qf(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 Ly(a,s,c,p,v){return Gi(s),c=yy(a,s,c,p,void 0,v),p=vy(),a!==null&&!zt?(gy(a,s,v),da(a,s,v)):(He&&p&&Zm(s),s.flags|=1,sn(a,s,c,v),s.child)}function EO(a,s,c,p,v,x){return Gi(s),s.updateQueue=null,c=M2(s,p,c,v),C2(a),p=vy(),a!==null&&!zt?(gy(a,s,x),da(a,s,x)):(He&&p&&Zm(s),s.flags|=1,sn(a,s,c,x),s.child)}function NO(a,s,c,p,v){if(Gi(s),s.stateNode===null){var x=Xs,N=c.contextType;typeof N=="object"&&N!==null&&(x=an(N)),x=new c(p,x),s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Ry,s.stateNode=x,x._reactInternals=s,x=s.stateNode,x.props=p,x.state=s.memoizedState,x.refs={},ly(s),N=c.contextType,x.context=typeof N=="object"&&N!==null?an(N):Xs,x.state=s.memoizedState,N=c.getDerivedStateFromProps,typeof N=="function"&&(Py(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&&Ry.enqueueReplaceState(x,x.state,null),ic(s,p,x,v),ac(),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=Qi(c,R);x.props=U;var Z=x.context,te=c.contextType;N=Xs,typeof te=="object"&&te!==null&&(N=an(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)&&mO(s,x,p,N),Xa=!1;var J=s.memoizedState;x.state=J,ic(s,p,x,v),ac(),Z=s.memoizedState,R||J!==Z||Xa?(typeof se=="function"&&(Py(s,c,se,p),Z=s.memoizedState),(U=Xa||pO(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,cy(a,s),N=s.memoizedProps,te=Qi(c,N),x.props=te,se=s.pendingProps,J=x.context,Z=c.contextType,U=Xs,typeof Z=="object"&&Z!==null&&(U=an(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)&&mO(s,x,p,U),Xa=!1,J=s.memoizedState,x.state=J,ic(s,p,x,v),ac();var ee=s.memoizedState;N!==se||J!==ee||Xa||a!==null&&a.dependencies!==null&&Rf(a.dependencies)?(typeof R=="function"&&(Py(s,c,R,p),ee=s.memoizedState),(te=Xa||pO(s,c,te,p,J,ee,U)||a!==null&&a.dependencies!==null&&Rf(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,Qf(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=Wi(s,a.child,null,v),s.child=Wi(s,null,c,v)):sn(a,s,c,v),s.memoizedState=x.state,a=s.child):a=da(a,s,v),a}function CO(a,s,c,p){return Hi(),s.flags|=256,sn(a,s,c,p),s.child}var zy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $y(a){return{baseLanes:a,cachePool:x2()}}function By(a,s,c){return a=a!==null?a.childLanes&~c:0,s&&(a|=qn),a}function MO(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=B_(a,ar),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Fa!==null?{id:Br,overflow:Ir}:null,retryLane:536870912,hydrationErrors:null},c=u2(a),c.return=s,s.child=c,rn=s,vt=null)):a=null,a===null)throw Ka(s);return jv(a)?s.lanes=32:s.lanes=536870912,null}var R=p.children;return p=p.fallback,v?(Ja(),v=s.mode,R=Jf({mode:"hidden",children:R},v),p=Vi(p,v,c,null),R.return=s,p.return=s,R.sibling=p,s.child=R,p=s.child,p.memoizedState=$y(c),p.childLanes=By(a,N,c),s.memoizedState=zy,uc(null,p)):(Qa(s),Iy(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=qy(a,s,c)):s.memoizedState!==null?(Ja(),s.child=a.child,s.flags|=128,s=null):(Ja(),R=p.fallback,v=s.mode,p=Jf({mode:"visible",children:p.children},v),R=Vi(R,v,c,null),R.flags|=2,p.return=s,R.return=s,p.sibling=R,s.child=p,Wi(s,a.child,null,c),p=s.child,p.memoizedState=$y(c),p.childLanes=By(a,N,c),s.memoizedState=zy,s=uc(null,p));else if(Qa(s),jv(R)){if(N=R.nextSibling&&R.nextSibling.dataset,N)var Z=N.dgst;N=Z,p=Error(r(419)),p.stack="",p.digest=N,Ql({value:p,source:null,stack:null}),s=qy(a,s,c)}else if(zt||Js(a,s,c,!1),N=(c&a.childLanes)!==0,zt||N){if(N=ct,N!==null&&(p=vA(N,c),p!==0&&p!==U.retryLane))throw U.retryLane=p,Ui(a,p),Nn(N,a,p),Dy;bv(R)||ld(),s=qy(a,s,c)}else bv(R)?(s.flags|=192,s.child=a.child,s=null):(a=U.treeContext,vt=sr(R.nextSibling),rn=s,He=!0,Ga=null,ar=!1,a!==null&&h2(s,a),s=Iy(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=Vi(R,v,c,null),R.flags|=2),R.return=s,p.return=s,p.sibling=R,s.child=p,uc(null,p),p=s.child,R=a.child.memoizedState,R===null?R=$y(c):(v=R.cachePool,v!==null?(U=Dt._currentValue,v=v.parent!==U?{parent:U,pool:U}:v):v=x2(),R={baseLanes:R.baseLanes|c,cachePool:v}),p.memoizedState=R,p.childLanes=By(a,N,c),s.memoizedState=zy,uc(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 Iy(a,s){return s=Jf({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function Jf(a,s){return a=zn(22,a,null,s),a.lanes=0,a}function qy(a,s,c){return Wi(s,a.child,null,c),a=Iy(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function PO(a,s,c){a.lanes|=s;var p=a.alternate;p!==null&&(p.lanes|=s),ny(a.return,s,c)}function Uy(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 RO(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),sn(a,s,p,c),p=He?Zl:0,!R&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&PO(a,c,s);else if(a.tag===19)PO(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&&qf(a)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),Uy(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&&qf(a)===null){s.child=v;break}a=v.sibling,v.sibling=c,c=v,v=a}Uy(s,!0,c,null,x,p);break;case"together":Uy(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(Js(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 Vy(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&Rf(a)))}function cB(a,s,c){switch(s.tag){case 3:Ze(s,s.stateNode.containerInfo),Ya(s,Dt,a.memoizedState.cache),Hi();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,py(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?MO(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||(Js(a,s,c,!1),p=(c&s.childLanes)!==0),v){if(p)return RO(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,OO(a,s,c,s.pendingProps);case 24:Ya(s,Dt,a.memoizedState.cache)}return da(a,s,c)}function kO(a,s,c){if(a!==null)if(a.memoizedProps!==s.pendingProps)zt=!0;else{if(!Vy(a,c)&&(s.flags&128)===0)return zt=!1,cB(a,s,c);zt=(a.flags&131072)!==0}else zt=!1,He&&(s.flags&1048576)!==0&&d2(s,Zl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(a=Yi(s.elementType),s.type=a,typeof a=="function")Ym(a)?(p=Qi(a,p),s.tag=1,s=NO(null,s,a,p,c)):(s.tag=0,s=Ly(null,s,a,p,c));else{if(a!=null){var v=a.$$typeof;if(v===C){s.tag=11,s=SO(null,s,a,p,c);break e}else if(v===M){s.tag=14,s=wO(null,s,a,p,c);break e}}throw s=X(a)||a,Error(r(306,s,""))}}return s;case 0:return Ly(a,s,s.type,s.pendingProps,c);case 1:return p=s.type,v=Qi(p,s.pendingProps),NO(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,cy(a,s),ic(s,p,null,c);var N=s.memoizedState;if(p=N.cache,Ya(s,Dt,p),p!==x.cache&&ry(s,[Dt],c,!0),ac(),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=CO(a,s,p,c);break e}else if(p!==v){v=tr(Error(r(424)),s),Ql(v),s=CO(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),rn=s,He=!0,Ga=null,ar=!0,c=O2(s,null,p,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Hi(),p===v){s=da(a,s,c);break e}sn(a,s,p,c)}s=s.child}return s;case 26:return Qf(a,s),a===null?(c=F_(s.type,null,s.pendingProps,null))?s.memoizedState=c:He||(c=s.type,a=s.pendingProps,p=md(we.current).createElement(c),p[nn]=s,p[wn]=a,on(p,c,a),Wt(p),s.stateNode=p):s.memoizedState=F_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return Ee(s),a===null&&He&&(p=s.stateNode=U_(s.type,s.pendingProps,we.current),rn=s,ar=!0,v=vt,oi(s.type)?(Sv=v,vt=sr(p.firstChild)):vt=v),sn(a,s,s.pendingProps.children,c),Qf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&He&&((v=p=vt)&&(p=BB(p,s.type,s.pendingProps,ar),p!==null?(s.stateNode=p,rn=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,vv(v,x)?p=null:N!==null&&vv(v,N)&&(s.flags|=32),s.memoizedState!==null&&(v=yy(a,s,eB,null,null,c),Oc._currentValue=v),Qf(a,s),sn(a,s,p,c),s.child;case 6:return a===null&&He&&((a=c=vt)&&(c=IB(c,s.pendingProps,ar),c!==null?(s.stateNode=c,rn=s,vt=null,a=!0):a=!1),a||Ka(s)),null;case 13:return MO(a,s,c);case 4:return Ze(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=Wi(s,null,p,c):sn(a,s,p,c),s.child;case 11:return SO(a,s,s.type,s.pendingProps,c);case 7:return sn(a,s,s.pendingProps,c),s.child;case 8:return sn(a,s,s.pendingProps.children,c),s.child;case 12:return sn(a,s,s.pendingProps.children,c),s.child;case 10:return p=s.pendingProps,Ya(s,s.type,p.value),sn(a,s,p.children,c),s.child;case 9:return v=s.type._context,p=s.pendingProps.children,Gi(s),v=an(v),p=p(v),s.flags|=1,sn(a,s,p,c),s.child;case 14:return wO(a,s,s.type,s.pendingProps,c);case 15:return AO(a,s,s.type,s.pendingProps,c);case 19:return RO(a,s,c);case 31:return lB(a,s,c);case 22:return OO(a,s,c,s.pendingProps);case 24:return Gi(s),p=an(Dt),a===null?(v=sy(),v===null&&(v=ct,x=ay(),v.pooledCache=x,x.refCount++,x!==null&&(v.pooledCacheLanes|=c),v=x),s.memoizedState={parent:p,cache:v},ly(s),Ya(s,Dt,v)):((a.lanes&c)!==0&&(cy(a,s),ic(s,null,null,c),ac()),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&&ry(s,[Dt],c,!0))),sn(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 Hy(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(o_())a.flags|=8192;else throw Xi=zf,oy}else a.flags&=-16777217}function DO(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!W_(s))if(o_())a.flags|=8192;else throw Xi=zf,oy}function ed(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?pA():536870912,a.lanes|=s,fo|=s)}function fc(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 uB(a,s,c){var p=s.pendingProps;switch(Qm(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)&&(Qs(s)?ha(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ey())),gt(s),null;case 26:var v=s.type,x=s.memoizedState;return a===null?(ha(s),x!==null?(gt(s),DO(s,x)):(gt(s),Hy(s,v,null,p,c))):x?x!==a.memoizedState?(ha(s),gt(s),DO(s,x)):(gt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==p&&ha(s),gt(s),Hy(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,Qs(s)?p2(s):(a=U_(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,Qs(s))p2(s);else{var N=md(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[nn]=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(on(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),Hy(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,Qs(s)){if(a=s.stateNode,c=s.memoizedProps,p=null,v=rn,v!==null)switch(v.tag){case 27:case 5:p=v.memoizedProps}a[nn]=s,a=!!(a.nodeValue===c||p!==null&&p.suppressHydrationWarning===!0||M_(a.nodeValue,c)),a||Ka(s,!0)}else a=md(a).createTextNode(p),a[nn]=s,s.stateNode=a}return gt(s),null;case 31:if(c=s.memoizedState,a===null||a.memoizedState!==null){if(p=Qs(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[nn]=s}else Hi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;gt(s),a=!1}else c=ey(),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=Qs(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[nn]=s}else Hi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;gt(s),v=!1}else v=ey(),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),ed(s,s.updateQueue),gt(s),null);case 4:return ue(),a===null&&dv(s.stateNode.containerInfo),gt(s),null;case 10:return ca(s.type),gt(s),null;case 19:if(F(Pt),p=s.memoizedState,p===null)return gt(s),null;if(v=(s.flags&128)!==0,x=p.rendering,x===null)if(v)fc(p,!1);else{if(Nt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(x=qf(a),x!==null){for(s.flags|=128,fc(p,!1),a=x.updateQueue,s.updateQueue=a,ed(s,a),s.subtreeFlags=0,a=c,c=s.child;c!==null;)c2(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&&hn()>id&&(s.flags|=128,v=!0,fc(p,!1),s.lanes=4194304)}else{if(!v)if(a=qf(x),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,ed(s,a),fc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!He)return gt(s),null}else 2*hn()-p.renderingStartTime>id&&c!==536870912&&(s.flags|=128,v=!0,fc(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=hn(),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),hy(),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&&ed(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&&F(Ki),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 fB(a,s){switch(Qm(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));Hi()}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));Hi()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return F(Pt),null;case 4:return ue(),null;case 10:return ca(s.type),null;case 22:case 23:return Bn(s),hy(),a!==null&&F(Ki),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 LO(a,s){switch(Qm(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:F(Pt);break;case 10:ca(s.type);break;case 22:case 23:Bn(s),hy(),a!==null&&F(Ki);break;case 24:ca(Dt)}}function dc(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 zO(a){var s=a.updateQueue;if(s!==null){var c=a.stateNode;try{T2(s,c)}catch(p){nt(a,a.return,p)}}}function $O(a,s,c){c.props=Qi(a.type,a.memoizedProps),c.state=a.memoizedState;try{c.componentWillUnmount()}catch(p){nt(a,s,p)}}function hc(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 BO(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 Fy(a,s,c){try{var p=a.stateNode;RB(p,a.type,c,s),p[wn]=s}catch(v){nt(a,a.return,v)}}function IO(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||IO(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 Ky(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(Ky(a,s,c),a=a.sibling;a!==null;)Ky(a,s,c),a=a.sibling}function td(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(td(a,s,c),a=a.sibling;a!==null;)td(a,s,c),a=a.sibling}function qO(a){var s=a.stateNode,c=a.memoizedProps;try{for(var p=a.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);on(s,p,c),s[nn]=a,s[wn]=c}catch(x){nt(a,a.return,x)}}var pa=!1,$t=!1,Yy=!1,UO=typeof WeakSet=="function"?WeakSet:Set,Zt=null;function dB(a,s){if(a=a.containerInfo,mv=Sd,a=e2(a),qm(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(yv={focusedElem:a,selectionRange:c},Sd=!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=Qi(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)xv(a);else if(c===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":xv(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 VO(a,s,c){var p=c.flags;switch(c.tag){case 0:case 11:case 15:ya(a,c),p&4&&dc(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=Qi(c.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(v,s,a.__reactInternalSnapshotBeforeUpdate)}catch(N){nt(c,c.return,N)}}p&64&&zO(c),p&512&&hc(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{T2(a,s)}catch(N){nt(c,c.return,N)}}break;case 27:s===null&&p&4&&qO(c);case 26:case 5:ya(a,c),s===null&&p&4&&BO(c),p&512&&hc(c,c.return);break;case 12:ya(a,c);break;case 31:ya(a,c),p&4&&GO(a,c);break;case 13:ya(a,c),p&4&&KO(a,c),p&64&&(a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(c=jB.bind(null,c),qB(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 HO(a){var s=a.alternate;s!==null&&(a.alternate=null,HO(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Am(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;)FO(a,s,c),c=c.sibling}function FO(a,s,c){if(kn&&typeof kn.onCommitFiberUnmount=="function")try{kn.onCommitFiberUnmount(zl,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),Sc(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,z_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,c.stateNode),bo(a)):z_(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"&&$O(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 GO(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{bo(a)}catch(c){nt(s,s.return,c)}}}function KO(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{bo(a)}catch(c){nt(s,s.return,c)}}function hB(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new UO),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new UO),s;default:throw Error(r(435,a.tag))}}function nd(a,s){var c=hB(a);s.forEach(function(p){if(!c.has(p)){c.add(p);var v=SB.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));FO(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;)YO(s,a),s=s.sibling}var jr=null;function YO(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),dc(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[Il]||x[nn]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=v.createElement(p),v.head.insertBefore(x,v.querySelector("head > title"))),on(x,p,c),x[nn]=a,Wt(x),p=x;break e;case"link":var N=Y_("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),on(x,p,c),v.head.appendChild(x);break;case"meta":if(N=Y_("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),on(x,p,c),v.head.appendChild(x);break;default:throw Error(r(468,p))}x[nn]=a,Wt(x),p=x}a.stateNode=p}else X_(v,a.type,a.stateNode);else a.stateNode=K_(v,p,a.memoizedProps);else x!==p?(x===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):x.count--,p===null?X_(v,a.type,a.stateNode):K_(v,p,a.memoizedProps)):p===null&&a.stateNode!==null&&Fy(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&&Fy(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{Us(v,"")}catch(ge){nt(a,a.return,ge)}}p&4&&a.stateNode!=null&&(v=a.memoizedProps,Fy(a,v,c!==null?c.memoizedProps:v)),p&1024&&(Yy=!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(gd=null,v=jr,jr=yd(s.containerInfo),_n(s,a),jr=v,Tn(a),p&4&&c!==null&&c.memoizedState.isDehydrated)try{bo(s.containerInfo)}catch(ge){nt(a,a.return,ge)}Yy&&(Yy=!1,XO(a));break;case 4:p=jr,jr=yd(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,nd(a,p)));break;case 13:_n(s,a),Tn(a),a.child.flags&8192&&a.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(ad=hn()),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,nd(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||Ji(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?$_(ee,!0):$_(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,nd(a,c))));break;case 19:_n(s,a),Tn(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,nd(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(IO(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);td(a,x,v);break;case 5:var N=c.stateNode;c.flags&32&&(Us(N,""),c.flags&=-33);var R=Gy(a);td(a,R,N);break;case 3:case 4:var U=c.stateNode.containerInfo,Z=Gy(a);Ky(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 XO(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;XO(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;)VO(a,s.alternate,s),s=s.sibling}function Ji(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),Ji(s);break;case 1:qr(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&$O(s,s.return,c),Ji(s);break;case 27:Sc(s.stateNode);case 26:case 5:qr(s,s.return),Ji(s);break;case 22:s.memoizedState===null&&Ji(s);break;case 30:Ji(s);break;default:Ji(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),dc(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++)_2(U[v],R)}catch(Z){nt(p,p.return,Z)}}c&&N&64&&zO(x),hc(x,x.return);break;case 27:qO(x);case 26:case 5:va(v,x,c),c&&p===null&&N&4&&BO(x),hc(x,x.return);break;case 12:va(v,x,c);break;case 31:va(v,x,c),c&&N&4&&GO(v,x);break;case 13:va(v,x,c),c&&N&4&&KO(v,x);break;case 22:x.memoizedState===null&&va(v,x,c),hc(x,x.return);break;case 30:break;default:va(v,x,c)}s=s.sibling}}function Xy(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&&Jl(c))}function Wy(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Jl(a))}function Sr(a,s,c,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)WO(a,s,c,p),s=s.sibling}function WO(a,s,c,p){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Sr(a,s,c,p),v&2048&&dc(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&&Jl(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):pc(a,s):x._visibility&2?Sr(a,s,c,p):(x._visibility|=2,lo(a,s,c,p,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Xy(N,s);break;case 24:Sr(a,s,c,p),v&2048&&Wy(s.alternate,s);break;default:Sr(a,s,c,p)}}function lo(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:lo(x,N,R,U,v),dc(8,N);break;case 23:break;case 22:var te=N.stateNode;N.memoizedState!==null?te._visibility&2?lo(x,N,R,U,v):pc(x,N):(te._visibility|=2,lo(x,N,R,U,v)),v&&Z&2048&&Xy(N.alternate,N);break;case 24:lo(x,N,R,U,v),v&&Z&2048&&Wy(N.alternate,N);break;default:lo(x,N,R,U,v)}s=s.sibling}}function pc(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:pc(c,p),v&2048&&Xy(p.alternate,p);break;case 24:pc(c,p),v&2048&&Wy(p.alternate,p);break;default:pc(c,p)}s=s.sibling}}var mc=8192;function co(a,s,c){if(a.subtreeFlags&mc)for(a=a.child;a!==null;)ZO(a,s,c),a=a.sibling}function ZO(a,s,c){switch(a.tag){case 26:co(a,s,c),a.flags&mc&&a.memoizedState!==null&&JB(c,jr,a.memoizedState,a.memoizedProps);break;case 5:co(a,s,c);break;case 3:case 4:var p=jr;jr=yd(a.stateNode.containerInfo),co(a,s,c),jr=p;break;case 22:a.memoizedState===null&&(p=a.alternate,p!==null&&p.memoizedState!==null?(p=mc,mc=16777216,co(a,s,c),mc=p):co(a,s,c));break;default:co(a,s,c)}}function QO(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 yc(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,e_(p,a)}QO(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)JO(a),a=a.sibling}function JO(a){switch(a.tag){case 0:case 11:case 15:yc(a),a.flags&2048&&ei(9,a,a.return);break;case 3:yc(a);break;case 12:yc(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,rd(a)):yc(a);break;default:yc(a)}}function rd(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,e_(p,a)}QO(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:ei(8,s,s.return),rd(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,rd(s));break;default:rd(s)}a=a.sibling}}function e_(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:Jl(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(HO(p),p===c){Zt=null;break e}if(v!==null){v.return=x,Zt=v;break e}Zt=x}}}var pB={getCacheForType:function(a){var s=an(Dt),c=s.data.get(a);return c===void 0&&(c=a(),s.data.set(a,c)),c},cacheSignal:function(){return an(Dt).controller.signal}},mB=typeof WeakMap=="function"?WeakMap:Map,Xe=0,ct=null,$e=null,qe=0,tt=0,In=null,ti=!1,uo=!1,Zy=!1,ga=0,Nt=0,ni=0,es=0,Qy=0,qn=0,fo=0,vc=null,En=null,Jy=!1,ad=0,t_=0,id=1/0,sd=null,ri=null,Ut=0,ai=null,ho=null,xa=0,ev=0,tv=null,n_=null,gc=0,nv=null;function Un(){return(Xe&2)!==0&&qe!==0?qe&-qe:L.T!==null?lv():gA()}function r_(){if(qn===0)if((qe&536870912)===0||He){var a=pf;pf<<=1,(pf&3932160)===0&&(pf=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)&&(po(a,0),ii(a,qe,qn,!1)),Bl(a,c),((Xe&2)===0||a!==ct)&&(a===ct&&((Xe&2)===0&&(es|=c),Nt===4&&ii(a,qe,qn,!1)),Ur(a))}function a_(a,s,c){if((Xe&6)!==0)throw Error(r(327));var p=!c&&(s&127)===0&&(s&a.expiredLanes)===0||$l(a,s),v=p?gB(a,s):av(a,s,!0),x=p;do{if(v===0){uo&&!p&&ii(a,s,0,!1);break}else{if(c=a.current.alternate,x&&!yB(c)){v=av(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=vc;var U=R.current.memoizedState.isDehydrated;if(U&&(po(R,N).flags|=256),N=av(R,N,!1),N!==2){if(Zy&&!U){R.errorRecoveryDisabledLanes|=x,es|=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){po(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=ad+300-hn(),10<v)){if(ii(p,s,qn,!ti),yf(p,0,!0)!==0)break e;xa=s,p.timeoutHandle=D_(i_.bind(null,p,c,En,sd,Jy,s,qn,es,fo,ti,x,"Throttled",-0,0),v);break e}i_(p,c,En,sd,Jy,s,qn,es,fo,ti,x,null,-0,0)}}break}while(!0);Ur(a)}function i_(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},ZO(s,x,se);var ge=(x&62914560)===x?ad-hn():(x&4194048)===x?t_-hn():0;if(ge=e8(se,ge),ge!==null){xa=x,a.cancelPendingCommit=ge(h_.bind(null,a,s,x,c,p,v,N,R,U,te,se,null,J,ee)),ii(a,x,N,!Z);return}}h_(a,s,x,c,p,v,N,R,U)}function yB(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&=~Qy,s&=~es,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&&mA(a,c,s)}function od(){return(Xe&6)===0?(xc(0),!1):!0}function rv(){if($e!==null){if(tt===0)var a=$e.return;else a=$e,la=Fi=null,xy(a),ro=null,tc=0,a=$e;for(;a!==null;)LO(a.alternate,a),a=a.return;$e=null}}function po(a,s){var c=a.timeoutHandle;c!==-1&&(a.timeoutHandle=-1,LB(c)),c=a.cancelPendingCommit,c!==null&&(a.cancelPendingCommit=null,c()),xa=0,rv(),ct=a,$e=c=sa(a.current,null),qe=s,tt=0,In=null,ti=!1,uo=$l(a,s),Zy=!1,fo=qn=Qy=es=ni=Nt=0,En=vc=null,Jy=!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,Ef(),c}function s_(a,s){Re=null,L.H=cc,s===no||s===Lf?(s=S2(),tt=3):s===oy?(s=S2(),tt=4):tt=s===Dy?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,In=s,$e===null&&(Nt=1,Wf(a,tr(s,a.current)))}function o_(){var a=$n.current;return a===null?!0:(qe&4194048)===qe?ir===null:(qe&62914560)===qe||(qe&536870912)!==0?a===ir:!1}function l_(){var a=L.H;return L.H=cc,a===null?cc:a}function c_(){var a=L.A;return L.A=pB,a}function ld(){Nt=4,ti||(qe&4194048)!==qe&&$n.current!==null||(uo=!0),(ni&134217727)===0&&(es&134217727)===0||ct===null||ii(ct,qe,qn,!1)}function av(a,s,c){var p=Xe;Xe|=2;var v=l_(),x=c_();(ct!==a||qe!==s)&&(sd=null,po(a,s)),s=!1;var N=Nt;e:do try{if(tt!==0&&$e!==null){var R=$e,U=In;switch(tt){case 8:rv(),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,mo(a,R,U,Z),c&&uo){N=0;break e}break;default:Z=tt,tt=0,In=null,mo(a,R,U,Z)}}vB(),N=Nt;break}catch(te){s_(a,te)}while(!0);return s&&a.shellSuspendCounter++,la=Fi=null,Xe=p,L.H=v,L.A=x,$e===null&&(ct=null,qe=0,Ef()),N}function vB(){for(;$e!==null;)u_($e)}function gB(a,s){var c=Xe;Xe|=2;var p=l_(),v=c_();ct!==a||qe!==s?(sd=null,id=hn()+500,po(a,s)):uo=$l(a,s);e:do try{if(tt!==0&&$e!==null){s=$e;var x=In;t:switch(tt){case 1:tt=0,In=null,mo(a,s,x,1);break;case 2:case 9:if(b2(x)){tt=0,In=null,f_(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:b2(x)?(tt=0,In=null,f_(s)):(tt=0,In=null,mo(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?W_(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,cd(Z)):$e=null}break t}}tt=0,In=null,mo(a,s,x,5);break;case 6:tt=0,In=null,mo(a,s,x,6);break;case 8:rv(),Nt=6;break e;default:throw Error(r(462))}}xB();break}catch(te){s_(a,te)}while(!0);return la=Fi=null,L.H=p,L.A=v,Xe=c,$e!==null?0:(ct=null,qe=0,Ef(),Nt)}function xB(){for(;$e!==null&&!na();)u_($e)}function u_(a){var s=kO(a.alternate,a,ga);a.memoizedProps=a.pendingProps,s===null?cd(a):$e=s}function f_(a){var s=a,c=s.alternate;switch(s.tag){case 15:case 0:s=EO(c,s,s.pendingProps,s.type,void 0,qe);break;case 11:s=EO(c,s,s.pendingProps,s.type.render,s.ref,qe);break;case 5:xy(s);default:LO(c,s),s=$e=c2(s,ga),s=kO(c,s,ga)}a.memoizedProps=a.pendingProps,s===null?cd(a):$e=s}function mo(a,s,c,p){la=Fi=null,xy(s),ro=null,tc=0;var v=s.return;try{if(oB(a,v,s,c,qe)){Nt=1,Wf(a,tr(c,a.current)),$e=null;return}}catch(x){if(v!==null)throw $e=v,x;Nt=1,Wf(a,tr(c,a.current)),$e=null;return}s.flags&32768?(He||p===1?a=!0:uo||(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))),d_(s,a)):cd(s)}function cd(a){var s=a;do{if((s.flags&32768)!==0){d_(s,ti);return}a=s.return;var c=uB(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 d_(a,s){do{var c=fB(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 h_(a,s,c,p,v,x,N,R,U){a.cancelPendingCommit=null;do ud();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,Q$(a,c,x,N,R,U),a===ct&&($e=ct=null,qe=0),ho=s,ai=a,xa=c,ev=x,tv=v,n_=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,wB(df,function(){return g_(),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{dB(a,s,c)}finally{Xe=N,H.p=v,L.T=p}}Ut=1,p_(),m_(),y_()}}function p_(){if(Ut===1){Ut=0;var a=ai,s=ho,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{YO(s,a);var x=yv,N=e2(a.containerInfo),R=x.focusedElem,U=x.selectionRange;if(N!==R&&R&&R.ownerDocument&&JA(R.ownerDocument.documentElement,R)){if(U!==null&&qm(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=QA(R,Ae),V=QA(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}}Sd=!!mv,yv=mv=null}finally{Xe=v,H.p=p,L.T=c}}a.current=s,Ut=2}}function m_(){if(Ut===2){Ut=0;var a=ai,s=ho,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{VO(a,s.alternate,s)}finally{Xe=v,H.p=p,L.T=c}}Ut=3}}function y_(){if(Ut===4||Ut===3){Ut=0,Ll();var a=ai,s=ho,c=xa,p=n_;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Ut=5:(Ut=0,ho=ai=null,v_(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(ri=null),Sm(c),s=s.stateNode,kn&&typeof kn.onCommitFiberRoot=="function")try{kn.onCommitFiberRoot(zl,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&&ud(),Ur(a),v=a.pendingLanes,(c&261930)!==0&&(v&42)!==0?a===nv?gc++:(gc=0,nv=a):gc=0,xc(0)}}function v_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Jl(s)))}function ud(){return p_(),m_(),y_(),g_()}function g_(){if(Ut!==5)return!1;var a=ai,s=ev;ev=0;var c=Sm(xa),p=L.T,v=H.p;try{H.p=32>c?32:c,L.T=null,c=tv,tv=null;var x=ai,N=xa;if(Ut=0,ho=ai=null,xa=0,(Xe&6)!==0)throw Error(r(331));var R=Xe;if(Xe|=4,JO(x.current),WO(x,x.current,N,c),Xe=R,xc(0,!1),kn&&typeof kn.onPostCommitFiberRoot=="function")try{kn.onPostCommitFiberRoot(zl,x)}catch{}return!0}finally{H.p=v,L.T=p,v_(a,s)}}function x_(a,s,c){s=tr(c,s),s=ky(a.stateNode,s,2),a=Za(a,s,2),a!==null&&(Bl(a,2),Ur(a))}function nt(a,s,c){if(a.tag===3)x_(a,a,c);else for(;s!==null;){if(s.tag===3){x_(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=bO(2),p=Za(s,c,2),p!==null&&(jO(c,p,s,a),Bl(p,2),Ur(p));break}}s=s.return}}function iv(a,s,c){var p=a.pingCache;if(p===null){p=a.pingCache=new mB;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)||(Zy=!0,v.add(c),a=bB.bind(null,a,s,c),s.then(a,a))}function bB(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>hn()-ad?(Xe&2)===0&&po(a,0):Qy|=c,fo===qe&&(fo=0)),Ur(a)}function b_(a,s){s===0&&(s=pA()),a=Ui(a,s),a!==null&&(Bl(a,s),Ur(a))}function jB(a){var s=a.memoizedState,c=0;s!==null&&(c=s.retryLane),b_(a,c)}function SB(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),b_(a,c)}function wB(a,s){return qa(a,s)}var fd=null,yo=null,sv=!1,dd=!1,ov=!1,si=0;function Ur(a){a!==yo&&a.next===null&&(yo===null?fd=yo=a:yo=yo.next=a),dd=!0,sv||(sv=!0,OB())}function xc(a,s){if(!ov&&dd){ov=!0;do for(var c=!1,p=fd;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,A_(p,x))}else x=qe,x=yf(p,p===ct?x:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(x&3)===0||$l(p,x)||(c=!0,A_(p,x));p=p.next}while(c);ov=!1}}function AB(){j_()}function j_(){dd=sv=!1;var a=0;si!==0&&DB()&&(a=si);for(var s=hn(),c=null,p=fd;p!==null;){var v=p.next,x=S_(p,s);x===0?(p.next=null,c===null?fd=v:c.next=v,v===null&&(yo=c)):(c=p,(a!==0||(x&3)!==0)&&(dd=!0)),p=v}Ut!==0&&Ut!==5||xc(a),si!==0&&(si=0)}function S_(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]=Z$(R,s)):U<=s&&(a.expiredLanes|=R),x&=~R}if(s=ct,c=qe,c=yf(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||$l(a,c)){if(s=c&-c,s===a.callbackPriority)return s;switch(p!==null&&xr(p),Sm(c)){case 2:case 8:c=dA;break;case 32:c=df;break;case 268435456:c=hA;break;default:c=df}return p=w_.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 w_(a,s){if(Ut!==0&&Ut!==5)return a.callbackNode=null,a.callbackPriority=0,null;var c=a.callbackNode;if(ud()&&a.callbackNode!==c)return null;var p=qe;return p=yf(a,a===ct?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p===0?null:(a_(a,p,s),S_(a,hn()),a.callbackNode!=null&&a.callbackNode===c?w_.bind(null,a):null)}function A_(a,s){if(ud())return null;a_(a,s,!0)}function OB(){zB(function(){(Xe&6)!==0?qa(fA,AB):j_()})}function lv(){if(si===0){var a=eo;a===0&&(a=hf,hf<<=1,(hf&261888)===0&&(hf=256)),si=a}return si}function O_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:bf(""+a)}function __(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 _B(a,s,c,p,v){if(s==="submit"&&c&&c.stateNode===v){var x=O_((v[wn]||null).action),N=p.submitter;N&&(s=(s=N[wn]||null)?O_(s.formAction):N.getAttribute("formAction"),s!==null&&(x=s,N=null));var R=new Af("action","action",null,p,v);a.push({event:R,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(si!==0){var U=N?__(v,N):new FormData(v);Ey(c,{pending:!0,data:U,method:v.method,action:x},null,U)}}else typeof x=="function"&&(R.preventDefault(),U=N?__(v,N):new FormData(v),Ey(c,{pending:!0,data:U,method:v.method,action:x},x,U))},currentTarget:v}]})}}for(var cv=0;cv<Fm.length;cv++){var uv=Fm[cv],TB=uv.toLowerCase(),EB=uv[0].toUpperCase()+uv.slice(1);br(TB,"on"+EB)}br(r2,"onAnimationEnd"),br(a2,"onAnimationIteration"),br(i2,"onAnimationStart"),br("dblclick","onDoubleClick"),br("focusin","onFocus"),br("focusout","onBlur"),br(H6,"onTransitionRun"),br(F6,"onTransitionStart"),br(G6,"onTransitionCancel"),br(s2,"onTransitionEnd"),Is("onMouseEnter",["mouseout","mouseover"]),Is("onMouseLeave",["mouseout","mouseover"]),Is("onPointerEnter",["pointerout","pointerover"]),Is("onPointerLeave",["pointerout","pointerover"]),$i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$i("onBeforeInput",["compositionend","keypress","textInput","paste"]),$i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bc="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(" "),NB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bc));function T_(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){Tf(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){Tf(te)}v.currentTarget=null,x=U}}}}function Be(a,s){var c=s[wm];c===void 0&&(c=s[wm]=new Set);var p=a+"__bubble";c.has(p)||(E_(s,a,2,!1),c.add(p))}function fv(a,s,c){var p=0;s&&(p|=4),E_(c,a,p,s)}var hd="_reactListening"+Math.random().toString(36).slice(2);function dv(a){if(!a[hd]){a[hd]=!0,jA.forEach(function(c){c!=="selectionchange"&&(NB.has(c)||fv(c,!1,a),fv(c,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[hd]||(s[hd]=!0,fv("selectionchange",!1,s))}}function E_(a,s,c,p){switch(rT(s)){case 2:var v=r8;break;case 8:v=a8;break;default:v=Tv}c=v.bind(null,s,c,a),v=void 0,!Pm||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 hv(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=zs(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}RA(function(){var Z=x,te=Cm(c),se=[];e:{var J=o2.get(a);if(J!==void 0){var ee=Af,ge=a;switch(a){case"keypress":if(Sf(c)===0)break e;case"keydown":case"keyup":ee=S6;break;case"focusin":ge="focus",ee=Lm;break;case"focusout":ge="blur",ee=Lm;break;case"beforeblur":case"afterblur":ee=Lm;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=LA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=u6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=O6;break;case r2:case a2:case i2:ee=h6;break;case s2:ee=T6;break;case"scroll":case"scrollend":ee=l6;break;case"wheel":ee=N6;break;case"copy":case"cut":case"paste":ee=m6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=$A;break;case"toggle":case"beforetoggle":ee=M6}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=Ul(V,K),ie!=null&&Ae.push(jc(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!==Nm&&(ge=c.relatedTarget||c.fromElement)&&(zs(ge)||ge[Ls]))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?zs(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=LA,ie="onMouseLeave",K="onMouseEnter",V="mouse",(a==="pointerout"||a==="pointerover")&&(Ae=$A,ie="onPointerLeave",K="onPointerEnter",V="pointer"),ot=ee==null?J:ql(ee),W=ge==null?J:ql(ge),J=new Ae(ie,V+"leave",ee,c,te),J.target=ot,J.relatedTarget=W,ie=null,zs(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=CB,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&&N_(se,J,ee,Ae,!1),ge!==null&&ot!==null&&N_(se,ot,ge,Ae,!0)}}e:{if(J=Z?ql(Z):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var Fe=GA;else if(HA(J))if(KA)Fe=q6;else{Fe=B6;var be=$6}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Z&&Em(Z.elementType)&&(Fe=GA):Fe=I6;if(Fe&&(Fe=Fe(a,Z))){FA(se,Fe,c,te);break e}be&&be(a,J,Z),a==="focusout"&&Z&&J.type==="number"&&Z.memoizedProps.value!=null&&Tm(J,"number",J.value)}switch(be=Z?ql(Z):window,a){case"focusin":(HA(be)||be.contentEditable==="true")&&(Gs=be,Um=Z,Wl=null);break;case"focusout":Wl=Um=Gs=null;break;case"mousedown":Vm=!0;break;case"contextmenu":case"mouseup":case"dragend":Vm=!1,t2(se,c,te);break;case"selectionchange":if(V6)break;case"keydown":case"keyup":t2(se,c,te)}var De;if($m)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 Fs?UA(a,c)&&(Ue="onCompositionEnd"):a==="keydown"&&c.keyCode===229&&(Ue="onCompositionStart");Ue&&(BA&&c.locale!=="ko"&&(Fs||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Fs&&(De=kA()):(Ha=te,Rm="value"in Ha?Ha.value:Ha.textContent,Fs=!0)),be=pd(Z,Ue),0<be.length&&(Ue=new zA(Ue,a,null,c,te),se.push({event:Ue,listeners:be}),De?Ue.data=De:(De=VA(c),De!==null&&(Ue.data=De)))),(De=R6?k6(a,c):D6(a,c))&&(Ue=pd(Z,"onBeforeInput"),0<Ue.length&&(be=new zA("onBeforeInput","beforeinput",null,c,te),se.push({event:be,listeners:Ue}),be.data=De)),_B(se,a,Z,c,te)}T_(se,s)})}function jc(a,s,c){return{instance:a,listener:s,currentTarget:c}}function pd(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=Ul(a,c),v!=null&&p.unshift(jc(a,v,x)),v=Ul(a,s),v!=null&&p.push(jc(a,v,x))),a.tag===3)return p;a=a.return}return[]}function CB(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function N_(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=Ul(c,x),Z!=null&&N.unshift(jc(c,Z,U))):v||(Z=Ul(c,x),Z!=null&&N.push(jc(c,Z,U)))),c=c.return}N.length!==0&&a.push({event:s,listeners:N})}var MB=/\r\n?/g,PB=/\u0000|\uFFFD/g;function C_(a){return(typeof a=="string"?a:""+a).replace(MB,`
`).replace(PB,"")}function M_(a,s){return s=C_(s),C_(a)===s}function st(a,s,c,p,v,x){switch(c){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Us(a,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Us(a,""+p);break;case"className":gf(a,"class",p);break;case"tabIndex":gf(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":gf(a,c,p);break;case"style":MA(a,p,x);break;case"data":if(s!=="object"){gf(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=bf(""+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=bf(""+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=bf(""+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),vf(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":vf(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=s6.get(c)||c,vf(a,c,p))}}function pv(a,s,c,p,v,x){switch(c){case"style":MA(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"?Us(a,p):(typeof p=="number"||typeof p=="bigint")&&Us(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(!SA.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,""):vf(a,c,p)}}}function on(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)}}TA(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?qs(a,!!p,s,!1):c!=null&&qs(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)}NA(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<bc.length;p++)Be(bc[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(Em(s)){for(te in c)c.hasOwnProperty(te)&&(p=c[te],p!==void 0&&pv(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 RB(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)}}_m(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?qs(a,!!c,J,!1):!!p!=!!c&&(s!=null?qs(a,!!c,s,!0):qs(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)}EA(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(Em(s)){for(var ot in c)J=c[ot],c.hasOwnProperty(ot)&&J!==void 0&&!p.hasOwnProperty(ot)&&pv(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||pv(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 P_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kB(){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&&P_(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&&P_(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 mv=null,yv=null;function md(a){return a.nodeType===9?a:a.ownerDocument}function R_(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 k_(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 vv(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 gv=null;function DB(){var a=window.event;return a&&a.type==="popstate"?a===gv?!1:(gv=a,!0):(gv=null,!1)}var D_=typeof setTimeout=="function"?setTimeout:void 0,LB=typeof clearTimeout=="function"?clearTimeout:void 0,L_=typeof Promise=="function"?Promise:void 0,zB=typeof queueMicrotask=="function"?queueMicrotask:typeof L_<"u"?function(a){return L_.resolve(null).then(a).catch($B)}:D_;function $B(a){setTimeout(function(){throw a})}function oi(a){return a==="head"}function z_(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),bo(s);return}p--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")p++;else if(c==="html")Sc(a.ownerDocument.documentElement);else if(c==="head"){c=a.ownerDocument.head,Sc(c);for(var x=c.firstChild;x;){var N=x.nextSibling,R=x.nodeName;x[Il]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&x.rel.toLowerCase()==="stylesheet"||c.removeChild(x),x=N}}else c==="body"&&Sc(a.ownerDocument.body);c=v}while(c);bo(s)}function $_(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 xv(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":xv(c),Am(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}a.removeChild(c)}}function BB(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[Il])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 IB(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 B_(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 bv(a){return a.data==="$?"||a.data==="$~"}function jv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function qB(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 Sv=null;function I_(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 q_(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 U_(a,s,c){switch(s=md(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 Sc(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Am(a)}var or=new Map,V_=new Set;function yd(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ba=H.d;H.d={f:UB,r:VB,D:HB,C:FB,L:GB,m:KB,X:XB,S:YB,M:WB};function UB(){var a=ba.f(),s=od();return a||s}function VB(a){var s=$s(a);s!==null&&s.tag===5&&s.type==="form"?sO(s):ba.r(a)}var vo=typeof document>"u"?null:document;function H_(a,s,c){var p=vo;if(p&&typeof s=="string"&&s){var v=Jn(s);v='link[rel="'+a+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),V_.has(v)||(V_.add(v),a={rel:a,crossOrigin:c,href:s},p.querySelector(v)===null&&(s=p.createElement("link"),on(s,"link",a),Wt(s),p.head.appendChild(s)))}}function HB(a){ba.D(a),H_("dns-prefetch",a,null)}function FB(a,s){ba.C(a,s),H_("preconnect",a,s)}function GB(a,s,c){ba.L(a,s,c);var p=vo;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=go(a);break;case"script":x=xo(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(wc(x))||s==="script"&&p.querySelector(Ac(x))||(s=p.createElement("link"),on(s,"link",a),Wt(s),p.head.appendChild(s)))}}function KB(a,s){ba.m(a,s);var c=vo;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=xo(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(Ac(x)))return}p=c.createElement("link"),on(p,"link",a),Wt(p),c.head.appendChild(p)}}}function YB(a,s,c){ba.S(a,s,c);var p=vo;if(p&&a){var v=Bs(p).hoistableStyles,x=go(a);s=s||"default";var N=v.get(x);if(!N){var R={loading:0,preload:null};if(N=p.querySelector(wc(x)))R.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},c),(c=or.get(x))&&wv(a,c);var U=N=p.createElement("link");Wt(U),on(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,vd(N,s,p)}N={type:"stylesheet",instance:N,count:1,state:R},v.set(x,N)}}}function XB(a,s){ba.X(a,s);var c=vo;if(c&&a){var p=Bs(c).hoistableScripts,v=xo(a),x=p.get(v);x||(x=c.querySelector(Ac(v)),x||(a=y({src:a,async:!0},s),(s=or.get(v))&&Av(a,s),x=c.createElement("script"),Wt(x),on(x,"link",a),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(v,x))}}function WB(a,s){ba.M(a,s);var c=vo;if(c&&a){var p=Bs(c).hoistableScripts,v=xo(a),x=p.get(v);x||(x=c.querySelector(Ac(v)),x||(a=y({src:a,async:!0,type:"module"},s),(s=or.get(v))&&Av(a,s),x=c.createElement("script"),Wt(x),on(x,"link",a),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(v,x))}}function F_(a,s,c,p){var v=(v=we.current)?yd(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=go(c.href),c=Bs(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=go(c.href);var x=Bs(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(wc(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||ZB(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=xo(c),c=Bs(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 go(a){return'href="'+Jn(a)+'"'}function wc(a){return'link[rel="stylesheet"]['+a+"]"}function G_(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function ZB(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}),on(s,"link",c),Wt(s),a.head.appendChild(s))}function xo(a){return'[src="'+Jn(a)+'"]'}function Ac(a){return"script[async]"+a}function K_(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),on(p,"style",v),vd(p,c.precedence,a),s.instance=p;case"stylesheet":v=go(c.href);var x=a.querySelector(wc(v));if(x)return s.state.loading|=4,s.instance=x,Wt(x),x;p=G_(c),(v=or.get(v))&&wv(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}),on(x,"link",p),s.state.loading|=4,vd(x,c.precedence,a),s.instance=x;case"script":return x=xo(c.src),(v=a.querySelector(Ac(x)))?(s.instance=v,Wt(v),v):(p=c,(v=or.get(x))&&(p=y({},c),Av(p,v)),a=a.ownerDocument||a,v=a.createElement("script"),Wt(v),on(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,vd(p,c.precedence,a));return s.instance}function vd(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 wv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Av(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var gd=null;function Y_(a,s,c){if(gd===null){var p=new Map,v=gd=new Map;v.set(c,p)}else v=gd,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[Il]||x[nn]||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 X_(a,s,c){a=a.ownerDocument||a,a.head.insertBefore(c,s==="title"?a.querySelector("head > title"):null)}function QB(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 W_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function JB(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=go(p.href),x=s.querySelector(wc(v));if(x){s=x._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=xd.bind(a),s.then(a,a)),c.state.loading|=4,c.instance=x,Wt(x);return}x=s.ownerDocument||s,p=G_(p),(v=or.get(v))&&wv(p,v),x=x.createElement("link"),Wt(x);var N=x;N._p=new Promise(function(R,U){N.onload=R,N.onerror=U}),on(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=xd.bind(a),s.addEventListener("load",c),s.addEventListener("error",c))}}var Ov=0;function e8(a,s){return a.stylesheets&&a.count===0&&jd(a,a.stylesheets),0<a.count||0<a.imgCount?function(c){var p=setTimeout(function(){if(a.stylesheets&&jd(a,a.stylesheets),a.unsuspend){var x=a.unsuspend;a.unsuspend=null,x()}},6e4+s);0<a.imgBytes&&Ov===0&&(Ov=62500*kB());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&jd(a,a.stylesheets),a.unsuspend)){var x=a.unsuspend;a.unsuspend=null,x()}},(a.imgBytes>Ov?50:800)+s);return a.unsuspend=c,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(v)}}:null}function xd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jd(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var bd=null;function jd(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,bd=new Map,s.forEach(t8,a),bd=null,xd.call(a))}function t8(a,s){if(!(s.state.loading&4)){var c=bd.get(a);if(c)var p=c.get(null);else{c=new Map,bd.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=xd.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 Oc={$$typeof:_,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function n8(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=bm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bm(0),this.hiddenUpdates=bm(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 Z_(a,s,c,p,v,x,N,R,U,Z,te,se){return a=new n8(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=ay(),s.refCount++,a.pooledCache=s,s.refCount++,x.memoizedState={element:p,isDehydrated:c,cache:s},ly(x),a}function Q_(a){return a?(a=Xs,a):Xs}function J_(a,s,c,p,v,x){v=Q_(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),rc(c,a,s))}function eT(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var c=a.retryLane;a.retryLane=c!==0&&c<s?c:s}}function _v(a,s){eT(a,s),(a=a.alternate)&&eT(a,s)}function tT(a){if(a.tag===13||a.tag===31){var s=Ui(a,67108864);s!==null&&Nn(s,a,67108864),_v(a,67108864)}}function nT(a){if(a.tag===13||a.tag===31){var s=Un();s=jm(s);var c=Ui(a,s);c!==null&&Nn(c,a,s),_v(a,s)}}var Sd=!0;function r8(a,s,c,p){var v=L.T;L.T=null;var x=H.p;try{H.p=2,Tv(a,s,c,p)}finally{H.p=x,L.T=v}}function a8(a,s,c,p){var v=L.T;L.T=null;var x=H.p;try{H.p=8,Tv(a,s,c,p)}finally{H.p=x,L.T=v}}function Tv(a,s,c,p){if(Sd){var v=Ev(p);if(v===null)hv(a,s,p,wd,c),aT(a,p);else if(s8(v,a,s,c,p))p.stopPropagation();else if(aT(a,p),s&4&&-1<i8.indexOf(a)){for(;v!==null;){var x=$s(v);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var N=zi(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&&(id=hn()+500,xc(0))}}break;case 31:case 13:R=Ui(x,2),R!==null&&Nn(R,x,2),od(),_v(x,2)}if(x=Ev(p),x===null&&hv(a,s,p,wd,c),x===v)break;v=x}v!==null&&p.stopPropagation()}else hv(a,s,p,null,c)}}function Ev(a){return a=Cm(a),Nv(a)}var wd=null;function Nv(a){if(wd=null,a=zs(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 wd=a,null}function rT(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(ff()){case fA:return 2;case dA:return 8;case df:case F$:return 32;case hA:return 268435456;default:return 32}default:return 32}}var Cv=!1,li=null,ci=null,ui=null,_c=new Map,Tc=new Map,fi=[],i8="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 aT(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":_c.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tc.delete(s.pointerId)}}function Ec(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=$s(s),s!==null&&tT(s)),a):(a.eventSystemFlags|=p,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function s8(a,s,c,p,v){switch(s){case"focusin":return li=Ec(li,a,s,c,p,v),!0;case"dragenter":return ci=Ec(ci,a,s,c,p,v),!0;case"mouseover":return ui=Ec(ui,a,s,c,p,v),!0;case"pointerover":var x=v.pointerId;return _c.set(x,Ec(_c.get(x)||null,a,s,c,p,v)),!0;case"gotpointercapture":return x=v.pointerId,Tc.set(x,Ec(Tc.get(x)||null,a,s,c,p,v)),!0}return!1}function iT(a){var s=zs(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,xA(a.priority,function(){nT(c)});return}}else if(s===31){if(s=u(c),s!==null){a.blockedOn=s,xA(a.priority,function(){nT(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 Ad(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var c=Ev(a.nativeEvent);if(c===null){c=a.nativeEvent;var p=new c.constructor(c.type,c);Nm=p,c.target.dispatchEvent(p),Nm=null}else return s=$s(c),s!==null&&tT(s),a.blockedOn=c,!1;s.shift()}return!0}function sT(a,s,c){Ad(a)&&c.delete(s)}function o8(){Cv=!1,li!==null&&Ad(li)&&(li=null),ci!==null&&Ad(ci)&&(ci=null),ui!==null&&Ad(ui)&&(ui=null),_c.forEach(sT),Tc.forEach(sT)}function Od(a,s){a.blockedOn===s&&(a.blockedOn=null,Cv||(Cv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,o8)))}var _d=null;function oT(a){_d!==a&&(_d=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){_d===a&&(_d=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(Nv(p||c)===null)continue;break}var x=$s(c);x!==null&&(a.splice(s,3),s-=3,Ey(x,{pending:!0,data:v,method:c.method,action:p},p,v))}}))}function bo(a){function s(U){return Od(U,a)}li!==null&&Od(li,a),ci!==null&&Od(ci,a),ui!==null&&Od(ui,a),_c.forEach(s),Tc.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);)iT(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||oT(c);else if(N){var R=null;if(x&&x.hasAttribute("formAction")){if(v=x,N=x[wn]||null)R=N.formAction;else if(Nv(v)!==null)continue}else R=N.action;typeof R=="function"?c[p+1]=R:(c.splice(p,3),p-=3),oT(c)}}}function lT(){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 Mv(a){this._internalRoot=a}Td.prototype.render=Mv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,p=Un();J_(c,p,a,s,null,null)},Td.prototype.unmount=Mv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;J_(a.current,2,null,a,null,null),od(),s[Ls]=null}};function Td(a){this._internalRoot=a}Td.prototype.unstable_scheduleHydration=function(a){if(a){var s=gA();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&&iT(a)}};var cT=t.version;if(cT!=="19.2.7")throw Error(r(527,cT,"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 l8={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ed=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ed.isDisabled&&Ed.supportsFiber)try{zl=Ed.inject(l8),kn=Ed}catch{}}return Cc.createRoot=function(a,s){if(!i(a))throw Error(r(299));var c=!1,p="",v=yO,x=vO,N=gO;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=Z_(a,1,!1,null,null,c,p,null,v,x,N,lT),a[Ls]=s.current,dv(a),new Mv(s)},Cc.hydrateRoot=function(a,s,c){if(!i(a))throw Error(r(299));var p=!1,v="",x=yO,N=vO,R=gO,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=Z_(a,1,!0,s,c??null,p,v,U,x,N,R,lT),s.context=Q_(null),c=s.current,p=Un(),p=jm(p),v=Wa(p),v.callback=null,Za(c,v,p),c=p,s.current.lanes=c,Bl(s,c),Ur(s),a[Ls]=s.current,dv(a),new Td(s)},Cc.version="19.2.7",Cc}var xT;function g8(){if(xT)return kv.exports;xT=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(),kv.exports=v8(),kv.exports}var x8=g8();/**
* 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 dS=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,i3=/^[\\/]{2}/;function b8(e,t){return t+e.replace(/\\/g,"/")}var bT="popstate";function jT(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function j8(e={}){function t(r,i){var h;let o=(h=i.state)==null?void 0:h.masked,{pathname:l,search:u,hash:d}=o||r.location;return c1("",{pathname:l,search:u,hash:d},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:lu(i)}return w8(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 S8(){return Math.random().toString(36).substring(2,10)}function ST(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 c1(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?xl(t):t,state:n,key:t&&t.key||r||S8(),mask:i}}function lu({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 xl(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 w8(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u="POP",d=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(),O=b==null?null:b-h;h=b,d&&d({action:u,location:w.location,delta:O})}function g(b,O){u="PUSH";let T=jT(b)?b:c1(w.location,b,O);h=m()+1;let _=ST(T,h),C=w.createHref(T.mask||T);try{l.pushState(_,"",C)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;i.location.assign(C)}o&&d&&d({action:u,location:w.location,delta:1})}function j(b,O){u="REPLACE";let T=jT(b)?b:c1(w.location,b,O);h=m();let _=ST(T,h),C=w.createHref(T.mask||T);l.replaceState(_,"",C),o&&d&&d({action:u,location:w.location,delta:0})}function S(b){return A8(i,b)}let w={get action(){return u},get location(){return e(i,l)},listen(b){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(bT,y),d=b,()=>{i.removeEventListener(bT,y),d=null}},createHref(b){return t(i,b)},createURL:S,encodeLocation(b){let O=S(b);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:g,replace:j,go(b){return l.go(b)}};return w}function A8(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:lu(t);return i=i.replace(/ $/,"%20"),!n&&i3.test(i)&&(i=r+i),new URL(i,r)}function s3(e,t,n="/"){return O8(e,t,n,!1)}function O8(e,t,n,r,i){let o=typeof t=="string"?xl(t):t,l=Ca(o.pathname||"/",n);if(l==null)return null;let u=_8(e),d=null,h=z8(l);for(let m=0;d==null&&m<u.length;++m)d=L8(u[m],h,r);return d}function _8(e){let t=o3(e);return T8(t),t}function o3(e,t=[],n=[],r="",i=!1){let o=(l,u,d=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)&&d)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}".`),o3(l.children,t,g,y,d)),!(l.path==null&&!l.index)&&t.push({path:y,score:k8(y,l.index),routesMeta:g.map((j,S)=>{let[w,b]=u3(j.relativePath,j.caseSensitive,S===g.length-1);return{...j,matcher:w,compiledParams:b}})})};return e.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,u);else for(let h of l3(l.path))o(l,u,!0,h)}),t}function l3(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=l3(r.join("/")),u=[];return u.push(...l.map(d=>d===""?o:[o,d].join("/"))),i&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function T8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:D8(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var E8=/^:[\w-]+$/,N8=3,C8=2,M8=1,P8=10,R8=-2,wT=e=>e==="*";function k8(e,t){let n=e.split("/"),r=n.length;return n.some(wT)&&(r+=R8),t&&(r+=C8),n.filter(i=>!wT(i)).reduce((i,o)=>i+(E8.test(o)?N8:o===""?M8:P8),r)}function D8(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 L8(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],h=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",y={path:d.relativePath,caseSensitive:d.caseSensitive,end:h},g=d.matcher&&d.compiledParams?c3(y,m,d.matcher,d.compiledParams):fh(y,m),j=d.route;if(!g&&h&&n&&!r[r.length-1].route.index&&(g=fh({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(i,g.params),l.push({params:i,pathname:Nr([o,g.pathname]),pathnameBase:I8(Nr([o,g.pathnameBase])),route:j}),g.pathnameBase!=="/"&&(o=Nr([o,g.pathnameBase]))}return l}function fh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=u3(e.path,e.caseSensitive,e.end);return c3(e,t,n,r)}function c3(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 u3(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,d,h,m)=>{if(r.push({paramName:u,isOptional:d!=null}),d){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 z8(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 $8(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?xl(e):e,o;return n?(n=f3(n),n.startsWith("/")?o=AT(n.substring(1),"/"):o=AT(n,t)):o=t,{pathname:o,search:q8(r),hash:U8(i)}}function AT(e,t){let n=dh(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function $v(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 B8(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function hS(e){let t=B8(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Tp(e,t,n,r=!1){let i;typeof e=="string"?i=xl(e):(i={...e},At(!i.pathname||!i.pathname.includes("?"),$v("?","pathname","search",i)),At(!i.pathname||!i.pathname.includes("#"),$v("#","pathname","hash",i)),At(!i.search||!i.search.includes("#"),$v("#","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 d=$8(i,u),h=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var f3=e=>e.replace(/[\\/]{2,}/g,"/"),Nr=e=>f3(e.join("/")),dh=e=>e.replace(/\/+$/,""),I8=e=>dh(e).replace(/^\/*/,"/"),q8=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,U8=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,V8=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 H8(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function F8(e){let t=e.map(n=>n.route.path).filter(Boolean);return Nr(t)||"/"}var d3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function h3(e,t){let n=e;if(typeof n!="string"||!dS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(d3)try{let o=new URL(window.location.href),l=i3.test(n)?new URL(b8(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 p3=["POST","PUT","PATCH","DELETE"];new Set(p3);var G8=["GET",...p3];new Set(G8);var K8=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Y8(e){try{return K8.includes(new URL(e).protocol)}catch{return!1}}var bl=P.createContext(null);bl.displayName="DataRouter";var Ep=P.createContext(null);Ep.displayName="DataRouterState";var m3=P.createContext(!1);function X8(){return P.useContext(m3)}var y3=P.createContext({isTransitioning:!1});y3.displayName="ViewTransition";var W8=P.createContext(new Map);W8.displayName="Fetchers";var Z8=P.createContext(null);Z8.displayName="Await";var Zn=P.createContext(null);Zn.displayName="Navigation";var Yu=P.createContext(null);Yu.displayName="Location";var Dr=P.createContext({outlet:null,matches:[],isDataRoute:!1});Dr.displayName="Route";var pS=P.createContext(null);pS.displayName="RouteError";var v3="REACT_ROUTER_ERROR",Q8="REDIRECT",J8="ROUTE_ERROR_RESPONSE";function eI(e){if(e.startsWith(`${v3}:${Q8}:{`))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 tI(e){if(e.startsWith(`${v3}:${J8}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new V8(t.status,t.statusText,t.data)}catch{}}function nI(e,{relative:t}={}){At(jl(),"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}=Xu(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Nr([n,o])),r.createHref({pathname:u,search:l,hash:i})}function jl(){return P.useContext(Yu)!=null}function Lr(){return At(jl(),"useLocation() may be used only in the context of a <Router> component."),P.useContext(Yu).location}var g3="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function x3(e){P.useContext(Zn).static||P.useLayoutEffect(e)}function Np(){let{isDataRoute:e}=P.useContext(Dr);return e?vI():rI()}function rI(){At(jl(),"useNavigate() may be used only in the context of a <Router> component.");let e=P.useContext(bl),{basename:t,navigator:n}=P.useContext(Zn),{matches:r}=P.useContext(Dr),{pathname:i}=Lr(),o=JSON.stringify(hS(r)),l=P.useRef(!1);return x3(()=>{l.current=!0}),P.useCallback((d,h={})=>{if(Rr(l.current,g3),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=Tp(d,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 aI=P.createContext(null);function iI(e){let t=P.useContext(Dr).outlet;return P.useMemo(()=>t&&P.createElement(aI.Provider,{value:e},t),[t,e])}function Xu(e,{relative:t}={}){let{matches:n}=P.useContext(Dr),{pathname:r}=Lr(),i=JSON.stringify(hS(n));return P.useMemo(()=>Tp(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function sI(e,t){return b3(e,t)}function b3(e,t,n){var b;At(jl(),"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:"/",d=o?o.pathnameBase:"/",h=o&&o.route;{let O=h&&h.path||"";S3(u,!h||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${O}">) 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="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let m=Lr(),y;if(t){let O=typeof t=="string"?xl(t):t;At(d==="/"||((b=O.pathname)==null?void 0:b.startsWith(d)),`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 "${d}" but pathname "${O.pathname}" was given in the \`location\` prop.`),y=O}else y=m;let g=y.pathname||"/",j=g;if(d!=="/"){let O=d.replace(/^\//,"").split("/");j="/"+g.replace(/^\//,"").split("/").slice(O.length).join("/")}let S=n&&n.state.matches.length?n.state.matches.map(O=>Object.assign(O,{route:n.manifest[O.route.id]||O.route})):s3(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=fI(S&&S.map(O=>Object.assign({},O,{params:Object.assign({},l,O.params),pathname:Nr([d,r.encodeLocation?r.encodeLocation(O.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?d:Nr([d,r.encodeLocation?r.encodeLocation(O.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),i,n);return t&&w?P.createElement(Yu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...y},navigationType:"POP"}},w):w}function oI(){let e=yI(),t=H8(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 lI=P.createElement(oI,null),j3=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=tI(e.digest);n&&(e=n)}let t=e!==void 0?P.createElement(Dr.Provider,{value:this.props.routeContext},P.createElement(pS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?P.createElement(cI,{error:e},t):t}};j3.contextType=m3;var Bv=new WeakMap;function cI({children:e,error:t}){let{basename:n}=P.useContext(Zn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=eI(t.digest);if(r){let i=Bv.get(t);if(i)throw i;let o=h3(r.location,n),l=o.absoluteURL||o.to;if(Y8(l))throw new Error("Invalid redirect location");if(d3&&!Bv.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 Bv.set(t,u),u}return P.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function uI({routeContext:e,match:t,children:n}){let r=P.useContext(bl);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 fI(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 d=n==null?void 0:n.onError,h=r&&d?(m,y)=>{var g,j;d(m,{location:r.location,params:((j=(g=r.matches)==null?void 0:g[0])==null?void 0:j.params)??{},pattern:F8(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||lI,l&&(u<0&&g===0?(S3("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 O=t.concat(i.slice(0,g+1)),T=()=>{let _;return j?_=w:S?_=b:y.route.Component?_=P.createElement(y.route.Component,null):y.route.element?_=y.route.element:_=m,P.createElement(uI,{match:y,routeContext:{outlet:m,matches:O,isDataRoute:r!=null},children:_})};return r&&(y.route.ErrorBoundary||y.route.errorElement||g===0)?P.createElement(j3,{location:r.location,revalidation:r.revalidation,component:w,error:j,children:T(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:h}):T()},null)}function mS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dI(e){let t=P.useContext(bl);return At(t,mS(e)),t}function hI(e){let t=P.useContext(Ep);return At(t,mS(e)),t}function pI(e){let t=P.useContext(Dr);return At(t,mS(e)),t}function yS(e){let t=pI(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 mI(){return yS("useRouteId")}function yI(){var r;let e=P.useContext(pS),t=hI("useRouteError"),n=yS("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function vI(){let{router:e}=dI("useNavigate"),t=yS("useNavigate"),n=P.useRef(!1);return x3(()=>{n.current=!0}),P.useCallback(async(i,o={})=>{Rr(n.current,g3),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var OT={};function S3(e,t,n){!t&&!OT[e]&&(OT[e]=!0,Rr(!1,n))}P.memo(gI);function gI({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:o}){return b3(e,void 0,{manifest:t,state:r,isStatic:i,onError:o})}function vS({to:e,replace:t,state:n,relative:r}){At(jl(),"<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=Np(),d=Tp(e,hS(o),l,r==="path"),h=JSON.stringify(d);return P.useEffect(()=>{u(JSON.parse(h),{replace:t,state:n,relative:r})},[u,h,r,t,n]),null}function xI(e){return iI(e.context)}function ln(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 bI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,useTransitions:l}){At(!jl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=P.useMemo(()=>({basename:u,navigator:i,static:o,useTransitions:l,future:{}}),[u,i,o,l]);typeof n=="string"&&(n=xl(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:d},P.createElement(Yu.Provider,{children:t,value:w}))}function jI({children:e,location:t}){return sI(u1(e),t)}function u1(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,u1(r.props.children,o));return}At(r.type===ln,`[${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=u1(r.props.children,o)),n.push(l)}),n}var Zd="get",Qd="application/x-www-form-urlencoded";function Cp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function SI(e){return Cp(e)&&e.tagName.toLowerCase()==="button"}function wI(e){return Cp(e)&&e.tagName.toLowerCase()==="form"}function AI(e){return Cp(e)&&e.tagName.toLowerCase()==="input"}function OI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _I(e,t){return e.button===0&&(!t||t==="_self")&&!OI(e)}var Cd=null;function TI(){if(Cd===null)try{new FormData(document.createElement("form"),0),Cd=!1}catch{Cd=!0}return Cd}var EI=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Iv(e){return e!=null&&!EI.has(e)?(Rr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qd}"`),null):e}function NI(e,t){let n,r,i,o,l;if(wI(e)){let u=e.getAttribute("action");r=u?Ca(u,t):null,n=e.getAttribute("method")||Zd,i=Iv(e.getAttribute("enctype"))||Qd,o=new FormData(e)}else if(SI(e)||AI(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 d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?Ca(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Zd,i=Iv(e.getAttribute("formenctype"))||Iv(u.getAttribute("enctype"))||Qd,o=new FormData(u,e),!TI()){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(Cp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Zd,r=null,i=Qd,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 gS(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function w3(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=`${dh(t)}/_root.${r}`:i.pathname=`${dh(i.pathname)}.${r}`,i}async function CI(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 MI(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 PI(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let l=await CI(o,n);return l.links?l.links():[]}return[]}));return LI(r.flat(1).filter(MI).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function _T(e,t,n,r,i,o){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,u=(d,h)=>{var m;return n[h].pathname!==d.pathname||((m=n[h].route.path)==null?void 0:m.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>l(d,h)||u(d,h)):o==="data"?t.filter((d,h)=>{var y;let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,h)||u(d,h))return!0;if(d.route.shouldRevalidate){let g=d.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:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function RI(e,t,{includeHydrateFallback:n}={}){return kI(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 kI(e){return[...new Set(e)]}function DI(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function LI(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(DI(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function xS(){let e=P.useContext(bl);return gS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function zI(){let e=P.useContext(Ep);return gS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bS=P.createContext(void 0);bS.displayName="FrameworkContext";function Mp(){let e=P.useContext(bS);return gS(e,"You must render this element inside a <HydratedRouter> element"),e}function $I(e,t){let n=P.useContext(bS),[r,i]=P.useState(!1),[o,l]=P.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=t,g=P.useRef(null);P.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=O=>{O.forEach(T=>{l(T.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:Mc(u,j),onBlur:Mc(d,S),onMouseEnter:Mc(h,j),onMouseLeave:Mc(m,S),onTouchStart:Mc(y,j)}]:[!1,g,{}]}function Mc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function BI({page:e,...t}){let n=X8(),{nonce:r}=Mp(),{router:i}=xS(),o=P.useMemo(()=>s3(i.routes,e,i.basename),[i.routes,e,i.basename]);return o?(t.nonce==null&&r&&(t={...t,nonce:r}),n?P.createElement(qI,{page:e,matches:o,...t}):P.createElement(UI,{page:e,matches:o,...t})):null}function II(e){let{manifest:t,routeModules:n}=Mp(),[r,i]=P.useState([]);return P.useEffect(()=>{let o=!1;return PI(e,t,n).then(l=>{o||i(l)}),()=>{o=!0}},[e,t,n]),r}function qI({page:e,matches:t,...n}){let r=Lr(),{future:i}=Mp(),{basename:o}=xS(),l=P.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let u=w3(e,o,i.v8_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?d=!0:h.push(m.route.id);return d&&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 UI({page:e,matches:t,...n}){let r=Lr(),{future:i,manifest:o,routeModules:l}=Mp(),{basename:u}=xS(),{loaderData:d,matches:h}=zI(),m=P.useMemo(()=>_T(e,t,h,o,r,"data"),[e,t,h,o,r]),y=P.useMemo(()=>_T(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(T=>{var C;let _=o.routes[T.route.id];!_||!_.hasLoader||(!m.some(A=>A.route.id===T.route.id)&&T.route.id in d&&((C=l[T.route.id])!=null&&C.shouldRevalidate)||_.hasClientLoader?b=!0:w.add(T.route.id))}),w.size===0)return[];let O=w3(e,u,i.v8_trailingSlashAwareDataRequests,"data");return b&&w.size>0&&O.searchParams.set("_routes",t.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[O.pathname+O.search]},[u,i.v8_trailingSlashAwareDataRequests,d,r,o,m,t,e,l]),j=P.useMemo(()=>RI(y,o),[y,o]),S=II(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 VI(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var HI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{HI&&(window.__reactRouterVersion="7.18.1")}catch{}function FI({basename:e,children:t,useTransitions:n,window:r}){let i=P.useRef();i.current==null&&(i.current=j8({window:r,v5Compat:!0}));let o=i.current,[l,u]=P.useState({action:o.action,location:o.location}),d=P.useCallback(h=>{n===!1?u(h):P.startTransition(()=>u(h))},[n]);return P.useLayoutEffect(()=>o.listen(d),[o,d]),P.createElement(bI,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var A3=P.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:l,mask:u,state:d,target:h,to:m,preventScrollReset:y,viewTransition:g,defaultShouldRevalidate:j,...S},w){let{basename:b,navigator:O,useTransitions:T}=P.useContext(Zn),_=typeof m=="string"&&dS.test(m),C=h3(m,b);m=C.to;let A=nI(m,{relative:i}),E=Lr(),M=null;if(u){let Y=Tp(u,[],E.mask?E.mask.pathname:"/",!0);b!=="/"&&(Y.pathname=Y.pathname==="/"?b:Nr([b,Y.pathname])),M=O.createHref(Y)}let[D,k,B]=$I(r,S),q=YI(m,{replace:l,mask:u,state:d,target:h,preventScrollReset:y,relative:i,viewTransition:g,defaultShouldRevalidate:j,useTransitions:T});function $(Y){t&&t(Y),Y.defaultPrevented||q(Y)}let G=!(C.isExternal||o),X=P.createElement("a",{...S,...B,href:(G?M:void 0)||C.absoluteURL||A,onClick:G?$:t,ref:VI(w,k),target:h,"data-discover":!_&&n==="render"?"true":void 0});return D&&!_?P.createElement(P.Fragment,null,X,P.createElement(BI,{page:A})):X});A3.displayName="Link";var O3=P.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:l,viewTransition:u,children:d,...h},m){let y=Xu(l,{relative:h.relative}),g=Lr(),j=P.useContext(Ep),{navigator:S,basename:w}=P.useContext(Zn),b=j!=null&&JI(y)&&u===!0,O=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,T=g.pathname,_=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;n||(T=T.toLowerCase(),_=_?_.toLowerCase():null,O=O.toLowerCase()),_&&w&&(_=Ca(_,w)||_);const C=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let A=T===O||!i&&T.startsWith(O)&&T.charAt(C)==="/",E=_!=null&&(_===O||!i&&_.startsWith(O)&&_.charAt(O.length)==="/"),M={isActive:A,isPending:E,isTransitioning:b},D=A?t:void 0,k;typeof r=="function"?k=r(M):k=[r,A?"active":null,E?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let B=typeof o=="function"?o(M):o;return P.createElement(A3,{...h,"aria-current":D,className:k,ref:m,style:B,to:l,viewTransition:u},typeof d=="function"?d(M):d)});O3.displayName="NavLink";var GI=P.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:l=Zd,action:u,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:y,defaultShouldRevalidate:g,...j},S)=>{let{useTransitions:w}=P.useContext(Zn),b=ZI(),O=QI(u,{relative:h}),T=l.toLowerCase()==="get"?"get":"post",_=typeof u=="string"&&dS.test(u),C=A=>{if(d&&d(A),A.defaultPrevented)return;A.preventDefault();let E=A.nativeEvent.submitter,M=(E==null?void 0:E.getAttribute("formmethod"))||l,D=()=>b(E||A.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:T,action:O,onSubmit:r?d:C,...j,"data-discover":!_&&e==="render"?"true":void 0})});GI.displayName="Form";function KI(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _3(e){let t=P.useContext(bl);return At(t,KI(e)),t}function YI(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:d,useTransitions:h}={}){let m=Np(),y=Lr(),g=Xu(e,{relative:l});return P.useCallback(j=>{if(_I(j,t)){j.preventDefault();let S=n!==void 0?n:lu(y)===lu(g),w=()=>m(e,{replace:S,mask:r,state:i,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:d});h?P.startTransition(()=>w()):w()}},[y,m,g,n,r,i,t,e,o,l,u,d,h])}var XI=0,WI=()=>`__${String(++XI)}__`;function ZI(){let{router:e}=_3("useSubmit"),{basename:t}=P.useContext(Zn),n=mI(),r=e.fetch,i=e.navigate;return P.useCallback(async(o,l={})=>{let{action:u,method:d,encType:h,formData:m,body:y}=NI(o,t);if(l.navigate===!1){let g=l.fetcherKey||WI();await r(g,n,l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:y,formMethod:l.method||d,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||d,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function QI(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={...Xu(e||".",{relative:t})},l=Lr();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.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])),lu(o)}function JI(e,{relative:t}={}){let n=P.useContext(y3);At(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=_3("useViewTransitionState"),i=Xu(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 fh(i.pathname,l)!=null||fh(i.pathname,o)!=null}const TT=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:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,u);return u},eq=(e=>e?TT(e):TT),tq=e=>e;function nq(e,t=tq){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 ET=e=>{const t=eq(e),n=r=>nq(t,r);return Object.assign(n,t),n},T3=(e=>e?ET(e):ET);function rq(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const l=d=>d===null?null:JSON.parse(d,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 f1=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return f1(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return f1(r)(n)}}}},aq=(e,t)=>(n,r,i)=>{let o={storage:rq(()=>window.localStorage),partialize:b=>b,version:0,merge:(b,O)=>({...O,...b}),...t},l=!1,u=0;const d=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,O)=>(g(b,O),y());const j=e((...b)=>(n(...b),y()),r,i);i.getInitialState=()=>j;let S;const w=()=>{var b,O;if(!m)return;const T=++u;l=!1,d.forEach(C=>{var A;return C((A=r())!=null?A:j)});const _=((O=o.onRehydrateStorage)==null?void 0:O.call(o,(b=r())!=null?b:j))||void 0;return f1(m.getItem.bind(m))(o.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate){const A=o.migrate(C.state,C.version);return A instanceof Promise?A.then(E=>[!0,E]):[!0,A]}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 A;if(T!==u)return;const[E,M]=C;if(S=o.merge(M,(A=r())!=null?A:j),n(S,!0),E)return y()}).then(()=>{T===u&&(_==null||_(r(),void 0),S=r(),l=!0,h.forEach(C=>C(S)))}).catch(C=>{T===u&&(_==null||_(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=>(d.add(b),()=>{d.delete(b)}),onFinishHydration:b=>(h.add(b),()=>{h.delete(b)})},o.skipHydration||w(),S||j},iq=aq,Sl=T3()(iq(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})})),jS=P.createContext({});function SS(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const sq=typeof window<"u",wS=sq?P.useLayoutEffect:P.useEffect,Pp=P.createContext(null);function AS(e,t){e.indexOf(t)===-1&&e.push(t)}function hh(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 OS=()=>{};const Oi={},E3=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),N3=e=>typeof e=="object"&&e!==null,C3=e=>/^0[^.\s]+$/u.test(e);function M3(e){let t;return()=>(t===void 0&&(t=e()),t)}const pr=e=>e,Wu=(...e)=>e.reduce((t,n)=>r=>n(t(r))),cu=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class _S{constructor(){this.subscriptions=[]}add(t){return AS(this.subscriptions,t),()=>hh(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,P3=(e,t)=>t?e*(1e3/t):0,R3=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,oq=1e-7,lq=12;function cq(e,t,n,r,i){let o,l,u=0;do l=t+(n-t)/2,o=R3(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>oq&&++u<lq);return l}function Zu(e,t,n,r){if(e===t&&n===r)return pr;const i=o=>cq(o,0,1,e,n);return o=>o===0||o===1?o:R3(i(o),t,r)}const k3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,D3=e=>t=>1-e(1-t),L3=Zu(.33,1.53,.69,.99),TS=D3(L3),z3=k3(TS),$3=e=>e>=1?1:(e*=2)<1?.5*TS(e):.5*(2-Math.pow(2,-10*(e-1))),ES=e=>1-Math.sin(Math.acos(e)),B3=D3(ES),I3=k3(ES),uq=Zu(.42,0,1,1),fq=Zu(0,0,.58,1),q3=Zu(.42,0,.58,1),dq=e=>Array.isArray(e)&&typeof e[0]!="number",U3=e=>Array.isArray(e)&&typeof e[0]=="number",hq={linear:pr,easeIn:uq,easeInOut:q3,easeOut:fq,circIn:ES,circInOut:I3,circOut:B3,backIn:TS,backInOut:z3,backOut:L3,anticipate:$3},pq=e=>typeof e=="string",NT=e=>{if(U3(e)){OS(e.length===4);const[t,n,r,i]=e;return Zu(t,n,r,i)}else if(pq(e))return hq[e];return e},Md=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function mq(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)&&(d.schedule(h),e()),h(l)}const d={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,d.process(h))}};return d}const yq=40;function V3(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=Md.reduce((_,C)=>(_[C]=mq(o),_),{}),{setup:u,read:d,resolveKeyframes:h,preUpdate:m,update:y,preRender:g,render:j,postRender:S}=l,w=()=>{const _=Oi.useManualTiming,C=_?i.timestamp:performance.now();n=!1,_||(i.delta=r?1e3/60:Math.max(Math.min(C-i.timestamp,yq),1)),i.timestamp=C,i.isProcessing=!0,u.process(i),d.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:Md.reduce((_,C)=>{const A=l[C];return _[C]=(E,M=!1,D=!1)=>(n||b(),A.schedule(E,M,D)),_},{}),cancel:_=>{for(let C=0;C<Md.length;C++)l[Md[C]].cancel(_)},state:i,steps:l}}const{schedule:ft,cancel:_i,state:un,steps:qv}=V3(typeof requestAnimationFrame<"u"?requestAnimationFrame:pr,!0);let Jd;function vq(){Jd=void 0}const gn={now:()=>(Jd===void 0&&gn.set(un.isProcessing||Oi.useManualTiming?un.timestamp:performance.now()),Jd),set:e=>{Jd=e,queueMicrotask(vq)}},H3=e=>t=>typeof t=="string"&&t.startsWith(e),F3=H3("--"),gq=H3("var(--"),NS=e=>gq(e)?xq.test(e.split("/*")[0].trim()):!1,xq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function CT(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const wl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},uu={...wl,transform:e=>Zr(0,1,e)},Pd={...wl,default:1},Wc=e=>Math.round(e*1e5)/1e5,CS=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bq(e){return e==null}const jq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,MS=(e,t)=>n=>!!(typeof n=="string"&&jq.test(n)&&n.startsWith(e)||t&&!bq(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(CS);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},Sq=e=>Zr(0,255,e),Uv={...wl,transform:e=>Math.round(Sq(e))},us={test:MS("rgb","red"),parse:G3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Uv.transform(e)+", "+Uv.transform(t)+", "+Uv.transform(n)+", "+Wc(uu.transform(r))+")"};function wq(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 d1={test:MS("#"),parse:wq,transform:us.transform},Qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wa=Qu("deg"),Kr=Qu("%"),xe=Qu("px"),Aq=Qu("vh"),Oq=Qu("vw"),MT={...Kr,parse:e=>Kr.parse(e)/100,transform:e=>Kr.transform(e*100)},To={test:MS("hsl","hue"),parse:G3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kr.transform(Wc(t))+", "+Kr.transform(Wc(n))+", "+Wc(uu.transform(r))+")"},It={test:e=>us.test(e)||d1.test(e)||To.test(e),parse:e=>us.test(e)?us.parse(e):To.test(e)?To.parse(e):d1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?us.transform(e):To.transform(e),getAnimatableNone:e=>{const t=It.parse(e);return t.alpha=0,It.transform(t)}},_q=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Tq(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(CS))==null?void 0:t.length)||0)+(((n=e.match(_q))==null?void 0:n.length)||0)>0}const K3="number",Y3="color",Eq="var",Nq="var(",PT="${}",Cq=/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 Vo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const u=t.replace(Cq,d=>(It.test(d)?(r.color.push(o),i.push(Y3),n.push(It.parse(d))):d.startsWith(Nq)?(r.var.push(o),i.push(Eq),n.push(d)):(r.number.push(o),i.push(K3),n.push(parseFloat(d))),++o,PT)).split(PT);return{values:n,split:u,indexes:r,types:i}}function Mq(e){return Vo(e).values}function X3({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===K3?i+=Wc(r[o]):l===Y3?i+=It.transform(r[o]):i+=r[o]}return i}}function Pq(e){return X3(Vo(e))}const Rq=e=>typeof e=="number"?0:It.test(e)?It.getAnimatableNone(e):e,kq=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Rq(e);function Dq(e){const t=Vo(e);return X3(t)(t.values.map((r,i)=>kq(r,t.split[i])))}const Cr={test:Tq,parse:Mq,createTransformer:Pq,getAnimatableNone:Dq};function Vv(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 Lq({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,d=2*n-u;i=Vv(d,u,e+1/3),o=Vv(d,u,e),l=Vv(d,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function ph(e,t){return n=>n>0?t:e}const ut=(e,t,n)=>e+(t-e)*n,Hv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},zq=[d1,us,To],$q=e=>zq.find(t=>t.test(e));function RT(e){const t=$q(e);if(!t)return!1;let n=t.parse(e);return t===To&&(n=Lq(n)),n}const kT=(e,t)=>{const n=RT(e),r=RT(t);if(!n||!r)return ph(e,t);const i={...n};return o=>(i.red=Hv(n.red,r.red,o),i.green=Hv(n.green,r.green,o),i.blue=Hv(n.blue,r.blue,o),i.alpha=ut(n.alpha,r.alpha,o),us.transform(i))},h1=new Set(["none","hidden"]);function Bq(e,t){return h1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Iq(e,t){return n=>ut(e,t,n)}function PS(e){return typeof e=="number"?Iq:typeof e=="string"?NS(e)?ph:It.test(e)?kT:Vq:Array.isArray(e)?W3:typeof e=="object"?It.test(e)?kT:qq:ph}function W3(e,t){const n=[...e],r=n.length,i=e.map((o,l)=>PS(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=i[l](o);return n}}function qq(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=PS(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Uq(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 Vq=(e,t)=>{const n=Cr.createTransformer(t),r=Vo(e),i=Vo(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?h1.has(e)&&!i.values.length||h1.has(t)&&!r.values.length?Bq(e,t):Wu(W3(Uq(r,i),i.values),n):ph(e,t)};function Z3(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):PS(e)(e,t)}const Hq=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ft.update(t,n),stop:()=>_i(t),now:()=>un.isProcessing?un.timestamp:gn.now()}},Q3=(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)})`},mh=2e4;function RS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mh;)t+=n,r=e.next(t);return t>=mh?1/0:t}function Fq(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(RS(r),mh);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 p1(e,t){return e*Math.sqrt(1-t*t)}const Gq=12;function Kq(e,t,n){let r=n;for(let i=1;i<Gq;i++)r=r-e(r)/t(r);return r}const Fv=.001;function Yq({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=p1(h,l),S=Math.exp(-y);return Fv-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=p1(Math.pow(h,2),l);return(-i(h)+Fv>0?-1:1)*((g-j)*S)/w}):(i=h=>{const m=Math.exp(-h*e),y=(h-n)*e+1;return-Fv+m*y},o=h=>{const m=Math.exp(-h*e),y=(n-h)*(e*e);return m*y});const u=5/e,d=Kq(i,o,u);if(e=Yn(e),isNaN(d))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:l*2*Math.sqrt(r*h),duration:e}}}const Xq=["duration","bounce"],Wq=["stiffness","damping","mass"];function DT(e,t){return t.some(n=>e[n]!==void 0)}function Zq(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!DT(e,Wq)&&DT(e,Xq))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=Yq({...e,velocity:0});t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function yh(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:d,damping:h,mass:m,duration:y,velocity:g,isResolvedFromDuration:j}=Zq({...n,velocity:-dr(n.velocity||0)}),S=g||0,w=h/(2*Math.sqrt(d*m)),b=l-o,O=dr(Math.sqrt(d/m)),T=Math.abs(b)<5;r||(r=T?Ct.restSpeed.granular:Ct.restSpeed.default),i||(i=T?Ct.restDelta.granular:Ct.restDelta.default);let _,C,A,E,M,D;if(w<1)A=p1(O,w),E=(S+w*O*b)/A,_=B=>{const q=Math.exp(-w*O*B);return l-q*(E*Math.sin(A*B)+b*Math.cos(A*B))},M=w*O*E+b*A,D=w*O*b-E*A,C=B=>Math.exp(-w*O*B)*(M*Math.sin(A*B)+D*Math.cos(A*B));else if(w===1){_=q=>l-Math.exp(-O*q)*(b+(S+O*b)*q);const B=S+O*b;C=q=>Math.exp(-O*q)*(O*B*q-S)}else{const B=O*Math.sqrt(w*w-1);_=X=>{const Y=Math.exp(-w*O*X),L=Math.min(B*X,300);return l-Y*((S+w*O*b)*Math.sinh(L)+B*b*Math.cosh(L))/B};const q=(S+w*O*b)/B,$=w*O*q-b*B,G=w*O*b-q*B;C=X=>{const Y=Math.exp(-w*O*X),L=Math.min(B*X,300);return Y*($*Math.sinh(L)+G*Math.cosh(L))}}const k={calculatedDuration:j&&y||null,velocity:B=>Yn(C(B)),next:B=>{if(!j&&w<1){const $=Math.exp(-w*O*B),G=Math.sin(A*B),X=Math.cos(A*B),Y=l-$*(E*G+b*X),L=Yn($*(M*G+D*X));return u.done=Math.abs(L)<=r&&Math.abs(l-Y)<=i,u.value=u.done?l:Y,u}const q=_(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(RS(k),mh),q=Q3($=>k.next(B*$).value,B,30);return B+"ms "+q},toTransition:()=>{}};return k}yh.applyToOptions=e=>{const t=Fq(e,100,yh);return e.ease=t.ease,e.duration=Yn(t.duration),e.type="keyframes",e};const Qq=5;function J3(e,t,n){const r=Math.max(t-Qq,0);return P3(n-e(r),t-r)}function m1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:d,restDelta:h=.5,restSpeed:m}){const y=e[0],g={done:!1,value:y},j=D=>u!==void 0&&D<u||d!==void 0&&D>d,S=D=>u===void 0?d:d===void 0||Math.abs(u-D)<Math.abs(d-D)?u:d;let w=n*t;const b=y+w,O=l===void 0?b:l(b);O!==b&&(w=O-y);const T=D=>-w*Math.exp(-D/r),_=D=>O+T(D),C=D=>{const k=T(D),B=_(D);g.done=Math.abs(k)<=h,g.value=g.done?O:B};let A,E;const M=D=>{j(g.value)&&(A=D,E=yh({keyframes:[g.value,S(g.value)],velocity:J3(_,D,g.value),damping:i,stiffness:o,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let k=!1;return!E&&A===void 0&&(k=!0,C(D),M(D)),A!==void 0&&D>=A?E.next(D-A):(!k&&C(D),g)}}}function Jq(e,t,n){const r=[],i=n||Oi.mix||Z3,o=e.length-1;for(let l=0;l<o;l++){let u=i(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||pr:t;u=Wu(d,u)}r.push(u)}return r}function eU(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(OS(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=Jq(t,r,i),d=u.length,h=m=>{if(l&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const g=cu(e[y],e[y+1],m);return u[y](g)};return n?m=>h(Zr(e[0],e[o-1],m)):h}function tU(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=cu(0,t,r);e.push(ut(n,1,i))}}function nU(e){const t=[0];return tU(t,e.length-1),t}function rU(e,t){return e.map(n=>n*t)}function aU(e,t){return e.map(()=>t||q3).splice(0,e.length-1)}function Zc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=dq(r)?r.map(NT):NT(r),o={done:!1,value:t[0]},l=rU(n&&n.length===t.length?n:nU(t),e),u=eU(l,t,{ease:Array.isArray(i)?i:aU(t,i)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const iU=e=>e!==null;function Rp(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(iU),u=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const sU={decay:m1,inertia:m1,tween:Zc,keyframes:Zc,spring:yh};function e4(e){typeof e.type=="string"&&(e.type=sU[e.type])}class kS{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 oU=e=>e/100;class vh extends kS{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;e4(t);const{type:n=Zc,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const d=n||Zc;d!==Zc&&typeof u[0]!="number"&&(this.mixKeyframes=Wu(oU,Z3(u[0],u[1])),u=[0,100]);const h=d({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=RS(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:d}=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 O=this.currentTime-h*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?O<0:O>i;this.currentTime=Math.max(O,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let _=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)),_=Zr(0,1,B)*u}let A;T?(this.delayState.value=m[0],A=this.delayState):A=C.next(_),o&&!T&&(A.value=o(A.value));let{done:E}=A;!T&&d!==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!==m1&&(A.value=Rp(m,this.options,b,this.speed)),w&&w(A.value),M&&this.finish(),A}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 J3(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=Hq,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 lU(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const fs=e=>e*180/Math.PI,y1=e=>{const t=fs(Math.atan2(e[1],e[0]));return v1(t)},cU={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:y1,rotateZ:y1,skewX:e=>fs(Math.atan(e[1])),skewY:e=>fs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},v1=e=>(e=e%360,e<0&&(e+=360),e),LT=y1,zT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),$T=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uU={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:zT,scaleY:$T,scale:e=>(zT(e)+$T(e))/2,rotateX:e=>v1(fs(Math.atan2(e[6],e[5]))),rotateY:e=>v1(fs(Math.atan2(-e[2],e[0]))),rotateZ:LT,rotate:LT,skewX:e=>fs(Math.atan(e[4])),skewY:e=>fs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function g1(e){return e.includes("scale")?1:0}function x1(e,t){if(!e||e==="none")return g1(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=uU,i=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=cU,i=u}if(!i)return g1(t);const o=r[t],l=i[1].split(",").map(dU);return typeof o=="function"?o(l):l[o]}const fU=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return x1(n,t)};function dU(e){return parseFloat(e.trim())}const Al=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ol=new Set([...Al,"pathRotation"]),BT=e=>e===wl||e===xe,hU=new Set(["x","y","z"]),pU=Al.filter(e=>!hU.has(e));function mU(e){const t=[];return pU.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})=>x1(t,"x"),y:(e,{transform:t})=>x1(t,"y")};xi.translateX=xi.x;xi.translateY=xi.y;const vs=new Set;let b1=!1,j1=!1,S1=!1;function t4(){if(j1){const e=Array.from(vs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=mU(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)})}j1=!1,b1=!1,vs.forEach(e=>e.complete(S1)),vs.clear()}function n4(){vs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(j1=!0)})}function yU(){S1=!0,n4(),t4(),S1=!1}class DS{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?(vs.add(this),b1||(b1=!0,ft.read(n4),ft.resolveKeyframes(t4))):(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])}lU(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vs.delete(this)}cancel(){this.state==="scheduled"&&(vs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vU=e=>e.startsWith("--");function r4(e,t,n){vU(t)?e.style.setProperty(t,n):e.style[t]=n}const gU={};function a4(e,t){const n=M3(e);return()=>gU[t]??n()}const xU=a4(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),i4=a4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Gc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,IT={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Gc([0,.65,.55,1]),circOut:Gc([.55,0,1,.45]),backIn:Gc([.31,.01,.66,-.59]),backOut:Gc([.33,1.53,.69,.99])};function s4(e,t){if(e)return typeof e=="function"?i4()?Q3(e,t):"ease-out":U3(e)?Gc(e):Array.isArray(e)?e.map(n=>s4(n,t)||IT.easeOut):IT[e]}function bU(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const y=s4(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 o4(e){return typeof e=="function"&&"applyToOptions"in e}function jU({type:e,...t}){return o4(e)&&i4()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class l4 extends kS{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:d}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,OS(typeof t.type!="string");const h=jU(t);this.animation=bU(n,r,i,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=Rp(i,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(m),r4(n,r,m),this.animation.cancel()}d==null||d(),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&&xU()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),pr):i(this)}}const c4={anticipate:$3,backInOut:z3,circInOut:I3};function SU(e){return e in c4}function wU(e){typeof e.ease=="string"&&SU(e.ease)&&(e.ease=c4[e.ease])}const Gv=10;class AU extends l4{constructor(t){wU(t),e4(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 vh({...l,autoplay:!1}),d=Math.max(Gv,gn.now()-this.startTime),h=Zr(0,Gv,d-Gv),m=u.sample(d).value,{name:y}=this.options;o&&y&&r4(o,y,m),n.setWithVelocity(u.sample(Math.max(0,d-h)).value,m,h),u.stop()}}const qT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Cr.test(e)||e==="0")&&!e.startsWith("url("));function OU(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 _U(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=qT(i,t),u=qT(o,t);return!l||!u?!1:OU(e)||(n==="spring"||o4(n))&&r}function w1(e){e.duration=0,e.type="keyframes"}const u4=new Set(["opacity","clipPath","filter","transform"]),TU=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function EU(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&TU.test(e[t]))return!0;return!1}const NU=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),CU=M3(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MU(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 CU()&&n&&(u4.has(n)||NU.has(n)&&EU(u))&&(n!=="transform"||!m)&&!h&&!r&&i!=="mirror"&&o!==0&&l!=="inertia"}const PU=40;class RU extends kS{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:d,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:d,motionValue:h,element:m,...y},j=(m==null?void 0:m.KeyframeResolver)||DS;this.keyframeResolver=new j(u,(w,b,O)=>this.onKeyframesResolved(w,b,g,!O),d,h,m),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(t,n,r,i){var O,T;this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:d,isHandoff:h,onUpdate:m}=r;this.resolvedAt=gn.now();let y=!0;_U(t,o,l,u)||(y=!1,(Oi.instantAnimations||!d)&&(m==null||m(Rp(t,r,n))),t[0]=t[t.length-1],w1(r),r.repeat=0);const j={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>PU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},S=y&&!h&&MU(j),w=(T=(O=j.motionValue)==null?void 0:O.owner)==null?void 0:T.current;let b;if(S)try{b=new AU({...j,element:w})}catch{b=new vh(j)}else b=new vh(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(),yU()),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 f4(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 UT=30,kU=e=>!isNaN(parseFloat(e));class DU{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=kU(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 _S);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>UT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,UT);return P3(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 Ho(e,t){return new DU(e,t)}function d4(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function LS(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?d4(n,e):n}const LU={type:"spring",stiffness:500,damping:25,restSpeed:10},zU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$U={type:"keyframes",duration:.8},BU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},IU=(e,{keyframes:t})=>t.length>2?$U:Ol.has(e)?e.startsWith("scale")?zU(t[1]):LU:BU,qU=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function UU(e){for(const t in e)if(!qU.has(t))return!0;return!1}const zS=(e,t,n,r={},i,o)=>l=>{const u=LS(r,e)||{},d=u.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Yn(d);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};UU(u)||Object.assign(m,IU(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)&&(w1(m),m.delay===0&&(y=!0)),(Oi.instantAnimations||Oi.skipAnimations||i!=null&&i.shouldSkipAnimations||u.skipAnimations)&&(y=!0,w1(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,y&&!o&&t.get()!==void 0){const g=Rp(m.keyframes,u);if(g!==void 0){ft.update(()=>{m.onUpdate(g),m.onComplete()});return}}return u.isSync?new vh(m):new RU(m)},VU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function HU(e){const t=VU.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function h4(e,t,n=1){const[r,i]=HU(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return E3(l)?parseFloat(l):l}return NS(i)?h4(i,t,n+1):i}function VT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function $S(e,t,n,r){if(typeof t=="function"){const[i,o]=VT(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]=VT(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function gs(e,t,n){const r=e.getProps();return $S(r,t,n!==void 0?n:r.custom,e)}const p4=new Set(["width","height","top","left","right","bottom",...Al]),A1=e=>Array.isArray(e);function FU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ho(n))}function GU(e){return A1(e)?e[e.length-1]||0:e}function KU(e,t){const n=gs(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const l in o){const u=GU(o[l]);FU(e,l,u)}}const fn=e=>!!(e&&e.getVelocity);function YU(e){return!!(fn(e)&&e.add)}function O1(e,t){const n=e.getValue("willChange");if(YU(n))return n.add(t);if(!n&&Oi.WillChange){const r=new Oi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function BS(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const XU="framerAppearId",m4="data-"+BS(XU);function y4(e){return e.props[m4]}function WU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function v4(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:l,...u}=t;const d=e.getDefaultTransition();o=o?d4(o,d):d;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&&WU(g,S))continue;const O={delay:n,...LS(o||{},S)};m&&(O.skipAnimations=!0);const T=w.get();if(T!==void 0&&!w.isAnimating()&&!Array.isArray(b)&&b===T&&!O.velocity){ft.update(()=>w.set(b));continue}let _=!1;if(window.MotionHandoffAnimation){const E=y4(e);if(E){const M=window.MotionHandoffAnimation(E,S,ft);M!==null&&(O.startTime=M,_=!0)}}O1(e,S);const C=h??e.shouldReduceMotion;w.start(zS(S,w,b,C&&p4.has(S)?{type:!1}:O,e,_));const A=w.animation;A&&y.push(A)}if(l){const S=()=>ft.update(()=>{l&&KU(e,l)});y.length?Promise.all(y).then(S):S()}return y}function _1(e,t,n={}){var d;const r=gs(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(v4(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:m=0,staggerChildren:y,staggerDirection:g}=i;return ZU(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 ZU(e,t,n=0,r=0,i=0,o=1,l){const u=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),u.push(_1(d,t,{...l,delay:n+(typeof r=="function"?0:r)+f4(e.variantChildren,d,r,i,o)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(u)}function QU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>_1(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=_1(e,t,n);else{const i=typeof t=="function"?gs(e,t,n.custom):t;r=Promise.all(v4(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const JU={test:e=>e==="auto",parse:e=>e},g4=e=>t=>t.test(e),x4=[wl,xe,Kr,wa,Oq,Aq,JU],HT=e=>x4.find(g4(e));function eV(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||C3(e):!0}const tV=new Set(["brightness","contrast","saturate","opacity"]);function nV(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(CS)||[];if(!r)return e;const i=n.replace(r,"");let o=tV.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const rV=/\b([a-z-]*)\(.*?\)/gu,T1={...Cr,getAnimatableNone:e=>{const t=e.match(rV);return t?t.map(nV).join(" "):e}},E1={...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))}},FT={...wl,transform:Math.round},aV={rotate:wa,pathRotation:wa,rotateX:wa,rotateY:wa,rotateZ:wa,scale:Pd,scaleX:Pd,scaleY:Pd,scaleZ:Pd,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:uu,originX:MT,originY:MT,originZ:xe},gh={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,...aV,zIndex:FT,fillOpacity:uu,strokeOpacity:uu,numOctaves:FT},iV={...gh,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:T1,WebkitFilter:T1,mask:E1,WebkitMask:E1},b4=e=>iV[e],sV=new Set([T1,E1]);function j4(e,t){let n=b4(e);return sV.has(n)||(n=Cr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const oV=new Set(["auto","none","0"]);function lV(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!oV.has(o)&&Vo(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=j4(n,i)}class cV extends DS{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(),NS(y))){const g=h4(y,n.current);g!==void 0&&(t[m]=g),m===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!p4.has(r)||t.length!==2)return;const[i,o]=t,l=HT(i),u=HT(o),d=CT(i),h=CT(o);if(d!==h&&xi[r]){this.needsMeasurement=!0;return}if(l!==u)if(BT(l)&&BT(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||eV(t[i]))&&r.push(i);r.length&&lV(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(([d,h])=>{t.getValue(d).set(h)}),this.resolveNoneKeyframes()}}const IS=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function S4(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 N1=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function eh(e){return N3(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qS}=V3(queueMicrotask,!1),Or={x:!1,y:!1};function w4(){return Or.x||Or.y}function uV(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 A4(e,t){const n=S4(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function fV(e){return!(e.pointerType==="touch"||w4())}function dV(e,t,n={}){const[r,i,o]=A4(e,n);return r.forEach(l=>{let u=!1,d=!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),d&&(d=!1,y(b))},j=()=>{u=!0,window.addEventListener("pointerup",g,i),window.addEventListener("pointercancel",g,i)},S=b=>{if(b.pointerType!=="touch"){if(u){d=!0;return}y(b)}},w=b=>{if(!fV(b))return;d=!1;const O=t(l,b);typeof O=="function"&&(h=O,l.addEventListener("pointerleave",S,i))};l.addEventListener("pointerenter",w,i),l.addEventListener("pointerdown",j,i)}),o}const O4=(e,t)=>t?e===t?!0:O4(e,t.parentElement):!1,US=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hV=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pV(e){return hV.has(e.tagName)||e.isContentEditable===!0}const mV=new Set(["INPUT","SELECT","TEXTAREA"]);function yV(e){return mV.has(e.tagName)||e.isContentEditable===!0}const th=new WeakSet;function GT(e){return t=>{t.key==="Enter"&&e(t)}}function Kv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vV=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=GT(()=>{if(th.has(n))return;Kv(n,"down");const i=GT(()=>{Kv(n,"up")}),o=()=>Kv(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 KT(e){return US(e)&&!w4()}const YT=new WeakSet;function gV(e,t,n={}){const[r,i,o]=A4(e,n),l=u=>{const d=u.currentTarget;if(!KT(u)||YT.has(u))return;th.add(d),n.stopPropagation&&YT.add(u);const h=t(d,u),m={...i,capture:!0},y=(S,w)=>{window.removeEventListener("pointerup",g,m),window.removeEventListener("pointercancel",j,m),th.has(d)&&th.delete(d),KT(S)&&typeof h=="function"&&h(S,{success:w})},g=S=>{y(S,d===window||d===document||n.useGlobalTarget||O4(d,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),eh(u)&&(u.addEventListener("focus",h=>vV(h,i)),!pV(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function VS(e){return N3(e)&&"ownerSVGElement"in e}const nh=new WeakMap;let mi;const _4=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:VS(r)&&"getBBox"in r?r.getBBox()[t]:r[n],xV=_4("inline","width","offsetWidth"),bV=_4("block","height","offsetHeight");function jV({target:e,borderBoxSize:t}){var n;(n=nh.get(e))==null||n.forEach(r=>{r(e,{get width(){return xV(e,t)},get height(){return bV(e,t)}})})}function SV(e){e.forEach(jV)}function wV(){typeof ResizeObserver>"u"||(mi=new ResizeObserver(SV))}function AV(e,t){mi||wV();const n=S4(e);return n.forEach(r=>{let i=nh.get(r);i||(i=new Set,nh.set(r,i)),i.add(t),mi==null||mi.observe(r)}),()=>{n.forEach(r=>{const i=nh.get(r);i==null||i.delete(t),i!=null&&i.size||mi==null||mi.unobserve(r)})}}const rh=new Set;let Eo;function OV(){Eo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};rh.forEach(t=>t(e))},window.addEventListener("resize",Eo)}function _V(e){return rh.add(e),Eo||OV(),()=>{rh.delete(e),!rh.size&&typeof Eo=="function"&&(window.removeEventListener("resize",Eo),Eo=void 0)}}function XT(e,t){return typeof e=="function"?_V(e):AV(e,t)}function TV(e){return VS(e)&&e.tagName==="svg"}const EV=[...x4,It,Cr],NV=e=>EV.find(g4(e)),WT=()=>({translate:0,scale:1,origin:0,originPoint:0}),No=()=>({x:WT(),y:WT()}),ZT=()=>({min:0,max:0}),Ft=()=>({x:ZT(),y:ZT()}),CV=new WeakMap;function kp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function fu(e){return typeof e=="string"||Array.isArray(e)}const HS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],FS=["initial",...HS];function Dp(e){return kp(e.animate)||FS.some(t=>fu(e[t]))}function T4(e){return!!(Dp(e)||e.variants)}function MV(e,t,n){for(const r in t){const i=t[r],o=n[r];if(fn(i))e.addValue(r,i);else if(fn(o))e.addValue(r,Ho(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,Ho(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const C1={current:null},E4={current:!1},PV=typeof window<"u";function RV(){if(E4.current=!0,!!PV)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>C1.current=e.matches;e.addEventListener("change",t),t()}else C1.current=!1}const QT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let xh={};function N4(e){xh=e}function kV(){return xh}class DV{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:l,visualState:u},d={}){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=DS,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=d,this.blockInitialAnimation=!!l,this.isControllingVariants=Dp(n),this.isVariantNode=T4(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&&fn(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,CV.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:(E4.current||RV(),this.shouldReduceMotion=C1.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&&u4.has(t)&&this.current instanceof HTMLElement){const{factory:l,keyframes:u,times:d,ease:h,duration:m}=n.accelerate,y=new l4({element:this.current,name:t,keyframes:u,times:d,ease:h,duration:Yn(m)}),g=l(y);this.valueSubscriptions.set(t,()=>{g(),y.cancel()});return}const r=Ol.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 xh){const n=xh[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):Ft()}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<QT.length;r++){const i=QT[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=MV(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=Ho(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"&&(E3(r)||C3(r))?r=parseFloat(r):!NV(r)&&Cr.test(n)&&(r=j4(t,n)),this.setBaseTarget(t,fn(r)?r.get():r)),fn(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=$S(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&&!fn(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 _S),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){qS.render(this.render)}}class C4 extends DV{constructor(){super(...arguments),this.KeyframeResolver=cV}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;fn(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 M4({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zV(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 Yv(e){return e===void 0||e===1}function M1({scale:e,scaleX:t,scaleY:n}){return!Yv(e)||!Yv(t)||!Yv(n)}function is(e){return M1(e)||P4(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function P4(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function bh(e,t,n){const r=e-n,i=t*r;return n+i}function eE(e,t,n,r,i){return i!==void 0&&(e=bh(e,i,r)),bh(e,n,r)+t}function P1(e,t=0,n=1,r,i){e.min=eE(e.min,t,n,r,i),e.max=eE(e.max,t,n,r,i)}function R4(e,{x:t,y:n}){P1(e.x,t.translate,t.scale,t.originPoint),P1(e.y,n.translate,n.scale,n.originPoint)}const tE=.999999999999,nE=1.0000000000001;function $V(e,t,n,r=!1){var u;const i=n.length;if(!i)return;t.x=t.y=1;let o,l;for(let d=0;d<i;d++){o=n[d],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,R4(e,l)),r&&is(o.latestValues)&&ah(e,o.latestValues,(u=o.layout)==null?void 0:u.layoutBox))}t.x<nE&&t.x>tE&&(t.x=1),t.y<nE&&t.y>tE&&(t.y=1)}function Hr(e,t){e.min+=t,e.max+=t}function rE(e,t,n,r,i=.5){const o=ut(e.min,e.max,i);P1(e,t,n,o,r)}function aE(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ah(e,t,n){const r=n??e;rE(e.x,aE(t.x,r.x),t.scaleX,t.scale,t.originX),rE(e.y,aE(t.y,r.y),t.scaleY,t.scale,t.originY)}function k4(e,t){return M4(zV(e.getBoundingClientRect(),t))}function BV(e,t,n){const r=k4(e,n),{scroll:i}=t;return i&&(Hr(r.x,i.offset.x),Hr(r.y,i.offset.y)),r}const IV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qV=Al.length;function UV(e,t,n){let r="",i=!0;for(let l=0;l<qV;l++){const u=Al[l],d=e[u];if(d===void 0)continue;let h=!0;if(typeof d=="number")h=d===(u.startsWith("scale")?1:0);else{const m=parseFloat(d);h=u.startsWith("scale")?m===1:m===0}if(!h||n){const m=N1(d,gh[u]);if(!h){i=!1;const y=IV[u]||u;r+=`${y}(${m}) `}n&&(t[u]=m)}}const o=e.pathRotation;return o&&(i=!1,r+=`rotate(${N1(o,gh.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function GS(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let l=!1,u=!1;for(const d in t){const h=t[d];if(Ol.has(d)){l=!0;continue}else if(F3(d)){i[d]=h;continue}else{const m=N1(h,gh[d]);d.startsWith("origin")?(u=!0,o[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=UV(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:m=0}=o;r.transformOrigin=`${d} ${h} ${m}`}}function D4(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 iE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=iE(e,t.target.x),r=iE(e,t.target.y);return`${n}% ${r}%`}},VV={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,d=n.y.scale*t.y;i[0+l]/=u,i[1+l]/=d;const h=ut(u,d,.5);return typeof i[2+l]=="number"&&(i[2+l]/=h),typeof i[3+l]=="number"&&(i[3+l]/=h),o(i)}},R1={borderRadius:{...Pc,applyTo:[...IS]},borderTopLeftRadius:Pc,borderTopRightRadius:Pc,borderBottomLeftRadius:Pc,borderBottomRightRadius:Pc,boxShadow:VV};function L4(e,{layout:t,layoutId:n}){return Ol.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!R1[e]||e==="opacity")}function KS(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)(fn(r[u])||i&&fn(i[u])||L4(u,e)||((l=n==null?void 0:n.getValue(u))==null?void 0:l.liveStyle)!==void 0)&&(o[u]=r[u]);return o}function HV(e){return window.getComputedStyle(e)}class FV extends C4{constructor(){super(...arguments),this.type="html",this.renderInstance=D4}readValueFromInstance(t,n){var r;if(Ol.has(n))return(r=this.projection)!=null&&r.isProjecting?g1(n):fU(t,n);{const i=HV(t),o=(F3(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return k4(t,n)}build(t,n,r){GS(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return KS(t,n,r)}}const GV={offset:"stroke-dashoffset",array:"stroke-dasharray"},KV={offset:"strokeDashoffset",array:"strokeDasharray"};function YV(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?GV:KV;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const XV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function z4(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:l=0,...u},d,h,m){if(GS(e,u,h),d){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 XV)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&&YV(y,i,o,l,!1)}const $4=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"]),B4=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WV(e,t,n,r){D4(e,t,void 0,r);for(const i in t.attrs)e.setAttribute($4.has(i)?i:BS(i),t.attrs[i])}function I4(e,t,n){const r=KS(e,t,n);for(const i in e)if(fn(e[i])||fn(t[i])){const o=Al.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}class ZV extends C4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ft}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ol.has(n)){const r=b4(n);return r&&r.default||0}return n=$4.has(n)?n:BS(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return I4(t,n,r)}build(t,n,r){z4(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){WV(t,n,r,i)}mount(t){this.isSVGTag=B4(t.tagName),super.mount(t)}}const QV=FS.length;function q4(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?q4(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<QV;n++){const r=FS[n],i=e.props[r];(fu(i)||i===!1)&&(t[r]=i)}return t}function U4(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 JV=[...HS].reverse(),e9=HS.length;function t9(e){return t=>Promise.all(t.map(({animation:n,options:r})=>QU(e,n,r)))}function n9(e){let t=t9(e),n=sE(),r=!0,i=!1;const o=h=>(m,y)=>{var j;const g=gs(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=q4(e.parent)||{},g=[],j=new Set;let S={},w=1/0;for(let O=0;O<e9;O++){const T=JV[O],_=n[T],C=m[T]!==void 0?m[T]:y[T],A=fu(C),E=T===h?_.isActive:null;E===!1&&(w=O);let M=C===y[T]&&C!==m[T]&&A;if(M&&(r||i)&&e.manuallyAnimateOnMount&&(M=!1),_.protectedKeys={...S},!_.isActive&&E===null||!C&&!_.prevProp||kp(C)||typeof C=="boolean")continue;if(T==="exit"&&_.isActive&&E!==!0){_.prevResolvedValues&&(S={...S,..._.prevResolvedValues});continue}const D=r9(_.prevProp,C);let k=D||T===h&&_.isActive&&!M&&A||O>w&&A,B=!1;const q=Array.isArray(C)?C:[C];let $=q.reduce(o(T),{});E===!1&&($={});const{prevResolvedValues:G={}}=_,X={...G,...$},Y=Q=>{k=!0,j.has(Q)&&(B=!0,j.delete(Q)),_.needsAnimating[Q]=!0;const ae=e.getValue(Q);ae&&(ae.liveStyle=!1)};for(const Q in X){const ae=$[Q],oe=G[Q];if(S.hasOwnProperty(Q))continue;let z=!1;A1(ae)&&A1(oe)?z=!U4(ae,oe)||D:z=ae!==oe,z?ae!=null?Y(Q):j.add(Q):ae!==void 0&&j.has(Q)?Y(Q):_.protectedKeys[Q]=!0}_.prevProp=C,_.prevResolvedValues=$,_.isActive&&(S={...S,...$}),(r||i)&&e.blockInitialAnimation&&(k=!1);const L=M&&D;k&&(!L||B)&&g.push(...q.map(Q=>{const ae={type:T};if(typeof Q=="string"&&(r||i)&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,z=gs(oe,Q);if(oe.enteringChildren&&z){const{delayChildren:F}=z.transition||{};ae.delay=f4(oe.enteringChildren,e,F)}}return{animation:Q,options:ae}}))}if(j.size){const O={};if(typeof m.initial!="boolean"){const T=gs(e,Array.isArray(m.initial)?m.initial[0]:m.initial);T&&T.transition&&(O.transition=T.transition)}j.forEach(T=>{const _=e.getBaseTarget(T),C=e.getValue(T);C&&(C.liveStyle=!0),O[T]=_??null}),g.push({animation:O})}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 d(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:d,setAnimateFunction:l,getState:()=>n,reset:()=>{n=sE(),i=!0}}}function r9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!U4(t,e):!1}function ts(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sE(){return{animate:ts(!0),whileInView:ts(),whileHover:ts(),whileTap:ts(),whileDrag:ts(),whileFocus:ts(),exit:ts()}}function k1(e,t){e.min=t.min,e.max=t.max}function wr(e,t){k1(e.x,t.x),k1(e.y,t.y)}function oE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const V4=1e-4,a9=1-V4,i9=1+V4,H4=.01,s9=0-H4,o9=0+H4;function xn(e){return e.max-e.min}function l9(e,t,n){return Math.abs(e-t)<=n}function lE(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>=a9&&e.scale<=i9||isNaN(e.scale))&&(e.scale=1),(e.translate>=s9&&e.translate<=o9||isNaN(e.translate))&&(e.translate=0)}function Qc(e,t,n,r){lE(e.x,t.x,n.x,r?r.originX:void 0),lE(e.y,t.y,n.y,r?r.originY:void 0)}function cE(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 c9(e,t,n,r){cE(e.x,t.x,n.x,r==null?void 0:r.x),cE(e.y,t.y,n.y,r==null?void 0:r.y)}function uE(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 jh(e,t,n,r){uE(e.x,t.x,n.x,r==null?void 0:r.x),uE(e.y,t.y,n.y,r==null?void 0:r.y)}function fE(e,t,n,r,i){return e-=t,e=bh(e,1/n,r),i!==void 0&&(e=bh(e,1/i,r)),e}function u9(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=fE(e.min,t,n,u,i),e.max=fE(e.max,t,n,u,i)}function dE(e,t,[n,r,i],o,l){u9(e,t[n],t[r],t[i],t.scale,o,l)}const f9=["x","scaleX","originX"],d9=["y","scaleY","originY"];function hE(e,t,n,r){dE(e.x,t,f9,n?n.x:void 0,r?r.x:void 0),dE(e.y,t,d9,n?n.y:void 0,r?r.y:void 0)}function pE(e){return e.translate===0&&e.scale===1}function F4(e){return pE(e.x)&&pE(e.y)}function mE(e,t){return e.min===t.min&&e.max===t.max}function h9(e,t){return mE(e.x,t.x)&&mE(e.y,t.y)}function yE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function G4(e,t){return yE(e.x,t.x)&&yE(e.y,t.y)}function vE(e){return xn(e.x)/xn(e.y)}function gE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Vr(e){return[e("x"),e("y")]}function p9(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,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const m9=IS.length,xE=e=>typeof e=="string"?parseFloat(e):e,bE=e=>typeof e=="number"||xe.test(e);function y9(e,t,n,r,i,o){i?(e.opacity=ut(0,n.opacity??1,v9(r)),e.opacityExit=ut(t.opacity??1,0,g9(r))):o&&(e.opacity=ut(t.opacity??1,n.opacity??1,r));for(let l=0;l<m9;l++){const u=IS[l];let d=jE(t,u),h=jE(n,u);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||bE(d)===bE(h)?(e[u]=Math.max(ut(xE(d),xE(h),r),0),(Kr.test(h)||Kr.test(d))&&(e[u]+="%")):e[u]=h}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function jE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const v9=K4(0,.5,B3),g9=K4(.5,.95,pr);function K4(e,t,n){return r=>r<e?0:r>t?1:n(cu(e,t,r))}function x9(e,t,n){const r=fn(e)?e:Ho(e);return r.start(zS("",r,t,n)),r.animation}function du(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const b9=(e,t)=>e.depth-t.depth;class j9{constructor(){this.children=[],this.isDirty=!1}add(t){AS(this.children,t),this.isDirty=!0}remove(t){hh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(b9),this.isDirty=!1,this.children.forEach(t)}}function S9(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 ih(e){return fn(e)?e.get():e}class w9{constructor(){this.members=[]}add(t){AS(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&&(hh(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(hh(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 sh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Xv=["","X","Y","Z"],A9=1e3;let O9=0;function Wv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Y4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=y4(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&&Y4(r)}function X4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},u=t==null?void 0:t()){this.id=O9++,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(E9),this.nodes.forEach(k9),this.nodes.forEach(D9),this.nodes.forEach(N9)},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 d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new j9)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new _S),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=VS(l)&&!TV(l),this.instance=l;const{layoutId:u,layout:d,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&&(d||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=S9(g,250),sh.hasAnimatedSinceResize&&(sh.hasAnimatedSinceResize=!1,this.nodes.forEach(AE)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&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()||I9,{onLayoutAnimationStart:w,onLayoutAnimationComplete:b}=h.getProps(),O=!this.targetLayout||!G4(this.targetLayout,j),T=!y&&g;if(this.options.layoutRoot||this.resumeFrom||T||y&&(O||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...LS(S,"layout"),onPlay:w,onComplete:b};(h.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(m,T,_.path)}else y||AE(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(L9),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&&Y4(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:d}=this.options;if(u===void 0&&!d)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 d=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),d&&this.nodes.forEach(M9),this.nodes.forEach(SE);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(wE);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(P9),this.nodes.forEach(R9),this.nodes.forEach(_9),this.nodes.forEach(T9)):this.nodes.forEach(wE),this.clearAllSnapshots();const u=gn.now();un.delta=Zr(0,1e3/60,u-un.timestamp),un.timestamp=u,un.isProcessing=!0,qv.update.process(un),qv.preRender.process(un),qv.render.process(un),un.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(C9),this.sharedNodes.forEach(z9)}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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ft()),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 d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!F4(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;l&&this.instance&&(u||is(this.latestValues)||m)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),q9(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:l}=this.options;if(!l)return Ft();const u=l.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(U9))){const{scroll:m}=this.root;m&&(Hr(u.x,m.offset.x),Hr(u.y,m.offset.y))}return u}removeElementScroll(l){var d;const u=Ft();if(wr(u,l),(d=this.scroll)!=null&&d.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,d){var m,y;const h=d||Ft();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)),is(j.latestValues)&&ah(h,j.latestValues,(m=j.layout)==null?void 0:m.layoutBox)}return is(this.latestValues)&&ah(h,this.latestValues,(y=this.layout)==null?void 0:y.layoutBox),h}removeTransform(l){var d;const u=Ft();wr(u,l);for(let h=0;h<this.path.length;h++){const m=this.path[h];if(!is(m.latestValues))continue;let y;m.instance&&(M1(m.latestValues)&&m.updateSnapshot(),y=Ft(),wr(y,m.measurePageBox())),hE(u,m.latestValues,(d=m.snapshot)==null?void 0:d.layoutBox,y)}return is(this.latestValues)&&hE(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!==un.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 d=!!this.resumingFrom||this!==u;if(!(l||d&&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=un.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=Ft(),this.targetWithTransforms=Ft()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),c9(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),R4(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||M1(this.parent.latestValues)||P4(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,d){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ft(),this.relativeTargetOrigin=Ft(),jh(this.relativeTargetOrigin,u,d,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 d=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===un.timestamp&&(d=!1),d)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;$V(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=Ft());const{target:j}=l;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(oE(this.prevProjectionDelta.x,this.projectionDelta.x),oE(this.prevProjectionDelta.y,this.projectionDelta.y)),Qc(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==g||!gE(this.projectionDelta.x,this.prevProjectionDelta.x)||!gE(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 d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=No(),this.projectionDelta=No(),this.projectionDeltaWithTransform=No()}setAnimationOrigin(l,u=!1,d){const h=this.snapshot,m=h?h.latestValues:{},y={...this.latestValues},g=No();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const j=Ft(),S=h?h.source:void 0,w=this.layout?this.layout.source:void 0,b=S!==w,O=this.getStack(),T=!O||O.members.length<=1,_=!!(b&&!T&&this.options.crossfade===!0&&!this.path.some(B9));this.animationProgress=0;let C;const A=d==null?void 0:d.interpolateProjection(l);this.mixTargetDelta=E=>{const M=E/1e3,D=A==null?void 0:A(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):(OE(g.x,l.x,M),OE(g.y,l.y,M)),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jh(j,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),$9(this.relativeTarget,this.relativeTargetOrigin,j,M),C&&h9(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Ft()),wr(C,this.relativeTarget)),b&&(this.animationValues=y,y9(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,d,h;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(h=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||h.stop(),this.pendingAnimation&&(_i(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{sh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ho(0)),this.motionValue.jump(0,!1),this.currentAnimation=x9(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(A9),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:h,latestValues:m}=l;if(!(!u||!d||!h)){if(this!==l&&this.layout&&h&&W4(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Ft();const y=xn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const g=xn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+g}wr(u,d),ah(u,m),Qc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new w9),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:d}={}){const h=this.getStack();h&&h.promote(this,d),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:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const h={};d.z&&Wv("z",l,h,this.animationValues);for(let m=0;m<Xv.length;m++)Wv(`rotate${Xv[m]}`,l,h,this.animationValues),Wv(`skew${Xv[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 d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=ih(u==null?void 0:u.pointerEvents)||"",l.transform=d?d(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=ih(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!is(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=p9(this.projectionDeltaWithTransform,this.treeScale,m);d&&(y=d(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 R1){if(m[S]===void 0)continue;const{correct:w,applyTo:b,isCSSVariable:O}=R1[S],T=y==="none"?m[S]:w(m[S],h);if(b){const _=b.length;for(let C=0;C<_;C++)l[b[C]]=T}else O?this.options.visualElement.renderState.vars[S]=T:l[S]=T}this.options.layoutId&&(l.pointerEvents=h===this?ih(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(SE),this.root.sharedNodes.clear()}}}function _9(e){e.updateLayout()}function T9(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";k1(l?t.measuredBox[y]:t.layoutBox[y],r[y])}else W4(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=No();Qc(u,r,t.layoutBox);const d=No();l?Qc(d,e.applyTransform(i,!0),t.measuredBox):Qc(d,r,t.layoutBox);const h=!F4(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=Ft();jh(w,t.layoutBox,g.layoutBox,S);const b=Ft();jh(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:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function E9(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 N9(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function C9(e){e.clearSnapshot()}function SE(e){e.clearMeasurements()}function M9(e){e.isLayoutDirty=!0,e.updateLayout()}function wE(e){e.isLayoutDirty=!1}function P9(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function R9(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function AE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function k9(e){e.resolveTargetDelta()}function D9(e){e.calcProjection()}function L9(e){e.resetSkewAndRotation()}function z9(e){e.removeLeadSnapshot()}function OE(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 _E(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function $9(e,t,n,r){_E(e.x,t.x,n.x,r),_E(e.y,t.y,n.y,r)}function B9(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const I9={duration:.45,ease:[.4,0,.1,1]},TE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),EE=TE("applewebkit/")&&!TE("chrome/")?Math.round:pr;function NE(e){e.min=EE(e.min),e.max=EE(e.max)}function q9(e){NE(e.x),NE(e.y)}function W4(e,t,n){return e==="position"||e==="preserve-aspect"&&!l9(vE(t),vE(n),.2)}function U9(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const V9=X4({attachResizeListener:(e,t)=>du(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}),Zv={current:void 0},Z4=X4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zv.current){const e=new V9({});e.mount(window),e.setOptions({layoutScroll:!0}),Zv.current=e}return Zv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),YS=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function CE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H9(...e){return t=>{let n=!1;const r=e.map(i=>{const o=CE(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():CE(e[i],null)}}}}function F9(...e){return P.useCallback(H9(...e),e)}class G9 extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(eh(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=eh(r)&&r.offsetWidth||0,o=eh(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 K9({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){var g;const l=P.useId(),u=P.useRef(null),d=P.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=P.useContext(YS),m=((g=e.props)==null?void 0:g.ref)??(e==null?void 0:e.ref),y=F9(u,m);return P.useInsertionEffect(()=>{const{width:j,height:S,top:w,left:b,right:O,bottom:T,direction:_}=d.current;if(t||o===!1||!u.current||!j||!S)return;const C=_==="rtl",A=n==="left"?C?`right: ${O}`:`left: ${b}`:C?`left: ${b}`:`right: ${O}`,E=r==="bottom"?`bottom: ${T}`:`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;
${A}px !important;
${E}px !important;
}
`),()=>{var k;(k=u.current)==null||k.removeAttribute("data-motion-pop-id"),D.contains(M)&&D.removeChild(M)}},[t]),f.jsx(G9,{isPresent:t,childRef:u,sizeRef:d,pop:o,children:o===!1?e:P.cloneElement(e,{ref:y})})}const Y9=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:l,anchorX:u,anchorY:d,root:h})=>{const m=SS(X9),y=P.useId(),g=P.useRef(n),j=P.useRef(r);wS(()=>{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 O of m.values())if(!O)return;r&&r()},register:b=>(m.set(b,!1),()=>{var O;m.delete(b),!g.current&&!m.size&&((O=j.current)==null||O.call(j))})}),[n,m,r]);return o&&S&&(w={...w}),P.useMemo(()=>{m.forEach((b,O)=>m.set(O,!1))},[n]),P.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=f.jsx(K9,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:d,root:h,children:e}),f.jsx(Pp.Provider,{value:w,children:e})};function X9(){return new Map}function Q4(e=!0){const t=P.useContext(Pp);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 Rd=e=>e.key||"";function ME(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const Lo=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",anchorY:d="top",root:h})=>{const[m,y]=Q4(l),g=P.useMemo(()=>ME(e),[e]),j=l&&!m?[]:g.map(Rd),S=P.useRef(!0),w=P.useRef(g),b=SS(()=>new Map),O=P.useRef(new Set),[T,_]=P.useState(g),[C,A]=P.useState(g);wS(()=>{S.current=!1,w.current=g;for(let D=0;D<C.length;D++){const k=Rd(C[D]);j.includes(k)?(b.delete(k),O.current.delete(k)):b.get(k)!==!0&&b.set(k,!1)}},[C,j.length,j.join("-")]);const E=[];if(g!==T){let D=[...g];for(let k=0;k<C.length;k++){const B=C[k],q=Rd(B);j.includes(q)||(D.splice(k,0,B),E.push(B))}return o==="wait"&&E.length&&(D=E),A(ME(D)),_(g),null}const{forceRender:M}=P.useContext(jS);return f.jsx(f.Fragment,{children:C.map(D=>{const k=Rd(D),B=l&&!m?!1:g===C||j.includes(k),q=()=>{if(O.current.has(k))return;if(b.has(k))O.current.add(k),b.set(k,!0);else return;let $=!0;b.forEach(G=>{G||($=!1)}),$&&(M==null||M(),A(w.current),l&&(y==null||y()),r&&r())};return f.jsx(Y9,{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:d,children:D},k)})})},J4=P.createContext({strict:!1}),PE={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 RE=!1;function W9(){if(RE)return;const e={};for(const t in PE)e[t]={isEnabled:n=>PE[t].some(r=>!!n[r])};N4(e),RE=!0}function eL(){return W9(),kV()}function Z9(e){const t=eL();for(const n in e)t[n]={...t[n],...e[n]};N4(t)}const Q9=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 Sh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Q9.has(e)}let tL=e=>!Sh(e);function J9(e){typeof e=="function"&&(tL=t=>t.startsWith("on")?!Sh(t):e(t))}try{J9(require("@emotion/is-prop-valid").default)}catch{}function e7(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||fn(e[i])||(tL(i)||n===!0&&Sh(i)||!t&&!Sh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Lp=P.createContext({});function t7(e,t){if(Dp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fu(n)?n:void 0,animate:fu(r)?r:void 0}}return e.inherit!==!1?t:{}}function n7(e){const{initial:t,animate:n}=t7(e,P.useContext(Lp));return P.useMemo(()=>({initial:t,animate:n}),[kE(t),kE(n)])}function kE(e){return Array.isArray(e)?e.join(" "):e}const XS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nL(e,t,n){for(const r in t)!fn(t[r])&&!L4(r,n)&&(e[r]=t[r])}function r7({transformTemplate:e},t){return P.useMemo(()=>{const n=XS();return GS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function a7(e,t){const n=e.style||{},r={};return nL(r,n,e),Object.assign(r,r7(e,t)),r}function i7(e,t){const n={},r=a7(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 rL=()=>({...XS(),attrs:{}});function s7(e,t,n,r){const i=P.useMemo(()=>{const o=rL();return z4(o,t,B4(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};nL(o,e.style,e),i.style={...o,...i.style}}return i}const o7=["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 WS(e){return typeof e!="string"||e.includes("-")?!1:!!(o7.indexOf(e)>-1||/[A-Z]/u.test(e))}function l7(e,t,n,{latestValues:r},i,o=!1,l){const d=(l??WS(e)?s7:i7)(t,r,i,e),h=e7(t,typeof e=="string",o),m=e!==P.Fragment?{...h,...d,ref:n}:{},{children:y}=t,g=P.useMemo(()=>fn(y)?y.get():y,[y]);return P.createElement(e,{...m,children:g})}function c7({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:u7(n,r,i,e),renderState:t()}}function u7(e,t,n,r){const i={},o=r(e,{});for(const g in o)i[g]=ih(o[g]);let{initial:l,animate:u}=e;const d=Dp(e),h=T4(e);t&&h&&!d&&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"&&!kp(y)){const g=Array.isArray(y)?y:[y];for(let j=0;j<g.length;j++){const S=$S(e,g[j]);if(S){const{transitionEnd:w,transition:b,...O}=S;for(const T in O){let _=O[T];if(Array.isArray(_)){const C=m?_.length-1:0;_=_[C]}_!==null&&(i[T]=_)}for(const T in w)i[T]=w[T]}}}return i}const aL=e=>(t,n)=>{const r=P.useContext(Lp),i=P.useContext(Pp),o=()=>c7(e,t,r,i);return n?o():SS(o)},f7=aL({scrapeMotionValuesFromProps:KS,createRenderState:XS}),d7=aL({scrapeMotionValuesFromProps:I4,createRenderState:rL}),h7=Symbol.for("motionComponentSymbol");function p7(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 d=l(o);typeof d=="function"&&(i.current=d)}else i.current?(i.current(),i.current=null):l(o);else l&&(l.current=o)},[t])}const iL=P.createContext({});function _o(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function m7(e,t,n,r,i,o){var _,C;const{visualElement:l}=P.useContext(Lp),u=P.useContext(J4),d=P.useContext(Pp),h=P.useContext(YS),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:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:o}),j.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));const S=g.current,w=P.useContext(iL);S&&!S.projection&&i&&(S.type==="html"||S.type==="svg")&&y7(g.current,n,i,w);const b=P.useRef(!1);P.useInsertionEffect(()=>{S&&b.current&&S.update(n,d)});const O=n[m4],T=P.useRef(!!O&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,O))&&((C=window.MotionHasOptimisedAnimation)==null?void 0:C.call(window,O)));return wS(()=>{j.current=!0,S&&(b.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),T.current&&S.animationState&&S.animationState.animateChanges())}),P.useEffect(()=>{S&&(!T.current&&S.animationState&&S.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,O)}),T.current=!1),S.enteringChildren=void 0)}),S}function y7(e,t,n,r){const{layoutId:i,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:h,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:sL(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||u&&_o(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:d,layoutRoot:h,layoutAnchor:m})}function sL(e){if(e)return e.options.allowProjection!==!1?e.projection:sL(e.parent)}function Qv(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Z9(r);const o=n?n==="svg":WS(e),l=o?d7:f7;function u(h,m){let y;const g={...P.useContext(YS),...h,layoutId:v7(h)},{isStatic:j}=g,S=n7(h),w=l(h,j);if(!j&&typeof window<"u"){g7();const b=x7(g);y=b.MeasureLayout,S.visualElement=m7(e,w,g,i,b.ProjectionNode,o)}return f.jsxs(Lp.Provider,{value:S,children:[y&&S.visualElement?f.jsx(y,{visualElement:S.visualElement,...g}):null,l7(e,h,p7(w,S.visualElement,m),w,j,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=P.forwardRef(u);return d[h7]=e,d}function v7({layoutId:e}){const t=P.useContext(jS).id;return t&&e!==void 0?t+"-"+e:e}function g7(e,t){P.useContext(J4).strict}function x7(e){const t=eL(),{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 b7(e,t){if(typeof Proxy>"u")return Qv;const n=new Map,r=(o,l)=>Qv(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,Qv(l,void 0,e,t)),n.get(l))})}const j7=(e,t)=>t.isSVG??WS(e)?new ZV(t):new FV(t,{allowProjection:e!==P.Fragment});class S7 extends Ci{constructor(t){super(t),t.animationState||(t.animationState=n9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();kp(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 w7=0;class A7 extends Ci{constructor(){super(...arguments),this.id=w7++,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 d=gs(this.node,l,u);if(d){const{transition:h,transitionEnd:m,...y}=d;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 O7={animation:{Feature:S7},exit:{Feature:A7}};function Ju(e){return{point:{x:e.pageX,y:e.pageY}}}const _7=e=>t=>US(t)&&e(t,Ju(t));function Jc(e,t,n,r){return du(e,t,_7(n),r)}const oL=({current:e})=>e?e.ownerDocument.defaultView:null,DE=(e,t)=>Math.abs(e-t);function T7(e,t){const n=DE(e.x,t.x),r=DE(e.y,t.y);return Math.sqrt(n**2+r**2)}const LE=new Set(["auto","scroll"]);class lL{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=kd(this.lastRawMoveEventInfo,this.transformPagePoint));const S=Jv(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=T7(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:O}=S,{timestamp:T}=un;this.history.push({...O,timestamp:T});const{onStart:_,onMove:C}=this.handlers;w||(_&&_(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,S)},this.handlePointerMove=(S,w)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=kd(w,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(S,w)=>{this.end();const{onEnd:b,onSessionEnd:O,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Jv(S.type==="pointercancel"?this.lastMoveEventInfo:kd(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(S,_),O&&O(S,_)},!US(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=i||window;const d=Ju(t),h=kd(d,this.transformPagePoint),{point:m}=h,{timestamp:y}=un;this.history=[{...m,timestamp:y}];const{onSessionStart:g}=n;g&&g(t,Jv(h,this.history));const j={passive:!0,capture:!0};this.removeListeners=Wu(Jc(this.contextWindow,"pointermove",this.handlePointerMove,j),Jc(this.contextWindow,"pointerup",this.handlePointerUp,j),Jc(this.contextWindow,"pointercancel",this.handlePointerUp,j)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(LE.has(r.overflowX)||LE.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 kd(e,t){return t?{point:t(e.point)}:e}function zE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jv({point:e},t){return{point:e,delta:zE(e,cL(t)),offset:zE(e,E7(t)),velocity:N7(t,.1)}}function E7(e){return e[0]}function cL(e){return e[e.length-1]}function N7(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=cL(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 C7(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 $E(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 M7(e,{top:t,left:n,bottom:r,right:i}){return{x:$E(e.x,n,i),y:$E(e.y,t,r)}}function BE(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 P7(e,t){return{x:BE(e.x,t.x),y:BE(e.y,t.y)}}function R7(e,t){let n=.5;const r=xn(e),i=xn(t);return i>r?n=cu(t.min,t.max-r,e.min):r>i&&(n=cu(e.min,e.max-i,t.min)),Zr(0,1,n)}function k7(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 D1=.35;function D7(e=D1){return e===!1?e=0:e===!0&&(e=D1),{x:IE(e,"left","right"),y:IE(e,"top","bottom")}}function IE(e,t,n){return{min:qE(e,t),max:qE(e,n)}}function qE(e,t){return typeof e=="number"?e:e[t]||0}const L7=new WeakMap;class z7{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=Ft(),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(Ju(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=uV(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(O=>{let T=this.getAxisMotionValue(O).get()||0;if(Kr.test(T)){const{projection:_}=this.visualElement;if(_&&_.layout){const C=_.layout.layoutBox[O];C&&(T=xn(C)*(parseFloat(T)/100))}}this.originPoint[O]=T}),w&&ft.update(()=>w(y,g),!1,!0),O1(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:O}=g;if(S&&this.currentDirection===null){this.currentDirection=B7(O),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",g.point,O),this.updateAxis("y",g.point,O),this.visualElement.render(),b&&ft.update(()=>b(y,g),!1,!0)},d=(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 lL(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:oL(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||!Dd(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=C7(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&&_o(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=M7(r.layoutBox,t):this.constraints=!1,this.elastic=D7(n),i!==this.constraints&&!_o(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Vr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=k7(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!_o(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=BV(r,i.root,this.visualElement.getTransformPagePoint());let l=P7(i.layout.layoutBox,o);if(n){const u=n(LV(l));this.hasMutatedConstraints=!!u,u&&(l=M4(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},h=Vr(m=>{if(!Dd(m,n,this.currentDirection))return;let y=d&&d[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 O1(this.visualElement,t),r.start(zS(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(!Dd(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],d=o.get()||0;o.set(t[n]-ut(l,u,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!_o(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 d=u.get();i[l]=R7({min:d,max:d},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(!Dd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];u.set(ut(d,h,i[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;L7.set(this.visualElement,this);const t=this.visualElement.current,n=Jc(t,"pointerdown",h=>{const{drag:m,dragListener:y=!0}=this.getProps(),g=h.target,j=g!==t&&yV(g);m&&y&&!j&&this.start(h)});let r;const i=()=>{const{dragConstraints:h}=this.getProps();_o(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=$7(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=du(window,"resize",()=>this.scalePositionWithinConstraints()),d=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(),d&&d(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=D1,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function UE(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function $7(e,t,n){const r=XT(e,UE(n)),i=XT(t,UE(n));return()=>{r(),i()}}function Dd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function B7(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class I7 extends Ci{constructor(t){super(t),this.removeGroupControls=pr,this.removeListeners=pr,this.controls=new z7(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 eg=e=>(t,n)=>{e&&ft.update(()=>e(t,n),!1,!0)};class q7 extends Ci{constructor(){super(...arguments),this.removePointerDownListener=pr}onPointerDown(t){this.session=new lL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oL(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:eg(t),onStart:eg(n),onMove:eg(r),onEnd:(o,l)=>{delete this.session,i&&ft.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=Jc(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 tg=!1;class U7 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),tg&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sh.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}),tg=!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(),qS.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;tg=!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 uL(e){const[t,n]=Q4(),r=P.useContext(jS);return f.jsx(U7,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(iL),isPresent:t,safeToRemove:n})}const V7={pan:{Feature:q7},drag:{Feature:I7,ProjectionNode:Z4,MeasureLayout:uL}};function VE(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,Ju(t)))}class H7 extends Ci{mount(){const{current:t}=this.node;t&&(this.unmount=dV(t,(n,r)=>(VE(this.node,r,"Start"),i=>VE(this.node,i,"End"))))}unmount(){}}class F7 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=Wu(du(this.node.current,"focus",()=>this.onFocus()),du(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function HE(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,Ju(t)))}class G7 extends Ci{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=gV(t,(i,o)=>(HE(this.node,o,"Start"),(l,{success:u})=>HE(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const L1=new WeakMap,ng=new WeakMap,K7=e=>{const t=L1.get(e.target);t&&t(e)},Y7=e=>{e.forEach(K7)};function X7({root:e,...t}){const n=e||document;ng.has(n)||ng.set(n,{});const r=ng.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Y7,{root:e,...t})),r[i]}function W7(e,t,n){const r=X7(t);return L1.set(e,n),r.observe(e),()=>{L1.delete(e),r.unobserve(e)}}const Z7={some:0,all:1};class Q7 extends Ci{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var d;(d=this.stopObserver)==null||d.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:Z7[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=W7(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(J7(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function J7({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const eH={inView:{Feature:Q7},tap:{Feature:G7},focus:{Feature:F7},hover:{Feature:H7}},tH={layout:{ProjectionNode:Z4,MeasureLayout:uL}},nH={...O7,...eH,...V7,...tH},en=b7(nH,j7),ZS=T3(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 rH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fL=(...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 aH={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 iH=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...u},d)=>P.createElement("svg",{ref:d,...aH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fL("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(iH,{ref:o,iconNode:t,className:fL(`lucide-${rH(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 sH=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 oH=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 lH=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 z1=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 $1=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 zo=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 Fo=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 QS=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 cH=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 uH=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 fH=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 dH=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 hH=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 pH=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 mH=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 zp=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 _l=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 FE=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 Go=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 yH=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 eu=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 GE=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 vH=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 dL=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 gH=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 ef=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 xH=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 bH=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 oh=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 JS=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 KE=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 jH=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 SH=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 wH=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 Ss=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 AH=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 ew=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 OH=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 _H=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 TH=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 EH=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 NH=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 CH=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 MH=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 PH=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 YE=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 XE=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 WE=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 RH=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @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("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 Cs=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 DH=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 LH=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 zH=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 $H=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 lh=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 BH=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 tw=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 IH=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 hL=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 nw=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 B1=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 wh=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 rw=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 pL=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 aw=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 mL(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=mL(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=mL(e))&&(r&&(r+=" "),r+=t);return r}const iw="-",qH=e=>{const t=VH(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(iw);return u[0]===""&&u.length!==1&&u.shift(),yL(u,t)||UH(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},yL=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?yL(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(iw);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},ZE=/^\[(.+)\]$/,UH=e=>{if(ZE.test(e)){const t=ZE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},VH=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return FH(Object.entries(e.classGroups),n).forEach(([o,l])=>{I1(l,r,o,t)}),r},I1=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:QE(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(HH(i)){I1(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{I1(l,QE(t,o),n,r)})})},QE=(e,t)=>{let n=e;return t.split(iw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},HH=e=>e.isThemeGetter,FH=(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,GH=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)}}},vL="!",KH=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,l=u=>{const d=[];let h=0,m=0,y;for(let b=0;b<u.length;b++){let O=u[b];if(h===0){if(O===i&&(r||u.slice(b,b+o)===t)){d.push(u.slice(m,b)),m=b+o;continue}if(O==="/"){y=b;continue}}O==="["?h++:O==="]"&&h--}const g=d.length===0?u:u.substring(m),j=g.startsWith(vL),S=j?g.substring(1):g,w=y&&y>m?y-m:void 0;return{modifiers:d,hasImportantModifier:j,baseClassName:S,maybePostfixModifierPosition:w}};return n?u=>n({className:u,parseClassName:l}):l},YH=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},XH=e=>({cache:GH(e.cacheSize),parseClassName:KH(e),...qH(e)}),WH=/\s+/,ZH=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],l=e.trim().split(WH);let u="";for(let d=l.length-1;d>=0;d-=1){const h=l[d],{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=YH(m).join(":"),O=y?b+vL:b,T=O+w;if(o.includes(T))continue;o.push(T);const _=i(w,S);for(let C=0;C<_.length;++C){const A=_[C];o.push(O+A)}u=h+(u.length>0?" "+u:u)}return u};function QH(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gL(t))&&(r&&(r+=" "),r+=n);return r}const gL=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gL(e[r]))&&(n&&(n+=" "),n+=t);return n};function JH(e,...t){let n,r,i,o=l;function l(d){const h=t.reduce((m,y)=>y(m),e());return n=XH(h),r=n.cache.get,i=n.cache.set,o=u,u(d)}function u(d){const h=r(d);if(h)return h;const m=ZH(d,n);return i(d,m),m}return function(){return o(QH.apply(null,arguments))}}const xt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xL=/^\[(?:([a-z-]+):)?(.+)\]$/i,eF=/^\d+\/\d+$/,tF=new Set(["px","full","screen"]),nF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rF=/\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$/,aF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ja=e=>$o(e)||tF.has(e)||eF.test(e),hi=e=>Tl(e,"length",pF),$o=e=>!!e&&!Number.isNaN(Number(e)),rg=e=>Tl(e,"number",$o),Rc=e=>!!e&&Number.isInteger(Number(e)),oF=e=>e.endsWith("%")&&$o(e.slice(0,-1)),Le=e=>xL.test(e),pi=e=>nF.test(e),lF=new Set(["length","size","percentage"]),cF=e=>Tl(e,lF,bL),uF=e=>Tl(e,"position",bL),fF=new Set(["image","url"]),dF=e=>Tl(e,fF,yF),hF=e=>Tl(e,"",mF),kc=()=>!0,Tl=(e,t,n)=>{const r=xL.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pF=e=>rF.test(e)&&!aF.test(e),bL=()=>!1,mF=e=>iF.test(e),yF=e=>sF.test(e),vF=()=>{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"),d=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"),O=xt("opacity"),T=xt("padding"),_=xt("saturate"),C=xt("scale"),A=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],G=()=>["",ja,hi],X=()=>["auto",$o,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=()=>[$o,Le];return{cacheSize:500,separator:":",theme:{colors:[kc],spacing:[ja,hi],blur:["none","",pi,Le],brightness:z(),borderColor:[e],borderRadius:["none","","full",pi,Le],borderSpacing:$(),borderWidth:G(),contrast:z(),grayscale:ae(),hueRotate:z(),invert:ae(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[oF,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",Rc,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",Rc,Le]}],"grid-cols":[{"grid-cols":[kc]}],"col-start-end":[{col:["auto",{span:["full",Rc,Le]},Le]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[kc]}],"row-start-end":[{row:["auto",{span:[Rc,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:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],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",rg]}],"font-family":[{font:[kc]}],"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",$o,rg]}],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":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"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":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),uF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dF]}],"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":[O]}],"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":[O]}],"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:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[ja,hi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pi,hF]}],"shadow-color":[{shadow:[kc]}],opacity:[{opacity:[O]}],"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:[d]}],"drop-shadow":[{"drop-shadow":["","none",pi,Le]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[y]}],saturate:[{saturate:[_]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"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:[Rc,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,rg]}],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"]}}},gF=JH(vF);function Ot(...e){return gF(Pe(e))}function _e(e,t="SEK"){return new Intl.NumberFormat("sv-SE",{style:"currency",currency:t,maximumFractionDigits:0}).format(e)}function JE(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 sw(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 xF(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}const bF=[{path:"/",label:"Briefing",icon:MH},{path:"/dashboard",label:"Dashboard",icon:jH},{path:"/agents",label:"Agents",icon:zo},{path:"/crm",label:"CRM",icon:Pa},{path:"/sales",label:"Sales",icon:Mr},{path:"/finance",label:"Finance",icon:rw},{path:"/hr",label:"HR",icon:Fo},{path:"/legal",label:"Legal",icon:bi},{path:"/marketing",label:"Marketing",icon:ew},{path:"/support",label:"Support",icon:JS},{path:"/automation",label:"Automation",icon:aw}];function jF(){const{sidebarOpen:e,toggleSidebar:t}=ZS(),n=Lr();return f.jsxs(f.Fragment,{children:[f.jsx(Lo,{children:e&&f.jsx(en.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})}),f.jsxs(en.aside,{initial:!1,animate:{width:e?240:72},transition:{duration:.2,ease:"easeOut"},className:Ot("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:[f.jsxs("div",{className:"h-16 flex items-center justify-between shrink-0",children:[f.jsxs("div",{className:"flex items-center gap-2.5 overflow-hidden",children:[f.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center shrink-0",children:f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 32 32",fill:"none",children:f.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})}),f.jsx(Lo,{children:e&&f.jsx(en.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"})})]}),f.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?f.jsx(pH,{size:14}):f.jsx(mH,{size:14})})]}),f.jsx("nav",{className:"flex-1 py-4 space-y-0.5 overflow-y-auto",children:bF.map(r=>{const i=n.pathname===r.path||r.path!=="/"&&n.pathname.startsWith(r.path),o=r.icon;return f.jsxs(O3,{to:r.path,onClick:()=>{window.innerWidth<1024&&t()},className:Ot("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&&f.jsx(en.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"}}),f.jsx(o,{size:18,strokeWidth:i?2:1.5}),f.jsx(Lo,{children:e&&f.jsx(en.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:Ot("text-sm font-medium whitespace-nowrap",i?"text-primary":"text-text-secondary"),children:r.label})})]},r.path)})})]})]})}const eN=[{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 SF(){const{user:e,logout:t}=Sl(),{toggleSidebar:n}=ZS(),r=Np(),[i,o]=P.useState(!1),[l,u]=P.useState(!1),d=()=>{const m=new Date().getHours();return m<12?"Good morning":m<17?"Good afternoon":"Good evening"},h=eN.filter(m=>!m.read).length;return f.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:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.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:f.jsx(OH,{size:18})}),f.jsxs("div",{children:[f.jsxs("h1",{className:"text-base font-semibold text-text-primary",children:[d(),e?`, ${e.name||"Erik Svensson"}`:", Erik Svensson"]}),f.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"})})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.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:[f.jsx(Cs,{size:15}),f.jsx("span",{className:"ml-2 text-sm",children:"Search..."}),f.jsx("kbd",{className:"ml-6 px-1.5 py-0.5 text-[10px] font-medium bg-surface rounded border border-border",children:"⌘K"})]}),f.jsxs("div",{className:"relative",children:[f.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:[f.jsx($1,{size:17}),h>0&&f.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 bg-danger rounded-full"})]}),f.jsx(Lo,{children:i&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>o(!1)}),f.jsxs(en.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:[f.jsxs("div",{className:"px-4 py-3 border-b border-border/60 flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Notifications"}),f.jsx("span",{className:"text-xs text-primary font-medium cursor-pointer",children:"Mark all read"})]}),f.jsx("div",{className:"max-h-80 overflow-y-auto",children:eN.map(m=>f.jsx("div",{className:Ot("px-4 py-3 hover:bg-bg/60 transition-colors cursor-pointer",!m.read&&"bg-primary-light/30"),children:f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:Ot("w-2 h-2 rounded-full mt-1.5 shrink-0",m.read?"bg-transparent":"bg-primary")}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:m.title}),f.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:m.description}),f.jsx("p",{className:"text-[11px] text-text-secondary/60 mt-1",children:sw(m.time)})]})]})},m.id))})]})]})})]}),f.jsxs("div",{className:"relative",children:[f.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:[f.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?xF(e.name):"?"}),f.jsx(hH,{size:14,className:"text-text-secondary"})]}),f.jsx(Lo,{children:l&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>u(!1)}),f.jsxs(en.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:[f.jsxs("div",{className:"px-4 py-3 border-b border-border/60",children:[f.jsx("p",{className:"text-sm font-semibold text-text-primary",children:(e==null?void 0:e.name)||"User"}),f.jsx("p",{className:"text-xs text-text-secondary",children:(e==null?void 0:e.email)||"user@amos.com"})]}),f.jsxs("div",{className:"py-1",children:[f.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:[f.jsx(wh,{size:15}),"Min Profil"]}),f.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:[f.jsx(QS,{size:15}),"Byt Verksamhet"]}),f.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:[f.jsx(LH,{size:15}),"Inställningar"]}),f.jsx("div",{className:"border-t border-border/60 mt-1 pt-1",children:f.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:[f.jsx(wH,{size:15}),"Sign out"]})})]})]})]})})]})]})]})}function wF(){const{sidebarOpen:e}=ZS();return f.jsxs("div",{className:"min-h-screen bg-bg",children:[f.jsx(jF,{}),f.jsxs("div",{className:Ot("transition-all duration-200 ease-out",e?"lg:ml-[240px]":"lg:ml-[72px]"),children:[f.jsx(SF,{}),f.jsx("main",{className:"p-6 lg:p-10",children:f.jsx(xI,{})})]})]})}const q1=P.forwardRef(({label:e,error:t,icon:n,className:r,...i},o)=>f.jsxs("div",{className:"w-full",children:[e&&f.jsx("label",{className:"block text-sm font-medium text-text-primary mb-1.5",children:e}),f.jsxs("div",{className:"relative",children:[n&&f.jsx("div",{className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-secondary",children:n}),f.jsx("input",{ref:o,className:Ot("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&&f.jsx("p",{className:"mt-1.5 text-xs text-danger",children:t})]}));q1.displayName="Input";function Yt({children:e,variant:t="primary",size:n="md",loading:r=!1,icon:i,className:o,disabled:l,...u}){const d={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 f.jsxs("button",{className:Ot("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]",d[t],h[n],o),disabled:l||r,...u,children:[r?f.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):i,e]})}const AF="/api/v1";function OF(){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 Ld(e,t,n){const r=`${AF}${t}`,i={"Content-Type":"application/json"},o=OF();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=>Ld("GET",e),post:(e,t)=>Ld("POST",e,t),put:(e,t)=>Ld("PUT",e,t),delete:e=>Ld("DELETE",e)},tN={login:(e,t)=>rt.post("/auth/login",{email:e,password:t}),me:()=>rt.get("/auth/me")},ch={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}`)},Co={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)},ss={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")},ag={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||""}`)},nN={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 _F(){const e=Np(),{login:t}=Sl(),[n,r]=P.useState(""),[i,o]=P.useState(""),[l,u]=P.useState(!1),[d,h]=P.useState(""),[m,y]=P.useState(!1),g=async j=>{var S;j.preventDefault(),h(""),y(!0);try{const w=await tN.login(n,i);if(!w.ok){h("Invalid credentials");return}localStorage.setItem("amos_token",w.token);const b=await tN.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 f.jsx("div",{className:"min-h-screen bg-bg flex items-center justify-center p-4",children:f.jsxs(en.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"w-full max-w-[400px]",children:[f.jsx("div",{className:"flex items-center justify-center mb-10",children:f.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary flex items-center justify-center",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:f.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})})}),f.jsxs("div",{className:"text-center mb-8",children:[f.jsx("h1",{className:"text-2xl font-semibold text-text-primary",children:"Welcome back"}),f.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Sign in to your AMOS account"})]}),f.jsxs("form",{onSubmit:g,className:"space-y-4",children:[f.jsx(q1,{label:"Email",type:"email",placeholder:"you@company.com",value:n,onChange:j=>r(j.target.value),icon:f.jsx(Ss,{size:16}),required:!0}),f.jsxs("div",{className:"relative",children:[f.jsx(q1,{label:"Password",type:l?"text":"password",placeholder:"Enter your password",value:i,onChange:j=>o(j.target.value),icon:f.jsx(SH,{size:16}),required:!0}),f.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?f.jsx(vH,{size:16}):f.jsx(dL,{size:16})})]}),d&&f.jsx(en.p,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"text-sm text-danger",children:d}),f.jsx(Yt,{type:"submit",size:"lg",loading:m,className:"w-full",children:"Sign in"})]})]})})}function rN({label:e,value:t,change:n,changeLabel:r,icon:i,index:o=0}){const l=n>0,u=n===0;return f.jsxs(en.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:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{className:"space-y-4",children:[f.jsx("p",{className:"text-sm text-text-secondary",children:e}),f.jsx("p",{className:"text-2xl md:text-3xl font-semibold text-text-primary tracking-tight",children:t})]}),f.jsx("div",{className:"w-10 h-10 rounded-xl bg-bg flex items-center justify-center text-text-secondary",children:i})]}),f.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[f.jsxs("span",{className:Ot("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?f.jsx(Mr,{size:12}):u?f.jsx(EH,{size:12}):f.jsx(nw,{size:12}),Math.abs(n),"%"]}),f.jsx("span",{className:"text-xs text-text-secondary",children:r})]})]})}var ig,aN;function Rn(){if(aN)return ig;aN=1;var e=Array.isArray;return ig=e,ig}var sg,iN;function jL(){if(iN)return sg;iN=1;var e=typeof Nd=="object"&&Nd&&Nd.Object===Object&&Nd;return sg=e,sg}var og,sN;function ea(){if(sN)return og;sN=1;var e=jL(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return og=n,og}var lg,oN;function tf(){if(oN)return lg;oN=1;var e=ea(),t=e.Symbol;return lg=t,lg}var cg,lN;function TF(){if(lN)return cg;lN=1;var e=tf(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(l){var u=n.call(l,i),d=l[i];try{l[i]=void 0;var h=!0}catch{}var m=r.call(l);return h&&(u?l[i]=d:delete l[i]),m}return cg=o,cg}var ug,cN;function EF(){if(cN)return ug;cN=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ug=n,ug}var fg,uN;function za(){if(uN)return fg;uN=1;var e=tf(),t=TF(),n=EF(),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 fg=l,fg}var dg,fN;function $a(){if(fN)return dg;fN=1;function e(t){return t!=null&&typeof t=="object"}return dg=e,dg}var hg,dN;function El(){if(dN)return hg;dN=1;var e=za(),t=$a(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return hg=r,hg}var pg,hN;function ow(){if(hN)return pg;hN=1;var e=Rn(),t=El(),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 pg=i,pg}var mg,pN;function Mi(){if(pN)return mg;pN=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return mg=e,mg}var yg,mN;function lw(){if(mN)return yg;mN=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 d=e(u);return d==r||d==i||d==n||d==o}return yg=l,yg}var vg,yN;function NF(){if(yN)return vg;yN=1;var e=ea(),t=e["__core-js_shared__"];return vg=t,vg}var gg,vN;function CF(){if(vN)return gg;vN=1;var e=NF(),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 gg=n,gg}var xg,gN;function SL(){if(gN)return xg;gN=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 xg=n,xg}var bg,xN;function MF(){if(xN)return bg;xN=1;var e=lw(),t=CF(),n=Mi(),r=SL(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,h=u.hasOwnProperty,m=RegExp("^"+d.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 bg=y,bg}var jg,bN;function PF(){if(bN)return jg;bN=1;function e(t,n){return t==null?void 0:t[n]}return jg=e,jg}var Sg,jN;function Ms(){if(jN)return Sg;jN=1;var e=MF(),t=PF();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return Sg=n,Sg}var wg,SN;function $p(){if(SN)return wg;SN=1;var e=Ms(),t=e(Object,"create");return wg=t,wg}var Ag,wN;function RF(){if(wN)return Ag;wN=1;var e=$p();function t(){this.__data__=e?e(null):{},this.size=0}return Ag=t,Ag}var Og,AN;function kF(){if(AN)return Og;AN=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Og=e,Og}var _g,ON;function DF(){if(ON)return _g;ON=1;var e=$p(),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 _g=i,_g}var Tg,_N;function LF(){if(_N)return Tg;_N=1;var e=$p(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return Tg=r,Tg}var Eg,TN;function zF(){if(TN)return Eg;TN=1;var e=$p(),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 Eg=n,Eg}var Ng,EN;function $F(){if(EN)return Ng;EN=1;var e=RF(),t=kF(),n=DF(),r=LF(),i=zF();function o(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){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,Ng=o,Ng}var Cg,NN;function BF(){if(NN)return Cg;NN=1;function e(){this.__data__=[],this.size=0}return Cg=e,Cg}var Mg,CN;function cw(){if(CN)return Mg;CN=1;function e(t,n){return t===n||t!==t&&n!==n}return Mg=e,Mg}var Pg,MN;function Bp(){if(MN)return Pg;MN=1;var e=cw();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Pg=t,Pg}var Rg,PN;function IF(){if(PN)return Rg;PN=1;var e=Bp(),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 Rg=r,Rg}var kg,RN;function qF(){if(RN)return kg;RN=1;var e=Bp();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return kg=t,kg}var Dg,kN;function UF(){if(kN)return Dg;kN=1;var e=Bp();function t(n){return e(this.__data__,n)>-1}return Dg=t,Dg}var Lg,DN;function VF(){if(DN)return Lg;DN=1;var e=Bp();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 Lg=t,Lg}var zg,LN;function Ip(){if(LN)return zg;LN=1;var e=BF(),t=IF(),n=qF(),r=UF(),i=VF();function o(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){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,zg=o,zg}var $g,zN;function uw(){if(zN)return $g;zN=1;var e=Ms(),t=ea(),n=e(t,"Map");return $g=n,$g}var Bg,$N;function HF(){if($N)return Bg;$N=1;var e=$F(),t=Ip(),n=uw();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Bg=r,Bg}var Ig,BN;function FF(){if(BN)return Ig;BN=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Ig=e,Ig}var qg,IN;function qp(){if(IN)return qg;IN=1;var e=FF();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return qg=t,qg}var Ug,qN;function GF(){if(qN)return Ug;qN=1;var e=qp();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Ug=t,Ug}var Vg,UN;function KF(){if(UN)return Vg;UN=1;var e=qp();function t(n){return e(this,n).get(n)}return Vg=t,Vg}var Hg,VN;function YF(){if(VN)return Hg;VN=1;var e=qp();function t(n){return e(this,n).has(n)}return Hg=t,Hg}var Fg,HN;function XF(){if(HN)return Fg;HN=1;var e=qp();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 Fg=t,Fg}var Gg,FN;function fw(){if(FN)return Gg;FN=1;var e=HF(),t=GF(),n=KF(),r=YF(),i=XF();function o(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){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 Kg,GN;function wL(){if(GN)return Kg;GN=1;var e=fw(),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],d=o.cache;if(d.has(u))return d.get(u);var h=r.apply(this,l);return o.cache=d.set(u,h)||d,h};return o.cache=new(n.Cache||e),o}return n.Cache=e,Kg=n,Kg}var Yg,KN;function WF(){if(KN)return Yg;KN=1;var e=wL(),t=500;function n(r){var i=e(r,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return Yg=n,Yg}var Xg,YN;function ZF(){if(YN)return Xg;YN=1;var e=WF(),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,d,h){o.push(d?h.replace(n,"$1"):u||l)}),o});return Xg=r,Xg}var Wg,XN;function dw(){if(XN)return Wg;XN=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 Wg=e,Wg}var Zg,WN;function QF(){if(WN)return Zg;WN=1;var e=tf(),t=dw(),n=Rn(),r=El(),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 d=u+"";return d=="0"&&1/u==-1/0?"-0":d}return Zg=l,Zg}var Qg,ZN;function AL(){if(ZN)return Qg;ZN=1;var e=QF();function t(n){return n==null?"":e(n)}return Qg=t,Qg}var Jg,QN;function OL(){if(QN)return Jg;QN=1;var e=Rn(),t=ow(),n=ZF(),r=AL();function i(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return Jg=i,Jg}var ex,JN;function Up(){if(JN)return ex;JN=1;var e=El();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return ex=t,ex}var tx,eC;function hw(){if(eC)return tx;eC=1;var e=OL(),t=Up();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 tx=n,tx}var nx,tC;function _L(){if(tC)return nx;tC=1;var e=hw();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return nx=t,nx}var JF=_L();const Xn=at(JF);var rx,nC;function eG(){if(nC)return rx;nC=1;function e(t){return t==null}return rx=e,rx}var tG=eG();const Ne=at(tG);var ax,rC;function nG(){if(rC)return ax;rC=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 ax=i,ax}var rG=nG();const ws=at(rG);var aG=lw();const Te=at(aG);var iG=Mi();const Nl=at(iG);var ix={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 aC;function sG(){if(aC)return Qe;aC=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"),d=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 O=b.$$typeof;switch(O){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 d:case g:case y:case o:return b;default:return O}}case t:return O}}}return Qe.ContextConsumer=l,Qe.ContextProvider=o,Qe.Element=e,Qe.ForwardRef=d,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)===d},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===d||b.$$typeof===S||b.getModuleId!==void 0)},Qe.typeOf=w,Qe}var iC;function oG(){return iC||(iC=1,ix.exports=sG()),ix.exports}var lG=oG(),sx,sC;function TL(){if(sC)return sx;sC=1;var e=za(),t=$a(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return sx=r,sx}var ox,oC;function cG(){if(oC)return ox;oC=1;var e=TL();function t(n){return e(n)&&n!=+n}return ox=t,ox}var uG=cG();const Cl=at(uG);var fG=TL();const dG=at(fG);var bn=function(t){return t===0?0:t>0?1:-1},ds=function(t){return ws(t)&&t.indexOf("%")===t.length-1},ce=function(t){return dG(t)&&!Cl(t)},hG=function(t){return Ne(t)},Kt=function(t){return ce(t)||ws(t)},pG=0,Ps=function(t){var n=++pG;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)&&!ws(t))return r;var o;if(ds(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Cl(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},mG=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},Gt=function(t,n){return ce(t)&&ce(n)?function(r){return t+r*(n-t)}:function(){return n}};function Ah(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Xn(r,t))===n})}var yG=function(t,n){return ce(t)&&ce(n)?t-n:ws(t)&&ws(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Bo(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 U1(e){"@babel/helpers - typeof";return U1=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},U1(e)}var vG=["viewBox","children"],gG=["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"],lC=["points","pathLength"],lx={svg:vG,polygon:lC,polyline:lC},pw=["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"],Oh=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(P.isValidElement(t)&&(r=t.props),!Nl(r))return null;var i={};return Object.keys(r).forEach(function(o){pw.includes(o)&&(i[o]=n||function(l){return r[o](r,l)})}),i},xG=function(t,n,r){return function(i){return t(n,r,i),null}},As=function(t,n,r){if(!Nl(t)||U1(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var l=t[o];pw.includes(o)&&typeof l=="function"&&(i||(i={}),i[o]=xG(l,n,r))}),i},bG=["children"],jG=["children"];function cC(e,t){if(e==null)return{};var n=SG(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 SG(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 V1(e){"@babel/helpers - typeof";return V1=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},V1(e)}var uC={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":""},fC=null,cx=null,mw=function e(t){if(t===fC&&Array.isArray(cx))return cx;var n=[];return P.Children.forEach(t,function(r){Ne(r)||(lG.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),cx=n,fC=t,n};function Wn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Ea(i)}):r=[Ea(t)],mw(e).forEach(function(i){var o=Xn(i,"type.displayName")||Xn(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Fn(e,t){var n=Wn(e,t);return n&&n[0]}var dC=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)},wG=["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"],AG=function(t){return t&&t.type&&ws(t.type)&&wG.indexOf(t.type)>=0},EL=function(t){return t&&V1(t)==="object"&&"clipDot"in t},OG=function(t,n,r,i){var o,l=(o=lx==null?void 0:lx[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Te(t)&&(i&&l.includes(n)||gG.includes(n))||r&&pw.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),!Nl(i))return null;var o={};return Object.keys(i).forEach(function(l){var u;OG((u=i)===null||u===void 0?void 0:u[l],l,n,r)&&(o[l]=i[l])}),o},H1=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 hC(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(!hC(o,l))return!1}return!0},hC=function(t,n){if(Ne(t)&&Ne(n))return!0;if(!Ne(t)&&!Ne(n)){var r=t.props||{},i=r.children,o=cC(r,bG),l=n.props||{},u=l.children,d=cC(l,jG);return i&&u?Bo(o,d)&&H1(i,u):!i&&!u?Bo(o,d):!1}return!1},pC=function(t,n){var r=[],i={};return mw(t).forEach(function(o,l){if(AG(o))r.push(o);else if(o){var u=Ea(o.type),d=n[u]||{},h=d.handler,m=d.once;if(h&&(!m||!i[u])){var y=h(o,u,l);r.push(y),i[u]=!0}}}),r},_G=function(t){var n=t&&t.type;return n&&uC[n]?uC[n]:null},TG=function(t,n){return mw(n).indexOf(t)},EG=["children","width","height","viewBox","className","style","title","desc"];function F1(){return F1=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},F1.apply(this,arguments)}function NG(e,t){if(e==null)return{};var n=CG(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 CG(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 G1(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,l=e.style,u=e.title,d=e.desc,h=NG(e,EG),m=i||{width:n,height:r,x:0,y:0},y=Pe("recharts-surface",o);return I.createElement("svg",F1({},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,d),t)}var MG=["children","className"];function K1(){return K1=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},K1.apply(this,arguments)}function PG(e,t){if(e==null)return{};var n=RG(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 RG(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=PG(e,MG),o=Pe("recharts-layer",r);return I.createElement("g",K1({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]},ux,mC;function kG(){if(mC)return ux;mC=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 ux=e,ux}var fx,yC;function DG(){if(yC)return fx;yC=1;var e=kG();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 fx=t,fx}var dx,vC;function NL(){if(vC)return dx;vC=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 d(h){return u.test(h)}return dx=d,dx}var hx,gC;function LG(){if(gC)return hx;gC=1;function e(t){return t.split("")}return hx=e,hx}var px,xC;function zG(){if(xC)return px;xC=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+"]",d="\\ud83c[\\udffb-\\udfff]",h="(?:"+u+"|"+d+")",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+")*",O=w+S+b,T="(?:"+[m+u+"?",u,y,g,l].join("|")+")",_=RegExp(d+"(?="+d+")|"+T+O,"g");function C(A){return A.match(_)||[]}return px=C,px}var mx,bC;function $G(){if(bC)return mx;bC=1;var e=LG(),t=NL(),n=zG();function r(i){return t(i)?n(i):e(i)}return mx=r,mx}var yx,jC;function BG(){if(jC)return yx;jC=1;var e=DG(),t=NL(),n=$G(),r=AL();function i(o){return function(l){l=r(l);var u=t(l)?n(l):void 0,d=u?u[0]:l.charAt(0),h=u?e(u,1).join(""):l.slice(1);return d[o]()+h}}return yx=i,yx}var vx,SC;function IG(){if(SC)return vx;SC=1;var e=BG(),t=e("toUpperCase");return vx=t,vx}var qG=IG();const Vp=at(qG);function pt(e){return function(){return e}}const CL=Math.cos,_h=Math.sin,zr=Math.sqrt,Th=Math.PI,Hp=2*Th,Y1=Math.PI,X1=2*Y1,os=1e-6,UG=X1-os;function ML(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function VG(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ML;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 HG{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ML:VG(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,d=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>os)if(!(Math.abs(y*d-h*m)>os)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let j=r-l,S=i-u,w=d*d+h*h,b=j*j+S*S,O=Math.sqrt(w),T=Math.sqrt(g),_=o*Math.tan((Y1-Math.acos((w+g-b)/(2*O*T)))/2),C=_/T,A=_/O;Math.abs(C-1)>os&&this._append`L${t+C*m},${n+C*y}`,this._append`A${o},${o},0,0,${+(y*j>m*S)},${this._x1=t+A*d},${this._y1=n+A*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),d=r*Math.sin(i),h=t+u,m=n+d,y=1^l,g=l?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>os||Math.abs(this._y1-m)>os)&&this._append`L${h},${m}`,r&&(g<0&&(g=g%X1+X1),g>UG?this._append`A${r},${r},0,1,${y},${t-u},${n-d}A${r},${r},0,1,${y},${this._x1=h},${this._y1=m}`:g>os&&this._append`A${r},${r},0,${+(g>=Y1)},${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 yw(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 HG(t)}function vw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function PL(e){this._context=e}PL.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 Fp(e){return new PL(e)}function RL(e){return e[0]}function kL(e){return e[1]}function DL(e,t){var n=pt(!0),r=null,i=Fp,o=null,l=yw(u);e=typeof e=="function"?e:e===void 0?RL:pt(e),t=typeof t=="function"?t:t===void 0?kL:pt(t);function u(d){var h,m=(d=vw(d)).length,y,g=!1,j;for(r==null&&(o=i(j=l())),h=0;h<=m;++h)!(h<m&&n(y=d[h],h,d))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(y,h,d),+t(y,h,d));if(j)return o=null,j+""||null}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:pt(+d),u):e},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:pt(+d),u):t},u.defined=function(d){return arguments.length?(n=typeof d=="function"?d:pt(!!d),u):n},u.curve=function(d){return arguments.length?(i=d,r!=null&&(o=i(r)),u):i},u.context=function(d){return arguments.length?(d==null?r=o=null:o=i(r=d),u):r},u}function zd(e,t,n){var r=null,i=pt(!0),o=null,l=Fp,u=null,d=yw(h);e=typeof e=="function"?e:e===void 0?RL:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?kL:pt(+n);function h(y){var g,j,S,w=(y=vw(y)).length,b,O=!1,T,_=new Array(w),C=new Array(w);for(o==null&&(u=l(T=d())),g=0;g<=w;++g){if(!(g<w&&i(b=y[g],g,y))===O)if(O=!O)j=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),S=g-1;S>=j;--S)u.point(_[S],C[S]);u.lineEnd(),u.areaEnd()}O&&(_[g]=+e(b,g,y),C[g]=+t(b,g,y),u.point(r?+r(b,g,y):_[g],n?+n(b,g,y):C[g]))}if(T)return u=null,T+""||null}function m(){return DL().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 LL{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 FG(e){return new LL(e,!0)}function GG(e){return new LL(e,!1)}const gw={draw(e,t){const n=zr(t/Th);e.moveTo(n,0),e.arc(0,0,n,0,Hp)}},KG={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()}},zL=zr(1/3),YG=zL*2,XG={draw(e,t){const n=zr(t/YG),r=n*zL;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},WG={draw(e,t){const n=zr(t),r=-n/2;e.rect(r,r,n,n)}},ZG=.8908130915292852,$L=_h(Th/10)/_h(7*Th/10),QG=_h(Hp/10)*$L,JG=-CL(Hp/10)*$L,eK={draw(e,t){const n=zr(t*ZG),r=QG*n,i=JG*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=Hp*o/5,u=CL(l),d=_h(l);e.lineTo(d*n,-u*n),e.lineTo(u*r-d*i,d*r+u*i)}e.closePath()}},gx=zr(3),tK={draw(e,t){const n=-zr(t/(gx*3));e.moveTo(0,n*2),e.lineTo(-gx*n,-n),e.lineTo(gx*n,-n),e.closePath()}},lr=-.5,cr=zr(3)/2,W1=1/zr(12),nK=(W1/2+1)*3,rK={draw(e,t){const n=zr(t/nK),r=n/2,i=n*W1,o=r,l=n*W1+n,u=-o,d=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(u,d),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*d,cr*u+lr*d),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*d,lr*d-cr*u),e.closePath()}};function aK(e,t){let n=null,r=yw(i);e=typeof e=="function"?e:pt(e||gw),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 Eh(){}function Nh(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 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(){switch(this._point){case 3:Nh(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:Nh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iK(e){return new BL(e)}function IL(e){this._context=e}IL.prototype={areaStart:Eh,areaEnd:Eh,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:Nh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sK(e){return new IL(e)}function qL(e){this._context=e}qL.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:Nh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oK(e){return new qL(e)}function UL(e){this._context=e}UL.prototype={areaStart:Eh,areaEnd:Eh,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 lK(e){return new UL(e)}function wC(e){return e<0?-1:1}function AC(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(wC(o)+wC(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function OC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function xx(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 Ch(e){this._context=e}Ch.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:xx(this,this._t0,OC(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,xx(this,OC(this,n=AC(this,e,t)),n);break;default:xx(this,this._t0,n=AC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function VL(e){this._context=new HL(e)}(VL.prototype=Object.create(Ch.prototype)).point=function(e,t){Ch.prototype.point.call(this,t,e)};function HL(e){this._context=e}HL.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 cK(e){return new Ch(e)}function uK(e){return new VL(e)}function FL(e){this._context=e}FL.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=_C(e),i=_C(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 _C(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 fK(e){return new FL(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 dK(e){return new Gp(e,.5)}function hK(e){return new Gp(e,0)}function pK(e){return new Gp(e,1)}function Ko(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 Z1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function mK(e,t){return e[t]}function yK(e){const t=[];return t.key=e,t}function vK(){var e=pt([]),t=Z1,n=Ko,r=mK;function i(o){var l=Array.from(e.apply(this,arguments),yK),u,d=l.length,h=-1,m;for(const y of o)for(u=0,++h;u<d;++u)(l[u][h]=[0,+r(y,l[u].key,h,o)]).data=y;for(u=0,m=vw(t(l));u<d;++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?Z1:typeof o=="function"?o:pt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Ko,i):n},i}function gK(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}Ko(e,t)}}function xK(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}Ko(e,t)}}function bK(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,d=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,O=w[r-1][1]||0;j+=b-O}d+=y,h+=j*y}i[r-1][1]+=i[r-1][0]=n,d&&(n-=h/d)}i[r-1][1]+=i[r-1][0]=n,Ko(e,t)}}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)}var jK=["type","size","sizeType"];function Q1(){return Q1=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},Q1.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 EC(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){SK(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 SK(e,t,n){return t=wK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wK(e){var t=AK(e,"string");return hu(t)=="symbol"?t:t+""}function AK(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 OK(e,t){if(e==null)return{};var n=_K(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 _K(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 GL={symbolCircle:gw,symbolCross:KG,symbolDiamond:XG,symbolSquare:WG,symbolStar:eK,symbolTriangle:tK,symbolWye:rK},TK=Math.PI/180,EK=function(t){var n="symbol".concat(Vp(t));return GL[n]||gw},NK=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*TK;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}},CK=function(t,n){GL["symbol".concat(Vp(t))]=n},xw=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,d=OK(t,jK),h=EC(EC({},d),{},{type:r,size:o,sizeType:u}),m=function(){var b=EK(r),O=aK().type(b).size(NK(o,u,r));return O()},y=h.className,g=h.cx,j=h.cy,S=je(h,!0);return g===+g&&j===+j&&o===+o?I.createElement("path",Q1({},S,{className:Pe("recharts-symbols",y),transform:"translate(".concat(g,", ").concat(j,")"),d:m()})):null};xw.registerSymbol=CK;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 J1(){return J1=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},J1.apply(this,arguments)}function NC(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 MK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NC(Object(n),!0).forEach(function(r){pu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RK(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,YL(r.key),r)}}function kK(e,t,n){return t&&RK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DK(e,t,n){return t=Mh(t),LK(e,KL()?Reflect.construct(t,n||[],Mh(e).constructor):t.apply(e,n))}function LK(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 zK(e)}function zK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KL=function(){return!!e})()}function Mh(e){return Mh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mh(e)}function $K(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&&ej(e,t)}function ej(e,t){return ej=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ej(e,t)}function pu(e,t,n){return t=YL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YL(e){var t=BK(e,"string");return Yo(t)=="symbol"?t:t+""}function BK(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)}var ur=32,bw=(function(e){function t(){return PK(this,t),DK(this,t,arguments)}return $K(t,e),kK(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=ur/2,l=ur/6,u=ur/3,d=r.inactive?i:r.color;if(r.type==="plainline")return I.createElement("line",{strokeWidth:4,fill:"none",stroke:d,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:d,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:d,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=MK({},r);return delete h.legendIcon,I.cloneElement(r.legendIcon,h)}return I.createElement(xw,{fill:d,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,d=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||d,b=Pe(pu(pu({"recharts-legend-item":!0},"legend-item-".concat(S),!0),"inactive",j.inactive));if(j.type==="none")return null;var O=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 T=j.inactive?h:j.color;return I.createElement("li",J1({className:b,style:y,key:"legend-item-".concat(S)},As(r.props,j,S)),I.createElement(G1,{width:l,height:l,viewBox:m,style:g},r.renderIcon(j)),I.createElement("span",{className:"recharts-legend-item-text",style:{color:T}},w?w(O,j,S):O))})}},{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);pu(bw,"displayName","Legend");pu(bw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var bx,CC;function IK(){if(CC)return bx;CC=1;var e=Ip();function t(){this.__data__=new e,this.size=0}return bx=t,bx}var jx,MC;function qK(){if(MC)return jx;MC=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return jx=e,jx}var Sx,PC;function UK(){if(PC)return Sx;PC=1;function e(t){return this.__data__.get(t)}return Sx=e,Sx}var wx,RC;function VK(){if(RC)return wx;RC=1;function e(t){return this.__data__.has(t)}return wx=e,wx}var Ax,kC;function HK(){if(kC)return Ax;kC=1;var e=Ip(),t=uw(),n=fw(),r=200;function i(o,l){var u=this.__data__;if(u instanceof e){var d=u.__data__;if(!t||d.length<r-1)return d.push([o,l]),this.size=++u.size,this;u=this.__data__=new n(d)}return u.set(o,l),this.size=u.size,this}return Ax=i,Ax}var Ox,DC;function XL(){if(DC)return Ox;DC=1;var e=Ip(),t=IK(),n=qK(),r=UK(),i=VK(),o=HK();function l(u){var d=this.__data__=new e(u);this.size=d.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=i,l.prototype.set=o,Ox=l,Ox}var _x,LC;function FK(){if(LC)return _x;LC=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return _x=t,_x}var Tx,zC;function GK(){if(zC)return Tx;zC=1;function e(t){return this.__data__.has(t)}return Tx=e,Tx}var Ex,$C;function WL(){if($C)return Ex;$C=1;var e=fw(),t=FK(),n=GK();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,Ex=r,Ex}var Nx,BC;function ZL(){if(BC)return Nx;BC=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 Nx=e,Nx}var Cx,IC;function QL(){if(IC)return Cx;IC=1;function e(t,n){return t.has(n)}return Cx=e,Cx}var Mx,qC;function JL(){if(qC)return Mx;qC=1;var e=WL(),t=ZL(),n=QL(),r=1,i=2;function o(l,u,d,h,m,y){var g=d&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 O=-1,T=!0,_=d&i?new e:void 0;for(y.set(l,u),y.set(u,l);++O<j;){var C=l[O],A=u[O];if(h)var E=g?h(A,C,O,u,l,y):h(C,A,O,l,u,y);if(E!==void 0){if(E)continue;T=!1;break}if(_){if(!t(u,function(M,D){if(!n(_,D)&&(C===M||m(C,M,d,h,y)))return _.push(D)})){T=!1;break}}else if(!(C===A||m(C,A,d,h,y))){T=!1;break}}return y.delete(l),y.delete(u),T}return Mx=o,Mx}var Px,UC;function KK(){if(UC)return Px;UC=1;var e=ea(),t=e.Uint8Array;return Px=t,Px}var Rx,VC;function YK(){if(VC)return Rx;VC=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return Rx=e,Rx}var kx,HC;function jw(){if(HC)return kx;HC=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return kx=e,kx}var Dx,FC;function XK(){if(FC)return Dx;FC=1;var e=tf(),t=KK(),n=cw(),r=JL(),i=YK(),o=jw(),l=1,u=2,d="[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]",O="[object ArrayBuffer]",T="[object DataView]",_=e?e.prototype:void 0,C=_?_.valueOf:void 0;function A(E,M,D,k,B,q,$){switch(D){case T:if(E.byteLength!=M.byteLength||E.byteOffset!=M.byteOffset)return!1;E=E.buffer,M=M.buffer;case O:return!(E.byteLength!=M.byteLength||!q(new t(E),new t(M)));case d: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 G=i;case S:var X=k&l;if(G||(G=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(G(E),G(M),k,B,q,$);return $.delete(E),L;case b:if(C)return C.call(E)==C.call(M)}return!1}return Dx=A,Dx}var Lx,GC;function ez(){if(GC)return Lx;GC=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 Lx=e,Lx}var zx,KC;function WK(){if(KC)return zx;KC=1;var e=ez(),t=Rn();function n(r,i,o){var l=i(r);return t(r)?l:e(l,o(r))}return zx=n,zx}var $x,YC;function ZK(){if(YC)return $x;YC=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 $x=e,$x}var Bx,XC;function QK(){if(XC)return Bx;XC=1;function e(){return[]}return Bx=e,Bx}var Ix,WC;function JK(){if(WC)return Ix;WC=1;var e=ZK(),t=QK(),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 Ix=o,Ix}var qx,ZC;function eY(){if(ZC)return qx;ZC=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return qx=e,qx}var Ux,QC;function tY(){if(QC)return Ux;QC=1;var e=za(),t=$a(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Ux=r,Ux}var Vx,JC;function Sw(){if(JC)return Vx;JC=1;var e=tY(),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 Vx=o,Vx}var Kc={exports:{}},Hx,eM;function nY(){if(eM)return Hx;eM=1;function e(){return!1}return Hx=e,Hx}Kc.exports;var tM;function tz(){return tM||(tM=1,(function(e,t){var n=ea(),r=nY(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?n.Buffer:void 0,d=u?u.isBuffer:void 0,h=d||r;e.exports=h})(Kc,Kc.exports)),Kc.exports}var Fx,nM;function ww(){if(nM)return Fx;nM=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 Fx=n,Fx}var Gx,rM;function Aw(){if(rM)return Gx;rM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Gx=t,Gx}var Kx,aM;function rY(){if(aM)return Kx;aM=1;var e=za(),t=Aw(),n=$a(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",u="[object Error]",d="[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]",O="[object DataView]",T="[object Float32Array]",_="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",E="[object Int32Array]",M="[object Uint8Array]",D="[object Uint8ClampedArray]",k="[object Uint16Array]",B="[object Uint32Array]",q={};q[T]=q[_]=q[C]=q[A]=q[E]=q[M]=q[D]=q[k]=q[B]=!0,q[r]=q[i]=q[b]=q[o]=q[O]=q[l]=q[u]=q[d]=q[h]=q[m]=q[y]=q[g]=q[j]=q[S]=q[w]=!1;function $(G){return n(G)&&t(G.length)&&!!q[e(G)]}return Kx=$,Kx}var Yx,iM;function nz(){if(iM)return Yx;iM=1;function e(t){return function(n){return t(n)}}return Yx=e,Yx}var Yc={exports:{}};Yc.exports;var sM;function aY(){return sM||(sM=1,(function(e,t){var n=jL(),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 d=i&&i.require&&i.require("util").types;return d||l&&l.binding&&l.binding("util")}catch{}})();e.exports=u})(Yc,Yc.exports)),Yc.exports}var Xx,oM;function rz(){if(oM)return Xx;oM=1;var e=rY(),t=nz(),n=aY(),r=n&&n.isTypedArray,i=r?t(r):e;return Xx=i,Xx}var Wx,lM;function iY(){if(lM)return Wx;lM=1;var e=eY(),t=Sw(),n=Rn(),r=tz(),i=ww(),o=rz(),l=Object.prototype,u=l.hasOwnProperty;function d(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):[],O=b.length;for(var T in h)(m||u.call(h,T))&&!(w&&(T=="length"||j&&(T=="offset"||T=="parent")||S&&(T=="buffer"||T=="byteLength"||T=="byteOffset")||i(T,O)))&&b.push(T);return b}return Wx=d,Wx}var Zx,cM;function sY(){if(cM)return Zx;cM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Zx=t,Zx}var Qx,uM;function az(){if(uM)return Qx;uM=1;function e(t,n){return function(r){return t(n(r))}}return Qx=e,Qx}var Jx,fM;function oY(){if(fM)return Jx;fM=1;var e=az(),t=e(Object.keys,Object);return Jx=t,Jx}var eb,dM;function lY(){if(dM)return eb;dM=1;var e=sY(),t=oY(),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 eb=i,eb}var tb,hM;function nf(){if(hM)return tb;hM=1;var e=lw(),t=Aw();function n(r){return r!=null&&t(r.length)&&!e(r)}return tb=n,tb}var nb,pM;function Kp(){if(pM)return nb;pM=1;var e=iY(),t=lY(),n=nf();function r(i){return n(i)?e(i):t(i)}return nb=r,nb}var rb,mM;function cY(){if(mM)return rb;mM=1;var e=WK(),t=JK(),n=Kp();function r(i){return e(i,n,t)}return rb=r,rb}var ab,yM;function uY(){if(yM)return ab;yM=1;var e=cY(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,l,u,d,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 O=g[b];if(!(y?O in l:r.call(l,O)))return!1}var T=m.get(o),_=m.get(l);if(T&&_)return T==l&&_==o;var C=!0;m.set(o,l),m.set(l,o);for(var A=y;++b<j;){O=g[b];var E=o[O],M=l[O];if(d)var D=y?d(M,E,O,l,o,m):d(E,M,O,o,l,m);if(!(D===void 0?E===M||h(E,M,u,d,m):D)){C=!1;break}A||(A=O=="constructor")}if(C&&!A){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 ab=i,ab}var ib,vM;function fY(){if(vM)return ib;vM=1;var e=Ms(),t=ea(),n=e(t,"DataView");return ib=n,ib}var sb,gM;function dY(){if(gM)return sb;gM=1;var e=Ms(),t=ea(),n=e(t,"Promise");return sb=n,sb}var ob,xM;function iz(){if(xM)return ob;xM=1;var e=Ms(),t=ea(),n=e(t,"Set");return ob=n,ob}var lb,bM;function hY(){if(bM)return lb;bM=1;var e=Ms(),t=ea(),n=e(t,"WeakMap");return lb=n,lb}var cb,jM;function pY(){if(jM)return cb;jM=1;var e=fY(),t=uw(),n=dY(),r=iz(),i=hY(),o=za(),l=SL(),u="[object Map]",d="[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),O=l(i),T=o;return(e&&T(new e(new ArrayBuffer(1)))!=g||t&&T(new t)!=u||n&&T(n.resolve())!=h||r&&T(new r)!=m||i&&T(new i)!=y)&&(T=function(_){var C=o(_),A=C==d?_.constructor:void 0,E=A?l(A):"";if(E)switch(E){case j:return g;case S:return u;case w:return h;case b:return m;case O:return y}return C}),cb=T,cb}var ub,SM;function mY(){if(SM)return ub;SM=1;var e=XL(),t=JL(),n=XK(),r=uY(),i=pY(),o=Rn(),l=tz(),u=rz(),d=1,h="[object Arguments]",m="[object Array]",y="[object Object]",g=Object.prototype,j=g.hasOwnProperty;function S(w,b,O,T,_,C){var A=o(w),E=o(b),M=A?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;A=!0,k=!1}if(q&&!k)return C||(C=new e),A||u(w)?t(w,b,O,T,_,C):n(w,b,M,O,T,_,C);if(!(O&d)){var $=k&&j.call(w,"__wrapped__"),G=B&&j.call(b,"__wrapped__");if($||G){var X=$?w.value():w,Y=G?b.value():b;return C||(C=new e),_(X,Y,O,T,C)}}return q?(C||(C=new e),r(w,b,O,T,_,C)):!1}return ub=S,ub}var fb,wM;function Ow(){if(wM)return fb;wM=1;var e=mY(),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 fb=n,fb}var db,AM;function yY(){if(AM)return db;AM=1;var e=XL(),t=Ow(),n=1,r=2;function i(o,l,u,d){var h=u.length,m=h,y=!d;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(d)var O=d(S,w,j,o,l,b);if(!(O===void 0?t(w,S,n|r,d,b):O))return!1}}return!0}return db=i,db}var hb,OM;function sz(){if(OM)return hb;OM=1;var e=Mi();function t(n){return n===n&&!e(n)}return hb=t,hb}var pb,_M;function vY(){if(_M)return pb;_M=1;var e=sz(),t=Kp();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 pb=n,pb}var mb,TM;function oz(){if(TM)return mb;TM=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return mb=e,mb}var yb,EM;function gY(){if(EM)return yb;EM=1;var e=yY(),t=vY(),n=oz();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 yb=r,yb}var vb,NM;function xY(){if(NM)return vb;NM=1;function e(t,n){return t!=null&&n in Object(t)}return vb=e,vb}var gb,CM;function bY(){if(CM)return gb;CM=1;var e=OL(),t=Sw(),n=Rn(),r=ww(),i=Aw(),o=Up();function l(u,d,h){d=e(d,u);for(var m=-1,y=d.length,g=!1;++m<y;){var j=o(d[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 gb=l,gb}var xb,MM;function jY(){if(MM)return xb;MM=1;var e=xY(),t=bY();function n(r,i){return r!=null&&t(r,i,e)}return xb=n,xb}var bb,PM;function SY(){if(PM)return bb;PM=1;var e=Ow(),t=_L(),n=jY(),r=ow(),i=sz(),o=oz(),l=Up(),u=1,d=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|d)}}return bb=h,bb}var jb,RM;function Ml(){if(RM)return jb;RM=1;function e(t){return t}return jb=e,jb}var Sb,kM;function wY(){if(kM)return Sb;kM=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Sb=e,Sb}var wb,DM;function AY(){if(DM)return wb;DM=1;var e=hw();function t(n){return function(r){return e(r,n)}}return wb=t,wb}var Ab,LM;function OY(){if(LM)return Ab;LM=1;var e=wY(),t=AY(),n=ow(),r=Up();function i(o){return n(o)?e(r(o)):t(o)}return Ab=i,Ab}var Ob,zM;function ta(){if(zM)return Ob;zM=1;var e=gY(),t=SY(),n=Ml(),r=Rn(),i=OY();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 Ob=o,Ob}var _b,$M;function lz(){if($M)return _b;$M=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 _b=e,_b}var Tb,BM;function _Y(){if(BM)return Tb;BM=1;function e(t){return t!==t}return Tb=e,Tb}var Eb,IM;function TY(){if(IM)return Eb;IM=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 Eb=e,Eb}var Nb,qM;function EY(){if(qM)return Nb;qM=1;var e=lz(),t=_Y(),n=TY();function r(i,o,l){return o===o?n(i,o,l):e(i,t,l)}return Nb=r,Nb}var Cb,UM;function NY(){if(UM)return Cb;UM=1;var e=EY();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return Cb=t,Cb}var Mb,VM;function CY(){if(VM)return Mb;VM=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 Mb=e,Mb}var Pb,HM;function MY(){if(HM)return Pb;HM=1;function e(){}return Pb=e,Pb}var Rb,FM;function PY(){if(FM)return Rb;FM=1;var e=iz(),t=MY(),n=jw(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return Rb=i,Rb}var kb,GM;function RY(){if(GM)return kb;GM=1;var e=WL(),t=NY(),n=CY(),r=QL(),i=PY(),o=jw(),l=200;function u(d,h,m){var y=-1,g=t,j=d.length,S=!0,w=[],b=w;if(m)S=!1,g=n;else if(j>=l){var O=h?null:i(d);if(O)return o(O);S=!1,g=r,b=new e}else b=h?[]:w;e:for(;++y<j;){var T=d[y],_=h?h(T):T;if(T=m||T!==0?T:0,S&&_===_){for(var C=b.length;C--;)if(b[C]===_)continue e;h&&b.push(_),w.push(T)}else g(b,_,m)||(b!==w&&b.push(_),w.push(T))}return w}return kb=u,kb}var Db,KM;function kY(){if(KM)return Db;KM=1;var e=ta(),t=RY();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Db=n,Db}var DY=kY();const YM=at(DY);function cz(e,t,n){return t===!0?YM(e,n):Te(t)?YM(e,t):e}function Xo(e){"@babel/helpers - typeof";return Xo=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},Xo(e)}var LY=["ref"];function XM(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?XM(Object(n),!0).forEach(function(r){Yp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WM(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,fz(r.key),r)}}function $Y(e,t,n){return t&&WM(e.prototype,t),n&&WM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BY(e,t,n){return t=Ph(t),IY(e,uz()?Reflect.construct(t,n||[],Ph(e).constructor):t.apply(e,n))}function IY(e,t){if(t&&(Xo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qY(e)}function qY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uz=function(){return!!e})()}function Ph(e){return Ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ph(e)}function UY(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 Yp(e,t,n){return t=fz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fz(e){var t=VY(e,"string");return Xo(t)=="symbol"?t:t+""}function VY(e,t){if(Xo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function HY(e,t){if(e==null)return{};var n=FY(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 FY(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 GY(e){return e.value}function KY(e,t){if(I.isValidElement(e))return I.cloneElement(e,t);if(typeof e=="function")return I.createElement(e,t);t.ref;var n=HY(t,LY);return I.createElement(bw,n)}var ZM=1,Io=(function(e){function t(){var n;zY(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=BY(this,t,[].concat(i)),Yp(n,"lastBoundingBox",{width:-1,height:-1}),n}return UY(t,e),$Y(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)>ZM||Math.abs(i.height-this.lastBoundingBox.height)>ZM)&&(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,d=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:d&&d.right||0}:{left:d&&d.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:d&&d.bottom||0}:{top:d&&d.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,d=i.wrapperStyle,h=i.payloadUniqBy,m=i.payload,y=Sa(Sa({position:"absolute",width:l||"auto",height:u||"auto"},this.getDefaultPosition(d)),d);return I.createElement("div",{className:"recharts-legend-wrapper",style:y,ref:function(j){r.wrapperNode=j}},KY(o,Sa(Sa({},this.props),{},{payload:cz(m,h,GY)})))}}],[{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);Yp(Io,"displayName","Legend");Yp(Io,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Lb,QM;function YY(){if(QM)return Lb;QM=1;var e=tf(),t=Sw(),n=Rn(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return Lb=i,Lb}var zb,JM;function dz(){if(JM)return zb;JM=1;var e=ez(),t=YY();function n(r,i,o,l,u){var d=-1,h=r.length;for(o||(o=t),u||(u=[]);++d<h;){var m=r[d];i>0&&o(m)?i>1?n(m,i-1,o,l,u):e(u,m):l||(u[u.length]=m)}return u}return zb=n,zb}var $b,eP;function XY(){if(eP)return $b;eP=1;function e(t){return function(n,r,i){for(var o=-1,l=Object(n),u=i(n),d=u.length;d--;){var h=u[t?d:++o];if(r(l[h],h,l)===!1)break}return n}}return $b=e,$b}var Bb,tP;function WY(){if(tP)return Bb;tP=1;var e=XY(),t=e();return Bb=t,Bb}var Ib,nP;function hz(){if(nP)return Ib;nP=1;var e=WY(),t=Kp();function n(r,i){return r&&e(r,i,t)}return Ib=n,Ib}var qb,rP;function ZY(){if(rP)return qb;rP=1;var e=nf();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,d=Object(i);(r?u--:++u<l)&&o(d[u],u,d)!==!1;);return i}}return qb=t,qb}var Ub,aP;function _w(){if(aP)return Ub;aP=1;var e=hz(),t=ZY(),n=t(e);return Ub=n,Ub}var Vb,iP;function pz(){if(iP)return Vb;iP=1;var e=_w(),t=nf();function n(r,i){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(u,d,h){l[++o]=i(u,d,h)}),l}return Vb=n,Vb}var Hb,sP;function QY(){if(sP)return Hb;sP=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Hb=e,Hb}var Fb,oP;function JY(){if(oP)return Fb;oP=1;var e=El();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,l=n===n,u=e(n),d=r!==void 0,h=r===null,m=r===r,y=e(r);if(!h&&!y&&!u&&n>r||u&&d&&m&&!h&&!y||o&&d&&m||!i&&m||!l)return 1;if(!o&&!u&&!y&&n<r||y&&i&&l&&!o&&!u||h&&i&&l||!d&&l||!m)return-1}return 0}return Fb=t,Fb}var Gb,lP;function eX(){if(lP)return Gb;lP=1;var e=JY();function t(n,r,i){for(var o=-1,l=n.criteria,u=r.criteria,d=l.length,h=i.length;++o<d;){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 Kb,cP;function tX(){if(cP)return Kb;cP=1;var e=dw(),t=hw(),n=ta(),r=pz(),i=QY(),o=nz(),l=eX(),u=Ml(),d=Rn();function h(m,y,g){y.length?y=e(y,function(w){return d(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,O){var T=e(y,function(_){return _(w)});return{criteria:T,index:++j,value:w}});return i(S,function(w,b){return l(w,b,g)})}return Kb=h,Kb}var Yb,uP;function nX(){if(uP)return Yb;uP=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 Yb=e,Yb}var Xb,fP;function rX(){if(fP)return Xb;fP=1;var e=nX(),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,d=t(l.length-i,0),h=Array(d);++u<d;)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 Xb=n,Xb}var Wb,dP;function aX(){if(dP)return Wb;dP=1;function e(t){return function(){return t}}return Wb=e,Wb}var Zb,hP;function mz(){if(hP)return Zb;hP=1;var e=Ms(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Zb=t,Zb}var Qb,pP;function iX(){if(pP)return Qb;pP=1;var e=aX(),t=mz(),n=Ml(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Qb=r,Qb}var Jb,mP;function sX(){if(mP)return Jb;mP=1;var e=800,t=16,n=Date.now;function r(i){var o=0,l=0;return function(){var u=n(),d=t-(u-l);if(l=u,d>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return Jb=r,Jb}var e0,yP;function oX(){if(yP)return e0;yP=1;var e=iX(),t=sX(),n=t(e);return e0=n,e0}var t0,vP;function lX(){if(vP)return t0;vP=1;var e=Ml(),t=rX(),n=oX();function r(i,o){return n(t(i,o,e),i+"")}return t0=r,t0}var n0,gP;function Xp(){if(gP)return n0;gP=1;var e=cw(),t=nf(),n=ww(),r=Mi();function i(o,l,u){if(!r(u))return!1;var d=typeof l;return(d=="number"?t(u)&&n(l,u.length):d=="string"&&l in u)?e(u[l],o):!1}return n0=i,n0}var r0,xP;function cX(){if(xP)return r0;xP=1;var e=dz(),t=tX(),n=lX(),r=Xp(),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 r0=i,r0}var uX=cX();const Tw=at(uX);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 nj(){return nj=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},nj.apply(this,arguments)}function fX(e,t){return mX(e)||pX(e,t)||hX(e,t)||dX()}function dX(){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 hX(e,t){if(e){if(typeof e=="string")return bP(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 bP(e,t)}}function bP(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 pX(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function mX(e){if(Array.isArray(e))return 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 a0(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){yX(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 yX(e,t,n){return t=vX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vX(e){var t=gX(e,"string");return mu(t)=="symbol"?t:t+""}function gX(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 xX(e){return Array.isArray(e)&&Kt(e[0])&&Kt(e[1])?e.join(" ~ "):e}var bX=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,d=t.labelStyle,h=d===void 0?{}:d,m=t.payload,y=t.formatter,g=t.itemSorter,j=t.wrapperClassName,S=t.labelClassName,w=t.label,b=t.labelFormatter,O=t.accessibilityLayer,T=O===void 0?!1:O,_=function(){if(m&&m.length){var $={padding:0,margin:0},G=(g?Tw(m,g):m).map(function(X,Y){if(X.type==="none")return null;var L=a0({display:"block",paddingTop:4,paddingBottom:4,color:X.color||"#000"},u),H=X.formatter||y||xX,Q=X.value,ae=X.name,oe=Q,z=ae;if(H&&oe!=null&&z!=null){var F=H(Q,ae,X,Y,m);if(Array.isArray(F)){var re=fX(F,2);oe=re[0],z=re[1]}else oe=F}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:$},G)}return null},C=a0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),A=a0({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=T?{role:"status","aria-live":"assertive"}:{};return I.createElement("div",nj({className:D,style:C},B),I.createElement("p",{className:k,style:A},I.isValidElement(M)?M:"".concat(M)),_())};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 $d(e,t,n){return t=jX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jX(e){var t=SX(e,"string");return yu(t)=="symbol"?t:t+""}function SX(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 Dc="recharts-tooltip-wrapper",wX={visibility:"hidden"};function AX(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Pe(Dc,$d($d($d($d({},"".concat(Dc,"-right"),ce(n)&&t&&ce(t.x)&&n>=t.x),"".concat(Dc,"-left"),ce(n)&&t&&ce(t.x)&&n<t.x),"".concat(Dc,"-bottom"),ce(r)&&t&&ce(t.y)&&r>=t.y),"".concat(Dc,"-top"),ce(r)&&t&&ce(t.y)&&r<t.y))}function SP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,l=e.reverseDirection,u=e.tooltipDimension,d=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=d[r];return g<j?Math.max(y,d[r]):Math.max(m,d[r])}var S=y+u,w=d[r]+h;return S>w?Math.max(m,d[r]):Math.max(y,d[r])}function OX(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 _X(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipBox,u=e.useTranslate3d,d=e.viewBox,h,m,y;return l.height>0&&l.width>0&&n?(m=SP({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),y=SP({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),h=OX({translateX:m,translateY:y,useTranslate3d:u})):h=wX,{cssProperties:h,cssClasses:AX({translateX:m,translateY:y,coordinate:n})}}function Wo(e){"@babel/helpers - typeof";return Wo=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},Wo(e)}function wP(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 AP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(n),!0).forEach(function(r){aj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EX(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 NX(e,t,n){return t&&EX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CX(e,t,n){return t=Rh(t),MX(e,yz()?Reflect.construct(t,n||[],Rh(e).constructor):t.apply(e,n))}function MX(e,t){if(t&&(Wo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PX(e)}function PX(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 RX(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 aj(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=kX(e,"string");return Wo(t)=="symbol"?t:t+""}function kX(e,t){if(Wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var OP=1,DX=(function(e){function t(){var n;TX(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=CX(this,t,[].concat(i)),aj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),aj(n,"handleKeyDown",function(l){if(l.key==="Escape"){var u,d,h,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.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 RX(t,e),NX(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>OP||Math.abs(r.height-this.state.lastBoundingBox.height)>OP)&&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,d=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,O=i.viewBox,T=i.wrapperStyle,_=_X({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:j,position:S,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:O}),C=_.cssClasses,A=_.cssProperties,E=AP(AP({transition:g&&o?"transform ".concat(u,"ms ").concat(d):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&y?"visible":"hidden",position:"absolute",top:0,left:0},T);return I.createElement("div",{tabIndex:-1,className:C,style:E,ref:function(D){r.wrapperNode=D}},h)}}])})(P.PureComponent),LX=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Pi={isSsr:LX()};function Zo(e){"@babel/helpers - typeof";return Zo=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},Zo(e)}function _P(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 TP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_P(Object(n),!0).forEach(function(r){Ew(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_P(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $X(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,xz(r.key),r)}}function BX(e,t,n){return t&&$X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IX(e,t,n){return t=kh(t),qX(e,gz()?Reflect.construct(t,n||[],kh(e).constructor):t.apply(e,n))}function qX(e,t){if(t&&(Zo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UX(e)}function UX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gz=function(){return!!e})()}function kh(e){return kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kh(e)}function VX(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 Ew(e,t,n){return t=xz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xz(e){var t=HX(e,"string");return Zo(t)=="symbol"?t:t+""}function HX(e,t){if(Zo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function FX(e){return e.dataKey}function GX(e,t){return I.isValidElement(e)?I.cloneElement(e,t):typeof e=="function"?I.createElement(e,t):I.createElement(bX,t)}var Gn=(function(e){function t(){return zX(this,t),IX(this,t,arguments)}return VX(t,e),BX(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,l=i.allowEscapeViewBox,u=i.animationDuration,d=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,O=i.reverseDirection,T=i.useTranslate3d,_=i.viewBox,C=i.wrapperStyle,A=S??[];y&&A.length&&(A=cz(S.filter(function(M){return M.value!=null&&(M.hide!==!0||r.props.includeHidden)}),w,FX));var E=A.length>0;return I.createElement(DX,{allowEscapeViewBox:l,animationDuration:u,animationEasing:d,isAnimationActive:g,active:o,coordinate:m,hasPayload:E,offset:j,position:b,reverseDirection:O,useTranslate3d:T,viewBox:_,wrapperStyle:C},GX(h,TP(TP({},this.props),{},{payload:A})))}}])})(P.PureComponent);Ew(Gn,"displayName","Tooltip");Ew(Gn,"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 i0,EP;function KX(){if(EP)return i0;EP=1;var e=ea(),t=function(){return e.Date.now()};return i0=t,i0}var s0,NP;function YX(){if(NP)return s0;NP=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return s0=t,s0}var o0,CP;function XX(){if(CP)return o0;CP=1;var e=YX(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return o0=n,o0}var l0,MP;function bz(){if(MP)return l0;MP=1;var e=XX(),t=Mi(),n=El(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function d(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 l0=d,l0}var c0,PP;function WX(){if(PP)return c0;PP=1;var e=Mi(),t=KX(),n=bz(),r="Expected a function",i=Math.max,o=Math.min;function l(u,d,h){var m,y,g,j,S,w,b=0,O=!1,T=!1,_=!0;if(typeof u!="function")throw new TypeError(r);d=n(d)||0,e(h)&&(O=!!h.leading,T="maxWait"in h,g=T?i(n(h.maxWait)||0,d):g,_="trailing"in h?!!h.trailing:_);function C(G){var X=m,Y=y;return m=y=void 0,b=G,j=u.apply(Y,X),j}function A(G){return b=G,S=setTimeout(D,d),O?C(G):j}function E(G){var X=G-w,Y=G-b,L=d-X;return T?o(L,g-Y):L}function M(G){var X=G-w,Y=G-b;return w===void 0||X>=d||X<0||T&&Y>=g}function D(){var G=t();if(M(G))return k(G);S=setTimeout(D,E(G))}function k(G){return S=void 0,_&&m?C(G):(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 G=t(),X=M(G);if(m=arguments,y=this,w=G,X){if(S===void 0)return A(w);if(T)return clearTimeout(S),S=setTimeout(D,d),C(w)}return S===void 0&&(S=setTimeout(D,d)),j}return $.cancel=B,$.flush=q,$}return c0=l,c0}var u0,RP;function ZX(){if(RP)return u0;RP=1;var e=WX(),t=Mi(),n="Expected a function";function r(i,o,l){var u=!0,d=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(u="leading"in l?!!l.leading:u,d="trailing"in l?!!l.trailing:d),e(i,o,{leading:u,maxWait:o,trailing:d})}return u0=r,u0}var QX=ZX();const jz=at(QX);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 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 Bd(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){JX(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 JX(e,t,n){return t=eW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eW(e){var t=tW(e,"string");return vu(t)=="symbol"?t:t+""}function tW(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 nW(e,t){return sW(e)||iW(e,t)||aW(e,t)||rW()}function rW(){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 aW(e,t){if(e){if(typeof e=="string")return DP(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 DP(e,t)}}function DP(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 iW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function sW(e){if(Array.isArray(e))return e}var Dh=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,d=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,O=e.className,T=e.onResize,_=e.style,C=_===void 0?{}:_,A=P.useRef(null),E=P.useRef();E.current=T,P.useImperativeHandle(t,function(){return Object.defineProperty(A.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),A.current},configurable:!0})});var M=P.useState({containerWidth:i.width,containerHeight:i.height}),D=nW(M,2),k=D[0],B=D[1],q=P.useCallback(function(G,X){B(function(Y){var L=Math.round(G),H=Math.round(X);return Y.containerWidth===L&&Y.containerHeight===H?Y:{containerWidth:L,containerHeight:H}})},[]);P.useEffect(function(){var G=function(ae){var oe,z=ae[0].contentRect,F=z.width,re=z.height;q(F,re),(oe=E.current)===null||oe===void 0||oe.call(E,F,re)};w>0&&(G=jz(G,w,{trailing:!0,leading:!1}));var X=new ResizeObserver(G),Y=A.current.getBoundingClientRect(),L=Y.width,H=Y.height;return q(L,H),X.observe(A.current),function(){X.disconnect()}},[q,w]);var $=P.useMemo(function(){var G=k.containerWidth,X=k.containerHeight;if(G<0||X<0)return null;Pr(ds(l)||ds(d),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,l,d),Pr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var Y=ds(l)?G:l,L=ds(d)?X:d;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,d,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,Bd({width:Y,height:L},H?{style:Bd({height:"100%",width:"100%",maxHeight:L,maxWidth:Y},Q.props.style)}:{})):Q})},[n,j,d,g,y,m,k,l]);return I.createElement("div",{id:b?"".concat(b):void 0,className:Pe("recharts-responsive-container",O),style:Bd(Bd({},C),{},{width:l,height:d,minWidth:m,minHeight:y,maxHeight:g}),ref:A},$)}),Wp=function(t){return null};Wp.displayName="Cell";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 LP(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 sj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LP(Object(n),!0).forEach(function(r){oW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oW(e,t,n){return t=lW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lW(e){var t=cW(e,"string");return gu(t)=="symbol"?t:t+""}function cW(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)}var jo={widthCache:{},cacheCount:0},uW=2e3,fW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},zP="recharts_measurement_span";function dW(e){var t=sj({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var tu=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=dW(n),i=JSON.stringify({text:t,copyStyle:r});if(jo.widthCache[i])return jo.widthCache[i];try{var o=document.getElementById(zP);o||(o=document.createElement("span"),o.setAttribute("id",zP),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=sj(sj({},fW),r);Object.assign(o.style,l),o.textContent="".concat(t);var u=o.getBoundingClientRect(),d={width:u.width,height:u.height};return jo.widthCache[i]=d,++jo.cacheCount>uW&&(jo.cacheCount=0,jo.widthCache={}),d}catch{return{width:0,height:0}}},hW=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function xu(e){"@babel/helpers - typeof";return xu=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},xu(e)}function Lh(e,t){return vW(e)||yW(e,t)||mW(e,t)||pW()}function pW(){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 mW(e,t){if(e){if(typeof e=="string")return $P(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 $P(e,t)}}function $P(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 yW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function vW(e){if(Array.isArray(e))return e}function gW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BP(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,bW(r.key),r)}}function xW(e,t,n){return t&&BP(e.prototype,t),n&&BP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bW(e){var t=jW(e,"string");return xu(t)=="symbol"?t:t+""}function jW(e,t){if(xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var IP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,SW=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,wW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Sz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},AW=Object.keys(Sz),Mo="NaN";function OW(e,t){return e*Sz[t]}var Id=(function(){function e(t,n){gW(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!SW.test(n)&&(this.num=NaN,this.unit=""),AW.includes(n)&&(this.num=OW(t,n),this.unit="px")}return xW(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=wW.exec(n))!==null&&r!==void 0?r:[],o=Lh(i,3),l=o[1],u=o[2];return new e(parseFloat(l),u??"")}}])})();function wz(e){if(e.includes(Mo))return Mo;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=IP.exec(t))!==null&&n!==void 0?n:[],i=Lh(r,4),o=i[1],l=i[2],u=i[3],d=Id.parse(o??""),h=Id.parse(u??""),m=l==="*"?d.multiply(h):d.divide(h);if(m.isNaN())return Mo;t=t.replace(IP,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var y,g=(y=qP.exec(t))!==null&&y!==void 0?y:[],j=Lh(g,4),S=j[1],w=j[2],b=j[3],O=Id.parse(S??""),T=Id.parse(b??""),_=w==="+"?O.add(T):O.subtract(T);if(_.isNaN())return Mo;t=t.replace(qP,_.toString())}return t}var UP=/\(([^()]*)\)/;function _W(e){for(var t=e;t.includes("(");){var n=UP.exec(t),r=Lh(n,2),i=r[1];t=t.replace(UP,wz(i))}return t}function TW(e){var t=e.replace(/\s+/g,"");return t=_W(t),t=wz(t),t}function EW(e){try{return TW(e)}catch{return Mo}}function f0(e){var t=EW(e.slice(5,-1));return t===Mo?"":t}var NW=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],CW=["dx","dy","angle","className","breakAll"];function oj(){return oj=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},oj.apply(this,arguments)}function VP(e,t){if(e==null)return{};var n=MW(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 MW(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(e,t){return DW(e)||kW(e,t)||RW(e,t)||PW()}function PW(){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 RW(e,t){if(e){if(typeof e=="string")return FP(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 FP(e,t)}}function FP(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 kW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function DW(e){if(Array.isArray(e))return e}var Az=/[ \f\n\r\t\v\u2028\u2029]+/,Oz=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(Az));var l=o.map(function(d){return{word:d,width:tu(d,i).width}}),u=r?0:tu(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:u}}catch{return null}},LW=function(t,n,r,i,o){var l=t.maxLines,u=t.children,d=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=Oz({breakAll:h,style:d,children:L+w}).wordsWithComputedWidth,Q=g(H),ae=Q.length>l||S(Q).width>Number(i);return[ae,Q]},O=0,T=y.length-1,_=0,C;O<=T&&_<=y.length-1;){var A=Math.floor((O+T)/2),E=A-1,M=b(E),D=HP(M,2),k=D[0],B=D[1],q=b(A),$=HP(q,1),G=$[0];if(!k&&!G&&(O=A+1),k&&G&&(T=A-1),!k&&G){C=B;break}_++}return C||j},GP=function(t){var n=Ne(t)?[]:t.toString().split(Az);return[{words:n}]},zW=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 d,h,m=Oz({breakAll:l,children:i,style:o});if(m){var y=m.wordsWithComputedWidth,g=m.spaceWidth;d=y,h=g}else return GP(i);return LW({breakAll:l,children:i,maxLines:u,style:o},d,h,n,r)}return GP(i)},KP="#808080",Os=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,d=t.capHeight,h=d===void 0?"0.71em":d,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,O=b===void 0?KP:b,T=VP(t,NW),_=P.useMemo(function(){return zW({breakAll:T.breakAll,children:T.children,maxLines:T.maxLines,scaleToFit:y,style:T.style,width:T.width})},[T.breakAll,T.children,T.maxLines,y,T.style,T.width]),C=T.dx,A=T.dy,E=T.angle,M=T.className,D=T.breakAll,k=VP(T,CW);if(!Kt(r)||!Kt(o))return null;var B=r+(ce(C)?C:0),q=o+(ce(A)?A:0),$;switch(w){case"start":$=f0("calc(".concat(h,")"));break;case"middle":$=f0("calc(".concat((_.length-1)/2," * -").concat(u," + (").concat(h," / 2))"));break;default:$=f0("calc(".concat(_.length-1," * -").concat(u,")"));break}var G=[];if(y){var X=_[0].width,Y=T.width;G.push("scale(".concat((ce(Y)?Y/X:1)/X,")"))}return E&&G.push("rotate(".concat(E,", ").concat(B,", ").concat(q,")")),G.length&&(k.transform=G.join(" ")),I.createElement("text",oj({},je(k,!0),{x:B,y:q,className:Pe("recharts-text",M),textAnchor:j,fill:O.includes("url")?KP:O}),_.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 $W(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Nw(e){let t,n,r;e.length!==2?(t=Ai,n=(u,d)=>Ai(e(u),d),r=(u,d)=>e(u)-d):(t=e===Ai||e===$W?e:BW,n=e,r=e);function i(u,d,h=0,m=u.length){if(h<m){if(t(d,d)!==0)return m;do{const y=h+m>>>1;n(u[y],d)<0?h=y+1:m=y}while(h<m)}return h}function o(u,d,h=0,m=u.length){if(h<m){if(t(d,d)!==0)return m;do{const y=h+m>>>1;n(u[y],d)<=0?h=y+1:m=y}while(h<m)}return h}function l(u,d,h=0,m=u.length){const y=i(u,d,h,m-1);return y>h&&r(u[y-1],d)>-r(u[y],d)?y-1:y}return{left:i,center:l,right:o}}function BW(){return 0}function _z(e){return e===null?NaN:+e}function*IW(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const qW=Nw(Ai),rf=qW.right;Nw(_z).center;class YP extends Map{constructor(t,n=HW){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(XP(this,t))}has(t){return super.has(XP(this,t))}set(t,n){return super.set(UW(this,t),n)}delete(t){return super.delete(VW(this,t))}}function XP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function UW({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function VW({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function HW(e){return e!==null&&typeof e=="object"?e.valueOf():e}function FW(e=Ai){if(e===Ai)return Tz;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 Tz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const GW=Math.sqrt(50),KW=Math.sqrt(10),YW=Math.sqrt(2);function zh(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>=GW?10:o>=KW?5:o>=YW?2:1;let u,d,h;return i<0?(h=Math.pow(10,-i)/l,u=Math.round(e*h),d=Math.round(t*h),u/h<e&&++u,d/h>t&&--d,h=-h):(h=Math.pow(10,i)*l,u=Math.round(e/h),d=Math.round(t/h),u*h<e&&++u,d*h>t&&--d),d<u&&.5<=n&&n<2?zh(e,t,n*2):[u,d,h]}function lj(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?zh(t,e,n):zh(e,t,n);if(!(o>=i))return[];const u=o-i+1,d=new Array(u);if(r)if(l<0)for(let h=0;h<u;++h)d[h]=(o-h)/-l;else for(let h=0;h<u;++h)d[h]=(o-h)*l;else if(l<0)for(let h=0;h<u;++h)d[h]=(i+h)/-l;else for(let h=0;h<u;++h)d[h]=(i+h)*l;return d}function cj(e,t,n){return t=+t,e=+e,n=+n,zh(e,t,n)[2]}function uj(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?cj(t,e,n):cj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function WP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function ZP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Ez(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?Tz:FW(i);r>n;){if(r-n>600){const d=r-n+1,h=t-n+1,m=Math.log(d),y=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*y*(d-y)/d)*(h-d/2<0?-1:1),j=Math.max(n,Math.floor(t-h*y/d+g)),S=Math.min(r,Math.floor(t+(d-h)*y/d+g));Ez(e,t,j,S,i)}const o=e[t];let l=n,u=r;for(Lc(e,n,t),i(e[r],o)>0&&Lc(e,n,r);l<u;){for(Lc(e,l,u),++l,--u;i(e[l],o)<0;)++l;for(;i(e[u],o)>0;)--u}i(e[n],o)===0?Lc(e,n,u):(++u,Lc(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Lc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function XW(e,t,n){if(e=Float64Array.from(IW(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return ZP(e);if(t>=1)return WP(e);var r,i=(r-1)*t,o=Math.floor(i),l=WP(Ez(e,o).subarray(0,o+1)),u=ZP(e.subarray(o+1));return l+(u-l)*(i-o)}}function WW(e,t,n=_z){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 ZW(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 fj=Symbol("implicit");function Cw(){var e=new YP,t=[],n=[],r=fj;function i(o){let l=e.get(o);if(l===void 0){if(r!==fj)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 YP;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 Cw(t,n).unknown(r)},vr.apply(i,arguments),i}function bu(){var e=Cw().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,u=!1,d=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-d+h*2),u&&(o=Math.floor(o)),S+=(w-S-o*(g-d))*m,l=o*(1-d),u&&(S=Math.round(S),l=Math.round(l));var b=ZW(g).map(function(O){return S+o*O});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?(d=Math.min(1,h=+g),y()):d},e.paddingInner=function(g){return arguments.length?(d=Math.min(1,g),y()):d},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 bu(t(),[r,i]).round(u).paddingInner(d).paddingOuter(h).align(m)},vr.apply(y(),arguments)}function Nz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Nz(t())},e}function nu(){return Nz(bu.apply(null,arguments).paddingInner(1))}function Mw(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function af(){}var ju=.7,$h=1/ju,qo="\\s*([+-]?\\d+)\\s*",Su="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",QW=/^#([0-9a-f]{3,8})$/,JW=new RegExp(`^rgb\\(${qo},${qo},${qo}\\)$`),eZ=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),tZ=new RegExp(`^rgba\\(${qo},${qo},${qo},${Su}\\)$`),nZ=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${Su}\\)$`),rZ=new RegExp(`^hsl\\(${Su},${Yr},${Yr}\\)$`),aZ=new RegExp(`^hsla\\(${Su},${Yr},${Yr},${Su}\\)$`),QP={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};Mw(af,wu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:JP,formatHex:JP,formatHex8:iZ,formatHsl:sZ,formatRgb:eR,toString:eR});function JP(){return this.rgb().formatHex()}function iZ(){return this.rgb().formatHex8()}function sZ(){return Mz(this).formatHsl()}function eR(){return this.rgb().formatRgb()}function wu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=QW.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tR(t):n===3?new Cn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?qd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?qd(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=JW.exec(e))?new Cn(t[1],t[2],t[3],1):(t=eZ.exec(e))?new Cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tZ.exec(e))?qd(t[1],t[2],t[3],t[4]):(t=nZ.exec(e))?qd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=rZ.exec(e))?aR(t[1],t[2]/100,t[3]/100,1):(t=aZ.exec(e))?aR(t[1],t[2]/100,t[3]/100,t[4]):QP.hasOwnProperty(e)?tR(QP[e]):e==="transparent"?new Cn(NaN,NaN,NaN,0):null}function tR(e){return new Cn(e>>16&255,e>>8&255,e&255,1)}function qd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Cn(e,t,n,r)}function oZ(e){return e instanceof af||(e=wu(e)),e?(e=e.rgb(),new Cn(e.r,e.g,e.b,e.opacity)):new Cn}function dj(e,t,n,r){return arguments.length===1?oZ(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}Mw(Cn,dj,Cz(af,{brighter(e){return e=e==null?$h:Math.pow($h,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ju:Math.pow(ju,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cn(xs(this.r),xs(this.g),xs(this.b),Bh(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:nR,formatHex:nR,formatHex8:lZ,formatRgb:rR,toString:rR}));function nR(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}`}function lZ(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}${hs((isNaN(this.opacity)?1:this.opacity)*255)}`}function rR(){const e=Bh(this.opacity);return`${e===1?"rgb(":"rgba("}${xs(this.r)}, ${xs(this.g)}, ${xs(this.b)}${e===1?")":`, ${e})`}`}function Bh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hs(e){return e=xs(e),(e<16?"0":"")+e.toString(16)}function aR(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 Mz(e){if(e instanceof Er)return new Er(e.h,e.s,e.l,e.opacity);if(e instanceof af||(e=wu(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,d=(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/=d<.5?o+i:2-o-i,l*=60):u=d>0&&d<1?0:l,new Er(l,u,d,e.opacity)}function cZ(e,t,n,r){return arguments.length===1?Mz(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}Mw(Er,cZ,Cz(af,{brighter(e){return e=e==null?$h:Math.pow($h,e),new Er(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ju:Math.pow(ju,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(d0(e>=240?e-240:e+120,i,r),d0(e,i,r),d0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Er(iR(this.h),Ud(this.s),Ud(this.l),Bh(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=Bh(this.opacity);return`${e===1?"hsl(":"hsla("}${iR(this.h)}, ${Ud(this.s)*100}%, ${Ud(this.l)*100}%${e===1?")":`, ${e})`}`}}));function iR(e){return e=(e||0)%360,e<0?e+360:e}function Ud(e){return Math.max(0,Math.min(1,e||0))}function d0(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 Pw=e=>()=>e;function uZ(e,t){return function(n){return e+n*t}}function fZ(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 dZ(e){return(e=+e)==1?Pz:function(t,n){return n-t?fZ(t,n,e):Pw(isNaN(t)?n:t)}}function Pz(e,t){var n=t-e;return n?uZ(e,n):Pw(isNaN(e)?t:e)}const sR=(function e(t){var n=dZ(t);function r(i,o){var l=n((i=dj(i)).r,(o=dj(o)).r),u=n(i.g,o.g),d=n(i.b,o.b),h=Pz(i.opacity,o.opacity);return function(m){return i.r=l(m),i.g=u(m),i.b=d(m),i.opacity=h(m),i+""}}return r.gamma=e,r})(1);function hZ(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 pZ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mZ(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]=Pl(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 yZ(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ih(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vZ(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]=Pl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var hj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,h0=new RegExp(hj.source,"g");function gZ(e){return function(){return e}}function xZ(e){return function(t){return e(t)+""}}function bZ(e,t){var n=hj.lastIndex=h0.lastIndex=0,r,i,o,l=-1,u=[],d=[];for(e=e+"",t=t+"";(r=hj.exec(e))&&(i=h0.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,d.push({i:l,x:Ih(r,i)})),n=h0.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?d[0]?xZ(d[0].x):gZ(t):(t=d.length,function(h){for(var m=0,y;m<t;++m)u[(y=d[m]).i]=y.x(h);return u.join("")})}function Pl(e,t){var n=typeof t,r;return t==null||n==="boolean"?Pw(t):(n==="number"?Ih:n==="string"?(r=wu(t))?(t=r,sR):bZ:t instanceof wu?sR:t instanceof Date?yZ:pZ(t)?hZ:Array.isArray(t)?mZ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?vZ:Ih)(e,t)}function Rw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function jZ(e,t){t===void 0&&(t=e,e=Pl);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 SZ(e){return function(){return e}}function qh(e){return+e}var oR=[0,1];function Sn(e){return e}function pj(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:SZ(isNaN(t)?NaN:.5)}function wZ(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function AZ(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=pj(i,r),o=n(l,o)):(r=pj(r,i),o=n(o,l)),function(u){return o(r(u))}}function OZ(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]=pj(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var d=rf(e,u,1,r)-1;return o[d](i[d](u))}}function sf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zp(){var e=oR,t=oR,n=Pl,r,i,o,l=Sn,u,d,h;function m(){var g=Math.min(e.length,t.length);return l!==Sn&&(l=wZ(e[0],e[g-1])),u=g>2?OZ:AZ,d=h=null,y}function y(g){return g==null||isNaN(g=+g)?o:(d||(d=u(e.map(r),t,n)))(r(l(g)))}return y.invert=function(g){return l(i((h||(h=u(t,e.map(r),Ih)))(g)))},y.domain=function(g){return arguments.length?(e=Array.from(g,qh),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=Rw,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 kw(){return Zp()(Sn,Sn)}function _Z(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Uh(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 Qo(e){return e=Uh(Math.abs(e)),e?e[1]:NaN}function TZ(e,t){return function(n,r){for(var i=n.length,o=[],l=0,u=e[0],d=0;i>0&&u>0&&(d+u+1>r&&(u=Math.max(1,r-d)),o.push(n.substring(i-=u,i+u)),!((d+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function EZ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var NZ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Au(e){if(!(t=NZ.exec(e)))throw new Error("invalid format: "+e);var t;return new Dw({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]})}Au.prototype=Dw.prototype;function Dw(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+""}Dw.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 CZ(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 Vh;function MZ(e,t){var n=Uh(e,t);if(!n)return Vh=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(Vh=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")+Uh(e,Math.max(0,t+o-1))[0]}function lR(e,t){var n=Uh(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 cR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:_Z,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)=>lR(e*100,t),r:lR,s:MZ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uR(e){return e}var fR=Array.prototype.map,dR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function PZ(e){var t=e.grouping===void 0||e.thousands===void 0?uR:TZ(fR.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?uR:EZ(fR.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function h(y,g){y=Au(y);var j=y.fill,S=y.align,w=y.sign,b=y.symbol,O=y.zero,T=y.width,_=y.comma,C=y.precision,A=y.trim,E=y.type;E==="n"?(_=!0,E="g"):cR[E]||(C===void 0&&(C=12),A=!0,E="g"),(O||j==="0"&&S==="=")&&(O=!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=cR[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 G=M,X=D,Y,L,H;if(E==="c")X=k($)+X,$="";else{$=+$;var Q=$<0||1/$<0;if($=isNaN($)?d:k(Math.abs($),C),A&&($=CZ($)),Q&&+$==0&&w!=="+"&&(Q=!1),G=(Q?w==="("?w:u:w==="-"||w==="("?"":w)+G,X=(E==="s"&&!isNaN($)&&Vh!==void 0?dR[8+Vh/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}}}_&&!O&&($=t($,1/0));var ae=G.length+$.length+X.length,oe=ae<T?new Array(T-ae+1).join(j):"";switch(_&&O&&($=t(oe+$,oe.length?T-X.length:1/0),oe=""),S){case"<":$=G+$+X+oe;break;case"=":$=G+oe+$+X;break;case"^":$=oe.slice(0,ae=oe.length>>1)+G+$+X+oe.slice(ae);break;default:$=oe+G+$+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(Qo(g)/3)))*3,S=Math.pow(10,-j),w=h((y=Au(y),y.type="f",y),{suffix:dR[8+j/3]});return function(b){return w(S*b)}}return{format:h,formatPrefix:m}}var Vd,Lw,Rz;RZ({thousands:",",grouping:[3],currency:["$",""]});function RZ(e){return Vd=PZ(e),Lw=Vd.format,Rz=Vd.formatPrefix,Vd}function kZ(e){return Math.max(0,-Qo(Math.abs(e)))}function DZ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qo(t)/3)))*3-Qo(Math.abs(e)))}function LZ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qo(t)-Qo(e))+1}function kz(e,t,n,r){var i=uj(e,t,n),o;switch(r=Au(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=DZ(i,l))&&(r.precision=o),Rz(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=LZ(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=kZ(i))&&(r.precision=o-(r.type==="%")*2);break}}return Lw(r)}function Ri(e){var t=e.domain;return e.ticks=function(n){var r=t();return lj(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return kz(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],d,h,m=10;for(u<l&&(h=l,l=u,u=h,h=i,i=o,o=h);m-- >0;){if(h=cj(l,u,n),h===d)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;d=h}return e},e}function Hh(){var e=kw();return e.copy=function(){return sf(e,Hh())},vr.apply(e,arguments),Ri(e)}function Dz(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,qh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Dz(e).unknown(t)},e=arguments.length?Array.from(e,qh):[0,1],Ri(n)}function Lz(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 hR(e){return Math.log(e)}function pR(e){return Math.exp(e)}function zZ(e){return-Math.log(-e)}function $Z(e){return-Math.exp(-e)}function BZ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function IZ(e){return e===10?BZ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function qZ(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 mR(e){return(t,n)=>-e(-t,n)}function zw(e){const t=e(hR,pR),n=t.domain;let r=10,i,o;function l(){return i=qZ(r),o=IZ(r),n()[0]<0?(i=mR(i),o=mR(o),e(zZ,$Z)):e(hR,pR),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 d=n();let h=d[0],m=d[d.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 O=[];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;O.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;O.push(w)}O.length*2<b&&(O=lj(h,m,b))}else O=lj(g,j,Math.min(j-g,b)).map(o);return y?O.reverse():O},t.tickFormat=(u,d)=>{if(u==null&&(u=10),d==null&&(d=r===10?"s":","),typeof d!="function"&&(!(r%1)&&(d=Au(d)).precision==null&&(d.trim=!0),d=Lw(d)),u===1/0)return d;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?d(m):""}},t.nice=()=>n(Lz(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function zz(){const e=zw(Zp()).domain([1,10]);return e.copy=()=>sf(e,zz()).base(e.base()),vr.apply(e,arguments),e}function yR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $w(e){var t=1,n=e(yR(t),vR(t));return n.constant=function(r){return arguments.length?e(yR(t=+r),vR(t)):t},Ri(n)}function $z(){var e=$w(Zp());return e.copy=function(){return sf(e,$z()).constant(e.constant())},vr.apply(e,arguments)}function gR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function UZ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function VZ(e){return e<0?-e*e:e*e}function Bw(e){var t=e(Sn,Sn),n=1;function r(){return n===1?e(Sn,Sn):n===.5?e(UZ,VZ):e(gR(n),gR(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ri(t)}function Iw(){var e=Bw(Zp());return e.copy=function(){return sf(e,Iw()).exponent(e.exponent())},vr.apply(e,arguments),e}function HZ(){return Iw.apply(null,arguments).exponent(.5)}function xR(e){return Math.sign(e)*e*e}function FZ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Bz(){var e=kw(),t=[0,1],n=!1,r;function i(o){var l=FZ(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(xR(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,qh)).map(xR)),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 Bz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},vr.apply(i,arguments),Ri(i)}function Iz(){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]=WW(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[rf(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 Iz().domain(e).range(t).unknown(r)},vr.apply(o,arguments)}function qz(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(d){return d!=null&&d<=d?i[rf(r,d,0,n)]:o}function u(){var d=-1;for(r=new Array(n);++d<n;)r[d]=((d+1)*t-(d-n)*e)/(n+1);return l}return l.domain=function(d){return arguments.length?([e,t]=d,e=+e,t=+t,u()):[e,t]},l.range=function(d){return arguments.length?(n=(i=Array.from(d)).length-1,u()):i.slice()},l.invertExtent=function(d){var h=i.indexOf(d);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},l.unknown=function(d){return arguments.length&&(o=d),l},l.thresholds=function(){return r.slice()},l.copy=function(){return qz().domain([e,t]).range(i).unknown(o)},vr.apply(Ri(l),arguments)}function Uz(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[rf(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 Uz().domain(e).range(t).unknown(n)},vr.apply(i,arguments)}const p0=new Date,m0=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 d=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return d;let h;do d.push(h=new Date(+o)),t(o,u),e(o);while(h<o&&o<l);return d},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)=>(p0.setTime(+o),m0.setTime(+l),e(p0),e(m0),Math.floor(n(p0,m0))),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 Fh=Xt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Fh.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):Fh);Fh.range;const Oa=1e3,hr=Oa*60,_a=hr*60,Ra=_a*24,qw=Ra*7,bR=Ra*30,y0=Ra*365,ps=Xt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Oa)},(e,t)=>(t-e)/Oa,e=>e.getUTCSeconds());ps.range;const Uw=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());Uw.range;const Vw=Xt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*hr)},(e,t)=>(t-e)/hr,e=>e.getUTCMinutes());Vw.range;const Hw=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());Hw.range;const Fw=Xt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*_a)},(e,t)=>(t-e)/_a,e=>e.getUTCHours());Fw.range;const of=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);of.range;const Qp=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ra,e=>e.getUTCDate()-1);Qp.range;const Vz=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));Vz.range;function Rs(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)/qw)}const Jp=Rs(0),Gh=Rs(1),GZ=Rs(2),KZ=Rs(3),Jo=Rs(4),YZ=Rs(5),XZ=Rs(6);Jp.range;Gh.range;GZ.range;KZ.range;Jo.range;YZ.range;XZ.range;function ks(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)/qw)}const em=ks(0),Kh=ks(1),WZ=ks(2),ZZ=ks(3),el=ks(4),QZ=ks(5),JZ=ks(6);em.range;Kh.range;WZ.range;ZZ.range;el.range;QZ.range;JZ.range;const Gw=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());Gw.range;const Kw=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());Kw.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 Hz(e,t,n,r,i,o){const l=[[ps,1,Oa],[ps,5,5*Oa],[ps,15,15*Oa],[ps,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,qw],[t,1,bR],[t,3,3*bR],[e,1,y0]];function u(h,m,y){const g=m<h;g&&([h,m]=[m,h]);const j=y&&typeof y.range=="function"?y:d(h,m,y),S=j?j.range(h,+m+1):[];return g?S.reverse():S}function d(h,m,y){const g=Math.abs(m-h)/y,j=Nw(([,,b])=>b).right(l,g);if(j===l.length)return e.every(uj(h/y0,m/y0,y));if(j===0)return Fh.every(Math.max(uj(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,d]}const[eQ,tQ]=Hz(Da,Kw,em,Vz,Fw,Vw),[nQ,rQ]=Hz(ka,Gw,Jp,of,Hw,Uw);function v0(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 g0(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 zc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function aQ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,d=e.shortMonths,h=$c(i),m=Bc(i),y=$c(o),g=Bc(o),j=$c(l),S=Bc(l),w=$c(u),b=Bc(u),O=$c(d),T=Bc(d),_={a:H,A:Q,b:ae,B:oe,c:null,d:_R,e:_R,f:TQ,g:zQ,G:BQ,H:AQ,I:OQ,j:_Q,L:Fz,m:EQ,M:NQ,p:z,q:F,Q:NR,s:CR,S:CQ,u:MQ,U:PQ,V:RQ,w:kQ,W:DQ,x:null,X:null,y:LQ,Y:$Q,Z:IQ,"%":ER},C={a:re,A:fe,b:me,B:we,c:null,d:TR,e:TR,f:HQ,g:eJ,G:nJ,H:qQ,I:UQ,j:VQ,L:Kz,m:FQ,M:GQ,p:ze,q:Ze,Q:NR,s:CR,S:KQ,u:YQ,U:XQ,V:WQ,w:ZQ,W:QQ,x:null,X:null,y:JQ,Y:tJ,Z:rJ,"%":ER},A={a:B,A:q,b:$,B:G,c:X,d:AR,e:AR,f:bQ,g:wR,G:SR,H:OR,I:OR,j:yQ,L:xQ,m:mQ,M:vQ,p:k,q:pQ,Q:SQ,s:wQ,S:gQ,u:cQ,U:uQ,V:fQ,w:lQ,W:dQ,x:Y,X:L,y:wR,Y:SR,Z:hQ,"%":jQ};_.x=E(n,_),_.X=E(r,_),_.c=E(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,_t=ue.length,Tt,dn,gr;for(Ce instanceof Date||(Ce=new Date(+Ce));++yt<_t;)ue.charCodeAt(yt)===37&&(le.push(ue.slice(ke,yt)),(dn=jR[Tt=ue.charAt(++yt)])!=null?Tt=ue.charAt(++yt):dn=Tt==="e"?" ":"0",(gr=Ee[Tt])&&(Tt=gr(Ce,dn)),le.push(Tt),ke=yt+1);return le.push(ue.slice(ke,yt)),le.join("")}}function M(ue,Ee){return function(Ce){var le=zc(1900,void 0,1),yt=D(le,ue,Ce+="",0),ke,_t;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=g0(zc(le.y,0,1)),_t=ke.getUTCDay(),ke=_t>4||_t===0?Kh.ceil(ke):Kh(ke),ke=Qp.offset(ke,(le.V-1)*7),le.y=ke.getUTCFullYear(),le.m=ke.getUTCMonth(),le.d=ke.getUTCDate()+(le.w+6)%7):(ke=v0(zc(le.y,0,1)),_t=ke.getDay(),ke=_t>4||_t===0?Gh.ceil(ke):Gh(ke),ke=of.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),_t="Z"in le?g0(zc(le.y,0,1)).getUTCDay():v0(zc(le.y,0,1)).getDay(),le.m=0,le.d="W"in le?(le.w+6)%7+le.W*7-(_t+5)%7:le.w+le.U*7-(_t+6)%7);return"Z"in le?(le.H+=le.Z/100|0,le.M+=le.Z%100,g0(le)):v0(le)}}function D(ue,Ee,Ce,le){for(var yt=0,ke=Ee.length,_t=Ce.length,Tt,dn;yt<ke;){if(le>=_t)return-1;if(Tt=Ee.charCodeAt(yt++),Tt===37){if(Tt=Ee.charAt(yt++),dn=A[Tt in jR?Ee.charAt(yt++):Tt],!dn||(le=dn(ue,Ce,le))<0)return-1}else if(Tt!=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=O.exec(Ee.slice(Ce));return le?(ue.m=T.get(le[0].toLowerCase()),Ce+le[0].length):-1}function G(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 d[ue.getMonth()]}function oe(ue){return u[ue.getMonth()]}function z(ue){return i[+(ue.getHours()>=12)]}function F(ue){return 1+~~(ue.getMonth()/3)}function re(ue){return l[ue.getUTCDay()]}function fe(ue){return o[ue.getUTCDay()]}function me(ue){return d[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+="",_);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 jR={"-":"",_:" ",0:"0"},tn=/^\s*\d+/,iQ=/^%/,sQ=/[\\^$*+?|[\]().{}]/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 oQ(e){return e.replace(sQ,"\\$&")}function $c(e){return new RegExp("^(?:"+e.map(oQ).join("|")+")","i")}function Bc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function lQ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function cQ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function uQ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function fQ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function dQ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function SR(e,t,n){var r=tn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wR(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function hQ(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 pQ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function mQ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function AR(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yQ(e,t,n){var r=tn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function OR(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function vQ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function gQ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function xQ(e,t,n){var r=tn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function bQ(e,t,n){var r=tn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function jQ(e,t,n){var r=iQ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function SQ(e,t,n){var r=tn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function wQ(e,t,n){var r=tn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function _R(e,t){return Ye(e.getDate(),t,2)}function AQ(e,t){return Ye(e.getHours(),t,2)}function OQ(e,t){return Ye(e.getHours()%12||12,t,2)}function _Q(e,t){return Ye(1+of.count(ka(e),e),t,3)}function Fz(e,t){return Ye(e.getMilliseconds(),t,3)}function TQ(e,t){return Fz(e,t)+"000"}function EQ(e,t){return Ye(e.getMonth()+1,t,2)}function NQ(e,t){return Ye(e.getMinutes(),t,2)}function CQ(e,t){return Ye(e.getSeconds(),t,2)}function MQ(e){var t=e.getDay();return t===0?7:t}function PQ(e,t){return Ye(Jp.count(ka(e)-1,e),t,2)}function Gz(e){var t=e.getDay();return t>=4||t===0?Jo(e):Jo.ceil(e)}function RQ(e,t){return e=Gz(e),Ye(Jo.count(ka(e),e)+(ka(e).getDay()===4),t,2)}function kQ(e){return e.getDay()}function DQ(e,t){return Ye(Gh.count(ka(e)-1,e),t,2)}function LQ(e,t){return Ye(e.getFullYear()%100,t,2)}function zQ(e,t){return e=Gz(e),Ye(e.getFullYear()%100,t,2)}function $Q(e,t){return Ye(e.getFullYear()%1e4,t,4)}function BQ(e,t){var n=e.getDay();return e=n>=4||n===0?Jo(e):Jo.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function IQ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function TR(e,t){return Ye(e.getUTCDate(),t,2)}function qQ(e,t){return Ye(e.getUTCHours(),t,2)}function UQ(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function VQ(e,t){return Ye(1+Qp.count(Da(e),e),t,3)}function Kz(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function HQ(e,t){return Kz(e,t)+"000"}function FQ(e,t){return Ye(e.getUTCMonth()+1,t,2)}function GQ(e,t){return Ye(e.getUTCMinutes(),t,2)}function KQ(e,t){return Ye(e.getUTCSeconds(),t,2)}function YQ(e){var t=e.getUTCDay();return t===0?7:t}function XQ(e,t){return Ye(em.count(Da(e)-1,e),t,2)}function Yz(e){var t=e.getUTCDay();return t>=4||t===0?el(e):el.ceil(e)}function WQ(e,t){return e=Yz(e),Ye(el.count(Da(e),e)+(Da(e).getUTCDay()===4),t,2)}function ZQ(e){return e.getUTCDay()}function QQ(e,t){return Ye(Kh.count(Da(e)-1,e),t,2)}function JQ(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function eJ(e,t){return e=Yz(e),Ye(e.getUTCFullYear()%100,t,2)}function tJ(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function nJ(e,t){var n=e.getUTCDay();return e=n>=4||n===0?el(e):el.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function rJ(){return"+0000"}function ER(){return"%"}function NR(e){return+e}function CR(e){return Math.floor(+e/1e3)}var So,Xz,Wz;aJ({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 aJ(e){return So=aQ(e),Xz=So.format,So.parse,Wz=So.utcFormat,So.utcParse,So}function iJ(e){return new Date(e)}function sJ(e){return e instanceof Date?+e:+new Date(+e)}function Yw(e,t,n,r,i,o,l,u,d,h){var m=kw(),y=m.invert,g=m.domain,j=h(".%L"),S=h(":%S"),w=h("%I:%M"),b=h("%I %p"),O=h("%a %d"),T=h("%b %d"),_=h("%B"),C=h("%Y");function A(E){return(d(E)<E?j:u(E)<E?S:l(E)<E?w:o(E)<E?b:r(E)<E?i(E)<E?O:T:n(E)<E?_:C)(E)}return m.invert=function(E){return new Date(y(E))},m.domain=function(E){return arguments.length?g(Array.from(E,sJ)):g().map(iJ)},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?A: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(Lz(M,E)):m},m.copy=function(){return sf(m,Yw(e,t,n,r,i,o,l,u,d,h))},m}function oJ(){return vr.apply(Yw(nQ,rQ,ka,Gw,Jp,of,Hw,Uw,ps,Xz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function lJ(){return vr.apply(Yw(eQ,tQ,Da,Kw,em,Qp,Fw,Vw,ps,Wz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function tm(){var e=0,t=1,n,r,i,o,l=Sn,u=!1,d;function h(y){return y==null||isNaN(y=+y)?d: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(Pl),h.rangeRound=m(Rw),h.unknown=function(y){return arguments.length?(d=y,h):d},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 Zz(){var e=Ri(tm()(Sn));return e.copy=function(){return ki(e,Zz())},Ba.apply(e,arguments)}function Qz(){var e=zw(tm()).domain([1,10]);return e.copy=function(){return ki(e,Qz()).base(e.base())},Ba.apply(e,arguments)}function Jz(){var e=$w(tm());return e.copy=function(){return ki(e,Jz()).constant(e.constant())},Ba.apply(e,arguments)}function Xw(){var e=Bw(tm());return e.copy=function(){return ki(e,Xw()).exponent(e.exponent())},Ba.apply(e,arguments)}function cJ(){return Xw.apply(null,arguments).exponent(.5)}function e5(){var e=[],t=Sn;function n(r){if(r!=null&&!isNaN(r=+r))return t((rf(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)=>XW(e,o/r))},n.copy=function(){return e5(t).domain(e)},Ba.apply(n,arguments)}function nm(){var e=0,t=.5,n=1,r=1,i,o,l,u,d,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:d),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),d=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 O,T,_;return arguments.length?([O,T,_]=b,h=jZ(w,[O,T,_]),j):[h(0),h(.5),h(1)]}}return j.range=S(Pl),j.rangeRound=S(Rw),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),d=o===l?0:.5/(l-o),r=o<i?-1:1,j}}function t5(){var e=Ri(nm()(Sn));return e.copy=function(){return ki(e,t5())},Ba.apply(e,arguments)}function n5(){var e=zw(nm()).domain([.1,1,10]);return e.copy=function(){return ki(e,n5()).base(e.base())},Ba.apply(e,arguments)}function r5(){var e=$w(nm());return e.copy=function(){return ki(e,r5()).constant(e.constant())},Ba.apply(e,arguments)}function Ww(){var e=Bw(nm());return e.copy=function(){return ki(e,Ww()).exponent(e.exponent())},Ba.apply(e,arguments)}function uJ(){return Ww.apply(null,arguments).exponent(.5)}const MR=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:bu,scaleDiverging:t5,scaleDivergingLog:n5,scaleDivergingPow:Ww,scaleDivergingSqrt:uJ,scaleDivergingSymlog:r5,scaleIdentity:Dz,scaleImplicit:fj,scaleLinear:Hh,scaleLog:zz,scaleOrdinal:Cw,scalePoint:nu,scalePow:Iw,scaleQuantile:Iz,scaleQuantize:qz,scaleRadial:Bz,scaleSequential:Zz,scaleSequentialLog:Qz,scaleSequentialPow:Xw,scaleSequentialQuantile:e5,scaleSequentialSqrt:cJ,scaleSequentialSymlog:Jz,scaleSqrt:HZ,scaleSymlog:$z,scaleThreshold:Uz,scaleTime:oJ,scaleUtc:lJ,tickFormat:kz},Symbol.toStringTag,{value:"Module"}));var x0,PR;function rm(){if(PR)return x0;PR=1;var e=El();function t(n,r,i){for(var o=-1,l=n.length;++o<l;){var u=n[o],d=r(u);if(d!=null&&(h===void 0?d===d&&!e(d):i(d,h)))var h=d,m=u}return m}return x0=t,x0}var b0,RR;function a5(){if(RR)return b0;RR=1;function e(t,n){return t>n}return b0=e,b0}var j0,kR;function fJ(){if(kR)return j0;kR=1;var e=rm(),t=a5(),n=Ml();function r(i){return i&&i.length?e(i,n,t):void 0}return j0=r,j0}var dJ=fJ();const ji=at(dJ);var S0,DR;function i5(){if(DR)return S0;DR=1;function e(t,n){return t<n}return S0=e,S0}var w0,LR;function hJ(){if(LR)return w0;LR=1;var e=rm(),t=i5(),n=Ml();function r(i){return i&&i.length?e(i,n,t):void 0}return w0=r,w0}var pJ=hJ();const am=at(pJ);var A0,zR;function mJ(){if(zR)return A0;zR=1;var e=dw(),t=ta(),n=pz(),r=Rn();function i(o,l){var u=r(o)?e:n;return u(o,t(l,3))}return A0=i,A0}var O0,$R;function yJ(){if($R)return O0;$R=1;var e=dz(),t=mJ();function n(r,i){return e(t(r,i),1)}return O0=n,O0}var vJ=yJ();const gJ=at(vJ);var _0,BR;function xJ(){if(BR)return _0;BR=1;var e=Ow();function t(n,r){return e(n,r)}return _0=t,_0}var bJ=xJ();const _s=at(bJ);var Rl=1e9,jJ={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Qw,wt=!0,yr="[DecimalError] ",bs=yr+"Invalid argument: ",Zw=yr+"Exponent out of range: ",kl=Math.floor,ls=Math.pow,SJ=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Kn,Qt=1e7,jt=7,s5=9007199254740991,Yh=kl(s5/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(Ou(n,o),Ou(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?c5(t,e):o5(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 l5(this)};ve.naturalLogarithm=ve.ln=function(){return Ou(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?o5(t,e):c5(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(bs+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,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(yr+"NaN")}for(e=qt(u),wt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Fr(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=kl((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 d(t)):r=new d(i.toString()),n=d.precision,i=l=n+3;;)if(o=r,r=o.plus(Na(u,o,l+2)).times(.5),Fr(o.d).slice(0,l)===(t=Fr(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,d,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,d=g.length,h=j.length,d<h&&(o=g,g=j,j=o,l=d,d=h,h=l),o=[],l=d+h,r=l;r--;)o.push(0);for(r=h;--r>=0;){for(t=0,i=d+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,Rl),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=Ts(r,!0):(Jr(e,0,Rl),t===void 0?t=i.rounding:Jr(t,0,8),r=dt(new i(r),e+1,t),n=Ts(r,!0,e+1)),n};ve.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Ts(i):(Jr(e,0,Rl),t===void 0?t=o.rounding:Jr(t,0,8),r=dt(new o(i),e+qt(i)+1,t),n=Ts(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,d=u.constructor,h=12,m=+(e=new d(e));if(!e.s)return new d(Kn);if(u=new d(u),!u.s){if(e.s<1)throw Error(yr+"Infinity");return u}if(u.eq(Kn))return u;if(r=d.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)<=s5){for(i=new d(Kn),t=Math.ceil(r/jt+4),wt=!1;n%2&&(i=i.times(u),qR(i.d,t)),n=kl(n/2),n!==0;)u=u.times(u),qR(u.d,t);return wt=!0,e.s<0?new d(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(Ou(u,r+h)),wt=!0,i=l5(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=Ts(i,n<=o.toExpNeg||n>=o.toExpPos)):(Jr(e,1,Rl),t===void 0?t=o.rounding:Jr(t,0,8),i=dt(new o(i),e,t),n=qt(i),r=Ts(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,Rl),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 Ts(e,t<=n.toExpNeg||t>=n.toExpPos)};function o5(e,t){var n,r,i,o,l,u,d,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(d=e.d,h=t.d,l=e.e,i=t.e,d=d.slice(),o=l-i,o){for(o<0?(r=d,o=-o,u=h.length):(r=h,i=l,u=d.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=d.length,o=h.length,u-o<0&&(o=u,r=h,h=d,d=r),n=0;o;)n=(d[--o]=d[o]+h[o]+n)/Qt|0,d[o]%=Qt;for(n&&(d.unshift(n),++i),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=i,wt?dt(t,y):t}function Jr(e,t,n){if(e!==~~e||e<t||e>n)throw Error(bs+e)}function Fr(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,d;if(o!=l)d=o>l?1:-1;else for(u=d=0;u<o;u++)if(r[u]!=i[u]){d=r[u]>i[u]?1:-1;break}return d}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,d,h,m,y,g,j,S,w,b,O,T,_,C,A,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(d=r.e-i.e,M=$.length,A=q.length,j=new k(B),S=j.d=[],h=0;$[h]==(q[h]||0);)++h;if($[h]>(q[h]||0)&&--d,o==null?T=o=k.precision:l?T=o+(qt(r)-qt(i))+1:T=o,T<0)return new k(0);if(T=T/jt+2|0,h=0,M==1)for(m=0,$=$[0],T++;(h<A||m)&&T--;h++)_=m*Qt+(q[h]||0),S[h]=_/$|0,m=_%$|0;else{for(m=Qt/($[0]+1)|0,m>1&&($=e($,m),q=e(q,m),M=$.length,A=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?(O=w[0],M!=b&&(O=O*Qt+(w[1]||0)),m=O/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++<A||w[0]!==void 0)&&T--)}return S[0]||S.shift(),j.e=d,dt(j,l?o+qt(j)+1:o)}})();function l5(e,t){var n,r,i,o,l,u,d=0,h=0,m=e.constructor,y=m.precision;if(qt(e)>16)throw Error(Zw+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(ls(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(++d),l=o.plus(Na(i,n,u)),Fr(l.d).slice(0,u)===Fr(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 T0(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 Ou(e,t){var n,r,i,o,l,u,d,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),T0(w,h);if(h+=g,w.precision=h,n=Fr(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=Fr(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 d=T0(w,h+2,b).times(o+""),j=Ou(new w(r+"."+n.slice(1)),h-g).plus(d),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),d=u.plus(Na(l,new w(i),h)),Fr(d.d).slice(0,h)===Fr(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus(T0(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=d,i+=2}}function IR(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=kl(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>Yh||e.e<-Yh))throw Error(Zw+n)}else e.s=0,e.e=0,e.d=[0];return e}function dt(e,t,n){var r,i,o,l,u,d,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=ls(10,l-i-1),u=h/o%10|0,d=t<0||y[m+1]!==void 0||h%o,d=n<4?(u||d)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||d||n==6&&(r>0?i>0?h/ls(10,l-i):0:y[m-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return d?(o=qt(e),y.length=1,t=t-o-1,y[0]=ls(10,(jt-t%jt)%jt),e.e=kl(-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=ls(10,jt-r),y[m]=i>0?(h/ls(10,l-i)%ls(10,i)|0)*o:0),d)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>Yh||e.e<-Yh))throw Error(Zw+qt(e));return e}function c5(e,t){var n,r,i,o,l,u,d,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(d=e.d,y=t.d,r=t.e,h=e.e,d=d.slice(),l=h-r,l){for(m=l<0,m?(n=d,l=-l,u=y.length):(n=y,r=h,u=d.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=d.length,u=y.length,m=i<u,m&&(u=i),i=0;i<u;i++)if(d[i]!=y[i]){m=d[i]<y[i];break}l=0}for(m&&(n=d,d=y,y=n,t.s=-t.s),u=d.length,i=y.length-u;i>0;--i)d[u++]=0;for(i=y.length;i>l;){if(d[--i]<y[i]){for(o=i;o&&d[--o]===0;)d[o]=Qt-1;--d[o],d[i]+=Qt}d[i]-=y[i]}for(;d[--u]===0;)d.pop();for(;d[0]===0;d.shift())--r;return d[0]?(t.d=d,t.e=r,wt?dt(t,j):t):new g(0)}function Ts(e,t,n){var r,i=qt(e),o=Fr(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 qR(e,t){if(e.length>t)return e.length=t,!0}function u5(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(bs+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 IR(l,o.toString())}else if(typeof o!="string")throw Error(bs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,SJ.test(o))IR(l,o);else throw Error(bs+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=u5,i.config=i.set=wJ,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 wJ(e){if(!e||typeof e!="object")throw Error(yr+"Object expected");var t,n,r,i=["precision",1,Rl,"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(kl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(bs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(bs+n+": "+r);return this}var Qw=u5(jJ);Kn=new Qw(1);const lt=Qw;function AJ(e){return EJ(e)||TJ(e)||_J(e)||OJ()}function OJ(){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 _J(e,t){if(e){if(typeof e=="string")return mj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mj(e,t)}}function TJ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function EJ(e){if(Array.isArray(e))return mj(e)}function mj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NJ=function(t){return t},f5={},d5=function(t){return t===f5},UR=function(t){return function n(){return arguments.length===0||arguments.length===1&&d5(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},CJ=function e(t,n){return t===1?n:UR(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!==f5}).length;return l>=t?n.apply(void 0,i):e(t-l,UR(function(){for(var u=arguments.length,d=new Array(u),h=0;h<u;h++)d[h]=arguments[h];var m=i.map(function(y){return d5(y)?d.shift():y});return n.apply(void 0,AJ(m).concat(d))}))})},im=function(t){return CJ(t.length,t)},yj=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},MJ=im(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),PJ=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return NJ;var i=n.reverse(),o=i[0],l=i.slice(1);return function(){return l.reduce(function(u,d){return d(u)},o.apply(void 0,arguments))}},vj=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},h5=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,d){return u===n[d]})||(n=o,r=t.apply(void 0,o)),r}};function RJ(e){var t;return e===0?t=1:t=Math.floor(new lt(e).abs().log(10).toNumber())+1,t}function kJ(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 DJ=im(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),LJ=im(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),zJ=im(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const sm={rangeStep:kJ,getDigitCount:RJ,interpolateNumber:DJ,uninterpolateNumber:LJ,uninterpolateTruncation:zJ};function gj(e){return IJ(e)||BJ(e)||p5(e)||$J()}function $J(){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 BJ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function IJ(e){if(Array.isArray(e))return xj(e)}function _u(e,t){return VJ(e)||UJ(e,t)||p5(e,t)||qJ()}function qJ(){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 p5(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 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 UJ(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(d){i=!0,o=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw o}}return n}}function VJ(e){if(Array.isArray(e))return e}function m5(e){var t=_u(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function y5(e,t,n){if(e.lte(0))return new lt(0);var r=sm.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),d=u.mul(i);return t?d:new lt(Math.ceil(d))}function HJ(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(sm.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=PJ(MJ(function(d){return i.add(new lt(d-l).mul(r)).toNumber()}),yj);return u(0,t)}function v5(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=y5(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()),d=Math.ceil(new lt(t).sub(l).div(o).toNumber()),h=u+d+1;return h>n?v5(e,t,n,r,i+1):(h<n&&(d=t>0?d+(n-h):d,u=t>0?u:u+(n-h)),{step:o,tickMin:l.sub(new lt(u).mul(o)),tickMax:l.add(new lt(d).mul(o))})}function FJ(e){var t=_u(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=m5([n,r]),d=_u(u,2),h=d[0],m=d[1];if(h===-1/0||m===1/0){var y=m===1/0?[h].concat(gj(yj(0,i-1).map(function(){return 1/0}))):[].concat(gj(yj(0,i-1).map(function(){return-1/0})),[m]);return n>r?vj(y):y}if(h===m)return HJ(h,i,o);var g=v5(h,m,l,o),j=g.step,S=g.tickMin,w=g.tickMax,b=sm.rangeStep(S,w.add(new lt(.1).mul(j)),j);return n>r?vj(b):b}function GJ(e,t){var n=_u(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=m5([r,i]),u=_u(l,2),d=u[0],h=u[1];if(d===-1/0||h===1/0)return[r,i];if(d===h)return[d];var m=Math.max(t,2),y=y5(new lt(h).sub(d).div(m-1),o,0),g=[].concat(gj(sm.rangeStep(new lt(d),new lt(h).sub(new lt(.99).mul(y)),y)),[h]);return r>i?vj(g):g}var KJ=h5(FJ),YJ=h5(GJ),XJ="Invariant failed";function Es(e,t){throw new Error(XJ)}var WJ=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 Xh(){return Xh=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},Xh.apply(this,arguments)}function ZJ(e,t){return tee(e)||eee(e,t)||JJ(e,t)||QJ()}function QJ(){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 JJ(e,t){if(e){if(typeof e=="string")return VR(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 VR(e,t)}}function VR(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 eee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function tee(e){if(Array.isArray(e))return e}function nee(e,t){if(e==null)return{};var n=ree(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 ree(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 aee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iee(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,b5(r.key),r)}}function see(e,t,n){return t&&iee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oee(e,t,n){return t=Wh(t),lee(e,g5()?Reflect.construct(t,n||[],Wh(e).constructor):t.apply(e,n))}function lee(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 cee(e)}function cee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g5=function(){return!!e})()}function Wh(e){return Wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wh(e)}function uee(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 x5(e,t,n){return t=b5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b5(e){var t=fee(e,"string");return tl(t)=="symbol"?t:t+""}function fee(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 String(e)}var lf=(function(e){function t(){return aee(this,t),oee(this,t,arguments)}return uee(t,e),see(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,l=r.width,u=r.dataKey,d=r.data,h=r.dataPointFormatter,m=r.xAxis,y=r.yAxis,g=nee(r,WJ),j=je(g,!1);this.props.direction==="x"&&m.type!=="number"&&Es();var S=d.map(function(w){var b=h(w,u),O=b.x,T=b.y,_=b.value,C=b.errorVal;if(!C)return null;var A=[],E,M;if(Array.isArray(C)){var D=ZJ(C,2);E=D[0],M=D[1]}else E=M=C;if(o==="vertical"){var k=m.scale,B=T+i,q=B+l,$=B-l,G=k(_-E),X=k(_+M);A.push({x1:X,y1:q,x2:X,y2:$}),A.push({x1:G,y1:B,x2:X,y2:B}),A.push({x1:G,y1:q,x2:G,y2:$})}else if(o==="horizontal"){var Y=y.scale,L=O+i,H=L-l,Q=L+l,ae=Y(_-E),oe=Y(_+M);A.push({x1:H,y1:oe,x2:Q,y2:oe}),A.push({x1:L,y1:ae,x2:L,y2:oe}),A.push({x1:H,y1:ae,x2:Q,y2:ae})}return I.createElement(Ie,Xh({className:"recharts-errorBar",key:"bar-".concat(A.map(function(z){return"".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))},j),A.map(function(z){return I.createElement("line",Xh({},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);x5(lf,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});x5(lf,"displayName","ErrorBar");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 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 ns(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){dee(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 dee(e,t,n){return t=hee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hee(e){var t=pee(e,"string");return Tu(t)=="symbol"?t:t+""}function pee(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)}var j5=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,l=Fn(n,Io);if(!l)return null;var u=Io.defaultProps,d=u!==void 0?ns(ns({},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?ns(ns({},g),y.props):{},S=j.dataKey,w=j.name,b=j.legendType,O=j.hide;return{inactive:O,dataKey:S,type:d.iconType||b||"square",color:Jw(y),value:w||S,payload:j}}),ns(ns(ns({},d),Io.getWithHeight(l,i)),{},{payload:h,item:l})};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)}function FR(e){return gee(e)||vee(e)||yee(e)||mee()}function mee(){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 yee(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 vee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gee(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 GR(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?GR(Object(n),!0).forEach(function(r){Uo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uo(e,t,n){return t=xee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xee(e){var t=bee(e,"string");return Eu(t)=="symbol"?t:t+""}function bee(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 kt(e,t,n){return Ne(e)||Ne(t)?n:Kt(t)?Xn(e,t,n):Te(t)?t(e):n}function ru(e,t,n,r){var i=gJ(e,function(u){return kt(u,t)});if(n==="number"){var o=i.filter(function(u){return ce(u)||parseFloat(u)});return o.length?[am(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 jee=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 d=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(d[1]-d[0])){j=g;var w=y+d[1]-d[0];S[0]=Math.min(w,(w+m)/2),S[1]=Math.max(w,(w+m)/2)}else{j=m;var b=g+d[1]-d[0];S[0]=Math.min(y,(b+y)/2),S[1]=Math.max(y,(b+y)/2)}var O=[Math.min(y,(j+y)/2),Math.max(y,(j+y)/2)];if(t>O[0]&&t<=O[1]||t>=S[0]&&t<=S[1]){l=i[h].index;break}}else{var T=Math.min(m,g),_=Math.max(m,g);if(t>(T+y)/2&&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},Jw=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,d;switch(i){case"Line":d=l;break;case"Area":case"Radar":d=l&&l!=="none"?l:u;break;default:d=u;break}return d},See=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),d=0,h=u.length;d<h;d++)for(var m=o[u[d]].stackGroups,y=Object.keys(m),g=0,j=y.length;g<j;g++){var S=m[y[g]],w=S.items,b=S.cateAxisId,O=w.filter(function(M){return Ea(M.type).indexOf("Bar")>=0});if(O&&O.length){var T=O[0].type.defaultProps,_=T!==void 0?Mt(Mt({},T),O[0].props):O[0].props,C=_.barSize,A=_[b];l[A]||(l[A]=[]);var E=Ne(C)?n:C;l[A].push({item:O[0],stackList:O.slice(1),barSize:Ne(E)?void 0:jn(E,r,0)})}}return l},wee=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,u=t.maxBarSize,d=l.length;if(d<1)return null;var h=jn(n,i,0,!0),m,y=[];if(l[0].barSize===+l[0].barSize){var g=!1,j=i/d,S=l.reduce(function(C,A){return C+A.barSize||0},0);S+=(d-1)*h,S>=i&&(S-=(d-1)*h,h=0),S>=i&&j>0&&(g=!0,j*=.9,S=d*j);var w=(i-S)/2>>0,b={offset:w-h,size:0};m=l.reduce(function(C,A){var E={item:A.item,position:{offset:b.offset+b.size+h,size:g?j:A.barSize}},M=[].concat(FR(C),[E]);return b=M[M.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(D){M.push({item:D,position:b})}),M},y)}else{var O=jn(r,i,0,!0);i-2*O-(d-1)*h<=0&&(h=0);var T=(i-2*O-(d-1)*h)/d;T>1&&(T>>=0);var _=u===+u?Math.min(T,u):T;m=l.reduce(function(C,A,E){var M=[].concat(FR(C),[{item:A.item,position:{offset:O+(T+h)*E+(T-_)/2,size:_}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(D){M.push({item:D,position:M[M.length-1].position})}),M},y)}return m},Aee=function(t,n,r,i){var o=r.children,l=r.width,u=r.margin,d=l-(u.left||0)-(u.right||0),h=j5({children:o,legendWidth:d});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),{},Uo({},j,t[j]+(y||0)));if((w==="horizontal"||w==="vertical"&&j==="center")&&S!=="middle"&&ce(t[S]))return Mt(Mt({},t),{},Uo({},S,t[S]+(g||0)))}return t},Oee=function(t,n,r){return Ne(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},S5=function(t,n,r,i,o){var l=n.props.children,u=Wn(l,lf).filter(function(h){return Oee(i,o,h.props.direction)});if(u&&u.length){var d=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)?[am(y),ji(y)]:[y,y],j=d.reduce(function(S,w){var b=kt(m,w,0),O=g[0]-Math.abs(Array.isArray(b)?b[0]:b),T=g[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(O,S[0]),Math.max(T,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},_ee=function(t,n,r,i,o){var l=n.map(function(u){return S5(t,u,r,o,i)}).filter(function(u){return!Ne(u)});return l&&l.length?l.reduce(function(u,d){return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]):null},w5=function(t,n,r,i,o){var l=n.map(function(d){var h=d.props.dataKey;return r==="number"&&h&&S5(t,d,h,i)||ru(t,h,r,o)});if(r==="number")return l.reduce(function(d,h){return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]);var u={};return l.reduce(function(d,h){for(var m=0,y=h.length;m<y;m++)u[h[m]]||(u[h[m]]=!0,d.push(h[m]));return d},[])},A5=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},O5=function(t,n,r,i){if(i)return t.map(function(d){return d.coordinate});var o,l,u=t.map(function(d){return d.coordinate===n&&(o=!0),d.coordinate===r&&(l=!0),d.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,d=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,h=(n||r)&&l==="category"&&i.bandwidth?i.bandwidth()/d: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!Cl(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}})},E0=new WeakMap,Hd=function(t,n){if(typeof n!="function")return t;E0.has(t)||E0.set(t,new WeakMap);var r=E0.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},_5=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:bu(),realScaleType:"band"}:l==="radial"&&u==="angleAxis"?{scale:Hh(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:nu(),realScaleType:"point"}:o==="category"?{scale:bu(),realScaleType:"band"}:{scale:Hh(),realScaleType:"linear"};if(ws(i)){var d="scale".concat(Vp(i));return{scale:(MR[d]||nu)(),realScaleType:MR[d]?d:"point"}}return Te(i)?{scale:i}:{scale:nu(),realScaleType:"point"}},KR=1e-4,T5=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])-KR,l=Math.max(i[0],i[1])+KR,u=t(n[0]),d=t(n[r-1]);(u<o||u>l||d<o||d>l)&&t.domain([n[0],n[r-1]])}},Tee=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},Eee=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},Nee=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 d=Cl(t[u][r][1])?t[u][r][0]:t[u][r][1];d>=0?(t[u][r][0]=o,t[u][r][1]=o+d,o=t[u][r][1]):(t[u][r][0]=l,t[u][r][1]=l+d,l=t[u][r][1])}},Cee=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=Cl(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)}},Mee={sign:Nee,expand:gK,none:Ko,silhouette:xK,wiggle:bK,positive:Cee},Pee=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=Mee[r],l=vK().keys(i).value(function(u,d){return+kt(u,d,0)}).order(Z1).offset(o);return l(t)},Ree=function(t,n,r,i,o,l){if(!t)return null;var u=l?n.reverse():n,d={},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 O=S[r],T=y[O]||{hasStack:!1,stackGroups:{}};if(Kt(w)){var _=T.stackGroups[w]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(g),T.hasStack=!0,T.stackGroups[w]=_}else T.stackGroups[Ps("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[g]};return Mt(Mt({},y),{},Uo({},O,T))},d),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 O=j.stackGroups[b];return Mt(Mt({},w),{},Uo({},b,{numericAxisId:r,cateAxisId:i,items:O.items,stackedData:Pee(t,O.items,o)}))},S)}return Mt(Mt({},y),{},Uo({},g,j))},m)},E5=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,l=n.originalDomain,u=n.allowDecimals,d=r||n.scale;if(d!=="auto"&&d!=="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=KJ(h,o,u);return t.domain([am(m),ji(m)]),{niceTicks:m}}if(o&&i==="number"){var y=t.domain(),g=YJ(y,o,u);return{niceTicks:g}}return null};function Zh(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=Ah(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var d=kt(i,Ne(l)?t.dataKey:l);return Ne(d)?null:t.scale(d)}var YR=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 d=kt(l,n.dataKey,n.domain[u]);return Ne(d)?null:n.scale(d)-o/2+i},kee=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]},Dee=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},Lee=function(t){return t.reduce(function(n,r){return[am(r.concat([n[0]]).filter(ce)),ji(r.concat([n[1]]).filter(ce))]},[1/0,-1/0])},N5=function(t,n,r){return Object.keys(t).reduce(function(i,o){var l=t[o],u=l.stackedData,d=u.reduce(function(h,m){var y=Lee(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(d[0],i[0]),Math.max(d[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},XR=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WR=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Sj=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(XR.test(t[0])){var o=+XR.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(WR.test(t[1])){var l=+WR.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},Qh=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=Tw(n,function(y){return y.coordinate}),l=1/0,u=1,d=o.length;u<d;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},ZR=function(t,n,r){return!t||!t.length||_s(t,Xn(r,"type.defaultProps.domain"))?n:t},C5=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,d=r.tooltipType,h=r.chartType,m=r.hide;return Mt(Mt({},je(t,!1)),{},{dataKey:i,unit:l,formatter:u,name:o||i,color:Jw(t),value:kt(n,i),type:d,payload:n,chartType:h,hide:m})};function Nu(e){"@babel/helpers - typeof";return Nu=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},Nu(e)}function QR(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?QR(Object(n),!0).forEach(function(r){M5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M5(e,t,n){return t=zee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zee(e){var t=$ee(e,"string");return Nu(t)=="symbol"?t:t+""}function $ee(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bee(e,t){return Vee(e)||Uee(e,t)||qee(e,t)||Iee()}function Iee(){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 qee(e,t){if(e){if(typeof e=="string")return JR(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 JR(e,t)}}function JR(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 Uee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Vee(e){if(Array.isArray(e))return e}var Jh=Math.PI/180,Hee=function(t){return t*180/Math.PI},mt=function(t,n,r,i){return{x:t+Math.cos(-Jh*i)*r,y:n+Math.sin(-Jh*i)*r}},P5=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},Fee=function(t,n,r,i,o){var l=t.width,u=t.height,d=t.startAngle,h=t.endAngle,m=jn(t.cx,l,l/2),y=jn(t.cy,u,u/2),g=P5(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,O){var T=n[O],_=T.domain,C=T.reversed,A;if(Ne(T.range))i==="angleAxis"?A=[d,h]:i==="radiusAxis"&&(A=[j,S]),C&&(A=[A[1],A[0]]);else{A=T.range;var E=A,M=Bee(E,2);d=M[0],h=M[1]}var D=_5(T,o),k=D.realScaleType,B=D.scale;B.domain(_).range(A),T5(B);var q=E5(B,Aa(Aa({},T),{},{realScaleType:k})),$=Aa(Aa(Aa({},T),q),{},{range:A,radius:S,realScaleType:k,scale:B,cx:m,cy:y,innerRadius:j,outerRadius:S,startAngle:d,endAngle:h});return Aa(Aa({},b),{},M5({},O,$))},{})},Gee=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))},Kee=function(t,n){var r=t.x,i=t.y,o=n.cx,l=n.cy,u=Gee({x:r,y:i},{x:o,y:l});if(u<=0)return{radius:u};var d=(r-o)/u,h=Math.acos(d);return i>l&&(h=2*Math.PI-h),{radius:u,angle:Hee(h),angleInRadian:h}},Yee=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}},Xee=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},ek=function(t,n){var r=t.x,i=t.y,o=Kee({x:r,y:i},n),l=o.radius,u=o.angle,d=n.innerRadius,h=n.outerRadius;if(l<d||l>h)return!1;if(l===0)return!0;var m=Yee(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:Xee(j,n)}):null},R5=function(t){return!P.isValidElement(t)&&!Te(t)&&typeof t!="boolean"?t.className:""};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 Wee=["offset"];function Zee(e){return tte(e)||ete(e)||Jee(e)||Qee()}function Qee(){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 Jee(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 ete(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tte(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 nte(e,t){if(e==null)return{};var n=rte(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 rte(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 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 Ht(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){ate(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 ate(e,t,n){return t=ite(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ite(e){var t=ste(e,"string");return Cu(t)=="symbol"?t:t+""}function ste(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 Mu(){return Mu=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},Mu.apply(this,arguments)}var ote=function(t){var n=t.value,r=t.formatter,i=Ne(t.children)?n:t.children;return Te(r)?r(i):i},lte=function(t,n){var r=bn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},cte=function(t,n,r){var i=t.position,o=t.viewBox,l=t.offset,u=t.className,d=o,h=d.cx,m=d.cy,y=d.innerRadius,g=d.outerRadius,j=d.startAngle,S=d.endAngle,w=d.clockWise,b=(y+g)/2,O=lte(j,S),T=O>=0?1:-1,_,C;i==="insideStart"?(_=j+T*l,C=w):i==="insideEnd"?(_=S-T*l,C=!w):i==="end"&&(_=S+T*l,C=w),C=O<=0?C:!C;var A=mt(h,m,b,_),E=mt(h,m,b,_+(C?1:-1)*359),M="M".concat(A.x,",").concat(A.y,`
A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
`).concat(E.x,",").concat(E.y),D=Ne(t.id)?Ps("recharts-radial-line-"):t.id;return I.createElement("text",Mu({},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))},ute=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,l=o.cx,u=o.cy,d=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=(d+h)/2,O=mt(l,u,b,g),T=O.x,_=O.y;return{x:T,y:_,textAnchor:"middle",verticalAnchor:"middle"}},fte=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,l=n,u=l.x,d=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,O=w>0?"end":"start",T=w>0?"start":"end";if(o==="top"){var _={x:u+h/2,y:d-y*i,textAnchor:"middle",verticalAnchor:j};return Ht(Ht({},_),r?{height:Math.max(d-r.y,0),width:h}:{})}if(o==="bottom"){var C={x:u+h/2,y:d+m+g,textAnchor:"middle",verticalAnchor:S};return Ht(Ht({},C),r?{height:Math.max(r.y+r.height-(d+m),0),width:h}:{})}if(o==="left"){var A={x:u-b,y:d+m/2,textAnchor:O,verticalAnchor:"middle"};return Ht(Ht({},A),r?{width:Math.max(A.x-r.x,0),height:m}:{})}if(o==="right"){var E={x:u+h+b,y:d+m/2,textAnchor:T,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:d+m/2,textAnchor:T,verticalAnchor:"middle"},M):o==="insideRight"?Ht({x:u+h-b,y:d+m/2,textAnchor:O,verticalAnchor:"middle"},M):o==="insideTop"?Ht({x:u+h/2,y:d+g,textAnchor:"middle",verticalAnchor:S},M):o==="insideBottom"?Ht({x:u+h/2,y:d+m-g,textAnchor:"middle",verticalAnchor:j},M):o==="insideTopLeft"?Ht({x:u+b,y:d+g,textAnchor:T,verticalAnchor:S},M):o==="insideTopRight"?Ht({x:u+h-b,y:d+g,textAnchor:O,verticalAnchor:S},M):o==="insideBottomLeft"?Ht({x:u+b,y:d+m-g,textAnchor:T,verticalAnchor:j},M):o==="insideBottomRight"?Ht({x:u+h-b,y:d+m-g,textAnchor:O,verticalAnchor:j},M):Nl(o)&&(ce(o.x)||ds(o.x))&&(ce(o.y)||ds(o.y))?Ht({x:u+jn(o.x,h),y:d+jn(o.y,m),textAnchor:"end",verticalAnchor:"end"},M):Ht({x:u+h/2,y:d+m/2,textAnchor:"middle",verticalAnchor:"middle"},M)},dte=function(t){return"cx"in t&&ce(t.cx)};function Jt(e){var t=e.offset,n=t===void 0?5:t,r=nte(e,Wee),i=Ht({offset:n},r),o=i.viewBox,l=i.position,u=i.value,d=i.children,h=i.content,m=i.className,y=m===void 0?"":m,g=i.textBreakAll;if(!o||Ne(u)&&Ne(d)&&!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=ote(i);var S=dte(o),w=je(i,!0);if(S&&(l==="insideStart"||l==="insideEnd"||l==="end"))return cte(i,j,w);var b=S?ute(i):fte(i);return I.createElement(Os,Mu({className:Pe("recharts-label",y)},w,b,{breakAll:g}),j)}Jt.displayName="Label";var k5=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,l=t.endAngle,u=t.r,d=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,O=t.clockWise,T=t.labelViewBox;if(T)return T;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||d||u||0,clockWise:O}:t.viewBox?t.viewBox:{}},hte=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}):Nl(t)?I.createElement(Jt,Mu({viewBox:n},t,{key:"label-implicit"})):null:null},pte=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=k5(t),l=Wn(i,Jt).map(function(d,h){return P.cloneElement(d,{viewBox:n||o,key:"label-".concat(h)})});if(!r)return l;var u=hte(t.label,n||o);return[u].concat(Zee(l))};Jt.parseViewBox=k5;Jt.renderCallByParent=pte;var N0,nk;function mte(){if(nk)return N0;nk=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return N0=e,N0}var yte=mte();const vte=at(yte);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)}var gte=["valueAccessor"],xte=["data","dataKey","clockWise","id","textBreakAll"];function bte(e){return Ate(e)||wte(e)||Ste(e)||jte()}function jte(){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 Ste(e,t){if(e){if(typeof e=="string")return Aj(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 Aj(e,t)}}function wte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ate(e){if(Array.isArray(e))return Aj(e)}function Aj(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 ep(){return ep=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},ep.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 ak(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){Ote(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 Ote(e,t,n){return t=_te(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _te(e){var t=Tte(e,"string");return Pu(t)=="symbol"?t:t+""}function Tte(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)}function ik(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}var Nte=function(t){return Array.isArray(t.value)?vte(t.value):t.value};function Xr(e){var t=e.valueAccessor,n=t===void 0?Nte:t,r=ik(e,gte),i=r.data,o=r.dataKey,l=r.clockWise,u=r.id,d=r.textBreakAll,h=ik(r,xte);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,ep({},je(m,!0),h,j,{parentViewBox:m.parentViewBox,value:g,textBreakAll:d,viewBox:Jt.parseViewBox(Ne(l)?m:ak(ak({},m),{},{clockWise:l})),key:"label-".concat(y),index:y}))}))}Xr.displayName="LabelList";function Cte(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}):Nl(e)?I.createElement(Xr,ep({data:t},e,{key:"labelList-implicit"})):null:null}function Mte(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=Cte(e.label,t);return[o].concat(bte(i))}Xr.renderCallByParent=Mte;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 Oj(){return Oj=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},Oj.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){Pte(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 Pte(e,t,n){return t=Rte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rte(e){var t=kte(e,"string");return Ru(t)=="symbol"?t:t+""}function kte(e,t){if(Ru(e)!="object"||!e)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 Dte=function(t,n){var r=bn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Fd=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,l=t.sign,u=t.isExternal,d=t.cornerRadius,h=t.cornerIsExternal,m=d*(u?1:-1)+i,y=Math.asin(d/m)/Jh,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*Jh),w);return{center:j,circleTangency:S,lineTangency:b,theta:y}},D5=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.startAngle,u=t.endAngle,d=Dte(l,u),h=l+d,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(d)>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(d)>180),",").concat(+(l<=h),`,
`).concat(j.x,",").concat(j.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},Lte=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,y=bn(m-h),g=Fd({cx:n,cy:r,radius:o,angle:h,sign:y,cornerRadius:l,cornerIsExternal:d}),j=g.circleTangency,S=g.lineTangency,w=g.theta,b=Fd({cx:n,cy:r,radius:o,angle:m,sign:-y,cornerRadius:l,cornerIsExternal:d}),O=b.circleTangency,T=b.lineTangency,_=b.theta,C=d?Math.abs(h-m):Math.abs(h-m)-w-_;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
`):D5({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m});var A="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(O.x,",").concat(O.y,`
A`).concat(l,",").concat(l,",0,0,").concat(+(y<0),",").concat(T.x,",").concat(T.y,`
`);if(i>0){var E=Fd({cx:n,cy:r,radius:i,angle:h,sign:y,isExternal:!0,cornerRadius:l,cornerIsExternal:d}),M=E.circleTangency,D=E.lineTangency,k=E.theta,B=Fd({cx:n,cy:r,radius:i,angle:m,sign:-y,isExternal:!0,cornerRadius:l,cornerIsExternal:d}),q=B.circleTangency,$=B.lineTangency,G=B.theta,X=d?Math.abs(h-m):Math.abs(h-m)-k-G;if(X<0&&l===0)return"".concat(A,"L").concat(n,",").concat(r,"Z");A+="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 A+="L".concat(n,",").concat(r,"Z");return A},zte={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},L5=function(t){var n=ok(ok({},zte),t),r=n.cx,i=n.cy,o=n.innerRadius,l=n.outerRadius,u=n.cornerRadius,d=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=Lte({cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:Math.min(w,S/2),forceCornerRadius:d,cornerIsExternal:h,startAngle:m,endAngle:y}):b=D5({cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:m,endAngle:y}),I.createElement("path",Oj({},je(n,!0),{className:j,d:b,role:"img"}))};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 _j(){return _j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_j.apply(this,arguments)}function 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 ck(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){$te(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 $te(e,t,n){return t=Bte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bte(e){var t=Ite(e,"string");return ku(t)=="symbol"?t:t+""}function Ite(e,t){if(ku(e)!="object"||!e)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)}var uk={curveBasisClosed:sK,curveBasisOpen:oK,curveBasis:iK,curveBumpX:FG,curveBumpY:GG,curveLinearClosed:lK,curveLinear:Fp,curveMonotoneX:cK,curveMonotoneY:uK,curveNatural:fK,curveStep:dK,curveStepAfter:pK,curveStepBefore:hK},Gd=function(t){return t.x===+t.x&&t.y===+t.y},Ic=function(t){return t.x},qc=function(t){return t.y},qte=function(t,n){if(Te(t))return t;var r="curve".concat(Vp(t));return(r==="curveMonotone"||r==="curveBump")&&n?uk["".concat(r).concat(n==="vertical"?"Y":"X")]:uk[r]||Fp},Ute=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,d=t.connectNulls,h=d===void 0?!1:d,m=qte(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 ck(ck({},w),{},{base:j[b]})});return u==="vertical"?g=zd().y(qc).x1(Ic).x0(function(w){return w.base.x}):g=zd().x(Ic).y1(qc).y0(function(w){return w.base.y}),g.defined(Gd).curve(m),g(S)}return u==="vertical"&&ce(l)?g=zd().y(qc).x1(Ic).x0(l):ce(l)?g=zd().x(Ic).y1(qc).y0(l):g=DL().x(Ic).y(qc),g.defined(Gd).curve(m),g(y)},js=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?Ute(t):i;return P.createElement("path",_j({},je(t,!1),Oh(t),{className:Pe("recharts-curve",n),d:l,ref:o}))},C0={exports:{}},M0,fk;function Vte(){if(fk)return M0;fk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return M0=e,M0}var P0,dk;function Hte(){if(dk)return P0;dk=1;var e=Vte();function t(){}function n(){}return n.resetWarningCache=t,P0=function(){function r(l,u,d,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},P0}var hk;function Fte(){return hk||(hk=1,C0.exports=Hte()()),C0.exports}var Gte=Fte();const Je=at(Gte),{getOwnPropertyNames:Kte,getOwnPropertySymbols:Yte}=Object,{hasOwnProperty:Xte}=Object.prototype;function R0(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function Kd(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 d=e(n,r,i);return o.delete(n),o.delete(r),d}}function Wte(e){return e!=null?e[Symbol.toStringTag]:void 0}function pk(e){return Kte(e).concat(Yte(e))}const Zte=Object.hasOwn||((e,t)=>Xte.call(e,t));function Ds(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Qte="__v",Jte="__o",ene="_owner",{getOwnPropertyDescriptor:mk,keys:yk}=Object;function tne(e,t){return e.byteLength===t.byteLength&&tp(new Uint8Array(e),new Uint8Array(t))}function nne(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 rne(e,t){return e.byteLength===t.byteLength&&tp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ane(e,t){return Ds(e.getTime(),t.getTime())}function ine(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function sne(e,t){return e===t}function vk(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,d=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],d,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;d++}return!0}const one=Ds;function lne(e,t,n){const r=yk(e);let i=r.length;if(yk(t).length!==i)return!1;for(;i-- >0;)if(!z5(e,t,n,r[i]))return!1;return!0}function Uc(e,t,n){const r=pk(e);let i=r.length;if(pk(t).length!==i)return!1;let o,l,u;for(;i-- >0;)if(o=r[i],!z5(e,t,n,o)||(l=mk(e,o),u=mk(t,o),(l||u)&&(!l||!u||l.configurable!==u.configurable||l.enumerable!==u.enumerable||l.writable!==u.writable)))return!1;return!0}function cne(e,t){return Ds(e.valueOf(),t.valueOf())}function une(e,t){return e.source===t.source&&e.flags===t.flags}function gk(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 d=t.values();let h=!1,m=0;for(;(u=d.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 tp(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 fne(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 z5(e,t,n,r){return(r===ene||r===Jte||r===Qte)&&(e.$$typeof||t.$$typeof)?!0:Zte(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const dne="[object ArrayBuffer]",hne="[object Arguments]",pne="[object Boolean]",mne="[object DataView]",yne="[object Date]",vne="[object Error]",gne="[object Map]",xne="[object Number]",bne="[object Object]",jne="[object RegExp]",Sne="[object Set]",wne="[object String]",Ane={"[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},One="[object URL]",_ne=Object.prototype.toString;function Tne({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:u,areObjectsEqual:d,arePrimitiveWrappersEqual:h,areRegExpsEqual:m,areSetsEqual:y,areTypedArraysEqual:g,areUrlsEqual:j,unknownTagComparators:S}){return function(b,O,T){if(b===O)return!0;if(b==null||O==null)return!1;const _=typeof b;if(_!==typeof O)return!1;if(_!=="object")return _==="number"?u(b,O,T):_==="function"?o(b,O,T):!1;const C=b.constructor;if(C!==O.constructor)return!1;if(C===Object)return d(b,O,T);if(Array.isArray(b))return t(b,O,T);if(C===Date)return r(b,O,T);if(C===RegExp)return m(b,O,T);if(C===Map)return l(b,O,T);if(C===Set)return y(b,O,T);const A=_ne.call(b);if(A===yne)return r(b,O,T);if(A===jne)return m(b,O,T);if(A===gne)return l(b,O,T);if(A===Sne)return y(b,O,T);if(A===bne)return typeof b.then!="function"&&typeof O.then!="function"&&d(b,O,T);if(A===One)return j(b,O,T);if(A===vne)return i(b,O,T);if(A===hne)return d(b,O,T);if(Ane[A])return g(b,O,T);if(A===dne)return e(b,O,T);if(A===mne)return n(b,O,T);if(A===pne||A===xne||A===wne)return h(b,O,T);if(S){let E=S[A];if(!E){const M=Wte(b);M&&(E=S[M])}if(E)return E(b,O,T)}return!1}}function Ene({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:tne,areArraysEqual:n?Uc:nne,areDataViewsEqual:rne,areDatesEqual:ane,areErrorsEqual:ine,areFunctionsEqual:sne,areMapsEqual:n?R0(vk,Uc):vk,areNumbersEqual:one,areObjectsEqual:n?Uc:lne,arePrimitiveWrappersEqual:cne,areRegExpsEqual:une,areSetsEqual:n?R0(gk,Uc):gk,areTypedArraysEqual:n?R0(tp,Uc):tp,areUrlsEqual:fne,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Kd(r.areArraysEqual),o=Kd(r.areMapsEqual),l=Kd(r.areObjectsEqual),u=Kd(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return r}function Nne(e){return function(t,n,r,i,o,l,u){return e(t,n,u)}}function Cne({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(u,d){const{cache:h=e?new WeakMap:void 0,meta:m}=n();return t(u,d,{cache:h,equals:r,meta:m,strict:i})};if(e)return function(u,d){return t(u,d,{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,d){return t(u,d,o)}}const Mne=Di();Di({strict:!0});Di({circular:!0});Di({circular:!0,strict:!0});Di({createInternalComparator:()=>Ds});Di({strict:!0,createInternalComparator:()=>Ds});Di({circular:!0,createInternalComparator:()=>Ds});Di({circular:!0,createInternalComparator:()=>Ds,strict:!0});function Di(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=Ene(e),l=Tne(o),u=n?n(l):Nne(l);return Cne({circular:t,comparator:l,createState:r,equals:u,strict:i})}function Pne(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function xk(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):Pne(i)};requestAnimationFrame(r)}function Tj(e){"@babel/helpers - typeof";return Tj=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},Tj(e)}function Rne(e){return zne(e)||Lne(e)||Dne(e)||kne()}function kne(){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 Dne(e,t){if(e){if(typeof e=="string")return bk(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 bk(e,t)}}function bk(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 Lne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zne(e){if(Array.isArray(e))return e}function $ne(){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=Rne(l),d=u[0],h=u.slice(1);if(typeof d=="number"){xk(i.bind(null,h),d);return}i(d),xk(i.bind(null,h));return}Tj(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 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 jk(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 Sk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jk(Object(n),!0).forEach(function(r){$5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $5(e,t,n){return t=Bne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bne(e){var t=Ine(e,"string");return Du(t)==="symbol"?t:String(t)}function Ine(e,t){if(Du(e)!=="object"||e===null)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 qne=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},Une=function(t){return t},Vne=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},au=function(t,n){return Object.keys(n).reduce(function(r,i){return Sk(Sk({},r),{},$5({},i,t(i,n[i])))},{})},wk=function(t,n,r){return t.map(function(i){return"".concat(Vne(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Hne(e,t){return Kne(e)||Gne(e,t)||B5(e,t)||Fne()}function Fne(){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 Gne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Kne(e){if(Array.isArray(e))return e}function Yne(e){return Zne(e)||Wne(e)||B5(e)||Xne()}function Xne(){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 B5(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 Wne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zne(e){if(Array.isArray(e))return Ej(e)}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}var np=1e-4,I5=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},q5=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},Ak=function(t,n){return function(r){var i=I5(t,n);return q5(i,r)}},Qne=function(t,n){return function(r){var i=I5(t,n),o=[].concat(Yne(i.map(function(l,u){return l*u}).slice(1)),[0]);return q5(o,r)}},Ok=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 d=n[0].split("(");if(d[0]==="cubic-bezier"&&d[1].split(")")[0].split(",").length===4){var h=d[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),m=Hne(h,4);i=m[0],o=m[1],l=m[2],u=m[3]}}}var y=Ak(i,l),g=Ak(o,u),j=Qne(i,l),S=function(O){return O>1?1:O<0?0:O},w=function(O){for(var T=O>1?1:O,_=T,C=0;C<8;++C){var A=y(_)-T,E=j(_);if(Math.abs(A-T)<np||E<np)return g(_);_=S(_-A/E)}return g(_)};return w.isStepper=!1,w},Jne=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,d=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)<np&&Math.abs(w)<np?[y,0]:[b,w]};return d.isStepper=!0,d.dt=u,d},ere=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 Ok(i);case"spring":return Jne();default:if(i.split("(")[0]==="cubic-bezier")return Ok(i)}return typeof i=="function"?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)}function _k(e){return rre(e)||nre(e)||U5(e)||tre()}function tre(){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 nre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rre(e){if(Array.isArray(e))return Cj(e)}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 cn(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){Nj(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 Nj(e,t,n){return t=are(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function are(e){var t=ire(e,"string");return Lu(t)==="symbol"?t:String(t)}function ire(e,t){if(Lu(e)!=="object"||e===null)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 sre(e,t){return cre(e)||lre(e,t)||U5(e,t)||ore()}function ore(){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 U5(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 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 lre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function cre(e){if(Array.isArray(e))return e}var rp=function(t,n,r){return t+(n-t)*r},Mj=function(t){var n=t.from,r=t.to;return n!==r},ure=function e(t,n,r){var i=au(function(o,l){if(Mj(l)){var u=t(l.from,l.to,l.velocity),d=sre(u,2),h=d[0],m=d[1];return cn(cn({},l),{},{from:h,velocity:m})}return l},n);return r<1?au(function(o,l){return Mj(l)?cn(cn({},l),{},{velocity:rp(l.velocity,i[o].velocity,r),from:rp(l.from,i[o].from,r)}):l},n):e(t,i,r-1)};const fre=(function(e,t,n,r,i){var o=qne(e,t),l=o.reduce(function(b,O){return cn(cn({},b),{},Nj({},O,[e[O],t[O]]))},{}),u=o.reduce(function(b,O){return cn(cn({},b),{},Nj({},O,{from:e[O],velocity:0,to:t[O]}))},{}),d=-1,h,m,y=function(){return null},g=function(){return au(function(O,T){return T.from},u)},j=function(){return!Object.values(u).filter(Mj).length},S=function(O){h||(h=O);var T=O-h,_=T/n.dt;u=ure(n,u,_),i(cn(cn(cn({},e),t),g())),h=O,j()||(d=requestAnimationFrame(y))},w=function(O){m||(m=O);var T=(O-m)/r,_=au(function(A,E){return rp.apply(void 0,_k(E).concat([n(T)]))},l);if(i(cn(cn(cn({},e),t),_)),T<1)d=requestAnimationFrame(y);else{var C=au(function(A,E){return rp.apply(void 0,_k(E).concat([n(1)]))},l);i(cn(cn(cn({},e),t),C))}};return y=n.isStepper?S:w,function(){return requestAnimationFrame(y),function(){cancelAnimationFrame(d)}}});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)}var dre=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function hre(e,t){if(e==null)return{};var n=pre(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 pre(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 k0(e){return gre(e)||vre(e)||yre(e)||mre()}function mre(){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 yre(e,t){if(e){if(typeof e=="string")return Pj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pj(e,t)}}function vre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gre(e){if(Array.isArray(e))return Pj(e)}function Pj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function 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 Ar(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){Xc(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 Xc(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 xre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bre(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 jre(e,t,n){return t&&bre(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V5(e){var t=Sre(e,"string");return nl(t)==="symbol"?t:String(t)}function Sre(e,t){if(nl(e)!=="object"||e===null)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(t==="string"?String:Number)(e)}function wre(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 Are(e){var t=Ore();return function(){var r=ap(e),i;if(t){var o=ap(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return kj(this,i)}}function kj(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 Dj(e)}function Dj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ore(){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 ap(e){return ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ap(e)}var kr=(function(e){wre(n,e);var t=Are(n);function n(r,i){var o;xre(this,n),o=t.call(this,r,i);var l=o.props,u=l.isActive,d=l.attributeName,h=l.from,m=l.to,y=l.steps,g=l.children,j=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Dj(o)),o.changeStyle=o.changeStyle.bind(Dj(o)),!u||j<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:m}),kj(o);if(y&&y.length)o.state={style:y[0].style};else if(h){if(typeof g=="function")return o.state={style:h},kj(o);o.state={style:d?Xc({},d,h):h}}else o.state={style:{}};return o}return jre(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,d=o.attributeName,h=o.shouldReAnimate,m=o.to,y=o.from,g=this.state.style;if(u){if(!l){var j={style:d?Xc({},d,m):m};this.state&&g&&(d&&g[d]!==m||!d&&g!==m)&&this.setState(j);return}if(!(Mne(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:d?Xc({},d,w):w};(d&&g[d]!==w||!d&&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,d=i.duration,h=i.easing,m=i.begin,y=i.onAnimationEnd,g=i.onAnimationStart,j=fre(l,u,ere(h),d,this.changeStyle),S=function(){o.stopJSAnimation=j()};this.manager.start([g,m,S,d,y])}},{key:"runStepAnimation",value:function(i){var o=this,l=i.steps,u=i.begin,d=i.onAnimationStart,h=l[0],m=h.style,y=h.duration,g=y===void 0?0:y,j=function(w,b,O){if(O===0)return w;var T=b.duration,_=b.easing,C=_===void 0?"ease":_,A=b.style,E=b.properties,M=b.onAnimationEnd,D=O>0?l[O-1]:b,k=E||Object.keys(A);if(typeof C=="function"||C==="spring")return[].concat(k0(w),[o.runJSAnimation.bind(o,{from:D.style,to:A,duration:T,easing:C}),T]);var B=wk(k,T,C),q=Ar(Ar(Ar({},D.style),A),{},{transition:B});return[].concat(k0(w),[q,T,M]).filter(Une)};return this.manager.start([d].concat(k0(l.reduce(j,[m,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=$ne());var o=i.begin,l=i.duration,u=i.attributeName,d=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?Xc({},u,d):d,b=wk(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 d=hre(i,dre),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,O=S.className,T=P.cloneElement(j,Ar(Ar({},d),{},{style:Ar(Ar({},b),m),className:O}));return T};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 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 ip(){return ip=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},ip.apply(this,arguments)}function _re(e,t){return Cre(e)||Nre(e,t)||Ere(e,t)||Tre()}function Tre(){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 Ere(e,t){if(e){if(typeof e=="string")return Nk(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 Nk(e,t)}}function Nk(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 Nre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Cre(e){if(Array.isArray(e))return e}function Ck(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 Mk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ck(Object(n),!0).forEach(function(r){Mre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ck(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mre(e,t,n){return t=Pre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pre(e){var t=Rre(e,"string");return zu(t)=="symbol"?t:t+""}function Rre(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 Pk=function(t,n,r,i,o){var l=Math.min(Math.abs(r)/2,Math.abs(i)/2),u=i>=0?1:-1,d=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+d*y[0],",").concat(n)),m+="L ".concat(t+r-d*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-d*y[2],",").concat(n+i)),m+="L ".concat(t+d*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+d*S,",").concat(n,`
L `).concat(t+r-d*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-d*S,",").concat(n+i,`
L `).concat(t+d*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},kre=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,l=n.y,u=n.width,d=n.height;if(Math.abs(u)>0&&Math.abs(d)>0){var h=Math.min(o,o+u),m=Math.max(o,o+u),y=Math.min(l,l+d),g=Math.max(l,l+d);return r>=h&&r<=m&&i>=y&&i<=g}return!1},Dre={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},eA=function(t){var n=Mk(Mk({},Dre),t),r=P.useRef(),i=P.useState(-1),o=_re(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 d=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,O=n.isAnimationActive,T=n.isUpdateAnimationActive;if(d!==+d||h!==+h||m!==+m||y!==+y||m===0||y===0)return null;var _=Pe("recharts-rectangle",j);return T?I.createElement(kr,{canBegin:l>0,from:{width:m,height:y,x:d,y:h},to:{width:m,height:y,x:d,y:h},duration:w,animationEasing:S,isActive:T},function(C){var A=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:O,easing:S},I.createElement("path",ip({},je(n,!0),{className:_,d:Pk(M,D,A,E,g),ref:r})))}):I.createElement("path",ip({},je(n,!0),{className:_,d:Pk(d,h,m,y,g)}))},Lre=["points","className","baseLinePoints","connectNulls"];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 zre(e,t){if(e==null)return{};var n=$re(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 $re(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 Rk(e){return Ure(e)||qre(e)||Ire(e)||Bre()}function Bre(){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 Ire(e,t){if(e){if(typeof e=="string")return Lj(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 Lj(e,t)}}function qre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ure(e){if(Array.isArray(e))return Lj(e)}function Lj(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 kk=function(t){return t&&t.x===+t.x&&t.y===+t.y},Vre=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){kk(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),kk(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},iu=function(t,n){var r=Vre(t);n&&(r=[r.reduce(function(o,l){return[].concat(Rk(o),Rk(l))},[])]);var i=r.map(function(o){return o.reduce(function(l,u,d){return"".concat(l).concat(d===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},Hre=function(t,n,r){var i=iu(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(iu(n.reverse(),r).slice(1))},Fre=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,l=zre(t,Lre);if(!n||!n.length)return null;var u=Pe("recharts-polygon",r);if(i&&i.length){var d=l.stroke&&l.stroke!=="none",h=Hre(n,i,o);return I.createElement("g",{className:u},I.createElement("path",Po({},je(l,!0),{fill:h.slice(-1)==="Z"?l.fill:"none",stroke:"none",d:h})),d?I.createElement("path",Po({},je(l,!0),{fill:"none",d:iu(n,o)})):null,d?I.createElement("path",Po({},je(l,!0),{fill:"none",d:iu(i,o)})):null)}var m=iu(n,o);return I.createElement("path",Po({},je(l,!0),{fill:m.slice(-1)==="Z"?l.fill:"none",className:u,d:m}))};function zj(){return zj=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},zj.apply(this,arguments)}var cf=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",zj({},je(t,!1),Oh(t),{className:l,cx:n,cy:r,r:i})):null};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)}var Gre=["x","y","top","left","width","height","className"];function $j(){return $j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$j.apply(this,arguments)}function Dk(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 Kre(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dk(Object(n),!0).forEach(function(r){Yre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yre(e,t,n){return t=Xre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xre(e){var t=Wre(e,"string");return $u(t)=="symbol"?t:t+""}function Wre(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 Zre(e,t){if(e==null)return{};var n=Qre(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 Qre(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 Jre=function(t,n,r,i,o,l){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(l,",").concat(n,"h").concat(r)},eae=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,d=t.left,h=d===void 0?0:d,m=t.width,y=m===void 0?0:m,g=t.height,j=g===void 0?0:g,S=t.className,w=Zre(t,Gre),b=Kre({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",$j({},je(b,!0),{className:Pe("recharts-cross",S),d:Jre(r,o,y,j,u,h)}))},D0,Lk;function tae(){if(Lk)return D0;Lk=1;var e=rm(),t=a5(),n=ta();function r(i,o){return i&&i.length?e(i,n(o,2),t):void 0}return D0=r,D0}var nae=tae();const rae=at(nae);var L0,zk;function aae(){if(zk)return L0;zk=1;var e=rm(),t=ta(),n=i5();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return L0=r,L0}var iae=aae();const sae=at(iae);var oae=["cx","cy","angle","ticks","axisLine"],lae=["ticks","tick","angle","tickFormatter","stroke"];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 su(){return su=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},su.apply(this,arguments)}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 rs(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){om(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 Bk(e,t){if(e==null)return{};var n=cae(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 cae(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 uae(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,F5(r.key),r)}}function fae(e,t,n){return t&&Ik(e.prototype,t),n&&Ik(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dae(e,t,n){return t=sp(t),hae(e,H5()?Reflect.construct(t,n||[],sp(e).constructor):t.apply(e,n))}function hae(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 pae(e)}function pae(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 mae(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 om(e,t,n){return t=F5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F5(e){var t=yae(e,"string");return rl(t)=="symbol"?t:t+""}function yae(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(t==="string"?String:Number)(e)}var lm=(function(e){function t(){return uae(this,t),dae(this,t,arguments)}return mae(t,e),fae(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,o=this.props,l=o.angle,u=o.cx,d=o.cy;return mt(u,d,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,d=rae(u,function(m){return m.coordinate||0}),h=sae(u,function(m){return m.coordinate||0});return{cx:i,cy:o,startAngle:l,endAngle:l,innerRadius:h.coordinate||0,outerRadius:d.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,l=r.angle,u=r.ticks,d=r.axisLine,h=Bk(r,oae),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=rs(rs(rs({},je(h,!1)),{},{fill:"none"},je(d,!1)),{},{x1:y.x,y1:y.y,x2:g.x,y2:g.y});return I.createElement("line",su({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,d=i.tickFormatter,h=i.stroke,m=Bk(i,lae),y=this.getTickTextAnchor(),g=je(m,!1),j=je(l,!1),S=o.map(function(w,b){var O=r.getTickValueCoord(w),T=rs(rs(rs(rs({textAnchor:y,transform:"rotate(".concat(90-u,", ").concat(O.x,", ").concat(O.y,")")},g),{},{stroke:"none",fill:h},j),{},{index:b},O),{},{payload:w});return I.createElement(Ie,su({className:Pe("recharts-polar-radius-axis-tick",R5(l)),key:"tick-".concat(w.coordinate)},As(r.props,w,b)),t.renderTickItem(l,T,d?d(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(Os,su({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),l}}])})(P.PureComponent);om(lm,"displayName","PolarRadiusAxis");om(lm,"axisType","radiusAxis");om(lm,"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 al(e){"@babel/helpers - typeof";return al=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},al(e)}function cs(){return cs=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},cs.apply(this,arguments)}function qk(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 as(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(n),!0).forEach(function(r){cm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uk(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,K5(r.key),r)}}function gae(e,t,n){return t&&Uk(e.prototype,t),n&&Uk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xae(e,t,n){return t=op(t),bae(e,G5()?Reflect.construct(t,n||[],op(e).constructor):t.apply(e,n))}function bae(e,t){if(t&&(al(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jae(e)}function jae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G5=function(){return!!e})()}function op(e){return op=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},op(e)}function Sae(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 cm(e,t,n){return t=K5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K5(e){var t=wae(e,"string");return al(t)=="symbol"?t:t+""}function wae(e,t){if(al(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(al(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Aae=Math.PI/180,Vk=1e-5,um=(function(e){function t(){return vae(this,t),xae(this,t,arguments)}return Sae(t,e),gae(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.cx,l=i.cy,u=i.radius,d=i.orientation,h=i.tickSize,m=h||8,y=mt(o,l,u,r.coordinate),g=mt(o,l,u+(d==="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*Aae),l;return o>Vk?l=i==="outer"?"start":"end":o<-Vk?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,d=r.axisLineType,h=as(as({},je(this.props,!1)),{},{fill:"none"},je(u,!1));if(d==="circle")return I.createElement(cf,cs({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(Fre,cs({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,d=i.tickFormatter,h=i.stroke,m=je(this.props,!1),y=je(l,!1),g=as(as({},m),{},{fill:"none"},je(u,!1)),j=o.map(function(S,w){var b=r.getTickLineCoord(S),O=r.getTickTextAnchor(S),T=as(as(as({textAnchor:O},m),{},{stroke:"none",fill:h},y),{},{index:w,payload:S,x:b.x2,y:b.y2});return I.createElement(Ie,cs({className:Pe("recharts-polar-angle-axis-tick",R5(l)),key:"tick-".concat(S.coordinate)},As(r.props,S,w)),u&&I.createElement("line",cs({className:"recharts-polar-angle-axis-tick-line"},g,b)),l&&t.renderTickItem(l,T,d?d(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(Os,cs({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),l}}])})(P.PureComponent);cm(um,"displayName","PolarAngleAxis");cm(um,"axisType","angleAxis");cm(um,"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 z0,Hk;function Oae(){if(Hk)return z0;Hk=1;var e=az(),t=e(Object.getPrototypeOf,Object);return z0=t,z0}var $0,Fk;function _ae(){if(Fk)return $0;Fk=1;var e=za(),t=Oae(),n=$a(),r="[object Object]",i=Function.prototype,o=Object.prototype,l=i.toString,u=o.hasOwnProperty,d=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)==d}return $0=h,$0}var Tae=_ae();const Eae=at(Tae);var B0,Gk;function Nae(){if(Gk)return B0;Gk=1;var e=za(),t=$a(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return B0=r,B0}var Cae=Nae();const Mae=at(Cae);function Bu(e){"@babel/helpers - typeof";return Bu=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},Bu(e)}function lp(){return lp=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},lp.apply(this,arguments)}function Pae(e,t){return Lae(e)||Dae(e,t)||kae(e,t)||Rae()}function Rae(){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 kae(e,t){if(e){if(typeof e=="string")return Kk(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 Kk(e,t)}}function Kk(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 Dae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Lae(e){if(Array.isArray(e))return e}function Yk(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 Xk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yk(Object(n),!0).forEach(function(r){zae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zae(e,t,n){return t=$ae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ae(e){var t=Bae(e,"string");return Bu(t)=="symbol"?t:t+""}function Bae(e,t){if(Bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wk=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},Iae={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},qae=function(t){var n=Xk(Xk({},Iae),t),r=P.useRef(),i=P.useState(-1),o=Pae(i,2),l=o[0],u=o[1];P.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&u(_)}catch{}},[]);var d=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,O=n.isUpdateAnimationActive;if(d!==+d||h!==+h||m!==+m||y!==+y||g!==+g||m===0&&y===0||g===0)return null;var T=Pe("recharts-trapezoid",j);return O?I.createElement(kr,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:d,y:h},to:{upperWidth:m,lowerWidth:y,height:g,x:d,y:h},duration:w,animationEasing:S,isActive:O},function(_){var C=_.upperWidth,A=_.lowerWidth,E=_.height,M=_.x,D=_.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",lp({},je(n,!0),{className:T,d:Wk(M,D,C,A,E),ref:r})))}):I.createElement("g",null,I.createElement("path",lp({},je(n,!0),{className:T,d:Wk(d,h,m,y,g)})))},Uae=["option","shapeType","propTransformer","activeClassName","isActive"];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 Vae(e,t){if(e==null)return{};var n=Hae(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 Hae(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 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 cp(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){Fae(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 Fae(e,t,n){return t=Gae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gae(e){var t=Kae(e,"string");return Iu(t)=="symbol"?t:t+""}function Kae(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)}function Yae(e,t){return cp(cp({},t),e)}function Xae(e,t){return e==="symbols"}function Qk(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return I.createElement(eA,n);case"trapezoid":return I.createElement(qae,n);case"sector":return I.createElement(L5,n);case"symbols":if(Xae(t))return I.createElement(xw,n);break;default:return null}}function Wae(e){return P.isValidElement(e)?e.props:e}function Y5(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Yae:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,u=e.isActive,d=Vae(e,Uae),h;if(P.isValidElement(t))h=P.cloneElement(t,cp(cp({},d),Wae(t)));else if(Te(t))h=t(d);else if(Eae(t)&&!Mae(t)){var m=i(t,d);h=I.createElement(Qk,{shapeType:n,elementProps:m})}else{var y=d;h=I.createElement(Qk,{shapeType:n,elementProps:y})}return u?I.createElement(Ie,{className:l},h):h}function fm(e,t){return t!=null&&"trapezoids"in e.props}function dm(e,t){return t!=null&&"sectors"in e.props}function qu(e,t){return t!=null&&"points"in e.props}function Zae(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 Qae(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Jae(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function eie(e,t){var n;return fm(e,t)?n=Zae:dm(e,t)?n=Qae:qu(e,t)&&(n=Jae),n}function tie(e,t){var n;return fm(e,t)?n="trapezoids":dm(e,t)?n="sectors":qu(e,t)&&(n="points"),n}function nie(e,t){if(fm(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(dm(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 qu(e,t)?t.payload:{}}function rie(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=tie(n,t),o=nie(n,t),l=r.filter(function(d,h){var m=_s(o,d),y=n.props[i].filter(function(S){var w=eie(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 uh;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 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 Jk(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?Jk(Object(n),!0).forEach(function(r){fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eD(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,W5(r.key),r)}}function iie(e,t,n){return t&&eD(e.prototype,t),n&&eD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sie(e,t,n){return t=up(t),oie(e,X5()?Reflect.construct(t,n||[],up(e).constructor):t.apply(e,n))}function oie(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 lie(e)}function lie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X5=function(){return!!e})()}function up(e){return up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},up(e)}function cie(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=W5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W5(e){var t=uie(e,"string");return il(t)=="symbol"?t:t+""}function uie(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 Ia=(function(e){function t(n){var r;return aie(this,t),r=sie(this,t,[n]),fr(r,"pieRef",null),fr(r,"sectorRefs",[]),fr(r,"id",Ps("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 cie(t,e),iie(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,d=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 O=(w.startAngle+w.endAngle)/2,T=mt(w.cx,w.cy,w.outerRadius+j,O),_=ht(ht(ht(ht({},m),w),{},{stroke:"none"},y),{},{index:b,textAnchor:t.getTextAnchor(T.x,w.cx)},T),C=ht(ht(ht(ht({},m),w),{},{fill:"none",stroke:w.fill},g),{},{index:b,points:[mt(w.cx,w.cy,w.outerRadius,O),T]}),A=d;return Ne(d)&&Ne(h)?A="value":Ne(d)&&(A=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,_,kt(w,A)))});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,d=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=d&&i.hasActiveIndex()?d:null,j=y?l:g,S=ht(ht({},h),{},{stroke:u?h.fill:h.stroke,tabIndex:-1});return I.createElement(Ie,Ro({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},As(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(Y5,Ro({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,d=i.animationDuration,h=i.animationEasing,m=i.animationId,y=this.state,g=y.prevSectors,j=y.prevIsAnimationActive;return I.createElement(kr,{begin:u,duration:d,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=[],O=o&&o[0],T=O.startAngle;return o.forEach(function(_,C){var A=g&&g[C],E=C>0?Xn(_,"paddingAngle",0):0;if(A){var M=Gt(A.endAngle-A.startAngle,_.endAngle-_.startAngle),D=ht(ht({},_),{},{startAngle:T+E,endAngle:T+M(w)+E});b.push(D),T=D.endAngle}else{var k=_.endAngle,B=_.startAngle,q=Gt(0,k-B),$=q(w),G=ht(ht({},_),{},{startAngle:T+E,endAngle:T+$+E});b.push(G),T=G.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||!_s(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,d=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(O){r.pieRef=O}},this.renderSectors(),d&&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(js,Ro({},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(Os,Ro({},i,{alignmentBaseline:"middle",className:u}),l)}}])})(P.PureComponent);uh=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,Wp);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=P5(i,o),u=r+jn(e.cx,i,i/2),d=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:d,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=uh.getRealPieData(r);if(!i||!i.length)return null;var o=r.cornerRadius,l=r.startAngle,u=r.endAngle,d=r.paddingAngle,h=r.dataKey,m=r.nameKey,y=r.valueKey,g=r.tooltipType,j=Math.abs(r.minAngle),S=uh.parseCoordinateOfPie(r,n),w=uh.parseDeltaAngle(l,u),b=Math.abs(w),O=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`),O="value"):Ne(h)&&(Pr(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),O=y);var T=i.filter(function(D){return kt(D,O,0)!==0}).length,_=(b>=360?T:T-1)*d,C=b-T*j-_,A=i.reduce(function(D,k){var B=kt(k,O,0);return D+(ce(B)?B:0)},0),E;if(A>0){var M;E=i.map(function(D,k){var B=kt(D,O,0),q=kt(D,m,k),$=(ce(B)?B:0)/A,G;k?G=M.endAngle+bn(w)*d*(B!==0?1:0):G=l;var X=G+bn(w)*((B!==0?j:0)+$*C),Y=(G+X)/2,L=(S.innerRadius+S.outerRadius)/2,H=[{name:q,value:B,payload:D,dataKey:O,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,O),startAngle:G,endAngle:X,payload:D,paddingAngle:bn(w)*d}),M})}return ht(ht({},S),{},{sectors:E,data:i})});var I0,tD;function fie(){if(tD)return I0;tD=1;var e=Math.ceil,t=Math.max;function n(r,i,o,l){for(var u=-1,d=t(e((i-r)/(o||1)),0),h=Array(d);d--;)h[l?d:++u]=r,r+=o;return h}return I0=n,I0}var q0,nD;function Z5(){if(nD)return q0;nD=1;var e=bz(),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 q0=r,q0}var U0,rD;function die(){if(rD)return U0;rD=1;var e=fie(),t=Xp(),n=Z5();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 U0=r,U0}var V0,aD;function hie(){if(aD)return V0;aD=1;var e=die(),t=e();return V0=t,V0}var pie=hie();const fp=at(pie);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 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 sD(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){Q5(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 Q5(e,t,n){return t=mie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mie(e){var t=yie(e,"string");return Uu(t)=="symbol"?t:t+""}function yie(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 vie=["Webkit","Moz","O","ms"],gie=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=vie.reduce(function(o,l){return sD(sD({},o),{},Q5({},l+r,n))},{});return i[t]=n,i};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 dp(){return dp=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},dp.apply(this,arguments)}function oD(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 H0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oD(Object(n),!0).forEach(function(r){Hn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lD(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 bie(e,t,n){return t&&lD(e.prototype,t),n&&lD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jie(e,t,n){return t=hp(t),Sie(e,J5()?Reflect.construct(t,n||[],hp(e).constructor):t.apply(e,n))}function Sie(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 wie(e)}function wie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J5=function(){return!!e})()}function hp(e){return hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hp(e)}function Aie(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 Hn(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=Oie(e,"string");return sl(t)=="symbol"?t:t+""}function Oie(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)}var _ie=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 d=n.length,h=nu().domain(fp(0,d)).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}},cD=function(t){return t.changedTouches&&!!t.changedTouches.length},ol=(function(e){function t(n){var r;return xie(this,t),r=jie(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=cD(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 Aie(t,e),bie(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,d=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%d,endIndex:S===m?m:S-S%d}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,l=i.tickFormatter,u=i.dataKey,d=kt(o[r],u,r);return Te(l)?l(d,r):d}},{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,d=this.props,h=d.x,m=d.width,y=d.travellerWidth,g=d.startIndex,j=d.endIndex,S=d.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=cD(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,d=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,O={startX:this.state.startX,endX:this.state.endX},T=r.pageX-o;T>0?T=Math.min(T,y+g-j-h):T<0&&(T=Math.max(T,y-h)),O[l]=h+T;var _=this.getIndex(O),C=_.startIndex,A=_.endIndex,E=function(){var D=b.length-1;return l==="startX"&&(u>d?C%w===0:A%w===0)||u<d&&A===D||l==="endX"&&(u>d?A%w===0:C%w===0)||u>d&&A===D};this.setState(Hn(Hn({},l,h+T),"brushMoveStartX",r.pageX),function(){S&&E()&&S(_)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,l=this.state,u=l.scaleValues,d=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<=d||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,d=r.fill,h=r.stroke;return I.createElement("rect",{stroke:h,fill:d,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,d=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:d}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,l,u=this,d=this.props,h=d.y,m=d.travellerWidth,y=d.height,g=d.traveller,j=d.ariaLabel,S=d.data,w=d.startIndex,b=d.endIndex,O=Math.max(r,this.props.x),T=H0(H0({},je(this.props,!1)),{},{x:O,y:h,width:m,height:y}),_=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":_,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),u.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,T))}},{key:"renderSlide",value:function(r,i){var o=this.props,l=o.y,u=o.height,d=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:d,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,d=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(Os,dp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(y,g)-j,y:l+u/2},S),this.getTextOfTick(i)),I.createElement(Os,dp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(y,g)+d+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,d=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,O=g.isTravellerMoving,T=g.isTravellerFocused;if(!i||!i.length||!ce(u)||!ce(d)||!ce(h)||!ce(m)||h<=0||m<=0)return null;var _=Pe("recharts-brush",o),C=I.Children.count(l)===1,A=gie("userSelect","none");return I.createElement(Ie,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(j,S),this.renderTravellerLayer(j,"startX"),this.renderTravellerLayer(S,"endX"),(w||b||O||T||y)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,l=r.width,u=r.height,d=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:d,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,d=r.travellerWidth,h=r.updateId,m=r.startIndex,y=r.endIndex;if(o!==i.prevData||h!==i.prevUpdateId)return H0({prevData:o,prevTravellerWidth:d,prevUpdateId:h,prevX:u,prevWidth:l},o&&o.length?_ie({data:o,width:l,x:u,travellerWidth:d,startIndex:m,endIndex:y}):{scale:null,scaleValues:null});if(i.scale&&(l!==i.prevWidth||u!==i.prevX||d!==i.prevTravellerWidth)){i.scale.range([u,u+l-d]);var g=i.scale.domain().map(function(j){return i.scale(j)});return{prevData:o,prevTravellerWidth:d,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 d=Math.floor((l+u)/2);r[d]>i?u=d:l=d}return i>=r[u]?u:l}}])})(P.PureComponent);Hn(ol,"displayName","Brush");Hn(ol,"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 F0,uD;function Tie(){if(uD)return F0;uD=1;var e=_w();function t(n,r){var i;return e(n,function(o,l,u){return i=r(o,l,u),!i}),!!i}return F0=t,F0}var G0,fD;function Eie(){if(fD)return G0;fD=1;var e=ZL(),t=ta(),n=Tie(),r=Rn(),i=Xp();function o(l,u,d){var h=r(l)?e:n;return d&&i(l,u,d)&&(u=void 0),h(l,t(u,3))}return G0=o,G0}var Nie=Eie();const Cie=at(Nie);var Wr=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},K0,dD;function Mie(){if(dD)return K0;dD=1;var e=mz();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return K0=t,K0}var Y0,hD;function Pie(){if(hD)return Y0;hD=1;var e=Mie(),t=hz(),n=ta();function r(i,o){var l={};return o=n(o,3),t(i,function(u,d,h){e(l,d,o(u,d,h))}),l}return Y0=r,Y0}var Rie=Pie();const kie=at(Rie);var X0,pD;function Die(){if(pD)return X0;pD=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 X0=e,X0}var W0,mD;function Lie(){if(mD)return W0;mD=1;var e=_w();function t(n,r){var i=!0;return e(n,function(o,l,u){return i=!!r(o,l,u),i}),i}return W0=t,W0}var Z0,yD;function zie(){if(yD)return Z0;yD=1;var e=Die(),t=Lie(),n=ta(),r=Rn(),i=Xp();function o(l,u,d){var h=r(l)?e:t;return d&&i(l,u,d)&&(u=void 0),h(l,n(u,3))}return Z0=o,Z0}var $ie=zie();const t$=at($ie);var Bie=["x","y"];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 Vj(){return Vj=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},Vj.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 Vc(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){Iie(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 Iie(e,t,n){return t=qie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qie(e){var t=Uie(e,"string");return Vu(t)=="symbol"?t:t+""}function Uie(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 Vie(e,t){if(e==null)return{};var n=Hie(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 Hie(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 Fie(e,t){var n=e.x,r=e.y,i=Vie(e,Bie),o="".concat(n),l=parseInt(o,10),u="".concat(r),d=parseInt(u,10),h="".concat(t.height||i.height),m=parseInt(h,10),y="".concat(t.width||i.width),g=parseInt(y,10);return Vc(Vc(Vc(Vc(Vc({},t),i),l?{x:l}:{}),d?{y:d}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function gD(e){return I.createElement(Y5,Vj({shapeType:"rectangle",propTransformer:Fie,activeClassName:"recharts-active-bar"},e))}var Gie=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)||hG(r);return o?t(r,i):(o||Es(),n)}},Kie=["value","background"],n$;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 Yie(e,t){if(e==null)return{};var n=Xie(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 Xie(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 pp(){return pp=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},pp.apply(this,arguments)}function xD(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?xD(Object(n),!0).forEach(function(r){Si(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bD(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 Zie(e,t,n){return t&&bD(e.prototype,t),n&&bD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qie(e,t,n){return t=mp(t),Jie(e,r$()?Reflect.construct(t,n||[],mp(e).constructor):t.apply(e,n))}function Jie(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 ese(e)}function ese(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r$=function(){return!!e})()}function mp(e){return mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mp(e)}function tse(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&&Hj(e,t)}function Hj(e,t){return Hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hj(e,t)}function Si(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=nse(e,"string");return ll(t)=="symbol"?t:t+""}function nse(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 Ti=(function(e){function t(){var n;Wie(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Qie(this,t,[].concat(i)),Si(n,"state",{isAnimationFinished:!1}),Si(n,"id",Ps("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 tse(t,e),Zie(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,l=o.shape,u=o.dataKey,d=o.activeIndex,h=o.activeBar,m=je(this.props,!1);return r&&r.map(function(y,g){var j=g===d,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,pp({className:"recharts-bar-rectangle"},As(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(gD,w))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,l=i.layout,u=i.isAnimationActive,d=i.animationBegin,h=i.animationDuration,m=i.animationEasing,y=i.animationId,g=this.state.prevData;return I.createElement(kr,{begin:d,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,O){var T=g&&g[O];if(T){var _=Gt(T.x,b.x),C=Gt(T.y,b.y),A=Gt(T.width,b.width),E=Gt(T.height,b.height);return Bt(Bt({},b),{},{x:_(S),y:C(S),width:A(S),height:E(S)})}if(l==="horizontal"){var M=Gt(0,b.height),D=M(S);return Bt(Bt({},b),{},{y:b.y+b.height-D,height:D})}var k=Gt(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||!_s(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,d=je(this.props.background,!1);return o.map(function(h,m){h.value;var y=h.background,g=Yie(h,Kie);if(!y)return null;var j=Bt(Bt(Bt(Bt(Bt({},g),{},{fill:"#eee"},y),d),As(r.props,h,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return I.createElement(gD,pp({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,d=o.yAxis,h=o.layout,m=o.children,y=Wn(m,lf);if(!y)return null;var g=h==="vertical"?l[0].height/2:l[0].width/2,j=function(b,O){var T=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:T,errorVal:kt(b,O)}},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:d,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,d=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,O=Pe("recharts-bar",l),T=u&&u.allowDataOverflow,_=d&&d.allowDataOverflow,C=T||_,A=Ne(w)?this.id:w;return I.createElement(Ie,{className:O},T||_?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(A)},I.createElement("rect",{x:T?h:h-y/2,y:_?m:m-g/2,width:T?y:y*2,height:_?g:g*2}))):null,I.createElement(Ie,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(A,")"):null},S?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,A),(!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);n$=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,d=e.yAxisTicks,h=e.stackedData,m=e.dataStartIndex,y=e.displayedData,g=e.offset,j=Tee(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,O=b.dataKey,T=b.children,_=b.minPointSize,C=S==="horizontal"?l:o,A=h?C.scale.domain():null,E=kee({numericAxis:C}),M=Wn(T,Wp),D=y.map(function(k,B){var q,$,G,X,Y,L;h?q=Eee(h[m+B],A):(q=kt(k,O),Array.isArray(q)||(q=[E,q]));var H=Gie(_,n$.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];$=YR({axis:o,ticks:u,bandSize:i,offset:j.offset,entry:k,index:B}),G=(Q=z??oe)!==null&&Q!==void 0?Q:void 0,X=j.size;var F=oe-z;if(Y=Number.isNaN(F)?0:F,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));G-=re,Y+=re}}else{var fe=[o.scale(q[0]),o.scale(q[1])],me=fe[0],we=fe[1];if($=me,G=YR({axis:l,ticks:d,bandSize:i,offset:j.offset,entry:k,index:B}),X=we-me,Y=j.size,L={x:o.x,y:G,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:G,width:X,height:Y,value:h?q:q[1],payload:k,background:L},M&&M[B]&&M[B].props),{},{tooltipPayload:[C5(n,k)],tooltipPosition:{x:$+X/2,y:G+Y/2}})});return Bt({data:D,layout:S},g)});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 rse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jD(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,i$(r.key),r)}}function ase(e,t,n){return t&&jD(e.prototype,t),n&&jD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function SD(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?SD(Object(n),!0).forEach(function(r){hm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hm(e,t,n){return t=i$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i$(e){var t=ise(e,"string");return Hu(t)=="symbol"?t:t+""}function ise(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)}var tA=function(t,n,r,i,o){var l=t.width,u=t.height,d=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=!!Fn(h,Ti);return m.reduce(function(j,S){var w=n[S],b=w.orientation,O=w.domain,T=w.padding,_=T===void 0?{}:T,C=w.mirror,A=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 $=O[1]-O[0],G=1/0,X=w.categoricalDomain.sort(yG);if(X.forEach(function(fe,me){me>0&&(G=Math.min((fe||0)-(X[me-1]||0),G))}),Number.isFinite(G)){var Y=G/$,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+(_.left||0)+(M||0),r.left+r.width-(_.right||0)-(M||0)]:i==="yAxis"?D=d==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(M||0),r.top+r.height-(_.bottom||0)-(M||0)]:D=w.range,A&&(D=[D[1],D[0]]);var ae=_5(w,o,g),oe=ae.scale,z=ae.realScaleType;oe.domain(O).range(D),T5(oe);var F=E5(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),F),{},{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=Qh(re,F),!w.hide&&i==="xAxis"?y[E]+=(q?-1:1)*re.height:w.hide||(y[E]+=(q?-1:1)*re.width),_r(_r({},j),{},hm({},S,re))},{})},s$=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)}},sse=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return s$({x:n,y:r},{x:i,y:o})},o$=(function(){function e(t){rse(this,e),this.scale=t}return ase(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 d=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+d}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)}}])})();hm(o$,"EPS",1e-4);var nA=function(t){var n=Object.keys(t).reduce(function(r,i){return _r(_r({},r),{},hm({},i,o$.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 kie(i,function(d,h){return n[h].apply(d,{bandAware:l,position:u})})},isInRange:function(i){return t$(i,function(o,l){return n[l].isInRange(o)})}})};function ose(e){return(e%180+180)%180}var lse=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=ose(i),l=o*Math.PI/180,u=Math.atan(r/n),d=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(d)},Q0,wD;function cse(){if(wD)return Q0;wD=1;var e=ta(),t=nf(),n=Kp();function r(i){return function(o,l,u){var d=Object(o);if(!t(o)){var h=e(l,3);o=n(o),l=function(y){return h(d[y],y,d)}}var m=i(o,l,u);return m>-1?d[h?o[m]:m]:void 0}}return Q0=r,Q0}var J0,AD;function use(){if(AD)return J0;AD=1;var e=Z5();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return J0=t,J0}var e1,OD;function fse(){if(OD)return e1;OD=1;var e=lz(),t=ta(),n=use(),r=Math.max;function i(o,l,u){var d=o==null?0:o.length;if(!d)return-1;var h=u==null?0:n(u);return h<0&&(h=r(d+h,0)),e(o,t(l,3),h)}return e1=i,e1}var t1,_D;function dse(){if(_D)return t1;_D=1;var e=cse(),t=fse(),n=e(t);return t1=n,t1}var hse=dse();const pse=at(hse);var mse=wL();const yse=at(mse);var vse=yse(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("")}),rA=P.createContext(void 0),aA=P.createContext(void 0),l$=P.createContext(void 0),c$=P.createContext({}),u$=P.createContext(void 0),f$=P.createContext(0),d$=P.createContext(0),TD=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,l=t.clipPathId,u=t.children,d=t.width,h=t.height,m=vse(o);return I.createElement(rA.Provider,{value:r},I.createElement(aA.Provider,{value:i},I.createElement(c$.Provider,{value:o},I.createElement(l$.Provider,{value:m},I.createElement(u$.Provider,{value:l},I.createElement(f$.Provider,{value:h},I.createElement(d$.Provider,{value:d},u)))))))},gse=function(){return P.useContext(u$)},h$=function(t){var n=P.useContext(rA);n==null&&Es();var r=n[t];return r==null&&Es(),r},xse=function(){var t=P.useContext(rA);return gi(t)},bse=function(){var t=P.useContext(aA),n=pse(t,function(r){return t$(r.domain,Number.isFinite)});return n||gi(t)},p$=function(t){var n=P.useContext(aA);n==null&&Es();var r=n[t];return r==null&&Es(),r},jse=function(){var t=P.useContext(l$);return t},Sse=function(){return P.useContext(c$)},iA=function(){return P.useContext(d$)},sA=function(){return P.useContext(f$)};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 wse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ase(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 Ose(e,t,n){return t&&Ase(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _se(e,t,n){return t=yp(t),Tse(e,m$()?Reflect.construct(t,n||[],yp(e).constructor):t.apply(e,n))}function Tse(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 Ese(e)}function Ese(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 Nse(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 ED(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 ND(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(n),!0).forEach(function(r){oA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oA(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=Cse(e,"string");return cl(t)=="symbol"?t:t+""}function Cse(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)}function Mse(e,t){return Dse(e)||kse(e,t)||Rse(e,t)||Pse()}function Pse(){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 Rse(e,t){if(e){if(typeof e=="string")return CD(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 CD(e,t)}}function CD(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 kse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Dse(e){if(Array.isArray(e))return e}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)}var Lse=function(t,n){var r;return I.isValidElement(t)?r=I.cloneElement(t,n):Te(t)?r=t(n):r=I.createElement("line",Gj({},n,{className:"recharts-reference-line-line"})),r},zse=function(t,n,r,i,o,l,u,d,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 d==="left"?b.reverse():b}if(n){var O=h.x,T=t.x.apply(O,{position:l});if(Wr(h,"discard")&&!t.x.isInRange(T))return null;var _=[{x:T,y:y+j},{x:T,y}];return u==="top"?_.reverse():_}if(i){var C=h.segment,A=C.map(function(E){return t.apply(E,{position:l})});return Wr(h,"discard")&&Cie(A,function(E){return!t.isInRange(E)})?null:A}return null};function $se(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,l=e.shape,u=e.className,d=e.alwaysShow,h=gse(),m=h$(i),y=p$(o),g=jse();if(!h||!g)return null;Pr(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var j=nA({x:m.scale,y:y.scale}),S=Kt(t),w=Kt(n),b=r&&r.length===2,O=zse(j,S,w,b,g,e.position,m.orientation,y.orientation,e);if(!O)return null;var T=Mse(O,2),_=T[0],C=_.x,A=_.y,E=T[1],M=E.x,D=E.y,k=Wr(e,"hidden")?"url(#".concat(h,")"):void 0,B=ND(ND({clipPath:k},je(e,!0)),{},{x1:C,y1:A,x2:M,y2:D});return I.createElement(Ie,{className:Pe("recharts-reference-line",u)},Lse(l,B),Jt.renderCallByParent(e,sse({x1:C,y1:A,x2:M,y2:D})))}var lA=(function(e){function t(){return wse(this,t),_se(this,t,arguments)}return Nse(t,e),Ose(t,[{key:"render",value:function(){return I.createElement($se,this.props)}}])})(I.Component);oA(lA,"displayName","ReferenceLine");oA(lA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});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 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 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){pm(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 Bse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ise(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 qse(e,t,n){return t&&Ise(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Use(e,t,n){return t=vp(t),Vse(e,v$()?Reflect.construct(t,n||[],vp(e).constructor):t.apply(e,n))}function Vse(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 Hse(e)}function Hse(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 Fse(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 pm(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=Gse(e,"string");return ul(t)=="symbol"?t:t+""}function Gse(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 Kse=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,l=nA({x:i.scale,y:o.scale}),u=l.apply({x:n,y:r},{bandAware:!0});return Wr(t,"discard")&&!l.isInRange(u)?null:u},mm=(function(e){function t(){return Bse(this,t),Use(this,t,arguments)}return Fse(t,e),qse(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,l=r.r,u=r.alwaysShow,d=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=Kse(this.props);if(!y)return null;var g=y.x,j=y.y,S=this.props,w=S.shape,b=S.className,O=Wr(this.props,"hidden")?"url(#".concat(d,")"):void 0,T=PD(PD({clipPath:O},je(this.props,!0)),{},{cx:g,cy:j});return I.createElement(Ie,{className:Pe("recharts-reference-dot",b)},t.renderDot(w,T),Jt.renderCallByParent(this.props,{x:g-l,y:j-l,width:2*l,height:2*l}))}}])})(I.Component);pm(mm,"displayName","ReferenceDot");pm(mm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});pm(mm,"renderDot",function(e,t){var n;return I.isValidElement(e)?n=I.cloneElement(e,t):Te(e)?n=e(t):n=I.createElement(cf,Kj({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Xj(){return Xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xj.apply(this,arguments)}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 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 kD(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){ym(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 Yse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xse(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b$(r.key),r)}}function Wse(e,t,n){return t&&Xse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zse(e,t,n){return t=gp(t),Qse(e,x$()?Reflect.construct(t,n||[],gp(e).constructor):t.apply(e,n))}function Qse(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 Jse(e)}function Jse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x$=function(){return!!e})()}function gp(e){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gp(e)}function eoe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wj(e,t)}function Wj(e,t){return Wj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Wj(e,t)}function ym(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=toe(e,"string");return fl(t)=="symbol"?t:t+""}function toe(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 noe=function(t,n,r,i,o){var l=o.x1,u=o.x2,d=o.y1,h=o.y2,m=o.xAxis,y=o.yAxis;if(!m||!y)return null;var g=nA({x:m.scale,y:y.scale}),j={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(d,{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:s$(j,S)},vm=(function(e){function t(){return Yse(this,t),Zse(this,t,arguments)}return eoe(t,e),Wse(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,l=r.y1,u=r.y2,d=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=noe(y,g,j,S,this.props);if(!b&&!w)return null;var O=Wr(this.props,"hidden")?"url(#".concat(m,")"):void 0;return I.createElement(Ie,{className:Pe("recharts-reference-area",d)},t.renderRect(w,kD(kD({clipPath:O},je(this.props,!0)),b)),Jt.renderCallByParent(this.props,b))}}])})(I.Component);ym(vm,"displayName","ReferenceArea");ym(vm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ym(vm,"renderRect",function(e,t){var n;return I.isValidElement(e)?n=I.cloneElement(e,t):Te(e)?n=e(t):n=I.createElement(eA,Xj({},t,{className:"recharts-reference-area-rect"})),n});function j$(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 roe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return lse(r,n)}function aoe(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 xp(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 ioe(e,t){return j$(e,t+1)}function soe(e,t,n,r,i){for(var o=(r||[]).slice(),l=t.start,u=t.end,d=0,h=1,m=l,y=function(){var S=r==null?void 0:r[d];if(S===void 0)return{v:j$(r,h)};var w=d,b,O=function(){return b===void 0&&(b=n(S,w)),b},T=S.coordinate,_=d===0||xp(e,T,O,m,u);_||(d=0,m=l,h+=1),_&&(m=T+e*(O()/2+i),d+=h)},g;h<=o.length;)if(g=y(),g)return g.v;return[]}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)}function DD(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?DD(Object(n),!0).forEach(function(r){ooe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ooe(e,t,n){return t=loe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function loe(e){var t=coe(e,"string");return Fu(t)=="symbol"?t:t+""}function coe(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 uoe(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,u=t.start,d=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-d);o[g]=j=mn(mn({},j),{},{tickCoord:b>0?j.coordinate-b*e:j.coordinate})}else o[g]=j=mn(mn({},j),{},{tickCoord:j.coordinate});var O=xp(e,j.tickCoord,w,u,d);O&&(d=j.tickCoord-e*(w()/2+i),o[g]=mn(mn({},j),{},{isShow:!0}))},m=l-1;m>=0;m--)h(m);return o}function foe(e,t,n,r,i,o){var l=(r||[]).slice(),u=l.length,d=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=mn(mn({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var j=xp(e,m.tickCoord,function(){return y},d,h);j&&(h=m.tickCoord-e*(y/2+i),l[u-1]=mn(mn({},m),{},{isShow:!0}))}for(var S=o?u-1:u,w=function(T){var _=l[T],C,A=function(){return C===void 0&&(C=n(_,T)),C};if(T===0){var E=e*(_.coordinate-e*A()/2-d);l[T]=_=mn(mn({},_),{},{tickCoord:E<0?_.coordinate-E*e:_.coordinate})}else l[T]=_=mn(mn({},_),{},{tickCoord:_.coordinate});var M=xp(e,_.tickCoord,A,d,h);M&&(d=_.tickCoord+e*(A()/2+i),l[T]=mn(mn({},_),{},{isShow:!0}))},b=0;b<S;b++)w(b);return l}function cA(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,l=e.minTickGap,u=e.orientation,d=e.interval,h=e.tickFormatter,m=e.unit,y=e.angle;if(!i||!i.length||!r)return[];if(ce(d)||Pi.isSsr)return ioe(i,typeof d=="number"&&ce(d)?d:0);var g=[],j=u==="top"||u==="bottom"?"width":"height",S=m&&j==="width"?tu(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},w=function(_,C){var A=Te(h)?h(_.value,C):_.value;return j==="width"?roe(tu(A,{fontSize:t,letterSpacing:n}),S,y):tu(A,{fontSize:t,letterSpacing:n})[j]},b=i.length>=2?bn(i[1].coordinate-i[0].coordinate):1,O=aoe(o,b,j);return d==="equidistantPreserveStart"?soe(b,O,w,i,l):(d==="preserveStart"||d==="preserveStartEnd"?g=foe(b,O,w,i,l,d==="preserveStartEnd"):g=uoe(b,O,w,i,l),g.filter(function(T){return T.isShow}))}var doe=["viewBox"],hoe=["viewBox"],poe=["ticks"];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 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 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 Vt(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){uA(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 n1(e,t){if(e==null)return{};var n=moe(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 moe(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 yoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zD(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,w$(r.key),r)}}function voe(e,t,n){return t&&zD(e.prototype,t),n&&zD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function goe(e,t,n){return t=bp(t),xoe(e,S$()?Reflect.construct(t,n||[],bp(e).constructor):t.apply(e,n))}function xoe(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 boe(e)}function boe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S$=function(){return!!e})()}function bp(e){return bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bp(e)}function joe(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 uA(e,t,n){return t=w$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w$(e){var t=Soe(e,"string");return dl(t)=="symbol"?t:t+""}function Soe(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)}var Dl=(function(e){function t(n){var r;return yoe(this,t),r=goe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return joe(t,e),voe(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,l=n1(r,doe),u=this.props,d=u.viewBox,h=n1(u,hoe);return!Bo(o,d)||!Bo(l,h)||!Bo(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,d=i.height,h=i.orientation,m=i.tickSize,y=i.mirror,g=i.tickMargin,j,S,w,b,O,T,_=y?-1:1,C=r.tickSize||m,A=ce(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":j=S=r.coordinate,b=l+ +!y*d,w=b-_*C,T=w-_*g,O=A;break;case"left":w=b=r.coordinate,S=o+ +!y*u,j=S-_*C,O=j-_*g,T=A;break;case"right":w=b=r.coordinate,S=o+ +y*u,j=S+_*C,O=j+_*g,T=A;break;default:j=S=r.coordinate,b=l+ +y*d,w=b+_*C,T=w+_*g,O=A;break}return{line:{x1:j,y1:w,x2:S,y2:b},tick:{x:O,y:T}}}},{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,d=r.orientation,h=r.mirror,m=r.axisLine,y=Vt(Vt(Vt({},je(this.props,!1)),je(m,!1)),{},{fill:"none"});if(d==="top"||d==="bottom"){var g=+(d==="top"&&!h||d==="bottom"&&h);y=Vt(Vt({},y),{},{x1:i,y1:o+g*u,x2:i+l,y2:o+g*u})}else{var j=+(d==="left"&&!h||d==="right"&&h);y=Vt(Vt({},y),{},{x1:i+j*l,y1:o,x2:i+j*l,y2:o+u})}return I.createElement("line",ko({},y,{className:Pe("recharts-cartesian-axis-line",Xn(m,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var l=this,u=this.props,d=u.tickLine,h=u.stroke,m=u.tick,y=u.tickFormatter,g=u.unit,j=cA(Vt(Vt({},this.props),{},{ticks:r}),i,o),S=this.getTickTextAnchor(),w=this.getTickVerticalAnchor(),b=je(this.props,!1),O=je(m,!1),T=Vt(Vt({},b),{},{fill:"none"},je(d,!1)),_=j.map(function(C,A){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},O),D),{},{index:A,payload:C,visibleTicksCount:j.length,tickFormatter:y});return I.createElement(Ie,ko({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},As(l.props,C,A)),d&&I.createElement("line",ko({},T,M,{className:Pe("recharts-cartesian-axis-tick-line",Xn(d,"className"))})),m&&t.renderTickItem(m,k,"".concat(Te(y)?y(C.value,A):C.value).concat(g||"")))});return I.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,l=i.width,u=i.height,d=i.ticksGenerator,h=i.className,m=i.hide;if(m)return null;var y=this.props,g=y.ticks,j=n1(y,poe),S=g;return Te(d)&&(S=g&&g.length>0?d(this.props):d(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(Os,ko({},i,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(P.Component);uA(Dl,"displayName","CartesianAxis");uA(Dl,"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 woe=["x1","y1","x2","y2","key"],Aoe=["offset"];function Ns(e){"@babel/helpers - typeof";return Ns=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},Ns(e)}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 yn(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){Ooe(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 Ooe(e,t,n){return t=_oe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _oe(e){var t=Toe(e,"string");return Ns(t)=="symbol"?t:t+""}function Toe(e,t){if(Ns(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ns(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}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 BD(e,t){if(e==null)return{};var n=Eoe(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 Eoe(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 Noe=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,d=t.ry;return I.createElement("rect",{x:i,y:o,ry:d,width:l,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function A$(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,d=BD(t,woe),h=je(d,!1);h.offset;var m=BD(h,Aoe);n=I.createElement("line",ms({},m,{x1:r,y1:i,x2:o,y2:l,fill:"none",key:u}))}return n}function Coe(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,d){var h=yn(yn({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(d),index:d});return A$(i,h)});return I.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Moe(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,d){var h=yn(yn({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(d),index:d});return A$(i,h)});return I.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Poe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,l=e.height,u=e.horizontalPoints,d=e.horizontal,h=d===void 0?!0:d;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 Roe(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,d=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:d,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return I.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},y)}var koe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,l=t.offset;return O5(cA(yn(yn(yn({},Dl.defaultProps),r),{},{ticks:Ta(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.left,l.left+l.width,n)},Doe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,l=t.offset;return O5(cA(yn(yn(yn({},Dl.defaultProps),r),{},{ticks:Ta(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.top,l.top+l.height,n)},wo={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function jp(e){var t,n,r,i,o,l,u=iA(),d=sA(),h=Sse(),m=yn(yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:wo.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:wo.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:wo.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:wo.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:wo.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:wo.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,O=m.verticalValues,T=xse(),_=bse();if(!ce(j)||j<=0||!ce(S)||S<=0||!ce(y)||y!==+y||!ce(g)||g!==+g)return null;var C=m.verticalCoordinatesGenerator||koe,A=m.horizontalCoordinatesGenerator||Doe,E=m.horizontalPoints,M=m.verticalPoints;if((!E||!E.length)&&Te(A)){var D=b&&b.length,k=A({yAxis:_?yn(yn({},_),{},{ticks:D?b:_.ticks}):void 0,width:u,height:d,offset:h},D?!0:w);Pr(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ns(k),"]")),Array.isArray(k)&&(E=k)}if((!M||!M.length)&&Te(C)){var B=O&&O.length,q=C({xAxis:T?yn(yn({},T),{},{ticks:B?O:T.ticks}):void 0,width:u,height:d,offset:h},B?!0:w);Pr(Array.isArray(q),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ns(q),"]")),Array.isArray(q)&&(M=q)}return I.createElement("g",{className:"recharts-cartesian-grid"},I.createElement(Noe,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),I.createElement(Coe,ms({},m,{offset:h,horizontalPoints:E,xAxis:T,yAxis:_})),I.createElement(Moe,ms({},m,{offset:h,verticalPoints:M,xAxis:T,yAxis:_})),I.createElement(Poe,ms({},m,{horizontalPoints:E})),I.createElement(Roe,ms({},m,{verticalPoints:M})))}jp.displayName="CartesianGrid";var Loe=["type","layout","connectNulls","ref"],zoe=["key"];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 ID(e,t){if(e==null)return{};var n=$oe(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 $oe(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 ou(){return ou=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},ou.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 Vn(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){Tr(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 Ao(e){return Uoe(e)||qoe(e)||Ioe(e)||Boe()}function Boe(){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 Ioe(e,t){if(e){if(typeof e=="string")return Qj(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 Qj(e,t)}}function qoe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uoe(e){if(Array.isArray(e))return Qj(e)}function Qj(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 Voe(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,_$(r.key),r)}}function Hoe(e,t,n){return t&&UD(e.prototype,t),n&&UD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Foe(e,t,n){return t=Sp(t),Goe(e,O$()?Reflect.construct(t,n||[],Sp(e).constructor):t.apply(e,n))}function Goe(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 Koe(e)}function Koe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(O$=function(){return!!e})()}function Sp(e){return Sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sp(e)}function Yoe(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 Tr(e,t,n){return t=_$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _$(e){var t=Xoe(e,"string");return hl(t)=="symbol"?t:t+""}function Xoe(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)}var uf=(function(e){function t(){var n;Voe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Foe(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,d){var h=d.reduce(function(O,T){return O+T});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<d.length;w+=d[S],++S)if(w+d[S]>y){j=[].concat(Ao(d.slice(0,S)),[y-w]);break}var b=j.length%2===0?[0,g]:[g];return[].concat(Ao(t.repeat(d,m)),Ao(j),b).map(function(O){return"".concat(O,"px")}).join(", ")}),Tr(n,"id",Ps("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 Yoe(t,e),Hoe(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,d=o.yAxis,h=o.layout,m=o.children,y=Wn(m,lf);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:d,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,d=u.dot,h=u.points,m=u.dataKey,y=je(this.props,!1),g=je(d,!0),j=h.map(function(w,b){var O=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(d,O)}),S={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return I.createElement(Ie,ou({className:"recharts-line-dots",key:"dots"},S),j)}},{key:"renderCurveStatically",value:function(r,i,o,l){var u=this.props,d=u.type,h=u.layout,m=u.connectNulls;u.ref;var y=ID(u,Loe),g=Vn(Vn(Vn({},je(y,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},l),{},{type:d,layout:h,connectNulls:m});return I.createElement(js,ou({},g,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,l=this.props,u=l.points,d=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,O=this.state,T=O.prevPoints,_=O.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 A=C.t;if(T){var E=T.length/u.length,M=u.map(function($,G){var X=Math.floor(G*E);if(T[X]){var Y=T[X],L=Gt(Y.x,$.x),H=Gt(Y.y,$.y);return Vn(Vn({},$),{},{x:L(A),y:H(A)})}if(S){var Q=Gt(w*2,$.x),ae=Gt(b/2,$.y);return Vn(Vn({},$),{},{x:Q(A),y:ae(A)})}return Vn(Vn({},$),{},{x:$.x,y:$.y})});return o.renderCurveStatically(M,r,i)}var D=Gt(0,_),k=D(A),B;if(d){var q="".concat(d).split(/[,\s]+/gim).map(function($){return parseFloat($)});B=o.getStrokeDasharray(k,_,q)}else B=o.generateSimpleStrokeDasharray(_,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,d=this.state,h=d.prevPoints,m=d.totalLength;return u&&l&&l.length&&(!h&&m>0||!_s(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,d=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 O=this.state.isAnimationFinished,T=u.length===1,_=Pe("recharts-line",d),C=h&&h.allowDataOverflow,A=m&&m.allowDataOverflow,E=C||A,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,G=EL(l)?l:{},X=G.clipDot,Y=X===void 0?!0:X,L=B*2+$;return I.createElement(Ie,{className:_},C||A?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(M)},I.createElement("rect",{x:C?g:g-j/2,y:A?y:y-S/2,width:C?j:j*2,height:A?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,!T&&this.renderCurve(E,M),this.renderErrorBar(E,M),(T||l)&&this.renderDots(E,Y,M),(!w||O)&&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(Ao(r),[0]):r,l=[],u=0;u<i;++u)l=[].concat(Ao(l),Ao(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=ID(i,zoe),d=Pe("recharts-line-dot",typeof r!="boolean"?r.className:"");o=I.createElement(cf,ou({key:l},u,{className:d}))}return o}}])})(P.PureComponent);Tr(uf,"displayName","Line");Tr(uf,"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(uf,"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,d=e.displayedData,h=e.offset,m=t.layout,y=d.map(function(g,j){var S=kt(g,l);return m==="horizontal"?{x:Zh({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:Zh({axis:r,ticks:o,bandSize:u,entry:g,index:j}),value:S,payload:g}});return Vn({points:y,layout:m},h)});var Woe=["layout","type","stroke","connectNulls","isRange","ref"],Zoe=["key"],T$;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 E$(e,t){if(e==null)return{};var n=Qoe(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 Qoe(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 ys(){return ys=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},ys.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 yi(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){Gr(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 Joe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HD(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,C$(r.key),r)}}function ele(e,t,n){return t&&HD(e.prototype,t),n&&HD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tle(e,t,n){return t=wp(t),nle(e,N$()?Reflect.construct(t,n||[],wp(e).constructor):t.apply(e,n))}function nle(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 rle(e)}function rle(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 ale(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&&eS(e,t)}function eS(e,t){return eS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},eS(e,t)}function Gr(e,t,n){return t=C$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C$(e){var t=ile(e,"string");return pl(t)=="symbol"?t:t+""}function ile(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 String(e)}var La=(function(e){function t(){var n;Joe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=tle(this,t,[].concat(i)),Gr(n,"state",{isAnimationFinished:!0}),Gr(n,"id",Ps("recharts-area-")),Gr(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Te(l)&&l()}),Gr(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Te(l)&&l()}),n}return ale(t,e),ele(t,[{key:"renderDots",value:function(r,i,o){var l=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(l&&!u)return null;var d=this.props,h=d.dot,m=d.points,y=d.dataKey,g=je(this.props,!1),j=je(h,!0),S=m.map(function(b,O){var T=yi(yi(yi({key:"dot-".concat(O),r:3},g),j),{},{index:O,cx:b.x,cy:b.y,dataKey:y,value:b.value,payload:b.payload,points:m});return t.renderDotItem(h,T)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return I.createElement(Ie,ys({className:"recharts-area-dots"},w),S)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,o=i.baseLine,l=i.points,u=i.strokeWidth,d=l[0].x,h=l[l.length-1].x,m=r*Math.abs(d-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:d<h?d:d-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,d=l[0].y,h=l[l.length-1].y,m=r*Math.abs(d-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:d<h?d:d-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,d=u.layout,h=u.type,m=u.stroke,y=u.connectNulls,g=u.isRange;u.ref;var j=E$(u,Woe);return I.createElement(Ie,{clipPath:o?"url(#clipPath-".concat(l,")"):null},I.createElement(js,ys({},je(j,!0),{points:r,connectNulls:y,type:h,baseLine:i,layout:d,stroke:"none",className:"recharts-area-area"})),m!=="none"&&I.createElement(js,ys({},je(this.props,!1),{className:"recharts-area-curve",layout:d,type:h,connectNulls:y,fill:"none",points:r})),m!=="none"&&g&&I.createElement(js,ys({},je(this.props,!1),{className:"recharts-area-curve",layout:d,type:h,connectNulls:y,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var o=this,l=this.props,u=l.points,d=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(O){var T=O.t;if(w){var _=w.length/u.length,C=u.map(function(D,k){var B=Math.floor(k*_);if(w[B]){var q=w[B],$=Gt(q.x,D.x),G=Gt(q.y,D.y);return yi(yi({},D),{},{x:$(T),y:G(T)})}return D}),A;if(ce(d)&&typeof d=="number"){var E=Gt(b,d);A=E(T)}else if(Ne(d)||Cl(d)){var M=Gt(b,0);A=M(T)}else A=d.map(function(D,k){var B=Math.floor(k*_);if(b[B]){var q=b[B],$=Gt(q.x,D.x),G=Gt(q.y,D.y);return yi(yi({},D),{},{x:$(T),y:G(T)})}return D});return o.renderAreaStatically(C,A,r,i)}return I.createElement(Ie,null,I.createElement("defs",null,I.createElement("clipPath",{id:"animationClipPath-".concat(i)},o.renderClipRect(T))),I.createElement(Ie,{clipPath:"url(#animationClipPath-".concat(i,")")},o.renderAreaStatically(u,d,r,i)))})}},{key:"renderArea",value:function(r,i){var o=this.props,l=o.points,u=o.baseLine,d=o.isAnimationActive,h=this.state,m=h.prevPoints,y=h.prevBaseLine,g=h.totalLength;return d&&l&&l.length&&(!m&&g>0||!_s(m,l)||!_s(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,d=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 O=this.state.isAnimationFinished,T=u.length===1,_=Pe("recharts-area",d),C=y&&y.allowDataOverflow,A=g&&g.allowDataOverflow,E=C||A,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,G=EL(l)?l:{},X=G.clipDot,Y=X===void 0?!0:X,L=B*2+$;return I.createElement(Ie,{className:_},C||A?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(M)},I.createElement("rect",{x:C?m:m-j/2,y:A?h:h-S/2,width:C?j:j*2,height:A?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,T?null:this.renderArea(E,M),(l||T)&&this.renderDots(E,Y,M),(!w||O)&&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);T$=La;Gr(La,"displayName","Area");Gr(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"});Gr(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 d=i==="horizontal"?r:n,h=d.scale.domain();if(d.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]});Gr(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,d=e.dataKey,h=e.stackedData,m=e.dataStartIndex,y=e.displayedData,g=e.offset,j=t.layout,S=h&&h.length,w=T$.getBaseValue(t,n,r,i),b=j==="horizontal",O=!1,T=y.map(function(C,A){var E;S?E=h[m+A]:(E=kt(C,d),Array.isArray(E)?O=!0:E=[w,E]);var M=E[1]==null||S&&kt(C,d)==null;return b?{x:Zh({axis:r,ticks:o,bandSize:u,entry:C,index:A}),y:M?null:i.scale(E[1]),value:E,payload:C}:{x:M?null:r.scale(E[1]),y:Zh({axis:i,ticks:l,bandSize:u,entry:C,index:A}),value:E,payload:C}}),_;return S||O?_=T.map(function(C){var A=Array.isArray(C.value)?C.value[0]:null;return b?{x:C.x,y:A!=null&&C.y!=null?i.scale(A):null}:{x:A!=null?r.scale(A):null,y:C.y}}):_=b?i.scale(w):r.scale(w),yi({points:T,baseLine:_,layout:j,isRange:O},g)});Gr(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=E$(t,Zoe);n=I.createElement(cf,ys({},o,{key:i,className:r}))}return n});function ml(e){"@babel/helpers - typeof";return ml=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},ml(e)}function sle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ole(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 lle(e,t,n){return t&&ole(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cle(e,t,n){return t=Ap(t),ule(e,M$()?Reflect.construct(t,n||[],Ap(e).constructor):t.apply(e,n))}function ule(e,t){if(t&&(ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fle(e)}function fle(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 Ap(e){return Ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ap(e)}function dle(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 P$(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=hle(e,"string");return ml(t)=="symbol"?t:t+""}function hle(e,t){if(ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ml(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)}function ple(e){var t=e.xAxisId,n=iA(),r=sA(),i=h$(t);return i==null?null:P.createElement(Dl,nS({},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 sle(this,t),cle(this,t,arguments)}return dle(t,e),lle(t,[{key:"render",value:function(){return P.createElement(ple,this.props)}}])})(P.Component);P$(Ei,"displayName","XAxis");P$(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 yl(e){"@babel/helpers - typeof";return yl=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},yl(e)}function mle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yle(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,L$(r.key),r)}}function vle(e,t,n){return t&&yle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gle(e,t,n){return t=Op(t),xle(e,k$()?Reflect.construct(t,n||[],Op(e).constructor):t.apply(e,n))}function xle(e,t){if(t&&(yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ble(e)}function ble(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k$=function(){return!!e})()}function Op(e){return Op=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Op(e)}function jle(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&&rS(e,t)}function rS(e,t){return rS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rS(e,t)}function D$(e,t,n){return t=L$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L$(e){var t=Sle(e,"string");return yl(t)=="symbol"?t:t+""}function Sle(e,t){if(yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function aS(){return aS=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},aS.apply(this,arguments)}var wle=function(t){var n=t.yAxisId,r=iA(),i=sA(),o=p$(n);return o==null?null:P.createElement(Dl,aS({},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 mle(this,t),gle(this,t,arguments)}return jle(t,e),vle(t,[{key:"render",value:function(){return P.createElement(wle,this.props)}}])})(P.Component);D$(Ni,"displayName","YAxis");D$(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 FD(e){return Tle(e)||_le(e)||Ole(e)||Ale()}function Ale(){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 Ole(e,t){if(e){if(typeof e=="string")return iS(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 iS(e,t)}}function _le(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tle(e){if(Array.isArray(e))return iS(e)}function iS(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 sS=function(t,n,r,i,o){var l=Wn(t,lA),u=Wn(t,mm),d=[].concat(FD(l),FD(u)),h=Wn(t,vm),m="".concat(i,"Id"),y=i[0],g=n;if(d.length&&(g=d.reduce(function(w,b){if(b.props[m]===r&&Wr(b.props,"extendDomain")&&ce(b.props[y])){var O=b.props[y];return[Math.min(w[0],O),Math.max(w[1],O)]}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 O=b.props[j],T=b.props[S];return[Math.min(w[0],O,T),Math.max(w[1],O,T)]}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},r1={exports:{}},GD;function Ele(){return GD||(GD=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(d,h,m){this.fn=d,this.context=h,this.once=m||!1}function o(d,h,m,y,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var j=new i(m,y||d,g),S=n?n+h:h;return d._events[S]?d._events[S].fn?d._events[S]=[d._events[S],j]:d._events[S].push(j):(d._events[S]=j,d._eventsCount++),d}function l(d,h){--d._eventsCount===0?d._events=new r:delete d._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],O=arguments.length,T,_;if(b.fn){switch(b.once&&this.removeListener(h,b.fn,void 0,!0),O){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(_=1,T=new Array(O-1);_<O;_++)T[_-1]=arguments[_];b.fn.apply(b.context,T)}else{var C=b.length,A;for(_=0;_<C;_++)switch(b[_].once&&this.removeListener(h,b[_].fn,void 0,!0),O){case 1:b[_].fn.call(b[_].context);break;case 2:b[_].fn.call(b[_].context,m);break;case 3:b[_].fn.call(b[_].context,m,y);break;case 4:b[_].fn.call(b[_].context,m,y,g);break;default:if(!T)for(A=1,T=new Array(O-1);A<O;A++)T[A-1]=arguments[A];b[_].fn.apply(b[_].context,T)}}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=[],O=S.length;w<O;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})(r1)),r1.exports}var Nle=Ele();const Cle=at(Nle);var a1=new Cle,i1="recharts.syncMouseEvents";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 Mle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ple(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,z$(r.key),r)}}function Rle(e,t,n){return t&&Ple(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function s1(e,t,n){return t=z$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z$(e){var t=kle(e,"string");return Gu(t)=="symbol"?t:t+""}function kle(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 String(e)}var Dle=(function(){function e(){Mle(this,e),s1(this,"activeIndex",0),s1(this,"coordinateList",[]),s1(this,"layout","horizontal")}return Rle(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,d=n.layout,h=d===void 0?null:d,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,d=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+d+h,g=l+this.offset.top+u/2+m;this.mouseHandlerCallback({pageX:y,pageY:g})}}}])})();function Lle(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 zle(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 $$(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 $le(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,d=t.cy,h=t.innerRadius,m=t.outerRadius,y=t.angle,g=mt(u,d,h,y),j=mt(u,d,m,y);r=g.x,i=g.y,o=j.x,l=j.y}else return $$(t);return[{x:r,y:i},{x:o,y:l}]}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 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 Yd(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){Ble(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 Ble(e,t,n){return t=Ile(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ile(e){var t=qle(e,"string");return Ku(t)=="symbol"?t:t+""}function qle(e,t){if(Ku(e)!="object"||!e)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 Ule(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,u=e.activePayload,d=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=js;if(g==="ScatterChart")S=l,w=eae;else if(g==="BarChart")S=zle(y,l,d,m),w=eA;else if(y==="radial"){var b=$$(l),O=b.cx,T=b.cy,_=b.radius,C=b.startAngle,A=b.endAngle;S={cx:O,cy:T,startAngle:C,endAngle:A,innerRadius:_,outerRadius:_},w=L5}else S={points:$le(y,l,d)},w=js;var E=Yd(Yd(Yd(Yd({stroke:"#ccc",pointerEvents:"none"},d),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 Vle=["item"],Hle=["children","className","width","height","style","compact","title","desc"];function vl(e){"@babel/helpers - typeof";return vl=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},vl(e)}function Do(){return Do=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},Do.apply(this,arguments)}function YD(e,t){return Kle(e)||Gle(e,t)||I$(e,t)||Fle()}function Fle(){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 Gle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],d=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){h=!0,i=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Kle(e){if(Array.isArray(e))return e}function XD(e,t){if(e==null)return{};var n=Yle(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 Yle(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 Xle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wle(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,q$(r.key),r)}}function Zle(e,t,n){return t&&Wle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qle(e,t,n){return t=_p(t),Jle(e,B$()?Reflect.construct(t,n||[],_p(e).constructor):t.apply(e,n))}function Jle(e,t){if(t&&(vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ece(e)}function ece(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 _p(e){return _p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_p(e)}function tce(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&&oS(e,t)}function oS(e,t){return oS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oS(e,t)}function gl(e){return ace(e)||rce(e)||I$(e)||nce()}function nce(){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 I$(e,t){if(e){if(typeof e=="string")return lS(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 lS(e,t)}}function rce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ace(e){if(Array.isArray(e))return lS(e)}function lS(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 WD(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?WD(Object(n),!0).forEach(function(r){Oe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oe(e,t,n){return t=q$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q$(e){var t=ice(e,"string");return vl(t)=="symbol"?t:t+""}function ice(e,t){if(vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sce={xAxis:["bottom","top"],yAxis:["left","right"]},oce={width:"100%",height:"100%"},U$={x:0,y:0};function Xd(e){return e}var lce=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},cce=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 d=o.coordinate,h=i.angle;return ne(ne(ne({},i),mt(i.cx,i.cy,d,h)),{},{angle:h,radius:d})}return U$},gm=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(u,d){var h=d.props.data;return h&&h.length?[].concat(gl(u),gl(h)):u},[]);return l.length>0?l:t&&t.length&&ce(i)&&ce(o)?t.slice(i,o+1):[]};function V$(e){return e==="number"?[0,"auto"]:void 0}var cS=function(t,n,r,i){var o=t.graphicalItems,l=t.tooltipAxis,u=gm(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(d,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=Ah(j,l.dataKey,i)}else g=y&&y[r]||u[r];return g?[].concat(gl(d),[C5(h,g)]):d},[])},ZD=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},l=lce(o,r),u=t.orderedTooltipTicks,d=t.tooltipAxis,h=t.tooltipTicks,m=jee(l,u,h,d);if(m>=0&&h){var y=h[m]&&h[m].value,g=cS(t,n,m,y),j=cce(r,u,m,o);return{activeTooltipIndex:m,activeLabel:y,activePayload:g,activeCoordinate:j}}return null},uce=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,m=t.layout,y=t.children,g=t.stackOffset,j=A5(m,o);return r.reduce(function(S,w){var b,O=w.type.defaultProps!==void 0?ne(ne({},w.type.defaultProps),w.props):w.props,T=O.type,_=O.dataKey,C=O.allowDataOverflow,A=O.allowDuplicatedCategory,E=O.scale,M=O.ticks,D=O.includeHidden,k=O[l];if(S[k])return S;var B=gm(t.data,{graphicalItems:i.filter(function(F){var re,fe=l in F.props?F.props[l]:(re=F.type.defaultProps)===null||re===void 0?void 0:re[l];return fe===k}),dataStartIndex:d,dataEndIndex:h}),q=B.length,$,G,X;Lle(O.domain,C,T)&&($=Sj(O.domain,null,C),j&&(T==="number"||E!=="auto")&&(X=ru(B,_,"category")));var Y=V$(T);if(!$||$.length===0){var L,H=(L=O.domain)!==null&&L!==void 0?L:Y;if(_){if($=ru(B,_,T),T==="category"&&j){var Q=mG($);A&&Q?(G=$,$=fp(0,q)):A||($=ZR(H,$,w).reduce(function(F,re){return F.indexOf(re)>=0?F:[].concat(gl(F),[re])},[]))}else if(T==="category")A?$=$.filter(function(F){return F!==""&&!Ne(F)}):$=ZR(H,$,w).reduce(function(F,re){return F.indexOf(re)>=0||re===""||Ne(re)?F:[].concat(gl(F),[re])},[]);else if(T==="number"){var ae=_ee(B,i.filter(function(F){var re,fe,me=l in F.props?F.props[l]:(re=F.type.defaultProps)===null||re===void 0?void 0:re[l],we="hide"in F.props?F.props.hide:(fe=F.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return me===k&&(D||!we)}),_,o,m);ae&&($=ae)}j&&(T==="number"||E!=="auto")&&(X=ru(B,_,"category"))}else j?$=fp(0,q):u&&u[k]&&u[k].hasStack&&T==="number"?$=g==="expand"?[0,1]:N5(u[k].stackGroups,d,h):$=w5(B,i.filter(function(F){var re=l in F.props?F.props[l]:F.type.defaultProps[l],fe="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return re===k&&(D||!fe)}),T,m,!0);if(T==="number")$=sS(y,$,k,o,M),H&&($=Sj(H,$,C));else if(T==="category"&&H){var oe=H,z=$.every(function(F){return oe.indexOf(F)>=0});z&&($=oe)}}return ne(ne({},S),{},Oe({},k,ne(ne({},O),{},{axisType:o,domain:$,categoricalDomain:X,duplicateDomain:G,originalDomain:(b=O.domain)!==null&&b!==void 0?b:Y,isCategorical:j,layout:m})))},{})},fce=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,m=t.layout,y=t.children,g=gm(t.data,{graphicalItems:r,dataStartIndex:d,dataEndIndex:h}),j=g.length,S=A5(m,o),w=-1;return r.reduce(function(b,O){var T=O.type.defaultProps!==void 0?ne(ne({},O.type.defaultProps),O.props):O.props,_=T[l],C=V$("number");if(!b[_]){w++;var A;return S?A=fp(0,j):u&&u[_]&&u[_].hasStack?(A=N5(u[_].stackGroups,d,h),A=sS(y,A,_,o)):(A=Sj(C,w5(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===_&&!B}),"number",m),i.defaultProps.allowDataOverflow),A=sS(y,A,_,o)),ne(ne({},b),{},Oe({},_,ne(ne({axisType:o},i.defaultProps),{},{hide:!0,orientation:Xn(sce,"".concat(o,".").concat(w%2),null),domain:A,originalDomain:C,isCategorical:S,layout:m})))}return b},{})},dce=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,u=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,m=t.children,y="".concat(i,"Id"),g=Wn(m,o),j={};return g&&g.length?j=uce(t,{axes:g,graphicalItems:l,axisType:i,axisIdKey:y,stackGroups:u,dataStartIndex:d,dataEndIndex:h}):l&&l.length&&(j=fce(t,{Axis:o,graphicalItems:l,axisType:i,axisIdKey:y,stackGroups:u,dataStartIndex:d,dataEndIndex:h})),j},hce=function(t){var n=gi(t),r=Ta(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Tw(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Qh(n,r)}},QD=function(t){var n=t.children,r=t.defaultShowTooltip,i=Fn(n,ol),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}},pce=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ea(n&&n.type);return r&&r.indexOf("Bar")>=0})},JD=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"}},mce=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,u=t.yAxisMap,d=u===void 0?{}:u,h=r.width,m=r.height,y=r.children,g=r.margin||{},j=Fn(y,ol),S=Fn(y,Io),w=Object.keys(d).reduce(function(A,E){var M=d[E],D=M.orientation;return!M.mirror&&!M.hide?ne(ne({},A),{},Oe({},D,A[D]+M.width)):A},{left:g.left||0,right:g.right||0}),b=Object.keys(l).reduce(function(A,E){var M=l[E],D=M.orientation;return!M.mirror&&!M.hide?ne(ne({},A),{},Oe({},D,Xn(A,"".concat(D))+M.height)):A},{top:g.top||0,bottom:g.bottom||0}),O=ne(ne({},b),w),T=O.bottom;j&&(O.bottom+=j.props.height||ol.defaultProps.height),S&&n&&(O=Aee(O,i,r,n));var _=h-O.left-O.right,C=m-O.top-O.bottom;return ne(ne({brushBottom:T},O),{},{width:Math.max(_,0),height:Math.max(C,0)})},yce=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},xm=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,d=t.axisComponents,h=t.legendContent,m=t.formatAxisMap,y=t.defaultProps,g=function(O,T){var _=T.graphicalItems,C=T.stackGroups,A=T.offset,E=T.updateId,M=T.dataStartIndex,D=T.dataEndIndex,k=O.barSize,B=O.layout,q=O.barGap,$=O.barCategoryGap,G=O.maxBarSize,X=JD(B),Y=X.numericAxisName,L=X.cateAxisName,H=pce(_),Q=[];return _.forEach(function(ae,oe){var z=gm(O.data,{graphicalItems:[ae],dataStartIndex:M,dataEndIndex:D}),F=ae.type.defaultProps!==void 0?ne(ne({},ae.type.defaultProps),ae.props):ae.props,re=F.dataKey,fe=F.maxBarSize,me=F["".concat(Y,"Id")],we=F["".concat(L,"Id")],ze={},Ze=d.reduce(function(xr,na){var Ll=T["".concat(na.axisType,"Map")],hn=F["".concat(na.axisType,"Id")];Ll&&Ll[hn]||na.axisType==="zAxis"||Es();var ff=Ll[hn];return ne(ne({},xr),{},Oe(Oe({},na.axisType,ff),"".concat(na.axisType,"Ticks"),Ta(ff)))},ze),ue=Ze[L],Ee=Ze["".concat(L,"Ticks")],Ce=C&&C[me]&&C[me].hasStack&&Dee(ae,C[me].stackGroups),le=Ea(ae.type).indexOf("Bar")>=0,yt=Qh(ue,Ee),ke=[],_t=H&&See({barSize:k,stackGroups:C,totalSize:yce(Ze,L)});if(le){var Tt,dn,gr=Ne(fe)?G:fe,$r=(Tt=(dn=Qh(ue,Ee,!0))!==null&&dn!==void 0?dn:gr)!==null&&Tt!==void 0?Tt:0;ke=wee({barGap:q,barCategoryGap:$,bandSize:$r!==yt?$r:yt,sizeList:_t[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:O,dataKey:re,item:ae,bandSize:yt,barPosition:ke,offset:A,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:TG(ae,O.children),item:ae})}),Q},j=function(O,T){var _=O.props,C=O.dataStartIndex,A=O.dataEndIndex,E=O.updateId;if(!dC({props:_}))return null;var M=_.children,D=_.layout,k=_.stackOffset,B=_.data,q=_.reverseStackOrder,$=JD(D),G=$.numericAxisName,X=$.cateAxisName,Y=Wn(M,r),L=Ree(B,Y,"".concat(G,"Id"),"".concat(X,"Id"),k,q),H=d.reduce(function(F,re){var fe="".concat(re.axisType,"Map");return ne(ne({},F),{},Oe({},fe,dce(_,ne(ne({},re),{},{graphicalItems:Y,stackGroups:re.axisType===G&&L,dataStartIndex:C,dataEndIndex:A}))))},{}),Q=mce(ne(ne({},H),{},{props:_,graphicalItems:Y}),T==null?void 0:T.legendBBox);Object.keys(H).forEach(function(F){H[F]=m(_,H[F],Q,F.replace("Map",""),n)});var ae=H["".concat(X,"Map")],oe=hce(ae),z=g(_,ne(ne({},H),{},{dataStartIndex:C,dataEndIndex:A,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 O(T){var _,C,A;return Xle(this,O),A=Qle(this,O,[T]),Oe(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Oe(A,"accessibilityManager",new Dle),Oe(A,"handleLegendBBoxUpdate",function(E){if(E){var M=A.state,D=M.dataStartIndex,k=M.dataEndIndex,B=M.updateId;A.setState(ne({legendBBox:E},j({props:A.props,dataStartIndex:D,dataEndIndex:k,updateId:B},ne(ne({},A.state),{},{legendBBox:E}))))}}),Oe(A,"handleReceiveSyncEvent",function(E,M,D){if(A.props.syncId===E){if(D===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(M)}}),Oe(A,"handleBrushChange",function(E){var M=E.startIndex,D=E.endIndex;if(M!==A.state.dataStartIndex||D!==A.state.dataEndIndex){var k=A.state.updateId;A.setState(function(){return ne({dataStartIndex:M,dataEndIndex:D},j({props:A.props,dataStartIndex:M,dataEndIndex:D,updateId:k},A.state))}),A.triggerSyncEvent({dataStartIndex:M,dataEndIndex:D})}}),Oe(A,"handleMouseEnter",function(E){var M=A.getMouseInfo(E);if(M){var D=ne(ne({},M),{},{isTooltipActive:!0});A.setState(D),A.triggerSyncEvent(D);var k=A.props.onMouseEnter;Te(k)&&k(D,E)}}),Oe(A,"triggeredAfterMouseMove",function(E){var M=A.getMouseInfo(E),D=M?ne(ne({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(D),A.triggerSyncEvent(D);var k=A.props.onMouseMove;Te(k)&&k(D,E)}),Oe(A,"handleItemMouseEnter",function(E){A.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Oe(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Oe(A,"handleMouseMove",function(E){E.persist(),A.throttleTriggeredAfterMouseMove(E)}),Oe(A,"handleMouseLeave",function(E){A.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};A.setState(M),A.triggerSyncEvent(M);var D=A.props.onMouseLeave;Te(D)&&D(M,E)}),Oe(A,"handleOuterEvent",function(E){var M=_G(E),D=Xn(A.props,"".concat(M));if(M&&Te(D)){var k,B;/.*touch.*/i.test(M)?B=A.getMouseInfo(E.changedTouches[0]):B=A.getMouseInfo(E),D((k=B)!==null&&k!==void 0?k:{},E)}}),Oe(A,"handleClick",function(E){var M=A.getMouseInfo(E);if(M){var D=ne(ne({},M),{},{isTooltipActive:!0});A.setState(D),A.triggerSyncEvent(D);var k=A.props.onClick;Te(k)&&k(D,E)}}),Oe(A,"handleMouseDown",function(E){var M=A.props.onMouseDown;if(Te(M)){var D=A.getMouseInfo(E);M(D,E)}}),Oe(A,"handleMouseUp",function(E){var M=A.props.onMouseUp;if(Te(M)){var D=A.getMouseInfo(E);M(D,E)}}),Oe(A,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Oe(A,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&A.handleMouseDown(E.changedTouches[0])}),Oe(A,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&A.handleMouseUp(E.changedTouches[0])}),Oe(A,"handleDoubleClick",function(E){var M=A.props.onDoubleClick;if(Te(M)){var D=A.getMouseInfo(E);M(D,E)}}),Oe(A,"handleContextMenu",function(E){var M=A.props.onContextMenu;if(Te(M)){var D=A.getMouseInfo(E);M(D,E)}}),Oe(A,"triggerSyncEvent",function(E){A.props.syncId!==void 0&&a1.emit(i1,A.props.syncId,E,A.eventEmitterSymbol)}),Oe(A,"applySyncEvent",function(E){var M=A.props,D=M.layout,k=M.syncMethod,B=A.state.updateId,q=E.dataStartIndex,$=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)A.setState(ne({dataStartIndex:q,dataEndIndex:$},j({props:A.props,dataStartIndex:q,dataEndIndex:$,updateId:B},A.state)));else if(E.activeTooltipIndex!==void 0){var G=E.chartX,X=E.chartY,Y=E.activeTooltipIndex,L=A.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(G,oe.x+oe.width),F=Math.min(X,oe.y+oe.height),re=Q[Y]&&Q[Y].value,fe=cS(A.state,A.props.data,Y),me=Q[Y]?{x:D==="horizontal"?Q[Y].coordinate:z,y:D==="horizontal"?F:Q[Y].coordinate}:U$;A.setState(ne(ne({},E),{},{activeLabel:re,activeCoordinate:me,activePayload:fe,activeTooltipIndex:Y}))}else A.setState(E)}),Oe(A,"renderCursor",function(E){var M,D=A.state,k=D.isTooltipActive,B=D.activeCoordinate,q=D.activePayload,$=D.offset,G=D.activeTooltipIndex,X=D.tooltipAxisBandSize,Y=A.getTooltipEventType(),L=(M=E.props.active)!==null&&M!==void 0?M:k,H=A.props.layout,Q=E.key||"_recharts-cursor";return I.createElement(Ule,{key:Q,activeCoordinate:B,activePayload:q,activeTooltipIndex:G,chartName:n,element:E,isActive:L,layout:H,offset:$,tooltipAxisBandSize:X,tooltipEventType:Y})}),Oe(A,"renderPolarAxis",function(E,M,D){var k=Xn(E,"type.axisType"),B=Xn(A.state,"".concat(k,"Map")),q=E.type.defaultProps,$=q!==void 0?ne(ne({},q),E.props):E.props,G=B&&B[$["".concat(k,"Id")]];return P.cloneElement(E,ne(ne({},G),{},{className:Pe(k,G.className),key:E.key||"".concat(M,"-").concat(D),ticks:Ta(G,!0)}))}),Oe(A,"renderPolarGrid",function(E){var M=E.props,D=M.radialLines,k=M.polarAngles,B=M.polarRadius,q=A.state,$=q.radiusAxisMap,G=q.angleAxisMap,X=gi($),Y=gi(G),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(A,"renderLegend",function(){var E=A.state.formattedGraphicalItems,M=A.props,D=M.children,k=M.width,B=M.height,q=A.props.margin||{},$=k-(q.left||0)-(q.right||0),G=j5({children:D,formattedGraphicalItems:E,legendWidth:$,legendContent:h});if(!G)return null;var X=G.item,Y=XD(G,Vle);return P.cloneElement(X,ne(ne({},Y),{},{chartWidth:k,chartHeight:B,margin:q,onBBoxUpdate:A.handleLegendBBoxUpdate}))}),Oe(A,"renderTooltip",function(){var E,M=A.props,D=M.children,k=M.accessibilityLayer,B=Fn(D,Gn);if(!B)return null;var q=A.state,$=q.isTooltipActive,G=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:G,accessibilityLayer:k})}),Oe(A,"renderBrush",function(E){var M=A.props,D=M.margin,k=M.data,B=A.state,q=B.offset,$=B.dataStartIndex,G=B.dataEndIndex,X=B.updateId;return P.cloneElement(E,{key:E.key||"_recharts-brush",onChange:Hd(A.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:G,updateId:"brush-".concat(X)})}),Oe(A,"renderReferenceElement",function(E,M,D){if(!E)return null;var k=A,B=k.clipPathId,q=A.state,$=q.xAxisMap,G=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:G[oe],viewBox:{x:X.left,y:X.top,width:X.width,height:X.height},clipPathId:B})}),Oe(A,"renderActivePoints",function(E){var M=E.item,D=E.activePoint,k=E.basePoint,B=E.childIndex,q=E.isRange,$=[],G=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:Jw(M.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},je(Y,!1)),Oh(Y));return $.push(O.renderActiveDot(Y,H,"".concat(G,"-activePoint-").concat(B))),k?$.push(O.renderActiveDot(Y,ne(ne({},H),{},{cx:k.x,cy:k.y}),"".concat(G,"-basePoint-").concat(B))):q&&$.push(null),$}),Oe(A,"renderGraphicChild",function(E,M,D){var k=A.filterFormatItem(E,M,D);if(!k)return null;var B=A.getTooltipEventType(),q=A.state,$=q.isTooltipActive,G=q.tooltipAxis,X=q.activeTooltipIndex,Y=q.activeLabel,L=A.props.children,H=Fn(L,Gn),Q=k.props,ae=Q.points,oe=Q.isRange,z=Q.baseLine,F=k.item.type.defaultProps!==void 0?ne(ne({},k.item.type.defaultProps),k.item.props):k.item.props,re=F.activeDot,fe=F.hide,me=F.activeBar,we=F.activeShape,ze=!!(!fe&&$&&H&&(re||me||we)),Ze={};B!=="axis"&&H&&H.props.trigger==="click"?Ze={onClick:Hd(A.handleItemMouseEnter,E.props.onClick)}:B!=="axis"&&(Ze={onMouseLeave:Hd(A.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:Hd(A.handleItemMouseEnter,E.props.onMouseEnter)});var ue=P.cloneElement(E,ne(ne({},k.props),Ze));function Ee(na){return typeof G.dataKey=="function"?G.dataKey(na.payload):null}if(ze)if(X>=0){var Ce,le;if(G.dataKey&&!G.allowDuplicatedCategory){var yt=typeof G.dataKey=="function"?Ee:"payload.".concat(G.dataKey.toString());Ce=Ah(ae,yt,Y),le=oe&&z&&Ah(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(gl(A.renderActivePoints({item:k,activePoint:Ce,basePoint:le,childIndex:X,isRange:oe})))}else{var _t,Tt=(_t=A.getItemByXY(A.state.activeCoordinate))!==null&&_t!==void 0?_t:{graphicalItem:ue},dn=Tt.graphicalItem,gr=dn.item,$r=gr===void 0?E:gr,qa=dn.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(A,"renderCustomized",function(E,M,D){return P.cloneElement(E,ne(ne({key:"recharts-customized-".concat(D)},A.props),A.state))}),Oe(A,"renderMap",{CartesianGrid:{handler:Xd,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Xd},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Xd},YAxis:{handler:Xd},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((_=T.id)!==null&&_!==void 0?_:Ps("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=jz(A.triggeredAfterMouseMove,(C=T.throttleDelay)!==null&&C!==void 0?C:1e3/60),A.state={},A}return tce(O,b),Zle(O,[{key:"componentDidMount",value:function(){var _,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_: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 _=this.props,C=_.children,A=_.data,E=_.height,M=_.layout,D=Fn(C,Gn);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=cS(this.state,A,k,B),$=this.state.tooltipTicks[k].coordinate,G=(this.state.offset.top+E)/2,X=M==="horizontal",Y=X?{x:$,y:G}:{y:$,x:G},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(_,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var A,E;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(_){H1([Fn(_.children,Gn)],[Fn(this.props.children,Gn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Fn(this.props.children,Gn);if(_&&typeof _.props.shared=="boolean"){var C=_.props.shared?"axis":"item";return u.indexOf(C)>=0?C:o}return o}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var C=this.container,A=C.getBoundingClientRect(),E=hW(A),M={chartX:Math.round(_.pageX-E.left),chartY:Math.round(_.pageY-E.top)},D=A.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,G=this.getTooltipEventType(),X=ZD(this.state,this.props.data,this.props.layout,k);if(G!=="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(_,C){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,M=_/A,D=C/A;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,G=q.radiusAxisMap;if($&&G){var X=gi($);return ek({x:M,y:D},X)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,C=this.getTooltipEventType(),A=Fn(_,Gn),E={};A&&C==="axis"&&(A.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=Oh(this.props,this.handleOuterEvent);return ne(ne({},M),E)}},{key:"addListener",value:function(){a1.on(i1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){a1.removeListener(i1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,C,A){for(var E=this.state.formattedGraphicalItems,M=0,D=E.length;M<D;M++){var k=E[M];if(k.item===_||k.props.key===_.key||C===Ea(k.item.type)&&A===k.childIndex)return k}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,C=this.state.offset,A=C.left,E=C.top,M=C.height,D=C.width;return I.createElement("defs",null,I.createElement("clipPath",{id:_},I.createElement("rect",{x:A,y:E,height:M,width:D})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(C,A){var E=YD(A,2),M=E[0],D=E[1];return ne(ne({},C),{},Oe({},M,D.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(C,A){var E=YD(A,2),M=E[0],D=E[1];return ne(ne({},C),{},Oe({},M,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[_])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(_){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[_])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(_){var C=this.state,A=C.formattedGraphicalItems,E=C.activeItem;if(A&&A.length)for(var M=0,D=A.length;M<D;M++){var k=A[M],B=k.props,q=k.item,$=q.type.defaultProps!==void 0?ne(ne({},q.type.defaultProps),q.props):q.props,G=Ea(q.type);if(G==="Bar"){var X=(B.data||[]).find(function(Q){return kre(_,Q)});if(X)return{graphicalItem:k,payload:X}}else if(G==="RadialBar"){var Y=(B.data||[]).find(function(Q){return ek(_,Q)});if(Y)return{graphicalItem:k,payload:Y}}else if(fm(k,E)||dm(k,E)||qu(k,E)){var L=rie({graphicalItem:k,activeTooltipItem:E,itemData:$.data}),H=$.activeIndex===void 0?L:$.activeIndex;return{graphicalItem:ne(ne({},k),{},{childIndex:H}),payload:qu(k,E)?$.data[L]:k.props.data[L]}}}return null}},{key:"render",value:function(){var _=this;if(!dC(this))return null;var C=this.props,A=C.children,E=C.className,M=C.width,D=C.height,k=C.style,B=C.compact,q=C.title,$=C.desc,G=XD(C,Hle),X=je(G,!1);if(B)return I.createElement(TD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement(G1,Do({},X,{width:M,height:D,title:q,desc:$}),this.renderClipPath(),pC(A,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){_.accessibilityManager.keyboardEvent(Q)},X.onFocus=function(){_.accessibilityManager.focus()}}var H=this.parseEventsOfWrapper();return I.createElement(TD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement("div",Do({className:Pe("recharts-wrapper",E),style:ne({position:"relative",cursor:"default",width:M,height:D},k)},H,{ref:function(ae){_.container=ae}}),I.createElement(G1,Do({},X,{width:M,height:D,title:q,desc:$,style:oce}),this.renderClipPath(),pC(A,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,O){var T=b.dataKey,_=b.data,C=b.children,A=b.width,E=b.height,M=b.layout,D=b.stackOffset,k=b.margin,B=O.dataStartIndex,q=O.dataEndIndex;if(O.updateId===void 0){var $=QD(b);return ne(ne(ne({},$),{},{updateId:0},j(ne(ne({props:b},$),{},{updateId:0}),O)),{},{prevDataKey:T,prevData:_,prevWidth:A,prevHeight:E,prevLayout:M,prevStackOffset:D,prevMargin:k,prevChildren:C})}if(T!==O.prevDataKey||_!==O.prevData||A!==O.prevWidth||E!==O.prevHeight||M!==O.prevLayout||D!==O.prevStackOffset||!Bo(k,O.prevMargin)){var G=QD(b),X={chartX:O.chartX,chartY:O.chartY,isTooltipActive:O.isTooltipActive},Y=ne(ne({},ZD(O,_,M)),{},{updateId:O.updateId+1}),L=ne(ne(ne({},G),X),Y);return ne(ne(ne({},L),j(ne({props:b},L),O)),{},{prevDataKey:T,prevData:_,prevWidth:A,prevHeight:E,prevLayout:M,prevStackOffset:D,prevMargin:k,prevChildren:C})}if(!H1(C,O.prevChildren)){var H,Q,ae,oe,z=Fn(C,ol),F=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=F!==B||re!==q,me=!Ne(_),we=me&&!fe?O.updateId:O.updateId+1;return ne(ne({updateId:we},j(ne(ne({props:b},O),{},{updateId:we,dataStartIndex:F,dataEndIndex:re}),O)),{},{prevChildren:C,dataStartIndex:F,dataEndIndex:re})}return null}),Oe(S,"renderActiveDot",function(b,O,T){var _;return P.isValidElement(b)?_=P.cloneElement(b,O):Te(b)?_=b(O):_=I.createElement(cf,O),I.createElement(Ie,{className:"recharts-active-dot",key:T},_)});var w=P.forwardRef(function(O,T){return I.createElement(S,Do({},O,{ref:T}))});return w.displayName=S.displayName,w},vce=xm({chartName:"LineChart",GraphicalChild:uf,axisComponents:[{axisType:"xAxis",AxisComp:Ei},{axisType:"yAxis",AxisComp:Ni}],formatAxisMap:tA}),gce=xm({chartName:"BarChart",GraphicalChild:Ti,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ei},{axisType:"yAxis",AxisComp:Ni}],formatAxisMap:tA}),xce=xm({chartName:"PieChart",GraphicalChild:Ia,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:um},{axisType:"radiusAxis",AxisComp:lm}],formatAxisMap:Fee,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),bce=xm({chartName:"AreaChart",GraphicalChild:La,axisComponents:[{axisType:"xAxis",AxisComp:Ei},{axisType:"yAxis",AxisComp:Ni}],formatAxisMap:tA});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 f.jsx(en.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},className:Ot("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 f.jsxs("div",{className:Ot("flex items-start justify-between mb-6",r),children:[f.jsxs("div",{children:[f.jsx("h3",{className:"text-base font-semibold text-text-primary",children:e}),t&&f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:t})]}),n&&f.jsx("div",{children:n})]})}const jce=[{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}],Sce=[{key:"revenue",label:"Revenue"},{key:"mrr",label:"MRR"},{key:"arr",label:"ARR"}];function wce(e){return`${(e/1e3).toFixed(0)}k`}function Ace(){const[e,t]=P.useState("revenue");return f.jsxs(he,{children:[f.jsx(We,{title:"Revenue Overview",subtitle:"Monthly revenue vs target",action:f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:Sce.map(n=>f.jsx("button",{onClick:()=>t(n.key),className:Ot("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))})}),f.jsx("div",{className:"h-[280px]",children:f.jsx(Dh,{width:"100%",height:"100%",children:f.jsxs(bce,{data:jce,margin:{top:5,right:5,left:-10,bottom:0},children:[f.jsx("defs",{children:f.jsxs("linearGradient",{id:"colorRevenue",x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"5%",stopColor:"#2563EB",stopOpacity:.08}),f.jsx("stop",{offset:"95%",stopColor:"#2563EB",stopOpacity:0})]})}),f.jsx(jp,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),f.jsx(Ei,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),f.jsx(Ni,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:wce,dx:-5}),f.jsx(Gn,{content:({active:n,payload:r,label:i})=>!n||!(r!=null&&r.length)?null:f.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[f.jsx("p",{className:"text-xs font-medium text-text-secondary mb-2",children:i}),r.map((o,l)=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:o.color||"#2563EB"}}),f.jsxs("span",{className:"text-text-secondary",children:[o.name,":"]}),f.jsxs("span",{className:"font-semibold text-text-primary",children:["€",Number(o.value).toLocaleString()]})]},l))]})}),f.jsx(La,{type:"monotone",dataKey:"revenue",stroke:"#2563EB",strokeWidth:2,fill:"url(#colorRevenue)",dot:!1,activeDot:{r:4,strokeWidth:0,fill:"#2563EB"}}),f.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 f.jsx("span",{className:Ot("inline-flex items-center rounded-full font-medium",i[t],o[n],r),children:e})}const Oce=[{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"}],_ce={deal:{icon:Mr,color:"primary",label:"Deal"},customer:{icon:Pa,color:"success",label:"Customer"},invoice:{icon:bi,color:"warning",label:"Invoice"},contract:{icon:gH,color:"primary",label:"Contract"},employee:{icon:B1,color:"success",label:"HR"}};function Tce(){return f.jsxs(he,{children:[f.jsx(We,{title:"Recent Activity",subtitle:"Latest updates across your organization"}),f.jsx("div",{className:"space-y-0",children:Oce.map((e,t)=>{const n=_ce[e.type],r=n.icon;return f.jsxs(en.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:[f.jsx("div",{className:`w-9 h-9 rounded-xl bg-${n.color}-light flex items-center justify-center shrink-0`,children:f.jsx(r,{size:16,className:`text-${n.color}`})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("p",{className:"text-sm font-medium text-text-primary truncate",children:e.title}),f.jsx(Ke,{variant:n.color,size:"sm",children:n.label})]}),f.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.description}),f.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[f.jsx("span",{className:"text-[11px] text-text-secondary/60",children:sw(e.time)}),e.user&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-[11px] text-text-secondary/40",children:"·"}),f.jsx("span",{className:"text-[11px] text-text-secondary/60",children:e.user})]})]})]})]},e.id)})})]})}function Ece({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 f.jsxs(he,{children:[f.jsx(We,{title:"Balance Sheet (Balansräkning)",subtitle:"Assets vs Liabilities & Equity"}),f.jsxs("div",{className:"p-6 space-y-6",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between mb-2",children:[f.jsx("span",{className:"font-semibold text-success",children:"Assets (Tillgångar)"}),f.jsx("span",{className:"font-bold",children:Oo(e.total_assets)})]}),f.jsx("div",{className:"w-full bg-surface-2 rounded-full h-4",children:f.jsx("div",{className:"bg-success h-4 rounded-full transition-all",style:{width:n(e.total_assets)}})}),f.jsx("div",{className:"mt-2 space-y-1",children:e.assets.slice(0,5).map(r=>f.jsxs("div",{className:"flex justify-between text-sm",children:[f.jsx("span",{children:r.name}),f.jsx("span",{children:Oo(r.balance)})]},r.code))})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between mb-2",children:[f.jsx("span",{className:"font-semibold text-danger",children:"Liabilities (Skulder)"}),f.jsx("span",{className:"font-bold",children:Oo(e.total_liabilities)})]}),f.jsx("div",{className:"w-full bg-surface-2 rounded-full h-4",children:f.jsx("div",{className:"bg-danger h-4 rounded-full transition-all",style:{width:n(e.total_liabilities)}})}),f.jsx("div",{className:"mt-2 space-y-1",children:e.liabilities.slice(0,5).map(r=>f.jsxs("div",{className:"flex justify-between text-sm",children:[f.jsx("span",{children:r.name}),f.jsx("span",{children:Oo(r.balance)})]},r.code))})]}),e.equity&&e.equity.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between mb-2",children:[f.jsx("span",{className:"font-semibold text-primary",children:"Equity (Eget kapital)"}),f.jsx("span",{className:"font-bold",children:Oo(e.total_equity)})]}),f.jsx("div",{className:"w-full bg-surface-2 rounded-full h-4",children:f.jsx("div",{className:"bg-primary h-4 rounded-full transition-all",style:{width:n(e.total_equity)}})})]}),f.jsx("div",{className:"border-t pt-4",children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-sm text-muted",children:"Balance check:"}),f.jsx("span",{className:`font-mono ${Math.abs(e.total_assets+e.total_liabilities+e.total_equity)<.01?"text-success":"text-danger"}`,children:Oo(e.total_assets+e.total_liabilities+e.total_equity)})]})})]})]})}function Oo(e){return new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Mn({children:e,className:t}){return f.jsx("div",{className:"w-full overflow-x-auto",children:f.jsx("table",{className:Ot("w-full",t),children:e})})}function bt({children:e,className:t}){return f.jsx("thead",{className:Ot("border-b border-border",t),children:e})}function Pn({children:e,className:t}){return f.jsx("tbody",{className:t,children:e})}function Ve({children:e,className:t}){return f.jsx("tr",{className:Ot("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 f.jsx("th",{colSpan:r,className:Ot("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 f.jsx("td",{colSpan:r,className:Ot("py-3.5 px-4 text-sm text-text-primary",i[n],t),children:e})}function Nce({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]),f.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:f.jsx("div",{className:"bg-surface rounded-lg w-full max-w-4xl max-h-[80vh] overflow-auto",children:f.jsxs(he,{children:[f.jsx(We,{title:`${e} - ${t}`,subtitle:"Transaction History",action:f.jsx("button",{onClick:n,className:"text-sm text-primary hover:underline",children:"Close"})}),f.jsx("div",{className:"p-6",children:o?f.jsx("div",{className:"text-center py-8",children:"Loading..."}):f.jsxs(Mn,{children:[f.jsx(ye,{children:f.jsxs(Ve,{children:[f.jsx(bt,{children:"Date"}),f.jsx(bt,{children:"Description"}),f.jsx(bt,{className:"text-right",children:"Debit"}),f.jsx(bt,{className:"text-right",children:"Credit"}),f.jsx(bt,{className:"text-right",children:"Balance"})]})}),f.jsx(Pn,{children:r.map(u=>f.jsxs(Ve,{children:[f.jsx(de,{children:u.date}),f.jsx(de,{children:u.description}),f.jsx(de,{className:"text-right text-success",children:u.debit>0?o1(u.debit):"-"}),f.jsx(de,{className:"text-right text-danger",children:u.credit>0?o1(u.credit):"-"}),f.jsx(de,{className:"text-right font-medium",children:o1(u.balance)})]},u.id))})]})})]})})})}function o1(e){return new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Cce({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),d=document.createElement("a");d.href=u,d.download=`ledger-${e}.${i.toLowerCase()}`,document.body.appendChild(d),d.click(),window.URL.revokeObjectURL(u),document.body.removeChild(d)}catch(o){console.error("Export error:",o),alert(`Failed to export ${i}`)}finally{n(null)}};return f.jsxs(he,{children:[f.jsx(We,{title:"Export Reports",subtitle:"Download ledger data in various formats"}),f.jsxs("div",{className:"p-6 flex gap-4",children:[f.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"}),f.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"}),f.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 e3=({src:e,title:t,height:n=300})=>f.jsxs("div",{className:"bg-white rounded-lg shadow-md p-4 mb-4",children:[f.jsx("h3",{className:"text-lg font-semibold mb-2",children:t}),f.jsx("iframe",{src:e,width:"100%",height:n,frameBorder:"0",title:t,className:"rounded"})]});function et({className:e}){return f.jsx("div",{className:Ot("animate-pulse rounded-[14px] bg-text-secondary/8",e)})}function Mce(){const[e,t]=P.useState(!0),[n,r]=P.useState(""),[i,o]=P.useState(0),[l,u]=P.useState(0),[d,h]=P.useState(0),[m,y]=P.useState([]),[g,j]=P.useState(0),[S,w]=P.useState(0),[b,O]=P.useState(0),[T,_]=P.useState(0),[C,A]=P.useState(0),[E,M]=P.useState([]),[D,k]=P.useState(null),[B,q]=P.useState("2026-02"),[$,G]=P.useState(null);P.useEffect(()=>{async function L(){t(!0),r("");try{const[H,Q,ae,oe,z,F]=await Promise.all([ss.balance(),Co.mrr(),ch.customers(),Co.deals(),ag.balanceSheet("2026-01").catch(()=>null),ag.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),O(z.total_liabilities||0),_(z.total_equity||0),k(z)),F&&A(F.net_income||0);const we=await ag.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:f.jsx(eu,{size:18})},{label:"Active Customers",value:String(d),change:0,changeLabel:"vs last month",icon:f.jsx(Pa,{size:18})},{label:"MRR",value:_e(l),change:0,changeLabel:"vs last month",icon:f.jsx(Mr,{size:18})},{label:"Open Deals",value:String(g),change:0,changeLabel:"vs last month",icon:f.jsx(BH,{size:18})}],Y=[{label:"Ledger Assets",value:_e(S),change:0,changeLabel:"per balansräkning",icon:f.jsx(eu,{size:18})},{label:"Ledger Liabilities",value:_e(b),change:0,changeLabel:"per balansräkning",icon:f.jsx(Mr,{size:18})},{label:"Net Income",value:_e(C),change:0,changeLabel:"per resultaträkning",icon:f.jsx(Mr,{size:18})},{label:"Equity",value:_e(T),change:0,changeLabel:"per balansräkning",icon:f.jsx(eu,{size:18})}];return e?f.jsxs("div",{className:"space-y-10",children:[f.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)=>f.jsx(et,{className:"h-[140px]"},H))}),f.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[f.jsx(et,{className:"h-[320px] xl:col-span-2"}),f.jsx(et,{className:"h-[320px]"})]}),f.jsx(et,{className:"h-[300px]"})]}):n?f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsx("p",{className:"text-danger",children:n})}):f.jsxs("div",{className:"space-y-10",children:[f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-5",children:X.map((L,H)=>f.jsx(rN,{...L,index:H},L.label))}),f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("label",{className:"text-sm font-medium",children:"Period:"}),f.jsxs("select",{value:B,onChange:L=>q(L.target.value),className:"border rounded px-3 py-1 text-sm",children:[f.jsx("option",{value:"2026-02",children:"2026-02"}),f.jsx("option",{value:"2026-03",children:"2026-03"}),f.jsx("option",{value:"2026-04",children:"2026-04"})]})]}),f.jsxs("div",{className:"mt-8",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Ledger (Bokföring)"}),f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-5",children:Y.map((L,H)=>f.jsx(rN,{...L,index:H},L.label))})]}),D&&f.jsx(Ece,{data:D}),f.jsxs("div",{className:"mt-8",children:[f.jsx("h2",{className:"text-lg font-semibold mb-4",children:"System Health"}),f.jsx(e3,{src:"http://localhost:3050/d-solo/aamos-system/aamos-system-health?orgId=1&panelId=1&refresh=5s",title:"CPU Usage",height:200}),f.jsx(e3,{src:"http://localhost:3050/d-solo/aamos-system/aamos-system-health?orgId=1&panelId=2&refresh=5s",title:"Memory Usage",height:200})]}),f.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[f.jsx("div",{className:"xl:col-span-2",children:f.jsx(Ace,{})}),f.jsx("div",{children:f.jsx(Tce,{})})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Ledger Accounts",subtitle:"All BAS accounts with balances"}),f.jsx("div",{className:"overflow-x-auto",children:f.jsxs(Mn,{children:[f.jsx(ye,{children:f.jsxs(Ve,{children:[f.jsx(bt,{children:"Code"}),f.jsx(bt,{children:"Name"}),f.jsx(bt,{children:"Type"}),f.jsx(bt,{className:"text-right",children:"Balance"})]})}),f.jsx(Pn,{children:E.length===0?f.jsx(Ve,{children:f.jsx(de,{colSpan:4,className:"text-center text-muted",children:"No accounts found"})}):E.map(L=>f.jsx(Ve,{children:f.jsx(de,{colSpan:4,className:"p-0",children:f.jsxs("div",{className:"flex items-center px-4 py-3 cursor-pointer hover:bg-surface-2",onClick:()=>G({code:L.code,name:L.name}),children:[f.jsx("span",{className:"font-medium w-16",children:L.code}),f.jsx("span",{className:"flex-1",children:L.name}),f.jsx("span",{className:"w-24",children:f.jsx(Ke,{children:L.account_type})}),f.jsx("span",{className:`w-32 text-right ${L.balance>=0?"text-success":"text-danger"}`,children:_e(L.balance)})]})})},L.code))})]})})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Income Statement (Resultaträkning)",subtitle:"Revenue and expenses for period 2026-02"}),f.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 p-6",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-semibold mb-4 text-success",children:"Revenue (Intäkter)"}),f.jsxs(Mn,{children:[f.jsx(ye,{children:f.jsxs(Ve,{children:[f.jsx(bt,{children:"Code"}),f.jsx(bt,{children:"Name"}),f.jsx(bt,{className:"text-right",children:"Amount"})]})}),f.jsx(Pn,{children:E.filter(L=>L.account_type==="revenue").map(L=>f.jsxs(Ve,{children:[f.jsx(de,{children:L.code}),f.jsx(de,{children:L.name}),f.jsx(de,{className:"text-right text-success",children:_e(Math.abs(L.balance))})]},L.code))})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-semibold mb-4 text-danger",children:"Expenses (Kostnader)"}),f.jsxs(Mn,{children:[f.jsx(ye,{children:f.jsxs(Ve,{children:[f.jsx(bt,{children:"Code"}),f.jsx(bt,{children:"Name"}),f.jsx(bt,{className:"text-right",children:"Amount"})]})}),f.jsx(Pn,{children:E.filter(L=>L.account_type==="expense").map(L=>f.jsxs(Ve,{children:[f.jsx(de,{children:L.code}),f.jsx(de,{children:L.name}),f.jsx(de,{className:"text-right text-danger",children:_e(L.balance)})]},L.code))})]})]})]}),f.jsx("div",{className:"border-t p-6",children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-lg font-semibold",children:"Net Income:"}),f.jsx("span",{className:`text-2xl font-bold ${C>=0?"text-success":"text-danger"}`,children:_e(C)})]})})]}),f.jsx(Cce,{period:B}),$&&f.jsx(Nce,{accountCode:$.code,accountName:$.name,onClose:()=>G(null)}),f.jsxs(he,{children:[f.jsx(We,{title:"Recent Deals",subtitle:"Latest deals across your pipeline",action:f.jsxs("button",{className:"text-sm text-primary font-medium flex items-center gap-1 hover:underline",children:["View all ",f.jsx(z1,{size:14})]})}),f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Deal"}),f.jsx(ye,{children:"Company"}),f.jsx(ye,{align:"right",children:"Value"}),f.jsx(ye,{children:"Stage"}),f.jsx(ye,{align:"right",children:"Probability"}),f.jsx(ye,{children:"Close Date"})]})}),f.jsxs(Pn,{children:[m.length===0&&f.jsx(Ve,{children:f.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No deals found"})}),m.map(L=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsx("span",{className:"font-medium",children:L.name})}),f.jsx(de,{children:L.company}),f.jsx(de,{align:"right",children:_e(L.value)}),f.jsx(de,{children:f.jsx(Ke,{variant:L.stage==="Closed Won"?"success":L.stage==="Negotiation"?"primary":"default",children:L.stage})}),f.jsxs(de,{align:"right",children:[L.probability,"%"]}),f.jsx(de,{children:mr(L.expectedClose)})]},L.id))]})]})]})]})}const Pce={getRealBriefing:()=>rt.get("/briefing/real")};function Wd({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 f.jsxs("div",{className:`p-4 rounded-xl border ${u[l]}`,children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("p",{className:"text-sm text-text-secondary",children:e}),f.jsx("p",{className:"text-2xl font-semibold",children:t}),n&&f.jsx("p",{className:"text-xs text-text-tertiary",children:n})]}),r&&f.jsx("div",{className:"text-text-secondary",children:r})]}),i&&f.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[i==="up"&&f.jsx(Mr,{size:14,className:"text-success"}),i==="down"&&f.jsx(nw,{size:14,className:"text-danger"}),i==="neutral"&&f.jsx(zp,{size:14,className:"text-text-secondary"}),f.jsx("span",{className:`text-xs ${i==="up"?"text-success":i==="down"?"text-danger":"text-text-secondary"}`,children:o})]})]})}function Rce({alert:e}){const t={info:{icon:f.jsx(zp,{size:16}),color:"text-primary bg-primary/5 border-primary/20"},warning:{icon:f.jsx(wi,{size:16}),color:"text-warning bg-warning/5 border-warning/20"},critical:{icon:f.jsx(wi,{size:16}),color:"text-danger bg-danger/5 border-danger/20"}},n=t[e.level]||t.info;return f.jsx("div",{className:`p-3 rounded-lg border ${n.color}`,children:f.jsxs("div",{className:"flex items-start gap-2",children:[n.icon,f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium",children:e.title}),f.jsx("p",{className:"text-xs opacity-80 mt-0.5",children:e.description})]}),f.jsx(Ke,{variant:"default",className:"text-xs",children:e.source})]})})}function kce({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 f.jsx("div",{className:"p-3 rounded-lg border border-border bg-surface hover:bg-surface-hover transition-colors cursor-pointer group",children:f.jsxs("div",{className:"flex items-start gap-3",children:[f.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}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:e.title}),f.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.description}),f.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[f.jsxs("span",{className:"text-xs text-text-tertiary flex items-center gap-1",children:[f.jsx(Go,{size:12}),e.time_estimate]}),f.jsx("span",{className:"text-xs text-text-tertiary",children:e.impact})]})]}),f.jsx(lH,{size:16,className:"text-text-tertiary group-hover:text-primary transition-colors shrink-0"})]})})}function Dce({task:e}){const t={critical:"danger",high:"warning",medium:"default",low:"success"};return f.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[f.jsx("div",{className:"w-2 h-2 rounded-full bg-warning shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm truncate",children:e.title}),f.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[f.jsx(Ke,{variant:t[e.priority],className:"text-xs",children:e.priority}),f.jsx("span",{className:"text-xs text-text-tertiary",children:e.category})]})]}),f.jsxs("span",{className:"text-xs text-text-tertiary shrink-0",children:[e.days_open,"d"]})]})}function Lce({deal:e}){return f.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[f.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:f.jsx(Fo,{size:16,className:"text-primary"})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium truncate",children:e.name}),f.jsx("p",{className:"text-xs text-text-secondary",children:e.customer})]}),f.jsxs("div",{className:"text-right shrink-0",children:[f.jsx("p",{className:"text-sm font-medium",children:_e(e.value)}),f.jsxs("p",{className:"text-xs text-text-tertiary",children:[e.probability,"%"]})]})]})}function zce(){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 Pce.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 f.jsxs("div",{className:"space-y-6",children:[f.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)=>f.jsx(et,{className:"h-[120px]"},w))}),f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[f.jsx(et,{className:"h-[400px] lg:col-span-2"}),f.jsx(et,{className:"h-[400px]"})]})]});if(i)return f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsxs("div",{className:"text-center",children:[f.jsx(wi,{size:48,className:"text-danger mx-auto mb-4"}),f.jsx("p",{className:"text-danger font-medium",children:i}),f.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:d,team_overview:h,financial_status:m,alerts:y,actions:g}=e;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold",children:"Dagsöversikt"}),f.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"})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:`w-2 h-2 rounded-full ${l.status==="healthy"?"bg-success":l.status==="warning"?"bg-warning":"bg-danger"}`}),f.jsx("span",{className:"text-sm text-text-secondary capitalize",children:l.status})]})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[f.jsx(Wd,{title:"Cash Position",value:_e(l.cash_position),subtitle:"Eget kapital",icon:f.jsx(eu,{size:20}),trend:l.profit_margin>0?"up":"down",trendValue:`${JE(l.profit_margin)}% marginal`,variant:l.cash_position>1e6?"success":l.cash_position>5e5?"warning":"danger"}),f.jsx(Wd,{title:"Pipeline",value:_e(l.total_pipeline),subtitle:`${l.active_deals} aktiva deals`,icon:f.jsx(Fo,{size:20}),trend:"up",trendValue:"+12% vs förra månaden"}),f.jsx(Wd,{title:"Team",value:`${h.active_now}/${h.total_members}`,subtitle:`${h.on_leave} på leave`,icon:f.jsx(Pa,{size:20}),trend:h.on_leave>0?"neutral":"up",trendValue:h.on_leave>0?`${h.on_leave} borta idag`:"Alla närvarande"}),f.jsx(Wd,{title:"Mina Tasks",value:u.length,subtitle:`${u.filter(S=>S.priority==="critical").length} kritiska`,icon:f.jsx(hL,{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&&f.jsxs("div",{className:"space-y-2",children:[f.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[f.jsx(wi,{size:20,className:"text-warning"}),"Varningar"]}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:y.map((S,w)=>f.jsx(Rce,{alert:S},w))})]}),f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[f.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[g.length>0&&f.jsxs(he,{children:[f.jsx(We,{title:"Rekommenderade Åtgärder",subtitle:"Prioriterade baserat på din roll och aktuell data"}),f.jsx("div",{className:"p-4 space-y-3",children:g.map((S,w)=>f.jsx(kce,{action:S},w))})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Mina Uppgifter",subtitle:`${u.length} öppna uppgifter`}),f.jsx("div",{className:"p-4 space-y-1",children:u.length===0?f.jsxs("div",{className:"text-center py-8 text-text-secondary",children:[f.jsx(_l,{size:48,className:"mx-auto mb-2 text-success"}),f.jsx("p",{children:"Alla uppgifter är klara!"})]}):u.map(S=>f.jsx(Dce,{task:S},S.id))})]}),d.length>0&&f.jsxs(he,{children:[f.jsx(We,{title:"Mina Deals",subtitle:`${d.length} aktiva förhandlingar`}),f.jsx("div",{className:"p-4 space-y-1",children:d.map(S=>f.jsx(Lce,{deal:S},S.id))})]})]}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs(he,{children:[f.jsx(We,{title:"Teamöversikt",subtitle:`${h.total_members} medlemmar`}),f.jsxs("div",{className:"p-4",children:[f.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[f.jsxs("div",{className:"text-center p-2 bg-success/5 rounded-lg",children:[f.jsx("p",{className:"text-2xl font-semibold text-success",children:h.active_now}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]}),f.jsxs("div",{className:"text-center p-2 bg-warning/5 rounded-lg",children:[f.jsx("p",{className:"text-2xl font-semibold text-warning",children:h.on_leave}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Borta"})]}),f.jsxs("div",{className:"text-center p-2 bg-primary/5 rounded-lg",children:[f.jsx("p",{className:"text-2xl font-semibold text-primary",children:h.open_tickets}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Tickets"})]})]}),f.jsx("div",{className:"space-y-2",children:h.members.slice(0,5).map((S,w)=>f.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[f.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("")}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),f.jsx("p",{className:"text-xs text-text-secondary",children:S.role})]}),S.open_tasks>0&&f.jsx(Ke,{variant:"warning",className:"text-xs",children:S.open_tasks})]},w))})]})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Finansiell Status",subtitle:"Från ledger i realtid"}),f.jsxs("div",{className:"p-4 space-y-3",children:[f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-sm text-text-secondary",children:"Tillgångar"}),f.jsx("span",{className:"text-sm font-medium",children:_e(m.total_assets)})]}),f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-sm text-text-secondary",children:"Skulder"}),f.jsx("span",{className:"text-sm font-medium",children:_e(m.total_liabilities)})]}),f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-sm text-text-secondary",children:"Eget Kapital"}),f.jsx("span",{className:"text-sm font-medium text-success",children:_e(m.equity)})]}),m.runway_months>0&&f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-sm text-text-secondary",children:"Runway"}),f.jsxs("span",{className:"text-sm font-medium",children:[JE(m.runway_months)," mån"]})]}),f.jsxs("div",{className:"pt-2 border-t border-border",children:[f.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)=>f.jsxs("div",{className:"flex justify-between items-center py-1",children:[f.jsx("span",{className:"text-xs text-text-secondary",children:S.name}),f.jsx("span",{className:"text-xs font-medium",children:_e(S.amount)})]},w))]})]})]})]})]})]})}function $ce(){return f.jsx(zce,{})}function Bce(){const{user:e}=Sl(),[t,n]=P.useState(null),[r,i]=P.useState(!0),[o,l]=P.useState(!1),[u,d]=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 f.jsxs("div",{className:"space-y-6",children:[f.jsx(et,{className:"h-[200px]"}),f.jsx(et,{className:"h-[400px]"})]});if(!t)return null;const m=[{id:"general",label:"Allmänt",icon:wh},{id:"security",label:"Säkerhet",icon:lh},{id:"notifications",label:"Notifikationer",icon:$1},{id:"preferences",label:"Inställningar",icon:oh}];return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold",children:"Min Profil"}),f.jsx("p",{className:"text-text-secondary",children:"Hantera dina kontoinställningar"})]}),f.jsx(Yt,{onClick:h,disabled:o,icon:o?void 0:f.jsx(kH,{size:16}),children:o?"Sparar...":"Spara ändringar"})]}),f.jsxs(he,{className:"relative overflow-hidden",children:[f.jsx("div",{className:"h-32 bg-gradient-to-r from-primary to-primary-hover"}),f.jsxs("div",{className:"px-6 pb-6",children:[f.jsx("div",{className:"relative -mt-16 mb-4",children:f.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?f.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(""),f.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:f.jsx(fH,{size:14})})]})}),f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-xl font-semibold",children:t.name}),f.jsx("p",{className:"text-text-secondary",children:t.email}),f.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[f.jsx(Ke,{variant:"primary",children:t.role}),f.jsx(Ke,{variant:"default",children:t.department})]})]}),f.jsxs("div",{className:"text-right text-sm text-text-secondary",children:[f.jsxs("p",{children:["Senaste inloggning: ",mr(t.lastLogin)]}),f.jsxs("p",{children:["Medlem sedan: ",mr(t.createdAt)]})]})]})]})]}),f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto",children:m.map(y=>f.jsxs("button",{onClick:()=>d(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:[f.jsx(y.icon,{size:16}),y.label]},y.id))}),u==="general"&&f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[f.jsxs(he,{children:[f.jsx(We,{title:"Personlig information",subtitle:"Uppdatera dina kontouppgifter"}),f.jsxs("div",{className:"p-4 space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Fullständigt namn"}),f.jsxs("div",{className:"relative",children:[f.jsx(wh,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.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"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"E-post"}),f.jsxs("div",{className:"relative",children:[f.jsx(Ss,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.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"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Telefon"}),f.jsxs("div",{className:"relative",children:[f.jsx(XE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.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"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Avdelning"}),f.jsxs("div",{className:"relative",children:[f.jsx(QS,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.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"})]})]})]})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Kontoinformation",subtitle:"Dina kontodetaljer"}),f.jsxs("div",{className:"p-4 space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium",children:"Användar-ID"}),f.jsx("p",{className:"text-xs text-text-secondary",children:t.id})]}),f.jsx(Ke,{variant:"default",children:"Aktiv"})]}),f.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium",children:"Roll"}),f.jsx("p",{className:"text-xs text-text-secondary",children:t.role})]}),f.jsx(lh,{size:16,className:"text-primary"})]}),f.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium",children:"Tidszon"}),f.jsx("p",{className:"text-xs text-text-secondary",children:t.timezone})]}),f.jsx(oh,{size:16,className:"text-text-secondary"})]}),f.jsxs("div",{className:"flex items-center justify-between py-3",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium",children:"Språk"}),f.jsx("p",{className:"text-xs text-text-secondary",children:t.language==="sv"?"Svenska":t.language})]}),f.jsx(oh,{size:16,className:"text-text-secondary"})]})]})]})]}),u==="security"&&f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[f.jsxs(he,{children:[f.jsx(We,{title:"Lösenord",subtitle:"Uppdatera ditt lösenord"}),f.jsxs("div",{className:"p-4 space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nuvarande lösenord"}),f.jsxs("div",{className:"relative",children:[f.jsx(KE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.jsx("input",{type:"password",placeholder:"••••••••",className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nytt lösenord"}),f.jsx("input",{type:"password",placeholder:"Minst 8 tecken",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Bekräfta nytt lösenord"}),f.jsx("input",{type:"password",placeholder:"Upprepa lösenord",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),f.jsxs(Yt,{variant:"secondary",className:"w-full",children:[f.jsx(KE,{size:16,className:"mr-2"}),"Ändra lösenord"]})]})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Tvåfaktorsautentisering",subtitle:"Öka säkerheten på ditt konto"}),f.jsxs("div",{className:"p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium",children:"2FA-status"}),f.jsx("p",{className:"text-xs text-text-secondary",children:t.twoFactorEnabled?"Aktiverad":"Ej aktiverad"})]}),f.jsx(Ke,{variant:t.twoFactorEnabled?"success":"default",children:t.twoFactorEnabled?"Aktiv":"Inaktiv"})]}),!t.twoFactorEnabled&&f.jsxs(Yt,{className:"w-full",children:[f.jsx(lh,{size:16,className:"mr-2"}),"Aktivera 2FA"]})]})]})]}),u==="notifications"&&f.jsxs(he,{children:[f.jsx(We,{title:"Notifikationsinställningar",subtitle:"Hantera hur du får notifieringar"}),f.jsx("div",{className:"p-4 space-y-4",children:[{key:"email",label:"E-postnotifikationer",description:"Få uppdateringar via e-post",icon:Ss},{key:"push",label:"Push-notifikationer",description:"Få notifikationer i webbläsaren",icon:$1},{key:"sms",label:"SMS-notifikationer",description:"Få viktiga uppdateringar via SMS",icon:XE}].map(y=>f.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border last:border-0",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary",children:f.jsx(y.icon,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium",children:y.label}),f.jsx("p",{className:"text-xs text-text-secondary",children:y.description})]})]}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.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"}),f.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"&&f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[f.jsxs(he,{children:[f.jsx(We,{title:"Utseende",subtitle:"Anpassa hur BOC ser ut"}),f.jsx("div",{className:"p-4 space-y-4",children:f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-2",children:"Tema"}),f.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{id:"light",label:"Ljust",icon:IH},{id:"dark",label:"Mörkt",icon:CH},{id:"system",label:"System",icon:NH}].map(y=>f.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:[f.jsx(y.icon,{size:20,className:"mx-auto mb-1"}),f.jsx("span",{className:"text-xs",children:y.label})]},y.id))})]})})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Regionala inställningar",subtitle:"Språk och tidszon"}),f.jsxs("div",{className:"p-4 space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Språk"}),f.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:[f.jsx("option",{value:"sv",children:"Svenska"}),f.jsx("option",{value:"en",children:"English"}),f.jsx("option",{value:"no",children:"Norsk"}),f.jsx("option",{value:"da",children:"Dansk"}),f.jsx("option",{value:"fi",children:"Suomi"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium mb-1",children:"Tidszon"}),f.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:[f.jsx("option",{value:"Europe/Stockholm",children:"Stockholm (CET)"}),f.jsx("option",{value:"Europe/Oslo",children:"Oslo (CET)"}),f.jsx("option",{value:"Europe/Copenhagen",children:"Köpenhamn (CET)"}),f.jsx("option",{value:"Europe/Helsinki",children:"Helsingfors (EET)"}),f.jsx("option",{value:"UTC",children:"UTC"})]})]})]})]})]})]})}function t3({icon:e,title:t,description:n,action:r,className:i}){return f.jsxs("div",{className:Ot("flex flex-col items-center justify-center py-16 text-center",i),children:[e&&f.jsx("div",{className:"mb-4 text-text-secondary/40",children:e}),f.jsx("h3",{className:"text-sm font-medium text-text-primary",children:t}),n&&f.jsx("p",{className:"mt-1 text-sm text-text-secondary max-w-sm",children:n}),r&&f.jsx("div",{className:"mt-4",children:r})]})}const uS={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 Ice(e){return uS[e]||uS.dashboard}function qce(){return Object.values(uS).filter(e=>e.rum!=="dashboard")}function H$({rum:e,isOpen:t,onToggle:n}){const r=Ice(e),{token:i}=Sl(),[o,l]=P.useState([{id:"welcome",roll:"assistant",innehall:`Hej! Jag är ${r.titel}. ${r.systemPrompt.split(`
`)[2]||"Jag kan hjälpa dig med "+r.kompetenser.join(", ")+"."}
Vad kan jag göra för dig?`,tid:new Date().toISOString()}]),[u,d]=P.useState(""),[h,m]=P.useState(!1),[y,g]=P.useState(!1),[j,S]=P.useState(""),w=P.useRef(null),b=P.useRef(null);P.useEffect(()=>{w.current&&(w.current.scrollTop=w.current.scrollHeight)},[o]);const O=async()=>{if(!u.trim()||h)return;const _={id:`user-${Date.now()}`,roll:"user",innehall:u.trim(),tid:new Date().toISOString()};l(C=>[...C,_]),d(""),m(!0),S("");try{const C=await fetch("/api/v1/agents/chat",{method:"POST",headers:{"Content-Type":"application/json",Authorization:i?`Bearer ${i}`:""},body:JSON.stringify({rum:r.rum,systemPrompt:r.systemPrompt,meddelanden:[...o,_].map(A=>({roll:A.roll,innehall:A.innehall}))})});if(C.ok){const A=await C.json();l(E=>[...E,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:A.svar,tid:new Date().toISOString()}])}else if(C.status===401){S("Du måste logga in för att använda agenten");const A=l1(r,u.trim());l(E=>[...E,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:A,tid:new Date().toISOString()}])}else{const A=await C.json().catch(()=>({}));S(A.error||"Agenten svarade inte");const E=l1(r,u.trim());l(M=>[...M,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:E,tid:new Date().toISOString()}])}}catch{S("Kunde inte nå agenten. Använder lokalt svar.");const A=l1(r,u.trim());l(E=>[...E,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:A,tid:new Date().toISOString()}])}m(!1)},T=_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),O())};return t?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 bg-black/20 z-40",onClick:n}),f.jsxs(en.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 ${y?"w-[500px]":"w-[380px]"}`,children:[f.jsxs("div",{className:"h-14 border-b border-border flex items-center justify-between px-4 bg-primary/5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:f.jsx(zo,{size:18,className:"text-white"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-semibold text-sm",children:r.titel}),f.jsx("p",{className:"text-xs text-text-secondary",children:"AI Assistant"})]})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{onClick:()=>g(!y),className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:y?f.jsx(TH,{size:16}):f.jsx(AH,{size:16})}),f.jsx("button",{onClick:n,className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:f.jsx(pL,{size:16})})]})]}),f.jsxs("div",{ref:w,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[o.map(_=>f.jsxs("div",{className:`flex gap-3 ${_.roll==="user"?"flex-row-reverse":""}`,children:[f.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${_.roll==="assistant"?"bg-primary text-white":"bg-bg text-text-secondary"}`,children:_.roll==="assistant"?f.jsx(zo,{size:16}):f.jsx(wh,{size:16})}),f.jsx("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${_.roll==="assistant"?"bg-bg text-text-primary rounded-tl-none":"bg-primary text-white rounded-tr-none"}`,children:f.jsx("p",{className:"whitespace-pre-wrap",children:_.innehall})})]},_.id)),h&&f.jsxs("div",{className:"flex gap-3",children:[f.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-white flex items-center justify-center",children:f.jsx(zo,{size:16})}),f.jsx("div",{className:"bg-bg rounded-2xl rounded-tl-none px-4 py-3",children:f.jsxs("div",{className:"flex gap-1",children:[f.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce"}),f.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-100"}),f.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-200"})]})})]})]}),j&&f.jsx("div",{className:"px-4 py-2 bg-danger/10 border-t border-danger/20",children:f.jsxs("p",{className:"text-xs text-danger flex items-center gap-1.5",children:[f.jsx(RH,{size:12}),j]})}),f.jsxs("div",{className:"p-4 border-t border-border",children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("textarea",{ref:b,value:u,onChange:_=>d(_.target.value),onKeyDown:T,placeholder:`Fråga ${r.titel}...`,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}),f.jsx("button",{onClick:O,disabled:!u.trim()||h,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:f.jsx(DH,{size:18})})]}),f.jsxs("p",{className:"text-xs text-text-secondary mt-2 text-center",children:[r.titel," • ",r.kompetenser.slice(0,3).join(" • ")]})]})]})]}):f.jsx(en.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:f.jsx(tw,{size:24})})}function l1(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?`}function Li({rum:e,className:t}){const[n,r]=P.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx(Lo,{children:n&&f.jsx(en.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/20 z-40",onClick:()=>r(!1)})}),f.jsx(H$,{rum:e,isOpen:n,onToggle:()=>r(!n)}),f.jsx(en.button,{initial:{scale:0},animate:{scale:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>r(!n),className:Ot("fixed bottom-6 right-6 z-50 w-14 h-14 rounded-full shadow-lg shadow-primary/20","flex items-center justify-center transition-colors",n?"bg-danger text-white hover:bg-danger/90":"bg-primary text-white hover:bg-primary/90",t),children:f.jsx(en.div,{animate:{rotate:n?90:0},transition:{duration:.2},children:n?f.jsx(pL,{size:22}):f.jsx(zo,{size:22})})})]})}const Uce=["Customers","Leads","Pipeline"];function Vce(){const[e,t]=P.useState("Customers"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[d,h]=P.useState([]),[m,y]=P.useState(0),[g,j]=P.useState([]),[S,w]=P.useState([]);P.useEffect(()=>{async function _(){o(!0),u("");try{const[C,A,E]=await Promise.all([ch.customers(),ch.leads(),ch.pipeline()]);h(C.customers),y(C.total),j(A.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)}}_()},[]);const b=d.filter(_=>_.name.toLowerCase().includes(n.toLowerCase())||(_.company||"").toLowerCase().includes(n.toLowerCase())),O=g.filter(_=>_.name.toLowerCase().includes(n.toLowerCase())||(_.company||"").toLowerCase().includes(n.toLowerCase())),T=S.reduce((_,C)=>_+(C.value||0),0);return i?f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"})]}),f.jsx(et,{className:"h-[400px]"})]}):l?f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsx("p",{className:"text-danger",children:l})}):f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"CRM"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Manage customers, leads, and pipeline"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"Add Contact"})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(Pa,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:m}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Total Customers"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:f.jsx(Ss,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:g.length}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Active Leads"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:f.jsx(QS,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(T)}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Pipeline Value"})]})]})})]}),f.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:Uce.map(_=>f.jsx("button",{onClick:()=>t(_),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===_?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:_},_))}),f.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[f.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[f.jsx(Cs,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:_=>r(_.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"})]}),f.jsx(Yt,{variant:"secondary",size:"sm",icon:f.jsx(ef,{size:14}),children:"Filter"})]})]}),e==="Customers"&&f.jsxs(he,{children:[f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Customer"}),f.jsx(ye,{children:"Company"}),f.jsx(ye,{children:"Status"}),f.jsx(ye,{children:"Phone"}),f.jsx(ye,{children:"Created"}),f.jsx(ye,{align:"right"})]})}),f.jsx(Pn,{children:b.map(_=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:_.name.charAt(0)}),f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-text-primary",children:_.name}),f.jsx("p",{className:"text-xs text-text-secondary",children:_.email})]})]})}),f.jsx(de,{children:_.company||"—"}),f.jsx(de,{children:f.jsx(Ke,{variant:_.status==="active"?"success":_.status==="lead"?"primary":"default",children:_.status})}),f.jsx(de,{children:_.phone||"—"}),f.jsx(de,{children:mr(_.created_at)}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},_.id))})]}),b.length===0&&f.jsx(t3,{icon:f.jsx(Pa,{size:32}),title:"No customers found",description:"Try adjusting your search or filters"})]}),e==="Leads"&&f.jsxs(he,{children:[f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Lead"}),f.jsx(ye,{children:"Company"}),f.jsx(ye,{children:"Source"}),f.jsx(ye,{children:"Status"}),f.jsx(ye,{children:"Created"}),f.jsx(ye,{align:"right"})]})}),f.jsx(Pn,{children:O.map(_=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:_.name.charAt(0)}),f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-text-primary",children:_.name}),f.jsx("p",{className:"text-xs text-text-secondary",children:_.email})]})]})}),f.jsx(de,{children:_.company||"—"}),f.jsx(de,{children:_.source||"—"}),f.jsx(de,{children:f.jsx(Ke,{variant:_.status==="qualified"?"success":_.status==="contacted"?"primary":_.status==="lost"?"danger":"default",children:_.status})}),f.jsx(de,{children:mr(_.created_at)}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},_.id))})]}),O.length===0&&f.jsx(t3,{icon:f.jsx(Ss,{size:32}),title:"No leads found",description:"Try adjusting your search or filters"})]}),f.jsx(Li,{rum:"crm"}),e==="Pipeline"&&f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[S.length===0&&f.jsx("div",{className:"col-span-full text-center text-text-secondary py-12",children:"No pipeline stages found"}),S.map(_=>f.jsxs(he,{hover:!0,children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:_.name}),f.jsxs(Ke,{variant:"default",children:[_.deals," deals"]})]}),f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_.value>0?new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(_.value):"—"}),f.jsx("div",{className:"mt-4 h-1.5 bg-bg rounded-full overflow-hidden",children:f.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${T>0?_.value/T*100:0}%`}})})]},_.id))]})]})}const Hce=["Deals","Products","MRR","ARR"];function Fce(){const[e,t]=P.useState("Deals"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[d,h]=P.useState([]),[m,y]=P.useState([]),[g,j]=P.useState([]),[S,w]=P.useState([]),[b,O]=P.useState(0);P.useEffect(()=>{async function A(){o(!0),u("");try{const[E,M,D,k]=await Promise.all([Co.deals(),Co.products(),Co.mrr(),Co.arr()]);h(E.deals||[]),y(M.products||[]),O(D.mrr||0),j([]);const q=k;w([])}catch(E){u(E instanceof Error?E.message:"Failed to load sales data")}finally{o(!1)}}A()},[]);const T=d.reduce((A,E)=>A+(E.value||0),0),_=d.filter(A=>A.stage==="Closed Won").reduce((A,E)=>A+(E.value||0),0),C=m.filter(A=>A.active).length;return i?f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"})]}),f.jsx(et,{className:"h-[400px]"})]}):l?f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsx("p",{className:"text-danger",children:l})}):f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Sales"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Deals, products, and revenue metrics"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"New Deal"})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(eu,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e(T)}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Total Pipeline"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:f.jsx(Mr,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e(_)}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Closed Won"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:f.jsx(PH,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:C}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Active Products"})]})]})})]}),f.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:Hce.map(A=>f.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))}),f.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[f.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[f.jsx(Cs,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.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"})]}),f.jsx(Yt,{variant:"secondary",size:"sm",icon:f.jsx(ef,{size:14}),children:"Filter"})]})]}),e==="Deals"&&f.jsx(he,{children:f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Deal"}),f.jsx(ye,{children:"Company"}),f.jsx(ye,{align:"right",children:"Value"}),f.jsx(ye,{children:"Stage"}),f.jsx(ye,{align:"right",children:"Probability"}),f.jsx(ye,{children:"Owner"}),f.jsx(ye,{align:"right"})]})}),f.jsxs(Pn,{children:[d.length===0&&f.jsx(Ve,{children:f.jsx(de,{colSpan:7,className:"text-center text-text-secondary py-8",children:"No deals found"})}),d.map(A=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsx("span",{className:"font-medium",children:A.name})}),f.jsx(de,{children:A.company}),f.jsx(de,{align:"right",children:_e(A.value)}),f.jsx(de,{children:f.jsx(Ke,{variant:A.stage==="Closed Won"?"success":A.stage==="Negotiation"?"primary":"default",children:A.stage})}),f.jsxs(de,{align:"right",children:[A.probability,"%"]}),f.jsx(de,{children:A.owner}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},A.id))]})]})}),e==="Products"&&f.jsx(he,{children:f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Product"}),f.jsx(ye,{children:"SKU"}),f.jsx(ye,{align:"right",children:"Price"}),f.jsx(ye,{children:"Type"}),f.jsx(ye,{children:"Status"}),f.jsx(ye,{align:"right"})]})}),f.jsxs(Pn,{children:[m.length===0&&f.jsx(Ve,{children:f.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No products found"})}),m.map(A=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsx("span",{className:"font-medium",children:A.name})}),f.jsx(de,{children:f.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:A.sku})}),f.jsx(de,{align:"right",children:_e(A.price)}),f.jsx(de,{children:f.jsx(Ke,{variant:A.recurring?"primary":"default",children:A.recurring?"Recurring":"One-time"})}),f.jsx(de,{children:f.jsx(Ke,{variant:A.active?"success":"danger",children:A.active?"Active":"Inactive"})}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},A.id))]})]})}),e==="MRR"&&f.jsxs(he,{children:[f.jsx(We,{title:"Monthly Recurring Revenue",subtitle:`Current MRR: ${_e(b)}`}),g.length>0?f.jsx("div",{className:"h-[320px]",children:f.jsx(Dh,{width:"100%",height:"100%",children:f.jsxs(gce,{data:g,margin:{top:5,right:5,left:-10,bottom:0},children:[f.jsx(jp,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),f.jsx(Ei,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),f.jsx(Ni,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:A=>`${(A/1e3).toFixed(0)}k`,dx:-5}),f.jsx(Gn,{content:({active:A,payload:E,label:M})=>!A||!(E!=null&&E.length)?null:f.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[f.jsx("p",{className:"text-xs font-medium text-text-secondary mb-2",children:M}),E.map((D,k)=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:D.color}}),f.jsxs("span",{className:"text-text-secondary",children:[D.name,":"]}),f.jsx("span",{className:"font-semibold text-text-primary",children:_e(Number(D.value))})]},k))]})}),f.jsx(Ti,{dataKey:"mrr",fill:"#2563EB",radius:[4,4,0,0]}),f.jsx(Ti,{dataKey:"arr",fill:"#16A34A",radius:[4,4,0,0]})]})})}):f.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No MRR history data available"})]}),e==="ARR"&&f.jsxs(he,{children:[f.jsx(We,{title:"Annual Recurring Revenue",subtitle:"ARR growth by quarter"}),S.length>0?f.jsx("div",{className:"h-[320px]",children:f.jsx(Dh,{width:"100%",height:"100%",children:f.jsxs(vce,{data:S,margin:{top:5,right:5,left:-10,bottom:0},children:[f.jsx(jp,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),f.jsx(Ei,{dataKey:"quarter",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),f.jsx(Ni,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:A=>`${(A/1e3).toFixed(0)}k`,dx:-5}),f.jsx(Gn,{content:({active:A,payload:E,label:M})=>!A||!(E!=null&&E.length)?null:f.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[f.jsx("p",{className:"text-xs font-medium text-text-secondary mb-1",children:M}),f.jsx("p",{className:"text-sm font-semibold text-text-primary",children:_e(Number(E[0].value))})]})}),f.jsx(uf,{type:"monotone",dataKey:"arr",stroke:"#2563EB",strokeWidth:2,dot:{r:4,strokeWidth:0,fill:"#2563EB"},activeDot:{r:6}})]})})}):f.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No ARR history data available"})]}),f.jsx(Li,{rum:"sales"})]})}const Gce=["Balance","Income","MOMS","Accounts","Invoices","Cashflow"],n3=["#2563EB","#16A34A","#D97706","#DC2626","#9CA3AF"];function Kce(){var M,D;const[e,t]=P.useState("Balance"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[d,h]=P.useState(null),[m,y]=P.useState(null),[g,j]=P.useState(null),[S,w]=P.useState([]),[b,O]=P.useState([]),[T,_]=P.useState(null);P.useEffect(()=>{async function k(){o(!0),u("");try{const[B,q,$,G,X,Y]=await Promise.all([ss.balance(),ss.income(),ss.moms(),ss.accounts(),ss.invoices(),ss.cashflow()]);h(B),y(q),j($),w(G.accounts||[]),O(X.invoices||[]),_(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())),A=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:n3[B%n3.length]})))||[];return i?f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"})]}),f.jsx(et,{className:"h-[400px]"})]}):l?f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsx("p",{className:"text-danger",children:l})}):f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Finance"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Financial reports and accounting"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"New Invoice"})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(rw,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((d==null?void 0:d.total_assets)||0)}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Total Assets"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:f.jsx(Mr,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((m==null?void 0:m.total_revenue)||0)}),f.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Revenue"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:f.jsx(nw,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((m==null?void 0:m.total_expenses)||0)}),f.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Expenses"})]})]})})]}),f.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:Gce.map(k=>f.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))}),f.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[f.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[f.jsx(Cs,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.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"})]}),f.jsx(Yt,{variant:"secondary",size:"sm",icon:f.jsx(ef,{size:14}),children:"Filter"})]})]}),e==="Balance"&&f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[f.jsxs(he,{children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("span",{className:"text-sm text-text-secondary",children:"Assets"}),f.jsx(z1,{size:14,className:"text-success"})]}),f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((d==null?void 0:d.total_assets)||0)})]}),f.jsxs(he,{children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("span",{className:"text-sm text-text-secondary",children:"Liabilities"}),f.jsx(oH,{size:14,className:"text-danger"})]}),f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((d==null?void 0:d.total_liabilities)||0)})]}),f.jsxs(he,{children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("span",{className:"text-sm text-text-secondary",children:"Equity"}),f.jsx(z1,{size:14,className:"text-success"})]}),f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_e((d==null?void 0:d.total_equity)||0)})]})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Balance Sheet",subtitle:`Period: ${(d==null?void 0:d.period)||""}`}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Assets"}),f.jsxs("div",{className:"space-y-2",children:[d==null?void 0:d.assets.map((k,B)=>f.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[f.jsx("div",{children:f.jsx("p",{className:"text-sm text-text-primary",children:k.account})}),f.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B)),(!(d!=null&&d.assets)||d.assets.length===0)&&f.jsx("p",{className:"text-text-secondary text-sm",children:"No asset accounts"})]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Liabilities"}),f.jsxs("div",{className:"space-y-2",children:[d==null?void 0:d.liabilities.map((k,B)=>f.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[f.jsx("div",{children:f.jsx("p",{className:"text-sm text-text-primary",children:k.account})}),f.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B)),(!(d!=null&&d.liabilities)||d.liabilities.length===0)&&f.jsx("p",{className:"text-text-secondary text-sm",children:"No liability accounts"})]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Equity"}),f.jsxs("div",{className:"space-y-2",children:[(M=d==null?void 0:d.equity)==null?void 0:M.map((k,B)=>f.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[f.jsx("div",{children:f.jsx("p",{className:"text-sm text-text-primary",children:k.account})}),f.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B)),(!(d!=null&&d.equity)||((D=d.equity)==null?void 0:D.length)===0)&&f.jsx("p",{className:"text-text-secondary text-sm",children:"No equity accounts"})]})]})]})]})]}),e==="Income"&&f.jsx("div",{className:"space-y-6",children:f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5",children:[f.jsxs(he,{className:"lg:col-span-2",children:[f.jsx(We,{title:"Income Statement",subtitle:`Period: ${(m==null?void 0:m.period)||""}`}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Revenue"}),f.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((m==null?void 0:m.total_revenue)||0)})]}),f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Expenses"}),f.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((m==null?void 0:m.total_expenses)||0)})]}),f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net Income"}),f.jsx("p",{className:"text-lg font-semibold text-success",children:_e((m==null?void 0:m.net_income)||0)})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Revenue Accounts"}),m==null?void 0:m.revenue.map((k,B)=>f.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[f.jsx("p",{className:"text-sm text-text-primary",children:k.account}),f.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B))]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Expense Accounts"}),m==null?void 0:m.expenses.map((k,B)=>f.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[f.jsx("p",{className:"text-sm text-text-primary",children:k.account}),f.jsx("p",{className:"text-sm font-medium text-text-primary",children:_e(k.amount)})]},B))]})]})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Expense Breakdown",subtitle:"By category"}),E.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"h-[220px]",children:f.jsx(Dh,{width:"100%",height:"100%",children:f.jsxs(xce,{children:[f.jsx(Ia,{data:E,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:4,dataKey:"value",children:E.map((k,B)=>f.jsx(Wp,{fill:k.color},`cell-${B}`))}),f.jsx(Gn,{content:({active:k,payload:B})=>{if(!k||!(B!=null&&B.length))return null;const q=B[0].payload;return f.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-3 py-2",children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:q.name}),f.jsx("p",{className:"text-xs text-text-secondary",children:_e(q.value)})]})}})]})})}),f.jsx("div",{className:"space-y-2 mt-2",children:E.map(k=>f.jsxs("div",{className:"flex items-center justify-between text-sm",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:k.color}}),f.jsx("span",{className:"text-text-secondary",children:k.name})]}),f.jsx("span",{className:"font-medium text-text-primary",children:_e(k.value)})]},k.name))})]}):f.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No expense data"})]})]})}),e==="MOMS"&&f.jsxs(he,{children:[f.jsx(We,{title:"MOMS Report",subtitle:`Period: ${(g==null?void 0:g.period)||""}`}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS In (Input VAT)"}),f.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((g==null?void 0:g.moms_in)||0)})]}),f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS Ut (Output VAT)"}),f.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((g==null?void 0:g.moms_ut)||0)})]}),f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS att betala"}),f.jsx("p",{className:"text-lg font-semibold text-success",children:_e((g==null?void 0:g.moms_att_betala)||0)})]})]})]}),e==="Accounts"&&f.jsxs(he,{children:[f.jsx(We,{title:"Chart of Accounts",subtitle:"General ledger accounts"}),f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Account"}),f.jsx(ye,{children:"Number"}),f.jsx(ye,{children:"Type"}),f.jsx(ye,{align:"right",children:"Balance"}),f.jsx(ye,{align:"right"})]})}),f.jsxs(Pn,{children:[C.map(k=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsx("span",{className:"font-medium",children:k.name})}),f.jsx(de,{children:f.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:k.id})}),f.jsx(de,{children:f.jsx(Ke,{variant:k.type==="asset"?"success":k.type==="equity"?"primary":"warning",children:k.type})}),f.jsx(de,{align:"right",children:_e(k.balance)}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},k.id)),C.length===0&&f.jsx(Ve,{children:f.jsx(de,{colSpan:5,className:"text-center text-text-secondary py-8",children:"No accounts found"})})]})]})]}),e==="Invoices"&&f.jsxs(he,{children:[f.jsx(We,{title:"Invoices",subtitle:"All invoices"}),f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Number"}),f.jsx(ye,{children:"Customer"}),f.jsx(ye,{align:"right",children:"Amount"}),f.jsx(ye,{children:"Status"}),f.jsx(ye,{children:"Due Date"}),f.jsx(ye,{align:"right"})]})}),f.jsxs(Pn,{children:[A.map(k=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsx("span",{className:"font-medium",children:k.id})}),f.jsx(de,{children:k.customer}),f.jsx(de,{align:"right",children:_e(k.amount)}),f.jsx(de,{children:f.jsx(Ke,{variant:k.status==="paid"?"success":k.status==="overdue"?"danger":k.status==="sent"||k.status==="pending"?"primary":"default",children:k.status})}),f.jsx(de,{children:mr(k.due_date)}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},k.id)),A.length===0&&f.jsx(Ve,{children:f.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No invoices found"})})]})]})]}),e==="Cashflow"&&f.jsxs(he,{children:[f.jsx(We,{title:"Cash Flow",subtitle:`Period: ${(T==null?void 0:T.period)||""}`}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Inflow"}),f.jsx("p",{className:"text-lg font-semibold text-success",children:_e((T==null?void 0:T.inflow)||0)})]}),f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Outflow"}),f.jsx("p",{className:"text-lg font-semibold text-danger",children:_e((T==null?void 0:T.outflow)||0)})]}),f.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[f.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net"}),f.jsx("p",{className:"text-lg font-semibold text-text-primary",children:_e((T==null?void 0:T.net)||0)})]})]})]}),f.jsx(Li,{rum:"finance"})]})}const Yce=["Employees","Leaves"],Xce={Sales:"primary",Engineering:"success",Finance:"warning",HR:"primary",Legal:"default"};function Wce(){const[e,t]=P.useState("Employees"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[d,h]=P.useState([]),[m,y]=P.useState([]);P.useEffect(()=>{async function O(){o(!0),u("");try{const[T,_]=await Promise.all([nN.employees(),nN.leaves()]);h(T.employees||[]),y(_.leaves||[])}catch(T){u(T instanceof Error?T.message:"Failed to load HR data")}finally{o(!1)}}O()},[]);const g=d.filter(O=>O.status==="active").length,j=d.filter(O=>O.status==="on_leave").length,S=m.filter(O=>O.status==="pending").length,w=d.filter(O=>(O.name||`${O.first_name} ${O.last_name}`).toLowerCase().includes(n.toLowerCase())||O.department.toLowerCase().includes(n.toLowerCase())||(O.role||O.position).toLowerCase().includes(n.toLowerCase())),b=m.filter(O=>O.employeeName.toLowerCase().includes(n.toLowerCase())||O.type.toLowerCase().includes(n.toLowerCase()));return i?f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"})]}),f.jsx(et,{className:"h-[400px]"})]}):l?f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsx("p",{className:"text-danger",children:l})}):f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"HR"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Employees and leave management"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"Add Employee"})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(Pa,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:g}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Active Employees"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:f.jsx(Go,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:j}),f.jsx("p",{className:"text-xs text-text-secondary",children:"On Leave"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:f.jsx(uH,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:S}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Pending Requests"})]})]})})]}),f.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:Yce.map(O=>f.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))}),f.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[f.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[f.jsx(Cs,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.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"})]}),f.jsx(Yt,{variant:"secondary",size:"sm",icon:f.jsx(ef,{size:14}),children:"Filter"})]})]}),e==="Employees"&&f.jsx(he,{children:f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Employee"}),f.jsx(ye,{children:"Department"}),f.jsx(ye,{children:"Role"}),f.jsx(ye,{children:"Status"}),f.jsx(ye,{children:"Start Date"}),f.jsx(ye,{align:"right"})]})}),f.jsxs(Pn,{children:[w.map(O=>{const T=O.name||`${O.first_name} ${O.last_name}`,_=O.role||O.position,C=O.startDate||O.start_date;return f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.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.split(" ").map(A=>A[0]).join("")}),f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-text-primary",children:T}),f.jsx("p",{className:"text-xs text-text-secondary",children:O.email})]})]})}),f.jsx(de,{children:f.jsx(Ke,{variant:Xce[O.department]||"default",children:O.department})}),f.jsx(de,{children:_}),f.jsx(de,{children:f.jsx(Ke,{variant:O.status==="active"?"success":O.status==="on_leave"?"warning":"danger",children:O.status.replace("_"," ")})}),f.jsx(de,{children:mr(C||"")}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},O.id)}),w.length===0&&f.jsx(Ve,{children:f.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No employees found"})})]})]})}),e==="Leaves"&&f.jsx(he,{children:f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Employee"}),f.jsx(ye,{children:"Type"}),f.jsx(ye,{children:"Period"}),f.jsx(ye,{align:"right",children:"Days"}),f.jsx(ye,{children:"Status"}),f.jsx(ye,{align:"right"})]})}),f.jsxs(Pn,{children:[b.map(O=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:O.employeeName.split(" ").map(T=>T[0]).join("")}),f.jsx("span",{className:"font-medium text-text-primary",children:O.employeeName})]})}),f.jsx(de,{children:f.jsx(Ke,{variant:O.type==="vacation"?"primary":O.type==="sick"?"warning":"default",children:O.type})}),f.jsx(de,{children:f.jsxs("span",{className:"text-sm text-text-primary",children:[mr(O.startDate)," — ",mr(O.endDate)]})}),f.jsx(de,{align:"right",children:f.jsx("span",{className:"font-medium",children:O.days})}),f.jsx(de,{children:f.jsx(Ke,{variant:O.status==="approved"?"success":O.status==="pending"?"warning":"danger",children:O.status})}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},O.id)),b.length===0&&f.jsx(Ve,{children:f.jsx(de,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No leave requests found"})})]})]})}),f.jsx(Li,{rum:"hr"})]})}const r3={draft:{variant:"default",icon:Go},pending_signature:{variant:"warning",icon:Go},active:{variant:"success",icon:_l},expired:{variant:"danger",icon:wi},terminated:{variant:"default",icon:wi},disputed:{variant:"danger",icon:wi}},Zce={aamos:"primary",quixzoom:"success",legal:"warning",hr:"default"};function a3(){const[e,t]=P.useState("contracts"),[n,r]=P.useState(""),[i,o]=P.useState(!0),[l,u]=P.useState(""),[d,h]=P.useState([]),[m,y]=P.useState([]),[g,j]=P.useState([]),[S,w]=P.useState(null),[b,O]=P.useState(!1);P.useEffect(()=>{async function A(){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)}}A()},[]);const T=d.filter(A=>A.name.toLowerCase().includes(n.toLowerCase())||A.counterparty.toLowerCase().includes(n.toLowerCase())||A.template_type.toLowerCase().includes(n.toLowerCase())),_=m.filter(A=>A.name.toLowerCase().includes(n.toLowerCase())||A.description.toLowerCase().includes(n.toLowerCase())||A.category.toLowerCase().includes(n.toLowerCase()));if(i)return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"}),f.jsx(et,{className:"h-[80px]"})]}),f.jsx(et,{className:"h-[400px]"})]});if(l)return f.jsx("div",{className:"flex items-center justify-center h-64",children:f.jsx("p",{className:"text-danger",children:l})});const C=[{id:"contracts",label:"Avtal",icon:bi},{id:"templates",label:"Mallar",icon:yH},{id:"products",label:"Produktkopplingar",icon:Fo}];return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Legal"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Avtal, mallar och produktkopplingar"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"Nytt avtal"})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:f.jsx(bi,{size:20})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold",children:d.length}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Totalt avtal"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success/10 text-success flex items-center justify-center",children:f.jsx(_l,{size:20})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold",children:d.filter(A=>A.status==="active").length}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning/10 text-warning flex items-center justify-center",children:f.jsx(Go,{size:20})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold",children:d.filter(A=>A.status==="pending_signature").length}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Väntar signering"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger/10 text-danger flex items-center justify-center",children:f.jsx(wi,{size:20})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold",children:d.filter(A=>A.status==="expired"||A.status==="terminated").length}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Utgångna"})]})]})})]}),f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto",children:C.map(A=>f.jsxs("button",{onClick:()=>t(A.id),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===A.id?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[f.jsx(A.icon,{size:16}),A.label]},A.id))}),f.jsxs("div",{className:"relative",children:[f.jsx(Cs,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.jsx("input",{type:"text",placeholder:"Sök avtal, mallar eller produkter...",value:n,onChange:A=>r(A.target.value),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]}),e==="contracts"&&f.jsx(he,{children:f.jsx("div",{className:"overflow-x-auto",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border",children:[f.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Avtal"}),f.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Motpart"}),f.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Typ"}),f.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Status"}),f.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Värde"}),f.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Period"}),f.jsx("th",{className:"text-right text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3"})]})}),f.jsxs("tbody",{className:"divide-y divide-border",children:[T.map(A=>{const E=r3[A.status]||r3.draft;return f.jsxs("tr",{className:"hover:bg-bg transition-colors",children:[f.jsx("td",{className:"px-4 py-3",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center",children:f.jsx(bi,{size:14})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:A.name}),f.jsx("p",{className:"text-xs text-text-secondary",children:A.template_type})]})]})}),f.jsxs("td",{className:"px-4 py-3",children:[f.jsx("p",{className:"text-sm text-text-primary",children:A.counterparty}),A.counterparty_org&&f.jsx("p",{className:"text-xs text-text-secondary",children:A.counterparty_org})]}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Ke,{variant:"default",className:"text-xs",children:A.template_type})}),f.jsx("td",{className:"px-4 py-3",children:f.jsxs(Ke,{variant:E.variant,className:"text-xs flex items-center gap-1",children:[f.jsx(E.icon,{size:12}),A.status]})}),f.jsx("td",{className:"px-4 py-3",children:A.value?f.jsxs("p",{className:"text-sm font-medium",children:[_e(A.value)," ",A.currency]}):f.jsx("p",{className:"text-sm text-text-secondary",children:"—"})}),f.jsx("td",{className:"px-4 py-3",children:f.jsxs("p",{className:"text-sm text-text-secondary",children:[A.start_date?mr(A.start_date):"—",A.end_date&&`${mr(A.end_date)}`]})}),f.jsx("td",{className:"px-4 py-3 text-right",children:f.jsxs("div",{className:"flex items-center justify-end gap-1",children:[f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(dL,{size:14})}),f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(GE,{size:14})}),f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:14})})]})})]},A.id)}),T.length===0&&f.jsx("tr",{children:f.jsx("td",{colSpan:7,className:"text-center text-text-secondary py-8",children:"Inga avtal hittades"})})]})]})})}),e==="templates"&&f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[_.map(A=>f.jsx("div",{className:"cursor-pointer hover:border-primary transition-colors",onClick:()=>{w(A),O(!0)},children:f.jsx(he,{children:f.jsxs("div",{className:"p-4",children:[f.jsxs("div",{className:"flex items-start justify-between mb-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:f.jsx(bi,{size:20})}),f.jsx(Ke,{variant:Zce[A.category],className:"text-xs",children:A.category})]}),f.jsx("h3",{className:"font-semibold text-text-primary mb-1",children:A.name}),f.jsx("p",{className:"text-sm text-text-secondary mb-3",children:A.description}),f.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-tertiary",children:[f.jsx(oh,{size:12}),A.jurisdiction,f.jsx("span",{className:"mx-1",children:"•"}),f.jsx(lh,{size:12}),"v",A.version,f.jsx("span",{className:"mx-1",children:"•"}),A.sections.length," sektioner"]})]})})},A.id)),_.length===0&&f.jsx("div",{className:"col-span-full text-center text-text-secondary py-8",children:"Inga mallar hittades"})]}),e==="products"&&f.jsx("div",{className:"space-y-6",children:g.map(A=>f.jsx(he,{children:f.jsxs("div",{className:"p-4",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:f.jsx(Fo,{size:20})}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-semibold text-text-primary",children:A.product_name}),f.jsx("p",{className:"text-sm text-text-secondary",children:A.product_type})]})]}),f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Krävs"}),f.jsx("div",{className:"flex flex-wrap gap-2",children:A.required_contracts.map(E=>f.jsx(Ke,{variant:"primary",className:"text-xs",children:E},E))})]}),A.optional_contracts.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Valbart"}),f.jsx("div",{className:"flex flex-wrap gap-2",children:A.optional_contracts.map(E=>f.jsx(Ke,{variant:"default",className:"text-xs",children:E},E))})]})]})]})},A.product_id))}),b&&S&&f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:f.jsx("div",{className:"w-full max-w-3xl max-h-[90vh] overflow-y-auto",children:f.jsx(he,{children:f.jsxs("div",{className:"p-6",children:[f.jsxs("div",{className:"flex items-start justify-between mb-6",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-xl font-semibold",children:S.name}),f.jsx("p",{className:"text-text-secondary",children:S.description})]}),f.jsx("button",{onClick:()=>O(!1),className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:"✕"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Kategori"}),f.jsx("p",{className:"font-medium",children:S.category})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Jurisdiktion"}),f.jsx("p",{className:"font-medium",children:S.jurisdiction})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Språk"}),f.jsx("p",{className:"font-medium",children:S.language})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Version"}),f.jsx("p",{className:"font-medium",children:S.version})]})]}),f.jsx("h3",{className:"font-semibold mb-3",children:"Avtalssektioner"}),f.jsx("div",{className:"space-y-2 mb-6",children:S.sections.map(A=>f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsxs("span",{className:"text-xs text-text-tertiary",children:[A.order,"."]}),f.jsx("p",{className:"font-medium text-sm",children:A.title}),A.required&&f.jsx(Ke,{variant:"danger",className:"text-xs",children:"Krävs"})]}),f.jsx("p",{className:"text-sm text-text-secondary",children:A.content}),A.variables&&A.variables.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:A.variables.map(E=>f.jsx("code",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded",children:"{{"+E+"}}"},E))})]},A.id))}),f.jsx("h3",{className:"font-semibold mb-3",children:"Standardvillkor"}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Betalningsvillkor"}),f.jsx("p",{className:"text-sm",children:S.default_terms.payment_terms})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Valuta"}),f.jsx("p",{className:"text-sm",children:S.default_terms.currency})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Avtalsperiod"}),f.jsx("p",{className:"text-sm",children:S.default_terms.contract_period})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Uppsägningstid"}),f.jsx("p",{className:"text-sm",children:S.default_terms.notice_period})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"Auto-förnyelse"}),f.jsx("p",{className:"text-sm",children:S.default_terms.auto_renewal?"Ja":"Nej"})]}),f.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[f.jsx("p",{className:"text-xs text-text-secondary",children:"SLA"}),f.jsx("p",{className:"text-sm",children:S.default_terms.sla_enabled?`${S.default_terms.sla_uptime}% uptime`:"Ej aktiverat"})]})]}),f.jsxs("div",{className:"flex gap-3",children:[f.jsxs(Yt,{className:"flex-1",children:[f.jsx(Ma,{size:16,className:"mr-2"}),"Skapa avtal från mall"]}),f.jsxs(Yt,{variant:"secondary",children:[f.jsx(GE,{size:16,className:"mr-2"}),"Förhandsgranska"]})]})]})})})}),f.jsx(Li,{rum:"legal"})]})}const Qce=[{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 Jce(){return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Marketing"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Campaigns and marketing metrics"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"New Campaign"})]}),f.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(ew,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"4"}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Campaigns"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:f.jsx(Pa,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"24.1K"}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Total Reach"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:f.jsx(hL,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"10.4%"}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Avg. Engagement"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(Mr,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:"1,040"}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Conversions"})]})]})})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Campaigns",subtitle:"Active and recent marketing campaigns"}),f.jsx("div",{className:"space-y-4",children:Qce.map(e=>f.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl bg-bg/50 hover:bg-bg transition-colors",children:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:e.channel==="Email"?f.jsx(Ss,{size:18}):f.jsx(dH,{size:18})}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"font-medium text-text-primary",children:e.name}),f.jsx(Ke,{variant:e.status==="active"?"success":e.status==="scheduled"?"primary":"default",size:"sm",children:e.status})]}),f.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.channel})]})]}),f.jsxs("div",{className:"flex items-center gap-8 text-right",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:e.reach>0?e.reach.toLocaleString():"—"}),f.jsx("p",{className:"text-[11px] text-text-secondary",children:"Reach"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:e.engagement>0?`${e.engagement}%`:"—"}),f.jsx("p",{className:"text-[11px] text-text-secondary",children:"Engagement"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:e.conversions>0?e.conversions.toLocaleString():"—"}),f.jsx("p",{className:"text-[11px] text-text-secondary",children:"Conversions"})]})]})]},e.id))})]}),f.jsx(Li,{rum:"marketing"})]})}const Hc=[{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()}],eue=["All","Open","In Progress","Resolved"];function tue(){const[e,t]=P.useState("All"),[n,r]=P.useState(""),i=Hc.filter(d=>d.status==="open").length,o=Hc.filter(d=>d.status==="in_progress").length,l=Hc.filter(d=>d.status==="resolved").length,u=Hc.filter(d=>{const h=d.subject.toLowerCase().includes(n.toLowerCase())||d.customer.toLowerCase().includes(n.toLowerCase())||d.id.toLowerCase().includes(n.toLowerCase()),m=e==="All"||d.status===e.toLowerCase().replace(" ","_");return h&&m});return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Support"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Customer support tickets"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"New Ticket"})]}),f.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(JS,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Hc.length}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Total Tickets"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:f.jsx(zp,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Open"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(Go,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:o}),f.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:f.jsx(_l,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:l}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Resolved"})]})]})})]}),f.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[f.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:eue.map(d=>f.jsx("button",{onClick:()=>t(d),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===d?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:d},d))}),f.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[f.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[f.jsx(Cs,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),f.jsx("input",{type:"text",placeholder:"Search tickets...",value:n,onChange:d=>r(d.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"})]}),f.jsx(Yt,{variant:"secondary",size:"sm",icon:f.jsx(ef,{size:14}),children:"Filter"})]})]}),f.jsx(he,{children:f.jsxs(Mn,{children:[f.jsx(bt,{children:f.jsxs(Ve,{children:[f.jsx(ye,{children:"Ticket"}),f.jsx(ye,{children:"Subject"}),f.jsx(ye,{children:"Customer"}),f.jsx(ye,{children:"Priority"}),f.jsx(ye,{children:"Status"}),f.jsx(ye,{children:"Assigned"}),f.jsx(ye,{children:"Created"}),f.jsx(ye,{align:"right"})]})}),f.jsx(Pn,{children:u.map(d=>f.jsxs(Ve,{children:[f.jsx(de,{children:f.jsx("span",{className:"font-medium text-sm",children:d.id})}),f.jsx(de,{children:f.jsx("span",{className:"text-sm text-text-primary",children:d.subject})}),f.jsx(de,{children:d.customer}),f.jsx(de,{children:f.jsx(Ke,{variant:d.priority==="high"?"danger":d.priority==="medium"?"warning":"default",size:"sm",children:d.priority})}),f.jsx(de,{children:f.jsx(Ke,{variant:d.status==="resolved"?"success":d.status==="in_progress"?"primary":"warning",size:"sm",children:d.status.replace("_"," ")})}),f.jsx(de,{children:d.assigned}),f.jsx(de,{children:f.jsx("span",{className:"text-xs text-text-secondary",children:sw(d.created)})}),f.jsx(de,{align:"right",children:f.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:f.jsx(Qr,{size:16})})})]},d.id))})]})}),f.jsx(Li,{rum:"support"})]})}const Fc=[{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}],nue={"Send Email":f.jsx(Ss,{size:12}),"Slack Message":f.jsx(_H,{size:12}),"Create Task":f.jsx(bi,{size:12}),"Add to CRM":f.jsx(B1,{size:12}),"Update HR":f.jsx(B1,{size:12})};function rue(){const e=Fc.filter(n=>n.status==="active").length,t=Fc.reduce((n,r)=>n+r.runs,0);return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Automation"}),f.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Workflows and automated tasks"})]}),f.jsx(Yt,{icon:f.jsx(Ma,{size:16}),children:"New Workflow"})]}),f.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(aw,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Fc.length}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Workflows"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:f.jsx(WE,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:e}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:f.jsx(YE,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Fc.length-e}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Paused"})]})]})}),f.jsx(he,{padding:"md",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:f.jsx(_l,{size:18})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:t.toLocaleString()}),f.jsx("p",{className:"text-xs text-text-secondary",children:"Total Runs"})]})]})})]}),f.jsxs(he,{children:[f.jsx(We,{title:"Workflows",subtitle:"Automated processes and triggers"}),f.jsx("div",{className:"space-y-3",children:Fc.map(n=>f.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl bg-bg/50 hover:bg-bg transition-colors",children:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.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"?f.jsx(WE,{size:18}):f.jsx(YE,{size:18})}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"font-medium text-text-primary",children:n.name}),f.jsx(Ke,{variant:n.status==="active"?"success":"warning",size:"sm",children:n.status})]}),f.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:n.description}),f.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(bH,{size:12,className:"text-text-secondary/60"}),f.jsx("span",{className:"text-[11px] text-text-secondary",children:n.trigger})]}),f.jsx("div",{className:"flex items-center gap-1",children:n.actions.map((r,i)=>f.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 bg-bg rounded text-[10px] text-text-secondary",children:[nue[r],r]},i))})]})]})]}),f.jsxs("div",{className:"flex items-center gap-6 text-right",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:n.runs.toLocaleString()}),f.jsx("p",{className:"text-[11px] text-text-secondary",children:"runs"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-text-primary",children:n.lastRun}),f.jsx("p",{className:"text-[11px] text-text-secondary",children:"last run"})]}),f.jsx("div",{className:"flex items-center",children:f.jsx("div",{className:"w-9 h-5 rounded-full bg-success/20 relative cursor-pointer",children:f.jsx("div",{className:"absolute right-0.5 top-0.5 w-4 h-4 rounded-full bg-success"})})})]})]},n.id))})]}),f.jsx(Li,{rum:"automation"})]})}const aue={crm:Pa,sales:Mr,marketing:ew,social:zH,finance:rw,accounting:cH,hr:Fo,legal:bi,compliance:$H,support:JS,projects:xH,automation:aw,dashboard:tw},iue={operational:{icon:_l,color:"text-green-500",bg:"bg-green-500/10",label:"Operational"},degraded:{icon:zp,color:"text-yellow-500",bg:"bg-yellow-500/10",label:"Degraded"},error:{icon:FE,color:"text-red-500",bg:"bg-red-500/10",label:"Error"},disabled:{icon:FE,color:"text-gray-400",bg:"bg-gray-400/10",label:"Disabled"}};function sue(){const[e,t]=P.useState(null),[n,r]=P.useState([]),[i,o]=P.useState(!1);P.useEffect(()=>{r(qce())},[]);const l=u=>{t(u),o(!0)};return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold text-text-primary",children:"BOC Agent Layer"}),f.jsx("p",{className:"text-text-secondary mt-1",children:"Professionellt agentlager för hela organisationen"})]}),f.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-green-500/10 rounded-lg",children:[f.jsx(sH,{size:16,className:"text-green-500"}),f.jsxs("span",{className:"text-sm font-medium text-green-600",children:[n.filter(u=>u.status==="operational").length," / ",n.length," Operational"]})]})]}),f.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,d)=>{const h=aue[u.rum]||zo,m=iue[u.status],y=m.icon;return f.jsxs(en.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:d*.05},onClick:()=>l(u.rum),className:Ot("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:[f.jsx("div",{className:"absolute top-4 right-4",children:f.jsxs("div",{className:Ot("flex items-center gap-1.5 px-2 py-1 rounded-full",m.bg),children:[f.jsx(y,{size:12,className:m.color}),f.jsx("span",{className:Ot("text-xs font-medium",m.color),children:m.label})]})}),f.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:f.jsx(h,{size:24,className:"text-primary"})}),f.jsx("h3",{className:"font-semibold text-text-primary mb-1",children:u.titel}),f.jsx("p",{className:"text-sm text-text-secondary mb-3 line-clamp-2",children:u.kompetenser.slice(0,3).join(", ")}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.capabilities.map(g=>f.jsx("span",{className:"text-xs px-2 py-0.5 rounded-md bg-bg text-text-secondary",children:g},g))}),f.jsx("div",{className:"mt-4 pt-4 border-t border-border opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsxs("div",{className:"flex items-center gap-2 text-sm text-primary",children:[f.jsx(tw,{size:14}),f.jsx("span",{children:"Öppna agent"})]})})]},u.rum)})}),e&&f.jsx(H$,{rum:e,isOpen:i,onToggle:()=>o(!i)})]})}function oue({children:e}){const{isAuthenticated:t}=Sl();return t?f.jsx(f.Fragment,{children:e}):f.jsx(vS,{to:"/login",replace:!0})}function lue({children:e}){const{isAuthenticated:t}=Sl();return t?f.jsx(vS,{to:"/",replace:!0}):f.jsx(f.Fragment,{children:e})}function cue(){return f.jsxs(jI,{children:[f.jsx(ln,{path:"/login",element:f.jsx(lue,{children:f.jsx(_F,{})})}),f.jsxs(ln,{element:f.jsx(oue,{children:f.jsx(wF,{})}),children:[f.jsx(ln,{path:"/",element:f.jsx($ce,{})}),f.jsx(ln,{path:"/dashboard",element:f.jsx(Mce,{})}),f.jsx(ln,{path:"/crm",element:f.jsx(Vce,{})}),f.jsx(ln,{path:"/sales",element:f.jsx(Fce,{})}),f.jsx(ln,{path:"/finance",element:f.jsx(Kce,{})}),f.jsx(ln,{path:"/hr",element:f.jsx(Wce,{})}),f.jsx(ln,{path:"/legal",element:f.jsx(a3,{})}),f.jsx(ln,{path:"/marketing",element:f.jsx(Jce,{})}),f.jsx(ln,{path:"/support",element:f.jsx(tue,{})}),f.jsx(ln,{path:"/automation",element:f.jsx(rue,{})}),f.jsx(ln,{path:"/agents",element:f.jsx(sue,{})}),f.jsx(ln,{path:"/legal",element:f.jsx(a3,{})}),f.jsx(ln,{path:"/profile",element:f.jsx(Bce,{})})]}),f.jsx(ln,{path:"*",element:f.jsx(vS,{to:"/",replace:!0})})]})}x8.createRoot(document.getElementById("root")).render(f.jsx(P.StrictMode,{children:f.jsx(FI,{children:f.jsx(cue,{})})}));