Files
boc/boc-dist-latest/assets/index-DNNxpf4c.js
T
Bernt 78b57273e2 security: Add proper authentication, RBAC, and tenant isolation
- Add password hashing with bcrypt
- Add AuthService with proper login
- Add password strength validation
- Add RBAC middleware (AdminOnly, ManagerOrAdmin)
- Add tenant isolation middleware
- Update CRM handler with tenant filtering
- Add JWT fallback for development mode
- Add user context helpers
- Build successful
2026-08-10 12:52:48 +00:00

759 lines
1.1 MiB
Plaintext
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 l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var kf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function st(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qy={exports:{}},Mc={};/**
* @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 bO;function IB(){if(bO)return Mc;bO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:e,type:r,key:c,ref:i!==void 0?i:null,props:l}}return Mc.Fragment=t,Mc.jsx=n,Mc.jsxs=n,Mc}var jO;function qB(){return jO||(jO=1,qy.exports=IB()),qy.exports}var s=qB(),Uy={exports:{}},Pe={};/**
* @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 wO;function UB(){if(wO)return Pe;wO=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"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function j(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,v={};function _(I,G,ae){this.props=I,this.context=G,this.refs=v,this.updater=ae||w}_.prototype.isReactComponent={},_.prototype.setState=function(I,G){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,G,"setState")},_.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function O(){}O.prototype=_.prototype;function A(I,G,ae){this.props=I,this.context=G,this.refs=v,this.updater=ae||w}var T=A.prototype=new O;T.constructor=A,S(T,_.prototype),T.isPureReactComponent=!0;var N=Array.isArray;function E(){}var k={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function L(I,G,ae){var fe=ae.ref;return{$$typeof:e,type:I,key:G,ref:fe!==void 0?fe:null,props:ae}}function D(I,G){return L(I.type,G,I.props)}function z(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function $(I){var G={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(ae){return G[ae]})}var F=/\/+/g;function Y(I,G){return typeof I=="object"&&I!==null&&I.key!=null?$(""+I.key):G.toString(36)}function K(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(E,E):(I.status="pending",I.then(function(G){I.status==="pending"&&(I.status="fulfilled",I.value=G)},function(G){I.status==="pending"&&(I.status="rejected",I.reason=G)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function B(I,G,ae,fe,ye){var we=typeof I;(we==="undefined"||we==="boolean")&&(I=null);var Ie=!1;if(I===null)Ie=!0;else switch(we){case"bigint":case"string":case"number":Ie=!0;break;case"object":switch(I.$$typeof){case e:case t:Ie=!0;break;case p:return Ie=I._init,B(Ie(I._payload),G,ae,fe,ye)}}if(Ie)return ye=ye(I),Ie=fe===""?"."+Y(I,0):fe,N(ye)?(ae="",Ie!=null&&(ae=Ie.replace(F,"$&/")+"/"),B(ye,G,ae,"",function(Oe){return Oe})):ye!=null&&(z(ye)&&(ye=D(ye,ae+(ye.key==null||I&&I.key===ye.key?"":(""+ye.key).replace(F,"$&/")+"/")+Ie)),G.push(ye)),1;Ie=0;var et=fe===""?".":fe+":";if(N(I))for(var de=0;de<I.length;de++)fe=I[de],we=et+Y(fe,de),Ie+=B(fe,G,ae,we,ye);else if(de=j(I),typeof de=="function")for(I=de.call(I),de=0;!(fe=I.next()).done;)fe=fe.value,we=et+Y(fe,de++),Ie+=B(fe,G,ae,we,ye);else if(we==="object"){if(typeof I.then=="function")return B(K(I),G,ae,fe,ye);throw G=String(I),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ie}function H(I,G,ae){if(I==null)return I;var fe=[],ye=0;return B(I,fe,"","",function(we){return G.call(ae,we,ye++)}),fe}function Q(I){if(I._status===-1){var G=I._result;G=G(),G.then(function(ae){(I._status===0||I._status===-1)&&(I._status=1,I._result=ae)},function(ae){(I._status===0||I._status===-1)&&(I._status=2,I._result=ae)}),I._status===-1&&(I._status=0,I._result=G)}if(I._status===1)return I._result.default;throw I._result}var ie=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},ce={map:H,forEach:function(I,G,ae){H(I,function(){G.apply(this,arguments)},ae)},count:function(I){var G=0;return H(I,function(){G++}),G},toArray:function(I){return H(I,function(G){return G})||[]},only:function(I){if(!z(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Pe.Activity=x,Pe.Children=ce,Pe.Component=_,Pe.Fragment=n,Pe.Profiler=i,Pe.PureComponent=A,Pe.StrictMode=r,Pe.Suspense=f,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(I){return k.H.useMemoCache(I)}},Pe.cache=function(I){return function(){return I.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(I,G,ae){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var fe=S({},I.props),ye=I.key;if(G!=null)for(we in G.key!==void 0&&(ye=""+G.key),G)!R.call(G,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&G.ref===void 0||(fe[we]=G[we]);var we=arguments.length-2;if(we===1)fe.children=ae;else if(1<we){for(var Ie=Array(we),et=0;et<we;et++)Ie[et]=arguments[et+2];fe.children=Ie}return L(I.type,ye,fe)},Pe.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:l,_context:I},I},Pe.createElement=function(I,G,ae){var fe,ye={},we=null;if(G!=null)for(fe in G.key!==void 0&&(we=""+G.key),G)R.call(G,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(ye[fe]=G[fe]);var Ie=arguments.length-2;if(Ie===1)ye.children=ae;else if(1<Ie){for(var et=Array(Ie),de=0;de<Ie;de++)et[de]=arguments[de+2];ye.children=et}if(I&&I.defaultProps)for(fe in Ie=I.defaultProps,Ie)ye[fe]===void 0&&(ye[fe]=Ie[fe]);return L(I,we,ye)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(I){return{$$typeof:d,render:I}},Pe.isValidElement=z,Pe.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:Q}},Pe.memo=function(I,G){return{$$typeof:h,type:I,compare:G===void 0?null:G}},Pe.startTransition=function(I){var G=k.T,ae={};k.T=ae;try{var fe=I(),ye=k.S;ye!==null&&ye(ae,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(E,ie)}catch(we){ie(we)}finally{G!==null&&ae.types!==null&&(G.types=ae.types),k.T=G}},Pe.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},Pe.use=function(I){return k.H.use(I)},Pe.useActionState=function(I,G,ae){return k.H.useActionState(I,G,ae)},Pe.useCallback=function(I,G){return k.H.useCallback(I,G)},Pe.useContext=function(I){return k.H.useContext(I)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(I,G){return k.H.useDeferredValue(I,G)},Pe.useEffect=function(I,G){return k.H.useEffect(I,G)},Pe.useEffectEvent=function(I){return k.H.useEffectEvent(I)},Pe.useId=function(){return k.H.useId()},Pe.useImperativeHandle=function(I,G,ae){return k.H.useImperativeHandle(I,G,ae)},Pe.useInsertionEffect=function(I,G){return k.H.useInsertionEffect(I,G)},Pe.useLayoutEffect=function(I,G){return k.H.useLayoutEffect(I,G)},Pe.useMemo=function(I,G){return k.H.useMemo(I,G)},Pe.useOptimistic=function(I,G){return k.H.useOptimistic(I,G)},Pe.useReducer=function(I,G,ae){return k.H.useReducer(I,G,ae)},Pe.useRef=function(I){return k.H.useRef(I)},Pe.useState=function(I){return k.H.useState(I)},Pe.useSyncExternalStore=function(I,G,ae){return k.H.useSyncExternalStore(I,G,ae)},Pe.useTransition=function(){return k.H.useTransition()},Pe.version="19.2.7",Pe}var SO;function ww(){return SO||(SO=1,Uy.exports=UB()),Uy.exports}var M=ww();const U=st(M);var Vy={exports:{}},kc={},Hy={exports:{}},Fy={};/**
* @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 NO;function VB(){return NO||(NO=1,(function(e){function t(B,H){var Q=B.length;B.push(H);e:for(;0<Q;){var ie=Q-1>>>1,ce=B[ie];if(0<i(ce,H))B[ie]=H,B[Q]=ce,Q=ie;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var H=B[0],Q=B.pop();if(Q!==H){B[0]=Q;e:for(var ie=0,ce=B.length,I=ce>>>1;ie<I;){var G=2*(ie+1)-1,ae=B[G],fe=G+1,ye=B[fe];if(0>i(ae,Q))fe<ce&&0>i(ye,ae)?(B[ie]=ye,B[fe]=Q,ie=fe):(B[ie]=ae,B[G]=Q,ie=G);else if(fe<ce&&0>i(ye,Q))B[ie]=ye,B[fe]=Q,ie=fe;else break e}}return H}function i(B,H){var Q=B.sortIndex-H.sortIndex;return Q!==0?Q:B.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],p=1,x=null,y=3,j=!1,w=!1,S=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function T(B){for(var H=n(h);H!==null;){if(H.callback===null)r(h);else if(H.startTime<=B)r(h),H.sortIndex=H.expirationTime,t(f,H);else break;H=n(h)}}function N(B){if(S=!1,T(B),!w)if(n(f)!==null)w=!0,E||(E=!0,$());else{var H=n(h);H!==null&&K(N,H.startTime-B)}}var E=!1,k=-1,R=5,L=-1;function D(){return v?!0:!(e.unstable_now()-L<R)}function z(){if(v=!1,E){var B=e.unstable_now();L=B;var H=!0;try{e:{w=!1,S&&(S=!1,O(k),k=-1),j=!0;var Q=y;try{t:{for(T(B),x=n(f);x!==null&&!(x.expirationTime>B&&D());){var ie=x.callback;if(typeof ie=="function"){x.callback=null,y=x.priorityLevel;var ce=ie(x.expirationTime<=B);if(B=e.unstable_now(),typeof ce=="function"){x.callback=ce,T(B),H=!0;break t}x===n(f)&&r(f),T(B)}else r(f);x=n(f)}if(x!==null)H=!0;else{var I=n(h);I!==null&&K(N,I.startTime-B),H=!1}}break e}finally{x=null,y=Q,j=!1}H=void 0}}finally{H?$():E=!1}}}var $;if(typeof A=="function")$=function(){A(z)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Y=F.port2;F.port1.onmessage=z,$=function(){Y.postMessage(null)}}else $=function(){_(z,0)};function K(B,H){k=_(function(){B(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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(B){switch(y){case 1:case 2:case 3:var H=3;break;default:H=y}var Q=y;y=H;try{return B()}finally{y=Q}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(B,H){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Q=y;y=B;try{return H()}finally{y=Q}},e.unstable_scheduleCallback=function(B,H,Q){var ie=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?ie+Q:ie):Q=ie,B){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=Q+ce,B={id:p++,callback:H,priorityLevel:B,startTime:Q,expirationTime:ce,sortIndex:-1},Q>ie?(B.sortIndex=Q,t(h,B),n(f)===null&&B===n(h)&&(S?(O(k),k=-1):S=!0,K(N,Q-ie))):(B.sortIndex=ce,t(f,B),w||j||(w=!0,E||(E=!0,$()))),B},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(B){var H=y;return function(){var Q=y;y=H;try{return B.apply(this,arguments)}finally{y=Q}}}})(Fy)),Fy}var AO;function HB(){return AO||(AO=1,Hy.exports=VB()),Hy.exports}var Gy={exports:{}},xn={};/**
* @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 _O;function FB(){if(_O)return xn;_O=1;var e=ww();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function 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 l(f,h,p){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:x==null?null:""+x,children:f,containerInfo:h,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,xn.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,p)},xn.flushSync=function(f){var h=c.T,p=r.p;try{if(c.T=null,r.p=2,f)return f()}finally{c.T=h,r.p=p,r.d.f()}},xn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},xn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},xn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,x=d(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,j=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:j}):p==="script"&&r.d.X(f,{crossOrigin:x,integrity:y,fetchPriority:j,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=d(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},xn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,x=d(p,h.crossOrigin);r.d.L(f,p,{crossOrigin:x,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})}},xn.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=d(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},xn.requestFormReset=function(f){r.d.r(f)},xn.unstable_batchedUpdates=function(f,h){return f(h)},xn.useFormState=function(f,h,p){return c.H.useFormState(f,h,p)},xn.useFormStatus=function(){return c.H.useHostTransitionStatus()},xn.version="19.2.7",xn}var OO;function GB(){if(OO)return Gy.exports;OO=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(),Gy.exports=FB(),Gy.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 TO;function KB(){if(TO)return kc;TO=1;var e=HB(),t=ww(),n=GB();function r(a){var o="https://react.dev/errors/"+a;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+o+" 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 l(a){var o=a,u=a;if(a.alternate)for(;o.return;)o=o.return;else{a=o;do o=a,(o.flags&4098)!==0&&(u=o.return),a=o.return;while(a)}return o.tag===3?u:null}function c(a){if(a.tag===13){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function d(a){if(a.tag===31){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function f(a){if(l(a)!==a)throw Error(r(188))}function h(a){var o=a.alternate;if(!o){if(o=l(a),o===null)throw Error(r(188));return o!==a?null:a}for(var u=a,m=o;;){var g=u.return;if(g===null)break;var b=g.alternate;if(b===null){if(m=g.return,m!==null){u=m;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===u)return f(g),a;if(b===m)return f(g),o;b=b.sibling}throw Error(r(188))}if(u.return!==m.return)u=g,m=b;else{for(var C=!1,P=g.child;P;){if(P===u){C=!0,u=g,m=b;break}if(P===m){C=!0,m=g,u=b;break}P=P.sibling}if(!C){for(P=b.child;P;){if(P===u){C=!0,u=b,m=g;break}if(P===m){C=!0,m=b,u=g;break}P=P.sibling}if(!C)throw Error(r(189))}}if(u.alternate!==m)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:o}function p(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a;for(a=a.child;a!==null;){if(o=p(a),o!==null)return o;a=a.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function $(a){return a===null||typeof a!="object"?null:(a=z&&a[z]||a["@@iterator"],typeof a=="function"?a:null)}var F=Symbol.for("react.client.reference");function Y(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===F?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case _:return"Profiler";case v:return"StrictMode";case N:return"Suspense";case E:return"SuspenseList";case L:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case A:return a.displayName||"Context";case O:return(a._context.displayName||"Context")+".Consumer";case T:var o=a.render;return a=a.displayName,a||(a=o.displayName||o.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case k:return o=a.displayName||null,o!==null?o:Y(a.type)||"Memo";case R:o=a._payload,a=a._init;try{return Y(a(o))}catch{}}return null}var K=Array.isArray,B=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},ie=[],ce=-1;function I(a){return{current:a}}function G(a){0>ce||(a.current=ie[ce],ie[ce]=null,ce--)}function ae(a,o){ce++,ie[ce]=a.current,a.current=o}var fe=I(null),ye=I(null),we=I(null),Ie=I(null);function et(a,o){switch(ae(we,o),ae(ye,a),ae(fe,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?V_(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=V_(o),a=H_(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}G(fe),ae(fe,a)}function de(){G(fe),G(ye),G(we)}function Oe(a){a.memoizedState!==null&&ae(Ie,a);var o=fe.current,u=H_(o,a.type);o!==u&&(ae(ye,a),ae(fe,u))}function ke(a){ye.current===a&&(G(fe),G(ye)),Ie.current===a&&(G(Ie),Oc._currentValue=Q)}var ue,gt;function Le(a){if(ue===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",gt=-1<u.stack.indexOf(`
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ue+a+gt}var Ot=!1;function Tt(a,o){if(!a||Ot)return"";Ot=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(o){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ee){var J=ee}Reflect.construct(a,[],oe)}else{try{oe.call()}catch(ee){J=ee}a.call(oe.prototype)}}else{try{throw Error()}catch(ee){J=ee}(oe=a())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ee){if(ee&&J&&typeof ee.stack=="string")return[ee.stack,J.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=m.DetermineComponentFrameRoot(),C=b[0],P=b[1];if(C&&P){var q=C.split(`
`),Z=P.split(`
`);for(g=m=0;m<q.length&&!q[m].includes("DetermineComponentFrameRoot");)m++;for(;g<Z.length&&!Z[g].includes("DetermineComponentFrameRoot");)g++;if(m===q.length||g===Z.length)for(m=q.length-1,g=Z.length-1;1<=m&&0<=g&&q[m]!==Z[g];)g--;for(;1<=m&&0<=g;m--,g--)if(q[m]!==Z[g]){if(m!==1||g!==1)do if(m--,g--,0>g||q[m]!==Z[g]){var ne=`
`+q[m].replace(" at new "," at ");return a.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",a.displayName)),ne}while(1<=m&&0<=g);break}}}finally{Ot=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Le(u):""}function mn(a,o){switch(a.tag){case 26:case 27:case 5:return Le(a.type);case 16:return Le("Lazy");case 13:return a.child!==o&&o!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("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 Le("Activity");default:return""}}function Ar(a){try{var o="",u=null;do o+=mn(a,u),u=a,a=a.return;while(a);return o}catch(m){return`
Error generating stack: `+m.message+`
`+m.stack}}var Ur=Object.prototype.hasOwnProperty,Xa=e.unstable_scheduleCallback,_r=e.unstable_cancelCallback,oa=e.unstable_shouldYield,$l=e.unstable_requestPaint,pn=e.unstable_now,hd=e.unstable_getCurrentPriorityLevel,j2=e.unstable_ImmediatePriority,w2=e.unstable_UserBlockingPriority,md=e.unstable_NormalPriority,j8=e.unstable_LowPriority,S2=e.unstable_IdlePriority,w8=e.log,S8=e.unstable_setDisableYieldValue,Bl=null,Ln=null;function Wa(a){if(typeof w8=="function"&&S8(a),Ln&&typeof Ln.setStrictMode=="function")try{Ln.setStrictMode(Bl,a)}catch{}}var $n=Math.clz32?Math.clz32:_8,N8=Math.log,A8=Math.LN2;function _8(a){return a>>>=0,a===0?32:31-(N8(a)/A8|0)|0}var pd=256,xd=262144,yd=4194304;function Vi(a){var o=a&42;if(o!==0)return o;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 gd(a,o,u){var m=a.pendingLanes;if(m===0)return 0;var g=0,b=a.suspendedLanes,C=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~b,m!==0?g=Vi(m):(C&=P,C!==0?g=Vi(C):u||(u=P&~a,u!==0&&(g=Vi(u))))):(P=m&~b,P!==0?g=Vi(P):C!==0?g=Vi(C):u||(u=m&~a,u!==0&&(g=Vi(u)))),g===0?0:o!==0&&o!==g&&(o&b)===0&&(b=g&-g,u=o&-o,b>=u||b===32&&(u&4194048)!==0)?o:g}function Il(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function O8(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 N2(){var a=yd;return yd<<=1,(yd&62914560)===0&&(yd=4194304),a}function Ep(a){for(var o=[],u=0;31>u;u++)o.push(a);return o}function ql(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function T8(a,o,u,m,g,b){var C=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var P=a.entanglements,q=a.expirationTimes,Z=a.hiddenUpdates;for(u=C&~u;0<u;){var ne=31-$n(u),oe=1<<ne;P[ne]=0,q[ne]=-1;var J=Z[ne];if(J!==null)for(Z[ne]=null,ne=0;ne<J.length;ne++){var ee=J[ne];ee!==null&&(ee.lane&=-536870913)}u&=~oe}m!==0&&A2(a,m,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(C&~o))}function A2(a,o,u){a.pendingLanes|=o,a.suspendedLanes&=~o;var m=31-$n(o);a.entangledLanes|=o,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function _2(a,o){var u=a.entangledLanes|=o;for(a=a.entanglements;u;){var m=31-$n(u),g=1<<m;g&o|a[m]&o&&(a[m]|=o),u&=~g}}function O2(a,o){var u=o&-o;return u=(u&42)!==0?1:Cp(u),(u&(a.suspendedLanes|o))!==0?0:u}function Cp(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 Mp(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function T2(){var a=H.p;return a!==0?a:(a=window.event,a===void 0?32:hO(a.type))}function E2(a,o){var u=H.p;try{return H.p=a,o()}finally{H.p=u}}var Za=Math.random().toString(36).slice(2),nn="__reactFiber$"+Za,_n="__reactProps$"+Za,qs="__reactContainer$"+Za,kp="__reactEvents$"+Za,E8="__reactListeners$"+Za,C8="__reactHandles$"+Za,C2="__reactResources$"+Za,Ul="__reactMarker$"+Za;function Pp(a){delete a[nn],delete a[_n],delete a[kp],delete a[E8],delete a[C8]}function Us(a){var o=a[nn];if(o)return o;for(var u=a.parentNode;u;){if(o=u[qs]||u[nn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(a=Z_(a);a!==null;){if(u=a[nn])return u;a=Z_(a)}return o}a=u,u=a.parentNode}return null}function Vs(a){if(a=a[nn]||a[qs]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function Vl(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(r(33))}function Hs(a){var o=a[C2];return o||(o=a[C2]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Zt(a){a[Ul]=!0}var M2=new Set,k2={};function Hi(a,o){Fs(a,o),Fs(a+"Capture",o)}function Fs(a,o){for(k2[a]=o,a=0;a<o.length;a++)M2.add(o[a])}var M8=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]*$"),P2={},R2={};function k8(a){return Ur.call(R2,a)?!0:Ur.call(P2,a)?!1:M8.test(a)?R2[a]=!0:(P2[a]=!0,!1)}function vd(a,o,u){if(k8(o))if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(o);return;case"boolean":var m=o.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(o);return}}a.setAttribute(o,""+u)}}function bd(a,o,u){if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttribute(o,""+u)}}function la(a,o,u,m){if(m===null)a.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(o,u,""+m)}}function tr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function D2(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function P8(a,o,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,o);if(!a.hasOwnProperty(o)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var g=m.get,b=m.set;return Object.defineProperty(a,o,{configurable:!0,get:function(){return g.call(this)},set:function(C){u=""+C,b.call(this,C)}}),Object.defineProperty(a,o,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(C){u=""+C},stopTracking:function(){a._valueTracker=null,delete a[o]}}}}function Rp(a){if(!a._valueTracker){var o=D2(a)?"checked":"value";a._valueTracker=P8(a,o,""+a[o])}}function z2(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var u=o.getValue(),m="";return a&&(m=D2(a)?a.checked?"true":"false":a.value),a=m,a!==u?(o.setValue(a),!0):!1}function jd(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 R8=/[\n"\\]/g;function nr(a){return a.replace(R8,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Dp(a,o,u,m,g,b,C,P){a.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?a.type=C:a.removeAttribute("type"),o!=null?C==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+tr(o)):a.value!==""+tr(o)&&(a.value=""+tr(o)):C!=="submit"&&C!=="reset"||a.removeAttribute("value"),o!=null?zp(a,C,tr(o)):u!=null?zp(a,C,tr(u)):m!=null&&a.removeAttribute("value"),g==null&&b!=null&&(a.defaultChecked=!!b),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+tr(P):a.removeAttribute("name")}function L2(a,o,u,m,g,b,C,P){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),o!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||o!=null)){Rp(a);return}u=u!=null?""+tr(u):"",o=o!=null?""+tr(o):u,P||o===a.value||(a.value=o),a.defaultValue=o}m=m??g,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=P?a.checked:!!m,a.defaultChecked=!!m,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(a.name=C),Rp(a)}function zp(a,o,u){o==="number"&&jd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Gs(a,o,u,m){if(a=a.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=o.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&m&&(a[u].defaultSelected=!0)}else{for(u=""+tr(u),o=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,m&&(a[g].defaultSelected=!0);return}o!==null||a[g].disabled||(o=a[g])}o!==null&&(o.selected=!0)}}function $2(a,o,u){if(o!=null&&(o=""+tr(o),o!==a.value&&(a.value=o),u==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=u!=null?""+tr(u):""}function B2(a,o,u,m){if(o==null){if(m!=null){if(u!=null)throw Error(r(92));if(K(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),o=u}u=tr(o),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),Rp(a)}function Ks(a,o){if(o){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=o;return}}a.textContent=o}var D8=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 I2(a,o,u){var m=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?a.setProperty(o,""):o==="float"?a.cssFloat="":a[o]="":m?a.setProperty(o,u):typeof u!="number"||u===0||D8.has(o)?o==="float"?a.cssFloat=u:a[o]=(""+u).trim():a[o]=u+"px"}function q2(a,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(a=a.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||o!=null&&o.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var g in o)m=o[g],o.hasOwnProperty(g)&&u[g]!==m&&I2(a,g,m)}else for(var b in o)o.hasOwnProperty(b)&&I2(a,b,o[b])}function Lp(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 z8=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"]]),L8=/^[\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 wd(a){return L8.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ca(){}var $p=null;function Bp(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ys=null,Xs=null;function U2(a){var o=Vs(a);if(o&&(a=o.stateNode)){var u=a[_n]||null;e:switch(a=o.stateNode,o.type){case"input":if(Dp(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+nr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var m=u[o];if(m!==a&&m.form===a.form){var g=m[_n]||null;if(!g)throw Error(r(90));Dp(m,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(o=0;o<u.length;o++)m=u[o],m.form===a.form&&z2(m)}break e;case"textarea":$2(a,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Gs(a,!!u.multiple,o,!1)}}}var Ip=!1;function V2(a,o,u){if(Ip)return a(o,u);Ip=!0;try{var m=a(o);return m}finally{if(Ip=!1,(Ys!==null||Xs!==null)&&(uf(),Ys&&(o=Ys,a=Xs,Xs=Ys=null,U2(o),a)))for(o=0;o<a.length;o++)U2(a[o])}}function Hl(a,o){var u=a.stateNode;if(u===null)return null;var m=u[_n]||null;if(m===null)return null;u=m[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qp=!1;if(ua)try{var Fl={};Object.defineProperty(Fl,"passive",{get:function(){qp=!0}}),window.addEventListener("test",Fl,Fl),window.removeEventListener("test",Fl,Fl)}catch{qp=!1}var Qa=null,Up=null,Sd=null;function H2(){if(Sd)return Sd;var a,o=Up,u=o.length,m,g="value"in Qa?Qa.value:Qa.textContent,b=g.length;for(a=0;a<u&&o[a]===g[a];a++);var C=u-a;for(m=1;m<=C&&o[u-m]===g[b-m];m++);return Sd=g.slice(a,1<m?1-m:void 0)}function Nd(a){var o=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&o===13&&(a=13)):a=o,a===10&&(a=13),32<=a||a===13?a:0}function Ad(){return!0}function F2(){return!1}function On(a){function o(u,m,g,b,C){this._reactName=u,this._targetInst=g,this.type=m,this.nativeEvent=b,this.target=C,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(u=a[P],this[P]=u?u(b):b[P]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ad:F2,this.isPropagationStopped=F2,this}return x(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ad)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ad)},persist:function(){},isPersistent:Ad}),o}var Fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_d=On(Fi),Gl=x({},Fi,{view:0,detail:0}),$8=On(Gl),Vp,Hp,Kl,Od=x({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gp,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!==Kl&&(Kl&&a.type==="mousemove"?(Vp=a.screenX-Kl.screenX,Hp=a.screenY-Kl.screenY):Hp=Vp=0,Kl=a),Vp)},movementY:function(a){return"movementY"in a?a.movementY:Hp}}),G2=On(Od),B8=x({},Od,{dataTransfer:0}),I8=On(B8),q8=x({},Gl,{relatedTarget:0}),Fp=On(q8),U8=x({},Fi,{animationName:0,elapsedTime:0,pseudoElement:0}),V8=On(U8),H8=x({},Fi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),F8=On(H8),G8=x({},Fi,{data:0}),K2=On(G8),K8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y8={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"},X8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W8(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=X8[a])?!!o[a]:!1}function Gp(){return W8}var Z8=x({},Gl,{key:function(a){if(a.key){var o=K8[a.key]||a.key;if(o!=="Unidentified")return o}return a.type==="keypress"?(a=Nd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Y8[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gp,charCode:function(a){return a.type==="keypress"?Nd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Nd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Q8=On(Z8),J8=x({},Od,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y2=On(J8),e$=x({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gp}),t$=On(e$),n$=x({},Fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),r$=On(n$),a$=x({},Od,{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}),i$=On(a$),s$=x({},Fi,{newState:0,oldState:0}),o$=On(s$),l$=[9,13,27,32],Kp=ua&&"CompositionEvent"in window,Yl=null;ua&&"documentMode"in document&&(Yl=document.documentMode);var c$=ua&&"TextEvent"in window&&!Yl,X2=ua&&(!Kp||Yl&&8<Yl&&11>=Yl),W2=" ",Z2=!1;function Q2(a,o){switch(a){case"keyup":return l$.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J2(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ws=!1;function u$(a,o){switch(a){case"compositionend":return J2(o);case"keypress":return o.which!==32?null:(Z2=!0,W2);case"textInput":return a=o.data,a===W2&&Z2?null:a;default:return null}}function d$(a,o){if(Ws)return a==="compositionend"||!Kp&&Q2(a,o)?(a=H2(),Sd=Up=Qa=null,Ws=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return X2&&o.locale!=="ko"?null:o.data;default:return null}}var f$={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 eN(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!f$[a.type]:o==="textarea"}function tN(a,o,u,m){Ys?Xs?Xs.push(m):Xs=[m]:Ys=m,o=yf(o,"onChange"),0<o.length&&(u=new _d("onChange","change",null,u,m),a.push({event:u,listeners:o}))}var Xl=null,Wl=null;function h$(a){L_(a,0)}function Td(a){var o=Vl(a);if(z2(o))return a}function nN(a,o){if(a==="change")return o}var rN=!1;if(ua){var Yp;if(ua){var Xp="oninput"in document;if(!Xp){var aN=document.createElement("div");aN.setAttribute("oninput","return;"),Xp=typeof aN.oninput=="function"}Yp=Xp}else Yp=!1;rN=Yp&&(!document.documentMode||9<document.documentMode)}function iN(){Xl&&(Xl.detachEvent("onpropertychange",sN),Wl=Xl=null)}function sN(a){if(a.propertyName==="value"&&Td(Wl)){var o=[];tN(o,Wl,a,Bp(a)),V2(h$,o)}}function m$(a,o,u){a==="focusin"?(iN(),Xl=o,Wl=u,Xl.attachEvent("onpropertychange",sN)):a==="focusout"&&iN()}function p$(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Td(Wl)}function x$(a,o){if(a==="click")return Td(o)}function y$(a,o){if(a==="input"||a==="change")return Td(o)}function g$(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var Bn=typeof Object.is=="function"?Object.is:g$;function Zl(a,o){if(Bn(a,o))return!0;if(typeof a!="object"||a===null||typeof o!="object"||o===null)return!1;var u=Object.keys(a),m=Object.keys(o);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var g=u[m];if(!Ur.call(o,g)||!Bn(a[g],o[g]))return!1}return!0}function oN(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function lN(a,o){var u=oN(a);a=0;for(var m;u;){if(u.nodeType===3){if(m=a+u.textContent.length,a<=o&&m>=o)return{node:u,offset:o-a};a=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=oN(u)}}function cN(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?cN(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function uN(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=jd(a.document);o instanceof a.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)a=o.contentWindow;else break;o=jd(a.document)}return o}function Wp(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var v$=ua&&"documentMode"in document&&11>=document.documentMode,Zs=null,Zp=null,Ql=null,Qp=!1;function dN(a,o,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Qp||Zs==null||Zs!==jd(m)||(m=Zs,"selectionStart"in m&&Wp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ql&&Zl(Ql,m)||(Ql=m,m=yf(Zp,"onSelect"),0<m.length&&(o=new _d("onSelect","select",null,o,u),a.push({event:o,listeners:m}),o.target=Zs)))}function Gi(a,o){var u={};return u[a.toLowerCase()]=o.toLowerCase(),u["Webkit"+a]="webkit"+o,u["Moz"+a]="moz"+o,u}var Qs={animationend:Gi("Animation","AnimationEnd"),animationiteration:Gi("Animation","AnimationIteration"),animationstart:Gi("Animation","AnimationStart"),transitionrun:Gi("Transition","TransitionRun"),transitionstart:Gi("Transition","TransitionStart"),transitioncancel:Gi("Transition","TransitionCancel"),transitionend:Gi("Transition","TransitionEnd")},Jp={},fN={};ua&&(fN=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Ki(a){if(Jp[a])return Jp[a];if(!Qs[a])return a;var o=Qs[a],u;for(u in o)if(o.hasOwnProperty(u)&&u in fN)return Jp[a]=o[u];return a}var hN=Ki("animationend"),mN=Ki("animationiteration"),pN=Ki("animationstart"),b$=Ki("transitionrun"),j$=Ki("transitionstart"),w$=Ki("transitioncancel"),xN=Ki("transitionend"),yN=new Map,ex="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(" ");ex.push("scrollEnd");function Or(a,o){yN.set(a,o),Hi(o,[a])}var Ed=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=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(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},rr=[],Js=0,tx=0;function Cd(){for(var a=Js,o=tx=Js=0;o<a;){var u=rr[o];rr[o++]=null;var m=rr[o];rr[o++]=null;var g=rr[o];rr[o++]=null;var b=rr[o];if(rr[o++]=null,m!==null&&g!==null){var C=m.pending;C===null?g.next=g:(g.next=C.next,C.next=g),m.pending=g}b!==0&&gN(u,g,b)}}function Md(a,o,u,m){rr[Js++]=a,rr[Js++]=o,rr[Js++]=u,rr[Js++]=m,tx|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function nx(a,o,u,m){return Md(a,o,u,m),kd(a)}function Yi(a,o){return Md(a,null,null,o),kd(a)}function gN(a,o,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var g=!1,b=a.return;b!==null;)b.childLanes|=u,m=b.alternate,m!==null&&(m.childLanes|=u),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(g=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,g&&o!==null&&(g=31-$n(u),a=b.hiddenUpdates,m=a[g],m===null?a[g]=[o]:m.push(o),o.lane=u|536870912),b):null}function kd(a){if(50<bc)throw bc=0,dy=null,Error(r(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var eo={};function S$(a,o,u,m){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(a,o,u,m){return new S$(a,o,u,m)}function rx(a){return a=a.prototype,!(!a||!a.isReactComponent)}function da(a,o){var u=a.alternate;return u===null?(u=In(a.tag,o,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=o,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,o=a.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function vN(a,o){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=o,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,o=u.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),a}function Pd(a,o,u,m,g,b){var C=0;if(m=a,typeof a=="function")rx(a)&&(C=1);else if(typeof a=="string")C=TB(a,u,fe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case L:return a=In(31,u,o,g),a.elementType=L,a.lanes=b,a;case S:return Xi(u.children,g,b,o);case v:C=8,g|=24;break;case _:return a=In(12,u,o,g|2),a.elementType=_,a.lanes=b,a;case N:return a=In(13,u,o,g),a.elementType=N,a.lanes=b,a;case E:return a=In(19,u,o,g),a.elementType=E,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case A:C=10;break e;case O:C=9;break e;case T:C=11;break e;case k:C=14;break e;case R:C=16,m=null;break e}C=29,u=Error(r(130,a===null?"null":typeof a,"")),m=null}return o=In(C,u,o,g),o.elementType=a,o.type=m,o.lanes=b,o}function Xi(a,o,u,m){return a=In(7,a,m,o),a.lanes=u,a}function ax(a,o,u){return a=In(6,a,null,o),a.lanes=u,a}function bN(a){var o=In(18,null,null,0);return o.stateNode=a,o}function ix(a,o,u){return o=In(4,a.children!==null?a.children:[],a.key,o),o.lanes=u,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var jN=new WeakMap;function ar(a,o){if(typeof a=="object"&&a!==null){var u=jN.get(a);return u!==void 0?u:(o={value:a,source:o,stack:Ar(o)},jN.set(a,o),o)}return{value:a,source:o,stack:Ar(o)}}var to=[],no=0,Rd=null,Jl=0,ir=[],sr=0,Ja=null,Vr=1,Hr="";function fa(a,o){to[no++]=Jl,to[no++]=Rd,Rd=a,Jl=o}function wN(a,o,u){ir[sr++]=Vr,ir[sr++]=Hr,ir[sr++]=Ja,Ja=a;var m=Vr;a=Hr;var g=32-$n(m)-1;m&=~(1<<g),u+=1;var b=32-$n(o)+g;if(30<b){var C=g-g%5;b=(m&(1<<C)-1).toString(32),m>>=C,g-=C,Vr=1<<32-$n(o)+g|u<<g|m,Hr=b+a}else Vr=1<<b|u<<g|m,Hr=a}function sx(a){a.return!==null&&(fa(a,1),wN(a,1,0))}function ox(a){for(;a===Rd;)Rd=to[--no],to[no]=null,Jl=to[--no],to[no]=null;for(;a===Ja;)Ja=ir[--sr],ir[sr]=null,Hr=ir[--sr],ir[sr]=null,Vr=ir[--sr],ir[sr]=null}function SN(a,o){ir[sr++]=Vr,ir[sr++]=Hr,ir[sr++]=Ja,Vr=o.id,Hr=o.overflow,Ja=a}var rn=null,vt=null,Fe=!1,ei=null,or=!1,lx=Error(r(519));function ti(a){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ec(ar(o,a)),lx}function NN(a){var o=a.stateNode,u=a.type,m=a.memoizedProps;switch(o[nn]=a,o[_n]=m,u){case"dialog":Ue("cancel",o),Ue("close",o);break;case"iframe":case"object":case"embed":Ue("load",o);break;case"video":case"audio":for(u=0;u<wc.length;u++)Ue(wc[u],o);break;case"source":Ue("error",o);break;case"img":case"image":case"link":Ue("error",o),Ue("load",o);break;case"details":Ue("toggle",o);break;case"input":Ue("invalid",o),L2(o,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Ue("invalid",o);break;case"textarea":Ue("invalid",o),B2(o,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||m.suppressHydrationWarning===!0||q_(o.textContent,u)?(m.popover!=null&&(Ue("beforetoggle",o),Ue("toggle",o)),m.onScroll!=null&&Ue("scroll",o),m.onScrollEnd!=null&&Ue("scrollend",o),m.onClick!=null&&(o.onclick=ca),o=!0):o=!1,o||ti(a,!0)}function AN(a){for(rn=a.return;rn;)switch(rn.tag){case 5:case 31:case 13:or=!1;return;case 27:case 3:or=!0;return;default:rn=rn.return}}function ro(a){if(a!==rn)return!1;if(!Fe)return AN(a),Fe=!0,!1;var o=a.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||_y(a.type,a.memoizedProps)),u=!u),u&&vt&&ti(a),AN(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=W_(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=W_(a)}else o===27?(o=vt,pi(a.type)?(a=My,My=null,vt=a):vt=o):vt=rn?cr(a.stateNode.nextSibling):null;return!0}function Wi(){vt=rn=null,Fe=!1}function cx(){var a=ei;return a!==null&&(Mn===null?Mn=a:Mn.push.apply(Mn,a),ei=null),a}function ec(a){ei===null?ei=[a]:ei.push(a)}var ux=I(null),Zi=null,ha=null;function ni(a,o,u){ae(ux,o._currentValue),o._currentValue=u}function ma(a){a._currentValue=ux.current,G(ux)}function dx(a,o,u){for(;a!==null;){var m=a.alternate;if((a.childLanes&o)!==o?(a.childLanes|=o,m!==null&&(m.childLanes|=o)):m!==null&&(m.childLanes&o)!==o&&(m.childLanes|=o),a===u)break;a=a.return}}function fx(a,o,u,m){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var b=g.dependencies;if(b!==null){var C=g.child;b=b.firstContext;e:for(;b!==null;){var P=b;b=g;for(var q=0;q<o.length;q++)if(P.context===o[q]){b.lanes|=u,P=b.alternate,P!==null&&(P.lanes|=u),dx(b.return,u,a),m||(C=null);break e}b=P.next}}else if(g.tag===18){if(C=g.return,C===null)throw Error(r(341));C.lanes|=u,b=C.alternate,b!==null&&(b.lanes|=u),dx(C,u,a),C=null}else C=g.child;if(C!==null)C.return=g;else for(C=g;C!==null;){if(C===a){C=null;break}if(g=C.sibling,g!==null){g.return=C.return,C=g;break}C=C.return}g=C}}function ao(a,o,u,m){a=null;for(var g=o,b=!1;g!==null;){if(!b){if((g.flags&524288)!==0)b=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var C=g.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var P=g.type;Bn(g.pendingProps.value,C.value)||(a!==null?a.push(P):a=[P])}}else if(g===Ie.current){if(C=g.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(Oc):a=[Oc])}g=g.return}a!==null&&fx(o,a,u,m),o.flags|=262144}function Dd(a){for(a=a.firstContext;a!==null;){if(!Bn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Qi(a){Zi=a,ha=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function an(a){return _N(Zi,a)}function zd(a,o){return Zi===null&&Qi(a),_N(a,o)}function _N(a,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},ha===null){if(a===null)throw Error(r(308));ha=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else ha=ha.next=o;return u}var N$=typeof AbortController<"u"?AbortController:function(){var a=[],o=this.signal={aborted:!1,addEventListener:function(u,m){a.push(m)}};this.abort=function(){o.aborted=!0,a.forEach(function(u){return u()})}},A$=e.unstable_scheduleCallback,_$=e.unstable_NormalPriority,Lt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hx(){return{controller:new N$,data:new Map,refCount:0}}function tc(a){a.refCount--,a.refCount===0&&A$(_$,function(){a.controller.abort()})}var nc=null,mx=0,io=0,so=null;function O$(a,o){if(nc===null){var u=nc=[];mx=0,io=yy(),so={status:"pending",value:void 0,then:function(m){u.push(m)}}}return mx++,o.then(ON,ON),o}function ON(){if(--mx===0&&nc!==null){so!==null&&(so.status="fulfilled");var a=nc;nc=null,io=0,so=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function T$(a,o){var u=[],m={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){m.status="fulfilled",m.value=o;for(var g=0;g<u.length;g++)(0,u[g])(o)},function(g){for(m.status="rejected",m.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),m}var TN=B.S;B.S=function(a,o){d_=pn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&O$(a,o),TN!==null&&TN(a,o)};var Ji=I(null);function px(){var a=Ji.current;return a!==null?a:dt.pooledCache}function Ld(a,o){o===null?ae(Ji,Ji.current):ae(Ji,o.pool)}function EN(){var a=px();return a===null?null:{parent:Lt._currentValue,pool:a}}var oo=Error(r(460)),xx=Error(r(474)),$d=Error(r(542)),Bd={then:function(){}};function CN(a){return a=a.status,a==="fulfilled"||a==="rejected"}function MN(a,o,u){switch(u=a[u],u===void 0?a.push(o):u!==o&&(o.then(ca,ca),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,PN(a),a;default:if(typeof o.status=="string")o.then(ca,ca);else{if(a=dt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=o,a.status="pending",a.then(function(m){if(o.status==="pending"){var g=o;g.status="fulfilled",g.value=m}},function(m){if(o.status==="pending"){var g=o;g.status="rejected",g.reason=m}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,PN(a),a}throw ts=o,oo}}function es(a){try{var o=a._init;return o(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ts=u,oo):u}}var ts=null;function kN(){if(ts===null)throw Error(r(459));var a=ts;return ts=null,a}function PN(a){if(a===oo||a===$d)throw Error(r(483))}var lo=null,rc=0;function Id(a){var o=rc;return rc+=1,lo===null&&(lo=[]),MN(lo,a,o)}function ac(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function qd(a,o){throw o.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(o),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":a)))}function RN(a){function o(X,V){if(a){var W=X.deletions;W===null?(X.deletions=[V],X.flags|=16):W.push(V)}}function u(X,V){if(!a)return null;for(;V!==null;)o(X,V),V=V.sibling;return null}function m(X){for(var V=new Map;X!==null;)X.key!==null?V.set(X.key,X):V.set(X.index,X),X=X.sibling;return V}function g(X,V){return X=da(X,V),X.index=0,X.sibling=null,X}function b(X,V,W){return X.index=W,a?(W=X.alternate,W!==null?(W=W.index,W<V?(X.flags|=67108866,V):W):(X.flags|=67108866,V)):(X.flags|=1048576,V)}function C(X){return a&&X.alternate===null&&(X.flags|=67108866),X}function P(X,V,W,se){return V===null||V.tag!==6?(V=ax(W,X.mode,se),V.return=X,V):(V=g(V,W),V.return=X,V)}function q(X,V,W,se){var ve=W.type;return ve===S?ne(X,V,W.props.children,se,W.key):V!==null&&(V.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&es(ve)===V.type)?(V=g(V,W.props),ac(V,W),V.return=X,V):(V=Pd(W.type,W.key,W.props,null,X.mode,se),ac(V,W),V.return=X,V)}function Z(X,V,W,se){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=ix(W,X.mode,se),V.return=X,V):(V=g(V,W.children||[]),V.return=X,V)}function ne(X,V,W,se,ve){return V===null||V.tag!==7?(V=Xi(W,X.mode,se,ve),V.return=X,V):(V=g(V,W),V.return=X,V)}function oe(X,V,W){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=ax(""+V,X.mode,W),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case j:return W=Pd(V.type,V.key,V.props,null,X.mode,W),ac(W,V),W.return=X,W;case w:return V=ix(V,X.mode,W),V.return=X,V;case R:return V=es(V),oe(X,V,W)}if(K(V)||$(V))return V=Xi(V,X.mode,W,null),V.return=X,V;if(typeof V.then=="function")return oe(X,Id(V),W);if(V.$$typeof===A)return oe(X,zd(X,V),W);qd(X,V)}return null}function J(X,V,W,se){var ve=V!==null?V.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return ve!==null?null:P(X,V,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case j:return W.key===ve?q(X,V,W,se):null;case w:return W.key===ve?Z(X,V,W,se):null;case R:return W=es(W),J(X,V,W,se)}if(K(W)||$(W))return ve!==null?null:ne(X,V,W,se,null);if(typeof W.then=="function")return J(X,V,Id(W),se);if(W.$$typeof===A)return J(X,V,zd(X,W),se);qd(X,W)}return null}function ee(X,V,W,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return X=X.get(W)||null,P(V,X,""+se,ve);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case j:return X=X.get(se.key===null?W:se.key)||null,q(V,X,se,ve);case w:return X=X.get(se.key===null?W:se.key)||null,Z(V,X,se,ve);case R:return se=es(se),ee(X,V,W,se,ve)}if(K(se)||$(se))return X=X.get(W)||null,ne(V,X,se,ve,null);if(typeof se.then=="function")return ee(X,V,W,Id(se),ve);if(se.$$typeof===A)return ee(X,V,W,zd(V,se),ve);qd(V,se)}return null}function pe(X,V,W,se){for(var ve=null,Ye=null,ge=V,$e=V=0,He=null;ge!==null&&$e<W.length;$e++){ge.index>$e?(He=ge,ge=null):He=ge.sibling;var Xe=J(X,ge,W[$e],se);if(Xe===null){ge===null&&(ge=He);break}a&&ge&&Xe.alternate===null&&o(X,ge),V=b(Xe,V,$e),Ye===null?ve=Xe:Ye.sibling=Xe,Ye=Xe,ge=He}if($e===W.length)return u(X,ge),Fe&&fa(X,$e),ve;if(ge===null){for(;$e<W.length;$e++)ge=oe(X,W[$e],se),ge!==null&&(V=b(ge,V,$e),Ye===null?ve=ge:Ye.sibling=ge,Ye=ge);return Fe&&fa(X,$e),ve}for(ge=m(ge);$e<W.length;$e++)He=ee(ge,X,$e,W[$e],se),He!==null&&(a&&He.alternate!==null&&ge.delete(He.key===null?$e:He.key),V=b(He,V,$e),Ye===null?ve=He:Ye.sibling=He,Ye=He);return a&&ge.forEach(function(bi){return o(X,bi)}),Fe&&fa(X,$e),ve}function Se(X,V,W,se){if(W==null)throw Error(r(151));for(var ve=null,Ye=null,ge=V,$e=V=0,He=null,Xe=W.next();ge!==null&&!Xe.done;$e++,Xe=W.next()){ge.index>$e?(He=ge,ge=null):He=ge.sibling;var bi=J(X,ge,Xe.value,se);if(bi===null){ge===null&&(ge=He);break}a&&ge&&bi.alternate===null&&o(X,ge),V=b(bi,V,$e),Ye===null?ve=bi:Ye.sibling=bi,Ye=bi,ge=He}if(Xe.done)return u(X,ge),Fe&&fa(X,$e),ve;if(ge===null){for(;!Xe.done;$e++,Xe=W.next())Xe=oe(X,Xe.value,se),Xe!==null&&(V=b(Xe,V,$e),Ye===null?ve=Xe:Ye.sibling=Xe,Ye=Xe);return Fe&&fa(X,$e),ve}for(ge=m(ge);!Xe.done;$e++,Xe=W.next())Xe=ee(ge,X,$e,Xe.value,se),Xe!==null&&(a&&Xe.alternate!==null&&ge.delete(Xe.key===null?$e:Xe.key),V=b(Xe,V,$e),Ye===null?ve=Xe:Ye.sibling=Xe,Ye=Xe);return a&&ge.forEach(function(BB){return o(X,BB)}),Fe&&fa(X,$e),ve}function ct(X,V,W,se){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case j:e:{for(var ve=W.key;V!==null;){if(V.key===ve){if(ve=W.type,ve===S){if(V.tag===7){u(X,V.sibling),se=g(V,W.props.children),se.return=X,X=se;break e}}else if(V.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&es(ve)===V.type){u(X,V.sibling),se=g(V,W.props),ac(se,W),se.return=X,X=se;break e}u(X,V);break}else o(X,V);V=V.sibling}W.type===S?(se=Xi(W.props.children,X.mode,se,W.key),se.return=X,X=se):(se=Pd(W.type,W.key,W.props,null,X.mode,se),ac(se,W),se.return=X,X=se)}return C(X);case w:e:{for(ve=W.key;V!==null;){if(V.key===ve)if(V.tag===4&&V.stateNode.containerInfo===W.containerInfo&&V.stateNode.implementation===W.implementation){u(X,V.sibling),se=g(V,W.children||[]),se.return=X,X=se;break e}else{u(X,V);break}else o(X,V);V=V.sibling}se=ix(W,X.mode,se),se.return=X,X=se}return C(X);case R:return W=es(W),ct(X,V,W,se)}if(K(W))return pe(X,V,W,se);if($(W)){if(ve=$(W),typeof ve!="function")throw Error(r(150));return W=ve.call(W),Se(X,V,W,se)}if(typeof W.then=="function")return ct(X,V,Id(W),se);if(W.$$typeof===A)return ct(X,V,zd(X,W),se);qd(X,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,V!==null&&V.tag===6?(u(X,V.sibling),se=g(V,W),se.return=X,X=se):(u(X,V),se=ax(W,X.mode,se),se.return=X,X=se),C(X)):u(X,V)}return function(X,V,W,se){try{rc=0;var ve=ct(X,V,W,se);return lo=null,ve}catch(ge){if(ge===oo||ge===$d)throw ge;var Ye=In(29,ge,null,X.mode);return Ye.lanes=se,Ye.return=X,Ye}finally{}}}var ns=RN(!0),DN=RN(!1),ri=!1;function yx(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gx(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ai(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function ii(a,o,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Je&2)!==0){var g=m.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),m.pending=o,o=kd(a),gN(a,null,u),o}return Md(a,m,o,u),kd(a)}function ic(a,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var m=o.lanes;m&=a.pendingLanes,u|=m,o.lanes=u,_2(a,u)}}function vx(a,o){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var g=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var C={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?g=b=C:b=b.next=C,u=u.next}while(u!==null);b===null?g=b=o:b=b.next=o}else g=b=o;u={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:m.shared,callbacks:m.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=o:a.next=o,u.lastBaseUpdate=o}var bx=!1;function sc(){if(bx){var a=so;if(a!==null)throw a}}function oc(a,o,u,m){bx=!1;var g=a.updateQueue;ri=!1;var b=g.firstBaseUpdate,C=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var q=P,Z=q.next;q.next=null,C===null?b=Z:C.next=Z,C=q;var ne=a.alternate;ne!==null&&(ne=ne.updateQueue,P=ne.lastBaseUpdate,P!==C&&(P===null?ne.firstBaseUpdate=Z:P.next=Z,ne.lastBaseUpdate=q))}if(b!==null){var oe=g.baseState;C=0,ne=Z=q=null,P=b;do{var J=P.lane&-536870913,ee=J!==P.lane;if(ee?(Ve&J)===J:(m&J)===J){J!==0&&J===io&&(bx=!0),ne!==null&&(ne=ne.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var pe=a,Se=P;J=o;var ct=u;switch(Se.tag){case 1:if(pe=Se.payload,typeof pe=="function"){oe=pe.call(ct,oe,J);break e}oe=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Se.payload,J=typeof pe=="function"?pe.call(ct,oe,J):pe,J==null)break e;oe=x({},oe,J);break e;case 2:ri=!0}}J=P.callback,J!==null&&(a.flags|=64,ee&&(a.flags|=8192),ee=g.callbacks,ee===null?g.callbacks=[J]:ee.push(J))}else ee={lane:J,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ne===null?(Z=ne=ee,q=oe):ne=ne.next=ee,C|=J;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;ee=P,P=ee.next,ee.next=null,g.lastBaseUpdate=ee,g.shared.pending=null}}while(!0);ne===null&&(q=oe),g.baseState=q,g.firstBaseUpdate=Z,g.lastBaseUpdate=ne,b===null&&(g.shared.lanes=0),ui|=C,a.lanes=C,a.memoizedState=oe}}function zN(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function LN(a,o){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)zN(u[a],o)}var co=I(null),Ud=I(0);function $N(a,o){a=Sa,ae(Ud,a),ae(co,o),Sa=a|o.baseLanes}function jx(){ae(Ud,Sa),ae(co,co.current)}function wx(){Sa=Ud.current,G(co),G(Ud)}var qn=I(null),lr=null;function si(a){var o=a.alternate;ae(Dt,Dt.current&1),ae(qn,a),lr===null&&(o===null||co.current!==null||o.memoizedState!==null)&&(lr=a)}function Sx(a){ae(Dt,Dt.current),ae(qn,a),lr===null&&(lr=a)}function BN(a){a.tag===22?(ae(Dt,Dt.current),ae(qn,a),lr===null&&(lr=a)):oi()}function oi(){ae(Dt,Dt.current),ae(qn,qn.current)}function Un(a){G(qn),lr===a&&(lr=null),G(Dt)}var Dt=I(0);function Vd(a){for(var o=a;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Ey(u)||Cy(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var pa=0,De=null,ot=null,$t=null,Hd=!1,uo=!1,rs=!1,Fd=0,lc=0,fo=null,E$=0;function Ct(){throw Error(r(321))}function Nx(a,o){if(o===null)return!1;for(var u=0;u<o.length&&u<a.length;u++)if(!Bn(a[u],o[u]))return!1;return!0}function Ax(a,o,u,m,g,b){return pa=b,De=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,B.H=a===null||a.memoizedState===null?wA:Ix,rs=!1,b=u(m,g),rs=!1,uo&&(b=qN(o,u,m,g)),IN(a),b}function IN(a){B.H=dc;var o=ot!==null&&ot.next!==null;if(pa=0,$t=ot=De=null,Hd=!1,lc=0,fo=null,o)throw Error(r(300));a===null||Bt||(a=a.dependencies,a!==null&&Dd(a)&&(Bt=!0))}function qN(a,o,u,m){De=a;var g=0;do{if(uo&&(fo=null),lc=0,uo=!1,25<=g)throw Error(r(301));if(g+=1,$t=ot=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}B.H=SA,b=o(u,m)}while(uo);return b}function C$(){var a=B.H,o=a.useState()[0];return o=typeof o.then=="function"?cc(o):o,a=a.useState()[0],(ot!==null?ot.memoizedState:null)!==a&&(De.flags|=1024),o}function _x(){var a=Fd!==0;return Fd=0,a}function Ox(a,o,u){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~u}function Tx(a){if(Hd){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}Hd=!1}pa=0,$t=ot=De=null,uo=!1,lc=Fd=0,fo=null}function vn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?De.memoizedState=$t=a:$t=$t.next=a,$t}function zt(){if(ot===null){var a=De.alternate;a=a!==null?a.memoizedState:null}else a=ot.next;var o=$t===null?De.memoizedState:$t.next;if(o!==null)$t=o,ot=a;else{if(a===null)throw De.alternate===null?Error(r(467)):Error(r(310));ot=a,a={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},$t===null?De.memoizedState=$t=a:$t=$t.next=a}return $t}function Gd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cc(a){var o=lc;return lc+=1,fo===null&&(fo=[]),a=MN(fo,a,o),o=De,($t===null?o.memoizedState:$t.next)===null&&(o=o.alternate,B.H=o===null||o.memoizedState===null?wA:Ix),a}function Kd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return cc(a);if(a.$$typeof===A)return an(a)}throw Error(r(438,String(a)))}function Ex(a){var o=null,u=De.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var m=De.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(o={data:m.data.map(function(g){return g.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Gd(),De.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(a),m=0;m<a;m++)u[m]=D;return o.index++,u}function xa(a,o){return typeof o=="function"?o(a):o}function Yd(a){var o=zt();return Cx(o,ot,a)}function Cx(a,o,u){var m=a.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var g=a.baseQueue,b=m.pending;if(b!==null){if(g!==null){var C=g.next;g.next=b.next,b.next=C}o.baseQueue=g=b,m.pending=null}if(b=a.baseState,g===null)a.memoizedState=b;else{o=g.next;var P=C=null,q=null,Z=o,ne=!1;do{var oe=Z.lane&-536870913;if(oe!==Z.lane?(Ve&oe)===oe:(pa&oe)===oe){var J=Z.revertLane;if(J===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),oe===io&&(ne=!0);else if((pa&J)===J){Z=Z.next,J===io&&(ne=!0);continue}else oe={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},q===null?(P=q=oe,C=b):q=q.next=oe,De.lanes|=J,ui|=J;oe=Z.action,rs&&u(b,oe),b=Z.hasEagerState?Z.eagerState:u(b,oe)}else J={lane:oe,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},q===null?(P=q=J,C=b):q=q.next=J,De.lanes|=oe,ui|=oe;Z=Z.next}while(Z!==null&&Z!==o);if(q===null?C=b:q.next=P,!Bn(b,a.memoizedState)&&(Bt=!0,ne&&(u=so,u!==null)))throw u;a.memoizedState=b,a.baseState=C,a.baseQueue=q,m.lastRenderedState=b}return g===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function Mx(a){var o=zt(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var m=u.dispatch,g=u.pending,b=o.memoizedState;if(g!==null){u.pending=null;var C=g=g.next;do b=a(b,C.action),C=C.next;while(C!==g);Bn(b,o.memoizedState)||(Bt=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),u.lastRenderedState=b}return[b,m]}function UN(a,o,u){var m=De,g=zt(),b=Fe;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=o();var C=!Bn((ot||g).memoizedState,u);if(C&&(g.memoizedState=u,Bt=!0),g=g.queue,Rx(FN.bind(null,m,g,a),[a]),g.getSnapshot!==o||C||$t!==null&&$t.memoizedState.tag&1){if(m.flags|=2048,ho(9,{destroy:void 0},HN.bind(null,m,g,u,o),null),dt===null)throw Error(r(349));b||(pa&127)!==0||VN(m,o,u)}return u}function VN(a,o,u){a.flags|=16384,a={getSnapshot:o,value:u},o=De.updateQueue,o===null?(o=Gd(),De.updateQueue=o,o.stores=[a]):(u=o.stores,u===null?o.stores=[a]:u.push(a))}function HN(a,o,u,m){o.value=u,o.getSnapshot=m,GN(o)&&KN(a)}function FN(a,o,u){return u(function(){GN(o)&&KN(a)})}function GN(a){var o=a.getSnapshot;a=a.value;try{var u=o();return!Bn(a,u)}catch{return!0}}function KN(a){var o=Yi(a,2);o!==null&&kn(o,a,2)}function kx(a){var o=vn();if(typeof a=="function"){var u=a;if(a=u(),rs){Wa(!0);try{u()}finally{Wa(!1)}}}return o.memoizedState=o.baseState=a,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:a},o}function YN(a,o,u,m){return a.baseState=u,Cx(a,ot,typeof m=="function"?m:xa)}function M$(a,o,u,m,g){if(Zd(a))throw Error(r(485));if(a=o.action,a!==null){var b={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){b.listeners.push(C)}};B.T!==null?u(!0):b.isTransition=!1,m(b),u=o.pending,u===null?(b.next=o.pending=b,XN(o,b)):(b.next=u.next,o.pending=u.next=b)}}function XN(a,o){var u=o.action,m=o.payload,g=a.state;if(o.isTransition){var b=B.T,C={};B.T=C;try{var P=u(g,m),q=B.S;q!==null&&q(C,P),WN(a,o,P)}catch(Z){Px(a,o,Z)}finally{b!==null&&C.types!==null&&(b.types=C.types),B.T=b}}else try{b=u(g,m),WN(a,o,b)}catch(Z){Px(a,o,Z)}}function WN(a,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){ZN(a,o,m)},function(m){return Px(a,o,m)}):ZN(a,o,u)}function ZN(a,o,u){o.status="fulfilled",o.value=u,QN(o),a.state=u,o=a.pending,o!==null&&(u=o.next,u===o?a.pending=null:(u=u.next,o.next=u,XN(a,u)))}function Px(a,o,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do o.status="rejected",o.reason=u,QN(o),o=o.next;while(o!==m)}a.action=null}function QN(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function JN(a,o){return o}function eA(a,o){if(Fe){var u=dt.formState;if(u!==null){e:{var m=De;if(Fe){if(vt){t:{for(var g=vt,b=or;g.nodeType!==8;){if(!b){g=null;break t}if(g=cr(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){vt=cr(g.nextSibling),m=g.data==="F!";break e}}ti(m)}m=!1}m&&(o=u[0])}}return u=vn(),u.memoizedState=u.baseState=o,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:JN,lastRenderedState:o},u.queue=m,u=vA.bind(null,De,m),m.dispatch=u,m=kx(!1),b=Bx.bind(null,De,!1,m.queue),m=vn(),g={state:o,dispatch:null,action:a,pending:null},m.queue=g,u=M$.bind(null,De,g,b,u),g.dispatch=u,m.memoizedState=a,[o,u,!1]}function tA(a){var o=zt();return nA(o,ot,a)}function nA(a,o,u){if(o=Cx(a,o,JN)[0],a=Yd(xa)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var m=cc(o)}catch(C){throw C===oo?$d:C}else m=o;o=zt();var g=o.queue,b=g.dispatch;return u!==o.memoizedState&&(De.flags|=2048,ho(9,{destroy:void 0},k$.bind(null,g,u),null)),[m,b,a]}function k$(a,o){a.action=o}function rA(a){var o=zt(),u=ot;if(u!==null)return nA(o,u,a);zt(),o=o.memoizedState,u=zt();var m=u.queue.dispatch;return u.memoizedState=a,[o,m,!1]}function ho(a,o,u,m){return a={tag:a,create:u,deps:m,inst:o,next:null},o=De.updateQueue,o===null&&(o=Gd(),De.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,o.lastEffect=a),a}function aA(){return zt().memoizedState}function Xd(a,o,u,m){var g=vn();De.flags|=a,g.memoizedState=ho(1|o,{destroy:void 0},u,m===void 0?null:m)}function Wd(a,o,u,m){var g=zt();m=m===void 0?null:m;var b=g.memoizedState.inst;ot!==null&&m!==null&&Nx(m,ot.memoizedState.deps)?g.memoizedState=ho(o,b,u,m):(De.flags|=a,g.memoizedState=ho(1|o,b,u,m))}function iA(a,o){Xd(8390656,8,a,o)}function Rx(a,o){Wd(2048,8,a,o)}function P$(a){De.flags|=4;var o=De.updateQueue;if(o===null)o=Gd(),De.updateQueue=o,o.events=[a];else{var u=o.events;u===null?o.events=[a]:u.push(a)}}function sA(a){var o=zt().memoizedState;return P$({ref:o,nextImpl:a}),function(){if((Je&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function oA(a,o){return Wd(4,2,a,o)}function lA(a,o){return Wd(4,4,a,o)}function cA(a,o){if(typeof o=="function"){a=a();var u=o(a);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return a=a(),o.current=a,function(){o.current=null}}function uA(a,o,u){u=u!=null?u.concat([a]):null,Wd(4,4,cA.bind(null,o,a),u)}function Dx(){}function dA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;return o!==null&&Nx(o,m[1])?m[0]:(u.memoizedState=[a,o],a)}function fA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;if(o!==null&&Nx(o,m[1]))return m[0];if(m=a(),rs){Wa(!0);try{a()}finally{Wa(!1)}}return u.memoizedState=[m,o],m}function zx(a,o,u){return u===void 0||(pa&1073741824)!==0&&(Ve&261930)===0?a.memoizedState=o:(a.memoizedState=u,a=h_(),De.lanes|=a,ui|=a,u)}function hA(a,o,u,m){return Bn(u,o)?u:co.current!==null?(a=zx(a,u,m),Bn(a,o)||(Bt=!0),a):(pa&42)===0||(pa&1073741824)!==0&&(Ve&261930)===0?(Bt=!0,a.memoizedState=u):(a=h_(),De.lanes|=a,ui|=a,o)}function mA(a,o,u,m,g){var b=H.p;H.p=b!==0&&8>b?b:8;var C=B.T,P={};B.T=P,Bx(a,!1,o,u);try{var q=g(),Z=B.S;if(Z!==null&&Z(P,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var ne=T$(q,m);uc(a,o,ne,Fn(a))}else uc(a,o,m,Fn(a))}catch(oe){uc(a,o,{then:function(){},status:"rejected",reason:oe},Fn())}finally{H.p=b,C!==null&&P.types!==null&&(C.types=P.types),B.T=C}}function R$(){}function Lx(a,o,u,m){if(a.tag!==5)throw Error(r(476));var g=pA(a).queue;mA(a,g,o,Q,u===null?R$:function(){return xA(a),u(m)})}function pA(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:Q},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:u},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function xA(a){var o=pA(a);o.next===null&&(o=a.alternate.memoizedState),uc(a,o.next.queue,{},Fn())}function $x(){return an(Oc)}function yA(){return zt().memoizedState}function gA(){return zt().memoizedState}function D$(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var u=Fn();a=ai(u);var m=ii(o,a,u);m!==null&&(kn(m,o,u),ic(m,o,u)),o={cache:hx()},a.payload=o;return}o=o.return}}function z$(a,o,u){var m=Fn();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Zd(a)?bA(o,u):(u=nx(a,o,u,m),u!==null&&(kn(u,a,m),jA(u,o,m)))}function vA(a,o,u){var m=Fn();uc(a,o,u,m)}function uc(a,o,u,m){var g={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Zd(a))bA(o,g);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var C=o.lastRenderedState,P=b(C,u);if(g.hasEagerState=!0,g.eagerState=P,Bn(P,C))return Md(a,o,g,0),dt===null&&Cd(),!1}catch{}finally{}if(u=nx(a,o,g,m),u!==null)return kn(u,a,m),jA(u,o,m),!0}return!1}function Bx(a,o,u,m){if(m={lane:2,revertLane:yy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Zd(a)){if(o)throw Error(r(479))}else o=nx(a,u,m,2),o!==null&&kn(o,a,2)}function Zd(a){var o=a.alternate;return a===De||o!==null&&o===De}function bA(a,o){uo=Hd=!0;var u=a.pending;u===null?o.next=o:(o.next=u.next,u.next=o),a.pending=o}function jA(a,o,u){if((u&4194048)!==0){var m=o.lanes;m&=a.pendingLanes,u|=m,o.lanes=u,_2(a,u)}}var dc={readContext:an,use:Kd,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};dc.useEffectEvent=Ct;var wA={readContext:an,use:Kd,useCallback:function(a,o){return vn().memoizedState=[a,o===void 0?null:o],a},useContext:an,useEffect:iA,useImperativeHandle:function(a,o,u){u=u!=null?u.concat([a]):null,Xd(4194308,4,cA.bind(null,o,a),u)},useLayoutEffect:function(a,o){return Xd(4194308,4,a,o)},useInsertionEffect:function(a,o){Xd(4,2,a,o)},useMemo:function(a,o){var u=vn();o=o===void 0?null:o;var m=a();if(rs){Wa(!0);try{a()}finally{Wa(!1)}}return u.memoizedState=[m,o],m},useReducer:function(a,o,u){var m=vn();if(u!==void 0){var g=u(o);if(rs){Wa(!0);try{u(o)}finally{Wa(!1)}}}else g=o;return m.memoizedState=m.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},m.queue=a,a=a.dispatch=z$.bind(null,De,a),[m.memoizedState,a]},useRef:function(a){var o=vn();return a={current:a},o.memoizedState=a},useState:function(a){a=kx(a);var o=a.queue,u=vA.bind(null,De,o);return o.dispatch=u,[a.memoizedState,u]},useDebugValue:Dx,useDeferredValue:function(a,o){var u=vn();return zx(u,a,o)},useTransition:function(){var a=kx(!1);return a=mA.bind(null,De,a.queue,!0,!1),vn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,u){var m=De,g=vn();if(Fe){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),dt===null)throw Error(r(349));(Ve&127)!==0||VN(m,o,u)}g.memoizedState=u;var b={value:u,getSnapshot:o};return g.queue=b,iA(FN.bind(null,m,b,a),[a]),m.flags|=2048,ho(9,{destroy:void 0},HN.bind(null,m,b,u,o),null),u},useId:function(){var a=vn(),o=dt.identifierPrefix;if(Fe){var u=Hr,m=Vr;u=(m&~(1<<32-$n(m)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Fd++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=E$++,o="_"+o+"r_"+u.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:$x,useFormState:eA,useActionState:eA,useOptimistic:function(a){var o=vn();o.memoizedState=o.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Bx.bind(null,De,!0,u),u.dispatch=o,[a,o]},useMemoCache:Ex,useCacheRefresh:function(){return vn().memoizedState=D$.bind(null,De)},useEffectEvent:function(a){var o=vn(),u={impl:a};return o.memoizedState=u,function(){if((Je&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Ix={readContext:an,use:Kd,useCallback:dA,useContext:an,useEffect:Rx,useImperativeHandle:uA,useInsertionEffect:oA,useLayoutEffect:lA,useMemo:fA,useReducer:Yd,useRef:aA,useState:function(){return Yd(xa)},useDebugValue:Dx,useDeferredValue:function(a,o){var u=zt();return hA(u,ot.memoizedState,a,o)},useTransition:function(){var a=Yd(xa)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:cc(a),o]},useSyncExternalStore:UN,useId:yA,useHostTransitionStatus:$x,useFormState:tA,useActionState:tA,useOptimistic:function(a,o){var u=zt();return YN(u,ot,a,o)},useMemoCache:Ex,useCacheRefresh:gA};Ix.useEffectEvent=sA;var SA={readContext:an,use:Kd,useCallback:dA,useContext:an,useEffect:Rx,useImperativeHandle:uA,useInsertionEffect:oA,useLayoutEffect:lA,useMemo:fA,useReducer:Mx,useRef:aA,useState:function(){return Mx(xa)},useDebugValue:Dx,useDeferredValue:function(a,o){var u=zt();return ot===null?zx(u,a,o):hA(u,ot.memoizedState,a,o)},useTransition:function(){var a=Mx(xa)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:cc(a),o]},useSyncExternalStore:UN,useId:yA,useHostTransitionStatus:$x,useFormState:rA,useActionState:rA,useOptimistic:function(a,o){var u=zt();return ot!==null?YN(u,ot,a,o):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Ex,useCacheRefresh:gA};SA.useEffectEvent=sA;function qx(a,o,u,m){o=a.memoizedState,u=u(m,o),u=u==null?o:x({},o,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var Ux={enqueueSetState:function(a,o,u){a=a._reactInternals;var m=Fn(),g=ai(m);g.payload=o,u!=null&&(g.callback=u),o=ii(a,g,m),o!==null&&(kn(o,a,m),ic(o,a,m))},enqueueReplaceState:function(a,o,u){a=a._reactInternals;var m=Fn(),g=ai(m);g.tag=1,g.payload=o,u!=null&&(g.callback=u),o=ii(a,g,m),o!==null&&(kn(o,a,m),ic(o,a,m))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var u=Fn(),m=ai(u);m.tag=2,o!=null&&(m.callback=o),o=ii(a,m,u),o!==null&&(kn(o,a,u),ic(o,a,u))}};function NA(a,o,u,m,g,b,C){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,b,C):o.prototype&&o.prototype.isPureReactComponent?!Zl(u,m)||!Zl(g,b):!0}function AA(a,o,u,m){a=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,m),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,m),o.state!==a&&Ux.enqueueReplaceState(o,o.state,null)}function as(a,o){var u=o;if("ref"in o){u={};for(var m in o)m!=="ref"&&(u[m]=o[m])}if(a=a.defaultProps){u===o&&(u=x({},u));for(var g in a)u[g]===void 0&&(u[g]=a[g])}return u}function _A(a){Ed(a)}function OA(a){console.error(a)}function TA(a){Ed(a)}function Qd(a,o){try{var u=a.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(m){setTimeout(function(){throw m})}}function EA(a,o,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Vx(a,o,u){return u=ai(u),u.tag=3,u.payload={element:null},u.callback=function(){Qd(a,o)},u}function CA(a){return a=ai(a),a.tag=3,a}function MA(a,o,u,m){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var b=m.value;a.payload=function(){return g(b)},a.callback=function(){EA(o,u,m)}}var C=u.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(a.callback=function(){EA(o,u,m),typeof g!="function"&&(di===null?di=new Set([this]):di.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function L$(a,o,u,m,g){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(o=u.alternate,o!==null&&ao(o,u,g,!0),u=qn.current,u!==null){switch(u.tag){case 31:case 13:return lr===null?df():u.alternate===null&&Mt===0&&(Mt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,m===Bd?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([m]):o.add(m),my(a,m,g)),!1;case 22:return u.flags|=65536,m===Bd?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([m]):u.add(m)),my(a,m,g)),!1}throw Error(r(435,u.tag))}return my(a,m,g),df(),!1}if(Fe)return o=qn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=g,m!==lx&&(a=Error(r(422),{cause:m}),ec(ar(a,u)))):(m!==lx&&(o=Error(r(423),{cause:m}),ec(ar(o,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,m=ar(m,u),g=Vx(a.stateNode,m,g),vx(a,g),Mt!==4&&(Mt=2)),!1;var b=Error(r(520),{cause:m});if(b=ar(b,u),vc===null?vc=[b]:vc.push(b),Mt!==4&&(Mt=2),o===null)return!0;m=ar(m,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=Vx(u.stateNode,m,a),vx(u,a),!1;case 1:if(o=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(di===null||!di.has(b))))return u.flags|=65536,g&=-g,u.lanes|=g,g=CA(g),MA(g,a,u,m),vx(u,g),!1}u=u.return}while(u!==null);return!1}var Hx=Error(r(461)),Bt=!1;function sn(a,o,u,m){o.child=a===null?DN(o,null,u,m):ns(o,a.child,u,m)}function kA(a,o,u,m,g){u=u.render;var b=o.ref;if("ref"in m){var C={};for(var P in m)P!=="ref"&&(C[P]=m[P])}else C=m;return Qi(o),m=Ax(a,o,u,C,b,g),P=_x(),a!==null&&!Bt?(Ox(a,o,g),ya(a,o,g)):(Fe&&P&&sx(o),o.flags|=1,sn(a,o,m,g),o.child)}function PA(a,o,u,m,g){if(a===null){var b=u.type;return typeof b=="function"&&!rx(b)&&b.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=b,RA(a,o,b,m,g)):(a=Pd(u.type,null,m,o,o.mode,g),a.ref=o.ref,a.return=o,o.child=a)}if(b=a.child,!Qx(a,g)){var C=b.memoizedProps;if(u=u.compare,u=u!==null?u:Zl,u(C,m)&&a.ref===o.ref)return ya(a,o,g)}return o.flags|=1,a=da(b,m),a.ref=o.ref,a.return=o,o.child=a}function RA(a,o,u,m,g){if(a!==null){var b=a.memoizedProps;if(Zl(b,m)&&a.ref===o.ref)if(Bt=!1,o.pendingProps=m=b,Qx(a,g))(a.flags&131072)!==0&&(Bt=!0);else return o.lanes=a.lanes,ya(a,o,g)}return Fx(a,o,u,m,g)}function DA(a,o,u,m){var g=m.children,b=a!==null?a.memoizedState:null;if(a===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((o.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,a!==null){for(m=o.child=a.child,g=0;m!==null;)g=g|m.lanes|m.childLanes,m=m.sibling;m=g&~b}else m=0,o.child=null;return zA(a,o,b,u,m)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&Ld(o,b!==null?b.cachePool:null),b!==null?$N(o,b):jx(),BN(o);else return m=o.lanes=536870912,zA(a,o,b!==null?b.baseLanes|u:u,u,m)}else b!==null?(Ld(o,b.cachePool),$N(o,b),oi(),o.memoizedState=null):(a!==null&&Ld(o,null),jx(),oi());return sn(a,o,g,u),o.child}function fc(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function zA(a,o,u,m,g){var b=px();return b=b===null?null:{parent:Lt._currentValue,pool:b},o.memoizedState={baseLanes:u,cachePool:b},a!==null&&Ld(o,null),jx(),BN(o),a!==null&&ao(a,o,m,!0),o.childLanes=g,null}function Jd(a,o){return o=tf({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function LA(a,o,u){return ns(o,a.child,null,u),a=Jd(o,o.pendingProps),a.flags|=2,Un(o),o.memoizedState=null,a}function $$(a,o,u){var m=o.pendingProps,g=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(Fe){if(m.mode==="hidden")return a=Jd(o,m),o.lanes=536870912,fc(null,a);if(Sx(o),(a=vt)?(a=X_(a,or),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ja!==null?{id:Vr,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},u=bN(a),u.return=o,o.child=u,rn=o,vt=null)):a=null,a===null)throw ti(o);return o.lanes=536870912,null}return Jd(o,m)}var b=a.memoizedState;if(b!==null){var C=b.dehydrated;if(Sx(o),g)if(o.flags&256)o.flags&=-257,o=LA(a,o,u);else if(o.memoizedState!==null)o.child=a.child,o.flags|=128,o=null;else throw Error(r(558));else if(Bt||ao(a,o,u,!1),g=(u&a.childLanes)!==0,Bt||g){if(m=dt,m!==null&&(C=O2(m,u),C!==0&&C!==b.retryLane))throw b.retryLane=C,Yi(a,C),kn(m,a,C),Hx;df(),o=LA(a,o,u)}else a=b.treeContext,vt=cr(C.nextSibling),rn=o,Fe=!0,ei=null,or=!1,a!==null&&SN(o,a),o=Jd(o,m),o.flags|=4096;return o}return a=da(a.child,{mode:m.mode,children:m.children}),a.ref=o.ref,o.child=a,a.return=o,a}function ef(a,o){var u=o.ref;if(u===null)a!==null&&a.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(o.flags|=4194816)}}function Fx(a,o,u,m,g){return Qi(o),u=Ax(a,o,u,m,void 0,g),m=_x(),a!==null&&!Bt?(Ox(a,o,g),ya(a,o,g)):(Fe&&m&&sx(o),o.flags|=1,sn(a,o,u,g),o.child)}function $A(a,o,u,m,g,b){return Qi(o),o.updateQueue=null,u=qN(o,m,u,g),IN(a),m=_x(),a!==null&&!Bt?(Ox(a,o,b),ya(a,o,b)):(Fe&&m&&sx(o),o.flags|=1,sn(a,o,u,b),o.child)}function BA(a,o,u,m,g){if(Qi(o),o.stateNode===null){var b=eo,C=u.contextType;typeof C=="object"&&C!==null&&(b=an(C)),b=new u(m,b),o.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Ux,o.stateNode=b,b._reactInternals=o,b=o.stateNode,b.props=m,b.state=o.memoizedState,b.refs={},yx(o),C=u.contextType,b.context=typeof C=="object"&&C!==null?an(C):eo,b.state=o.memoizedState,C=u.getDerivedStateFromProps,typeof C=="function"&&(qx(o,u,C,m),b.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(C=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),C!==b.state&&Ux.enqueueReplaceState(b,b.state,null),oc(o,m,b,g),sc(),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308),m=!0}else if(a===null){b=o.stateNode;var P=o.memoizedProps,q=as(u,P);b.props=q;var Z=b.context,ne=u.contextType;C=eo,typeof ne=="object"&&ne!==null&&(C=an(ne));var oe=u.getDerivedStateFromProps;ne=typeof oe=="function"||typeof b.getSnapshotBeforeUpdate=="function",P=o.pendingProps!==P,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P||Z!==C)&&AA(o,b,m,C),ri=!1;var J=o.memoizedState;b.state=J,oc(o,m,b,g),sc(),Z=o.memoizedState,P||J!==Z||ri?(typeof oe=="function"&&(qx(o,u,oe,m),Z=o.memoizedState),(q=ri||NA(o,u,q,m,J,Z,C))?(ne||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=m,o.memoizedState=Z),b.props=m,b.state=Z,b.context=C,m=q):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),m=!1)}else{b=o.stateNode,gx(a,o),C=o.memoizedProps,ne=as(u,C),b.props=ne,oe=o.pendingProps,J=b.context,Z=u.contextType,q=eo,typeof Z=="object"&&Z!==null&&(q=an(Z)),P=u.getDerivedStateFromProps,(Z=typeof P=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C!==oe||J!==q)&&AA(o,b,m,q),ri=!1,J=o.memoizedState,b.state=J,oc(o,m,b,g),sc();var ee=o.memoizedState;C!==oe||J!==ee||ri||a!==null&&a.dependencies!==null&&Dd(a.dependencies)?(typeof P=="function"&&(qx(o,u,P,m),ee=o.memoizedState),(ne=ri||NA(o,u,ne,m,J,ee,q)||a!==null&&a.dependencies!==null&&Dd(a.dependencies))?(Z||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(m,ee,q),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(m,ee,q)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=1024),o.memoizedProps=m,o.memoizedState=ee),b.props=m,b.state=ee,b.context=q,m=ne):(typeof b.componentDidUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&J===a.memoizedState||(o.flags|=1024),m=!1)}return b=m,ef(a,o),m=(o.flags&128)!==0,b||m?(b=o.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:b.render(),o.flags|=1,a!==null&&m?(o.child=ns(o,a.child,null,g),o.child=ns(o,null,u,g)):sn(a,o,u,g),o.memoizedState=b.state,a=o.child):a=ya(a,o,g),a}function IA(a,o,u,m){return Wi(),o.flags|=256,sn(a,o,u,m),o.child}var Gx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kx(a){return{baseLanes:a,cachePool:EN()}}function Yx(a,o,u){return a=a!==null?a.childLanes&~u:0,o&&(a|=Hn),a}function qA(a,o,u){var m=o.pendingProps,g=!1,b=(o.flags&128)!==0,C;if((C=b)||(C=a!==null&&a.memoizedState===null?!1:(Dt.current&2)!==0),C&&(g=!0,o.flags&=-129),C=(o.flags&32)!==0,o.flags&=-33,a===null){if(Fe){if(g?si(o):oi(),(a=vt)?(a=X_(a,or),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ja!==null?{id:Vr,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},u=bN(a),u.return=o,o.child=u,rn=o,vt=null)):a=null,a===null)throw ti(o);return Cy(a)?o.lanes=32:o.lanes=536870912,null}var P=m.children;return m=m.fallback,g?(oi(),g=o.mode,P=tf({mode:"hidden",children:P},g),m=Xi(m,g,u,null),P.return=o,m.return=o,P.sibling=m,o.child=P,m=o.child,m.memoizedState=Kx(u),m.childLanes=Yx(a,C,u),o.memoizedState=Gx,fc(null,m)):(si(o),Xx(o,P))}var q=a.memoizedState;if(q!==null&&(P=q.dehydrated,P!==null)){if(b)o.flags&256?(si(o),o.flags&=-257,o=Wx(a,o,u)):o.memoizedState!==null?(oi(),o.child=a.child,o.flags|=128,o=null):(oi(),P=m.fallback,g=o.mode,m=tf({mode:"visible",children:m.children},g),P=Xi(P,g,u,null),P.flags|=2,m.return=o,P.return=o,m.sibling=P,o.child=m,ns(o,a.child,null,u),m=o.child,m.memoizedState=Kx(u),m.childLanes=Yx(a,C,u),o.memoizedState=Gx,o=fc(null,m));else if(si(o),Cy(P)){if(C=P.nextSibling&&P.nextSibling.dataset,C)var Z=C.dgst;C=Z,m=Error(r(419)),m.stack="",m.digest=C,ec({value:m,source:null,stack:null}),o=Wx(a,o,u)}else if(Bt||ao(a,o,u,!1),C=(u&a.childLanes)!==0,Bt||C){if(C=dt,C!==null&&(m=O2(C,u),m!==0&&m!==q.retryLane))throw q.retryLane=m,Yi(a,m),kn(C,a,m),Hx;Ey(P)||df(),o=Wx(a,o,u)}else Ey(P)?(o.flags|=192,o.child=a.child,o=null):(a=q.treeContext,vt=cr(P.nextSibling),rn=o,Fe=!0,ei=null,or=!1,a!==null&&SN(o,a),o=Xx(o,m.children),o.flags|=4096);return o}return g?(oi(),P=m.fallback,g=o.mode,q=a.child,Z=q.sibling,m=da(q,{mode:"hidden",children:m.children}),m.subtreeFlags=q.subtreeFlags&65011712,Z!==null?P=da(Z,P):(P=Xi(P,g,u,null),P.flags|=2),P.return=o,m.return=o,m.sibling=P,o.child=m,fc(null,m),m=o.child,P=a.child.memoizedState,P===null?P=Kx(u):(g=P.cachePool,g!==null?(q=Lt._currentValue,g=g.parent!==q?{parent:q,pool:q}:g):g=EN(),P={baseLanes:P.baseLanes|u,cachePool:g}),m.memoizedState=P,m.childLanes=Yx(a,C,u),o.memoizedState=Gx,fc(a.child,m)):(si(o),u=a.child,a=u.sibling,u=da(u,{mode:"visible",children:m.children}),u.return=o,u.sibling=null,a!==null&&(C=o.deletions,C===null?(o.deletions=[a],o.flags|=16):C.push(a)),o.child=u,o.memoizedState=null,u)}function Xx(a,o){return o=tf({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function tf(a,o){return a=In(22,a,null,o),a.lanes=0,a}function Wx(a,o,u){return ns(o,a.child,null,u),a=Xx(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function UA(a,o,u){a.lanes|=o;var m=a.alternate;m!==null&&(m.lanes|=o),dx(a.return,o,u)}function Zx(a,o,u,m,g,b){var C=a.memoizedState;C===null?a.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:g,treeForkCount:b}:(C.isBackwards=o,C.rendering=null,C.renderingStartTime=0,C.last=m,C.tail=u,C.tailMode=g,C.treeForkCount=b)}function VA(a,o,u){var m=o.pendingProps,g=m.revealOrder,b=m.tail;m=m.children;var C=Dt.current,P=(C&2)!==0;if(P?(C=C&1|2,o.flags|=128):C&=1,ae(Dt,C),sn(a,o,m,u),m=Fe?Jl:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&UA(a,u,o);else if(a.tag===19)UA(a,u,o);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=o.child,g=null;u!==null;)a=u.alternate,a!==null&&Vd(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),Zx(o,!1,g,u,b,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(a=g.alternate,a!==null&&Vd(a)===null){o.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}Zx(o,!0,u,null,b,m);break;case"together":Zx(o,!1,null,null,void 0,m);break;default:o.memoizedState=null}return o.child}function ya(a,o,u){if(a!==null&&(o.dependencies=a.dependencies),ui|=o.lanes,(u&o.childLanes)===0)if(a!==null){if(ao(a,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(a!==null&&o.child!==a.child)throw Error(r(153));if(o.child!==null){for(a=o.child,u=da(a,a.pendingProps),o.child=u,u.return=o;a.sibling!==null;)a=a.sibling,u=u.sibling=da(a,a.pendingProps),u.return=o;u.sibling=null}return o.child}function Qx(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&Dd(a)))}function B$(a,o,u){switch(o.tag){case 3:et(o,o.stateNode.containerInfo),ni(o,Lt,a.memoizedState.cache),Wi();break;case 27:case 5:Oe(o);break;case 4:et(o,o.stateNode.containerInfo);break;case 10:ni(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Sx(o),null;break;case 13:var m=o.memoizedState;if(m!==null)return m.dehydrated!==null?(si(o),o.flags|=128,null):(u&o.child.childLanes)!==0?qA(a,o,u):(si(o),a=ya(a,o,u),a!==null?a.sibling:null);si(o);break;case 19:var g=(a.flags&128)!==0;if(m=(u&o.childLanes)!==0,m||(ao(a,o,u,!1),m=(u&o.childLanes)!==0),g){if(m)return VA(a,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ae(Dt,Dt.current),m)break;return null;case 22:return o.lanes=0,DA(a,o,u,o.pendingProps);case 24:ni(o,Lt,a.memoizedState.cache)}return ya(a,o,u)}function HA(a,o,u){if(a!==null)if(a.memoizedProps!==o.pendingProps)Bt=!0;else{if(!Qx(a,u)&&(o.flags&128)===0)return Bt=!1,B$(a,o,u);Bt=(a.flags&131072)!==0}else Bt=!1,Fe&&(o.flags&1048576)!==0&&wN(o,Jl,o.index);switch(o.lanes=0,o.tag){case 16:e:{var m=o.pendingProps;if(a=es(o.elementType),o.type=a,typeof a=="function")rx(a)?(m=as(a,m),o.tag=1,o=BA(null,o,a,m,u)):(o.tag=0,o=Fx(null,o,a,m,u));else{if(a!=null){var g=a.$$typeof;if(g===T){o.tag=11,o=kA(null,o,a,m,u);break e}else if(g===k){o.tag=14,o=PA(null,o,a,m,u);break e}}throw o=Y(a)||a,Error(r(306,o,""))}}return o;case 0:return Fx(a,o,o.type,o.pendingProps,u);case 1:return m=o.type,g=as(m,o.pendingProps),BA(a,o,m,g,u);case 3:e:{if(et(o,o.stateNode.containerInfo),a===null)throw Error(r(387));m=o.pendingProps;var b=o.memoizedState;g=b.element,gx(a,o),oc(o,m,null,u);var C=o.memoizedState;if(m=C.cache,ni(o,Lt,m),m!==b.cache&&fx(o,[Lt],u,!0),sc(),m=C.element,b.isDehydrated)if(b={element:m,isDehydrated:!1,cache:C.cache},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){o=IA(a,o,m,u);break e}else if(m!==g){g=ar(Error(r(424)),o),ec(g),o=IA(a,o,m,u);break e}else{switch(a=o.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(vt=cr(a.firstChild),rn=o,Fe=!0,ei=null,or=!0,u=DN(o,null,m,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Wi(),m===g){o=ya(a,o,u);break e}sn(a,o,m,u)}o=o.child}return o;case 26:return ef(a,o),a===null?(u=tO(o.type,null,o.pendingProps,null))?o.memoizedState=u:Fe||(u=o.type,a=o.pendingProps,m=gf(we.current).createElement(u),m[nn]=o,m[_n]=a,on(m,u,a),Zt(m),o.stateNode=m):o.memoizedState=tO(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return Oe(o),a===null&&Fe&&(m=o.stateNode=Q_(o.type,o.pendingProps,we.current),rn=o,or=!0,g=vt,pi(o.type)?(My=g,vt=cr(m.firstChild)):vt=g),sn(a,o,o.pendingProps.children,u),ef(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&Fe&&((g=m=vt)&&(m=pB(m,o.type,o.pendingProps,or),m!==null?(o.stateNode=m,rn=o,vt=cr(m.firstChild),or=!1,g=!0):g=!1),g||ti(o)),Oe(o),g=o.type,b=o.pendingProps,C=a!==null?a.memoizedProps:null,m=b.children,_y(g,b)?m=null:C!==null&&_y(g,C)&&(o.flags|=32),o.memoizedState!==null&&(g=Ax(a,o,C$,null,null,u),Oc._currentValue=g),ef(a,o),sn(a,o,m,u),o.child;case 6:return a===null&&Fe&&((a=u=vt)&&(u=xB(u,o.pendingProps,or),u!==null?(o.stateNode=u,rn=o,vt=null,a=!0):a=!1),a||ti(o)),null;case 13:return qA(a,o,u);case 4:return et(o,o.stateNode.containerInfo),m=o.pendingProps,a===null?o.child=ns(o,null,m,u):sn(a,o,m,u),o.child;case 11:return kA(a,o,o.type,o.pendingProps,u);case 7:return sn(a,o,o.pendingProps,u),o.child;case 8:return sn(a,o,o.pendingProps.children,u),o.child;case 12:return sn(a,o,o.pendingProps.children,u),o.child;case 10:return m=o.pendingProps,ni(o,o.type,m.value),sn(a,o,m.children,u),o.child;case 9:return g=o.type._context,m=o.pendingProps.children,Qi(o),g=an(g),m=m(g),o.flags|=1,sn(a,o,m,u),o.child;case 14:return PA(a,o,o.type,o.pendingProps,u);case 15:return RA(a,o,o.type,o.pendingProps,u);case 19:return VA(a,o,u);case 31:return $$(a,o,u);case 22:return DA(a,o,u,o.pendingProps);case 24:return Qi(o),m=an(Lt),a===null?(g=px(),g===null&&(g=dt,b=hx(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),o.memoizedState={parent:m,cache:g},yx(o),ni(o,Lt,g)):((a.lanes&u)!==0&&(gx(a,o),oc(o,null,null,u),sc()),g=a.memoizedState,b=o.memoizedState,g.parent!==m?(g={parent:m,cache:m},o.memoizedState=g,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=g),ni(o,Lt,m)):(m=b.cache,ni(o,Lt,m),m!==g.cache&&fx(o,[Lt],u,!0))),sn(a,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function ga(a){a.flags|=4}function Jx(a,o,u,m,g){if((o=(a.mode&32)!==0)&&(o=!1),o){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if(y_())a.flags|=8192;else throw ts=Bd,xx}else a.flags&=-16777217}function FA(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!sO(o))if(y_())a.flags|=8192;else throw ts=Bd,xx}function nf(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?N2():536870912,a.lanes|=o,yo|=o)}function hc(a,o){if(!Fe)switch(a.tailMode){case"hidden":o=a.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?o||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function bt(a){var o=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(o)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags&65011712,m|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags,m|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=m,a.childLanes=u,o}function I$(a,o,u){var m=o.pendingProps;switch(ox(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(o),null;case 1:return bt(o),null;case 3:return u=o.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),o.memoizedState.cache!==m&&(o.flags|=2048),ma(Lt),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(ro(o)?ga(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,cx())),bt(o),null;case 26:var g=o.type,b=o.memoizedState;return a===null?(ga(o),b!==null?(bt(o),FA(o,b)):(bt(o),Jx(o,g,null,m,u))):b?b!==a.memoizedState?(ga(o),bt(o),FA(o,b)):(bt(o),o.flags&=-16777217):(a=a.memoizedProps,a!==m&&ga(o),bt(o),Jx(o,g,a,m,u)),null;case 27:if(ke(o),u=we.current,g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&ga(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}a=fe.current,ro(o)?NN(o):(a=Q_(g,m,u),o.stateNode=a,ga(o))}return bt(o),null;case 5:if(ke(o),g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&ga(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}if(b=fe.current,ro(o))NN(o);else{var C=gf(we.current);switch(b){case 1:b=C.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:b=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":b=C.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":b=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":b=C.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof m.is=="string"?C.createElement("select",{is:m.is}):C.createElement("select"),m.multiple?b.multiple=!0:m.size&&(b.size=m.size);break;default:b=typeof m.is=="string"?C.createElement(g,{is:m.is}):C.createElement(g)}}b[nn]=o,b[_n]=m;e:for(C=o.child;C!==null;){if(C.tag===5||C.tag===6)b.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===o)break e;for(;C.sibling===null;){if(C.return===null||C.return===o)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}o.stateNode=b;e:switch(on(b,g,m),g){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&ga(o)}}return bt(o),Jx(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,u),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==m&&ga(o);else{if(typeof m!="string"&&o.stateNode===null)throw Error(r(166));if(a=we.current,ro(o)){if(a=o.stateNode,u=o.memoizedProps,m=null,g=rn,g!==null)switch(g.tag){case 27:case 5:m=g.memoizedProps}a[nn]=o,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||q_(a.nodeValue,u)),a||ti(o,!0)}else a=gf(a).createTextNode(m),a[nn]=o,o.stateNode=a}return bt(o),null;case 31:if(u=o.memoizedState,a===null||a.memoizedState!==null){if(m=ro(o),u!==null){if(a===null){if(!m)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[nn]=o}else Wi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),a=!1}else u=cx(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return o.flags&256?(Un(o),o):(Un(o),null);if((o.flags&128)!==0)throw Error(r(558))}return bt(o),null;case 13:if(m=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=ro(o),m!==null&&m.dehydrated!==null){if(a===null){if(!g)throw Error(r(318));if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[nn]=o}else Wi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),g=!1}else g=cx(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return o.flags&256?(Un(o),o):(Un(o),null)}return Un(o),(o.flags&128)!==0?(o.lanes=u,o):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=o.child,g=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(g=m.alternate.memoizedState.cachePool.pool),b=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(b=m.memoizedState.cachePool.pool),b!==g&&(m.flags|=2048)),u!==a&&u&&(o.child.flags|=8192),nf(o,o.updateQueue),bt(o),null);case 4:return de(),a===null&&jy(o.stateNode.containerInfo),bt(o),null;case 10:return ma(o.type),bt(o),null;case 19:if(G(Dt),m=o.memoizedState,m===null)return bt(o),null;if(g=(o.flags&128)!==0,b=m.rendering,b===null)if(g)hc(m,!1);else{if(Mt!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(b=Vd(a),b!==null){for(o.flags|=128,hc(m,!1),a=b.updateQueue,o.updateQueue=a,nf(o,a),o.subtreeFlags=0,a=u,u=o.child;u!==null;)vN(u,a),u=u.sibling;return ae(Dt,Dt.current&1|2),Fe&&fa(o,m.treeForkCount),o.child}a=a.sibling}m.tail!==null&&pn()>lf&&(o.flags|=128,g=!0,hc(m,!1),o.lanes=4194304)}else{if(!g)if(a=Vd(b),a!==null){if(o.flags|=128,g=!0,a=a.updateQueue,o.updateQueue=a,nf(o,a),hc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!Fe)return bt(o),null}else 2*pn()-m.renderingStartTime>lf&&u!==536870912&&(o.flags|=128,g=!0,hc(m,!1),o.lanes=4194304);m.isBackwards?(b.sibling=o.child,o.child=b):(a=m.last,a!==null?a.sibling=b:o.child=b,m.last=b)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=pn(),a.sibling=null,u=Dt.current,ae(Dt,g?u&1|2:u&1),Fe&&fa(o,m.treeForkCount),a):(bt(o),null);case 22:case 23:return Un(o),wx(),m=o.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(o.flags|=8192):m&&(o.flags|=8192),m?(u&536870912)!==0&&(o.flags&128)===0&&(bt(o),o.subtreeFlags&6&&(o.flags|=8192)):bt(o),u=o.updateQueue,u!==null&&nf(o,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==u&&(o.flags|=2048),a!==null&&G(Ji),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),ma(Lt),bt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function q$(a,o){switch(ox(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return ma(Lt),de(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return ke(o),null;case 31:if(o.memoizedState!==null){if(Un(o),o.alternate===null)throw Error(r(340));Wi()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(Un(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Wi()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return G(Dt),null;case 4:return de(),null;case 10:return ma(o.type),null;case 22:case 23:return Un(o),wx(),a!==null&&G(Ji),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return ma(Lt),null;case 25:return null;default:return null}}function GA(a,o){switch(ox(o),o.tag){case 3:ma(Lt),de();break;case 26:case 27:case 5:ke(o);break;case 4:de();break;case 31:o.memoizedState!==null&&Un(o);break;case 13:Un(o);break;case 19:G(Dt);break;case 10:ma(o.type);break;case 22:case 23:Un(o),wx(),a!==null&&G(Ji);break;case 24:ma(Lt)}}function mc(a,o){try{var u=o.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&a)===a){m=void 0;var b=u.create,C=u.inst;m=b(),C.destroy=m}u=u.next}while(u!==g)}}catch(P){at(o,o.return,P)}}function li(a,o,u){try{var m=o.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var b=g.next;m=b;do{if((m.tag&a)===a){var C=m.inst,P=C.destroy;if(P!==void 0){C.destroy=void 0,g=o;var q=u,Z=P;try{Z()}catch(ne){at(g,q,ne)}}}m=m.next}while(m!==b)}}catch(ne){at(o,o.return,ne)}}function KA(a){var o=a.updateQueue;if(o!==null){var u=a.stateNode;try{LN(o,u)}catch(m){at(a,a.return,m)}}}function YA(a,o,u){u.props=as(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){at(a,o,m)}}function pc(a,o){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof u=="function"?a.refCleanup=u(m):u.current=m}}catch(g){at(a,o,g)}}function Fr(a,o){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(g){at(a,o,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){at(a,o,g)}else u.current=null}function XA(a){var o=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(g){at(a,a.return,g)}}function ey(a,o,u){try{var m=a.stateNode;cB(m,a.type,u,o),m[_n]=o}catch(g){at(a,a.return,g)}}function WA(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&pi(a.type)||a.tag===4}function ty(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||WA(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&&pi(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 ny(a,o,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(a),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=ca));else if(m!==4&&(m===27&&pi(a.type)&&(u=a.stateNode,o=null),a=a.child,a!==null))for(ny(a,o,u),a=a.sibling;a!==null;)ny(a,o,u),a=a.sibling}function rf(a,o,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,o?u.insertBefore(a,o):u.appendChild(a);else if(m!==4&&(m===27&&pi(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(rf(a,o,u),a=a.sibling;a!==null;)rf(a,o,u),a=a.sibling}function ZA(a){var o=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,g=o.attributes;g.length;)o.removeAttributeNode(g[0]);on(o,m,u),o[nn]=a,o[_n]=u}catch(b){at(a,a.return,b)}}var va=!1,It=!1,ry=!1,QA=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function U$(a,o){if(a=a.containerInfo,Ny=Af,a=uN(a),Wp(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var g=m.anchorOffset,b=m.focusNode;m=m.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var C=0,P=-1,q=-1,Z=0,ne=0,oe=a,J=null;t:for(;;){for(var ee;oe!==u||g!==0&&oe.nodeType!==3||(P=C+g),oe!==b||m!==0&&oe.nodeType!==3||(q=C+m),oe.nodeType===3&&(C+=oe.nodeValue.length),(ee=oe.firstChild)!==null;)J=oe,oe=ee;for(;;){if(oe===a)break t;if(J===u&&++Z===g&&(P=C),J===b&&++ne===m&&(q=C),(ee=oe.nextSibling)!==null)break;oe=J,J=oe.parentNode}oe=ee}u=P===-1||q===-1?null:{start:P,end:q}}else u=null}u=u||{start:0,end:0}}else u=null;for(Ay={focusedElem:a,selectionRange:u},Af=!1,Qt=o;Qt!==null;)if(o=Qt,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,Qt=a;else for(;Qt!==null;){switch(o=Qt,b=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=o,g=b.memoizedProps,b=b.memoizedState,m=u.stateNode;try{var pe=as(u.type,g);a=m.getSnapshotBeforeUpdate(pe,b),m.__reactInternalSnapshotBeforeUpdate=a}catch(Se){at(u,u.return,Se)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,u=a.nodeType,u===9)Ty(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Ty(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=o.sibling,a!==null){a.return=o.return,Qt=a;break}Qt=o.return}}function JA(a,o,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:ja(a,u),m&4&&mc(5,u);break;case 1:if(ja(a,u),m&4)if(a=u.stateNode,o===null)try{a.componentDidMount()}catch(C){at(u,u.return,C)}else{var g=as(u.type,o.memoizedProps);o=o.memoizedState;try{a.componentDidUpdate(g,o,a.__reactInternalSnapshotBeforeUpdate)}catch(C){at(u,u.return,C)}}m&64&&KA(u),m&512&&pc(u,u.return);break;case 3:if(ja(a,u),m&64&&(a=u.updateQueue,a!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{LN(a,o)}catch(C){at(u,u.return,C)}}break;case 27:o===null&&m&4&&ZA(u);case 26:case 5:ja(a,u),o===null&&m&4&&XA(u),m&512&&pc(u,u.return);break;case 12:ja(a,u);break;case 31:ja(a,u),m&4&&n_(a,u);break;case 13:ja(a,u),m&4&&r_(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=Z$.bind(null,u),yB(a,u))));break;case 22:if(m=u.memoizedState!==null||va,!m){o=o!==null&&o.memoizedState!==null||It,g=va;var b=It;va=m,(It=o)&&!b?wa(a,u,(u.subtreeFlags&8772)!==0):ja(a,u),va=g,It=b}break;case 30:break;default:ja(a,u)}}function e_(a){var o=a.alternate;o!==null&&(a.alternate=null,e_(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&Pp(o)),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 Nt=null,Tn=!1;function ba(a,o,u){for(u=u.child;u!==null;)t_(a,o,u),u=u.sibling}function t_(a,o,u){if(Ln&&typeof Ln.onCommitFiberUnmount=="function")try{Ln.onCommitFiberUnmount(Bl,u)}catch{}switch(u.tag){case 26:It||Fr(u,o),ba(a,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:It||Fr(u,o);var m=Nt,g=Tn;pi(u.type)&&(Nt=u.stateNode,Tn=!1),ba(a,o,u),Nc(u.stateNode),Nt=m,Tn=g;break;case 5:It||Fr(u,o);case 6:if(m=Nt,g=Tn,Nt=null,ba(a,o,u),Nt=m,Tn=g,Nt!==null)if(Tn)try{(Nt.nodeType===9?Nt.body:Nt.nodeName==="HTML"?Nt.ownerDocument.body:Nt).removeChild(u.stateNode)}catch(b){at(u,o,b)}else try{Nt.removeChild(u.stateNode)}catch(b){at(u,o,b)}break;case 18:Nt!==null&&(Tn?(a=Nt,K_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Ao(a)):K_(Nt,u.stateNode));break;case 4:m=Nt,g=Tn,Nt=u.stateNode.containerInfo,Tn=!0,ba(a,o,u),Nt=m,Tn=g;break;case 0:case 11:case 14:case 15:li(2,u,o),It||li(4,u,o),ba(a,o,u);break;case 1:It||(Fr(u,o),m=u.stateNode,typeof m.componentWillUnmount=="function"&&YA(u,o,m)),ba(a,o,u);break;case 21:ba(a,o,u);break;case 22:It=(m=It)||u.memoizedState!==null,ba(a,o,u),It=m;break;default:ba(a,o,u)}}function n_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Ao(a)}catch(u){at(o,o.return,u)}}}function r_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ao(a)}catch(u){at(o,o.return,u)}}function V$(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new QA),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new QA),o;default:throw Error(r(435,a.tag))}}function af(a,o){var u=V$(a);o.forEach(function(m){if(!u.has(m)){u.add(m);var g=Q$.bind(null,a,m);m.then(g,g)}})}function En(a,o){var u=o.deletions;if(u!==null)for(var m=0;m<u.length;m++){var g=u[m],b=a,C=o,P=C;e:for(;P!==null;){switch(P.tag){case 27:if(pi(P.type)){Nt=P.stateNode,Tn=!1;break e}break;case 5:Nt=P.stateNode,Tn=!1;break e;case 3:case 4:Nt=P.stateNode.containerInfo,Tn=!0;break e}P=P.return}if(Nt===null)throw Error(r(160));t_(b,C,g),Nt=null,Tn=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)a_(o,a),o=o.sibling}var Tr=null;function a_(a,o){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:En(o,a),Cn(a),m&4&&(li(3,a,a.return),mc(3,a),li(5,a,a.return));break;case 1:En(o,a),Cn(a),m&512&&(It||u===null||Fr(u,u.return)),m&64&&va&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var g=Tr;if(En(o,a),Cn(a),m&512&&(It||u===null||Fr(u,u.return)),m&4){var b=u!==null?u.memoizedState:null;if(m=a.memoizedState,u===null)if(m===null)if(a.stateNode===null){e:{m=a.type,u=a.memoizedProps,g=g.ownerDocument||g;t:switch(m){case"title":b=g.getElementsByTagName("title")[0],(!b||b[Ul]||b[nn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(m),g.head.insertBefore(b,g.querySelector("head > title"))),on(b,m,u),b[nn]=a,Zt(b),m=b;break e;case"link":var C=aO("link","href",g).get(m+(u.href||""));if(C){for(var P=0;P<C.length;P++)if(b=C[P],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){C.splice(P,1);break t}}b=g.createElement(m),on(b,m,u),g.head.appendChild(b);break;case"meta":if(C=aO("meta","content",g).get(m+(u.content||""))){for(P=0;P<C.length;P++)if(b=C[P],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){C.splice(P,1);break t}}b=g.createElement(m),on(b,m,u),g.head.appendChild(b);break;default:throw Error(r(468,m))}b[nn]=a,Zt(b),m=b}a.stateNode=m}else iO(g,a.type,a.stateNode);else a.stateNode=rO(g,m,a.memoizedProps);else b!==m?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,m===null?iO(g,a.type,a.stateNode):rO(g,m,a.memoizedProps)):m===null&&a.stateNode!==null&&ey(a,a.memoizedProps,u.memoizedProps)}break;case 27:En(o,a),Cn(a),m&512&&(It||u===null||Fr(u,u.return)),u!==null&&m&4&&ey(a,a.memoizedProps,u.memoizedProps);break;case 5:if(En(o,a),Cn(a),m&512&&(It||u===null||Fr(u,u.return)),a.flags&32){g=a.stateNode;try{Ks(g,"")}catch(pe){at(a,a.return,pe)}}m&4&&a.stateNode!=null&&(g=a.memoizedProps,ey(a,g,u!==null?u.memoizedProps:g)),m&1024&&(ry=!0);break;case 6:if(En(o,a),Cn(a),m&4){if(a.stateNode===null)throw Error(r(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(pe){at(a,a.return,pe)}}break;case 3:if(jf=null,g=Tr,Tr=vf(o.containerInfo),En(o,a),Tr=g,Cn(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Ao(o.containerInfo)}catch(pe){at(a,a.return,pe)}ry&&(ry=!1,i_(a));break;case 4:m=Tr,Tr=vf(a.stateNode.containerInfo),En(o,a),Cn(a),Tr=m;break;case 12:En(o,a),Cn(a);break;case 31:En(o,a),Cn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,af(a,m)));break;case 13:En(o,a),Cn(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(of=pn()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,af(a,m)));break;case 22:g=a.memoizedState!==null;var q=u!==null&&u.memoizedState!==null,Z=va,ne=It;if(va=Z||g,It=ne||q,En(o,a),It=ne,va=Z,Cn(a),m&8192)e:for(o=a.stateNode,o._visibility=g?o._visibility&-2:o._visibility|1,g&&(u===null||q||va||It||is(a)),u=null,o=a;;){if(o.tag===5||o.tag===26){if(u===null){q=u=o;try{if(b=q.stateNode,g)C=b.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{P=q.stateNode;var oe=q.memoizedProps.style,J=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;P.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(pe){at(q,q.return,pe)}}}else if(o.tag===6){if(u===null){q=o;try{q.stateNode.nodeValue=g?"":q.memoizedProps}catch(pe){at(q,q.return,pe)}}}else if(o.tag===18){if(u===null){q=o;try{var ee=q.stateNode;g?Y_(ee,!0):Y_(q.stateNode,!1)}catch(pe){at(q,q.return,pe)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===a)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,af(a,u))));break;case 19:En(o,a),Cn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,af(a,m)));break;case 30:break;case 21:break;default:En(o,a),Cn(a)}}function Cn(a){var o=a.flags;if(o&2){try{for(var u,m=a.return;m!==null;){if(WA(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,b=ty(a);rf(a,b,g);break;case 5:var C=u.stateNode;u.flags&32&&(Ks(C,""),u.flags&=-33);var P=ty(a);rf(a,P,C);break;case 3:case 4:var q=u.stateNode.containerInfo,Z=ty(a);ny(a,Z,q);break;default:throw Error(r(161))}}catch(ne){at(a,a.return,ne)}a.flags&=-3}o&4096&&(a.flags&=-4097)}function i_(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;i_(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function ja(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)JA(a,o.alternate,o),o=o.sibling}function is(a){for(a=a.child;a!==null;){var o=a;switch(o.tag){case 0:case 11:case 14:case 15:li(4,o,o.return),is(o);break;case 1:Fr(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&YA(o,o.return,u),is(o);break;case 27:Nc(o.stateNode);case 26:case 5:Fr(o,o.return),is(o);break;case 22:o.memoizedState===null&&is(o);break;case 30:is(o);break;default:is(o)}a=a.sibling}}function wa(a,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var m=o.alternate,g=a,b=o,C=b.flags;switch(b.tag){case 0:case 11:case 15:wa(g,b,u),mc(4,b);break;case 1:if(wa(g,b,u),m=b,g=m.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Z){at(m,m.return,Z)}if(m=b,g=m.updateQueue,g!==null){var P=m.stateNode;try{var q=g.shared.hiddenCallbacks;if(q!==null)for(g.shared.hiddenCallbacks=null,g=0;g<q.length;g++)zN(q[g],P)}catch(Z){at(m,m.return,Z)}}u&&C&64&&KA(b),pc(b,b.return);break;case 27:ZA(b);case 26:case 5:wa(g,b,u),u&&m===null&&C&4&&XA(b),pc(b,b.return);break;case 12:wa(g,b,u);break;case 31:wa(g,b,u),u&&C&4&&n_(g,b);break;case 13:wa(g,b,u),u&&C&4&&r_(g,b);break;case 22:b.memoizedState===null&&wa(g,b,u),pc(b,b.return);break;case 30:break;default:wa(g,b,u)}o=o.sibling}}function ay(a,o){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&tc(u))}function iy(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&tc(a))}function Er(a,o,u,m){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)s_(a,o,u,m),o=o.sibling}function s_(a,o,u,m){var g=o.flags;switch(o.tag){case 0:case 11:case 15:Er(a,o,u,m),g&2048&&mc(9,o);break;case 1:Er(a,o,u,m);break;case 3:Er(a,o,u,m),g&2048&&(a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&tc(a)));break;case 12:if(g&2048){Er(a,o,u,m),a=o.stateNode;try{var b=o.memoizedProps,C=b.id,P=b.onPostCommit;typeof P=="function"&&P(C,o.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(q){at(o,o.return,q)}}else Er(a,o,u,m);break;case 31:Er(a,o,u,m);break;case 13:Er(a,o,u,m);break;case 23:break;case 22:b=o.stateNode,C=o.alternate,o.memoizedState!==null?b._visibility&2?Er(a,o,u,m):xc(a,o):b._visibility&2?Er(a,o,u,m):(b._visibility|=2,mo(a,o,u,m,(o.subtreeFlags&10256)!==0||!1)),g&2048&&ay(C,o);break;case 24:Er(a,o,u,m),g&2048&&iy(o.alternate,o);break;default:Er(a,o,u,m)}}function mo(a,o,u,m,g){for(g=g&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var b=a,C=o,P=u,q=m,Z=C.flags;switch(C.tag){case 0:case 11:case 15:mo(b,C,P,q,g),mc(8,C);break;case 23:break;case 22:var ne=C.stateNode;C.memoizedState!==null?ne._visibility&2?mo(b,C,P,q,g):xc(b,C):(ne._visibility|=2,mo(b,C,P,q,g)),g&&Z&2048&&ay(C.alternate,C);break;case 24:mo(b,C,P,q,g),g&&Z&2048&&iy(C.alternate,C);break;default:mo(b,C,P,q,g)}o=o.sibling}}function xc(a,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=a,m=o,g=m.flags;switch(m.tag){case 22:xc(u,m),g&2048&&ay(m.alternate,m);break;case 24:xc(u,m),g&2048&&iy(m.alternate,m);break;default:xc(u,m)}o=o.sibling}}var yc=8192;function po(a,o,u){if(a.subtreeFlags&yc)for(a=a.child;a!==null;)o_(a,o,u),a=a.sibling}function o_(a,o,u){switch(a.tag){case 26:po(a,o,u),a.flags&yc&&a.memoizedState!==null&&EB(u,Tr,a.memoizedState,a.memoizedProps);break;case 5:po(a,o,u);break;case 3:case 4:var m=Tr;Tr=vf(a.stateNode.containerInfo),po(a,o,u),Tr=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=yc,yc=16777216,po(a,o,u),yc=m):po(a,o,u));break;default:po(a,o,u)}}function l_(a){var o=a.alternate;if(o!==null&&(a=o.child,a!==null)){o.child=null;do o=a.sibling,a.sibling=null,a=o;while(a!==null)}}function gc(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Qt=m,u_(m,a)}l_(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)c_(a),a=a.sibling}function c_(a){switch(a.tag){case 0:case 11:case 15:gc(a),a.flags&2048&&li(9,a,a.return);break;case 3:gc(a);break;case 12:gc(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,sf(a)):gc(a);break;default:gc(a)}}function sf(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Qt=m,u_(m,a)}l_(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:li(8,o,o.return),sf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,sf(o));break;default:sf(o)}a=a.sibling}}function u_(a,o){for(;Qt!==null;){var u=Qt;switch(u.tag){case 0:case 11:case 15:li(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:tc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Qt=m;else e:for(u=a;Qt!==null;){m=Qt;var g=m.sibling,b=m.return;if(e_(m),m===u){Qt=null;break e}if(g!==null){g.return=b,Qt=g;break e}Qt=b}}}var H$={getCacheForType:function(a){var o=an(Lt),u=o.data.get(a);return u===void 0&&(u=a(),o.data.set(a,u)),u},cacheSignal:function(){return an(Lt).controller.signal}},F$=typeof WeakMap=="function"?WeakMap:Map,Je=0,dt=null,qe=null,Ve=0,rt=0,Vn=null,ci=!1,xo=!1,sy=!1,Sa=0,Mt=0,ui=0,ss=0,oy=0,Hn=0,yo=0,vc=null,Mn=null,ly=!1,of=0,d_=0,lf=1/0,cf=null,di=null,Ht=0,fi=null,go=null,Na=0,cy=0,uy=null,f_=null,bc=0,dy=null;function Fn(){return(Je&2)!==0&&Ve!==0?Ve&-Ve:B.T!==null?yy():T2()}function h_(){if(Hn===0)if((Ve&536870912)===0||Fe){var a=xd;xd<<=1,(xd&3932160)===0&&(xd=262144),Hn=a}else Hn=536870912;return a=qn.current,a!==null&&(a.flags|=32),Hn}function kn(a,o,u){(a===dt&&(rt===2||rt===9)||a.cancelPendingCommit!==null)&&(vo(a,0),hi(a,Ve,Hn,!1)),ql(a,u),((Je&2)===0||a!==dt)&&(a===dt&&((Je&2)===0&&(ss|=u),Mt===4&&hi(a,Ve,Hn,!1)),Gr(a))}function m_(a,o,u){if((Je&6)!==0)throw Error(r(327));var m=!u&&(o&127)===0&&(o&a.expiredLanes)===0||Il(a,o),g=m?Y$(a,o):hy(a,o,!0),b=m;do{if(g===0){xo&&!m&&hi(a,o,0,!1);break}else{if(u=a.current.alternate,b&&!G$(u)){g=hy(a,o,!1),b=!1;continue}if(g===2){if(b=o,a.errorRecoveryDisabledLanes&b)var C=0;else C=a.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){o=C;e:{var P=a;g=vc;var q=P.current.memoizedState.isDehydrated;if(q&&(vo(P,C).flags|=256),C=hy(P,C,!1),C!==2){if(sy&&!q){P.errorRecoveryDisabledLanes|=b,ss|=b,g=4;break e}b=Mn,Mn=g,b!==null&&(Mn===null?Mn=b:Mn.push.apply(Mn,b))}g=C}if(b=!1,g!==2)continue}}if(g===1){vo(a,0),hi(a,o,0,!0);break}e:{switch(m=a,b=g,b){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:hi(m,o,Hn,!ci);break e;case 2:Mn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(g=of+300-pn(),10<g)){if(hi(m,o,Hn,!ci),gd(m,0,!0)!==0)break e;Na=o,m.timeoutHandle=F_(p_.bind(null,m,u,Mn,cf,ly,o,Hn,ss,yo,ci,b,"Throttled",-0,0),g);break e}p_(m,u,Mn,cf,ly,o,Hn,ss,yo,ci,b,null,-0,0)}}break}while(!0);Gr(a)}function p_(a,o,u,m,g,b,C,P,q,Z,ne,oe,J,ee){if(a.timeoutHandle=-1,oe=o.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ca},o_(o,b,oe);var pe=(b&62914560)===b?of-pn():(b&4194048)===b?d_-pn():0;if(pe=CB(oe,pe),pe!==null){Na=b,a.cancelPendingCommit=pe(S_.bind(null,a,o,b,u,m,g,C,P,q,ne,oe,null,J,ee)),hi(a,b,C,!Z);return}}S_(a,o,b,u,m,g,C,P,q)}function G$(a){for(var o=a;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var g=u[m],b=g.getSnapshot;g=g.value;try{if(!Bn(b(),g))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function hi(a,o,u,m){o&=~oy,o&=~ss,a.suspendedLanes|=o,a.pingedLanes&=~o,m&&(a.warmLanes|=o),m=a.expirationTimes;for(var g=o;0<g;){var b=31-$n(g),C=1<<b;m[b]=-1,g&=~C}u!==0&&A2(a,u,o)}function uf(){return(Je&6)===0?(jc(0),!1):!0}function fy(){if(qe!==null){if(rt===0)var a=qe.return;else a=qe,ha=Zi=null,Tx(a),lo=null,rc=0,a=qe;for(;a!==null;)GA(a.alternate,a),a=a.return;qe=null}}function vo(a,o){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,fB(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Na=0,fy(),dt=a,qe=u=da(a.current,null),Ve=o,rt=0,Vn=null,ci=!1,xo=Il(a,o),sy=!1,yo=Hn=oy=ss=ui=Mt=0,Mn=vc=null,ly=!1,(o&8)!==0&&(o|=o&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=o;0<m;){var g=31-$n(m),b=1<<g;o|=a[g],m&=~b}return Sa=o,Cd(),u}function x_(a,o){De=null,B.H=dc,o===oo||o===$d?(o=kN(),rt=3):o===xx?(o=kN(),rt=4):rt=o===Hx?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Vn=o,qe===null&&(Mt=1,Qd(a,ar(o,a.current)))}function y_(){var a=qn.current;return a===null?!0:(Ve&4194048)===Ve?lr===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?a===lr:!1}function g_(){var a=B.H;return B.H=dc,a===null?dc:a}function v_(){var a=B.A;return B.A=H$,a}function df(){Mt=4,ci||(Ve&4194048)!==Ve&&qn.current!==null||(xo=!0),(ui&134217727)===0&&(ss&134217727)===0||dt===null||hi(dt,Ve,Hn,!1)}function hy(a,o,u){var m=Je;Je|=2;var g=g_(),b=v_();(dt!==a||Ve!==o)&&(cf=null,vo(a,o)),o=!1;var C=Mt;e:do try{if(rt!==0&&qe!==null){var P=qe,q=Vn;switch(rt){case 8:fy(),C=6;break e;case 3:case 2:case 9:case 6:qn.current===null&&(o=!0);var Z=rt;if(rt=0,Vn=null,bo(a,P,q,Z),u&&xo){C=0;break e}break;default:Z=rt,rt=0,Vn=null,bo(a,P,q,Z)}}K$(),C=Mt;break}catch(ne){x_(a,ne)}while(!0);return o&&a.shellSuspendCounter++,ha=Zi=null,Je=m,B.H=g,B.A=b,qe===null&&(dt=null,Ve=0,Cd()),C}function K$(){for(;qe!==null;)b_(qe)}function Y$(a,o){var u=Je;Je|=2;var m=g_(),g=v_();dt!==a||Ve!==o?(cf=null,lf=pn()+500,vo(a,o)):xo=Il(a,o);e:do try{if(rt!==0&&qe!==null){o=qe;var b=Vn;t:switch(rt){case 1:rt=0,Vn=null,bo(a,o,b,1);break;case 2:case 9:if(CN(b)){rt=0,Vn=null,j_(o);break}o=function(){rt!==2&&rt!==9||dt!==a||(rt=7),Gr(a)},b.then(o,o);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:CN(b)?(rt=0,Vn=null,j_(o)):(rt=0,Vn=null,bo(a,o,b,7));break;case 5:var C=null;switch(qe.tag){case 26:C=qe.memoizedState;case 5:case 27:var P=qe;if(C?sO(C):P.stateNode.complete){rt=0,Vn=null;var q=P.sibling;if(q!==null)qe=q;else{var Z=P.return;Z!==null?(qe=Z,ff(Z)):qe=null}break t}}rt=0,Vn=null,bo(a,o,b,5);break;case 6:rt=0,Vn=null,bo(a,o,b,6);break;case 8:fy(),Mt=6;break e;default:throw Error(r(462))}}X$();break}catch(ne){x_(a,ne)}while(!0);return ha=Zi=null,B.H=m,B.A=g,Je=u,qe!==null?0:(dt=null,Ve=0,Cd(),Mt)}function X$(){for(;qe!==null&&!oa();)b_(qe)}function b_(a){var o=HA(a.alternate,a,Sa);a.memoizedProps=a.pendingProps,o===null?ff(a):qe=o}function j_(a){var o=a,u=o.alternate;switch(o.tag){case 15:case 0:o=$A(u,o,o.pendingProps,o.type,void 0,Ve);break;case 11:o=$A(u,o,o.pendingProps,o.type.render,o.ref,Ve);break;case 5:Tx(o);default:GA(u,o),o=qe=vN(o,Sa),o=HA(u,o,Sa)}a.memoizedProps=a.pendingProps,o===null?ff(a):qe=o}function bo(a,o,u,m){ha=Zi=null,Tx(o),lo=null,rc=0;var g=o.return;try{if(L$(a,g,o,u,Ve)){Mt=1,Qd(a,ar(u,a.current)),qe=null;return}}catch(b){if(g!==null)throw qe=g,b;Mt=1,Qd(a,ar(u,a.current)),qe=null;return}o.flags&32768?(Fe||m===1?a=!0:xo||(Ve&536870912)!==0?a=!1:(ci=a=!0,(m===2||m===9||m===3||m===6)&&(m=qn.current,m!==null&&m.tag===13&&(m.flags|=16384))),w_(o,a)):ff(o)}function ff(a){var o=a;do{if((o.flags&32768)!==0){w_(o,ci);return}a=o.return;var u=I$(o.alternate,o,Sa);if(u!==null){qe=u;return}if(o=o.sibling,o!==null){qe=o;return}qe=o=a}while(o!==null);Mt===0&&(Mt=5)}function w_(a,o){do{var u=q$(a.alternate,a);if(u!==null){u.flags&=32767,qe=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(a=a.sibling,a!==null)){qe=a;return}qe=a=u}while(a!==null);Mt=6,qe=null}function S_(a,o,u,m,g,b,C,P,q){a.cancelPendingCommit=null;do hf();while(Ht!==0);if((Je&6)!==0)throw Error(r(327));if(o!==null){if(o===a.current)throw Error(r(177));if(b=o.lanes|o.childLanes,b|=tx,T8(a,u,b,C,P,q),a===dt&&(qe=dt=null,Ve=0),go=o,fi=a,Na=u,cy=b,uy=g,f_=m,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,J$(md,function(){return T_(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||m){m=B.T,B.T=null,g=H.p,H.p=2,C=Je,Je|=4;try{U$(a,o,u)}finally{Je=C,H.p=g,B.T=m}}Ht=1,N_(),A_(),__()}}function N_(){if(Ht===1){Ht=0;var a=fi,o=go,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=B.T,B.T=null;var m=H.p;H.p=2;var g=Je;Je|=4;try{a_(o,a);var b=Ay,C=uN(a.containerInfo),P=b.focusedElem,q=b.selectionRange;if(C!==P&&P&&P.ownerDocument&&cN(P.ownerDocument.documentElement,P)){if(q!==null&&Wp(P)){var Z=q.start,ne=q.end;if(ne===void 0&&(ne=Z),"selectionStart"in P)P.selectionStart=Z,P.selectionEnd=Math.min(ne,P.value.length);else{var oe=P.ownerDocument||document,J=oe&&oe.defaultView||window;if(J.getSelection){var ee=J.getSelection(),pe=P.textContent.length,Se=Math.min(q.start,pe),ct=q.end===void 0?Se:Math.min(q.end,pe);!ee.extend&&Se>ct&&(C=ct,ct=Se,Se=C);var X=lN(P,Se),V=lN(P,ct);if(X&&V&&(ee.rangeCount!==1||ee.anchorNode!==X.node||ee.anchorOffset!==X.offset||ee.focusNode!==V.node||ee.focusOffset!==V.offset)){var W=oe.createRange();W.setStart(X.node,X.offset),ee.removeAllRanges(),Se>ct?(ee.addRange(W),ee.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),ee.addRange(W))}}}}for(oe=[],ee=P;ee=ee.parentNode;)ee.nodeType===1&&oe.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<oe.length;P++){var se=oe[P];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Af=!!Ny,Ay=Ny=null}finally{Je=g,H.p=m,B.T=u}}a.current=o,Ht=2}}function A_(){if(Ht===2){Ht=0;var a=fi,o=go,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=B.T,B.T=null;var m=H.p;H.p=2;var g=Je;Je|=4;try{JA(a,o.alternate,o)}finally{Je=g,H.p=m,B.T=u}}Ht=3}}function __(){if(Ht===4||Ht===3){Ht=0,$l();var a=fi,o=go,u=Na,m=f_;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Ht=5:(Ht=0,go=fi=null,O_(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(di=null),Mp(u),o=o.stateNode,Ln&&typeof Ln.onCommitFiberRoot=="function")try{Ln.onCommitFiberRoot(Bl,o,void 0,(o.current.flags&128)===128)}catch{}if(m!==null){o=B.T,g=H.p,H.p=2,B.T=null;try{for(var b=a.onRecoverableError,C=0;C<m.length;C++){var P=m[C];b(P.value,{componentStack:P.stack})}}finally{B.T=o,H.p=g}}(Na&3)!==0&&hf(),Gr(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===dy?bc++:(bc=0,dy=a):bc=0,jc(0)}}function O_(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,tc(o)))}function hf(){return N_(),A_(),__(),T_()}function T_(){if(Ht!==5)return!1;var a=fi,o=cy;cy=0;var u=Mp(Na),m=B.T,g=H.p;try{H.p=32>u?32:u,B.T=null,u=uy,uy=null;var b=fi,C=Na;if(Ht=0,go=fi=null,Na=0,(Je&6)!==0)throw Error(r(331));var P=Je;if(Je|=4,c_(b.current),s_(b,b.current,C,u),Je=P,jc(0,!1),Ln&&typeof Ln.onPostCommitFiberRoot=="function")try{Ln.onPostCommitFiberRoot(Bl,b)}catch{}return!0}finally{H.p=g,B.T=m,O_(a,o)}}function E_(a,o,u){o=ar(u,o),o=Vx(a.stateNode,o,2),a=ii(a,o,2),a!==null&&(ql(a,2),Gr(a))}function at(a,o,u){if(a.tag===3)E_(a,a,u);else for(;o!==null;){if(o.tag===3){E_(o,a,u);break}else if(o.tag===1){var m=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(di===null||!di.has(m))){a=ar(u,a),u=CA(2),m=ii(o,u,2),m!==null&&(MA(u,m,o,a),ql(m,2),Gr(m));break}}o=o.return}}function my(a,o,u){var m=a.pingCache;if(m===null){m=a.pingCache=new F$;var g=new Set;m.set(o,g)}else g=m.get(o),g===void 0&&(g=new Set,m.set(o,g));g.has(u)||(sy=!0,g.add(u),a=W$.bind(null,a,o,u),o.then(a,a))}function W$(a,o,u){var m=a.pingCache;m!==null&&m.delete(o),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,dt===a&&(Ve&u)===u&&(Mt===4||Mt===3&&(Ve&62914560)===Ve&&300>pn()-of?(Je&2)===0&&vo(a,0):oy|=u,yo===Ve&&(yo=0)),Gr(a)}function C_(a,o){o===0&&(o=N2()),a=Yi(a,o),a!==null&&(ql(a,o),Gr(a))}function Z$(a){var o=a.memoizedState,u=0;o!==null&&(u=o.retryLane),C_(a,u)}function Q$(a,o){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,g=a.memoizedState;g!==null&&(u=g.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(o),C_(a,u)}function J$(a,o){return Xa(a,o)}var mf=null,jo=null,py=!1,pf=!1,xy=!1,mi=0;function Gr(a){a!==jo&&a.next===null&&(jo===null?mf=jo=a:jo=jo.next=a),pf=!0,py||(py=!0,tB())}function jc(a,o){if(!xy&&pf){xy=!0;do for(var u=!1,m=mf;m!==null;){if(a!==0){var g=m.pendingLanes;if(g===0)var b=0;else{var C=m.suspendedLanes,P=m.pingedLanes;b=(1<<31-$n(42|a)+1)-1,b&=g&~(C&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,R_(m,b))}else b=Ve,b=gd(m,m===dt?b:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(b&3)===0||Il(m,b)||(u=!0,R_(m,b));m=m.next}while(u);xy=!1}}function eB(){M_()}function M_(){pf=py=!1;var a=0;mi!==0&&dB()&&(a=mi);for(var o=pn(),u=null,m=mf;m!==null;){var g=m.next,b=k_(m,o);b===0?(m.next=null,u===null?mf=g:u.next=g,g===null&&(jo=u)):(u=m,(a!==0||(b&3)!==0)&&(pf=!0)),m=g}Ht!==0&&Ht!==5||jc(a),mi!==0&&(mi=0)}function k_(a,o){for(var u=a.suspendedLanes,m=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var C=31-$n(b),P=1<<C,q=g[C];q===-1?((P&u)===0||(P&m)!==0)&&(g[C]=O8(P,o)):q<=o&&(a.expiredLanes|=P),b&=~P}if(o=dt,u=Ve,u=gd(a,a===o?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===o&&(rt===2||rt===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&_r(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Il(a,u)){if(o=u&-u,o===a.callbackPriority)return o;switch(m!==null&&_r(m),Mp(u)){case 2:case 8:u=w2;break;case 32:u=md;break;case 268435456:u=S2;break;default:u=md}return m=P_.bind(null,a),u=Xa(u,m),a.callbackPriority=o,a.callbackNode=u,o}return m!==null&&m!==null&&_r(m),a.callbackPriority=2,a.callbackNode=null,2}function P_(a,o){if(Ht!==0&&Ht!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(hf()&&a.callbackNode!==u)return null;var m=Ve;return m=gd(a,a===dt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(m_(a,m,o),k_(a,pn()),a.callbackNode!=null&&a.callbackNode===u?P_.bind(null,a):null)}function R_(a,o){if(hf())return null;m_(a,o,!0)}function tB(){hB(function(){(Je&6)!==0?Xa(j2,eB):M_()})}function yy(){if(mi===0){var a=io;a===0&&(a=pd,pd<<=1,(pd&261888)===0&&(pd=256)),mi=a}return mi}function D_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:wd(""+a)}function z_(a,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,a.id&&u.setAttribute("form",a.id),o.parentNode.insertBefore(u,o),a=new FormData(a),u.parentNode.removeChild(u),a}function nB(a,o,u,m,g){if(o==="submit"&&u&&u.stateNode===g){var b=D_((g[_n]||null).action),C=m.submitter;C&&(o=(o=C[_n]||null)?D_(o.formAction):C.getAttribute("formAction"),o!==null&&(b=o,C=null));var P=new _d("action","action",null,m,g);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(mi!==0){var q=C?z_(g,C):new FormData(g);Lx(u,{pending:!0,data:q,method:g.method,action:b},null,q)}}else typeof b=="function"&&(P.preventDefault(),q=C?z_(g,C):new FormData(g),Lx(u,{pending:!0,data:q,method:g.method,action:b},b,q))},currentTarget:g}]})}}for(var gy=0;gy<ex.length;gy++){var vy=ex[gy],rB=vy.toLowerCase(),aB=vy[0].toUpperCase()+vy.slice(1);Or(rB,"on"+aB)}Or(hN,"onAnimationEnd"),Or(mN,"onAnimationIteration"),Or(pN,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(b$,"onTransitionRun"),Or(j$,"onTransitionStart"),Or(w$,"onTransitionCancel"),Or(xN,"onTransitionEnd"),Fs("onMouseEnter",["mouseout","mouseover"]),Fs("onMouseLeave",["mouseout","mouseover"]),Fs("onPointerEnter",["pointerout","pointerover"]),Fs("onPointerLeave",["pointerout","pointerover"]),Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wc="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(" "),iB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wc));function L_(a,o){o=(o&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],g=m.event;m=m.listeners;e:{var b=void 0;if(o)for(var C=m.length-1;0<=C;C--){var P=m[C],q=P.instance,Z=P.currentTarget;if(P=P.listener,q!==b&&g.isPropagationStopped())break e;b=P,g.currentTarget=Z;try{b(g)}catch(ne){Ed(ne)}g.currentTarget=null,b=q}else for(C=0;C<m.length;C++){if(P=m[C],q=P.instance,Z=P.currentTarget,P=P.listener,q!==b&&g.isPropagationStopped())break e;b=P,g.currentTarget=Z;try{b(g)}catch(ne){Ed(ne)}g.currentTarget=null,b=q}}}}function Ue(a,o){var u=o[kp];u===void 0&&(u=o[kp]=new Set);var m=a+"__bubble";u.has(m)||($_(o,a,2,!1),u.add(m))}function by(a,o,u){var m=0;o&&(m|=4),$_(u,a,m,o)}var xf="_reactListening"+Math.random().toString(36).slice(2);function jy(a){if(!a[xf]){a[xf]=!0,M2.forEach(function(u){u!=="selectionchange"&&(iB.has(u)||by(u,!1,a),by(u,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[xf]||(o[xf]=!0,by("selectionchange",!1,o))}}function $_(a,o,u,m){switch(hO(o)){case 2:var g=PB;break;case 8:g=RB;break;default:g=zy}u=g.bind(null,o,u,a),g=void 0,!qp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),m?g!==void 0?a.addEventListener(o,u,{capture:!0,passive:g}):a.addEventListener(o,u,!0):g!==void 0?a.addEventListener(o,u,{passive:g}):a.addEventListener(o,u,!1)}function wy(a,o,u,m,g){var b=m;if((o&1)===0&&(o&2)===0&&m!==null)e:for(;;){if(m===null)return;var C=m.tag;if(C===3||C===4){var P=m.stateNode.containerInfo;if(P===g)break;if(C===4)for(C=m.return;C!==null;){var q=C.tag;if((q===3||q===4)&&C.stateNode.containerInfo===g)return;C=C.return}for(;P!==null;){if(C=Us(P),C===null)return;if(q=C.tag,q===5||q===6||q===26||q===27){m=b=C;continue e}P=P.parentNode}}m=m.return}V2(function(){var Z=b,ne=Bp(u),oe=[];e:{var J=yN.get(a);if(J!==void 0){var ee=_d,pe=a;switch(a){case"keypress":if(Nd(u)===0)break e;case"keydown":case"keyup":ee=Q8;break;case"focusin":pe="focus",ee=Fp;break;case"focusout":pe="blur",ee=Fp;break;case"beforeblur":case"afterblur":ee=Fp;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=G2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=I8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=t$;break;case hN:case mN:case pN:ee=V8;break;case xN:ee=r$;break;case"scroll":case"scrollend":ee=$8;break;case"wheel":ee=i$;break;case"copy":case"cut":case"paste":ee=F8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Y2;break;case"toggle":case"beforetoggle":ee=o$}var Se=(o&4)!==0,ct=!Se&&(a==="scroll"||a==="scrollend"),X=Se?J!==null?J+"Capture":null:J;Se=[];for(var V=Z,W;V!==null;){var se=V;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||X===null||(se=Hl(V,X),se!=null&&Se.push(Sc(V,se,W))),ct)break;V=V.return}0<Se.length&&(J=new ee(J,pe,null,u,ne),oe.push({event:J,listeners:Se}))}}if((o&7)===0){e:{if(J=a==="mouseover"||a==="pointerover",ee=a==="mouseout"||a==="pointerout",J&&u!==$p&&(pe=u.relatedTarget||u.fromElement)&&(Us(pe)||pe[qs]))break e;if((ee||J)&&(J=ne.window===ne?ne:(J=ne.ownerDocument)?J.defaultView||J.parentWindow:window,ee?(pe=u.relatedTarget||u.toElement,ee=Z,pe=pe?Us(pe):null,pe!==null&&(ct=l(pe),Se=pe.tag,pe!==ct||Se!==5&&Se!==27&&Se!==6)&&(pe=null)):(ee=null,pe=Z),ee!==pe)){if(Se=G2,se="onMouseLeave",X="onMouseEnter",V="mouse",(a==="pointerout"||a==="pointerover")&&(Se=Y2,se="onPointerLeave",X="onPointerEnter",V="pointer"),ct=ee==null?J:Vl(ee),W=pe==null?J:Vl(pe),J=new Se(se,V+"leave",ee,u,ne),J.target=ct,J.relatedTarget=W,se=null,Us(ne)===Z&&(Se=new Se(X,V+"enter",pe,u,ne),Se.target=W,Se.relatedTarget=ct,se=Se),ct=se,ee&&pe)t:{for(Se=sB,X=ee,V=pe,W=0,se=X;se;se=Se(se))W++;se=0;for(var ve=V;ve;ve=Se(ve))se++;for(;0<W-se;)X=Se(X),W--;for(;0<se-W;)V=Se(V),se--;for(;W--;){if(X===V||V!==null&&X===V.alternate){Se=X;break t}X=Se(X),V=Se(V)}Se=null}else Se=null;ee!==null&&B_(oe,J,ee,Se,!1),pe!==null&&ct!==null&&B_(oe,ct,pe,Se,!0)}}e:{if(J=Z?Vl(Z):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var Ye=nN;else if(eN(J))if(rN)Ye=y$;else{Ye=p$;var ge=m$}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Z&&Lp(Z.elementType)&&(Ye=nN):Ye=x$;if(Ye&&(Ye=Ye(a,Z))){tN(oe,Ye,u,ne);break e}ge&&ge(a,J,Z),a==="focusout"&&Z&&J.type==="number"&&Z.memoizedProps.value!=null&&zp(J,"number",J.value)}switch(ge=Z?Vl(Z):window,a){case"focusin":(eN(ge)||ge.contentEditable==="true")&&(Zs=ge,Zp=Z,Ql=null);break;case"focusout":Ql=Zp=Zs=null;break;case"mousedown":Qp=!0;break;case"contextmenu":case"mouseup":case"dragend":Qp=!1,dN(oe,u,ne);break;case"selectionchange":if(v$)break;case"keydown":case"keyup":dN(oe,u,ne)}var $e;if(Kp)e:{switch(a){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Ws?Q2(a,u)&&(He="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(He="onCompositionStart");He&&(X2&&u.locale!=="ko"&&(Ws||He!=="onCompositionStart"?He==="onCompositionEnd"&&Ws&&($e=H2()):(Qa=ne,Up="value"in Qa?Qa.value:Qa.textContent,Ws=!0)),ge=yf(Z,He),0<ge.length&&(He=new K2(He,a,null,u,ne),oe.push({event:He,listeners:ge}),$e?He.data=$e:($e=J2(u),$e!==null&&(He.data=$e)))),($e=c$?u$(a,u):d$(a,u))&&(He=yf(Z,"onBeforeInput"),0<He.length&&(ge=new K2("onBeforeInput","beforeinput",null,u,ne),oe.push({event:ge,listeners:He}),ge.data=$e)),nB(oe,a,Z,u,ne)}L_(oe,o)})}function Sc(a,o,u){return{instance:a,listener:o,currentTarget:u}}function yf(a,o){for(var u=o+"Capture",m=[];a!==null;){var g=a,b=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||b===null||(g=Hl(a,u),g!=null&&m.unshift(Sc(a,g,b)),g=Hl(a,o),g!=null&&m.push(Sc(a,g,b))),a.tag===3)return m;a=a.return}return[]}function sB(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function B_(a,o,u,m,g){for(var b=o._reactName,C=[];u!==null&&u!==m;){var P=u,q=P.alternate,Z=P.stateNode;if(P=P.tag,q!==null&&q===m)break;P!==5&&P!==26&&P!==27||Z===null||(q=Z,g?(Z=Hl(u,b),Z!=null&&C.unshift(Sc(u,Z,q))):g||(Z=Hl(u,b),Z!=null&&C.push(Sc(u,Z,q)))),u=u.return}C.length!==0&&a.push({event:o,listeners:C})}var oB=/\r\n?/g,lB=/\u0000|\uFFFD/g;function I_(a){return(typeof a=="string"?a:""+a).replace(oB,`
`).replace(lB,"")}function q_(a,o){return o=I_(o),I_(a)===o}function lt(a,o,u,m,g,b){switch(u){case"children":typeof m=="string"?o==="body"||o==="textarea"&&m===""||Ks(a,m):(typeof m=="number"||typeof m=="bigint")&&o!=="body"&&Ks(a,""+m);break;case"className":bd(a,"class",m);break;case"tabIndex":bd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":bd(a,u,m);break;case"style":q2(a,m,b);break;case"data":if(o!=="object"){bd(a,"data",m);break}case"src":case"href":if(m===""&&(o!=="a"||u!=="href")){a.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=wd(""+m),a.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(u==="formAction"?(o!=="input"&&lt(a,o,"name",g.name,g,null),lt(a,o,"formEncType",g.formEncType,g,null),lt(a,o,"formMethod",g.formMethod,g,null),lt(a,o,"formTarget",g.formTarget,g,null)):(lt(a,o,"encType",g.encType,g,null),lt(a,o,"method",g.method,g,null),lt(a,o,"target",g.target,g,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=wd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ca);break;case"onScroll":m!=null&&Ue("scroll",a);break;case"onScrollEnd":m!=null&&Ue("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=wd(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Ue("beforetoggle",a),Ue("toggle",a),vd(a,"popover",m);break;case"xlinkActuate":la(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":la(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":la(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":la(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":la(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":la(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":la(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":la(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":la(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":vd(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=z8.get(u)||u,vd(a,u,m))}}function Sy(a,o,u,m,g,b){switch(u){case"style":q2(a,m,b);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Ks(a,m):(typeof m=="number"||typeof m=="bigint")&&Ks(a,""+m);break;case"onScroll":m!=null&&Ue("scroll",a);break;case"onScrollEnd":m!=null&&Ue("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ca);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!k2.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),o=u.slice(2,g?u.length-7:void 0),b=a[_n]||null,b=b!=null?b[u]:null,typeof b=="function"&&a.removeEventListener(o,b,g),typeof m=="function")){typeof b!="function"&&b!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(o,m,g);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):vd(a,u,m)}}}function on(a,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",a),Ue("load",a);var m=!1,g=!1,b;for(b in u)if(u.hasOwnProperty(b)){var C=u[b];if(C!=null)switch(b){case"src":m=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,b,C,u,null)}}g&&lt(a,o,"srcSet",u.srcSet,u,null),m&&lt(a,o,"src",u.src,u,null);return;case"input":Ue("invalid",a);var P=b=C=g=null,q=null,Z=null;for(m in u)if(u.hasOwnProperty(m)){var ne=u[m];if(ne!=null)switch(m){case"name":g=ne;break;case"type":C=ne;break;case"checked":q=ne;break;case"defaultChecked":Z=ne;break;case"value":b=ne;break;case"defaultValue":P=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,o));break;default:lt(a,o,m,ne,u,null)}}L2(a,b,P,q,Z,C,g,!1);return;case"select":Ue("invalid",a),m=C=b=null;for(g in u)if(u.hasOwnProperty(g)&&(P=u[g],P!=null))switch(g){case"value":b=P;break;case"defaultValue":C=P;break;case"multiple":m=P;default:lt(a,o,g,P,u,null)}o=b,u=C,a.multiple=!!m,o!=null?Gs(a,!!m,o,!1):u!=null&&Gs(a,!!m,u,!0);return;case"textarea":Ue("invalid",a),b=g=m=null;for(C in u)if(u.hasOwnProperty(C)&&(P=u[C],P!=null))switch(C){case"value":m=P;break;case"defaultValue":g=P;break;case"children":b=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:lt(a,o,C,P,u,null)}B2(a,m,g,b);return;case"option":for(q in u)if(u.hasOwnProperty(q)&&(m=u[q],m!=null))switch(q){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:lt(a,o,q,m,u,null)}return;case"dialog":Ue("beforetoggle",a),Ue("toggle",a),Ue("cancel",a),Ue("close",a);break;case"iframe":case"object":Ue("load",a);break;case"video":case"audio":for(m=0;m<wc.length;m++)Ue(wc[m],a);break;case"image":Ue("error",a),Ue("load",a);break;case"details":Ue("toggle",a);break;case"embed":case"source":case"link":Ue("error",a),Ue("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 u)if(u.hasOwnProperty(Z)&&(m=u[Z],m!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,Z,m,u,null)}return;default:if(Lp(o)){for(ne in u)u.hasOwnProperty(ne)&&(m=u[ne],m!==void 0&&Sy(a,o,ne,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&lt(a,o,P,m,u,null))}function cB(a,o,u,m){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,b=null,C=null,P=null,q=null,Z=null,ne=null;for(ee in u){var oe=u[ee];if(u.hasOwnProperty(ee)&&oe!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":q=oe;default:m.hasOwnProperty(ee)||lt(a,o,ee,null,m,oe)}}for(var J in m){var ee=m[J];if(oe=u[J],m.hasOwnProperty(J)&&(ee!=null||oe!=null))switch(J){case"type":b=ee;break;case"name":g=ee;break;case"checked":Z=ee;break;case"defaultChecked":ne=ee;break;case"value":C=ee;break;case"defaultValue":P=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,o));break;default:ee!==oe&&lt(a,o,J,ee,m,oe)}}Dp(a,C,P,q,Z,ne,b,g);return;case"select":ee=C=P=J=null;for(b in u)if(q=u[b],u.hasOwnProperty(b)&&q!=null)switch(b){case"value":break;case"multiple":ee=q;default:m.hasOwnProperty(b)||lt(a,o,b,null,m,q)}for(g in m)if(b=m[g],q=u[g],m.hasOwnProperty(g)&&(b!=null||q!=null))switch(g){case"value":J=b;break;case"defaultValue":P=b;break;case"multiple":C=b;default:b!==q&&lt(a,o,g,b,m,q)}o=P,u=C,m=ee,J!=null?Gs(a,!!u,J,!1):!!m!=!!u&&(o!=null?Gs(a,!!u,o,!0):Gs(a,!!u,u?[]:"",!1));return;case"textarea":ee=J=null;for(P in u)if(g=u[P],u.hasOwnProperty(P)&&g!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:lt(a,o,P,null,m,g)}for(C in m)if(g=m[C],b=u[C],m.hasOwnProperty(C)&&(g!=null||b!=null))switch(C){case"value":J=g;break;case"defaultValue":ee=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==b&&lt(a,o,C,g,m,b)}$2(a,J,ee);return;case"option":for(var pe in u)if(J=u[pe],u.hasOwnProperty(pe)&&J!=null&&!m.hasOwnProperty(pe))switch(pe){case"selected":a.selected=!1;break;default:lt(a,o,pe,null,m,J)}for(q in m)if(J=m[q],ee=u[q],m.hasOwnProperty(q)&&J!==ee&&(J!=null||ee!=null))switch(q){case"selected":a.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:lt(a,o,q,J,m,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in u)J=u[Se],u.hasOwnProperty(Se)&&J!=null&&!m.hasOwnProperty(Se)&&lt(a,o,Se,null,m,J);for(Z in m)if(J=m[Z],ee=u[Z],m.hasOwnProperty(Z)&&J!==ee&&(J!=null||ee!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,o));break;default:lt(a,o,Z,J,m,ee)}return;default:if(Lp(o)){for(var ct in u)J=u[ct],u.hasOwnProperty(ct)&&J!==void 0&&!m.hasOwnProperty(ct)&&Sy(a,o,ct,void 0,m,J);for(ne in m)J=m[ne],ee=u[ne],!m.hasOwnProperty(ne)||J===ee||J===void 0&&ee===void 0||Sy(a,o,ne,J,m,ee);return}}for(var X in u)J=u[X],u.hasOwnProperty(X)&&J!=null&&!m.hasOwnProperty(X)&&lt(a,o,X,null,m,J);for(oe in m)J=m[oe],ee=u[oe],!m.hasOwnProperty(oe)||J===ee||J==null&&ee==null||lt(a,o,oe,J,m,ee)}function U_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uB(){if(typeof performance.getEntriesByType=="function"){for(var a=0,o=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var g=u[m],b=g.transferSize,C=g.initiatorType,P=g.duration;if(b&&P&&U_(C)){for(C=0,P=g.responseEnd,m+=1;m<u.length;m++){var q=u[m],Z=q.startTime;if(Z>P)break;var ne=q.transferSize,oe=q.initiatorType;ne&&U_(oe)&&(q=q.responseEnd,C+=ne*(q<P?1:(P-Z)/(q-Z)))}if(--m,o+=8*(b+C)/(g.duration/1e3),a++,10<a)break}}if(0<a)return o/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Ny=null,Ay=null;function gf(a){return a.nodeType===9?a:a.ownerDocument}function V_(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 H_(a,o){if(a===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&o==="foreignObject"?0:a}function _y(a,o){return a==="textarea"||a==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Oy=null;function dB(){var a=window.event;return a&&a.type==="popstate"?a===Oy?!1:(Oy=a,!0):(Oy=null,!1)}var F_=typeof setTimeout=="function"?setTimeout:void 0,fB=typeof clearTimeout=="function"?clearTimeout:void 0,G_=typeof Promise=="function"?Promise:void 0,hB=typeof queueMicrotask=="function"?queueMicrotask:typeof G_<"u"?function(a){return G_.resolve(null).then(a).catch(mB)}:F_;function mB(a){setTimeout(function(){throw a})}function pi(a){return a==="head"}function K_(a,o){var u=o,m=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(g),Ao(o);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Nc(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Nc(u);for(var b=u.firstChild;b;){var C=b.nextSibling,P=b.nodeName;b[Ul]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=C}}else u==="body"&&Nc(a.ownerDocument.body);u=g}while(u);Ao(o)}function Y_(a,o){var u=a;a=0;do{var m=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=m}while(u)}function Ty(a){var o=a.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Ty(u),Pp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function pB(a,o,u,m){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==o.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[Ul])switch(o){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(o==="input"&&a.type==="hidden"){var b=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=cr(a.nextSibling),a===null)break}return null}function xB(a,o,u){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=cr(a.nextSibling),a===null))return null;return a}function X_(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=cr(a.nextSibling),a===null))return null;return a}function Ey(a){return a.data==="$?"||a.data==="$~"}function Cy(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function yB(a,o){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=o;else if(a.data!=="$?"||u.readyState!=="loading")o();else{var m=function(){o(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function cr(a){for(;a!=null;a=a.nextSibling){var o=a.nodeType;if(o===1||o===3)break;if(o===8){if(o=a.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return a}var My=null;function W_(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(o===0)return cr(a.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}a=a.nextSibling}return null}function Z_(a){a=a.previousSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return a;o--}else u!=="/$"&&u!=="/&"||o++}a=a.previousSibling}return null}function Q_(a,o,u){switch(o=gf(u),a){case"html":if(a=o.documentElement,!a)throw Error(r(452));return a;case"head":if(a=o.head,!a)throw Error(r(453));return a;case"body":if(a=o.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Nc(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);Pp(a)}var ur=new Map,J_=new Set;function vf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Aa=H.d;H.d={f:gB,r:vB,D:bB,C:jB,L:wB,m:SB,X:AB,S:NB,M:_B};function gB(){var a=Aa.f(),o=uf();return a||o}function vB(a){var o=Vs(a);o!==null&&o.tag===5&&o.type==="form"?xA(o):Aa.r(a)}var wo=typeof document>"u"?null:document;function eO(a,o,u){var m=wo;if(m&&typeof o=="string"&&o){var g=nr(o);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),J_.has(g)||(J_.add(g),a={rel:a,crossOrigin:u,href:o},m.querySelector(g)===null&&(o=m.createElement("link"),on(o,"link",a),Zt(o),m.head.appendChild(o)))}}function bB(a){Aa.D(a),eO("dns-prefetch",a,null)}function jB(a,o){Aa.C(a,o),eO("preconnect",a,o)}function wB(a,o,u){Aa.L(a,o,u);var m=wo;if(m&&a&&o){var g='link[rel="preload"][as="'+nr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+nr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+nr(u.imageSizes)+'"]')):g+='[href="'+nr(a)+'"]';var b=g;switch(o){case"style":b=So(a);break;case"script":b=No(a)}ur.has(b)||(a=x({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:a,as:o},u),ur.set(b,a),m.querySelector(g)!==null||o==="style"&&m.querySelector(Ac(b))||o==="script"&&m.querySelector(_c(b))||(o=m.createElement("link"),on(o,"link",a),Zt(o),m.head.appendChild(o)))}}function SB(a,o){Aa.m(a,o);var u=wo;if(u&&a){var m=o&&typeof o.as=="string"?o.as:"script",g='link[rel="modulepreload"][as="'+nr(m)+'"][href="'+nr(a)+'"]',b=g;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=No(a)}if(!ur.has(b)&&(a=x({rel:"modulepreload",href:a},o),ur.set(b,a),u.querySelector(g)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(_c(b)))return}m=u.createElement("link"),on(m,"link",a),Zt(m),u.head.appendChild(m)}}}function NB(a,o,u){Aa.S(a,o,u);var m=wo;if(m&&a){var g=Hs(m).hoistableStyles,b=So(a);o=o||"default";var C=g.get(b);if(!C){var P={loading:0,preload:null};if(C=m.querySelector(Ac(b)))P.loading=5;else{a=x({rel:"stylesheet",href:a,"data-precedence":o},u),(u=ur.get(b))&&ky(a,u);var q=C=m.createElement("link");Zt(q),on(q,"link",a),q._p=new Promise(function(Z,ne){q.onload=Z,q.onerror=ne}),q.addEventListener("load",function(){P.loading|=1}),q.addEventListener("error",function(){P.loading|=2}),P.loading|=4,bf(C,o,m)}C={type:"stylesheet",instance:C,count:1,state:P},g.set(b,C)}}}function AB(a,o){Aa.X(a,o);var u=wo;if(u&&a){var m=Hs(u).hoistableScripts,g=No(a),b=m.get(g);b||(b=u.querySelector(_c(g)),b||(a=x({src:a,async:!0},o),(o=ur.get(g))&&Py(a,o),b=u.createElement("script"),Zt(b),on(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function _B(a,o){Aa.M(a,o);var u=wo;if(u&&a){var m=Hs(u).hoistableScripts,g=No(a),b=m.get(g);b||(b=u.querySelector(_c(g)),b||(a=x({src:a,async:!0,type:"module"},o),(o=ur.get(g))&&Py(a,o),b=u.createElement("script"),Zt(b),on(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function tO(a,o,u,m){var g=(g=we.current)?vf(g):null;if(!g)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=So(u.href),u=Hs(g).hoistableStyles,m=u.get(o),m||(m={type:"style",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=So(u.href);var b=Hs(g).hoistableStyles,C=b.get(a);if(C||(g=g.ownerDocument||g,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,C),(b=g.querySelector(Ac(a)))&&!b._p&&(C.instance=b,C.state.loading=5),ur.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},ur.set(a,u),b||OB(g,a,u,C.state))),o&&m===null)throw Error(r(528,""));return C}if(o&&m!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=No(u),u=Hs(g).hoistableScripts,m=u.get(o),m||(m={type:"script",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function So(a){return'href="'+nr(a)+'"'}function Ac(a){return'link[rel="stylesheet"]['+a+"]"}function nO(a){return x({},a,{"data-precedence":a.precedence,precedence:null})}function OB(a,o,u,m){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?m.loading=1:(o=a.createElement("link"),m.preload=o,o.addEventListener("load",function(){return m.loading|=1}),o.addEventListener("error",function(){return m.loading|=2}),on(o,"link",u),Zt(o),a.head.appendChild(o))}function No(a){return'[src="'+nr(a)+'"]'}function _c(a){return"script[async]"+a}function rO(a,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var m=a.querySelector('style[data-href~="'+nr(u.href)+'"]');if(m)return o.instance=m,Zt(m),m;var g=x({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Zt(m),on(m,"style",g),bf(m,u.precedence,a),o.instance=m;case"stylesheet":g=So(u.href);var b=a.querySelector(Ac(g));if(b)return o.state.loading|=4,o.instance=b,Zt(b),b;m=nO(u),(g=ur.get(g))&&ky(m,g),b=(a.ownerDocument||a).createElement("link"),Zt(b);var C=b;return C._p=new Promise(function(P,q){C.onload=P,C.onerror=q}),on(b,"link",m),o.state.loading|=4,bf(b,u.precedence,a),o.instance=b;case"script":return b=No(u.src),(g=a.querySelector(_c(b)))?(o.instance=g,Zt(g),g):(m=u,(g=ur.get(b))&&(m=x({},u),Py(m,g)),a=a.ownerDocument||a,g=a.createElement("script"),Zt(g),on(g,"link",m),a.head.appendChild(g),o.instance=g);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(m=o.instance,o.state.loading|=4,bf(m,u.precedence,a));return o.instance}function bf(a,o,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=m.length?m[m.length-1]:null,b=g,C=0;C<m.length;C++){var P=m[C];if(P.dataset.precedence===o)b=P;else if(b!==g)break}b?b.parentNode.insertBefore(a,b.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(a,o.firstChild))}function ky(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function Py(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var jf=null;function aO(a,o,u){if(jf===null){var m=new Map,g=jf=new Map;g.set(u,m)}else g=jf,m=g.get(u),m||(m=new Map,g.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var b=u[g];if(!(b[Ul]||b[nn]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var C=b.getAttribute(o)||"";C=a+C;var P=m.get(C);P?P.push(b):m.set(C,[b])}}return m}function iO(a,o,u){a=a.ownerDocument||a,a.head.insertBefore(u,o==="title"?a.querySelector("head > title"):null)}function TB(a,o,u){if(u===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function sO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function EB(a,o,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=So(m.href),b=o.querySelector(Ac(g));if(b){o=b._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=wf.bind(a),o.then(a,a)),u.state.loading|=4,u.instance=b,Zt(b);return}b=o.ownerDocument||o,m=nO(m),(g=ur.get(g))&&ky(m,g),b=b.createElement("link"),Zt(b);var C=b;C._p=new Promise(function(P,q){C.onload=P,C.onerror=q}),on(b,"link",m),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=wf.bind(a),o.addEventListener("load",u),o.addEventListener("error",u))}}var Ry=0;function CB(a,o){return a.stylesheets&&a.count===0&&Nf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Nf(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+o);0<a.imgBytes&&Ry===0&&(Ry=62500*uB());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Nf(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>Ry?50:800)+o);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(g)}}:null}function wf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Sf=null;function Nf(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Sf=new Map,o.forEach(MB,a),Sf=null,wf.call(a))}function MB(a,o){if(!(o.state.loading&4)){var u=Sf.get(a);if(u)var m=u.get(null);else{u=new Map,Sf.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<g.length;b++){var C=g[b];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(u.set(C.dataset.precedence,C),m=C)}m&&u.set(null,m)}g=o.instance,C=g.getAttribute("data-precedence"),b=u.get(C)||m,b===m&&u.set(null,g),u.set(C,g),this.count++,m=wf.bind(this),g.addEventListener("load",m),g.addEventListener("error",m),b?b.parentNode.insertBefore(g,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),o.state.loading|=4}}var Oc={$$typeof:A,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function kB(a,o,u,m,g,b,C,P,q){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=Ep(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ep(0),this.hiddenUpdates=Ep(null),this.identifierPrefix=m,this.onUncaughtError=g,this.onCaughtError=b,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function oO(a,o,u,m,g,b,C,P,q,Z,ne,oe){return a=new kB(a,o,u,C,q,Z,ne,oe,P),o=1,b===!0&&(o|=24),b=In(3,null,null,o),a.current=b,b.stateNode=a,o=hx(),o.refCount++,a.pooledCache=o,o.refCount++,b.memoizedState={element:m,isDehydrated:u,cache:o},yx(b),a}function lO(a){return a?(a=eo,a):eo}function cO(a,o,u,m,g,b){g=lO(g),m.context===null?m.context=g:m.pendingContext=g,m=ai(o),m.payload={element:u},b=b===void 0?null:b,b!==null&&(m.callback=b),u=ii(a,m,o),u!==null&&(kn(u,a,o),ic(u,a,o))}function uO(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<o?u:o}}function Dy(a,o){uO(a,o),(a=a.alternate)&&uO(a,o)}function dO(a){if(a.tag===13||a.tag===31){var o=Yi(a,67108864);o!==null&&kn(o,a,67108864),Dy(a,67108864)}}function fO(a){if(a.tag===13||a.tag===31){var o=Fn();o=Cp(o);var u=Yi(a,o);u!==null&&kn(u,a,o),Dy(a,o)}}var Af=!0;function PB(a,o,u,m){var g=B.T;B.T=null;var b=H.p;try{H.p=2,zy(a,o,u,m)}finally{H.p=b,B.T=g}}function RB(a,o,u,m){var g=B.T;B.T=null;var b=H.p;try{H.p=8,zy(a,o,u,m)}finally{H.p=b,B.T=g}}function zy(a,o,u,m){if(Af){var g=Ly(m);if(g===null)wy(a,o,m,_f,u),mO(a,m);else if(zB(g,a,o,u,m))m.stopPropagation();else if(mO(a,m),o&4&&-1<DB.indexOf(a)){for(;g!==null;){var b=Vs(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var C=Vi(b.pendingLanes);if(C!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;C;){var q=1<<31-$n(C);P.entanglements[1]|=q,C&=~q}Gr(b),(Je&6)===0&&(lf=pn()+500,jc(0))}}break;case 31:case 13:P=Yi(b,2),P!==null&&kn(P,b,2),uf(),Dy(b,2)}if(b=Ly(m),b===null&&wy(a,o,m,_f,u),b===g)break;g=b}g!==null&&m.stopPropagation()}else wy(a,o,m,null,u)}}function Ly(a){return a=Bp(a),$y(a)}var _f=null;function $y(a){if(_f=null,a=Us(a),a!==null){var o=l(a);if(o===null)a=null;else{var u=o.tag;if(u===13){if(a=c(o),a!==null)return a;a=null}else if(u===31){if(a=d(o),a!==null)return a;a=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return _f=a,null}function hO(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(hd()){case j2:return 2;case w2:return 8;case md:case j8:return 32;case S2:return 268435456;default:return 32}default:return 32}}var By=!1,xi=null,yi=null,gi=null,Tc=new Map,Ec=new Map,vi=[],DB="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 mO(a,o){switch(a){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":yi=null;break;case"mouseover":case"mouseout":gi=null;break;case"pointerover":case"pointerout":Tc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ec.delete(o.pointerId)}}function Cc(a,o,u,m,g,b){return a===null||a.nativeEvent!==b?(a={blockedOn:o,domEventName:u,eventSystemFlags:m,nativeEvent:b,targetContainers:[g]},o!==null&&(o=Vs(o),o!==null&&dO(o)),a):(a.eventSystemFlags|=m,o=a.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),a)}function zB(a,o,u,m,g){switch(o){case"focusin":return xi=Cc(xi,a,o,u,m,g),!0;case"dragenter":return yi=Cc(yi,a,o,u,m,g),!0;case"mouseover":return gi=Cc(gi,a,o,u,m,g),!0;case"pointerover":var b=g.pointerId;return Tc.set(b,Cc(Tc.get(b)||null,a,o,u,m,g)),!0;case"gotpointercapture":return b=g.pointerId,Ec.set(b,Cc(Ec.get(b)||null,a,o,u,m,g)),!0}return!1}function pO(a){var o=Us(a.target);if(o!==null){var u=l(o);if(u!==null){if(o=u.tag,o===13){if(o=c(u),o!==null){a.blockedOn=o,E2(a.priority,function(){fO(u)});return}}else if(o===31){if(o=d(u),o!==null){a.blockedOn=o,E2(a.priority,function(){fO(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Of(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var u=Ly(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);$p=m,u.target.dispatchEvent(m),$p=null}else return o=Vs(u),o!==null&&dO(o),a.blockedOn=u,!1;o.shift()}return!0}function xO(a,o,u){Of(a)&&u.delete(o)}function LB(){By=!1,xi!==null&&Of(xi)&&(xi=null),yi!==null&&Of(yi)&&(yi=null),gi!==null&&Of(gi)&&(gi=null),Tc.forEach(xO),Ec.forEach(xO)}function Tf(a,o){a.blockedOn===o&&(a.blockedOn=null,By||(By=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,LB)))}var Ef=null;function yO(a){Ef!==a&&(Ef=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ef===a&&(Ef=null);for(var o=0;o<a.length;o+=3){var u=a[o],m=a[o+1],g=a[o+2];if(typeof m!="function"){if($y(m||u)===null)continue;break}var b=Vs(u);b!==null&&(a.splice(o,3),o-=3,Lx(b,{pending:!0,data:g,method:u.method,action:m},m,g))}}))}function Ao(a){function o(q){return Tf(q,a)}xi!==null&&Tf(xi,a),yi!==null&&Tf(yi,a),gi!==null&&Tf(gi,a),Tc.forEach(o),Ec.forEach(o);for(var u=0;u<vi.length;u++){var m=vi[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<vi.length&&(u=vi[0],u.blockedOn===null);)pO(u),u.blockedOn===null&&vi.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var g=u[m],b=u[m+1],C=g[_n]||null;if(typeof b=="function")C||yO(u);else if(C){var P=null;if(b&&b.hasAttribute("formAction")){if(g=b,C=b[_n]||null)P=C.formAction;else if($y(g)!==null)continue}else P=C.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),yO(u)}}}function gO(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(C){return g=C})},focusReset:"manual",scroll:"manual"})}function o(){g!==null&&(g(),g=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,g=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),g!==null&&(g(),g=null)}}}function Iy(a){this._internalRoot=a}Cf.prototype.render=Iy.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,m=Fn();cO(u,m,a,o,null,null)},Cf.prototype.unmount=Iy.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;cO(a.current,2,null,a,null,null),uf(),o[qs]=null}};function Cf(a){this._internalRoot=a}Cf.prototype.unstable_scheduleHydration=function(a){if(a){var o=T2();a={blockedOn:null,target:a,priority:o};for(var u=0;u<vi.length&&o!==0&&o<vi[u].priority;u++);vi.splice(u,0,a),u===0&&pO(a)}};var vO=t.version;if(vO!=="19.2.7")throw Error(r(527,vO,"19.2.7"));H.findDOMNode=function(a){var o=a._reactInternals;if(o===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(o),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var $B={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mf.isDisabled&&Mf.supportsFiber)try{Bl=Mf.inject($B),Ln=Mf}catch{}}return kc.createRoot=function(a,o){if(!i(a))throw Error(r(299));var u=!1,m="",g=_A,b=OA,C=TA;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onUncaughtError!==void 0&&(g=o.onUncaughtError),o.onCaughtError!==void 0&&(b=o.onCaughtError),o.onRecoverableError!==void 0&&(C=o.onRecoverableError)),o=oO(a,1,!1,null,null,u,m,null,g,b,C,gO),a[qs]=o.current,jy(a),new Iy(o)},kc.hydrateRoot=function(a,o,u){if(!i(a))throw Error(r(299));var m=!1,g="",b=_A,C=OA,P=TA,q=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(C=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(q=u.formState)),o=oO(a,1,!0,o,u??null,m,g,q,b,C,P,gO),o.context=lO(null),u=o.current,m=Fn(),m=Cp(m),g=ai(m),g.callback=null,ii(u,g,m),u=m,o.current.lanes=u,ql(o,u),Gr(o),a[qs]=o.current,jy(a),new Cf(o)},kc.version="19.2.7",kc}var EO;function YB(){if(EO)return Vy.exports;EO=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(),Vy.exports=KB(),Vy.exports}var XB=YB();/**
* 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 Sw=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,jR=/^[\\/]{2}/;function WB(e,t){return t+e.replace(/\\/g,"/")}var CO="popstate";function MO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ZB(e={}){function t(r,i){var h;let l=(h=i.state)==null?void 0:h.masked,{pathname:c,search:d,hash:f}=l||r.location;return y1("",{pathname:c,search:d,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",l?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:cu(i)}return JB(t,n,null,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function QB(){return Math.random().toString(36).substring(2,10)}function kO(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 y1(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?wl(t):t,state:n,key:t&&t.key||r||QB(),mask:i}}function cu({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 wl(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 JB(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:l=!1}=r,c=i.history,d="POP",f=null,h=p();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function p(){return(c.state||{idx:null}).idx}function x(){d="POP";let v=p(),_=v==null?null:v-h;h=v,f&&f({action:d,location:S.location,delta:_})}function y(v,_){d="PUSH";let O=MO(v)?v:y1(S.location,v,_);h=p()+1;let A=kO(O,h),T=S.createHref(O.mask||O);try{c.pushState(A,"",T)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(T)}l&&f&&f({action:d,location:S.location,delta:1})}function j(v,_){d="REPLACE";let O=MO(v)?v:y1(S.location,v,_);h=p();let A=kO(O,h),T=S.createHref(O.mask||O);c.replaceState(A,"",T),l&&f&&f({action:d,location:S.location,delta:0})}function w(v){return eI(i,v)}let S={get action(){return d},get location(){return e(i,c)},listen(v){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(CO,x),f=v,()=>{i.removeEventListener(CO,x),f=null}},createHref(v){return t(i,v)},createURL:w,encodeLocation(v){let _=w(v);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:y,replace:j,go(v){return c.go(v)}};return S}function eI(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),_t(r,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:cu(t);return i=i.replace(/ $/,"%20"),!n&&jR.test(i)&&(i=r+i),new URL(i,r)}function wR(e,t,n="/"){return tI(e,t,n,!1)}function tI(e,t,n,r,i){let l=typeof t=="string"?wl(t):t,c=Ba(l.pathname||"/",n);if(c==null)return null;let d=nI(e),f=null,h=hI(c);for(let p=0;f==null&&p<d.length;++p)f=fI(d[p],h,r);return f}function nI(e){let t=SR(e);return rI(t),t}function SR(e,t=[],n=[],r="",i=!1){let l=(c,d,f=i,h)=>{let p={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(r)&&f)return;_t(p.relativePath.startsWith(r),`Absolute route path "${p.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(r.length)}let x=zr([r,p.relativePath]),y=n.concat(p);c.children&&c.children.length>0&&(_t(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),SR(c.children,t,y,x,f)),!(c.path==null&&!c.index)&&t.push({path:x,score:uI(x,c.index),routesMeta:y.map((j,w)=>{let[S,v]=_R(j.relativePath,j.caseSensitive,w===y.length-1);return{...j,matcher:S,compiledParams:v}})})};return e.forEach((c,d)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))l(c,d);else for(let h of NR(c.path))l(c,d,!0,h)}),t}function NR(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let c=NR(r.join("/")),d=[];return d.push(...c.map(f=>f===""?l:[l,f].join("/"))),i&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function rI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dI(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var aI=/^:[\w-]+$/,iI=3,sI=2,oI=1,lI=10,cI=-2,PO=e=>e==="*";function uI(e,t){let n=e.split("/"),r=n.length;return n.some(PO)&&(r+=cI),t&&(r+=sI),n.filter(i=>!PO(i)).reduce((i,l)=>i+(aI.test(l)?iI:l===""?oI:lI),r)}function dI(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 fI(e,t,n=!1){let{routesMeta:r}=e,i={},l="/",c=[];for(let d=0;d<r.length;++d){let f=r[d],h=d===r.length-1,p=l==="/"?t:t.slice(l.length)||"/",x={path:f.relativePath,caseSensitive:f.caseSensitive,end:h},y=f.matcher&&f.compiledParams?AR(x,p,f.matcher,f.compiledParams):gh(x,p),j=f.route;if(!y&&h&&n&&!r[r.length-1].route.index&&(y=gh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!y)return null;Object.assign(i,y.params),c.push({params:i,pathname:zr([l,y.pathname]),pathnameBase:xI(zr([l,y.pathnameBase])),route:j}),y.pathnameBase!=="/"&&(l=zr([l,y.pathnameBase]))}return c}function gh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_R(e.path,e.caseSensitive,e.end);return AR(e,t,n,r)}function AR(e,t,n,r){let i=t.match(n);if(!i)return null;let l=i[0],c=l.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:r.reduce((h,{paramName:p,isOptional:x},y)=>{if(p==="*"){let w=d[y]||"";c=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const j=d[y];return x&&!j?h[p]=void 0:h[p]=(j||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:e}}function _R(e,t=!1,n=!0){jr(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,(c,d,f,h,p)=>{if(r.push({paramName:d,isOptional:f!=null}),f){let x=p.charAt(h+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 hI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jr(!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 Ba(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 mI(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?wl(e):e,l;return n?(n=OR(n),n.startsWith("/")?l=RO(n.substring(1),"/"):l=RO(n,t)):l=t,{pathname:l,search:yI(r),hash:gI(i)}}function RO(e,t){let n=vh(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ky(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 pI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Nw(e){let t=pI(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Dm(e,t,n,r=!1){let i;typeof e=="string"?i=wl(e):(i={...e},_t(!i.pathname||!i.pathname.includes("?"),Ky("?","pathname","search",i)),_t(!i.pathname||!i.pathname.includes("#"),Ky("#","pathname","hash",i)),_t(!i.search||!i.search.includes("#"),Ky("#","search","hash",i)));let l=e===""||i.pathname==="",c=l?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!r&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),x-=1;i.pathname=y.join("/")}d=x>=0?t[x]:"/"}let f=mI(i,d),h=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}var OR=e=>e.replace(/[\\/]{2,}/g,"/"),zr=e=>OR(e.join("/")),vh=e=>e.replace(/\/+$/,""),xI=e=>vh(e).replace(/^\/*/,"/"),yI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vI=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 bI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function jI(e){let t=e.map(n=>n.route.path).filter(Boolean);return zr(t)||"/"}var TR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ER(e,t){let n=e;if(typeof n!="string"||!Sw.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(TR)try{let l=new URL(window.location.href),c=jR.test(n)?new URL(WB(n,l.protocol)):new URL(n),d=Ba(c.pathname,t);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{jr(!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 CR=["POST","PUT","PATCH","DELETE"];new Set(CR);var wI=["GET",...CR];new Set(wI);var SI=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function NI(e){try{return SI.includes(new URL(e).protocol)}catch{return!1}}var Sl=M.createContext(null);Sl.displayName="DataRouter";var zm=M.createContext(null);zm.displayName="DataRouterState";var MR=M.createContext(!1);function AI(){return M.useContext(MR)}var kR=M.createContext({isTransitioning:!1});kR.displayName="ViewTransition";var _I=M.createContext(new Map);_I.displayName="Fetchers";var OI=M.createContext(null);OI.displayName="Await";var er=M.createContext(null);er.displayName="Navigation";var Wu=M.createContext(null);Wu.displayName="Location";var Ir=M.createContext({outlet:null,matches:[],isDataRoute:!1});Ir.displayName="Route";var Aw=M.createContext(null);Aw.displayName="RouteError";var PR="REACT_ROUTER_ERROR",TI="REDIRECT",EI="ROUTE_ERROR_RESPONSE";function CI(e){if(e.startsWith(`${PR}:${TI}:{`))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 MI(e){if(e.startsWith(`${PR}:${EI}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new vI(t.status,t.statusText,t.data)}catch{}}function kI(e,{relative:t}={}){_t(Nl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=M.useContext(er),{hash:i,pathname:l,search:c}=Zu(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:zr([n,l])),r.createHref({pathname:d,search:c,hash:i})}function Nl(){return M.useContext(Wu)!=null}function An(){return _t(Nl(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(Wu).location}var RR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function DR(e){M.useContext(er).static||M.useLayoutEffect(e)}function Li(){let{isDataRoute:e}=M.useContext(Ir);return e?KI():PI()}function PI(){_t(Nl(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Sl),{basename:t,navigator:n}=M.useContext(er),{matches:r}=M.useContext(Ir),{pathname:i}=An(),l=JSON.stringify(Nw(r)),c=M.useRef(!1);return DR(()=>{c.current=!0}),M.useCallback((f,h={})=>{if(jr(c.current,RR),!c.current)return;if(typeof f=="number"){n.go(f);return}let p=Dm(f,JSON.parse(l),i,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:zr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,l,i,e])}var RI=M.createContext(null);function DI(e){let t=M.useContext(Ir).outlet;return M.useMemo(()=>t&&M.createElement(RI.Provider,{value:e},t),[t,e])}function Zu(e,{relative:t}={}){let{matches:n}=M.useContext(Ir),{pathname:r}=An(),i=JSON.stringify(Nw(n));return M.useMemo(()=>Dm(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function zI(e,t){return zR(e,t)}function zR(e,t,n){var v;_t(Nl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=M.useContext(er),{matches:i}=M.useContext(Ir),l=i[i.length-1],c=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",h=l&&l.route;{let _=h&&h.path||"";$R(d,!h||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${_}">) 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="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let p=An(),x;if(t){let _=typeof t=="string"?wl(t):t;_t(f==="/"||((v=_.pathname)==null?void 0:v.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${_.pathname}" was given in the \`location\` prop.`),x=_}else x=p;let y=x.pathname||"/",j=y;if(f!=="/"){let _=f.replace(/^\//,"").split("/");j="/"+y.replace(/^\//,"").split("/").slice(_.length).join("/")}let w=n&&n.state.matches.length?n.state.matches.map(_=>Object.assign(_,{route:n.manifest[_.route.id]||_.route})):wR(e,{pathname:j});jr(h||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),jr(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 S=qI(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:zr([f,r.encodeLocation?r.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?f:zr([f,r.encodeLocation?r.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),i,n);return t&&S?M.createElement(Wu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},S):S}function LI(){let e=GI(),t=bI(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},l={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:l},"ErrorBoundary")," or"," ",M.createElement("code",{style:l},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:i},n):null,c)}var $I=M.createElement(LI,null),LR=class extends M.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=MI(e.digest);n&&(e=n)}let t=e!==void 0?M.createElement(Ir.Provider,{value:this.props.routeContext},M.createElement(Aw.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?M.createElement(BI,{error:e},t):t}};LR.contextType=MR;var Yy=new WeakMap;function BI({children:e,error:t}){let{basename:n}=M.useContext(er);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=CI(t.digest);if(r){let i=Yy.get(t);if(i)throw i;let l=ER(r.location,n),c=l.absoluteURL||l.to;if(NI(c))throw new Error("Invalid redirect location");if(TR&&!Yy.get(t))if(l.isExternal||r.reloadDocument)window.location.href=c;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw Yy.set(t,d),d}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c}`})}}return e}function II({routeContext:e,match:t,children:n}){let r=M.useContext(Sl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(Ir.Provider,{value:e},n)}function qI(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,l=r==null?void 0:r.errors;if(l!=null){let p=i.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);_t(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,p+1))}let c=!1,d=-1;if(n&&r){c=r.renderFallback;for(let p=0;p<i.length;p++){let x=i[p];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=p),x.route.id){let{loaderData:y,errors:j}=r,w=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!j||j[x.route.id]===void 0);if(x.route.lazy||w){n.isStatic&&(c=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let f=n==null?void 0:n.onError,h=r&&f?(p,x)=>{var y,j;f(p,{location:r.location,params:((j=(y=r.matches)==null?void 0:y[0])==null?void 0:j.params)??{},pattern:jI(r.matches),errorInfo:x})}:void 0;return i.reduceRight((p,x,y)=>{let j,w=!1,S=null,v=null;r&&(j=l&&x.route.id?l[x.route.id]:void 0,S=x.route.errorElement||$I,c&&(d<0&&y===0?($R("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,v=null):d===y&&(w=!0,v=x.route.hydrateFallbackElement||null)));let _=t.concat(i.slice(0,y+1)),O=()=>{let A;return j?A=S:w?A=v:x.route.Component?A=M.createElement(x.route.Component,null):x.route.element?A=x.route.element:A=p,M.createElement(II,{match:x,routeContext:{outlet:p,matches:_,isDataRoute:r!=null},children:A})};return r&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?M.createElement(LR,{location:r.location,revalidation:r.revalidation,component:S,error:j,children:O(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:h}):O()},null)}function _w(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function UI(e){let t=M.useContext(Sl);return _t(t,_w(e)),t}function VI(e){let t=M.useContext(zm);return _t(t,_w(e)),t}function HI(e){let t=M.useContext(Ir);return _t(t,_w(e)),t}function Ow(e){let t=HI(e),n=t.matches[t.matches.length-1];return _t(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function FI(){return Ow("useRouteId")}function GI(){var r;let e=M.useContext(Aw),t=VI("useRouteError"),n=Ow("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function KI(){let{router:e}=UI("useNavigate"),t=Ow("useNavigate"),n=M.useRef(!1);return DR(()=>{n.current=!0}),M.useCallback(async(i,l={})=>{jr(n.current,RR),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var DO={};function $R(e,t,n){!t&&!DO[e]&&(DO[e]=!0,jr(!1,n))}M.memo(YI);function YI({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:l}){return zR(e,void 0,{manifest:t,state:r,isStatic:i,onError:l})}function Tw({to:e,replace:t,state:n,relative:r}){_t(Nl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=M.useContext(er);jr(!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:l}=M.useContext(Ir),{pathname:c}=An(),d=Li(),f=Dm(e,Nw(l),c,r==="path"),h=JSON.stringify(f);return M.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:r})},[d,h,r,t,n]),null}function XI(e){return DI(e.context)}function wt(e){_t(!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 WI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:l=!1,useTransitions:c}){_t(!Nl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=M.useMemo(()=>({basename:d,navigator:i,static:l,useTransitions:c,future:{}}),[d,i,l,c]);typeof n=="string"&&(n=wl(n));let{pathname:h="/",search:p="",hash:x="",state:y=null,key:j="default",mask:w}=n,S=M.useMemo(()=>{let v=Ba(h,d);return v==null?null:{location:{pathname:v,search:p,hash:x,state:y,key:j,mask:w},navigationType:r}},[d,h,p,x,y,j,r,w]);return jr(S!=null,`<Router basename="${d}"> is not able to match the URL "${h}${p}${x}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:M.createElement(er.Provider,{value:f},M.createElement(Wu.Provider,{children:t,value:S}))}function ZI({children:e,location:t}){return zI(g1(e),t)}function g1(e,t=[]){let n=[];return M.Children.forEach(e,(r,i)=>{if(!M.isValidElement(r))return;let l=[...t,i];if(r.type===M.Fragment){n.push.apply(n,g1(r.props.children,l));return}_t(r.type===wt,`[${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>`),_t(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||l.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&&(c.children=g1(r.props.children,l)),n.push(c)}),n}var ih="get",sh="application/x-www-form-urlencoded";function Lm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function QI(e){return Lm(e)&&e.tagName.toLowerCase()==="button"}function JI(e){return Lm(e)&&e.tagName.toLowerCase()==="form"}function eq(e){return Lm(e)&&e.tagName.toLowerCase()==="input"}function tq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nq(e,t){return e.button===0&&(!t||t==="_self")&&!tq(e)}function v1(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rq(e,t){let n=v1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}var Pf=null;function aq(){if(Pf===null)try{new FormData(document.createElement("form"),0),Pf=!1}catch{Pf=!0}return Pf}var iq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xy(e){return e!=null&&!iq.has(e)?(jr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${sh}"`),null):e}function sq(e,t){let n,r,i,l,c;if(JI(e)){let d=e.getAttribute("action");r=d?Ba(d,t):null,n=e.getAttribute("method")||ih,i=Xy(e.getAttribute("enctype"))||sh,l=new FormData(e)}else if(QI(e)||eq(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(r=f?Ba(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||ih,i=Xy(e.getAttribute("formenctype"))||Xy(d.getAttribute("enctype"))||sh,l=new FormData(d,e),!aq()){let{name:h,type:p,value:x}=e;if(p==="image"){let y=h?`${h}.`:"";l.append(`${y}x`,"0"),l.append(`${y}y`,"0")}else h&&l.append(h,x)}}else{if(Lm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ih,r=null,i=sh,c=e}return l&&i==="text/plain"&&(c=l,l=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ew(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function BR(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&&Ba(i.pathname,t)==="/"?i.pathname=`${vh(t)}/_root.${r}`:i.pathname=`${vh(i.pathname)}.${r}`,i}async function oq(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 lq(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 cq(e,t,n){let r=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await oq(l,n);return c.links?c.links():[]}return[]}));return hq(r.flat(1).filter(lq).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function zO(e,t,n,r,i,l){let c=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,d=(f,h)=>{var p;return n[h].pathname!==f.pathname||((p=n[h].route.path)==null?void 0:p.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return l==="assets"?t.filter((f,h)=>c(f,h)||d(f,h)):l==="data"?t.filter((f,h)=>{var x;let p=r.routes[f.route.id];if(!p||!p.hasLoader)return!1;if(c(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function uq(e,t,{includeHydrateFallback:n}={}){return dq(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let l=[i.module];return i.clientActionModule&&(l=l.concat(i.clientActionModule)),i.clientLoaderModule&&(l=l.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(l=l.concat(i.hydrateFallbackModule)),i.imports&&(l=l.concat(i.imports)),l}).flat(1))}function dq(e){return[...new Set(e)]}function fq(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function hq(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let l=JSON.stringify(fq(i));return n.has(l)||(n.add(l),r.push({key:l,link:i})),r},[])}function Cw(){let e=M.useContext(Sl);return Ew(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function mq(){let e=M.useContext(zm);return Ew(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mw=M.createContext(void 0);Mw.displayName="FrameworkContext";function $m(){let e=M.useContext(Mw);return Ew(e,"You must render this element inside a <HydratedRouter> element"),e}function pq(e,t){let n=M.useContext(Mw),[r,i]=M.useState(!1),[l,c]=M.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:p,onTouchStart:x}=t,y=M.useRef(null);M.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=_=>{_.forEach(O=>{c(O.isIntersecting)})},v=new IntersectionObserver(S,{threshold:.5});return y.current&&v.observe(y.current),()=>{v.disconnect()}}},[e]),M.useEffect(()=>{if(r){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[r]);let j=()=>{i(!0)},w=()=>{i(!1),c(!1)};return n?e!=="intent"?[l,y,{}]:[l,y,{onFocus:Pc(d,j),onBlur:Pc(f,w),onMouseEnter:Pc(h,j),onMouseLeave:Pc(p,w),onTouchStart:Pc(x,j)}]:[!1,y,{}]}function Pc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function xq({page:e,...t}){let n=AI(),{nonce:r}=$m(),{router:i}=Cw(),l=M.useMemo(()=>wR(i.routes,e,i.basename),[i.routes,e,i.basename]);return l?(t.nonce==null&&r&&(t={...t,nonce:r}),n?M.createElement(gq,{page:e,matches:l,...t}):M.createElement(vq,{page:e,matches:l,...t})):null}function yq(e){let{manifest:t,routeModules:n}=$m(),[r,i]=M.useState([]);return M.useEffect(()=>{let l=!1;return cq(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),r}function gq({page:e,matches:t,...n}){let r=An(),{future:i}=$m(),{basename:l}=Cw(),c=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=BR(e,l,i.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?f=!0:h.push(p.route.id);return f&&h.length>0&&d.searchParams.set("_routes",h.join(",")),[d.pathname+d.search]},[l,i.v8_trailingSlashAwareDataRequests,e,r,t]);return M.createElement(M.Fragment,null,c.map(d=>M.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function vq({page:e,matches:t,...n}){let r=An(),{future:i,manifest:l,routeModules:c}=$m(),{basename:d}=Cw(),{loaderData:f,matches:h}=mq(),p=M.useMemo(()=>zO(e,t,h,l,r,"data"),[e,t,h,l,r]),x=M.useMemo(()=>zO(e,t,h,l,r,"assets"),[e,t,h,l,r]),y=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,v=!1;if(t.forEach(O=>{var T;let A=l.routes[O.route.id];!A||!A.hasLoader||(!p.some(N=>N.route.id===O.route.id)&&O.route.id in f&&((T=c[O.route.id])!=null&&T.shouldRevalidate)||A.hasClientLoader?v=!0:S.add(O.route.id))}),S.size===0)return[];let _=BR(e,d,i.v8_trailingSlashAwareDataRequests,"data");return v&&S.size>0&&_.searchParams.set("_routes",t.filter(O=>S.has(O.route.id)).map(O=>O.route.id).join(",")),[_.pathname+_.search]},[d,i.v8_trailingSlashAwareDataRequests,f,r,l,p,t,e,c]),j=M.useMemo(()=>uq(x,l),[x,l]),w=yq(x);return M.createElement(M.Fragment,null,y.map(S=>M.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),j.map(S=>M.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),w.map(({key:S,link:v})=>M.createElement("link",{key:S,nonce:n.nonce,...v,crossOrigin:v.crossOrigin??n.crossOrigin})))}function bq(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var jq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{jq&&(window.__reactRouterVersion="7.18.1")}catch{}function wq({basename:e,children:t,useTransitions:n,window:r}){let i=M.useRef();i.current==null&&(i.current=ZB({window:r,v5Compat:!0}));let l=i.current,[c,d]=M.useState({action:l.action,location:l.location}),f=M.useCallback(h=>{n===!1?d(h):M.startTransition(()=>d(h))},[n]);return M.useLayoutEffect(()=>l.listen(f),[l,f]),M.createElement(WI,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:n})}var Ca=M.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:l,replace:c,mask:d,state:f,target:h,to:p,preventScrollReset:x,viewTransition:y,defaultShouldRevalidate:j,...w},S){let{basename:v,navigator:_,useTransitions:O}=M.useContext(er),A=typeof p=="string"&&Sw.test(p),T=ER(p,v);p=T.to;let N=kI(p,{relative:i}),E=An(),k=null;if(d){let K=Dm(d,[],E.mask?E.mask.pathname:"/",!0);v!=="/"&&(K.pathname=K.pathname==="/"?v:zr([v,K.pathname])),k=_.createHref(K)}let[R,L,D]=pq(r,w),z=Aq(p,{replace:c,mask:d,state:f,target:h,preventScrollReset:x,relative:i,viewTransition:y,defaultShouldRevalidate:j,useTransitions:O});function $(K){t&&t(K),K.defaultPrevented||z(K)}let F=!(T.isExternal||l),Y=M.createElement("a",{...w,...D,href:(F?k:void 0)||T.absoluteURL||N,onClick:F?$:t,ref:bq(S,L),target:h,"data-discover":!A&&n==="render"?"true":void 0});return R&&!A?M.createElement(M.Fragment,null,Y,M.createElement(xq,{page:N})):Y});Ca.displayName="Link";var IR=M.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:l,to:c,viewTransition:d,children:f,...h},p){let x=Zu(c,{relative:h.relative}),y=An(),j=M.useContext(zm),{navigator:w,basename:S}=M.useContext(er),v=j!=null&&Mq(x)&&d===!0,_=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,O=y.pathname,A=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;n||(O=O.toLowerCase(),A=A?A.toLowerCase():null,_=_.toLowerCase()),A&&S&&(A=Ba(A,S)||A);const T=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let N=O===_||!i&&O.startsWith(_)&&O.charAt(T)==="/",E=A!=null&&(A===_||!i&&A.startsWith(_)&&A.charAt(_.length)==="/"),k={isActive:N,isPending:E,isTransitioning:v},R=N?t:void 0,L;typeof r=="function"?L=r(k):L=[r,N?"active":null,E?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let D=typeof l=="function"?l(k):l;return M.createElement(Ca,{...h,"aria-current":R,className:L,ref:p,style:D,to:c,viewTransition:d},typeof f=="function"?f(k):f)});IR.displayName="NavLink";var Sq=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:l,method:c=ih,action:d,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:y,...j},w)=>{let{useTransitions:S}=M.useContext(er),v=Eq(),_=Cq(d,{relative:h}),O=c.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&Sw.test(d),T=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let E=N.nativeEvent.submitter,k=(E==null?void 0:E.getAttribute("formmethod"))||c,R=()=>v(E||N.currentTarget,{fetcherKey:t,method:k,navigate:n,replace:i,state:l,relative:h,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:y});S&&n!==!1?M.startTransition(()=>R()):R()};return M.createElement("form",{ref:w,method:O,action:_,onSubmit:r?f:T,...j,"data-discover":!A&&e==="render"?"true":void 0})});Sq.displayName="Form";function Nq(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qR(e){let t=M.useContext(Sl);return _t(t,Nq(e)),t}function Aq(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let p=Li(),x=An(),y=Zu(e,{relative:c});return M.useCallback(j=>{if(nq(j,t)){j.preventDefault();let w=n!==void 0?n:cu(x)===cu(y),S=()=>p(e,{replace:w,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f});h?M.startTransition(()=>S()):S()}},[x,p,y,n,r,i,t,e,l,c,d,f,h])}function _q(e){jr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=M.useRef(v1(e)),n=M.useRef(!1),r=An(),i=M.useMemo(()=>rq(r.search,n.current?null:t.current),[r.search]),l=Li(),c=M.useCallback((d,f)=>{const h=v1(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,l("?"+h,f)},[l,i]);return[i,c]}var Oq=0,Tq=()=>`__${String(++Oq)}__`;function Eq(){let{router:e}=qR("useSubmit"),{basename:t}=M.useContext(er),n=FI(),r=e.fetch,i=e.navigate;return M.useCallback(async(l,c={})=>{let{action:d,method:f,encType:h,formData:p,body:x}=sq(l,t);if(c.navigate===!1){let y=c.fetcherKey||Tq();await r(y,n,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:x,formMethod:c.method||f,formEncType:c.encType||h,flushSync:c.flushSync})}else await i(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:x,formMethod:c.method||f,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,i,t,n])}function Cq(e,{relative:t}={}){let{basename:n}=M.useContext(er),r=M.useContext(Ir);_t(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),l={...Zu(e||".",{relative:t})},c=An();if(e==null){l.search=c.search;let d=new URLSearchParams(l.search),f=d.getAll("index");if(f.some(p=>p==="")){d.delete("index"),f.filter(x=>x).forEach(x=>d.append("index",x));let p=d.toString();l.search=p?`?${p}`:""}}return(!e||e===".")&&i.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:zr([n,l.pathname])),cu(l)}function Mq(e,{relative:t}={}){let n=M.useContext(kR);_t(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qR("useViewTransitionState"),i=Zu(e,{relative:t});if(!n.isTransitioning)return!1;let l=Ba(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=Ba(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gh(i.pathname,c)!=null||gh(i.pathname,l)!=null}const LO=e=>{let t;const n=new Set,r=(h,p)=>{const x=typeof h=="function"?h(t):h;if(!Object.is(x,t)){const y=t;t=p??(typeof x!="object"||x===null)?x:Object.assign({},t,x),n.forEach(j=>j(t,y))}},i=()=>t,d={setState:r,getState:i,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(r,i,d);return d},kq=(e=>e?LO(e):LO),Pq=e=>e;function Rq(e,t=Pq){const n=U.useSyncExternalStore(e.subscribe,U.useCallback(()=>t(e.getState()),[e,t]),U.useCallback(()=>t(e.getInitialState()),[e,t]));return U.useDebugValue(n),n}const $O=e=>{const t=kq(e),n=r=>Rq(t,r);return Object.assign(n,t),n},UR=(e=>e?$O(e):$O);function Dq(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var l;const c=f=>f===null?null:JSON.parse(f,void 0),d=(l=n.getItem(i))!=null?l:null;return d instanceof Promise?d.then(c):c(d)},setItem:(i,l)=>n.setItem(i,JSON.stringify(l,void 0)),removeItem:i=>n.removeItem(i)}}const b1=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return b1(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return b1(r)(n)}}}},zq=(e,t)=>(n,r,i)=>{let l={storage:Dq(()=>window.localStorage),partialize:v=>v,version:0,merge:(v,_)=>({..._,...v}),...t},c=!1,d=0;const f=new Set,h=new Set;let p=l.storage;if(!p)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),n(...v)},r,i);const x=()=>{const v=l.partialize({...r()});return p.setItem(l.name,{state:v,version:l.version})},y=i.setState;i.setState=(v,_)=>(y(v,_),x());const j=e((...v)=>(n(...v),x()),r,i);i.getInitialState=()=>j;let w;const S=()=>{var v,_;if(!p)return;const O=++d;c=!1,f.forEach(T=>{var N;return T((N=r())!=null?N:j)});const A=((_=l.onRehydrateStorage)==null?void 0:_.call(l,(v=r())!=null?v:j))||void 0;return b1(p.getItem.bind(p))(l.name).then(T=>{if(T)if(typeof T.version=="number"&&T.version!==l.version){if(l.migrate){const N=l.migrate(T.state,T.version);return N instanceof Promise?N.then(E=>[!0,E]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,T.state];return[!1,void 0]}).then(T=>{var N;if(O!==d)return;const[E,k]=T;if(w=l.merge(k,(N=r())!=null?N:j),n(w,!0),E)return x()}).then(()=>{O===d&&(A==null||A(r(),void 0),w=r(),c=!0,h.forEach(T=>T(w)))}).catch(T=>{O===d&&(A==null||A(void 0,T))})};return i.persist={setOptions:v=>{l={...l,...v},v.storage&&(p=v.storage)},clearStorage:()=>{p==null||p.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>S(),hasHydrated:()=>c,onHydrate:v=>(f.add(v),()=>{f.delete(v)}),onFinishHydration:v=>(h.add(v),()=>{h.delete(v)})},l.skipHydration||S(),w||j},Lq=zq,Ia=UR()(Lq(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})})),kw=M.createContext({});function Pw(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const $q=typeof window<"u",Rw=$q?M.useLayoutEffect:M.useEffect,Bm=M.createContext(null);function Dw(e,t){e.indexOf(t)===-1&&e.push(t)}function bh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ta=(e,t,n)=>n>t?t:n<e?e:n;let zw=()=>{};const Ci={},VR=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),HR=e=>typeof e=="object"&&e!==null,FR=e=>/^0[^.\s]+$/u.test(e);function GR(e){let t;return()=>(t===void 0&&(t=e()),t)}const vr=e=>e,Qu=(...e)=>e.reduce((t,n)=>r=>n(t(r))),uu=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Lw{constructor(){this.subscriptions=[]}add(t){return Dw(this.subscriptions,t),()=>bh(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 l=0;l<i;l++){const c=this.subscriptions[l];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Zn=e=>e*1e3,xr=e=>e/1e3,KR=(e,t)=>t?e*(1e3/t):0,YR=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Bq=1e-7,Iq=12;function qq(e,t,n,r,i){let l,c,d=0;do c=t+(n-t)/2,l=YR(c,r,i)-e,l>0?n=c:t=c;while(Math.abs(l)>Bq&&++d<Iq);return c}function Ju(e,t,n,r){if(e===t&&n===r)return vr;const i=l=>qq(l,0,1,e,n);return l=>l===0||l===1?l:YR(i(l),t,r)}const XR=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,WR=e=>t=>1-e(1-t),ZR=Ju(.33,1.53,.69,.99),$w=WR(ZR),QR=XR($w),JR=e=>e>=1?1:(e*=2)<1?.5*$w(e):.5*(2-Math.pow(2,-10*(e-1))),Bw=e=>1-Math.sin(Math.acos(e)),eD=WR(Bw),tD=XR(Bw),Uq=Ju(.42,0,1,1),Vq=Ju(0,0,.58,1),nD=Ju(.42,0,.58,1),Hq=e=>Array.isArray(e)&&typeof e[0]!="number",rD=e=>Array.isArray(e)&&typeof e[0]=="number",Fq={linear:vr,easeIn:Uq,easeInOut:nD,easeOut:Vq,circIn:Bw,circInOut:tD,circOut:eD,backIn:$w,backInOut:QR,backOut:ZR,anticipate:JR},Gq=e=>typeof e=="string",BO=e=>{if(rD(e)){zw(e.length===4);const[t,n,r,i]=e;return Ju(t,n,r,i)}else if(Gq(e))return Fq[e];return e},Rf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Kq(e){let t=new Set,n=new Set,r=!1,i=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(h){l.has(h)&&(f.schedule(h),e()),h(c)}const f={schedule:(h,p=!1,x=!1)=>{const j=x&&r?t:n;return p&&l.add(h),j.add(h),h},cancel:h=>{n.delete(h),l.delete(h)},process:h=>{if(c=h,r){i=!0;return}r=!0;const p=t;t=n,n=p,t.forEach(d),t.clear(),r=!1,i&&(i=!1,f.process(h))}};return f}const Yq=40;function aD(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Rf.reduce((A,T)=>(A[T]=Kq(l),A),{}),{setup:d,read:f,resolveKeyframes:h,preUpdate:p,update:x,preRender:y,render:j,postRender:w}=c,S=()=>{const A=Ci.useManualTiming,T=A?i.timestamp:performance.now();n=!1,A||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,Yq),1)),i.timestamp=T,i.isProcessing=!0,d.process(i),f.process(i),h.process(i),p.process(i),x.process(i),y.process(i),j.process(i),w.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(S))},v=()=>{n=!0,r=!0,i.isProcessing||e(S)};return{schedule:Rf.reduce((A,T)=>{const N=c[T];return A[T]=(E,k=!1,R=!1)=>(n||v(),N.schedule(E,k,R)),A},{}),cancel:A=>{for(let T=0;T<Rf.length;T++)c[Rf[T]].cancel(A)},state:i,steps:c}}const{schedule:ht,cancel:Mi,state:cn,steps:Wy}=aD(typeof requestAnimationFrame<"u"?requestAnimationFrame:vr,!0);let oh;function Xq(){oh=void 0}const bn={now:()=>(oh===void 0&&bn.set(cn.isProcessing||Ci.useManualTiming?cn.timestamp:performance.now()),oh),set:e=>{oh=e,queueMicrotask(Xq)}},iD=e=>t=>typeof t=="string"&&t.startsWith(e),sD=iD("--"),Wq=iD("var(--"),Iw=e=>Wq(e)?Zq.test(e.split("/*")[0].trim()):!1,Zq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function IO(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Al={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},du={...Al,transform:e=>ta(0,1,e)},Df={...Al,default:1},Zc=e=>Math.round(e*1e5)/1e5,qw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qq(e){return e==null}const Jq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Uw=(e,t)=>n=>!!(typeof n=="string"&&Jq.test(n)&&n.startsWith(e)||t&&!Qq(n)&&Object.prototype.hasOwnProperty.call(n,t)),oD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,l,c,d]=r.match(qw);return{[e]:parseFloat(i),[t]:parseFloat(l),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},e7=e=>ta(0,255,e),Zy={...Al,transform:e=>Math.round(e7(e))},ys={test:Uw("rgb","red"),parse:oD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Zy.transform(e)+", "+Zy.transform(t)+", "+Zy.transform(n)+", "+Zc(du.transform(r))+")"};function t7(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 j1={test:Uw("#"),parse:t7,transform:ys.transform},ed=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ta=ed("deg"),Wr=ed("%"),xe=ed("px"),n7=ed("vh"),r7=ed("vw"),qO={...Wr,parse:e=>Wr.parse(e)/100,transform:e=>Wr.transform(e*100)},Mo={test:Uw("hsl","hue"),parse:oD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wr.transform(Zc(t))+", "+Wr.transform(Zc(n))+", "+Zc(du.transform(r))+")"},Ut={test:e=>ys.test(e)||j1.test(e)||Mo.test(e),parse:e=>ys.test(e)?ys.parse(e):Mo.test(e)?Mo.parse(e):j1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ys.transform(e):Mo.transform(e),getAnimatableNone:e=>{const t=Ut.parse(e);return t.alpha=0,Ut.transform(t)}},a7=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function i7(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(qw))==null?void 0:t.length)||0)+(((n=e.match(a7))==null?void 0:n.length)||0)>0}const lD="number",cD="color",s7="var",o7="var(",UO="${}",l7=/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 Go(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let l=0;const d=t.replace(l7,f=>(Ut.test(f)?(r.color.push(l),i.push(cD),n.push(Ut.parse(f))):f.startsWith(o7)?(r.var.push(l),i.push(s7),n.push(f)):(r.number.push(l),i.push(lD),n.push(parseFloat(f))),++l,UO)).split(UO);return{values:n,split:d,indexes:r,types:i}}function c7(e){return Go(e).values}function uD({split:e,types:t}){const n=e.length;return r=>{let i="";for(let l=0;l<n;l++)if(i+=e[l],r[l]!==void 0){const c=t[l];c===lD?i+=Zc(r[l]):c===cD?i+=Ut.transform(r[l]):i+=r[l]}return i}}function u7(e){return uD(Go(e))}const d7=e=>typeof e=="number"?0:Ut.test(e)?Ut.getAnimatableNone(e):e,f7=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:d7(e);function h7(e){const t=Go(e);return uD(t)(t.values.map((r,i)=>f7(r,t.split[i])))}const Lr={test:i7,parse:c7,createTransformer:u7,getAnimatableNone:h7};function Qy(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 m7({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,l=0,c=0;if(!t)i=l=c=n;else{const d=n<.5?n*(1+t):n+t-n*t,f=2*n-d;i=Qy(f,d,e+1/3),l=Qy(f,d,e),c=Qy(f,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:r}}function jh(e,t){return n=>n>0?t:e}const ft=(e,t,n)=>e+(t-e)*n,Jy=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},p7=[j1,ys,Mo],x7=e=>p7.find(t=>t.test(e));function VO(e){const t=x7(e);if(!t)return!1;let n=t.parse(e);return t===Mo&&(n=m7(n)),n}const HO=(e,t)=>{const n=VO(e),r=VO(t);if(!n||!r)return jh(e,t);const i={...n};return l=>(i.red=Jy(n.red,r.red,l),i.green=Jy(n.green,r.green,l),i.blue=Jy(n.blue,r.blue,l),i.alpha=ft(n.alpha,r.alpha,l),ys.transform(i))},w1=new Set(["none","hidden"]);function y7(e,t){return w1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function g7(e,t){return n=>ft(e,t,n)}function Vw(e){return typeof e=="number"?g7:typeof e=="string"?Iw(e)?jh:Ut.test(e)?HO:j7:Array.isArray(e)?dD:typeof e=="object"?Ut.test(e)?HO:v7:jh}function dD(e,t){const n=[...e],r=n.length,i=e.map((l,c)=>Vw(l)(l,t[c]));return l=>{for(let c=0;c<r;c++)n[c]=i[c](l);return n}}function v7(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vw(e[i])(e[i],t[i]));return i=>{for(const l in r)n[l]=r[l](i);return n}}function b7(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const l=t.types[i],c=e.indexes[l][r[l]],d=e.values[c]??0;n[i]=d,r[l]++}return n}const j7=(e,t)=>{const n=Lr.createTransformer(t),r=Go(e),i=Go(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?w1.has(e)&&!i.values.length||w1.has(t)&&!r.values.length?y7(e,t):Qu(dD(b7(r,i),i.values),n):jh(e,t)};function fD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ft(e,t,n):Vw(e)(e,t)}const w7=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>Mi(t),now:()=>cn.isProcessing?cn.timestamp:bn.now()}},hD=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let l=0;l<i;l++)r+=Math.round(e(l/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wh=2e4;function Hw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<wh;)t+=n,r=e.next(t);return t>=wh?1/0:t}function S7(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Hw(r),wh);return{type:"keyframes",ease:l=>r.next(i*l).value/t,duration:xr(i)}}const kt={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 S1(e,t){return e*Math.sqrt(1-t*t)}const N7=12;function A7(e,t,n){let r=n;for(let i=1;i<N7;i++)r=r-e(r)/t(r);return r}const eg=.001;function _7({duration:e=kt.duration,bounce:t=kt.bounce,velocity:n=kt.velocity,mass:r=kt.mass}){let i,l,c=1-t;c=ta(kt.minDamping,kt.maxDamping,c),e=ta(kt.minDuration,kt.maxDuration,xr(e)),c<1?(i=h=>{const p=h*c,x=p*e,y=p-n,j=S1(h,c),w=Math.exp(-x);return eg-y/j*w},l=h=>{const x=h*c*e,y=x*n+n,j=Math.pow(c,2)*Math.pow(h,2)*e,w=Math.exp(-x),S=S1(Math.pow(h,2),c);return(-i(h)+eg>0?-1:1)*((y-j)*w)/S}):(i=h=>{const p=Math.exp(-h*e),x=(h-n)*e+1;return-eg+p*x},l=h=>{const p=Math.exp(-h*e),x=(n-h)*(e*e);return p*x});const d=5/e,f=A7(i,l,d);if(e=Zn(e),isNaN(f))return{stiffness:kt.stiffness,damping:kt.damping,duration:e};{const h=Math.pow(f,2)*r;return{stiffness:h,damping:c*2*Math.sqrt(r*h),duration:e}}}const O7=["duration","bounce"],T7=["stiffness","damping","mass"];function FO(e,t){return t.some(n=>e[n]!==void 0)}function E7(e){let t={velocity:kt.velocity,stiffness:kt.stiffness,damping:kt.damping,mass:kt.mass,isResolvedFromDuration:!1,...e};if(!FO(e,T7)&&FO(e,O7))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,l=2*ta(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:kt.mass,stiffness:i,damping:l}}else{const n=_7({...e,velocity:0});t={...t,...n,mass:kt.mass},t.isResolvedFromDuration=!0}return t}function Sh(e=kt.visualDuration,t=kt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const l=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:h,mass:p,duration:x,velocity:y,isResolvedFromDuration:j}=E7({...n,velocity:-xr(n.velocity||0)}),w=y||0,S=h/(2*Math.sqrt(f*p)),v=c-l,_=xr(Math.sqrt(f/p)),O=Math.abs(v)<5;r||(r=O?kt.restSpeed.granular:kt.restSpeed.default),i||(i=O?kt.restDelta.granular:kt.restDelta.default);let A,T,N,E,k,R;if(S<1)N=S1(_,S),E=(w+S*_*v)/N,A=D=>{const z=Math.exp(-S*_*D);return c-z*(E*Math.sin(N*D)+v*Math.cos(N*D))},k=S*_*E+v*N,R=S*_*v-E*N,T=D=>Math.exp(-S*_*D)*(k*Math.sin(N*D)+R*Math.cos(N*D));else if(S===1){A=z=>c-Math.exp(-_*z)*(v+(w+_*v)*z);const D=w+_*v;T=z=>Math.exp(-_*z)*(_*D*z-w)}else{const D=_*Math.sqrt(S*S-1);A=Y=>{const K=Math.exp(-S*_*Y),B=Math.min(D*Y,300);return c-K*((w+S*_*v)*Math.sinh(B)+D*v*Math.cosh(B))/D};const z=(w+S*_*v)/D,$=S*_*z-v*D,F=S*_*v-z*D;T=Y=>{const K=Math.exp(-S*_*Y),B=Math.min(D*Y,300);return K*($*Math.sinh(B)+F*Math.cosh(B))}}const L={calculatedDuration:j&&x||null,velocity:D=>Zn(T(D)),next:D=>{if(!j&&S<1){const $=Math.exp(-S*_*D),F=Math.sin(N*D),Y=Math.cos(N*D),K=c-$*(E*F+v*Y),B=Zn($*(k*F+R*Y));return d.done=Math.abs(B)<=r&&Math.abs(c-K)<=i,d.value=d.done?c:K,d}const z=A(D);if(j)d.done=D>=x;else{const $=Zn(T(D));d.done=Math.abs($)<=r&&Math.abs(c-z)<=i}return d.value=d.done?c:z,d},toString:()=>{const D=Math.min(Hw(L),wh),z=hD($=>L.next(D*$).value,D,30);return D+"ms "+z},toTransition:()=>{}};return L}Sh.applyToOptions=e=>{const t=S7(e,100,Sh);return e.ease=t.ease,e.duration=Zn(t.duration),e.type="keyframes",e};const C7=5;function mD(e,t,n){const r=Math.max(t-C7,0);return KR(n-e(r),t-r)}function N1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:l=500,modifyTarget:c,min:d,max:f,restDelta:h=.5,restSpeed:p}){const x=e[0],y={done:!1,value:x},j=R=>d!==void 0&&R<d||f!==void 0&&R>f,w=R=>d===void 0?f:f===void 0||Math.abs(d-R)<Math.abs(f-R)?d:f;let S=n*t;const v=x+S,_=c===void 0?v:c(v);_!==v&&(S=_-x);const O=R=>-S*Math.exp(-R/r),A=R=>_+O(R),T=R=>{const L=O(R),D=A(R);y.done=Math.abs(L)<=h,y.value=y.done?_:D};let N,E;const k=R=>{j(y.value)&&(N=R,E=Sh({keyframes:[y.value,w(y.value)],velocity:mD(A,R,y.value),damping:i,stiffness:l,restDelta:h,restSpeed:p}))};return k(0),{calculatedDuration:null,next:R=>{let L=!1;return!E&&N===void 0&&(L=!0,T(R),k(R)),N!==void 0&&R>=N?E.next(R-N):(!L&&T(R),y)}}}function M7(e,t,n){const r=[],i=n||Ci.mix||fD,l=e.length-1;for(let c=0;c<l;c++){let d=i(e[c],e[c+1]);if(t){const f=Array.isArray(t)?t[c]||vr:t;d=Qu(f,d)}r.push(d)}return r}function k7(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const l=e.length;if(zw(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=M7(t,r,i),f=d.length,h=p=>{if(c&&p<e[0])return t[0];let x=0;if(f>1)for(;x<e.length-2&&!(p<e[x+1]);x++);const y=uu(e[x],e[x+1],p);return d[x](y)};return n?p=>h(ta(e[0],e[l-1],p)):h}function P7(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=uu(0,t,r);e.push(ft(n,1,i))}}function R7(e){const t=[0];return P7(t,e.length-1),t}function D7(e,t){return e.map(n=>n*t)}function z7(e,t){return e.map(()=>t||nD).splice(0,e.length-1)}function Qc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Hq(r)?r.map(BO):BO(r),l={done:!1,value:t[0]},c=D7(n&&n.length===t.length?n:R7(t),e),d=k7(c,t,{ease:Array.isArray(i)?i:z7(t,i)});return{calculatedDuration:e,next:f=>(l.value=d(f),l.done=f>=e,l)}}const L7=e=>e!==null;function Im(e,{repeat:t,repeatType:n="loop"},r,i=1){const l=e.filter(L7),d=i<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!d||r===void 0?l[d]:r}const $7={decay:N1,inertia:N1,tween:Qc,keyframes:Qc,spring:Sh};function pD(e){typeof e.type=="string"&&(e.type=$7[e.type])}class Fw{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 B7=e=>e/100;class Nh extends Fw{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!==bn.now()&&this.tick(bn.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;pD(t);const{type:n=Qc,repeat:r=0,repeatDelay:i=0,repeatType:l,velocity:c=0}=t;let{keyframes:d}=t;const f=n||Qc;f!==Qc&&typeof d[0]!="number"&&(this.mixKeyframes=Qu(B7,fD(d[0],d[1])),d=[0,100]);const h=f({...t,keyframes:d});l==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...d].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=Hw(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+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:l,mirroredGenerator:c,resolvedDuration:d,calculatedDuration:f}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:p,repeat:x,repeatType:y,repeatDelay:j,type:w,onUpdate:S,finalKeyframe:v}=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 _=this.currentTime-h*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let A=this.currentTime,T=r;if(x){const R=Math.min(this.currentTime,i)/d;let L=Math.floor(R),D=R%1;!D&&R>=1&&(D=1),D===1&&L--,L=Math.min(L,x+1),!!(L%2)&&(y==="reverse"?(D=1-D,j&&(D-=j/d)):y==="mirror"&&(T=c)),A=ta(0,1,D)*d}let N;O?(this.delayState.value=p[0],N=this.delayState):N=T.next(A),l&&!O&&(N.value=l(N.value));let{done:E}=N;!O&&f!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&w!==N1&&(N.value=Im(p,this.options,v,this.speed)),S&&S(N.value),k&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return xr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+xr(t)}get time(){return xr(this.currentTime)}set time(t){t=Zn(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 mD(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(bn.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=xr(this.currentTime))}play(){var i,l;if(this.isStopped)return;const{driver:t=w7,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(l=(i=this.options).onPlay)==null||l.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(bn.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 I7(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const gs=e=>e*180/Math.PI,A1=e=>{const t=gs(Math.atan2(e[1],e[0]));return _1(t)},q7={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:A1,rotateZ:A1,skewX:e=>gs(Math.atan(e[1])),skewY:e=>gs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_1=e=>(e=e%360,e<0&&(e+=360),e),GO=A1,KO=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),YO=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),U7={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:KO,scaleY:YO,scale:e=>(KO(e)+YO(e))/2,rotateX:e=>_1(gs(Math.atan2(e[6],e[5]))),rotateY:e=>_1(gs(Math.atan2(-e[2],e[0]))),rotateZ:GO,rotate:GO,skewX:e=>gs(Math.atan(e[4])),skewY:e=>gs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function O1(e){return e.includes("scale")?1:0}function T1(e,t){if(!e||e==="none")return O1(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=U7,i=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=q7,i=d}if(!i)return O1(t);const l=r[t],c=i[1].split(",").map(H7);return typeof l=="function"?l(c):c[l]}const V7=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return T1(n,t)};function H7(e){return parseFloat(e.trim())}const _l=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ol=new Set([..._l,"pathRotation"]),XO=e=>e===Al||e===xe,F7=new Set(["x","y","z"]),G7=_l.filter(e=>!F7.has(e));function K7(e){const t=[];return G7.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const _i={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})=>T1(t,"x"),y:(e,{transform:t})=>T1(t,"y")};_i.translateX=_i.x;_i.translateY=_i.y;const Ss=new Set;let E1=!1,C1=!1,M1=!1;function xD(){if(C1){const e=Array.from(Ss).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=K7(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(([l,c])=>{var d;(d=r.getValue(l))==null||d.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}C1=!1,E1=!1,Ss.forEach(e=>e.complete(M1)),Ss.clear()}function yD(){Ss.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(C1=!0)})}function Y7(){M1=!0,yD(),xD(),M1=!1}class Gw{constructor(t,n,r,i,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Ss.add(this),E1||(E1=!0,ht.read(yD),ht.resolveKeyframes(xD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const l=i==null?void 0:i.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(r&&n){const d=r.readValue(n,c);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=c),i&&l===void 0&&i.set(t[0])}I7(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ss.delete(this)}cancel(){this.state==="scheduled"&&(Ss.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const X7=e=>e.startsWith("--");function gD(e,t,n){X7(t)?e.style.setProperty(t,n):e.style[t]=n}const W7={};function vD(e,t){const n=GR(e);return()=>W7[t]??n()}const Z7=vD(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),bD=vD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Kc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,WO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kc([0,.65,.55,1]),circOut:Kc([.55,0,1,.45]),backIn:Kc([.31,.01,.66,-.59]),backOut:Kc([.33,1.53,.69,.99])};function jD(e,t){if(e)return typeof e=="function"?bD()?hD(e,t):"ease-out":rD(e)?Kc(e):Array.isArray(e)?e.map(n=>jD(n,t)||WO.easeOut):WO[e]}function Q7(e,t,n,{delay:r=0,duration:i=300,repeat:l=0,repeatType:c="loop",ease:d="easeOut",times:f}={},h=void 0){const p={[t]:n};f&&(p.offset=f);const x=jD(d,i);Array.isArray(x)&&(p.easing=x);const y={delay:r,duration:i,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(y.pseudoElement=h),e.animate(p,y)}function wD(e){return typeof e=="function"&&"applyToOptions"in e}function J7({type:e,...t}){return wD(e)&&bD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class SD extends Fw{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:d,onComplete:f}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,zw(typeof t.type!="string");const h=J7(t);this.animation=Q7(n,r,i,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const p=Im(i,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(p),gD(n,r,p),this.animation.cancel()}f==null||f(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return xr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+xr(t)}get time(){return xr(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Zn(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 l;return this.allowFlatten&&((l=this.animation.effect)==null||l.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Z7()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),vr):i(this)}}const ND={anticipate:JR,backInOut:QR,circInOut:tD};function e9(e){return e in ND}function t9(e){typeof e.ease=="string"&&e9(e.ease)&&(e.ease=ND[e.ease])}const tg=10;class n9 extends SD{constructor(t){t9(t),pD(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:l,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const d=new Nh({...c,autoplay:!1}),f=Math.max(tg,bn.now()-this.startTime),h=ta(0,tg,f-tg),p=d.sample(f).value,{name:x}=this.options;l&&x&&gD(l,x,p),n.setWithVelocity(d.sample(Math.max(0,f-h)).value,p,h),d.stop()}}const ZO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Lr.test(e)||e==="0")&&!e.startsWith("url("));function r9(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 a9(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=ZO(i,t),d=ZO(l,t);return!c||!d?!1:r9(e)||(n==="spring"||wD(n))&&r}function k1(e){e.duration=0,e.type="keyframes"}const AD=new Set(["opacity","clipPath","filter","transform"]),i9=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function s9(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&i9.test(e[t]))return!0;return!1}const o9=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),l9=GR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function c9(e){var x;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:l,type:c,keyframes:d}=e;if(!(((x=t==null?void 0:t.owner)==null?void 0:x.current)instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:p}=t.owner.getProps();return l9()&&n&&(AD.has(n)||o9.has(n)&&s9(d))&&(n!=="transform"||!p)&&!h&&!r&&i!=="mirror"&&l!==0&&c!=="inertia"}const u9=40;class d9 extends Fw{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:l=0,repeatType:c="loop",keyframes:d,name:f,motionValue:h,element:p,...x}){var w;super(),this.stop=()=>{var S,v;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=bn.now();const y={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:l,repeatType:c,name:f,motionValue:h,element:p,...x},j=(p==null?void 0:p.KeyframeResolver)||Gw;this.keyframeResolver=new j(d,(S,v,_)=>this.onKeyframesResolved(S,v,y,!_),f,h,p),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,i){var _,O;this.keyframeResolver=void 0;const{name:l,type:c,velocity:d,delay:f,isHandoff:h,onUpdate:p}=r;this.resolvedAt=bn.now();let x=!0;a9(t,l,c,d)||(x=!1,(Ci.instantAnimations||!f)&&(p==null||p(Im(t,r,n))),t[0]=t[t.length-1],k1(r),r.repeat=0);const j={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>u9?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=x&&!h&&c9(j),S=(O=(_=j.motionValue)==null?void 0:_.owner)==null?void 0:O.current;let v;if(w)try{v=new n9({...j,element:S})}catch{v=new Nh(j)}else v=new Nh(j);v.finished.then(()=>{this.notifyFinished()}).catch(vr),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}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(),Y7()),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 _D(e,t,n,r=0,i=1){const l=Array.from(e).sort((h,p)=>h.sortNodePosition(p)).indexOf(t),c=e.size,d=(c-1)*r;return typeof n=="function"?n(l,c):i===1?l*r:d-l*r}const QO=30,f9=e=>!isNaN(parseFloat(e));class h9{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var l;const i=bn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=f9(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 Lw);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.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=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>QO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,QO);return KR(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 Ko(e,t){return new h9(e,t)}function OD(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Kw(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?OD(n,e):n}const m9={type:"spring",stiffness:500,damping:25,restSpeed:10},p9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),x9={type:"keyframes",duration:.8},y9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},g9=(e,{keyframes:t})=>t.length>2?x9:Ol.has(e)?e.startsWith("scale")?p9(t[1]):m9:y9,v9=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function b9(e){for(const t in e)if(!v9.has(t))return!0;return!1}const Yw=(e,t,n,r={},i,l)=>c=>{const d=Kw(r,e)||{},f=d.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Zn(f);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-h,onUpdate:y=>{t.set(y),d.onUpdate&&d.onUpdate(y)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:i};b9(d)||Object.assign(p,g9(e,p)),p.duration&&(p.duration=Zn(p.duration)),p.repeatDelay&&(p.repeatDelay=Zn(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let x=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(k1(p),p.delay===0&&(x=!0)),(Ci.instantAnimations||Ci.skipAnimations||i!=null&&i.shouldSkipAnimations||d.skipAnimations)&&(x=!0,k1(p),p.delay=0),p.allowFlatten=!d.type&&!d.ease,x&&!l&&t.get()!==void 0){const y=Im(p.keyframes,d);if(y!==void 0){ht.update(()=>{p.onUpdate(y),p.onComplete()});return}}return d.isSync?new Nh(p):new d9(p)},j9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function w9(e){const t=j9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function TD(e,t,n=1){const[r,i]=w9(e);if(!r)return;const l=window.getComputedStyle(t).getPropertyValue(r);if(l){const c=l.trim();return VR(c)?parseFloat(c):c}return Iw(i)?TD(i,t,n+1):i}function JO(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xw(e,t,n,r){if(typeof t=="function"){const[i,l]=JO(r);t=t(n!==void 0?n:e.custom,i,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,l]=JO(r);t=t(n!==void 0?n:e.custom,i,l)}return t}function Ns(e,t,n){const r=e.getProps();return Xw(r,t,n!==void 0?n:r.custom,e)}const ED=new Set(["width","height","top","left","right","bottom",..._l]),P1=e=>Array.isArray(e);function S9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ko(n))}function N9(e){return P1(e)?e[e.length-1]||0:e}function A9(e,t){const n=Ns(e,t);let{transitionEnd:r={},transition:i={},...l}=n||{};l={...l,...r};for(const c in l){const d=N9(l[c]);S9(e,c,d)}}const un=e=>!!(e&&e.getVelocity);function _9(e){return!!(un(e)&&e.add)}function R1(e,t){const n=e.getValue("willChange");if(_9(n))return n.add(t);if(!n&&Ci.WillChange){const r=new Ci.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ww(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const O9="framerAppearId",CD="data-"+Ww(O9);function MD(e){return e.props[CD]}function T9({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function kD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:l,transitionEnd:c,...d}=t;const f=e.getDefaultTransition();l=l?OD(l,f):f;const h=l==null?void 0:l.reduceMotion,p=l==null?void 0:l.skipAnimations;r&&(l=r);const x=[],y=i&&e.animationState&&e.animationState.getState()[i],j=l==null?void 0:l.path;j&&j.animateVisualElement(e,d,l,n,x);for(const w in d){const S=e.getValue(w,e.latestValues[w]??null),v=d[w];if(v===void 0||y&&T9(y,w))continue;const _={delay:n,...Kw(l||{},w)};p&&(_.skipAnimations=!0);const O=S.get();if(O!==void 0&&!S.isAnimating()&&!Array.isArray(v)&&v===O&&!_.velocity){ht.update(()=>S.set(v));continue}let A=!1;if(window.MotionHandoffAnimation){const E=MD(e);if(E){const k=window.MotionHandoffAnimation(E,w,ht);k!==null&&(_.startTime=k,A=!0)}}R1(e,w);const T=h??e.shouldReduceMotion;S.start(Yw(w,S,v,T&&ED.has(w)?{type:!1}:_,e,A));const N=S.animation;N&&x.push(N)}if(c){const w=()=>ht.update(()=>{c&&A9(e,c)});x.length?Promise.all(x).then(w):w()}return x}function D1(e,t,n={}){var f;const r=Ns(e,t,n.type==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const l=r?()=>Promise.all(kD(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:p=0,staggerChildren:x,staggerDirection:y}=i;return E9(e,t,h,p,x,y,n)}:()=>Promise.resolve(),{when:d}=i;if(d){const[h,p]=d==="beforeChildren"?[l,c]:[c,l];return h().then(()=>p())}else return Promise.all([l(),c(n.delay)])}function E9(e,t,n=0,r=0,i=0,l=1,c){const d=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),d.push(D1(f,t,{...c,delay:n+(typeof r=="function"?0:r)+_D(e.variantChildren,f,r,i,l)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(d)}function C9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(l=>D1(e,l,n));r=Promise.all(i)}else if(typeof t=="string")r=D1(e,t,n);else{const i=typeof t=="function"?Ns(e,t,n.custom):t;r=Promise.all(kD(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const M9={test:e=>e==="auto",parse:e=>e},PD=e=>t=>t.test(e),RD=[Al,xe,Wr,Ta,r7,n7,M9],eT=e=>RD.find(PD(e));function k9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||FR(e):!0}const P9=new Set(["brightness","contrast","saturate","opacity"]);function R9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qw)||[];if(!r)return e;const i=n.replace(r,"");let l=P9.has(t)?1:0;return r!==n&&(l*=100),t+"("+l+i+")"}const D9=/\b([a-z-]*)\(.*?\)/gu,z1={...Lr,getAnimatableNone:e=>{const t=e.match(D9);return t?t.map(R9).join(" "):e}},L1={...Lr,getAnimatableNone:e=>{const t=Lr.parse(e);return Lr.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},tT={...Al,transform:Math.round},z9={rotate:Ta,pathRotation:Ta,rotateX:Ta,rotateY:Ta,rotateZ:Ta,scale:Df,scaleX:Df,scaleY:Df,scaleZ:Df,skew:Ta,skewX:Ta,skewY:Ta,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:du,originX:qO,originY:qO,originZ:xe},Ah={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,...z9,zIndex:tT,fillOpacity:du,strokeOpacity:du,numOctaves:tT},L9={...Ah,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:z1,WebkitFilter:z1,mask:L1,WebkitMask:L1},DD=e=>L9[e],$9=new Set([z1,L1]);function zD(e,t){let n=DD(e);return $9.has(n)||(n=Lr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B9=new Set(["auto","none","0"]);function I9(e,t,n){let r=0,i;for(;r<e.length&&!i;){const l=e[r];typeof l=="string"&&!B9.has(l)&&Go(l).values.length&&(i=e[r]),r++}if(i&&n)for(const l of t)e[l]=zD(n,i)}class q9 extends Gw{constructor(t,n,r,i,l){super(t,n,r,i,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let p=0;p<t.length;p++){let x=t[p];if(typeof x=="string"&&(x=x.trim(),Iw(x))){const y=TD(x,n.current);y!==void 0&&(t[p]=y),p===t.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!ED.has(r)||t.length!==2)return;const[i,l]=t,c=eT(i),d=eT(l),f=IO(i),h=IO(l);if(f!==h&&_i[r]){this.needsMeasurement=!0;return}if(c!==d)if(XO(c)&&XO(d))for(let p=0;p<t.length;p++){const x=t[p];typeof x=="string"&&(t[p]=parseFloat(x))}else _i[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||k9(t[i]))&&r.push(i);r.length&&I9(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=_i[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 d;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 l=r.length-1,c=r[l];r[l]=_i[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(d=this.removedTransforms)!=null&&d.length&&this.removedTransforms.forEach(([f,h])=>{t.getValue(f).set(h)}),this.resolveNoneKeyframes()}}const Zw=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function LD(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 $1=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function lh(e){return HR(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Qw}=aD(queueMicrotask,!1),kr={x:!1,y:!1};function $D(){return kr.x||kr.y}function U9(e){return e==="x"||e==="y"?kr[e]?null:(kr[e]=!0,()=>{kr[e]=!1}):kr.x||kr.y?null:(kr.x=kr.y=!0,()=>{kr.x=kr.y=!1})}function BD(e,t){const n=LD(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function V9(e){return!(e.pointerType==="touch"||$D())}function H9(e,t,n={}){const[r,i,l]=BD(e,n);return r.forEach(c=>{let d=!1,f=!1,h;const p=()=>{c.removeEventListener("pointerleave",w)},x=v=>{h&&(h(v),h=void 0),p()},y=v=>{d=!1,window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),f&&(f=!1,x(v))},j=()=>{d=!0,window.addEventListener("pointerup",y,i),window.addEventListener("pointercancel",y,i)},w=v=>{if(v.pointerType!=="touch"){if(d){f=!0;return}x(v)}},S=v=>{if(!V9(v))return;f=!1;const _=t(c,v);typeof _=="function"&&(h=_,c.addEventListener("pointerleave",w,i))};c.addEventListener("pointerenter",S,i),c.addEventListener("pointerdown",j,i)}),l}const ID=(e,t)=>t?e===t?!0:ID(e,t.parentElement):!1,Jw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,F9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function G9(e){return F9.has(e.tagName)||e.isContentEditable===!0}const K9=new Set(["INPUT","SELECT","TEXTAREA"]);function Y9(e){return K9.has(e.tagName)||e.isContentEditable===!0}const ch=new WeakSet;function nT(e){return t=>{t.key==="Enter"&&e(t)}}function ng(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const X9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=nT(()=>{if(ch.has(n))return;ng(n,"down");const i=nT(()=>{ng(n,"up")}),l=()=>ng(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function rT(e){return Jw(e)&&!$D()}const aT=new WeakSet;function W9(e,t,n={}){const[r,i,l]=BD(e,n),c=d=>{const f=d.currentTarget;if(!rT(d)||aT.has(d))return;ch.add(f),n.stopPropagation&&aT.add(d);const h=t(f,d),p={...i,capture:!0},x=(w,S)=>{window.removeEventListener("pointerup",y,p),window.removeEventListener("pointercancel",j,p),ch.has(f)&&ch.delete(f),rT(w)&&typeof h=="function"&&h(w,{success:S})},y=w=>{x(w,f===window||f===document||n.useGlobalTarget||ID(f,w.target))},j=w=>{x(w,!1)};window.addEventListener("pointerup",y,p),window.addEventListener("pointercancel",j,p)};return r.forEach(d=>{(n.useGlobalTarget?window:d).addEventListener("pointerdown",c,i),lh(d)&&(d.addEventListener("focus",h=>X9(h,i)),!G9(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}function eS(e){return HR(e)&&"ownerSVGElement"in e}const uh=new WeakMap;let Si;const qD=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:eS(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Z9=qD("inline","width","offsetWidth"),Q9=qD("block","height","offsetHeight");function J9({target:e,borderBoxSize:t}){var n;(n=uh.get(e))==null||n.forEach(r=>{r(e,{get width(){return Z9(e,t)},get height(){return Q9(e,t)}})})}function eU(e){e.forEach(J9)}function tU(){typeof ResizeObserver>"u"||(Si=new ResizeObserver(eU))}function nU(e,t){Si||tU();const n=LD(e);return n.forEach(r=>{let i=uh.get(r);i||(i=new Set,uh.set(r,i)),i.add(t),Si==null||Si.observe(r)}),()=>{n.forEach(r=>{const i=uh.get(r);i==null||i.delete(t),i!=null&&i.size||Si==null||Si.unobserve(r)})}}const dh=new Set;let ko;function rU(){ko=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};dh.forEach(t=>t(e))},window.addEventListener("resize",ko)}function aU(e){return dh.add(e),ko||rU(),()=>{dh.delete(e),!dh.size&&typeof ko=="function"&&(window.removeEventListener("resize",ko),ko=void 0)}}function iT(e,t){return typeof e=="function"?aU(e):nU(e,t)}function iU(e){return eS(e)&&e.tagName==="svg"}const sU=[...RD,Ut,Lr],oU=e=>sU.find(PD(e)),sT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:sT(),y:sT()}),oT=()=>({min:0,max:0}),Kt=()=>({x:oT(),y:oT()}),lU=new WeakMap;function qm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function fu(e){return typeof e=="string"||Array.isArray(e)}const tS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nS=["initial",...tS];function Um(e){return qm(e.animate)||nS.some(t=>fu(e[t]))}function UD(e){return!!(Um(e)||e.variants)}function cU(e,t,n){for(const r in t){const i=t[r],l=n[r];if(un(i))e.addValue(r,i);else if(un(l))e.addValue(r,Ko(i,{owner:e}));else if(l!==i)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(i):c.hasAnimated||c.set(i)}else{const c=e.getStaticValue(r);e.addValue(r,Ko(c!==void 0?c:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const B1={current:null},VD={current:!1},uU=typeof window<"u";function dU(){if(VD.current=!0,!!uU)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>B1.current=e.matches;e.addEventListener("change",t),t()}else B1.current=!1}const lT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _h={};function HD(e){_h=e}function fU(){return _h}class hU{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:l,blockInitialAnimation:c,visualState:d},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Gw,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=bn.now();this.renderScheduledAt<j&&(this.renderScheduledAt=j,ht.render(this.render,!1,!0))};const{latestValues:h,renderState:p}=d;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=p,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=l,this.options=f,this.blockInitialAnimation=!!c,this.isControllingVariants=Um(n),this.isVariantNode=UD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:x,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const j in y){const w=y[j];h[j]!==void 0&&un(w)&&w.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,lU.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,l)=>this.bindToMotionValue(l,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(VD.current||dU(),this.shouldReduceMotion=B1.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(),Mi(this.notifyUpdate),Mi(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&&AD.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:d,times:f,ease:h,duration:p}=n.accelerate,x=new SD({element:this.current,name:t,keyframes:d,times:f,ease:h,duration:Zn(p)}),y=c(x);this.valueSubscriptions.set(t,()=>{y(),x.cancel()});return}const r=Ol.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),l&&l()})}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 _h){const n=_h[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 l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Kt()}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<lT.length;r++){const i=lT[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const l="on"+i,c=t[l];c&&(this.propEventSubscriptions[i]=this.on(i,c))}this.prevMotionValues=cU(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=Ko(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"&&(VR(r)||FR(r))?r=parseFloat(r):!oU(r)&&Lr.test(n)&&(r=zD(t,n)),this.setBaseTarget(t,un(r)?r.get():r)),un(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var l;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=Xw(this.props,n,(l=this.presenceContext)==null?void 0:l.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!un(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Lw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Qw.render(this.render)}}class FD extends hU{constructor(){super(...arguments),this.KeyframeResolver=q9}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class $i{constructor(t){this.isMounted=!1,this.node=t}update(){}}function GD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mU({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pU(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 rg(e){return e===void 0||e===1}function I1({scale:e,scaleX:t,scaleY:n}){return!rg(e)||!rg(t)||!rg(n)}function fs(e){return I1(e)||KD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function KD(e){return cT(e.x)||cT(e.y)}function cT(e){return e&&e!=="0%"}function Oh(e,t,n){const r=e-n,i=t*r;return n+i}function uT(e,t,n,r,i){return i!==void 0&&(e=Oh(e,i,r)),Oh(e,n,r)+t}function q1(e,t=0,n=1,r,i){e.min=uT(e.min,t,n,r,i),e.max=uT(e.max,t,n,r,i)}function YD(e,{x:t,y:n}){q1(e.x,t.translate,t.scale,t.originPoint),q1(e.y,n.translate,n.scale,n.originPoint)}const dT=.999999999999,fT=1.0000000000001;function xU(e,t,n,r=!1){var d;const i=n.length;if(!i)return;t.x=t.y=1;let l,c;for(let f=0;f<i;f++){l=n[f],c=l.projectionDelta;const{visualElement:h}=l.options;h&&h.props.style&&h.props.style.display==="contents"||(r&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Yr(e.x,-l.scroll.offset.x),Yr(e.y,-l.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,YD(e,c)),r&&fs(l.latestValues)&&fh(e,l.latestValues,(d=l.layout)==null?void 0:d.layoutBox))}t.x<fT&&t.x>dT&&(t.x=1),t.y<fT&&t.y>dT&&(t.y=1)}function Yr(e,t){e.min+=t,e.max+=t}function hT(e,t,n,r,i=.5){const l=ft(e.min,e.max,i);q1(e,t,n,l,r)}function mT(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function fh(e,t,n){const r=n??e;hT(e.x,mT(t.x,r.x),t.scaleX,t.scale,t.originX),hT(e.y,mT(t.y,r.y),t.scaleY,t.scale,t.originY)}function XD(e,t){return GD(pU(e.getBoundingClientRect(),t))}function yU(e,t,n){const r=XD(e,n),{scroll:i}=t;return i&&(Yr(r.x,i.offset.x),Yr(r.y,i.offset.y)),r}const gU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vU=_l.length;function bU(e,t,n){let r="",i=!0;for(let c=0;c<vU;c++){const d=_l[c],f=e[d];if(f===void 0)continue;let h=!0;if(typeof f=="number")h=f===(d.startsWith("scale")?1:0);else{const p=parseFloat(f);h=d.startsWith("scale")?p===1:p===0}if(!h||n){const p=$1(f,Ah[d]);if(!h){i=!1;const x=gU[d]||d;r+=`${x}(${p}) `}n&&(t[d]=p)}}const l=e.pathRotation;return l&&(i=!1,r+=`rotate(${$1(l,Ah.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function rS(e,t,n){const{style:r,vars:i,transformOrigin:l}=e;let c=!1,d=!1;for(const f in t){const h=t[f];if(Ol.has(f)){c=!0;continue}else if(sD(f)){i[f]=h;continue}else{const p=$1(h,Ah[f]);f.startsWith("origin")?(d=!0,l[f]=p):r[f]=p}}if(t.transform||(c||n?r.transform=bU(t,e.transform,n):r.transform&&(r.transform="none")),d){const{originX:f="50%",originY:h="50%",originZ:p=0}=l;r.transformOrigin=`${f} ${h} ${p}`}}function WD(e,{style:t,vars:n},r,i){const l=e.style;let c;for(c in t)l[c]=t[c];i==null||i.applyProjectionStyles(l,r);for(c in n)l.setProperty(c,n[c])}function pT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=pT(e,t.target.x),r=pT(e,t.target.y);return`${n}% ${r}%`}},jU={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Lr.parse(e);if(i.length>5)return r;const l=Lr.createTransformer(e),c=typeof i[0]!="number"?1:0,d=n.x.scale*t.x,f=n.y.scale*t.y;i[0+c]/=d,i[1+c]/=f;const h=ft(d,f,.5);return typeof i[2+c]=="number"&&(i[2+c]/=h),typeof i[3+c]=="number"&&(i[3+c]/=h),l(i)}},U1={borderRadius:{...Rc,applyTo:[...Zw]},borderTopLeftRadius:Rc,borderTopRightRadius:Rc,borderBottomLeftRadius:Rc,borderBottomRightRadius:Rc,boxShadow:jU};function ZD(e,{layout:t,layoutId:n}){return Ol.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!U1[e]||e==="opacity")}function aS(e,t,n){var c;const r=e.style,i=t==null?void 0:t.style,l={};if(!r)return l;for(const d in r)(un(r[d])||i&&un(i[d])||ZD(d,e)||((c=n==null?void 0:n.getValue(d))==null?void 0:c.liveStyle)!==void 0)&&(l[d]=r[d]);return l}function wU(e){return window.getComputedStyle(e)}class SU extends FD{constructor(){super(...arguments),this.type="html",this.renderInstance=WD}readValueFromInstance(t,n){var r;if(Ol.has(n))return(r=this.projection)!=null&&r.isProjecting?O1(n):V7(t,n);{const i=wU(t),l=(sD(n)?i.getPropertyValue(n):i[n])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(t,{transformPagePoint:n}){return XD(t,n)}build(t,n,r){rS(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return aS(t,n,r)}}const NU={offset:"stroke-dashoffset",array:"stroke-dasharray"},AU={offset:"strokeDashoffset",array:"strokeDasharray"};function _U(e,t,n=1,r=0,i=!0){e.pathLength=1;const l=i?NU:AU;e[l.offset]=`${-r}`,e[l.array]=`${t} ${n}`}const OU=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function QD(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:l=1,pathOffset:c=0,...d},f,h,p){if(rS(e,d,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:y}=e;x.transform&&(y.transform=x.transform,delete x.transform),(y.transform||x.transformOrigin)&&(y.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),y.transform&&(y.transformBox=(p==null?void 0:p.transformBox)??"fill-box",delete x.transformBox);for(const j of OU)x[j]!==void 0&&(y[j]=x[j],delete x[j]);t!==void 0&&(x.x=t),n!==void 0&&(x.y=n),r!==void 0&&(x.scale=r),i!==void 0&&_U(x,i,l,c,!1)}const JD=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"]),e5=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TU(e,t,n,r){WD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(JD.has(i)?i:Ww(i),t.attrs[i])}function t5(e,t,n){const r=aS(e,t,n);for(const i in e)if(un(e[i])||un(t[i])){const l=_l.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[l]=e[i]}return r}class EU extends FD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ol.has(n)){const r=DD(n);return r&&r.default||0}return n=JD.has(n)?n:Ww(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return t5(t,n,r)}build(t,n,r){QD(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){TU(t,n,r,i)}mount(t){this.isSVGTag=e5(t.tagName),super.mount(t)}}const CU=nS.length;function n5(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?n5(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<CU;n++){const r=nS[n],i=e.props[r];(fu(i)||i===!1)&&(t[r]=i)}return t}function r5(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 MU=[...tS].reverse(),kU=tS.length;function PU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>C9(e,n,r)))}function RU(e){let t=PU(e),n=xT(),r=!0,i=!1;const l=h=>(p,x)=>{var j;const y=Ns(e,x,h==="exit"?(j=e.presenceContext)==null?void 0:j.custom:void 0);if(y){const{transition:w,transitionEnd:S,...v}=y;p={...p,...v,...S}}return p};function c(h){t=h(e)}function d(h){const{props:p}=e,x=n5(e.parent)||{},y=[],j=new Set;let w={},S=1/0;for(let _=0;_<kU;_++){const O=MU[_],A=n[O],T=p[O]!==void 0?p[O]:x[O],N=fu(T),E=O===h?A.isActive:null;E===!1&&(S=_);let k=T===x[O]&&T!==p[O]&&N;if(k&&(r||i)&&e.manuallyAnimateOnMount&&(k=!1),A.protectedKeys={...w},!A.isActive&&E===null||!T&&!A.prevProp||qm(T)||typeof T=="boolean")continue;if(O==="exit"&&A.isActive&&E!==!0){A.prevResolvedValues&&(w={...w,...A.prevResolvedValues});continue}const R=DU(A.prevProp,T);let L=R||O===h&&A.isActive&&!k&&N||_>S&&N,D=!1;const z=Array.isArray(T)?T:[T];let $=z.reduce(l(O),{});E===!1&&($={});const{prevResolvedValues:F={}}=A,Y={...F,...$},K=Q=>{L=!0,j.has(Q)&&(D=!0,j.delete(Q)),A.needsAnimating[Q]=!0;const ie=e.getValue(Q);ie&&(ie.liveStyle=!1)};for(const Q in Y){const ie=$[Q],ce=F[Q];if(w.hasOwnProperty(Q))continue;let I=!1;P1(ie)&&P1(ce)?I=!r5(ie,ce)||R:I=ie!==ce,I?ie!=null?K(Q):j.add(Q):ie!==void 0&&j.has(Q)?K(Q):A.protectedKeys[Q]=!0}A.prevProp=T,A.prevResolvedValues=$,A.isActive&&(w={...w,...$}),(r||i)&&e.blockInitialAnimation&&(L=!1);const B=k&&R;L&&(!B||D)&&y.push(...z.map(Q=>{const ie={type:O};if(typeof Q=="string"&&(r||i)&&!B&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,I=Ns(ce,Q);if(ce.enteringChildren&&I){const{delayChildren:G}=I.transition||{};ie.delay=_D(ce.enteringChildren,e,G)}}return{animation:Q,options:ie}}))}if(j.size){const _={};if(typeof p.initial!="boolean"){const O=Ns(e,Array.isArray(p.initial)?p.initial[0]:p.initial);O&&O.transition&&(_.transition=O.transition)}j.forEach(O=>{const A=e.getBaseTarget(O),T=e.getValue(O);T&&(T.liveStyle=!0),_[O]=A??null}),y.push({animation:_})}let v=!!y.length;return r&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,i=!1,v?t(y):Promise.resolve()}function f(h,p){var y;if(n[h].isActive===p)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(j=>{var w;return(w=j.animationState)==null?void 0:w.setActive(h,p)}),n[h].isActive=p;const x=d(h);for(const j in n)n[j].protectedKeys={};return x}return{animateChanges:d,setActive:f,setAnimateFunction:c,getState:()=>n,reset:()=>{n=xT(),i=!0}}}function DU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!r5(t,e):!1}function os(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xT(){return{animate:os(!0),whileInView:os(),whileHover:os(),whileTap:os(),whileDrag:os(),whileFocus:os(),exit:os()}}function V1(e,t){e.min=t.min,e.max=t.max}function Cr(e,t){V1(e.x,t.x),V1(e.y,t.y)}function yT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const a5=1e-4,zU=1-a5,LU=1+a5,i5=.01,$U=0-i5,BU=0+i5;function jn(e){return e.max-e.min}function IU(e,t,n){return Math.abs(e-t)<=n}function gT(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=jn(n)/jn(t),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zU&&e.scale<=LU||isNaN(e.scale))&&(e.scale=1),(e.translate>=$U&&e.translate<=BU||isNaN(e.translate))&&(e.translate=0)}function Jc(e,t,n,r){gT(e.x,t.x,n.x,r?r.originX:void 0),gT(e.y,t.y,n.y,r?r.originY:void 0)}function vT(e,t,n,r=0){const i=r?ft(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+jn(t)}function qU(e,t,n,r){vT(e.x,t.x,n.x,r==null?void 0:r.x),vT(e.y,t.y,n.y,r==null?void 0:r.y)}function bT(e,t,n,r=0){const i=r?ft(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+jn(t)}function Th(e,t,n,r){bT(e.x,t.x,n.x,r==null?void 0:r.x),bT(e.y,t.y,n.y,r==null?void 0:r.y)}function jT(e,t,n,r,i){return e-=t,e=Oh(e,1/n,r),i!==void 0&&(e=Oh(e,1/i,r)),e}function UU(e,t=0,n=1,r=.5,i,l=e,c=e){if(Wr.test(t)&&(t=parseFloat(t),t=ft(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=ft(l.min,l.max,r);e===l&&(d-=t),e.min=jT(e.min,t,n,d,i),e.max=jT(e.max,t,n,d,i)}function wT(e,t,[n,r,i],l,c){UU(e,t[n],t[r],t[i],t.scale,l,c)}const VU=["x","scaleX","originX"],HU=["y","scaleY","originY"];function ST(e,t,n,r){wT(e.x,t,VU,n?n.x:void 0,r?r.x:void 0),wT(e.y,t,HU,n?n.y:void 0,r?r.y:void 0)}function NT(e){return e.translate===0&&e.scale===1}function s5(e){return NT(e.x)&&NT(e.y)}function AT(e,t){return e.min===t.min&&e.max===t.max}function FU(e,t){return AT(e.x,t.x)&&AT(e.y,t.y)}function _T(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function o5(e,t){return _T(e.x,t.x)&&_T(e.y,t.y)}function OT(e){return jn(e.x)/jn(e.y)}function TT(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Kr(e){return[e("x"),e("y")]}function GU(e,t,n){let r="";const i=e.x.translate/t.x,l=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((i||l||c)&&(r=`translate3d(${i}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:p,pathRotation:x,rotateX:y,rotateY:j,skewX:w,skewY:S}=n;h&&(r=`perspective(${h}px) ${r}`),p&&(r+=`rotate(${p}deg) `),x&&(r+=`rotate(${x}deg) `),y&&(r+=`rotateX(${y}deg) `),j&&(r+=`rotateY(${j}deg) `),w&&(r+=`skewX(${w}deg) `),S&&(r+=`skewY(${S}deg) `)}const d=e.x.scale*t.x,f=e.y.scale*t.y;return(d!==1||f!==1)&&(r+=`scale(${d}, ${f})`),r||"none"}const KU=Zw.length,ET=e=>typeof e=="string"?parseFloat(e):e,CT=e=>typeof e=="number"||xe.test(e);function YU(e,t,n,r,i,l){i?(e.opacity=ft(0,n.opacity??1,XU(r)),e.opacityExit=ft(t.opacity??1,0,WU(r))):l&&(e.opacity=ft(t.opacity??1,n.opacity??1,r));for(let c=0;c<KU;c++){const d=Zw[c];let f=MT(t,d),h=MT(n,d);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||CT(f)===CT(h)?(e[d]=Math.max(ft(ET(f),ET(h),r),0),(Wr.test(h)||Wr.test(f))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function MT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const XU=l5(0,.5,eD),WU=l5(.5,.95,vr);function l5(e,t,n){return r=>r<e?0:r>t?1:n(uu(e,t,r))}function ZU(e,t,n){const r=un(e)?e:Ko(e);return r.start(Yw("",r,t,n)),r.animation}function hu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const QU=(e,t)=>e.depth-t.depth;class JU{constructor(){this.children=[],this.isDirty=!1}add(t){Dw(this.children,t),this.isDirty=!0}remove(t){bh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QU),this.isDirty=!1,this.children.forEach(t)}}function eV(e,t){const n=bn.now(),r=({timestamp:i})=>{const l=i-n;l>=t&&(Mi(r),e(l-t))};return ht.setup(r,!0),()=>Mi(r)}function hh(e){return un(e)?e.get():e}class tV{constructor(){this.members=[]}add(t){Dw(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&&(bh(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(bh(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:l}=r.options,{layoutDependency:c}=t.options;(l===void 0||l!==c)&&(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,l,c;(r=(n=t.options).onExitComplete)==null||r.call(n),(c=(i=t.resumingFrom)==null?void 0:(l=i.options).onExitComplete)==null||c.call(l)})}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 mh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ag=["","X","Y","Z"],nV=1e3;let rV=0;function ig(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function c5(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=MD(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(i||l))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&c5(r)}function u5({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(c={},d=t==null?void 0:t()){this.id=rV++,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(sV),this.nodes.forEach(fV),this.nodes.forEach(hV),this.nodes.forEach(oV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new JU)}addEventListener(c,d){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Lw),this.eventHandlers.get(c).add(d)}notifyListeners(c,...d){const f=this.eventHandlers.get(c);f&&f.notify(...d)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=eS(c)&&!iU(c),this.instance=c;const{layoutId:d,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||d)&&(this.isLayoutDirty=!0),e){let p,x=0;const y=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{x=window.innerWidth}),e(c,()=>{const j=window.innerWidth;j!==x&&(x=j,this.root.updateBlockedByResize=!0,p&&p(),p=eV(y,250),mh.hasAnimatedSinceResize&&(mh.hasAnimatedSinceResize=!1,this.nodes.forEach(RT)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||f)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:x,hasRelativeLayoutChanged:y,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||h.getDefaultTransition()||gV,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=h.getProps(),_=!this.targetLayout||!o5(this.targetLayout,j),O=!x&&y;if(this.options.layoutRoot||this.resumeFrom||O||x&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...Kw(w,"layout"),onPlay:S,onComplete:v};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(p,O,A.path)}else x||RT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Mi(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(mV),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&c5(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const x=this.path[p];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:d,layout:f}=this.options;if(d===void 0&&!f)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const f=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),f&&this.nodes.forEach(cV),this.nodes.forEach(kT);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(PT);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(uV),this.nodes.forEach(dV),this.nodes.forEach(aV),this.nodes.forEach(iV)):this.nodes.forEach(PT),this.clearAllSnapshots();const d=bn.now();cn.delta=ta(0,1e3/60,d-cn.timestamp),cn.timestamp=d,cn.isProcessing=!0,Wy.update.process(cn),Wy.preRender.process(cn),Wy.render.process(cn),cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lV),this.sharedNodes.forEach(pV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jn(this.snapshot.measuredBox.x)&&!jn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Kt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(d=!1),d&&this.instance){const f=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!i)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!s5(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;c&&this.instance&&(d||fs(this.latestValues)||p)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const d=this.measurePageBox();let f=this.removeElementScroll(d);return c&&(f=this.removeTransform(f)),vV(f),{animationId:this.root.animationId,measuredBox:d,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:c}=this.options;if(!c)return Kt();const d=c.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(bV))){const{scroll:p}=this.root;p&&(Yr(d.x,p.offset.x),Yr(d.y,p.offset.y))}return d}removeElementScroll(c){var f;const d=Kt();if(Cr(d,c),(f=this.scroll)!=null&&f.wasRoot)return d;for(let h=0;h<this.path.length;h++){const p=this.path[h],{scroll:x,options:y}=p;p!==this.root&&x&&y.layoutScroll&&(x.wasRoot&&Cr(d,c),Yr(d.x,x.offset.x),Yr(d.y,x.offset.y))}return d}applyTransform(c,d=!1,f){var p,x;const h=f||Kt();Cr(h,c);for(let y=0;y<this.path.length;y++){const j=this.path[y];!d&&j.options.layoutScroll&&j.scroll&&j!==j.root&&(Yr(h.x,-j.scroll.offset.x),Yr(h.y,-j.scroll.offset.y)),fs(j.latestValues)&&fh(h,j.latestValues,(p=j.layout)==null?void 0:p.layoutBox)}return fs(this.latestValues)&&fh(h,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),h}removeTransform(c){var f;const d=Kt();Cr(d,c);for(let h=0;h<this.path.length;h++){const p=this.path[h];if(!fs(p.latestValues))continue;let x;p.instance&&(I1(p.latestValues)&&p.updateSnapshot(),x=Kt(),Cr(x,p.measurePageBox())),ST(d,p.latestValues,(f=p.snapshot)==null?void 0:f.layoutBox,x)}return fs(this.latestValues)&&ST(d,this.latestValues),d}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var j;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(c||f&&this.isSharedProjectionDirty||this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:x}=this.options;if(!this.layout||!(p||x))return;this.resolvedRelativeTargetAt=cn.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Kt(),this.targetWithTransforms=Kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qU(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Cr(this.target,this.layout.layoutBox),YD(this.target,this.targetDelta)):Cr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||I1(this.parent.latestValues)||KD(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,d,f){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Kt(),this.relativeTargetOrigin=Kt(),Th(this.relativeTargetOrigin,d,f,this.options.layoutAnchor||void 0),Cr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const c=this.getLead(),d=!!this.resumingFrom||this!==c;let f=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===cn.timestamp&&(f=!1),f)return;const{layout:h,layoutId:p}=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||p))return;Cr(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,y=this.treeScale.y;xU(this.layoutCorrected,this.treeScale,this.path,d),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Kt());const{target:j}=c;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yT(this.prevProjectionDelta.x,this.projectionDelta.x),yT(this.prevProjectionDelta.y,this.projectionDelta.y)),Jc(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==y||!TT(this.projectionDelta.x,this.prevProjectionDelta.x)||!TT(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var d;if((d=this.options.visualElement)==null||d.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(c,d=!1,f){const h=this.snapshot,p=h?h.latestValues:{},x={...this.latestValues},y=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const j=Kt(),w=h?h.source:void 0,S=this.layout?this.layout.source:void 0,v=w!==S,_=this.getStack(),O=!_||_.members.length<=1,A=!!(v&&!O&&this.options.crossfade===!0&&!this.path.some(yV));this.animationProgress=0;let T;const N=f==null?void 0:f.interpolateProjection(c);this.mixTargetDelta=E=>{const k=E/1e3,R=N==null?void 0:N(k);R?(y.x.translate=R.x,y.x.scale=ft(c.x.scale,1,k),y.x.origin=c.x.origin,y.x.originPoint=c.x.originPoint,y.y.translate=R.y,y.y.scale=ft(c.y.scale,1,k),y.y.origin=c.y.origin,y.y.originPoint=c.y.originPoint):(DT(y.x,c.x,k),DT(y.y,c.y,k)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Th(j,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),xV(this.relativeTarget,this.relativeTargetOrigin,j,k),T&&FU(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Kt()),Cr(T,this.relativeTarget)),v&&(this.animationValues=x,YU(x,p,this.latestValues,k,A,O)),R&&R.rotate!==void 0&&(this.animationValues||(this.animationValues=x),this.animationValues.pathRotation=R.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var d,f,h;this.notifyListeners("animationStart"),(d=this.currentAnimation)==null||d.stop(),(h=(f=this.resumingFrom)==null?void 0:f.currentAnimation)==null||h.stop(),this.pendingAnimation&&(Mi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{mh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ko(0)),this.motionValue.jump(0,!1),this.currentAnimation=ZU(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),c.onUpdate&&c.onUpdate(p)},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:f,layout:h,latestValues:p}=c;if(!(!d||!f||!h)){if(this!==c&&this.layout&&h&&d5(this.options.animationType,this.layout.layoutBox,h.layoutBox)){f=this.target||Kt();const x=jn(this.layout.layoutBox.x);f.x.min=c.target.x.min,f.x.max=f.x.min+x;const y=jn(this.layout.layoutBox.y);f.y.min=c.target.y.min,f.y.max=f.y.min+y}Cr(d,f),fh(d,p),Jc(this.projectionDeltaWithTransform,this.layoutCorrected,d,p)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new tV),this.sharedNodes.get(c).add(d);const h=d.options.initialPromotionConfig;d.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var d;const{layoutId:c}=this.options;return c?((d=this.getStack())==null?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:c}=this.options;return c?(d=this.getStack())==null?void 0:d.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:f}={}){const h=this.getStack();h&&h.promote(this,f),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:f}=c;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const h={};f.z&&ig("z",c,h,this.animationValues);for(let p=0;p<ag.length;p++)ig(`rotate${ag[p]}`,c,h,this.animationValues),ig(`skew${ag[p]}`,c,h,this.animationValues);c.render();for(const p in h)c.setStaticValue(p,h[p]),this.animationValues&&(this.animationValues[p]=h[p]);c.scheduleRender()}applyProjectionStyles(c,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=hh(d==null?void 0:d.pointerEvents)||"",c.transform=f?f(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=hh(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!fs(this.latestValues)&&(c.transform=f?f({},""):"none",this.hasProjected=!1);return}c.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let x=GU(this.projectionDeltaWithTransform,this.treeScale,p);f&&(x=f(p,x)),c.transform=x;const{x:y,y:j}=this.projectionDelta;c.transformOrigin=`${y.origin*100}% ${j.origin*100}% 0`,h.animationValues?c.opacity=h===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const w in U1){if(p[w]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:_}=U1[w],O=x==="none"?p[w]:S(p[w],h);if(v){const A=v.length;for(let T=0;T<A;T++)c[v[T]]=O}else _?this.options.visualElement.renderState.vars[w]=O:c[w]=O}this.options.layoutId&&(c.pointerEvents=h===this?hh(d==null?void 0:d.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var d;return(d=c.currentAnimation)==null?void 0:d.stop()}),this.root.nodes.forEach(kT),this.root.sharedNodes.clear()}}}function aV(e){e.updateLayout()}function iV(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:l}=e.options,c=t.source!==e.layout.source;if(l==="size")Kr(x=>{const y=c?t.measuredBox[x]:t.layoutBox[x],j=jn(y);y.min=r[x].min,y.max=y.min+j});else if(l==="x"||l==="y"){const x=l==="x"?"y":"x";V1(c?t.measuredBox[x]:t.layoutBox[x],r[x])}else d5(l,t.layoutBox,r)&&Kr(x=>{const y=c?t.measuredBox[x]:t.layoutBox[x],j=jn(r[x]);y.max=y.min+j,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[x].max=e.relativeTarget[x].min+j)});const d=Po();Jc(d,r,t.layoutBox);const f=Po();c?Jc(f,e.applyTransform(i,!0),t.measuredBox):Jc(f,r,t.layoutBox);const h=!s5(d);let p=!1;if(!e.resumeFrom){const x=e.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:y,layout:j}=x;if(y&&j){const w=e.options.layoutAnchor||void 0,S=Kt();Th(S,t.layoutBox,y.layoutBox,w);const v=Kt();Th(v,r,j.layoutBox,w),o5(S,v)||(p=!0),x.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=S,e.relativeParent=x)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function sV(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 oV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lV(e){e.clearSnapshot()}function kT(e){e.clearMeasurements()}function cV(e){e.isLayoutDirty=!0,e.updateLayout()}function PT(e){e.isLayoutDirty=!1}function uV(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function dV(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function RT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fV(e){e.resolveTargetDelta()}function hV(e){e.calcProjection()}function mV(e){e.resetSkewAndRotation()}function pV(e){e.removeLeadSnapshot()}function DT(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zT(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function xV(e,t,n,r){zT(e.x,t.x,n.x,r),zT(e.y,t.y,n.y,r)}function yV(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gV={duration:.45,ease:[.4,0,.1,1]},LT=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$T=LT("applewebkit/")&&!LT("chrome/")?Math.round:vr;function BT(e){e.min=$T(e.min),e.max=$T(e.max)}function vV(e){BT(e.x),BT(e.y)}function d5(e,t,n){return e==="position"||e==="preserve-aspect"&&!IU(OT(t),OT(n),.2)}function bV(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const jV=u5({attachResizeListener:(e,t)=>hu(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}),sg={current:void 0},f5=u5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sg.current){const e=new jV({});e.mount(window),e.setOptions({layoutScroll:!0}),sg.current=e}return sg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),iS=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function IT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wV(...e){return t=>{let n=!1;const r=e.map(i=>{const l=IT(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<r.length;i++){const l=r[i];typeof l=="function"?l():IT(e[i],null)}}}}function SV(...e){return M.useCallback(wV(...e),e)}class NV extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(lh(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=lh(r)&&r.offsetWidth||0,l=lh(r)&&r.offsetHeight||0,c=getComputedStyle(n),d=this.props.sizeRef.current;d.height=parseFloat(c.height),d.width=parseFloat(c.width),d.top=n.offsetTop,d.left=n.offsetLeft,d.right=i-d.width-d.left,d.bottom=l-d.height-d.top,d.direction=c.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function AV({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:l}){var y;const c=M.useId(),d=M.useRef(null),f=M.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=M.useContext(iS),p=((y=e.props)==null?void 0:y.ref)??(e==null?void 0:e.ref),x=SV(d,p);return M.useInsertionEffect(()=>{const{width:j,height:w,top:S,left:v,right:_,bottom:O,direction:A}=f.current;if(t||l===!1||!d.current||!j||!w)return;const T=A==="rtl",N=n==="left"?T?`right: ${_}`:`left: ${v}`:T?`left: ${v}`:`right: ${_}`,E=r==="bottom"?`bottom: ${O}`:`top: ${S}`;d.current.dataset.motionPopId=c;const k=document.createElement("style");h&&(k.nonce=h);const R=i??document.head;return R.appendChild(k),k.sheet&&k.sheet.insertRule(`
[data-motion-pop-id="${c}"] {
position: absolute !important;
width: ${j}px !important;
height: ${w}px !important;
${N}px !important;
${E}px !important;
}
`),()=>{var L;(L=d.current)==null||L.removeAttribute("data-motion-pop-id"),R.contains(k)&&R.removeChild(k)}},[t]),s.jsx(NV,{isPresent:t,childRef:d,sizeRef:f,pop:l,children:l===!1?e:M.cloneElement(e,{ref:x})})}const _V=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:l,mode:c,anchorX:d,anchorY:f,root:h})=>{const p=Pw(OV),x=M.useId(),y=M.useRef(n),j=M.useRef(r);Rw(()=>{y.current=n,j.current=r});let w=!0,S=M.useMemo(()=>(w=!1,{id:x,initial:t,isPresent:n,custom:i,onExitComplete:v=>{p.set(v,!0);for(const _ of p.values())if(!_)return;r&&r()},register:v=>(p.set(v,!1),()=>{var _;p.delete(v),!y.current&&!p.size&&((_=j.current)==null||_.call(j))})}),[n,p,r]);return l&&w&&(S={...S}),M.useMemo(()=>{p.forEach((v,_)=>p.set(_,!1))},[n]),M.useEffect(()=>{!n&&!p.size&&r&&r()},[n]),e=s.jsx(AV,{pop:c==="popLayout",isPresent:n,anchorX:d,anchorY:f,root:h,children:e}),s.jsx(Bm.Provider,{value:S,children:e})};function OV(){return new Map}function h5(e=!0){const t=M.useContext(Bm);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,l=M.useId();M.useEffect(()=>{if(e)return i(l)},[e]);const c=M.useCallback(()=>e&&r&&r(l),[l,r,e]);return!n&&r?[!1,c]:[!0]}const zf=e=>e.key||"";function qT(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const Ma=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:l="sync",propagate:c=!1,anchorX:d="left",anchorY:f="top",root:h})=>{const[p,x]=h5(c),y=M.useMemo(()=>qT(e),[e]),j=c&&!p?[]:y.map(zf),w=M.useRef(!0),S=M.useRef(y),v=Pw(()=>new Map),_=M.useRef(new Set),[O,A]=M.useState(y),[T,N]=M.useState(y);Rw(()=>{w.current=!1,S.current=y;for(let R=0;R<T.length;R++){const L=zf(T[R]);j.includes(L)?(v.delete(L),_.current.delete(L)):v.get(L)!==!0&&v.set(L,!1)}},[T,j.length,j.join("-")]);const E=[];if(y!==O){let R=[...y];for(let L=0;L<T.length;L++){const D=T[L],z=zf(D);j.includes(z)||(R.splice(L,0,D),E.push(D))}return l==="wait"&&E.length&&(R=E),N(qT(R)),A(y),null}const{forceRender:k}=M.useContext(kw);return s.jsx(s.Fragment,{children:T.map(R=>{const L=zf(R),D=c&&!p?!1:y===T||j.includes(L),z=()=>{if(_.current.has(L))return;if(v.has(L))_.current.add(L),v.set(L,!0);else return;let $=!0;v.forEach(F=>{F||($=!1)}),$&&(k==null||k(),N(S.current),c&&(x==null||x()),r&&r())};return s.jsx(_V,{isPresent:D,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:l,root:h,onExitComplete:D?void 0:z,anchorX:d,anchorY:f,children:R},L)})})},m5=M.createContext({strict:!1}),UT={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 VT=!1;function TV(){if(VT)return;const e={};for(const t in UT)e[t]={isEnabled:n=>UT[t].some(r=>!!n[r])};HD(e),VT=!0}function p5(){return TV(),fU()}function EV(e){const t=p5();for(const n in e)t[n]={...t[n],...e[n]};HD(t)}const CV=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 Eh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||CV.has(e)}let x5=e=>!Eh(e);function MV(e){typeof e=="function"&&(x5=t=>t.startsWith("on")?!Eh(t):e(t))}try{MV(require("@emotion/is-prop-valid").default)}catch{}function kV(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||un(e[i])||(x5(i)||n===!0&&Eh(i)||!t&&!Eh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Vm=M.createContext({});function PV(e,t){if(Um(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 RV(e){const{initial:t,animate:n}=PV(e,M.useContext(Vm));return M.useMemo(()=>({initial:t,animate:n}),[HT(t),HT(n)])}function HT(e){return Array.isArray(e)?e.join(" "):e}const sS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function y5(e,t,n){for(const r in t)!un(t[r])&&!ZD(r,n)&&(e[r]=t[r])}function DV({transformTemplate:e},t){return M.useMemo(()=>{const n=sS();return rS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zV(e,t){const n=e.style||{},r={};return y5(r,n,e),Object.assign(r,DV(e,t)),r}function LV(e,t){const n={},r=zV(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 g5=()=>({...sS(),attrs:{}});function $V(e,t,n,r){const i=M.useMemo(()=>{const l=g5();return QD(l,t,e5(r),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};y5(l,e.style,e),i.style={...l,...i.style}}return i}const BV=["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 oS(e){return typeof e!="string"||e.includes("-")?!1:!!(BV.indexOf(e)>-1||/[A-Z]/u.test(e))}function IV(e,t,n,{latestValues:r},i,l=!1,c){const f=(c??oS(e)?$V:LV)(t,r,i,e),h=kV(t,typeof e=="string",l),p=e!==M.Fragment?{...h,...f,ref:n}:{},{children:x}=t,y=M.useMemo(()=>un(x)?x.get():x,[x]);return M.createElement(e,{...p,children:y})}function qV({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:UV(n,r,i,e),renderState:t()}}function UV(e,t,n,r){const i={},l=r(e,{});for(const y in l)i[y]=hh(l[y]);let{initial:c,animate:d}=e;const f=Um(e),h=UD(e);t&&h&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||c===!1;const x=p?d:c;if(x&&typeof x!="boolean"&&!qm(x)){const y=Array.isArray(x)?x:[x];for(let j=0;j<y.length;j++){const w=Xw(e,y[j]);if(w){const{transitionEnd:S,transition:v,..._}=w;for(const O in _){let A=_[O];if(Array.isArray(A)){const T=p?A.length-1:0;A=A[T]}A!==null&&(i[O]=A)}for(const O in S)i[O]=S[O]}}}return i}const v5=e=>(t,n)=>{const r=M.useContext(Vm),i=M.useContext(Bm),l=()=>qV(e,t,r,i);return n?l():Pw(l)},VV=v5({scrapeMotionValuesFromProps:aS,createRenderState:sS}),HV=v5({scrapeMotionValuesFromProps:t5,createRenderState:g5}),FV=Symbol.for("motionComponentSymbol");function GV(e,t,n){const r=M.useRef(n);M.useInsertionEffect(()=>{r.current=n});const i=M.useRef(null);return M.useCallback(l=>{var d;l&&((d=e.onMount)==null||d.call(e,l)),t&&(l?t.mount(l):t.unmount());const c=r.current;if(typeof c=="function")if(l){const f=c(l);typeof f=="function"&&(i.current=f)}else i.current?(i.current(),i.current=null):c(l);else c&&(c.current=l)},[t])}const b5=M.createContext({});function Co(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function KV(e,t,n,r,i,l){var A,T;const{visualElement:c}=M.useContext(Vm),d=M.useContext(m5),f=M.useContext(Bm),h=M.useContext(iS),p=h.reducedMotion,x=h.skipAnimations,y=M.useRef(null),j=M.useRef(!1);r=r||d.renderer,!y.current&&r&&(y.current=r(e,{visualState:t,parent:c,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:p,skipAnimations:x,isSVG:l}),j.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const w=y.current,S=M.useContext(b5);w&&!w.projection&&i&&(w.type==="html"||w.type==="svg")&&YV(y.current,n,i,S);const v=M.useRef(!1);M.useInsertionEffect(()=>{w&&v.current&&w.update(n,f)});const _=n[CD],O=M.useRef(!!_&&typeof window<"u"&&!((A=window.MotionHandoffIsComplete)!=null&&A.call(window,_))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,_)));return Rw(()=>{j.current=!0,w&&(v.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),O.current&&w.animationState&&w.animationState.animateChanges())}),M.useEffect(()=>{w&&(!O.current&&w.animationState&&w.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var N;(N=window.MotionHandoffMarkAsComplete)==null||N.call(window,_)}),O.current=!1),w.enteringChildren=void 0)}),w}function YV(e,t,n,r){const{layoutId:i,layout:l,drag:c,dragConstraints:d,layoutScroll:f,layoutRoot:h,layoutAnchor:p,layoutCrossfade:x}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:j5(e.parent)),e.projection.setOptions({layoutId:i,layout:l,alwaysMeasureLayout:!!c||d&&Co(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:r,crossfade:x,layoutScroll:f,layoutRoot:h,layoutAnchor:p})}function j5(e){if(e)return e.options.allowProjection!==!1?e.projection:j5(e.parent)}function og(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&EV(r);const l=n?n==="svg":oS(e),c=l?HV:VV;function d(h,p){let x;const y={...M.useContext(iS),...h,layoutId:XV(h)},{isStatic:j}=y,w=RV(h),S=c(h,j);if(!j&&typeof window<"u"){WV();const v=ZV(y);x=v.MeasureLayout,w.visualElement=KV(e,S,y,i,v.ProjectionNode,l)}return s.jsxs(Vm.Provider,{value:w,children:[x&&w.visualElement?s.jsx(x,{visualElement:w.visualElement,...y}):null,IV(e,h,GV(S,w.visualElement,p),S,j,t,l)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=M.forwardRef(d);return f[FV]=e,f}function XV({layoutId:e}){const t=M.useContext(kw).id;return t&&e!==void 0?t+"-"+e:e}function WV(e,t){M.useContext(m5).strict}function ZV(e){const t=p5(),{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 QV(e,t){if(typeof Proxy>"u")return og;const n=new Map,r=(l,c)=>og(l,c,e,t),i=(l,c)=>r(l,c);return new Proxy(i,{get:(l,c)=>c==="create"?r:(n.has(c)||n.set(c,og(c,void 0,e,t)),n.get(c))})}const JV=(e,t)=>t.isSVG??oS(e)?new EU(t):new SU(t,{allowProjection:e!==M.Fragment});class eH extends $i{constructor(t){super(t),t.animationState||(t.animationState=RU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qm(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 tH=0;class nH extends $i{constructor(){super(...arguments),this.id=tH++,this.isExitComplete=!1}update(){var l;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:c,custom:d}=this.node.getProps();if(typeof c=="string"||typeof c=="object"&&c!==null&&!Array.isArray(c)){const f=Ns(this.node,c,d);if(f){const{transition:h,transitionEnd:p,...x}=f;for(const y in x)(l=this.node.getValue(y))==null||l.jump(x[y])}}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 rH={animation:{Feature:eH},exit:{Feature:nH}};function td(e){return{point:{x:e.pageX,y:e.pageY}}}const aH=e=>t=>Jw(t)&&e(t,td(t));function eu(e,t,n,r){return hu(e,t,aH(n),r)}const w5=({current:e})=>e?e.ownerDocument.defaultView:null,FT=(e,t)=>Math.abs(e-t);function iH(e,t){const n=FT(e.x,t.x),r=FT(e.y,t.y);return Math.sqrt(n**2+r**2)}const GT=new Set(["auto","scroll"]);class S5{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3,element:d}={}){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=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Lf(this.lastRawMoveEventInfo,this.transformPagePoint));const w=lg(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,v=iH(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!v)return;const{point:_}=w,{timestamp:O}=cn;this.history.push({..._,timestamp:O});const{onStart:A,onMove:T}=this.handlers;S||(A&&A(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,w)},this.handlePointerMove=(w,S)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=S,this.lastMoveEventInfo=Lf(S,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(w,S)=>{this.end();const{onEnd:v,onSessionEnd:_,resumeAnimation:O}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=lg(w.type==="pointercancel"?this.lastMoveEventInfo:Lf(S,this.transformPagePoint),this.history);this.startEvent&&v&&v(w,A),_&&_(w,A)},!Jw(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=i||window;const f=td(t),h=Lf(f,this.transformPagePoint),{point:p}=h,{timestamp:x}=cn;this.history=[{...p,timestamp:x}];const{onSessionStart:y}=n;y&&y(t,lg(h,this.history));const j={passive:!0,capture:!0};this.removeListeners=Qu(eu(this.contextWindow,"pointermove",this.handlePointerMove,j),eu(this.contextWindow,"pointerup",this.handlePointerUp,j),eu(this.contextWindow,"pointercancel",this.handlePointerUp,j)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(GT.has(r.overflowX)||GT.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},l={x:i.x-n.x,y:i.y-n.y};l.x===0&&l.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,i),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Mi(this.updatePoint)}}function Lf(e,t){return t?{point:t(e.point)}:e}function KT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lg({point:e},t){return{point:e,delta:KT(e,N5(t)),offset:KT(e,sH(t)),velocity:oH(t,.1)}}function sH(e){return e[0]}function N5(e){return e[e.length-1]}function oH(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=N5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Zn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Zn(t)*2&&(r=e[1]);const l=xr(i.timestamp-r.timestamp);if(l===0)return{x:0,y:0};const c={x:(i.x-r.x)/l,y:(i.y-r.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function lH(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function YT(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 cH(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function XT(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 uH(e,t){return{x:XT(e.x,t.x),y:XT(e.y,t.y)}}function dH(e,t){let n=.5;const r=jn(e),i=jn(t);return i>r?n=uu(t.min,t.max-r,e.min):r>i&&(n=uu(e.min,e.max-i,t.min)),ta(0,1,n)}function fH(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 H1=.35;function hH(e=H1){return e===!1?e=0:e===!0&&(e=H1),{x:WT(e,"left","right"),y:WT(e,"top","bottom")}}function WT(e,t,n){return{min:ZT(e,t),max:ZT(e,n)}}function ZT(e,t){return typeof e=="number"?e:e[t]||0}const mH=new WeakMap;class pH{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=Kt(),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 l=x=>{n&&this.snapToCursor(td(x).point),this.stopAnimation()},c=(x,y)=>{const{drag:j,dragPropagation:w,onDragStart:S}=this.getProps();if(j&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=U9(j),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kr(_=>{let O=this.getAxisMotionValue(_).get()||0;if(Wr.test(O)){const{projection:A}=this.visualElement;if(A&&A.layout){const T=A.layout.layoutBox[_];T&&(O=jn(T)*(parseFloat(O)/100))}}this.originPoint[_]=O}),S&&ht.update(()=>S(x,y),!1,!0),R1(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},d=(x,y)=>{this.latestPointerEvent=x,this.latestPanInfo=y;const{dragPropagation:j,dragDirectionLock:w,onDirectionLock:S,onDrag:v}=this.getProps();if(!j&&!this.openDragLock)return;const{offset:_}=y;if(w&&this.currentDirection===null){this.currentDirection=yH(_),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",y.point,_),this.updateAxis("y",y.point,_),this.visualElement.render(),v&&ht.update(()=>v(x,y),!1,!0)},f=(x,y)=>{this.latestPointerEvent=x,this.latestPanInfo=y,this.stop(x,y),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new S5(t,{onSessionStart:l,onStart:c,onMove:d,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:r,contextWindow:w5(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!i||!r)return;const{velocity:c}=i;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&ht.postRender(()=>d(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||!$f(t,i,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=lH(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){var l;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(l=this.visualElement.projection)==null?void 0:l.layout,i=this.constraints;t&&Co(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cH(r.layoutBox,t):this.constraints=!1,this.elastic=hH(n),i!==this.constraints&&!Co(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Kr(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=fH(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Co(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 l=yU(r,i.root,this.visualElement.getTransformPagePoint());let c=uH(i.layout.layoutBox,l);if(n){const d=n(mU(c));this.hasMutatedConstraints=!!d,d&&(c=GD(d))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},h=Kr(p=>{if(!$f(p,n,this.currentDirection))return;let x=f&&f[p]||{};(c===!0||c===p)&&(x={min:0,max:0});const y=i?200:1e6,j=i?40:1e7,w={type:"inertia",velocity:r?t[p]:0,bounceStiffness:y,bounceDamping:j,timeConstant:750,restDelta:1,restSpeed:10,...l,...x};return this.startAxisValueAnimation(p,w)});return Promise.all(h).then(d)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return R1(this.visualElement,t),r.start(Yw(t,r,0,n,this.visualElement,!1))}stopAnimation(){Kr(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){Kr(n=>{const{drag:r}=this.getProps();if(!$f(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,l=this.getAxisMotionValue(n);if(i&&i.layout){const{min:c,max:d}=i.layout.layoutBox[n],f=l.get()||0;l.set(t[n]-ft(c,d,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Co(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Kr(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const f=d.get();i[c]=dH({min:f,max:f},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Kr(c=>{if(!$f(c,t,null))return;const d=this.getAxisMotionValue(c),{min:f,max:h}=this.constraints[c];d.set(ft(f,h,i[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;mH.set(this.visualElement,this);const t=this.visualElement.current,n=eu(t,"pointerdown",h=>{const{drag:p,dragListener:x=!0}=this.getProps(),y=h.target,j=y!==t&&Y9(y);p&&x&&!j&&this.start(h)});let r;const i=()=>{const{dragConstraints:h}=this.getProps();Co(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=xH(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",i);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),ht.read(i);const d=hu(window,"resize",()=>this.scalePositionWithinConstraints()),f=l.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(Kr(x=>{const y=this.getAxisMotionValue(x);y&&(this.originPoint[x]+=h[x].translate,y.set(y.get()+h[x].translate))}),this.visualElement.render())}));return()=>{d(),n(),c(),f&&f(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:l=!1,dragElastic:c=H1,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function QT(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function xH(e,t,n){const r=iT(e,QT(n)),i=iT(t,QT(n));return()=>{r(),i()}}function $f(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gH extends $i{constructor(t){super(t),this.removeGroupControls=vr,this.removeListeners=vr,this.controls=new pH(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vr}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 cg=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class vH extends $i{constructor(){super(...arguments),this.removePointerDownListener=vr}onPointerDown(t){this.session=new S5(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:w5(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:cg(t),onStart:cg(n),onMove:cg(r),onEnd:(l,c)=>{delete this.session,i&&ht.postRender(()=>i(l,c))}}}mount(){this.removePointerDownListener=eu(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 ug=!1;class bH extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),r&&r.register&&i&&r.register(l),ug&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),mh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:l}=this.props,{projection:c}=r;return c&&(c.isPresent=l,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),ug=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||ht.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Qw.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;ug=!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 A5(e){const[t,n]=h5(),r=M.useContext(kw);return s.jsx(bH,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(b5),isPresent:t,safeToRemove:n})}const jH={pan:{Feature:vH},drag:{Feature:gH,ProjectionNode:f5,MeasureLayout:A5}};function JT(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,l=r[i];l&&ht.postRender(()=>l(t,td(t)))}class wH extends $i{mount(){const{current:t}=this.node;t&&(this.unmount=H9(t,(n,r)=>(JT(this.node,r,"Start"),i=>JT(this.node,i,"End"))))}unmount(){}}class SH extends $i{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=Qu(hu(this.node.current,"focus",()=>this.onFocus()),hu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function eE(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),l=r[i];l&&ht.postRender(()=>l(t,td(t)))}class NH extends $i{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=W9(t,(i,l)=>(eE(this.node,l,"Start"),(c,{success:d})=>eE(this.node,c,d?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const F1=new WeakMap,dg=new WeakMap,AH=e=>{const t=F1.get(e.target);t&&t(e)},_H=e=>{e.forEach(AH)};function OH({root:e,...t}){const n=e||document;dg.has(n)||dg.set(n,{});const r=dg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(_H,{root:e,...t})),r[i]}function TH(e,t,n){const r=OH(t);return F1.set(e,n),r.observe(e),()=>{F1.delete(e),r.unobserve(e)}}const EH={some:0,all:1};class CH extends $i{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var f;(f=this.stopObserver)==null||f.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:l}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:EH[i]},d=h=>{const{isIntersecting:p}=h;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:x,onViewportLeave:y}=this.node.getProps(),j=p?x:y;j&&j(h)};this.stopObserver=TH(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(MH(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function MH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kH={inView:{Feature:CH},tap:{Feature:NH},focus:{Feature:SH},hover:{Feature:wH}},PH={layout:{ProjectionNode:f5,MeasureLayout:A5}},RH={...rH,...kH,...jH,...PH},Ke=QV(RH,JV),_5=UR(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 DH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O5=(...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 zH={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 LH=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:c,...d},f)=>M.createElement("svg",{ref:f,...zH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:O5("lucide",i),...d},[...c.map(([h,p])=>M.createElement(h,p)),...Array.isArray(l)?l:[l]]));/**
* @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 le=(e,t)=>{const n=M.forwardRef(({className:r,...i},l)=>M.createElement(LH,{ref:l,iconNode:t,className:O5(`lucide-${DH(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 $H=le("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 BH=le("ArrowDownLeft",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]);/**
* @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=le("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 qH=le("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
* @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 lS=le("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 G1=le("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 T5=le("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/**
* @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 K1=le("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 Ch=le("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
* @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 Ti=le("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 tE=le("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
* @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 Yo=le("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 ki=le("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 E5=le("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 cS=le("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 ph=le("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 UH=le("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 VH=le("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @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 uS=le("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 C5=le("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 tu=le("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 Zr=le("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 br=le("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @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 yr=le("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 Mh=le("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 dn=le("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 M5=le("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 dS=le("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @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 k5=le("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
* @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 P5=le("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 nE=le("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 qa=le("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 HH=le("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @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=le("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 fS=le("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 R5=le("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
* @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 rE=le("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 GH=le("FileSpreadsheet",[["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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/**
* @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 Pn=le("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 nd=le("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 D5=le("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 KH=le("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 fn=le("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 kh=le("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 aE=le("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
* @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=le("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @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=le("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
* @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 Bf=le("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
* @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 z5=le("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
* @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=le("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
* @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 iE=le("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 hS=le("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 ZH=le("Link2Off",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
* @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 QH=le("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
* @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 L5=le("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
* @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=le("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @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 $5=le("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 B5=le("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 fg=le("MailOpen",[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]);/**
* @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 Dn=le("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 Y1=le("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @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=le("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 I5=le("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 eF=le("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 xh=le("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 tF=le("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 nF=le("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 q5=le("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 rF=le("MousePointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/**
* @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 U5=le("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 aF=le("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 iF=le("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
* @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 sE=le("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
* @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 X1=le("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 oE=le("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 W1=le("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 wr=le("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 Da=le("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 sF=le("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
* @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 oF=le("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 lE=le("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
* @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 Tl=le("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 Hm=le("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 Rh=le("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @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 V5=le("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 mS=le("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 Qr=le("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 lF=le("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 H5=le("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 cF=le("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @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 F5=le("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 uF=le("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 G5=le("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 na=le("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 hn=le("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 dF=le("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
* @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=le("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @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 cE=le("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 mu=le("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 $r=le("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 K5=le("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
* @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 Bo=le("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 Ts=le("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 fF=le("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/**
* @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 Io=le("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 Y5(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=Y5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ze(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Y5(e))&&(r&&(r+=" "),r+=t);return r}const pS="-",hF=e=>{const t=pF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const d=c.split(pS);return d[0]===""&&d.length!==1&&d.shift(),X5(d,t)||mF(c)},getConflictingClassGroupIds:(c,d)=>{const f=n[c]||[];return d&&r[c]?[...f,...r[c]]:f}}},X5=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?X5(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(pS);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},uE=/^\[(.+)\]$/,mF=e=>{if(uE.test(e)){const t=uE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pF=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return yF(Object.entries(e.classGroups),n).forEach(([l,c])=>{Q1(c,r,l,t)}),r},Q1=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:dE(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(xF(i)){Q1(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{Q1(c,dE(t,l),n,r)})})},dE=(e,t)=>{let n=e;return t.split(pS).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xF=e=>e.isThemeGetter,yF=(e,t)=>t?e.map(([n,r])=>{const i=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,i]}):e,gF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=r.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},W5="!",vF=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],l=t.length,c=d=>{const f=[];let h=0,p=0,x;for(let v=0;v<d.length;v++){let _=d[v];if(h===0){if(_===i&&(r||d.slice(v,v+l)===t)){f.push(d.slice(p,v)),p=v+l;continue}if(_==="/"){x=v;continue}}_==="["?h++:_==="]"&&h--}const y=f.length===0?d:d.substring(p),j=y.startsWith(W5),w=j?y.substring(1):y,S=x&&x>p?x-p:void 0;return{modifiers:f,hasImportantModifier:j,baseClassName:w,maybePostfixModifierPosition:S}};return n?d=>n({className:d,parseClassName:c}):c},bF=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},jF=e=>({cache:gF(e.cacheSize),parseClassName:vF(e),...hF(e)}),wF=/\s+/,SF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,l=[],c=e.trim().split(wF);let d="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:p,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:j}=n(h);let w=!!j,S=r(w?y.substring(0,j):y);if(!S){if(!w){d=h+(d.length>0?" "+d:d);continue}if(S=r(y),!S){d=h+(d.length>0?" "+d:d);continue}w=!1}const v=bF(p).join(":"),_=x?v+W5:v,O=_+S;if(l.includes(O))continue;l.push(O);const A=i(S,w);for(let T=0;T<A.length;++T){const N=A[T];l.push(_+N)}d=h+(d.length>0?" "+d:d)}return d};function NF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Z5(t))&&(r&&(r+=" "),r+=n);return r}const Z5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Z5(e[r]))&&(n&&(n+=" "),n+=t);return n};function AF(e,...t){let n,r,i,l=c;function c(f){const h=t.reduce((p,x)=>x(p),e());return n=jF(h),r=n.cache.get,i=n.cache.set,l=d,d(f)}function d(f){const h=r(f);if(h)return h;const p=SF(f,n);return i(f,p),p}return function(){return l(NF.apply(null,arguments))}}const jt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Q5=/^\[(?:([a-z-]+):)?(.+)\]$/i,_F=/^\d+\/\d+$/,OF=new Set(["px","full","screen"]),TF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EF=/\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$/,CF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_a=e=>qo(e)||OF.has(e)||_F.test(e),ji=e=>El(e,"length",IF),qo=e=>!!e&&!Number.isNaN(Number(e)),hg=e=>El(e,"number",qo),Dc=e=>!!e&&Number.isInteger(Number(e)),PF=e=>e.endsWith("%")&&qo(e.slice(0,-1)),Be=e=>Q5.test(e),wi=e=>TF.test(e),RF=new Set(["length","size","percentage"]),DF=e=>El(e,RF,J5),zF=e=>El(e,"position",J5),LF=new Set(["image","url"]),$F=e=>El(e,LF,UF),BF=e=>El(e,"",qF),zc=()=>!0,El=(e,t,n)=>{const r=Q5.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},IF=e=>EF.test(e)&&!CF.test(e),J5=()=>!1,qF=e=>MF.test(e),UF=e=>kF.test(e),VF=()=>{const e=jt("colors"),t=jt("spacing"),n=jt("blur"),r=jt("brightness"),i=jt("borderColor"),l=jt("borderRadius"),c=jt("borderSpacing"),d=jt("borderWidth"),f=jt("contrast"),h=jt("grayscale"),p=jt("hueRotate"),x=jt("invert"),y=jt("gap"),j=jt("gradientColorStops"),w=jt("gradientColorStopPositions"),S=jt("inset"),v=jt("margin"),_=jt("opacity"),O=jt("padding"),A=jt("saturate"),T=jt("scale"),N=jt("sepia"),E=jt("skew"),k=jt("space"),R=jt("translate"),L=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",Be,t],$=()=>[Be,t],F=()=>["",_a,ji],Y=()=>["auto",qo,Be],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["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"],ie=()=>["","0",Be],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[qo,Be];return{cacheSize:500,separator:":",theme:{colors:[zc],spacing:[_a,ji],blur:["none","",wi,Be],brightness:I(),borderColor:[e],borderRadius:["none","","full",wi,Be],borderSpacing:$(),borderWidth:F(),contrast:I(),grayscale:ie(),hueRotate:I(),invert:ie(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[PF,ji],inset:z(),margin:z(),opacity:I(),padding:$(),saturate:I(),scale:I(),sepia:ie(),skew:I(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[wi]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"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:[...K(),Be]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Dc,Be]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",Dc,Be]}],"grid-cols":[{"grid-cols":[zc]}],"col-start-end":[{col:["auto",{span:["full",Dc,Be]},Be]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[zc]}],"row-start-end":[{row:["auto",{span:[Dc,Be]},Be]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"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:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[wi]},wi]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wi,ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hg]}],"font-family":[{font:[zc]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",qo,hg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_a,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_a,ji]}],"underline-offset":[{"underline-offset":["auto",_a,Be]}],"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",Be]}],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",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),zF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",DF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$F]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:B()}],"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:["",...B()]}],"outline-offset":[{"outline-offset":[_a,Be]}],"outline-w":[{outline:[_a,ji]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[_a,ji]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wi,BF]}],"shadow-color":[{shadow:[zc]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",wi,Be]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[x]}],saturate:[{saturate:[A]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Dc,Be]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"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",Be]}],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",Be]}],"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",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_a,ji,hg]}],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"]}}},HF=AF(VF);function it(...e){return HF(ze(e))}function Ce(e,t="SEK"){return e==null||isNaN(e)?"-":new Intl.NumberFormat("sv-SE",{style:"currency",currency:t,maximumFractionDigits:0}).format(e)}function fE(e){return new Intl.NumberFormat("sv-SE").format(e)}function Et(e){return new Intl.DateTimeFormat("sv-SE",{year:"numeric",month:"short",day:"numeric"}).format(new Date(e))}function FF(e){const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),i=Math.floor(r/6e4),l=Math.floor(r/36e5),c=Math.floor(r/864e5);return i<1?"Just now":i<60?`${i}m ago`:l<24?`${l}h ago`:c<7?`${c}d ago`:Et(e)}function GF(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}const KF=[{path:"/",label:"Briefing",icon:U5},{path:"/dashboard",label:"Dashboard",icon:hS},{path:"/mail",label:"Mail",icon:Dn},{path:"/alva",label:"Alva",icon:Ti},{path:"/amos",label:"AMOS",icon:dS},{path:"/quixzoom",label:"quiXzoom",icon:fn},{path:"/landvex",label:"Landvex",icon:k5},{path:"/finance",label:"Finance",icon:Bo},{path:"/accounting",label:"Accounting",icon:E5},{path:"/crm",label:"CRM",icon:$r},{path:"/sales",label:"Sales",icon:na},{path:"/marketing",label:"Marketing",icon:I5},{path:"/social",label:"Social Media",icon:mS},{path:"/hr",label:"HR",icon:Yo},{path:"/legal",label:"Legal",icon:Pn},{path:"/compliance",label:"Compliance",icon:Qr},{path:"/support",label:"Support",icon:kh},{path:"/projects",label:"Projects",icon:D5},{path:"/automation",label:"Automation",icon:Io}];function YF(){const{sidebarOpen:e,toggleSidebar:t}=_5(),{logout:n,isAuthenticated:r}=Ia(),i=An(),l=Li(),c=()=>{n(),l("/login")};return s.jsxs(s.Fragment,{children:[s.jsx(Ma,{children:e&&s.jsx(Ke.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})}),s.jsxs(Ke.aside,{initial:!1,animate:{width:e?240:72},transition:{duration:.2,ease:"easeOut"},className:it("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:[s.jsxs("div",{className:"h-16 flex items-center justify-between shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2.5 overflow-hidden",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center shrink-0",children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 32 32",fill:"none",children:s.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})}),s.jsx(Ma,{children:e&&s.jsx(Ke.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"})})]}),s.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?s.jsx(C5,{size:14}):s.jsx(tu,{size:14})})]}),s.jsx("nav",{className:"flex-1 py-4 space-y-0.5 overflow-y-auto",children:KF.map(d=>{const f=i.pathname===d.path||d.path!=="/"&&i.pathname.startsWith(d.path),h=d.icon;return s.jsxs(IR,{to:d.path,onClick:()=>{window.innerWidth<1024&&t()},className:it("flex items-center gap-3 h-10 rounded-xl px-3 transition-colors duration-150 relative","hover:bg-primary-light",f&&"bg-primary-light text-primary",!f&&"text-text-secondary"),children:[f&&s.jsx(Ke.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"}}),s.jsx(h,{size:18,strokeWidth:f?2:1.5}),s.jsx(Ma,{children:e&&s.jsx(Ke.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:it("text-sm font-medium whitespace-nowrap",f?"text-primary":"text-text-secondary"),children:d.label})})]},d.path)})}),r&&s.jsx("div",{className:"py-4 border-t border-border/60",children:s.jsxs("button",{onClick:c,className:it("flex items-center gap-3 h-10 rounded-xl px-3 transition-colors duration-150 w-full","hover:bg-danger-light text-text-secondary hover:text-danger"),children:[s.jsx(B5,{size:18,strokeWidth:1.5}),s.jsx(Ma,{children:e&&s.jsx(Ke.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:"text-sm font-medium whitespace-nowrap",children:"Logga ut"})})]})})]})]})}function XF(){const[e,t]=M.useState(!1);M.useEffect(()=>{const r=window.matchMedia("(prefers-color-scheme: dark)").matches,i=localStorage.getItem("amos-dark-mode"),l=i?i==="true":r;t(l),l?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[]);const n=()=>{const r=!e;t(r),localStorage.setItem("amos-dark-mode",String(r)),r?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};return s.jsx("button",{onClick:n,className:it("w-10 h-10 rounded-xl flex items-center justify-center transition-colors",e?"bg-primary/20 text-primary":"bg-bg text-text-secondary hover:text-text-primary"),"aria-label":"Toggle dark mode",children:e?s.jsx(q5,{size:18}):s.jsx(F5,{size:18})})}const WF=[{id:"landvex",name:"Landvex AB",org:"559141-7042"},{id:"landvex-inc",name:"Landvex Inc.",org:"83-4567891"},{id:"quixzoom",name:"quiXzoom Inc",org:"-"}],hE=[{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 ZF(){const{user:e,logout:t}=Ia(),n=Li(),[r,i]=M.useState(!1),[l,c]=M.useState(!1),[d,f]=M.useState(!1),[h,p]=M.useState("landvex"),x=()=>{const j=new Date().getHours();return j<12?"Good morning":j<17?"Good afternoon":"Good evening"},y=hE.filter(j=>!j.read).length;return s.jsxs("header",{className:"h-14 lg:h-16 bg-surface border-b border-border/60 flex items-center justify-between px-4 lg:px-10 sticky top-0 z-30 lg:mt-0 mt-14",children:[s.jsx("div",{className:"flex items-center gap-4",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"text-base font-semibold text-text-primary",children:[x(),e?`, ${e.name||"Erik Svensson"}`:", Erik Svensson"]}),s.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"})})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.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:[s.jsx(Tl,{size:15}),s.jsx("span",{className:"ml-2 text-sm",children:"Search..."}),s.jsx("kbd",{className:"ml-6 px-1.5 py-0.5 text-[10px] font-medium bg-surface rounded border border-border",children:"⌘K"})]}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(XF,{})}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>{i(!r),c(!1)},className:"relative w-9 h-9 flex items-center justify-center rounded-xl hover:bg-bg text-text-secondary transition-colors",children:[s.jsx(K1,{size:17}),y>0&&s.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 bg-danger rounded-full"})]}),s.jsx(Ma,{children:r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),s.jsxs(Ke.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:[s.jsxs("div",{className:"px-4 py-3 border-b border-border/60 flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Notifications"}),s.jsx("span",{className:"text-xs text-primary font-medium cursor-pointer",children:"Mark all read"})]}),s.jsx("div",{className:"max-h-80 overflow-y-auto",children:hE.map(j=>s.jsx("div",{onClick:()=>{i(!1),j.title.includes("avtal")?n("/sales"):j.title.includes("faktura")?n("/finance",{state:{activeTab:"Invoices"}}):j.title.includes("semester")||j.title.includes("HR")?n("/hr"):j.title.includes("deal")?n("/sales"):n("/dashboard")},className:it("px-4 py-3 hover:bg-bg/60 transition-colors cursor-pointer",!j.read&&"bg-primary-light/30"),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:it("w-2 h-2 rounded-full mt-1.5 shrink-0",j.read?"bg-transparent":"bg-primary")}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:j.title}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:j.description}),s.jsx("p",{className:"text-[11px] text-text-secondary/60 mt-1",children:FF(j.time)})]})]})},j.id))})]})]})})]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>{c(!l),i(!1)},className:"flex items-center gap-2 pl-1 pr-2 h-9 rounded-xl hover:bg-bg transition-colors",children:[s.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?GF(e.name):"?"}),s.jsx(uS,{size:14,className:"text-text-secondary"})]}),s.jsx(Ma,{children:l&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),s.jsxs(Ke.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:[s.jsxs("div",{className:"px-4 py-3 border-b border-border/60",children:[s.jsx("p",{className:"text-sm font-semibold text-text-primary",children:(e==null?void 0:e.name)||"User"}),s.jsx("p",{className:"text-xs text-text-secondary",children:(e==null?void 0:e.email)||"user@amos.com"})]}),s.jsxs("div",{className:"py-1",children:[s.jsxs("button",{onClick:()=>{n("/profile"),c(!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:[s.jsx(mu,{size:15}),"Min Profil"]}),s.jsxs("button",{onClick:()=>{f(!0),c(!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:[s.jsx(ki,{size:15}),"Byt Verksamhet"]}),s.jsxs("button",{onClick:()=>{n("/profile?tab=preferences"),c(!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:[s.jsx(V5,{size:15}),"Inställningar"]}),s.jsx("div",{className:"border-t border-border/60 mt-1 pt-1",children:s.jsxs("button",{onClick:()=>{t(),c(!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:[s.jsx(B5,{size:15}),"Sign out"]})})]})]})]})})]})]}),s.jsx(Ma,{children:d&&s.jsxs(s.Fragment,{children:[s.jsx(Ke.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50",onClick:()=>f(!1)}),s.jsxs(Ke.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"fixed inset-x-4 top-20 bg-surface rounded-xl border border-border shadow-xl z-50 max-w-md mx-auto",children:[s.jsxs("div",{className:"p-4 border-b border-border/60 flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Välj Verksamhet"}),s.jsx("button",{onClick:()=>f(!1),className:"p-2 hover:bg-surface-hover rounded-lg",children:s.jsx(Ts,{size:20})})]}),s.jsx("div",{className:"p-2",children:WF.map(j=>s.jsxs("button",{onClick:()=>{p(j.id),f(!1),window.location.reload()},className:`w-full flex items-center gap-3 p-3 rounded-lg transition-colors ${h===j.id?"bg-accent/10 border border-accent/20":"hover:bg-surface-hover"}`,children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(ki,{size:20,className:"text-primary"})}),s.jsxs("div",{className:"text-left",children:[s.jsx("p",{className:"font-medium",children:j.name}),s.jsx("p",{className:"text-sm text-text-secondary",children:j.org})]}),h===j.id&&s.jsx("div",{className:"ml-auto w-2 h-2 rounded-full bg-accent"})]},j.id))})]})]})})]})}const QF=[{path:"/",label:"Briefing",icon:U5},{path:"/dashboard",label:"Dashboard",icon:hS},{path:"/mail",label:"Mail",icon:Dn}],JF=[{path:"/alva",label:"Alva",icon:Ti},{path:"/amos",label:"AMOS",icon:dS},{path:"/quixzoom",label:"quiXzoom",icon:fn},{path:"/landvex",label:"Landvex",icon:k5}],eG=[{path:"/finance",label:"Finance",icon:Bo},{path:"/accounting",label:"Accounting",icon:E5},{path:"/crm",label:"CRM",icon:$r},{path:"/sales",label:"Sales",icon:na},{path:"/marketing",label:"Marketing",icon:I5},{path:"/social",label:"Social",icon:mS},{path:"/hr",label:"HR",icon:Yo},{path:"/legal",label:"Legal",icon:Pn},{path:"/compliance",label:"Compliance",icon:Qr},{path:"/support",label:"Support",icon:kh}];function tG(){const[e,t]=M.useState(!1),[n,r]=M.useState(!1),i=An(),l=c=>i.pathname===c;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"fixed top-0 left-0 right-0 z-40 bg-bg border-b border-border-subtle px-4 py-3 flex items-center justify-between lg:hidden",children:[s.jsx(Ca,{to:"/",className:"text-lg font-bold text-text-primary tracking-wide",children:"AAMOS"}),s.jsx("button",{onClick:()=>t(!e),className:"p-2 rounded-lg bg-surface text-text-primary active:bg-surface-hover","aria-label":"Toggle menu",children:e?s.jsx(Ts,{size:24}):s.jsx(eF,{size:24})})]}),e&&s.jsxs("div",{className:"fixed inset-0 z-[100] bg-bg lg:hidden flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-subtle bg-bg shrink-0",children:[s.jsx("span",{className:"text-lg font-bold text-text-primary",children:"Menu"}),s.jsx("button",{onClick:()=>t(!1),className:"p-2 rounded-lg bg-surface text-text-primary active:bg-surface-hover border border-border/40","aria-label":"Close menu",children:s.jsx(Ts,{size:24})})]}),s.jsxs("div",{className:"p-4 space-y-1 overflow-y-auto flex-1",children:[QF.map(c=>{const d=c.icon;return s.jsxs(Ca,{to:c.path,onClick:()=>t(!1),className:it("flex items-center gap-3 px-4 py-3 rounded-xl text-base font-medium transition-colors",l(c.path)?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"),children:[s.jsx(d,{size:22}),c.label]},c.path)}),s.jsxs("div",{className:"pt-2",children:[s.jsxs("button",{onClick:()=>r(!n),className:"flex items-center justify-between w-full px-4 py-3 rounded-xl text-base font-medium text-text-secondary hover:bg-surface-hover transition-colors",children:[s.jsxs("span",{className:"flex items-center gap-3",children:[s.jsx(Io,{size:22}),"Products"]}),s.jsx(uS,{size:18,className:it("transition-transform",n&&"rotate-180")})]}),n&&s.jsx("div",{className:"ml-4 space-y-1 mt-1",children:JF.map(c=>{const d=c.icon;return s.jsxs(Ca,{to:c.path,onClick:()=>t(!1),className:it("flex items-center gap-3 px-4 py-2.5 rounded-xl text-sm font-medium transition-colors",l(c.path)?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"),children:[s.jsx(d,{size:18}),c.label]},c.path)})})]}),s.jsx("div",{className:"pt-2",children:eG.map(c=>{const d=c.icon;return s.jsxs(Ca,{to:c.path,onClick:()=>t(!1),className:it("flex items-center gap-3 px-4 py-3 rounded-xl text-base font-medium transition-colors",l(c.path)?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"),children:[s.jsx(d,{size:22}),c.label]},c.path)})})]})]})]})}const e6={light:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(10)},medium:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(20)},heavy:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([30,50,30])},success:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([10,30,10])},error:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([50,30,50])},swipe:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(15)}};function nG({children:e,onSwipeLeft:t,onSwipeRight:n,className:r}){const i=M.useRef(null),l=M.useRef(null),[c,d]=M.useState(!1),f=50,h=M.useCallback(y=>{l.current=null,i.current={x:y.targetTouches[0].clientX,y:y.targetTouches[0].clientY},d(!0)},[]),p=M.useCallback(y=>{l.current={x:y.targetTouches[0].clientX,y:y.targetTouches[0].clientY}},[]),x=M.useCallback(()=>{if(d(!1),!i.current||!l.current)return;const y=i.current.x-l.current.x,j=i.current.y-l.current.y;Math.abs(y)>Math.abs(j)&&Math.abs(y)>f&&(e6.swipe(),y>0?t==null||t():n==null||n()),i.current=null,l.current=null},[t,n]);return s.jsx("div",{className:it("touch-pan-y",c&&"select-none",r),onTouchStart:h,onTouchMove:p,onTouchEnd:x,children:e})}function rG({onRefresh:e,children:t,className:n}){const[r,i]=M.useState(!1),[l,c]=M.useState(0),[d,f]=M.useState(!1),h=M.useRef(0),p=M.useRef(null),x=100,y=80,j=M.useCallback(v=>{p.current&&p.current.scrollTop===0&&(h.current=v.targetTouches[0].clientY,i(!0))},[]),w=M.useCallback(v=>{if(!r)return;const O=v.targetTouches[0].clientY-h.current;if(O>0){const A=1+O/x*.5,T=Math.min(O/A,x);c(T)}},[r]),S=M.useCallback(async()=>{if(r){if(l>=y&&!d){f(!0);try{await e()}finally{f(!1)}}i(!1),c(0)}},[r,l,d,e]);return s.jsxs("div",{ref:p,className:it("relative overflow-y-auto",n),onTouchStart:j,onTouchMove:w,onTouchEnd:S,children:[s.jsx("div",{className:"absolute top-0 left-0 right-0 flex items-center justify-center transition-transform",style:{transform:`translateY(${l-60}px)`,opacity:r?1:0},children:s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx(Da,{size:24,className:it("text-primary transition-transform",d&&"animate-spin",!d&&l>=y&&"rotate-180")}),s.jsx("span",{className:"text-xs text-text-secondary",children:d?"Refreshing...":l>=y?"Release to refresh":"Pull to refresh"})]})}),s.jsx("div",{style:{transform:r?`translateY(${l}px)`:"translateY(0)",transition:r?"none":"transform 0.3s ease-out"},children:t})]})}function aG({children:e}){const t=Li(),n=M.useRef(0),r=M.useRef(0),i=M.useRef(null),l=M.useCallback(c=>{const d=Date.now();d-n.current<300?(r.current+=1,r.current===2&&(e6.medium(),t("/dashboard"),r.current=0)):r.current=1,n.current=d,i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=0},500)},[t]);return s.jsx("div",{onTouchEnd:l,children:e})}const mE={finance:{rum:"finance",titel:"Finance AI",systemPrompt:`Du är en expert på finans och redovisning. Du hjälper användaren med:
- Analys av balansräkning och resultaträkning
- MOMS-rapportering och skattefrågor
- Fakturahantering och betalningspåminnelser
- Kassaflödesanalys och prognoser
- Bokslut och årsredovisning
Du har tillgång till företagets finansiella data i realtid.
Svara på svenska eller engelska beroende på användarens språk.
Var professionell, noggrann och hjälpsam.`,kompetenser:["redovisning","finansanalys","skatt","fakturering"],dataTyp:"financial"},sales:{rum:"sales",titel:"Sales AI",systemPrompt:`Du är en expert på försäljning och CRM. Du hjälper användaren med:
- Lead-hantering och kvalificering
- Offertförfrågningar och prissättning
- Säljrapporter och pipeline-analys
- Kundkommunikation och uppföljning
- Säljstrategi och marknadsanalys
Du har tillgång till CRM-data och säljstatistik i realtid.
Svara på svenska eller engelska beroende på användarens språk.`,kompetenser:["försäljning","CRM","leads","offert"],dataTyp:"sales"},hr:{rum:"hr",titel:"HR AI",systemPrompt:`Du är en expert på HR och personalfrågor. Du hjälper användaren med:
- Rekrytering och anställningsprocesser
- Personalhandbok och policyer
- Lönehantering och förmåner
- Semesterplanering och frånvaro
- Medarbetarsamtal och utveckling
Du har tillgång till personaldata och HR-statistik.
Svara på svenska eller engelska beroende på användarens språk.
Var empatisk, professionell och diskret.`,kompetenser:["HR","rekrytering","lön","personal"],dataTyp:"hr"},crm:{rum:"crm",titel:"CRM AI",systemPrompt:`Du är en expert på kundrelationer och CRM. Du hjälper användaren med:
- Kundanalys och segmentering
- Kundresor och touchpoints
- Supportärenden och eskalering
- Kundnöjdhet och NPS
- Kundhistorik och interaktioner
Du har tillgång till CRM-data och kundinteraktioner i realtid.
Svara på svenska eller engelska beroende på användarens språk.`,kompetenser:["CRM","kundservice","support","analys"],dataTyp:"crm"},legal:{rum:"legal",titel:"Legal AI",systemPrompt:`Du är en expert på juridik och compliance. Du hjälper användaren med:
- Avtalsgranskning och tolkning
- GDPR och dataskydd
- Företagsjuridik och bolagsstyrning
- Immaterialrätt och licenser
- Regelverk och efterlevnad
OBS: Du ersätter inte en advokat. Vid komplexa juridiska frågor, hänvisa alltid till jurist.
Svara på svenska eller engelska beroende på användarens språk.
Var noggrann, försiktig och tydlig med begränsningar.`,kompetenser:["juridik","GDPR","avtal","compliance"],dataTyp:"legal"},marketing:{rum:"marketing",titel:"Marketing AI",systemPrompt:`Du är en expert på marknadsföring och kommunikation. Du hjälper användaren med:
- Kampanjplanering och analys
- Sociala medier och content
- SEO och digital marknadsföring
- Marknadsanalys och konkurrenter
- Varumärke och positionering
Du har tillgång till marknadsdata och kampanjstatistik.
Svara på svenska eller engelska beroende på användarens språk.
Var kreativ, strategisk och datadriven.`,kompetenser:["marknadsföring","SEO","sociala medier","analys"],dataTyp:"marketing"},dashboard:{rum:"dashboard",titel:"AMOS Assistant",systemPrompt:`Du är AMOS Assistant - en generell AI-assistent för 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 hela plattformen.
Svara på svenska eller engelska beroende på användarens språk.
Var hjälpsam, kunnig och effektiv.`,kompetenser:["generell","support","teknik","navigering"],dataTyp:"general"}};function iG(e){return mE[e]||mE.dashboard}function sG({rum:e,isOpen:t,onToggle:n}){const r=iG(e),[i,l]=M.useState([{id:"welcome",roll:"assistant",innehall:`Hej! Jag är ${r.titel}. Jag kan hjälpa dig med ${r.kompetenser.join(", ")}. Vad kan jag göra för dig?`,tid:new Date().toISOString()}]),[c,d]=M.useState(""),[f,h]=M.useState(!1),[p,x]=M.useState(!1),y=M.useRef(null),j=M.useRef(null);M.useEffect(()=>{y.current&&(y.current.scrollTop=y.current.scrollHeight)},[i]);const w=async()=>{if(!c.trim()||f)return;const v={id:`user-${Date.now()}`,roll:"user",innehall:c.trim(),tid:new Date().toISOString()};l(_=>[..._,v]),d(""),h(!0);try{const _=await fetch("/api/agent/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rum:r.rum,systemPrompt:r.systemPrompt,meddelanden:[...i,v].map(O=>({roll:O.roll,innehall:O.innehall}))})});if(_.ok){const O=await _.json();l(A=>[...A,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O.svar,tid:new Date().toISOString()}])}else{const O=pE(r,c.trim());l(A=>[...A,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O,tid:new Date().toISOString()}])}}catch{const O=pE(r,c.trim());l(A=>[...A,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O,tid:new Date().toISOString()}])}h(!1)},S=v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),w())};return t?s.jsxs(Ke.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 ${p?"w-[500px]":"w-[380px]"}`,children:[s.jsxs("div",{className:"h-14 border-b border-border flex items-center justify-between px-4 bg-primary/5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:s.jsx(Ti,{size:18,className:"text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-sm",children:r.titel}),s.jsx("p",{className:"text-xs text-text-secondary",children:"AI Assistant"})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>x(!p),className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:p?s.jsx(tF,{size:16}):s.jsx(JH,{size:16})}),s.jsx("button",{onClick:n,className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:s.jsx(Ts,{size:16})})]})]}),s.jsxs("div",{ref:y,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[i.map(v=>s.jsxs("div",{className:`flex gap-3 ${v.roll==="user"?"flex-row-reverse":""}`,children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${v.roll==="assistant"?"bg-primary text-white":"bg-bg text-text-secondary"}`,children:v.roll==="assistant"?s.jsx(Ti,{size:16}):s.jsx(mu,{size:16})}),s.jsx("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${v.roll==="assistant"?"bg-bg text-text-primary rounded-tl-none":"bg-primary text-white rounded-tr-none"}`,children:s.jsx("p",{className:"whitespace-pre-wrap",children:v.innehall})})]},v.id)),f&&s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-white flex items-center justify-center",children:s.jsx(Ti,{size:16})}),s.jsx("div",{className:"bg-bg rounded-2xl rounded-tl-none px-4 py-3",children:s.jsxs("div",{className:"flex gap-1",children:[s.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce"}),s.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-100"}),s.jsx("div",{className:"w-2 h-2 bg-text-secondary rounded-full animate-bounce delay-200"})]})})]})]}),s.jsxs("div",{className:"p-4 border-t border-border",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("textarea",{ref:j,value:c,onChange:v=>d(v.target.value),onKeyDown:S,placeholder:"Skriv ett meddelande...",className:"flex-1 min-h-[44px] max-h-[120px] px-4 py-2.5 rounded-xl border bg-surface text-sm resize-none focus:outline-none focus:ring-2 focus:ring-primary/20",rows:1}),s.jsx("button",{onClick:w,disabled:!c.trim()||f,className:"w-11 h-11 bg-primary text-white rounded-xl flex items-center justify-center hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:s.jsx(Hm,{size:18})})]}),s.jsx("p",{className:"text-xs text-text-secondary mt-2 text-center",children:"AI kan göra misstag. Verifiera viktig information."})]})]}):s.jsx(Ke.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:s.jsx(H5,{size:24})})}function pE(e,t){const n=t.toLowerCase();return e.rum==="finance"?n.includes("moms")?"MOMS (mervärdesskatt) ska redovisas månadsvis eller kvartalsvis beroende på företagets omsättning. Nuvarande MOMS-att-betala är 336 006 kr för perioden. Vill du se detaljerad MOMS-rapport?":n.includes("faktura")||n.includes("invoice")?"Det finns för närvarande 3 fakturor som väntar på betalning. Faktura #INV-2024-0042 är 3 dagar försenad. Vill du skicka en påminnelse?":n.includes("balans")?"Totala tillgångar är 1 842 278 kr, skulder 435 657 kr och eget kapital 1 406 621 kr. Soliditeten är 76.4% vilket är mycket starkt.":"Jag kan hjälpa dig med finansiell analys, MOMS-rapportering, fakturahantering och kassaflödesprognoser. Vad vill du veta mer om?":e.rum==="sales"?n.includes("lead")?"Just nu har vi 12 aktiva leads i pipelinen. 3 är i förhandlingsfas och beräknas stängas denna månad. Vill du se detaljerad pipeline?":"Jag kan hjälpa dig med lead-hantering, offertförfrågningar och säljrapporter. Vad behöver du hjälp med?":e.rum==="hr"?n.includes("semester")?"Du har 25 semesterdagar kvar att ta ut i år. Nästa planerade semester är vecka 32. Vill du ansöka om ny semester?":"Jag kan hjälpa dig med HR-frågor, semesterplanering och personalärenden. Vad kan jag göra för dig?":`Jag förstår. Som ${e.titel} kan jag hjälpa dig med ${e.kompetenser.join(", ")}. Kan du specificera vad du behöver hjälp med?`}const If=["/","/dashboard","/crm","/finance","/amos","/quixzoom","/landvex","/compliance","/accounting"];function oG(){const{sidebarOpen:e}=_5(),t=An(),n=Li(),[r,i]=M.useState(!1),l=()=>t.pathname.replace("/","")||"dashboard";M.useEffect(()=>{const p=()=>i(x=>!x);return window.addEventListener("toggle-agent",p),()=>window.removeEventListener("toggle-agent",p)},[]);const c=If.indexOf(t.pathname),d=()=>{c<If.length-1&&n(If[c+1])},f=()=>{c>0&&n(If[c-1])},h=async()=>{window.location.reload()};return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsx("div",{className:"hidden lg:block",children:s.jsx(YF,{})}),s.jsx("div",{className:"lg:hidden",children:s.jsx(tG,{})}),s.jsxs("div",{className:it("transition-all duration-200 ease-out",e?"lg:ml-[240px]":"lg:ml-[72px]",r&&"lg:mr-[380px]"),children:[s.jsx(ZF,{}),s.jsx("main",{className:"p-4 lg:p-10",children:s.jsx(aG,{children:s.jsx(nG,{onSwipeLeft:d,onSwipeRight:f,children:s.jsx(rG,{onRefresh:h,children:s.jsx(XI,{})})})})})]}),s.jsx(sG,{rum:l(),isOpen:r,onToggle:()=>i(!r)})]})}const As=M.forwardRef(({label:e,error:t,icon:n,className:r,...i},l)=>s.jsxs("div",{className:"w-full",children:[e&&s.jsx("label",{className:"block text-sm font-medium text-text-primary mb-1.5",children:e}),s.jsxs("div",{className:"relative",children:[n&&s.jsx("div",{className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-secondary",children:n}),s.jsx("input",{ref:l,className:it("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&&s.jsx("p",{className:"mt-1.5 text-xs text-danger",children:t})]}));As.displayName="Input";function Ze({children:e,variant:t="primary",size:n="md",loading:r=!1,icon:i,className:l,disabled:c,...d}){const f={primary:"bg-primary text-white hover:bg-primary-hover shadow-sm",secondary:"bg-surface 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 s.jsxs("button",{className:it("inline-flex items-center justify-center gap-2 rounded-[14px] font-medium transition-colors duration-150","focus:outline-none focus:ring-2 focus:ring-primary/20","disabled:opacity-50 disabled:cursor-not-allowed","active:scale-[0.98]",f[t],h[n],l),disabled:c||r,...d,children:[r?s.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):i,e]})}const lG="/api/v1";function cG(){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 qf(e,t,n){const r=`${lG}${t}`,i={"Content-Type":"application/json"},l=cG();l&&(i.Authorization=`Bearer ${l}`);const c=await fetch(r,{method:e,headers:i,body:n?JSON.stringify(n):void 0});if(!c.ok){const d=await c.json().catch(()=>({}));throw c.status===503?new Error(d.error||"Integration not configured"):new Error(d.message||`HTTP ${c.status}`)}return c.json()}const Ee={get:e=>qf("GET",e),post:(e,t)=>qf("POST",e,t),put:(e,t)=>qf("PUT",e,t),delete:e=>qf("DELETE",e)},xE={login:(e,t)=>Ee.post("/auth/login",{email:e,password:t}),me:()=>Ee.get("/auth/me")},mg={customers:()=>Ee.get("/crm/customers"),leads:()=>Ee.get("/crm/leads"),pipeline:()=>Ee.get("/crm/pipeline"),createCustomer:e=>Ee.post("/crm/customers",e),updateCustomer:(e,t)=>Ee.put(`/crm/customers/${e}`,t),deleteCustomer:e=>Ee.delete(`/crm/customers/${e}`)},Uf={deals:()=>Ee.get("/sales/deals"),products:()=>Ee.get("/sales/products"),mrr:()=>Ee.get("/sales/mrr"),arr:()=>Ee.get("/sales/arr"),createDeal:e=>Ee.post("/sales/deals",e),updateDeal:(e,t)=>Ee.put(`/sales/deals/${e}`,t)},hs={balance:()=>Ee.get("/finance/balance?period="),income:()=>Ee.get("/finance/income?period="),moms:()=>Ee.get("/finance/moms?period="),accounts:()=>Ee.get("/finance/accounts"),invoices:()=>Ee.get("/finance/invoices"),cashflow:()=>Ee.get("/finance/cashflow")},yE={engines:()=>Ee.get("/amos/engines"),engineDetails:e=>Ee.get(`/amos/engines/${e}`),restartEngine:e=>Ee.post(`/amos/engines/${e}/restart`),engineLogs:e=>Ee.get(`/amos/engines/${e}/logs`)},Vf={zoomers:()=>Ee.get("/quixzoom/zoomers"),zoomer:e=>Ee.get(`/quixzoom/zoomers/${e}`),fieldData:()=>Ee.get("/quixzoom/field-data"),payouts:()=>Ee.get("/quixzoom/payouts"),payoutStats:()=>Ee.get("/quixzoom/payouts/stats"),insights:()=>Ee.get("/quixzoom/insights")},Hf={entities:()=>Ee.get("/landvex/entities"),entity:e=>Ee.get(`/landvex/entities/${e}`),documents:()=>Ee.get("/landvex/documents"),compliance:()=>Ee.get("/landvex/compliance"),ownership:()=>Ee.get("/landvex/ownership")},Lc={iso:()=>Ee.get("/compliance/iso"),gdpr:()=>Ee.get("/compliance/gdpr"),risks:()=>Ee.get("/compliance/risks"),legalCases:()=>Ee.get("/compliance/legal-cases"),policies:()=>Ee.get("/compliance/policies")},gE={employees:()=>Ee.get("/hr/employees"),leaves:()=>Ee.get("/hr/leaves"),createEmployee:e=>Ee.post("/hr/employees",e),createLeave:e=>Ee.post("/hr/leaves",e)},uG={entries:()=>Ee.get("/journal/entries"),entry:e=>Ee.get(`/journal/entries/${e}`)};function dG(){const e=Li(),{login:t}=Ia(),[n,r]=M.useState(""),[i,l]=M.useState(""),[c,d]=M.useState(!1),[f,h]=M.useState(""),[p,x]=M.useState(!1),y=async j=>{var w;j.preventDefault(),h(""),x(!0);try{const S=await xE.login(n,i);if(!S.ok){h("Invalid credentials");return}localStorage.setItem("amos_token",S.token);const v=await xE.me();t(S.token,{id:v.user.sub,email:v.user.email,name:"Erik Svensson",role:((w=v.user.roles)==null?void 0:w[0])||"user"}),e("/")}catch(S){h(S instanceof Error?S.message:"Login failed")}finally{x(!1)}};return s.jsx("div",{className:"min-h-screen bg-bg flex items-center justify-center p-4",children:s.jsxs(Ke.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"w-full max-w-[400px]",children:[s.jsx("div",{className:"flex items-center justify-center mb-10",children:s.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary flex items-center justify-center",children:s.jsx("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:s.jsx("path",{d:"M10 22L16 10L22 22H10Z",stroke:"white",strokeWidth:"2.5",strokeLinejoin:"round"})})})}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-text-primary",children:"Welcome back"}),s.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Sign in to your AMOS account"})]}),s.jsxs("form",{onSubmit:y,className:"space-y-4",children:[s.jsx(As,{label:"Email",type:"email",placeholder:"you@company.com",value:n,onChange:j=>r(j.target.value),icon:s.jsx(Dn,{size:16}),required:!0}),s.jsxs("div",{className:"relative",children:[s.jsx(As,{label:"Password",type:c?"text":"password",placeholder:"Enter your password",value:i,onChange:j=>l(j.target.value),icon:s.jsx($5,{size:16}),required:!0}),s.jsx("button",{type:"button",onClick:()=>d(!c),className:"absolute right-3.5 top-[38px] text-text-secondary hover:text-text-primary transition-colors",children:c?s.jsx(FH,{size:16}):s.jsx(fS,{size:16})})]}),f&&s.jsx(Ke.p,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"text-sm text-danger",children:f}),s.jsx(Ze,{type:"submit",size:"lg",loading:p,className:"w-full",children:"Sign in"})]})]})})}function fG(){const[e,t]=M.useState({total:0,open:0,in_progress:0,resolved:0}),[n,r]=M.useState(!0);return M.useEffect(()=>{fetch("http://localhost:3457/api/tickets/stats").then(i=>i.json()).then(i=>{t(i),r(!1)}).catch(()=>{t({total:24,open:8,in_progress:5,resolved:11}),r(!1)})},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx("div",{className:"h-16 bg-gray-200 rounded"}),s.jsx("div",{className:"h-16 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center",children:s.jsx(kh,{size:16,className:"text-blue-600"})}),s.jsx("h3",{className:"font-semibold",children:"Support Tickets"})]}),s.jsxs(Ca,{to:"/support",className:"text-sm text-blue-600 hover:text-blue-700 flex items-center gap-1",children:["View all ",s.jsx(lS,{size:14})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"bg-orange-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Zr,{size:14,className:"text-orange-600"}),s.jsx("span",{className:"text-xs text-orange-600 font-medium",children:"Open"})]}),s.jsx("div",{className:"text-2xl font-bold text-orange-700",children:e.open})]}),s.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(dn,{size:14,className:"text-blue-600"}),s.jsx("span",{className:"text-xs text-blue-600 font-medium",children:"In Progress"})]}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:e.in_progress})]}),s.jsxs("div",{className:"bg-green-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(yr,{size:14,className:"text-green-600"}),s.jsx("span",{className:"text-xs text-green-600 font-medium",children:"Resolved"})]}),s.jsx("div",{className:"text-2xl font-bold text-green-700",children:e.resolved})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(kh,{size:14,className:"text-gray-600"}),s.jsx("span",{className:"text-xs text-gray-600 font-medium",children:"Total"})]}),s.jsx("div",{className:"text-2xl font-bold text-gray-700",children:e.total})]})]})]})}function hG(){const[e,t]=M.useState({active:0,completed:0,overdue:0}),[n,r]=M.useState(!0);return M.useEffect(()=>{fetch("http://localhost:3457/api/dashboard/stats").then(i=>i.json()).then(i=>{t({active:i.active_issues||0,completed:12,overdue:2}),r(!1)}).catch(()=>{t({active:8,completed:12,overdue:2}),r(!1)})},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"h-12 bg-gray-200 rounded"}),s.jsx("div",{className:"h-12 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-purple-100 rounded-lg flex items-center justify-center",children:s.jsx(D5,{size:16,className:"text-purple-600"})}),s.jsx("h3",{className:"font-semibold",children:"Projects"})]}),s.jsxs(Ca,{to:"/projects",className:"text-sm text-purple-600 hover:text-purple-700 flex items-center gap-1",children:["View all ",s.jsx(lS,{size:14})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 bg-blue-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(na,{size:16,className:"text-blue-600"}),s.jsx("span",{className:"text-sm text-blue-700",children:"Active"})]}),s.jsx("span",{className:"text-xl font-bold text-blue-700",children:e.active})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-green-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yr,{size:16,className:"text-green-600"}),s.jsx("span",{className:"text-sm text-green-700",children:"Completed"})]}),s.jsx("span",{className:"text-xl font-bold text-green-700",children:e.completed})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 bg-red-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Zr,{size:16,className:"text-red-600"}),s.jsx("span",{className:"text-sm text-red-700",children:"Overdue"})]}),s.jsx("span",{className:"text-xl font-bold text-red-700",children:e.overdue})]})]})]})}function mG(){const[e,t]=M.useState([]),[n,r]=M.useState(!0);M.useEffect(()=>{fetch("http://localhost:3457/api/services/health").then(l=>l.json()).then(l=>{t(l.slice(0,5)),r(!1)}).catch(()=>{t([{service_name:"aamos-ledger",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"aamos-identity",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"api-gateway",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"postgres-primary",status:"up",last_check:new Date().toISOString(),consecutive_failures:0},{service_name:"redis-cache",status:"down",last_check:new Date().toISOString(),consecutive_failures:2}]),r(!1)})},[]);const i=e.filter(l=>l.status==="down"||l.status==="error");return n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-8 bg-gray-200 rounded"}),s.jsx("div",{className:"h-8 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-green-100 rounded-lg flex items-center justify-center",children:s.jsx(Rh,{size:16,className:"text-green-600"})}),s.jsx("h3",{className:"font-semibold",children:"Service Health"})]}),i.length>0&&s.jsxs("span",{className:"px-2 py-1 bg-red-100 text-red-700 text-xs rounded-full font-medium",children:[i.length," down"]})]}),s.jsx("div",{className:"space-y-2",children:e.map(l=>s.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-gray-50",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[l.status==="up"?s.jsx(yr,{size:14,className:"text-green-500"}):l.status==="down"?s.jsx(Mh,{size:14,className:"text-red-500"}):s.jsx(Zr,{size:14,className:"text-yellow-500"}),s.jsx("span",{className:"text-sm",children:l.service_name})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${l.status==="up"?"bg-green-100 text-green-700":l.status==="down"?"bg-red-100 text-red-700":"bg-yellow-100 text-yellow-700"}`,children:l.status})]},l.service_name))})]})}function pG(){const[e,t]=M.useState({active_campaigns:0,scheduled_posts:0,impressions:0,engagement:0}),[n,r]=M.useState(!0);return M.useEffect(()=>{setTimeout(()=>{t({active_campaigns:3,scheduled_posts:12,impressions:45200,engagement:2340}),r(!1)},500)},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx("div",{className:"h-16 bg-gray-200 rounded"}),s.jsx("div",{className:"h-16 bg-gray-200 rounded"})]})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-pink-100 rounded-lg flex items-center justify-center",children:s.jsx(Megaphone,{size:16,className:"text-pink-600"})}),s.jsx("h3",{className:"font-semibold",children:"Marketing"})]}),s.jsxs(Ca,{to:"/marketing",className:"text-sm text-pink-600 hover:text-pink-700 flex items-center gap-1",children:["View all ",s.jsx(ArrowRight,{size:14})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-pink-50 rounded-lg p-3",children:[s.jsx("div",{className:"text-xs text-pink-600 mb-1",children:"Active Campaigns"}),s.jsx("div",{className:"text-2xl font-bold text-pink-700",children:e.active_campaigns})]}),s.jsxs("div",{className:"bg-purple-50 rounded-lg p-3",children:[s.jsx("div",{className:"text-xs text-purple-600 mb-1",children:"Scheduled"}),s.jsx("div",{className:"text-2xl font-bold text-purple-700",children:e.scheduled_posts})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-500 flex items-center gap-1",children:[s.jsx(Eye,{size:14})," Impressions"]}),s.jsx("span",{className:"font-medium",children:e.impressions.toLocaleString()})]}),s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("span",{className:"text-gray-500 flex items-center gap-1",children:[s.jsx(TrendingUp,{size:14})," Engagement"]}),s.jsx("span",{className:"font-medium",children:e.engagement.toLocaleString()})]})]})]})}function xG(){const[e,t]=M.useState([]),[n,r]=M.useState(!0);return M.useEffect(()=>{fetch("http://localhost:3457/api/sla/violations").then(i=>i.json()).then(i=>{t(i.slice(0,3)),r(!1)}).catch(()=>{t([{id:"1",ticket_number:"SUP-2024-005",subject:"Database timeout",violation_type:"sla_exceeded",severity:"critical",detected_at:new Date().toISOString()},{id:"2",ticket_number:"SUP-2024-003",subject:"Invoice not received",violation_type:"no_response",severity:"high",detected_at:new Date().toISOString()}]),r(!1)})},[]),n?s.jsxs("div",{className:"bg-white border rounded-xl p-6 animate-pulse",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),s.jsx("div",{className:"space-y-2",children:s.jsx("div",{className:"h-10 bg-gray-200 rounded"})})]}):s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-white border rounded-xl p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-yellow-100 rounded-lg flex items-center justify-center",children:s.jsx(Shield,{size:16,className:"text-yellow-600"})}),s.jsx("h3",{className:"font-semibold",children:"SLA Status"})]}),e.length>0&&s.jsxs("span",{className:"px-2 py-1 bg-red-100 text-red-700 text-xs rounded-full font-medium",children:[e.length," violations"]})]}),e.length===0?s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-green-50 rounded-lg",children:[s.jsx(CheckCircle2,{size:20,className:"text-green-600"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-green-700",children:"All SLA met"}),s.jsx("p",{className:"text-xs text-green-600",children:"No violations detected"})]})]}):s.jsx("div",{className:"space-y-2",children:e.map(i=>s.jsxs("div",{className:`p-3 rounded-lg ${i.severity==="critical"?"bg-red-50":i.severity==="high"?"bg-orange-50":"bg-yellow-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(AlertTriangle,{size:14,className:i.severity==="critical"?"text-red-600":i.severity==="high"?"text-orange-600":"text-yellow-600"}),s.jsx("span",{className:"text-sm font-medium",children:i.ticket_number})]}),s.jsx("p",{className:"text-xs text-gray-600",children:i.subject}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:i.violation_type.replace("_"," ")})]},i.id))})]})}function yG(){return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Dashboard"}),s.jsx("p",{className:"text-gray-500",children:"Real-time overview of all operations"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsx(fG,{}),s.jsx(hG,{}),s.jsx(mG,{}),s.jsx(pG,{}),s.jsx(xG,{}),s.jsxs(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"bg-white border rounded-xl p-6",children:[s.jsx("h3",{className:"font-semibold mb-4",children:"Quick Actions"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("a",{href:"/support",className:"flex items-center gap-3 p-3 bg-blue-50 rounded-lg hover:bg-blue-100 transition-colors",children:[s.jsx("span",{className:"text-blue-600",children:"+"}),s.jsx("span",{className:"text-sm font-medium",children:"New Support Ticket"})]}),s.jsxs("a",{href:"/projects",className:"flex items-center gap-3 p-3 bg-purple-50 rounded-lg hover:bg-purple-100 transition-colors",children:[s.jsx("span",{className:"text-purple-600",children:"+"}),s.jsx("span",{className:"text-sm font-medium",children:"New Project Issue"})]}),s.jsxs("a",{href:"/marketing",className:"flex items-center gap-3 p-3 bg-pink-50 rounded-lg hover:bg-pink-100 transition-colors",children:[s.jsx("span",{className:"text-pink-600",children:"+"}),s.jsx("span",{className:"text-sm font-medium",children:"New Campaign"})]})]})]})]})]})}const gG={getRealBriefing:()=>Ee.get("/briefing/real")};function _e({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"},l={sm:"px-2 py-0.5 text-[11px]",md:"px-2.5 py-1 text-xs"};return s.jsx("span",{className:it("inline-flex items-center rounded-full font-medium",i[t],l[n],r),children:e})}function Ff({title:e,value:t,subtitle:n,icon:r,trend:i,trendValue:l,variant:c="default"}){const d={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 s.jsxs("div",{className:`p-4 rounded-xl border ${d[c]}`,children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm text-text-secondary",children:e}),s.jsx("p",{className:"text-2xl font-semibold",children:t}),n&&s.jsx("p",{className:"text-xs text-text-tertiary",children:n})]}),r&&s.jsx("div",{className:"text-text-secondary",children:r})]}),i&&s.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[i==="up"&&s.jsx(na,{size:14,className:"text-success"}),i==="down"&&s.jsx(G5,{size:14,className:"text-danger"}),i==="neutral"&&s.jsx(Zr,{size:14,className:"text-text-secondary"}),s.jsx("span",{className:`text-xs ${i==="up"?"text-success":i==="down"?"text-danger":"text-text-secondary"}`,children:l})]})]})}function vG({alert:e}){const t={info:{icon:s.jsx(Zr,{size:16}),color:"text-primary bg-primary/5 border-primary/20"},warning:{icon:s.jsx(hn,{size:16}),color:"text-warning bg-warning/5 border-warning/20"},critical:{icon:s.jsx(hn,{size:16}),color:"text-danger bg-danger/5 border-danger/20"}},n=t[e.level]||t.info;return s.jsx("div",{className:`p-3 rounded-lg border ${n.color}`,children:s.jsxs("div",{className:"flex items-start gap-2",children:[n.icon,s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium",children:e.title}),s.jsx("p",{className:"text-xs opacity-80 mt-0.5",children:e.description})]}),s.jsx(_e,{variant:"default",className:"text-xs",children:e.source})]})})}function bG({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 s.jsx("div",{className:"p-3 rounded-lg border border-border bg-surface hover:bg-surface-hover transition-colors cursor-pointer group",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.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}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:e.title}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.description}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsxs("span",{className:"text-xs text-text-tertiary flex items-center gap-1",children:[s.jsx(dn,{size:12}),e.time_estimate]}),s.jsx("span",{className:"text-xs text-text-tertiary",children:e.impact})]})]}),s.jsx(lS,{size:16,className:"text-text-tertiary group-hover:text-primary transition-colors shrink-0"})]})})}function jG({task:e}){const t={critical:"danger",high:"warning",medium:"default",low:"success"};return s.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-warning shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm truncate",children:e.title}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[s.jsx(_e,{variant:t[e.priority],className:"text-xs",children:e.priority}),s.jsx("span",{className:"text-xs text-text-tertiary",children:e.category})]})]}),s.jsxs("span",{className:"text-xs text-text-tertiary shrink-0",children:[e.days_open,"d"]})]})}function wG({deal:e}){return s.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:s.jsx(Yo,{size:16,className:"text-primary"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:e.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:e.customer})]}),s.jsxs("div",{className:"text-right shrink-0",children:[s.jsx("p",{className:"text-sm font-medium",children:Ce(e.value)}),s.jsxs("p",{className:"text-xs text-text-tertiary",children:[e.probability,"%"]})]})]})}function te({children:e,className:t,hover:n=!1,padding:r="lg",onClick:i}){const l={sm:"p-4",md:"p-5",lg:"p-6 md:p-8"};return s.jsx(Ke.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},onClick:i,className:it("bg-surface rounded-[20px] card-shadow",l[r],(n||i)&&"transition-shadow duration-200 hover:shadow-hover cursor-pointer",t),children:e})}function Ge({title:e,subtitle:t,action:n,className:r}){return s.jsxs("div",{className:it("flex items-start justify-between mb-6",r),children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-semibold text-text-primary",children:e}),t&&s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:t})]}),n&&s.jsx("div",{children:n})]})}function Me({className:e}){return s.jsx("div",{className:it("animate-pulse rounded-[14px] bg-text-secondary/8",e)})}function SG(){var j;const[e,t]=M.useState(null),[n,r]=M.useState(!0),[i,l]=M.useState("");if(M.useEffect(()=>{async function w(){try{r(!0);const v=await gG.getRealBriefing();t(v)}catch(v){l(v instanceof Error?v.message:"Failed to load briefing")}finally{r(!1)}}w();const S=setInterval(w,3e5);return()=>clearInterval(S)},[]),n)return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:Array.from({length:4}).map((w,S)=>s.jsx(Me,{className:"h-[120px]"},S))}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsx(Me,{className:"h-[400px] lg:col-span-2"}),s.jsx(Me,{className:"h-[400px]"})]})]});if(i)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsx(hn,{size:48,className:"text-danger mx-auto mb-4"}),s.jsx("p",{className:"text-danger font-medium",children:i}),s.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:c,my_tasks:d,my_deals:f,team_overview:h,financial_status:p,alerts:x,actions:y}=e;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Dagsöversikt"}),s.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"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${c.status==="healthy"?"bg-success":c.status==="warning"?"bg-warning":"bg-danger"}`}),s.jsx("span",{className:"text-sm text-text-secondary capitalize",children:c.status})]})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(Ff,{title:"Cash Position",value:Ce(c.cash_position),subtitle:"Eget kapital",icon:s.jsx(P5,{size:20}),trend:c.profit_margin>0?"up":"down",trendValue:`${fE(c.profit_margin)}% marginal`,variant:c.cash_position>1e6?"success":c.cash_position>5e5?"warning":"danger"}),s.jsx(Ff,{title:"Pipeline",value:Ce(c.total_pipeline),subtitle:`${c.active_deals} aktiva deals`,icon:s.jsx(Yo,{size:20}),trend:"up",trendValue:"+12% vs förra månaden"}),s.jsx(Ff,{title:"Team",value:`${h.active_now}/${h.total_members}`,subtitle:`${h.on_leave} på leave`,icon:s.jsx($r,{size:20}),trend:h.on_leave>0?"neutral":"up",trendValue:h.on_leave>0?`${h.on_leave} borta idag`:"Alla närvarande"}),s.jsx(Ff,{title:"Mina Tasks",value:d.length,subtitle:`${d.filter(w=>w.priority==="critical").length} kritiska`,icon:s.jsx(uF,{size:20}),variant:d.filter(w=>w.priority==="critical").length>0?"danger":d.filter(w=>w.priority==="high").length>0?"warning":"success"})]}),x.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(hn,{size:20,className:"text-warning"}),"Varningar"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:x.map((w,S)=>s.jsx(vG,{alert:w},S))})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[y.length>0&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Rekommenderade Åtgärder",subtitle:"Prioriterade baserat på din roll och aktuell data"}),s.jsx("div",{className:"p-4 space-y-3",children:y.map((w,S)=>s.jsx(bG,{action:w},S))})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Mina Uppgifter",subtitle:`${d.length} öppna uppgifter`}),s.jsx("div",{className:"p-4 space-y-1",children:d.length===0?s.jsxs("div",{className:"text-center py-8 text-text-secondary",children:[s.jsx(yr,{size:48,className:"mx-auto mb-2 text-success"}),s.jsx("p",{children:"Alla uppgifter är klara!"})]}):d.map(w=>s.jsx(jG,{task:w},w.id))})]}),f.length>0&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Mina Deals",subtitle:`${f.length} aktiva förhandlingar`}),s.jsx("div",{className:"p-4 space-y-1",children:f.map(w=>s.jsx(wG,{deal:w},w.id))})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Teamöversikt",subtitle:`${h.total_members} medlemmar`}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[s.jsxs("div",{className:"text-center p-2 bg-success/5 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-semibold text-success",children:h.active_now}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]}),s.jsxs("div",{className:"text-center p-2 bg-warning/5 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-semibold text-warning",children:h.on_leave}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Borta"})]}),s.jsxs("div",{className:"text-center p-2 bg-primary/5 rounded-lg",children:[s.jsx("p",{className:"text-2xl font-semibold text-primary",children:h.open_tickets}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Tickets"})]})]}),s.jsx("div",{className:"space-y-2",children:h.members.slice(0,5).map((w,S)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-xs font-medium text-primary",children:w.name.split(" ").map(v=>v[0]).join("")}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:w.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:w.role})]}),w.open_tasks>0&&s.jsx(_e,{variant:"warning",className:"text-xs",children:w.open_tasks})]},S))})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Finansiell Status",subtitle:"Från ledger i realtid"}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Tillgångar"}),s.jsx("span",{className:"text-sm font-medium",children:Ce(p.total_assets)})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Skulder"}),s.jsx("span",{className:"text-sm font-medium",children:Ce(p.total_liabilities)})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Eget Kapital"}),s.jsx("span",{className:"text-sm font-medium text-success",children:Ce(p.equity)})]}),p.runway_months>0&&s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Runway"}),s.jsxs("span",{className:"text-sm font-medium",children:[fE(p.runway_months)," mån"]})]}),s.jsxs("div",{className:"pt-2 border-t border-border",children:[s.jsx("p",{className:"text-xs text-text-tertiary mb-2",children:"Top Konton"}),(j=p.top_accounts)==null?void 0:j.slice(0,3).map((w,S)=>s.jsxs("div",{className:"flex justify-between items-center py-1",children:[s.jsx("span",{className:"text-xs text-text-secondary",children:w.name}),s.jsx("span",{className:"text-xs font-medium",children:Ce(w.amount)})]},S))]})]})]})]})]})]})}function NG(){return s.jsx(SG,{})}function AG(){const{user:e}=Ia(),[t]=_q(),[n,r]=M.useState(null),[i,l]=M.useState(!0),[c,d]=M.useState(!1),[f,h]=M.useState(t.get("tab")||"general");M.useEffect(()=>{l(!0),fetch("/api/v1/users/me",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}).then(y=>y.json()).then(y=>{var j,w,S,v,_,O,A,T,N,E,k,R,L;r({id:((j=y.user)==null?void 0:j.id)||(e==null?void 0:e.id)||"",name:((w=y.user)==null?void 0:w.name)||(e==null?void 0:e.name)||"",email:((S=y.user)==null?void 0:S.email)||(e==null?void 0:e.email)||"",phone:((v=y.user)==null?void 0:v.phone)||"",role:((_=y.user)==null?void 0:_.role)||(e==null?void 0:e.role)||"user",department:((O=y.user)==null?void 0:O.department)||"",timezone:((A=y.user)==null?void 0:A.timezone)||"Europe/Stockholm",language:((T=y.user)==null?void 0:T.language)||"sv",notifications:((N=y.user)==null?void 0:N.notifications)||{email:!0,push:!0,sms:!1},theme:((E=y.user)==null?void 0:E.theme)||"light",twoFactorEnabled:((k=y.user)==null?void 0:k.twoFactorEnabled)||!1,lastLogin:((R=y.user)==null?void 0:R.lastLogin)||new Date().toISOString(),createdAt:((L=y.user)==null?void 0:L.createdAt)||new Date().toISOString()}),l(!1)}).catch(()=>{r({id:(e==null?void 0:e.id)||"",name:(e==null?void 0:e.name)||"",email:(e==null?void 0:e.email)||"",phone:"",role:(e==null?void 0:e.role)||"user",department:"",timezone:"Europe/Stockholm",language:"sv",notifications:{email:!0,push:!0,sms:!1},theme:"light",twoFactorEnabled:!1,lastLogin:new Date().toISOString(),createdAt:new Date().toISOString()}),l(!1)})},[e]);const p=async()=>{d(!0),await new Promise(y=>setTimeout(y,1e3)),d(!1)};if(i)return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Me,{className:"h-[200px]"}),s.jsx(Me,{className:"h-[400px]"})]});if(!n)return null;const x=[{id:"general",label:"Allmänt",icon:mu},{id:"security",label:"Säkerhet",icon:Qr},{id:"notifications",label:"Notifikationer",icon:K1},{id:"preferences",label:"Inställningar",icon:fn}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Min Profil"}),s.jsx("p",{className:"text-text-secondary",children:"Hantera dina kontoinställningar"})]}),s.jsx(Ze,{onClick:p,disabled:c,icon:c?void 0:s.jsx(oF,{size:16}),children:c?"Sparar...":"Spara ändringar"})]}),s.jsxs(te,{className:"relative overflow-hidden",children:[s.jsx("div",{className:"h-32 bg-gradient-to-r from-primary to-primary-hover"}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"relative -mt-16 mb-4",children:s.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:[n.avatar?s.jsx("img",{src:n.avatar,alt:n.name,className:"w-full h-full rounded-2xl object-cover"}):n.name.split(" ").map(y=>y[0]).join(""),s.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:s.jsx(ph,{size:14})})]})}),s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold",children:n.name}),s.jsx("p",{className:"text-text-secondary",children:n.email}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(_e,{variant:"primary",children:n.role}),s.jsx(_e,{variant:"default",children:n.department})]})]}),s.jsxs("div",{className:"text-right text-sm text-text-secondary",children:[s.jsxs("p",{children:["Senaste inloggning: ",Et(n.lastLogin)]}),s.jsxs("p",{children:["Medlem sedan: ",Et(n.createdAt)]})]})]})]})]}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto",children:x.map(y=>s.jsxs("button",{onClick:()=>h(y.id),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${f===y.id?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(y.icon,{size:16}),y.label]},y.id))}),f==="general"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Personlig information",subtitle:"Uppdatera dina kontouppgifter"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Fullständigt namn"}),s.jsxs("div",{className:"relative",children:[s.jsx(mu,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",value:n.name,onChange:y=>r({...n,name:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"E-post"}),s.jsxs("div",{className:"relative",children:[s.jsx(Dn,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"email",value:n.email,onChange:y=>r({...n,email:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Telefon"}),s.jsxs("div",{className:"relative",children:[s.jsx(oE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"tel",value:n.phone||"",onChange:y=>r({...n,phone:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Avdelning"}),s.jsxs("div",{className:"relative",children:[s.jsx(ki,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",value:n.department||"",onChange:y=>r({...n,department:y.target.value}),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Kontoinformation",subtitle:"Dina kontodetaljer"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Användar-ID"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.id})]}),s.jsx(_e,{variant:"default",children:"Aktiv"})]}),s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Roll"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.role})]}),s.jsx(Qr,{size:16,className:"text-primary"})]}),s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Tidszon"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.timezone})]}),s.jsx(fn,{size:16,className:"text-text-secondary"})]}),s.jsxs("div",{className:"flex items-center justify-between py-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Språk"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.language==="sv"?"Svenska":n.language})]}),s.jsx(fn,{size:16,className:"text-text-secondary"})]})]})]})]}),f==="security"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Lösenord",subtitle:"Uppdatera ditt lösenord"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nuvarande lösenord"}),s.jsxs("div",{className:"relative",children:[s.jsx(iE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"password",placeholder:"••••••••",className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Nytt lösenord"}),s.jsx("input",{type:"password",placeholder:"Minst 8 tecken",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Bekräfta nytt lösenord"}),s.jsx("input",{type:"password",placeholder:"Upprepa lösenord",className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm"})]}),s.jsxs(Ze,{variant:"secondary",className:"w-full",children:[s.jsx(iE,{size:16,className:"mr-2"}),"Ändra lösenord"]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Tvåfaktorsautentisering",subtitle:"Öka säkerheten på ditt konto"}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"2FA-status"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.twoFactorEnabled?"Aktiverad":"Ej aktiverad"})]}),s.jsx(_e,{variant:n.twoFactorEnabled?"success":"default",children:n.twoFactorEnabled?"Aktiv":"Inaktiv"})]}),!n.twoFactorEnabled&&s.jsxs(Ze,{className:"w-full",children:[s.jsx(Qr,{size:16,className:"mr-2"}),"Aktivera 2FA"]})]})]})]}),f==="notifications"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Notifikationsinställningar",subtitle:"Hantera hur du får notifieringar"}),s.jsx("div",{className:"p-4 space-y-4",children:[{key:"email",label:"E-postnotifikationer",description:"Få uppdateringar via e-post",icon:Dn},{key:"push",label:"Push-notifikationer",description:"Få notifikationer i webbläsaren",icon:K1},{key:"sms",label:"SMS-notifikationer",description:"Få viktiga uppdateringar via SMS",icon:oE}].map(y=>s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border last:border-0",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary",children:s.jsx(y.icon,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:y.label}),s.jsx("p",{className:"text-xs text-text-secondary",children:y.description})]})]}),s.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:n.notifications[y.key],onChange:j=>r({...n,notifications:{...n.notifications,[y.key]:j.target.checked}}),className:"sr-only peer"}),s.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))})]}),f==="preferences"&&s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(Ge,{title:"Utseende",subtitle:"Anpassa hur BOC ser ut"}),s.jsx("div",{className:"p-4 space-y-4",children:s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Tema"}),s.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{id:"light",label:"Ljust",icon:F5},{id:"dark",label:"Mörkt",icon:q5},{id:"system",label:"System",icon:nF}].map(y=>s.jsxs("button",{onClick:()=>r({...n,theme:y.id}),className:`p-3 rounded-xl border text-center transition-colors ${n.theme===y.id?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/30"}`,children:[s.jsx(y.icon,{size:20,className:"mx-auto mb-1"}),s.jsx("span",{className:"text-xs",children:y.label})]},y.id))})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Regionala inställningar",subtitle:"Språk och tidszon"}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Språk"}),s.jsxs("select",{value:n.language,onChange:y=>r({...n,language:y.target.value}),className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm",children:[s.jsx("option",{value:"sv",children:"Svenska"}),s.jsx("option",{value:"en",children:"English"}),s.jsx("option",{value:"no",children:"Norsk"}),s.jsx("option",{value:"da",children:"Dansk"}),s.jsx("option",{value:"fi",children:"Suomi"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Tidszon"}),s.jsxs("select",{value:n.timezone,onChange:y=>r({...n,timezone:y.target.value}),className:"w-full h-10 px-4 rounded-[14px] border bg-surface text-sm",children:[s.jsx("option",{value:"Europe/Stockholm",children:"Stockholm (CET)"}),s.jsx("option",{value:"Europe/Oslo",children:"Oslo (CET)"}),s.jsx("option",{value:"Europe/Copenhagen",children:"Köpenhamn (CET)"}),s.jsx("option",{value:"Europe/Helsinki",children:"Helsingfors (EET)"}),s.jsx("option",{value:"UTC",children:"UTC"})]})]})]})]})]})]})}function Pi({children:e,className:t}){return s.jsx("div",{className:"w-full overflow-x-auto",children:s.jsx("table",{className:it("w-full",t),children:e})})}function Ri({children:e,className:t}){return s.jsx("thead",{className:it("border-b border-border",t),children:e})}function Di({children:e,className:t}){return s.jsx("tbody",{className:t,children:e})}function Rt({children:e,className:t}){return s.jsx("tr",{className:it("border-b border-border/50 transition-colors hover:bg-bg/50",t),children:e})}function Ae({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return s.jsx("th",{colSpan:r,className:it("py-3 px-4 text-xs font-medium text-text-secondary uppercase tracking-wider",i[n],t),children:e})}function be({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return s.jsx("td",{colSpan:r,className:it("py-3.5 px-4 text-sm text-text-primary",i[n],t),children:e})}function vE({icon:e,title:t,description:n,action:r,className:i}){return s.jsxs("div",{className:it("flex flex-col items-center justify-center py-16 text-center",i),children:[e&&s.jsx("div",{className:"mb-4 text-text-secondary/40",children:e}),s.jsx("h3",{className:"text-sm font-medium text-text-primary",children:t}),n&&s.jsx("p",{className:"mt-1 text-sm text-text-secondary max-w-sm",children:n}),r&&s.jsx("div",{className:"mt-4",children:r})]})}function _G({children:e,className:t,onClick:n}){return s.jsx("div",{onClick:n,className:it("bg-surface rounded-2xl p-4 card-shadow border border-border/40",n&&"active:scale-[0.98] transition-transform cursor-pointer",t),children:e})}function OG({children:e,variant:t="default",className:n}){const r={default:"bg-bg text-text-secondary",success:"bg-success-light text-success",warning:"bg-warning-light text-warning",danger:"bg-danger-light text-danger",info:"bg-primary-light text-primary"};return s.jsx("span",{className:it("text-xs font-medium px-2.5 py-1 rounded-full",r[t],n),children:e})}const TG=["Customers","Leads","Pipeline"];function EG(){const[e,t]=M.useState("Customers"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState(0),[y,j]=M.useState([]),[w,S]=M.useState([]);M.useEffect(()=>{async function A(){l(!0),d("");try{const[T,N,E]=await Promise.all([mg.customers(),mg.leads(),mg.pipeline()]);h(T.customers),x(T.total),j(N.leads);const k=E;S(k.stages||k.pipeline||[])}catch(T){d(T instanceof Error?T.message:"Failed to load CRM data")}finally{l(!1)}}A()},[]);const v=f.filter(A=>A.name.toLowerCase().includes(n.toLowerCase())||(A.company||"").toLowerCase().includes(n.toLowerCase())),_=y.filter(A=>A.name.toLowerCase().includes(n.toLowerCase())||(A.company||"").toLowerCase().includes(n.toLowerCase())),O=w.reduce((A,T)=>A+(T.value||0),0);return i?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"})]}),s.jsx(Me,{className:"h-[400px]"})]}):c?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"CRM"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Manage customers, leads, and pipeline"})]}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),children:"Add Contact"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx($r,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:p}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Customers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(Dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:y.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Leads"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(ki,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(O)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Pipeline Value"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:TG.map(A=>s.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))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.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"})]}),s.jsx(Ze,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),e==="Customers"&&s.jsxs(te,{children:[s.jsx("div",{className:"hidden md:block",children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Customer"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Phone"}),s.jsx(Ae,{children:"Created"}),s.jsx(Ae,{align:"right"})]})}),s.jsx(Di,{children:v.map(A=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:A.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:A.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:A.email})]})]})}),s.jsx(be,{children:A.company||"—"}),s.jsx(be,{children:s.jsx(_e,{variant:A.status==="active"?"success":A.status==="lead"?"primary":"default",children:A.status})}),s.jsx(be,{children:A.phone||"—"}),s.jsx(be,{children:Et(A.created_at)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},A.id))})]})}),s.jsx("div",{className:"md:hidden p-4 space-y-3",children:v.map(A=>s.jsx(_G,{children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center text-sm font-semibold shrink-0",children:A.name.charAt(0)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-medium text-text-primary",children:A.name}),s.jsx("div",{className:"text-sm text-text-secondary",children:A.email}),A.company&&s.jsx("div",{className:"text-sm text-text-secondary mt-1",children:A.company}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(OG,{variant:A.status==="active"?"success":A.status==="lead"?"info":"default",children:A.status}),s.jsx("span",{className:"text-xs text-text-secondary",children:Et(A.created_at)})]})]})]})},A.id))}),v.length===0&&s.jsx(vE,{icon:s.jsx($r,{size:32}),title:"No customers found",description:"Try adjusting your search or filters"})]}),e==="Leads"&&s.jsxs(te,{children:[s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Lead"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{children:"Source"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Created"}),s.jsx(Ae,{align:"right"})]})}),s.jsx(Di,{children:_.map(A=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:A.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:A.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:A.email})]})]})}),s.jsx(be,{children:A.company||"—"}),s.jsx(be,{children:A.source||"—"}),s.jsx(be,{children:s.jsx(_e,{variant:A.status==="qualified"?"success":A.status==="contacted"?"primary":A.status==="lost"?"danger":"default",children:A.status})}),s.jsx(be,{children:Et(A.created_at)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},A.id))})]}),_.length===0&&s.jsx(vE,{icon:s.jsx(Dn,{size:32}),title:"No leads found",description:"Try adjusting your search or filters"})]}),e==="Pipeline"&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[w.length===0&&s.jsx("div",{className:"col-span-full text-center text-text-secondary py-12",children:"No pipeline stages found"}),w.map(A=>s.jsxs(te,{hover:!0,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:A.name}),s.jsxs(_e,{variant:"default",children:[A.deals," deals"]})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:A.value>0?new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(A.value):"—"}),s.jsx("div",{className:"mt-4 h-1.5 bg-bg rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${O>0?A.value/O*100:0}%`}})})]},A.id))]})]})}var pg,bE;function zn(){if(bE)return pg;bE=1;var e=Array.isArray;return pg=e,pg}var xg,jE;function t6(){if(jE)return xg;jE=1;var e=typeof kf=="object"&&kf&&kf.Object===Object&&kf;return xg=e,xg}var yg,wE;function ia(){if(wE)return yg;wE=1;var e=t6(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return yg=n,yg}var gg,SE;function rd(){if(SE)return gg;SE=1;var e=ia(),t=e.Symbol;return gg=t,gg}var vg,NE;function CG(){if(NE)return vg;NE=1;var e=rd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function l(c){var d=n.call(c,i),f=c[i];try{c[i]=void 0;var h=!0}catch{}var p=r.call(c);return h&&(d?c[i]=f:delete c[i]),p}return vg=l,vg}var bg,AE;function MG(){if(AE)return bg;AE=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return bg=n,bg}var jg,_E;function Fa(){if(_E)return jg;_E=1;var e=rd(),t=CG(),n=MG(),r="[object Null]",i="[object Undefined]",l=e?e.toStringTag:void 0;function c(d){return d==null?d===void 0?i:r:l&&l in Object(d)?t(d):n(d)}return jg=c,jg}var wg,OE;function Ga(){if(OE)return wg;OE=1;function e(t){return t!=null&&typeof t=="object"}return wg=e,wg}var Sg,TE;function Cl(){if(TE)return Sg;TE=1;var e=Fa(),t=Ga(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Sg=r,Sg}var Ng,EE;function xS(){if(EE)return Ng;EE=1;var e=zn(),t=Cl(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(l,c){if(e(l))return!1;var d=typeof l;return d=="number"||d=="symbol"||d=="boolean"||l==null||t(l)?!0:r.test(l)||!n.test(l)||c!=null&&l in Object(c)}return Ng=i,Ng}var Ag,CE;function Bi(){if(CE)return Ag;CE=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Ag=e,Ag}var _g,ME;function yS(){if(ME)return _g;ME=1;var e=Fa(),t=Bi(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",l="[object Proxy]";function c(d){if(!t(d))return!1;var f=e(d);return f==r||f==i||f==n||f==l}return _g=c,_g}var Og,kE;function kG(){if(kE)return Og;kE=1;var e=ia(),t=e["__core-js_shared__"];return Og=t,Og}var Tg,PE;function PG(){if(PE)return Tg;PE=1;var e=kG(),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 Tg=n,Tg}var Eg,RE;function n6(){if(RE)return Eg;RE=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 Eg=n,Eg}var Cg,DE;function RG(){if(DE)return Cg;DE=1;var e=yS(),t=PG(),n=Bi(),r=n6(),i=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,f=c.toString,h=d.hasOwnProperty,p=RegExp("^"+f.call(h).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function x(y){if(!n(y)||t(y))return!1;var j=e(y)?p:l;return j.test(r(y))}return Cg=x,Cg}var Mg,zE;function DG(){if(zE)return Mg;zE=1;function e(t,n){return t==null?void 0:t[n]}return Mg=e,Mg}var kg,LE;function zs(){if(LE)return kg;LE=1;var e=RG(),t=DG();function n(r,i){var l=t(r,i);return e(l)?l:void 0}return kg=n,kg}var Pg,$E;function Fm(){if($E)return Pg;$E=1;var e=zs(),t=e(Object,"create");return Pg=t,Pg}var Rg,BE;function zG(){if(BE)return Rg;BE=1;var e=Fm();function t(){this.__data__=e?e(null):{},this.size=0}return Rg=t,Rg}var Dg,IE;function LG(){if(IE)return Dg;IE=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Dg=e,Dg}var zg,qE;function $G(){if(qE)return zg;qE=1;var e=Fm(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(l){var c=this.__data__;if(e){var d=c[l];return d===t?void 0:d}return r.call(c,l)?c[l]:void 0}return zg=i,zg}var Lg,UE;function BG(){if(UE)return Lg;UE=1;var e=Fm(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var l=this.__data__;return e?l[i]!==void 0:n.call(l,i)}return Lg=r,Lg}var $g,VE;function IG(){if(VE)return $g;VE=1;var e=Fm(),t="__lodash_hash_undefined__";function n(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=e&&i===void 0?t:i,this}return $g=n,$g}var Bg,HE;function qG(){if(HE)return Bg;HE=1;var e=zG(),t=LG(),n=$G(),r=BG(),i=IG();function l(c){var d=-1,f=c==null?0:c.length;for(this.clear();++d<f;){var h=c[d];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=r,l.prototype.set=i,Bg=l,Bg}var Ig,FE;function UG(){if(FE)return Ig;FE=1;function e(){this.__data__=[],this.size=0}return Ig=e,Ig}var qg,GE;function gS(){if(GE)return qg;GE=1;function e(t,n){return t===n||t!==t&&n!==n}return qg=e,qg}var Ug,KE;function Gm(){if(KE)return Ug;KE=1;var e=gS();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Ug=t,Ug}var Vg,YE;function VG(){if(YE)return Vg;YE=1;var e=Gm(),t=Array.prototype,n=t.splice;function r(i){var l=this.__data__,c=e(l,i);if(c<0)return!1;var d=l.length-1;return c==d?l.pop():n.call(l,c,1),--this.size,!0}return Vg=r,Vg}var Hg,XE;function HG(){if(XE)return Hg;XE=1;var e=Gm();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Hg=t,Hg}var Fg,WE;function FG(){if(WE)return Fg;WE=1;var e=Gm();function t(n){return e(this.__data__,n)>-1}return Fg=t,Fg}var Gg,ZE;function GG(){if(ZE)return Gg;ZE=1;var e=Gm();function t(n,r){var i=this.__data__,l=e(i,n);return l<0?(++this.size,i.push([n,r])):i[l][1]=r,this}return Gg=t,Gg}var Kg,QE;function Km(){if(QE)return Kg;QE=1;var e=UG(),t=VG(),n=HG(),r=FG(),i=GG();function l(c){var d=-1,f=c==null?0:c.length;for(this.clear();++d<f;){var h=c[d];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=r,l.prototype.set=i,Kg=l,Kg}var Yg,JE;function vS(){if(JE)return Yg;JE=1;var e=zs(),t=ia(),n=e(t,"Map");return Yg=n,Yg}var Xg,eC;function KG(){if(eC)return Xg;eC=1;var e=qG(),t=Km(),n=vS();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Xg=r,Xg}var Wg,tC;function YG(){if(tC)return Wg;tC=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Wg=e,Wg}var Zg,nC;function Ym(){if(nC)return Zg;nC=1;var e=YG();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Zg=t,Zg}var Qg,rC;function XG(){if(rC)return Qg;rC=1;var e=Ym();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Qg=t,Qg}var Jg,aC;function WG(){if(aC)return Jg;aC=1;var e=Ym();function t(n){return e(this,n).get(n)}return Jg=t,Jg}var ev,iC;function ZG(){if(iC)return ev;iC=1;var e=Ym();function t(n){return e(this,n).has(n)}return ev=t,ev}var tv,sC;function QG(){if(sC)return tv;sC=1;var e=Ym();function t(n,r){var i=e(this,n),l=i.size;return i.set(n,r),this.size+=i.size==l?0:1,this}return tv=t,tv}var nv,oC;function bS(){if(oC)return nv;oC=1;var e=KG(),t=XG(),n=WG(),r=ZG(),i=QG();function l(c){var d=-1,f=c==null?0:c.length;for(this.clear();++d<f;){var h=c[d];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=r,l.prototype.set=i,nv=l,nv}var rv,lC;function r6(){if(lC)return rv;lC=1;var e=bS(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var l=function(){var c=arguments,d=i?i.apply(this,c):c[0],f=l.cache;if(f.has(d))return f.get(d);var h=r.apply(this,c);return l.cache=f.set(d,h)||f,h};return l.cache=new(n.Cache||e),l}return n.Cache=e,rv=n,rv}var av,cC;function JG(){if(cC)return av;cC=1;var e=r6(),t=500;function n(r){var i=e(r,function(c){return l.size===t&&l.clear(),c}),l=i.cache;return i}return av=n,av}var iv,uC;function eK(){if(uC)return iv;uC=1;var e=JG(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var l=[];return i.charCodeAt(0)===46&&l.push(""),i.replace(t,function(c,d,f,h){l.push(f?h.replace(n,"$1"):d||c)}),l});return iv=r,iv}var sv,dC;function jS(){if(dC)return sv;dC=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,l=Array(i);++r<i;)l[r]=n(t[r],r,t);return l}return sv=e,sv}var ov,fC;function tK(){if(fC)return ov;fC=1;var e=rd(),t=jS(),n=zn(),r=Cl(),i=e?e.prototype:void 0,l=i?i.toString:void 0;function c(d){if(typeof d=="string")return d;if(n(d))return t(d,c)+"";if(r(d))return l?l.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}return ov=c,ov}var lv,hC;function a6(){if(hC)return lv;hC=1;var e=tK();function t(n){return n==null?"":e(n)}return lv=t,lv}var cv,mC;function i6(){if(mC)return cv;mC=1;var e=zn(),t=xS(),n=eK(),r=a6();function i(l,c){return e(l)?l:t(l,c)?[l]:n(r(l))}return cv=i,cv}var uv,pC;function Xm(){if(pC)return uv;pC=1;var e=Cl();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return uv=t,uv}var dv,xC;function wS(){if(xC)return dv;xC=1;var e=i6(),t=Xm();function n(r,i){i=e(i,r);for(var l=0,c=i.length;r!=null&&l<c;)r=r[t(i[l++])];return l&&l==c?r:void 0}return dv=n,dv}var fv,yC;function s6(){if(yC)return fv;yC=1;var e=wS();function t(n,r,i){var l=n==null?void 0:e(n,r);return l===void 0?i:l}return fv=t,fv}var nK=s6();const Qn=st(nK);var hv,gC;function rK(){if(gC)return hv;gC=1;function e(t){return t==null}return hv=e,hv}var aK=rK();const Re=st(aK);var mv,vC;function iK(){if(vC)return mv;vC=1;var e=Fa(),t=zn(),n=Ga(),r="[object String]";function i(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==r}return mv=i,mv}var sK=iK();const Es=st(sK);var oK=yS();const Te=st(oK);var lK=Bi();const Ml=st(lK);var pv={exports:{}},tt={};/**
* @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 bC;function cK(){if(bC)return tt;bC=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"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function S(v){if(typeof v=="object"&&v!==null){var _=v.$$typeof;switch(_){case e:switch(v=v.type,v){case n:case i:case r:case h:case p:return v;default:switch(v=v&&v.$$typeof,v){case d:case c:case f:case y:case x:case l:return v;default:return _}}case t:return _}}}return tt.ContextConsumer=c,tt.ContextProvider=l,tt.Element=e,tt.ForwardRef=f,tt.Fragment=n,tt.Lazy=y,tt.Memo=x,tt.Portal=t,tt.Profiler=i,tt.StrictMode=r,tt.Suspense=h,tt.SuspenseList=p,tt.isAsyncMode=function(){return!1},tt.isConcurrentMode=function(){return!1},tt.isContextConsumer=function(v){return S(v)===c},tt.isContextProvider=function(v){return S(v)===l},tt.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},tt.isForwardRef=function(v){return S(v)===f},tt.isFragment=function(v){return S(v)===n},tt.isLazy=function(v){return S(v)===y},tt.isMemo=function(v){return S(v)===x},tt.isPortal=function(v){return S(v)===t},tt.isProfiler=function(v){return S(v)===i},tt.isStrictMode=function(v){return S(v)===r},tt.isSuspense=function(v){return S(v)===h},tt.isSuspenseList=function(v){return S(v)===p},tt.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===i||v===r||v===h||v===p||v===j||typeof v=="object"&&v!==null&&(v.$$typeof===y||v.$$typeof===x||v.$$typeof===l||v.$$typeof===c||v.$$typeof===f||v.$$typeof===w||v.getModuleId!==void 0)},tt.typeOf=S,tt}var jC;function uK(){return jC||(jC=1,pv.exports=cK()),pv.exports}var dK=uK(),xv,wC;function o6(){if(wC)return xv;wC=1;var e=Fa(),t=Ga(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return xv=r,xv}var yv,SC;function fK(){if(SC)return yv;SC=1;var e=o6();function t(n){return e(n)&&n!=+n}return yv=t,yv}var hK=fK();const ad=st(hK);var mK=o6();const pK=st(mK);var wn=function(t){return t===0?0:t>0?1:-1},vs=function(t){return Es(t)&&t.indexOf("%")===t.length-1},he=function(t){return pK(t)&&!ad(t)},xK=function(t){return Re(t)},Xt=function(t){return he(t)||Es(t)},yK=0,kl=function(t){var n=++yK;return"".concat(t||"").concat(n)},Sn=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(!he(t)&&!Es(t))return r;var l;if(vs(t)){var c=t.indexOf("%");l=n*parseFloat(t.slice(0,c))/100}else l=+t;return ad(l)&&(l=r),i&&l>n&&(l=n),l},Ai=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},gK=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},Xn=function(t,n){return he(t)&&he(n)?function(r){return t+r*(n-t)}:function(){return n}};function Dh(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Qn(r,t))===n})}var vK=function(t,n){return he(t)&&he(n)?t-n:Es(t)&&Es(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Uo(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 J1(e){"@babel/helpers - typeof";return J1=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},J1(e)}var bK=["viewBox","children"],jK=["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"],NC=["points","pathLength"],gv={svg:bK,polygon:NC,polyline:NC},SS=["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"],zh=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(M.isValidElement(t)&&(r=t.props),!Ml(r))return null;var i={};return Object.keys(r).forEach(function(l){SS.includes(l)&&(i[l]=n||function(c){return r[l](r,c)})}),i},wK=function(t,n,r){return function(i){return t(n,r,i),null}},Cs=function(t,n,r){if(!Ml(t)||J1(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(l){var c=t[l];SS.includes(l)&&typeof c=="function"&&(i||(i={}),i[l]=wK(c,n,r))}),i},SK=["children"],NK=["children"];function AC(e,t){if(e==null)return{};var n=AK(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AK(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 ej(e){"@babel/helpers - typeof";return ej=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},ej(e)}var _C={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"},za=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},OC=null,vv=null,NS=function e(t){if(t===OC&&Array.isArray(vv))return vv;var n=[];return M.Children.forEach(t,function(r){Re(r)||(dK.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),vv=n,OC=t,n};function Jn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return za(i)}):r=[za(t)],NS(e).forEach(function(i){var l=Qn(i,"type.displayName")||Qn(i,"type.name");r.indexOf(l)!==-1&&n.push(i)}),n}function Yn(e,t){var n=Jn(e,t);return n&&n[0]}var TC=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!he(r)||r<=0||!he(i)||i<=0)},_K=["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"],OK=function(t){return t&&t.type&&Es(t.type)&&_K.indexOf(t.type)>=0},TK=function(t){return t&&ej(t)==="object"&&"clipDot"in t},EK=function(t,n,r,i){var l,c=(l=gv==null?void 0:gv[i])!==null&&l!==void 0?l:[];return n.startsWith("data-")||!Te(t)&&(i&&c.includes(n)||jK.includes(n))||r&&SS.includes(n)},je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(M.isValidElement(t)&&(i=t.props),!Ml(i))return null;var l={};return Object.keys(i).forEach(function(c){var d;EK((d=i)===null||d===void 0?void 0:d[c],c,n,r)&&(l[c]=i[c])}),l},tj=function e(t,n){if(t===n)return!0;var r=M.Children.count(t);if(r!==M.Children.count(n))return!1;if(r===0)return!0;if(r===1)return EC(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var l=t[i],c=n[i];if(Array.isArray(l)||Array.isArray(c)){if(!e(l,c))return!1}else if(!EC(l,c))return!1}return!0},EC=function(t,n){if(Re(t)&&Re(n))return!0;if(!Re(t)&&!Re(n)){var r=t.props||{},i=r.children,l=AC(r,SK),c=n.props||{},d=c.children,f=AC(c,NK);return i&&d?Uo(l,f)&&tj(i,d):!i&&!d?Uo(l,f):!1}return!1},CC=function(t,n){var r=[],i={};return NS(t).forEach(function(l,c){if(OK(l))r.push(l);else if(l){var d=za(l.type),f=n[d]||{},h=f.handler,p=f.once;if(h&&(!p||!i[d])){var x=h(l,d,c);r.push(x),i[d]=!0}}}),r},CK=function(t){var n=t&&t.type;return n&&_C[n]?_C[n]:null},MK=function(t,n){return NS(n).indexOf(t)},kK=["children","width","height","viewBox","className","style","title","desc"];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 PK(e,t){if(e==null)return{};var n=RK(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RK(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 rj(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,l=e.className,c=e.style,d=e.title,f=e.desc,h=PK(e,kK),p=i||{width:n,height:r,x:0,y:0},x=ze("recharts-surface",l);return U.createElement("svg",nj({},je(h,!0,"svg"),{className:x,width:n,height:r,style:c,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),U.createElement("title",null,d),U.createElement("desc",null,f),t)}var DK=["children","className"];function aj(){return aj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aj.apply(this,arguments)}function zK(e,t){if(e==null)return{};var n=LK(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LK(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 We=U.forwardRef(function(e,t){var n=e.children,r=e.className,i=zK(e,DK),l=ze("recharts-layer",r);return U.createElement("g",aj({className:l},je(i,!0),{ref:t}),n)}),Br=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),l=2;l<r;l++)i[l-2]=arguments[l]},bv,MC;function $K(){if(MC)return bv;MC=1;function e(t,n,r){var i=-1,l=t.length;n<0&&(n=-n>l?0:l+n),r=r>l?l:r,r<0&&(r+=l),l=n>r?0:r-n>>>0,n>>>=0;for(var c=Array(l);++i<l;)c[i]=t[i+n];return c}return bv=e,bv}var jv,kC;function BK(){if(kC)return jv;kC=1;var e=$K();function t(n,r,i){var l=n.length;return i=i===void 0?l:i,!r&&i>=l?n:e(n,r,i)}return jv=t,jv}var wv,PC;function l6(){if(PC)return wv;PC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,l="\\ufe0e\\ufe0f",c="\\u200d",d=RegExp("["+c+e+i+l+"]");function f(h){return d.test(h)}return wv=f,wv}var Sv,RC;function IK(){if(RC)return Sv;RC=1;function e(t){return t.split("")}return Sv=e,Sv}var Nv,DC;function qK(){if(DC)return Nv;DC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,l="\\ufe0e\\ufe0f",c="["+e+"]",d="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",h="(?:"+d+"|"+f+")",p="[^"+e+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",j="\\u200d",w=h+"?",S="["+l+"]?",v="(?:"+j+"(?:"+[p,x,y].join("|")+")"+S+w+")*",_=S+w+v,O="(?:"+[p+d+"?",d,x,y,c].join("|")+")",A=RegExp(f+"(?="+f+")|"+O+_,"g");function T(N){return N.match(A)||[]}return Nv=T,Nv}var Av,zC;function UK(){if(zC)return Av;zC=1;var e=IK(),t=l6(),n=qK();function r(i){return t(i)?n(i):e(i)}return Av=r,Av}var _v,LC;function VK(){if(LC)return _v;LC=1;var e=BK(),t=l6(),n=UK(),r=a6();function i(l){return function(c){c=r(c);var d=t(c)?n(c):void 0,f=d?d[0]:c.charAt(0),h=d?e(d,1).join(""):c.slice(1);return f[l]()+h}}return _v=i,_v}var Ov,$C;function HK(){if($C)return Ov;$C=1;var e=VK(),t=e("toUpperCase");return Ov=t,Ov}var FK=HK();const Wm=st(FK);function xt(e){return function(){return e}}const c6=Math.cos,Lh=Math.sin,qr=Math.sqrt,$h=Math.PI,Zm=2*$h,ij=Math.PI,sj=2*ij,ms=1e-6,GK=sj-ms;function u6(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function KK(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return u6;const n=10**t;return function(r){this._+=r[0];for(let i=1,l=r.length;i<l;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class YK{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?u6:KK(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,l,c){this._append`C${+t},${+n},${+r},${+i},${this._x1=+l},${this._y1=+c}`}arcTo(t,n,r,i,l){if(t=+t,n=+n,r=+r,i=+i,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,d=this._y1,f=r-t,h=i-n,p=c-t,x=d-n,y=p*p+x*x;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(y>ms)if(!(Math.abs(x*f-h*p)>ms)||!l)this._append`L${this._x1=t},${this._y1=n}`;else{let j=r-c,w=i-d,S=f*f+h*h,v=j*j+w*w,_=Math.sqrt(S),O=Math.sqrt(y),A=l*Math.tan((ij-Math.acos((S+y-v)/(2*_*O)))/2),T=A/O,N=A/_;Math.abs(T-1)>ms&&this._append`L${t+T*p},${n+T*x}`,this._append`A${l},${l},0,0,${+(x*j>p*w)},${this._x1=t+N*f},${this._y1=n+N*h}`}}arc(t,n,r,i,l,c){if(t=+t,n=+n,r=+r,c=!!c,r<0)throw new Error(`negative radius: ${r}`);let d=r*Math.cos(i),f=r*Math.sin(i),h=t+d,p=n+f,x=1^c,y=c?i-l:l-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>ms||Math.abs(this._y1-p)>ms)&&this._append`L${h},${p}`,r&&(y<0&&(y=y%sj+sj),y>GK?this._append`A${r},${r},0,1,${x},${t-d},${n-f}A${r},${r},0,1,${x},${this._x1=h},${this._y1=p}`:y>ms&&this._append`A${r},${r},0,${+(y>=ij)},${x},${this._x1=t+r*Math.cos(l)},${this._y1=n+r*Math.sin(l)}`)}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 AS(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 YK(t)}function _S(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function d6(e){this._context=e}d6.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 Qm(e){return new d6(e)}function f6(e){return e[0]}function h6(e){return e[1]}function m6(e,t){var n=xt(!0),r=null,i=Qm,l=null,c=AS(d);e=typeof e=="function"?e:e===void 0?f6:xt(e),t=typeof t=="function"?t:t===void 0?h6:xt(t);function d(f){var h,p=(f=_S(f)).length,x,y=!1,j;for(r==null&&(l=i(j=c())),h=0;h<=p;++h)!(h<p&&n(x=f[h],h,f))===y&&((y=!y)?l.lineStart():l.lineEnd()),y&&l.point(+e(x,h,f),+t(x,h,f));if(j)return l=null,j+""||null}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:xt(+f),d):e},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:xt(+f),d):t},d.defined=function(f){return arguments.length?(n=typeof f=="function"?f:xt(!!f),d):n},d.curve=function(f){return arguments.length?(i=f,r!=null&&(l=i(r)),d):i},d.context=function(f){return arguments.length?(f==null?r=l=null:l=i(r=f),d):r},d}function Gf(e,t,n){var r=null,i=xt(!0),l=null,c=Qm,d=null,f=AS(h);e=typeof e=="function"?e:e===void 0?f6:xt(+e),t=typeof t=="function"?t:xt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?h6:xt(+n);function h(x){var y,j,w,S=(x=_S(x)).length,v,_=!1,O,A=new Array(S),T=new Array(S);for(l==null&&(d=c(O=f())),y=0;y<=S;++y){if(!(y<S&&i(v=x[y],y,x))===_)if(_=!_)j=y,d.areaStart(),d.lineStart();else{for(d.lineEnd(),d.lineStart(),w=y-1;w>=j;--w)d.point(A[w],T[w]);d.lineEnd(),d.areaEnd()}_&&(A[y]=+e(v,y,x),T[y]=+t(v,y,x),d.point(r?+r(v,y,x):A[y],n?+n(v,y,x):T[y]))}if(O)return d=null,O+""||null}function p(){return m6().defined(i).curve(c).context(l)}return h.x=function(x){return arguments.length?(e=typeof x=="function"?x:xt(+x),r=null,h):e},h.x0=function(x){return arguments.length?(e=typeof x=="function"?x:xt(+x),h):e},h.x1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:xt(+x),h):r},h.y=function(x){return arguments.length?(t=typeof x=="function"?x:xt(+x),n=null,h):t},h.y0=function(x){return arguments.length?(t=typeof x=="function"?x:xt(+x),h):t},h.y1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:xt(+x),h):n},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(n)},h.lineX1=function(){return p().x(r).y(t)},h.defined=function(x){return arguments.length?(i=typeof x=="function"?x:xt(!!x),h):i},h.curve=function(x){return arguments.length?(c=x,l!=null&&(d=c(l)),h):c},h.context=function(x){return arguments.length?(x==null?l=d=null:d=c(l=x),h):l},h}class p6{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 XK(e){return new p6(e,!0)}function WK(e){return new p6(e,!1)}const OS={draw(e,t){const n=qr(t/$h);e.moveTo(n,0),e.arc(0,0,n,0,Zm)}},ZK={draw(e,t){const n=qr(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()}},x6=qr(1/3),QK=x6*2,JK={draw(e,t){const n=qr(t/QK),r=n*x6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},eY={draw(e,t){const n=qr(t),r=-n/2;e.rect(r,r,n,n)}},tY=.8908130915292852,y6=Lh($h/10)/Lh(7*$h/10),nY=Lh(Zm/10)*y6,rY=-c6(Zm/10)*y6,aY={draw(e,t){const n=qr(t*tY),r=nY*n,i=rY*n;e.moveTo(0,-n),e.lineTo(r,i);for(let l=1;l<5;++l){const c=Zm*l/5,d=c6(c),f=Lh(c);e.lineTo(f*n,-d*n),e.lineTo(d*r-f*i,f*r+d*i)}e.closePath()}},Tv=qr(3),iY={draw(e,t){const n=-qr(t/(Tv*3));e.moveTo(0,n*2),e.lineTo(-Tv*n,-n),e.lineTo(Tv*n,-n),e.closePath()}},dr=-.5,fr=qr(3)/2,oj=1/qr(12),sY=(oj/2+1)*3,oY={draw(e,t){const n=qr(t/sY),r=n/2,i=n*oj,l=r,c=n*oj+n,d=-l,f=c;e.moveTo(r,i),e.lineTo(l,c),e.lineTo(d,f),e.lineTo(dr*r-fr*i,fr*r+dr*i),e.lineTo(dr*l-fr*c,fr*l+dr*c),e.lineTo(dr*d-fr*f,fr*d+dr*f),e.lineTo(dr*r+fr*i,dr*i-fr*r),e.lineTo(dr*l+fr*c,dr*c-fr*l),e.lineTo(dr*d+fr*f,dr*f-fr*d),e.closePath()}};function lY(e,t){let n=null,r=AS(i);e=typeof e=="function"?e:xt(e||OS),t=typeof t=="function"?t:xt(t===void 0?64:+t);function i(){let l;if(n||(n=l=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),l)return n=null,l+""||null}return i.type=function(l){return arguments.length?(e=typeof l=="function"?l:xt(l),i):e},i.size=function(l){return arguments.length?(t=typeof l=="function"?l:xt(+l),i):t},i.context=function(l){return arguments.length?(n=l??null,i):n},i}function Bh(){}function Ih(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 g6(e){this._context=e}g6.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:Ih(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:Ih(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cY(e){return new g6(e)}function v6(e){this._context=e}v6.prototype={areaStart:Bh,areaEnd:Bh,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:Ih(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uY(e){return new v6(e)}function b6(e){this._context=e}b6.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:Ih(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dY(e){return new b6(e)}function j6(e){this._context=e}j6.prototype={areaStart:Bh,areaEnd:Bh,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 fY(e){return new j6(e)}function BC(e){return e<0?-1:1}function IC(e,t,n){var r=e._x1-e._x0,i=t-e._x1,l=(e._y1-e._y0)/(r||i<0&&-0),c=(n-e._y1)/(i||r<0&&-0),d=(l*i+c*r)/(r+i);return(BC(l)+BC(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(d))||0}function qC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ev(e,t,n){var r=e._x0,i=e._y0,l=e._x1,c=e._y1,d=(l-r)/3;e._context.bezierCurveTo(r+d,i+d*t,l-d,c-d*n,l,c)}function qh(e){this._context=e}qh.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:Ev(this,this._t0,qC(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,Ev(this,qC(this,n=IC(this,e,t)),n);break;default:Ev(this,this._t0,n=IC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function w6(e){this._context=new S6(e)}(w6.prototype=Object.create(qh.prototype)).point=function(e,t){qh.prototype.point.call(this,t,e)};function S6(e){this._context=e}S6.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,l){this._context.bezierCurveTo(t,e,r,n,l,i)}};function hY(e){return new qh(e)}function mY(e){return new w6(e)}function N6(e){this._context=e}N6.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=UC(e),i=UC(t),l=0,c=1;c<n;++l,++c)this._context.bezierCurveTo(r[0][l],i[0][l],r[1][l],i[1][l],e[c],t[c]);(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 UC(e){var t,n=e.length-1,r,i=new Array(n),l=new Array(n),c=new Array(n);for(i[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,l[n-1]=7,c[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/l[t-1],l[t]-=r,c[t]-=r*c[t-1];for(i[n-1]=c[n-1]/l[n-1],t=n-2;t>=0;--t)i[t]=(c[t]-i[t+1])/l[t];for(l[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)l[t]=2*e[t+1]-i[t+1];return[i,l]}function pY(e){return new N6(e)}function Jm(e,t){this._context=e,this._t=t}Jm.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 xY(e){return new Jm(e,.5)}function yY(e){return new Jm(e,0)}function gY(e){return new Jm(e,1)}function Xo(e,t){if((c=e.length)>1)for(var n=1,r,i,l=e[t[0]],c,d=l.length;n<c;++n)for(i=l,l=e[t[n]],r=0;r<d;++r)l[r][1]+=l[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function lj(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function vY(e,t){return e[t]}function bY(e){const t=[];return t.key=e,t}function jY(){var e=xt([]),t=lj,n=Xo,r=vY;function i(l){var c=Array.from(e.apply(this,arguments),bY),d,f=c.length,h=-1,p;for(const x of l)for(d=0,++h;d<f;++d)(c[d][h]=[0,+r(x,c[d].key,h,l)]).data=x;for(d=0,p=_S(t(c));d<f;++d)c[p[d]].index=d;return n(c,p),c}return i.keys=function(l){return arguments.length?(e=typeof l=="function"?l:xt(Array.from(l)),i):e},i.value=function(l){return arguments.length?(r=typeof l=="function"?l:xt(+l),i):r},i.order=function(l){return arguments.length?(t=l==null?lj:typeof l=="function"?l:xt(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(n=l??Xo,i):n},i}function wY(e,t){if((r=e.length)>0){for(var n,r,i=0,l=e[0].length,c;i<l;++i){for(c=n=0;n<r;++n)c+=e[n][i][1]||0;if(c)for(n=0;n<r;++n)e[n][i][1]/=c}Xo(e,t)}}function SY(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,l=r.length;n<l;++n){for(var c=0,d=0;c<i;++c)d+=e[c][n][1]||0;r[n][1]+=r[n][0]=-d/2}Xo(e,t)}}function NY(e,t){if(!(!((c=e.length)>0)||!((l=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,l,c;r<l;++r){for(var d=0,f=0,h=0;d<c;++d){for(var p=e[t[d]],x=p[r][1]||0,y=p[r-1][1]||0,j=(x-y)/2,w=0;w<d;++w){var S=e[t[w]],v=S[r][1]||0,_=S[r-1][1]||0;j+=v-_}f+=x,h+=j*x}i[r-1][1]+=i[r-1][0]=n,f&&(n-=h/f)}i[r-1][1]+=i[r-1][0]=n,Xo(e,t)}}function pu(e){"@babel/helpers - typeof";return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}var AY=["type","size","sizeType"];function cj(){return cj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cj.apply(this,arguments)}function VC(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 HC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VC(Object(n),!0).forEach(function(r){_Y(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Y(e,t,n){return t=OY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OY(e){var t=TY(e,"string");return pu(t)=="symbol"?t:t+""}function TY(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 EY(e,t){if(e==null)return{};var n=CY(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CY(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 A6={symbolCircle:OS,symbolCross:ZK,symbolDiamond:JK,symbolSquare:eY,symbolStar:aY,symbolTriangle:iY,symbolWye:oY},MY=Math.PI/180,kY=function(t){var n="symbol".concat(Wm(t));return A6[n]||OS},PY=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*MY;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}},RY=function(t,n){A6["symbol".concat(Wm(t))]=n},TS=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,l=i===void 0?64:i,c=t.sizeType,d=c===void 0?"area":c,f=EY(t,AY),h=HC(HC({},f),{},{type:r,size:l,sizeType:d}),p=function(){var v=kY(r),_=lY().type(v).size(PY(l,d,r));return _()},x=h.className,y=h.cx,j=h.cy,w=je(h,!0);return y===+y&&j===+j&&l===+l?U.createElement("path",cj({},w,{className:ze("recharts-symbols",x),transform:"translate(".concat(y,", ").concat(j,")"),d:p()})):null};TS.registerSymbol=RY;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 uj(){return uj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uj.apply(this,arguments)}function FC(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 DY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FC(Object(n),!0).forEach(function(r){xu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FC(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 LY(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,O6(r.key),r)}}function $Y(e,t,n){return t&&LY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BY(e,t,n){return t=Uh(t),IY(e,_6()?Reflect.construct(t,n||[],Uh(e).constructor):t.apply(e,n))}function IY(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 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 _6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_6=function(){return!!e})()}function Uh(e){return Uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uh(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&&dj(e,t)}function dj(e,t){return dj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dj(e,t)}function xu(e,t,n){return t=O6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O6(e){var t=VY(e,"string");return Wo(t)=="symbol"?t:t+""}function VY(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 hr=32,ES=(function(e){function t(){return zY(this,t),BY(this,t,arguments)}return UY(t,e),$Y(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,l=hr/2,c=hr/6,d=hr/3,f=r.inactive?i:r.color;if(r.type==="plainline")return U.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:l,x2:hr,y2:l,className:"recharts-legend-icon"});if(r.type==="line")return U.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(l,"h").concat(d,`
A`).concat(c,",").concat(c,",0,1,1,").concat(2*d,",").concat(l,`
H`).concat(hr,"M").concat(2*d,",").concat(l,`
A`).concat(c,",").concat(c,",0,1,1,").concat(d,",").concat(l),className:"recharts-legend-icon"});if(r.type==="rect")return U.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(hr/8,"h").concat(hr,"v").concat(hr*3/4,"h").concat(-hr,"z"),className:"recharts-legend-icon"});if(U.isValidElement(r.legendIcon)){var h=DY({},r);return delete h.legendIcon,U.cloneElement(r.legendIcon,h)}return U.createElement(TS,{fill:f,cx:l,cy:l,size:hr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,l=i.payload,c=i.iconSize,d=i.layout,f=i.formatter,h=i.inactiveColor,p={x:0,y:0,width:hr,height:hr},x={display:d==="horizontal"?"inline-block":"block",marginRight:10},y={display:"inline-block",verticalAlign:"middle",marginRight:4};return l.map(function(j,w){var S=j.formatter||f,v=ze(xu(xu({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",j.inactive));if(j.type==="none")return null;var _=Te(j.value)?null:j.value;Br(!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 O=j.inactive?h:j.color;return U.createElement("li",uj({className:v,style:x,key:"legend-item-".concat(w)},Cs(r.props,j,w)),U.createElement(rj,{width:c,height:c,viewBox:p,style:y},r.renderIcon(j)),U.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},S?S(_,j,w):_))})}},{key:"render",value:function(){var r=this.props,i=r.payload,l=r.layout,c=r.align;if(!i||!i.length)return null;var d={padding:0,margin:0,textAlign:l==="horizontal"?c:"left"};return U.createElement("ul",{className:"recharts-default-legend",style:d},this.renderItems())}}])})(M.PureComponent);xu(ES,"displayName","Legend");xu(ES,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Cv,GC;function HY(){if(GC)return Cv;GC=1;var e=Km();function t(){this.__data__=new e,this.size=0}return Cv=t,Cv}var Mv,KC;function FY(){if(KC)return Mv;KC=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Mv=e,Mv}var kv,YC;function GY(){if(YC)return kv;YC=1;function e(t){return this.__data__.get(t)}return kv=e,kv}var Pv,XC;function KY(){if(XC)return Pv;XC=1;function e(t){return this.__data__.has(t)}return Pv=e,Pv}var Rv,WC;function YY(){if(WC)return Rv;WC=1;var e=Km(),t=vS(),n=bS(),r=200;function i(l,c){var d=this.__data__;if(d instanceof e){var f=d.__data__;if(!t||f.length<r-1)return f.push([l,c]),this.size=++d.size,this;d=this.__data__=new n(f)}return d.set(l,c),this.size=d.size,this}return Rv=i,Rv}var Dv,ZC;function T6(){if(ZC)return Dv;ZC=1;var e=Km(),t=HY(),n=FY(),r=GY(),i=KY(),l=YY();function c(d){var f=this.__data__=new e(d);this.size=f.size}return c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=r,c.prototype.has=i,c.prototype.set=l,Dv=c,Dv}var zv,QC;function XY(){if(QC)return zv;QC=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return zv=t,zv}var Lv,JC;function WY(){if(JC)return Lv;JC=1;function e(t){return this.__data__.has(t)}return Lv=e,Lv}var $v,eM;function E6(){if(eM)return $v;eM=1;var e=bS(),t=XY(),n=WY();function r(i){var l=-1,c=i==null?0:i.length;for(this.__data__=new e;++l<c;)this.add(i[l])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,$v=r,$v}var Bv,tM;function C6(){if(tM)return Bv;tM=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 Bv=e,Bv}var Iv,nM;function M6(){if(nM)return Iv;nM=1;function e(t,n){return t.has(n)}return Iv=e,Iv}var qv,rM;function k6(){if(rM)return qv;rM=1;var e=E6(),t=C6(),n=M6(),r=1,i=2;function l(c,d,f,h,p,x){var y=f&r,j=c.length,w=d.length;if(j!=w&&!(y&&w>j))return!1;var S=x.get(c),v=x.get(d);if(S&&v)return S==d&&v==c;var _=-1,O=!0,A=f&i?new e:void 0;for(x.set(c,d),x.set(d,c);++_<j;){var T=c[_],N=d[_];if(h)var E=y?h(N,T,_,d,c,x):h(T,N,_,c,d,x);if(E!==void 0){if(E)continue;O=!1;break}if(A){if(!t(d,function(k,R){if(!n(A,R)&&(T===k||p(T,k,f,h,x)))return A.push(R)})){O=!1;break}}else if(!(T===N||p(T,N,f,h,x))){O=!1;break}}return x.delete(c),x.delete(d),O}return qv=l,qv}var Uv,aM;function ZY(){if(aM)return Uv;aM=1;var e=ia(),t=e.Uint8Array;return Uv=t,Uv}var Vv,iM;function QY(){if(iM)return Vv;iM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,l){r[++n]=[l,i]}),r}return Vv=e,Vv}var Hv,sM;function CS(){if(sM)return Hv;sM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Hv=e,Hv}var Fv,oM;function JY(){if(oM)return Fv;oM=1;var e=rd(),t=ZY(),n=gS(),r=k6(),i=QY(),l=CS(),c=1,d=2,f="[object Boolean]",h="[object Date]",p="[object Error]",x="[object Map]",y="[object Number]",j="[object RegExp]",w="[object Set]",S="[object String]",v="[object Symbol]",_="[object ArrayBuffer]",O="[object DataView]",A=e?e.prototype:void 0,T=A?A.valueOf:void 0;function N(E,k,R,L,D,z,$){switch(R){case O:if(E.byteLength!=k.byteLength||E.byteOffset!=k.byteOffset)return!1;E=E.buffer,k=k.buffer;case _:return!(E.byteLength!=k.byteLength||!z(new t(E),new t(k)));case f:case h:case y:return n(+E,+k);case p:return E.name==k.name&&E.message==k.message;case j:case S:return E==k+"";case x:var F=i;case w:var Y=L&c;if(F||(F=l),E.size!=k.size&&!Y)return!1;var K=$.get(E);if(K)return K==k;L|=d,$.set(E,k);var B=r(F(E),F(k),L,D,z,$);return $.delete(E),B;case v:if(T)return T.call(E)==T.call(k)}return!1}return Fv=N,Fv}var Gv,lM;function P6(){if(lM)return Gv;lM=1;function e(t,n){for(var r=-1,i=n.length,l=t.length;++r<i;)t[l+r]=n[r];return t}return Gv=e,Gv}var Kv,cM;function eX(){if(cM)return Kv;cM=1;var e=P6(),t=zn();function n(r,i,l){var c=i(r);return t(r)?c:e(c,l(r))}return Kv=n,Kv}var Yv,uM;function tX(){if(uM)return Yv;uM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,l=0,c=[];++r<i;){var d=t[r];n(d,r,t)&&(c[l++]=d)}return c}return Yv=e,Yv}var Xv,dM;function nX(){if(dM)return Xv;dM=1;function e(){return[]}return Xv=e,Xv}var Wv,fM;function rX(){if(fM)return Wv;fM=1;var e=tX(),t=nX(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(c){return c==null?[]:(c=Object(c),e(i(c),function(d){return r.call(c,d)}))}:t;return Wv=l,Wv}var Zv,hM;function aX(){if(hM)return Zv;hM=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Zv=e,Zv}var Qv,mM;function iX(){if(mM)return Qv;mM=1;var e=Fa(),t=Ga(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Qv=r,Qv}var Jv,pM;function MS(){if(pM)return Jv;pM=1;var e=iX(),t=Ga(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,l=e((function(){return arguments})())?e:function(c){return t(c)&&r.call(c,"callee")&&!i.call(c,"callee")};return Jv=l,Jv}var Yc={exports:{}},eb,xM;function sX(){if(xM)return eb;xM=1;function e(){return!1}return eb=e,eb}Yc.exports;var yM;function R6(){return yM||(yM=1,(function(e,t){var n=ia(),r=sX(),i=t&&!t.nodeType&&t,l=i&&!0&&e&&!e.nodeType&&e,c=l&&l.exports===i,d=c?n.Buffer:void 0,f=d?d.isBuffer:void 0,h=f||r;e.exports=h})(Yc,Yc.exports)),Yc.exports}var tb,gM;function kS(){if(gM)return tb;gM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var l=typeof r;return i=i??e,!!i&&(l=="number"||l!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return tb=n,tb}var nb,vM;function PS(){if(vM)return nb;vM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return nb=t,nb}var rb,bM;function oX(){if(bM)return rb;bM=1;var e=Fa(),t=PS(),n=Ga(),r="[object Arguments]",i="[object Array]",l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Function]",h="[object Map]",p="[object Number]",x="[object Object]",y="[object RegExp]",j="[object Set]",w="[object String]",S="[object WeakMap]",v="[object ArrayBuffer]",_="[object DataView]",O="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",N="[object Int16Array]",E="[object Int32Array]",k="[object Uint8Array]",R="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",z={};z[O]=z[A]=z[T]=z[N]=z[E]=z[k]=z[R]=z[L]=z[D]=!0,z[r]=z[i]=z[v]=z[l]=z[_]=z[c]=z[d]=z[f]=z[h]=z[p]=z[x]=z[y]=z[j]=z[w]=z[S]=!1;function $(F){return n(F)&&t(F.length)&&!!z[e(F)]}return rb=$,rb}var ab,jM;function D6(){if(jM)return ab;jM=1;function e(t){return function(n){return t(n)}}return ab=e,ab}var Xc={exports:{}};Xc.exports;var wM;function lX(){return wM||(wM=1,(function(e,t){var n=t6(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===r,c=l&&n.process,d=(function(){try{var f=i&&i.require&&i.require("util").types;return f||c&&c.binding&&c.binding("util")}catch{}})();e.exports=d})(Xc,Xc.exports)),Xc.exports}var ib,SM;function z6(){if(SM)return ib;SM=1;var e=oX(),t=D6(),n=lX(),r=n&&n.isTypedArray,i=r?t(r):e;return ib=i,ib}var sb,NM;function cX(){if(NM)return sb;NM=1;var e=aX(),t=MS(),n=zn(),r=R6(),i=kS(),l=z6(),c=Object.prototype,d=c.hasOwnProperty;function f(h,p){var x=n(h),y=!x&&t(h),j=!x&&!y&&r(h),w=!x&&!y&&!j&&l(h),S=x||y||j||w,v=S?e(h.length,String):[],_=v.length;for(var O in h)(p||d.call(h,O))&&!(S&&(O=="length"||j&&(O=="offset"||O=="parent")||w&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,_)))&&v.push(O);return v}return sb=f,sb}var ob,AM;function uX(){if(AM)return ob;AM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return ob=t,ob}var lb,_M;function L6(){if(_M)return lb;_M=1;function e(t,n){return function(r){return t(n(r))}}return lb=e,lb}var cb,OM;function dX(){if(OM)return cb;OM=1;var e=L6(),t=e(Object.keys,Object);return cb=t,cb}var ub,TM;function fX(){if(TM)return ub;TM=1;var e=uX(),t=dX(),n=Object.prototype,r=n.hasOwnProperty;function i(l){if(!e(l))return t(l);var c=[];for(var d in Object(l))r.call(l,d)&&d!="constructor"&&c.push(d);return c}return ub=i,ub}var db,EM;function id(){if(EM)return db;EM=1;var e=yS(),t=PS();function n(r){return r!=null&&t(r.length)&&!e(r)}return db=n,db}var fb,CM;function ep(){if(CM)return fb;CM=1;var e=cX(),t=fX(),n=id();function r(i){return n(i)?e(i):t(i)}return fb=r,fb}var hb,MM;function hX(){if(MM)return hb;MM=1;var e=eX(),t=rX(),n=ep();function r(i){return e(i,n,t)}return hb=r,hb}var mb,kM;function mX(){if(kM)return mb;kM=1;var e=hX(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(l,c,d,f,h,p){var x=d&t,y=e(l),j=y.length,w=e(c),S=w.length;if(j!=S&&!x)return!1;for(var v=j;v--;){var _=y[v];if(!(x?_ in c:r.call(c,_)))return!1}var O=p.get(l),A=p.get(c);if(O&&A)return O==c&&A==l;var T=!0;p.set(l,c),p.set(c,l);for(var N=x;++v<j;){_=y[v];var E=l[_],k=c[_];if(f)var R=x?f(k,E,_,c,l,p):f(E,k,_,l,c,p);if(!(R===void 0?E===k||h(E,k,d,f,p):R)){T=!1;break}N||(N=_=="constructor")}if(T&&!N){var L=l.constructor,D=c.constructor;L!=D&&"constructor"in l&&"constructor"in c&&!(typeof L=="function"&&L instanceof L&&typeof D=="function"&&D instanceof D)&&(T=!1)}return p.delete(l),p.delete(c),T}return mb=i,mb}var pb,PM;function pX(){if(PM)return pb;PM=1;var e=zs(),t=ia(),n=e(t,"DataView");return pb=n,pb}var xb,RM;function xX(){if(RM)return xb;RM=1;var e=zs(),t=ia(),n=e(t,"Promise");return xb=n,xb}var yb,DM;function $6(){if(DM)return yb;DM=1;var e=zs(),t=ia(),n=e(t,"Set");return yb=n,yb}var gb,zM;function yX(){if(zM)return gb;zM=1;var e=zs(),t=ia(),n=e(t,"WeakMap");return gb=n,gb}var vb,LM;function gX(){if(LM)return vb;LM=1;var e=pX(),t=vS(),n=xX(),r=$6(),i=yX(),l=Fa(),c=n6(),d="[object Map]",f="[object Object]",h="[object Promise]",p="[object Set]",x="[object WeakMap]",y="[object DataView]",j=c(e),w=c(t),S=c(n),v=c(r),_=c(i),O=l;return(e&&O(new e(new ArrayBuffer(1)))!=y||t&&O(new t)!=d||n&&O(n.resolve())!=h||r&&O(new r)!=p||i&&O(new i)!=x)&&(O=function(A){var T=l(A),N=T==f?A.constructor:void 0,E=N?c(N):"";if(E)switch(E){case j:return y;case w:return d;case S:return h;case v:return p;case _:return x}return T}),vb=O,vb}var bb,$M;function vX(){if($M)return bb;$M=1;var e=T6(),t=k6(),n=JY(),r=mX(),i=gX(),l=zn(),c=R6(),d=z6(),f=1,h="[object Arguments]",p="[object Array]",x="[object Object]",y=Object.prototype,j=y.hasOwnProperty;function w(S,v,_,O,A,T){var N=l(S),E=l(v),k=N?p:i(S),R=E?p:i(v);k=k==h?x:k,R=R==h?x:R;var L=k==x,D=R==x,z=k==R;if(z&&c(S)){if(!c(v))return!1;N=!0,L=!1}if(z&&!L)return T||(T=new e),N||d(S)?t(S,v,_,O,A,T):n(S,v,k,_,O,A,T);if(!(_&f)){var $=L&&j.call(S,"__wrapped__"),F=D&&j.call(v,"__wrapped__");if($||F){var Y=$?S.value():S,K=F?v.value():v;return T||(T=new e),A(Y,K,_,O,T)}}return z?(T||(T=new e),r(S,v,_,O,A,T)):!1}return bb=w,bb}var jb,BM;function RS(){if(BM)return jb;BM=1;var e=vX(),t=Ga();function n(r,i,l,c,d){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,l,c,n,d)}return jb=n,jb}var wb,IM;function bX(){if(IM)return wb;IM=1;var e=T6(),t=RS(),n=1,r=2;function i(l,c,d,f){var h=d.length,p=h,x=!f;if(l==null)return!p;for(l=Object(l);h--;){var y=d[h];if(x&&y[2]?y[1]!==l[y[0]]:!(y[0]in l))return!1}for(;++h<p;){y=d[h];var j=y[0],w=l[j],S=y[1];if(x&&y[2]){if(w===void 0&&!(j in l))return!1}else{var v=new e;if(f)var _=f(w,S,j,l,c,v);if(!(_===void 0?t(S,w,n|r,f,v):_))return!1}}return!0}return wb=i,wb}var Sb,qM;function B6(){if(qM)return Sb;qM=1;var e=Bi();function t(n){return n===n&&!e(n)}return Sb=t,Sb}var Nb,UM;function jX(){if(UM)return Nb;UM=1;var e=B6(),t=ep();function n(r){for(var i=t(r),l=i.length;l--;){var c=i[l],d=r[c];i[l]=[c,d,e(d)]}return i}return Nb=n,Nb}var Ab,VM;function I6(){if(VM)return Ab;VM=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ab=e,Ab}var _b,HM;function wX(){if(HM)return _b;HM=1;var e=bX(),t=jX(),n=I6();function r(i){var l=t(i);return l.length==1&&l[0][2]?n(l[0][0],l[0][1]):function(c){return c===i||e(c,i,l)}}return _b=r,_b}var Ob,FM;function SX(){if(FM)return Ob;FM=1;function e(t,n){return t!=null&&n in Object(t)}return Ob=e,Ob}var Tb,GM;function NX(){if(GM)return Tb;GM=1;var e=i6(),t=MS(),n=zn(),r=kS(),i=PS(),l=Xm();function c(d,f,h){f=e(f,d);for(var p=-1,x=f.length,y=!1;++p<x;){var j=l(f[p]);if(!(y=d!=null&&h(d,j)))break;d=d[j]}return y||++p!=x?y:(x=d==null?0:d.length,!!x&&i(x)&&r(j,x)&&(n(d)||t(d)))}return Tb=c,Tb}var Eb,KM;function AX(){if(KM)return Eb;KM=1;var e=SX(),t=NX();function n(r,i){return r!=null&&t(r,i,e)}return Eb=n,Eb}var Cb,YM;function _X(){if(YM)return Cb;YM=1;var e=RS(),t=s6(),n=AX(),r=xS(),i=B6(),l=I6(),c=Xm(),d=1,f=2;function h(p,x){return r(p)&&i(x)?l(c(p),x):function(y){var j=t(y,p);return j===void 0&&j===x?n(y,p):e(x,j,d|f)}}return Cb=h,Cb}var Mb,XM;function Pl(){if(XM)return Mb;XM=1;function e(t){return t}return Mb=e,Mb}var kb,WM;function OX(){if(WM)return kb;WM=1;function e(t){return function(n){return n==null?void 0:n[t]}}return kb=e,kb}var Pb,ZM;function TX(){if(ZM)return Pb;ZM=1;var e=wS();function t(n){return function(r){return e(r,n)}}return Pb=t,Pb}var Rb,QM;function EX(){if(QM)return Rb;QM=1;var e=OX(),t=TX(),n=xS(),r=Xm();function i(l){return n(l)?e(r(l)):t(l)}return Rb=i,Rb}var Db,JM;function sa(){if(JM)return Db;JM=1;var e=wX(),t=_X(),n=Pl(),r=zn(),i=EX();function l(c){return typeof c=="function"?c:c==null?n:typeof c=="object"?r(c)?t(c[0],c[1]):e(c):i(c)}return Db=l,Db}var zb,ek;function q6(){if(ek)return zb;ek=1;function e(t,n,r,i){for(var l=t.length,c=r+(i?1:-1);i?c--:++c<l;)if(n(t[c],c,t))return c;return-1}return zb=e,zb}var Lb,tk;function CX(){if(tk)return Lb;tk=1;function e(t){return t!==t}return Lb=e,Lb}var $b,nk;function MX(){if(nk)return $b;nk=1;function e(t,n,r){for(var i=r-1,l=t.length;++i<l;)if(t[i]===n)return i;return-1}return $b=e,$b}var Bb,rk;function kX(){if(rk)return Bb;rk=1;var e=q6(),t=CX(),n=MX();function r(i,l,c){return l===l?n(i,l,c):e(i,t,c)}return Bb=r,Bb}var Ib,ak;function PX(){if(ak)return Ib;ak=1;var e=kX();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return Ib=t,Ib}var qb,ik;function RX(){if(ik)return qb;ik=1;function e(t,n,r){for(var i=-1,l=t==null?0:t.length;++i<l;)if(r(n,t[i]))return!0;return!1}return qb=e,qb}var Ub,sk;function DX(){if(sk)return Ub;sk=1;function e(){}return Ub=e,Ub}var Vb,ok;function zX(){if(ok)return Vb;ok=1;var e=$6(),t=DX(),n=CS(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(l){return new e(l)}:t;return Vb=i,Vb}var Hb,lk;function LX(){if(lk)return Hb;lk=1;var e=E6(),t=PX(),n=RX(),r=M6(),i=zX(),l=CS(),c=200;function d(f,h,p){var x=-1,y=t,j=f.length,w=!0,S=[],v=S;if(p)w=!1,y=n;else if(j>=c){var _=h?null:i(f);if(_)return l(_);w=!1,y=r,v=new e}else v=h?[]:S;e:for(;++x<j;){var O=f[x],A=h?h(O):O;if(O=p||O!==0?O:0,w&&A===A){for(var T=v.length;T--;)if(v[T]===A)continue e;h&&v.push(A),S.push(O)}else y(v,A,p)||(v!==S&&v.push(A),S.push(O))}return S}return Hb=d,Hb}var Fb,ck;function $X(){if(ck)return Fb;ck=1;var e=sa(),t=LX();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Fb=n,Fb}var BX=$X();const uk=st(BX);function U6(e,t,n){return t===!0?uk(e,n):Te(t)?uk(e,t):e}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)}var IX=["ref"];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 Oa(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){tp(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 qX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fk(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,H6(r.key),r)}}function UX(e,t,n){return t&&fk(e.prototype,t),n&&fk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function VX(e,t,n){return t=Vh(t),HX(e,V6()?Reflect.construct(t,n||[],Vh(e).constructor):t.apply(e,n))}function HX(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 FX(e)}function FX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(V6=function(){return!!e})()}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vh(e)}function GX(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 tp(e,t,n){return t=H6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H6(e){var t=KX(e,"string");return Zo(t)=="symbol"?t:t+""}function KX(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 YX(e,t){if(e==null)return{};var n=XX(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XX(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 WX(e){return e.value}function ZX(e,t){if(U.isValidElement(e))return U.cloneElement(e,t);if(typeof e=="function")return U.createElement(e,t);t.ref;var n=YX(t,IX);return U.createElement(ES,n)}var hk=1,Vo=(function(e){function t(){var n;qX(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=VX(this,t,[].concat(i)),tp(n,"lastBoundingBox",{width:-1,height:-1}),n}return GX(t,e),UX(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)>hk||Math.abs(i.height-this.lastBoundingBox.height)>hk)&&(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?Oa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,l=i.layout,c=i.align,d=i.verticalAlign,f=i.margin,h=i.chartWidth,p=i.chartHeight,x,y;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(c==="center"&&l==="vertical"){var j=this.getBBoxSnapshot();x={left:((h||0)-j.width)/2}}else x=c==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(d==="middle"){var w=this.getBBoxSnapshot();y={top:((p||0)-w.height)/2}}else y=d==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Oa(Oa({},x),y)}},{key:"render",value:function(){var r=this,i=this.props,l=i.content,c=i.width,d=i.height,f=i.wrapperStyle,h=i.payloadUniqBy,p=i.payload,x=Oa(Oa({position:"absolute",width:c||"auto",height:d||"auto"},this.getDefaultPosition(f)),f);return U.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:function(j){r.wrapperNode=j}},ZX(l,Oa(Oa({},this.props),{},{payload:U6(p,h,WX)})))}}],[{key:"getWithHeight",value:function(r,i){var l=Oa(Oa({},this.defaultProps),r.props),c=l.layout;return c==="vertical"&&he(r.props.height)?{height:r.props.height}:c==="horizontal"?{width:r.props.width||i}:null}}])})(M.PureComponent);tp(Vo,"displayName","Legend");tp(Vo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Gb,mk;function QX(){if(mk)return Gb;mk=1;var e=rd(),t=MS(),n=zn(),r=e?e.isConcatSpreadable:void 0;function i(l){return n(l)||t(l)||!!(r&&l&&l[r])}return Gb=i,Gb}var Kb,pk;function F6(){if(pk)return Kb;pk=1;var e=P6(),t=QX();function n(r,i,l,c,d){var f=-1,h=r.length;for(l||(l=t),d||(d=[]);++f<h;){var p=r[f];i>0&&l(p)?i>1?n(p,i-1,l,c,d):e(d,p):c||(d[d.length]=p)}return d}return Kb=n,Kb}var Yb,xk;function JX(){if(xk)return Yb;xk=1;function e(t){return function(n,r,i){for(var l=-1,c=Object(n),d=i(n),f=d.length;f--;){var h=d[t?f:++l];if(r(c[h],h,c)===!1)break}return n}}return Yb=e,Yb}var Xb,yk;function eW(){if(yk)return Xb;yk=1;var e=JX(),t=e();return Xb=t,Xb}var Wb,gk;function G6(){if(gk)return Wb;gk=1;var e=eW(),t=ep();function n(r,i){return r&&e(r,i,t)}return Wb=n,Wb}var Zb,vk;function tW(){if(vk)return Zb;vk=1;var e=id();function t(n,r){return function(i,l){if(i==null)return i;if(!e(i))return n(i,l);for(var c=i.length,d=r?c:-1,f=Object(i);(r?d--:++d<c)&&l(f[d],d,f)!==!1;);return i}}return Zb=t,Zb}var Qb,bk;function DS(){if(bk)return Qb;bk=1;var e=G6(),t=tW(),n=t(e);return Qb=n,Qb}var Jb,jk;function K6(){if(jk)return Jb;jk=1;var e=DS(),t=id();function n(r,i){var l=-1,c=t(r)?Array(r.length):[];return e(r,function(d,f,h){c[++l]=i(d,f,h)}),c}return Jb=n,Jb}var e0,wk;function nW(){if(wk)return e0;wk=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return e0=e,e0}var t0,Sk;function rW(){if(Sk)return t0;Sk=1;var e=Cl();function t(n,r){if(n!==r){var i=n!==void 0,l=n===null,c=n===n,d=e(n),f=r!==void 0,h=r===null,p=r===r,x=e(r);if(!h&&!x&&!d&&n>r||d&&f&&p&&!h&&!x||l&&f&&p||!i&&p||!c)return 1;if(!l&&!d&&!x&&n<r||x&&i&&c&&!l&&!d||h&&i&&c||!f&&c||!p)return-1}return 0}return t0=t,t0}var n0,Nk;function aW(){if(Nk)return n0;Nk=1;var e=rW();function t(n,r,i){for(var l=-1,c=n.criteria,d=r.criteria,f=c.length,h=i.length;++l<f;){var p=e(c[l],d[l]);if(p){if(l>=h)return p;var x=i[l];return p*(x=="desc"?-1:1)}}return n.index-r.index}return n0=t,n0}var r0,Ak;function iW(){if(Ak)return r0;Ak=1;var e=jS(),t=wS(),n=sa(),r=K6(),i=nW(),l=D6(),c=aW(),d=Pl(),f=zn();function h(p,x,y){x.length?x=e(x,function(S){return f(S)?function(v){return t(v,S.length===1?S[0]:S)}:S}):x=[d];var j=-1;x=e(x,l(n));var w=r(p,function(S,v,_){var O=e(x,function(A){return A(S)});return{criteria:O,index:++j,value:S}});return i(w,function(S,v){return c(S,v,y)})}return r0=h,r0}var a0,_k;function sW(){if(_k)return a0;_k=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 a0=e,a0}var i0,Ok;function oW(){if(Ok)return i0;Ok=1;var e=sW(),t=Math.max;function n(r,i,l){return i=t(i===void 0?r.length-1:i,0),function(){for(var c=arguments,d=-1,f=t(c.length-i,0),h=Array(f);++d<f;)h[d]=c[i+d];d=-1;for(var p=Array(i+1);++d<i;)p[d]=c[d];return p[i]=l(h),e(r,this,p)}}return i0=n,i0}var s0,Tk;function lW(){if(Tk)return s0;Tk=1;function e(t){return function(){return t}}return s0=e,s0}var o0,Ek;function Y6(){if(Ek)return o0;Ek=1;var e=zs(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return o0=t,o0}var l0,Ck;function cW(){if(Ck)return l0;Ck=1;var e=lW(),t=Y6(),n=Pl(),r=t?function(i,l){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(l),writable:!0})}:n;return l0=r,l0}var c0,Mk;function uW(){if(Mk)return c0;Mk=1;var e=800,t=16,n=Date.now;function r(i){var l=0,c=0;return function(){var d=n(),f=t-(d-c);if(c=d,f>0){if(++l>=e)return arguments[0]}else l=0;return i.apply(void 0,arguments)}}return c0=r,c0}var u0,kk;function dW(){if(kk)return u0;kk=1;var e=cW(),t=uW(),n=t(e);return u0=n,u0}var d0,Pk;function fW(){if(Pk)return d0;Pk=1;var e=Pl(),t=oW(),n=dW();function r(i,l){return n(t(i,l,e),i+"")}return d0=r,d0}var f0,Rk;function np(){if(Rk)return f0;Rk=1;var e=gS(),t=id(),n=kS(),r=Bi();function i(l,c,d){if(!r(d))return!1;var f=typeof c;return(f=="number"?t(d)&&n(c,d.length):f=="string"&&c in d)?e(d[c],l):!1}return f0=i,f0}var h0,Dk;function hW(){if(Dk)return h0;Dk=1;var e=F6(),t=iW(),n=fW(),r=np(),i=n(function(l,c){if(l==null)return[];var d=c.length;return d>1&&r(l,c[0],c[1])?c=[]:d>2&&r(c[0],c[1],c[2])&&(c=[c[0]]),t(l,e(c,1),[])});return h0=i,h0}var mW=hW();const zS=st(mW);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 hj(){return hj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hj.apply(this,arguments)}function pW(e,t){return vW(e)||gW(e,t)||yW(e,t)||xW()}function xW(){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 yW(e,t){if(e){if(typeof e=="string")return zk(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 zk(e,t)}}function zk(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 gW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function vW(e){if(Array.isArray(e))return e}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 m0(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){bW(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 bW(e,t,n){return t=jW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jW(e){var t=wW(e,"string");return yu(t)=="symbol"?t:t+""}function wW(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)}function SW(e){return Array.isArray(e)&&Xt(e[0])&&Xt(e[1])?e.join(" ~ "):e}var NW=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,l=i===void 0?{}:i,c=t.itemStyle,d=c===void 0?{}:c,f=t.labelStyle,h=f===void 0?{}:f,p=t.payload,x=t.formatter,y=t.itemSorter,j=t.wrapperClassName,w=t.labelClassName,S=t.label,v=t.labelFormatter,_=t.accessibilityLayer,O=_===void 0?!1:_,A=function(){if(p&&p.length){var $={padding:0,margin:0},F=(y?zS(p,y):p).map(function(Y,K){if(Y.type==="none")return null;var B=m0({display:"block",paddingTop:4,paddingBottom:4,color:Y.color||"#000"},d),H=Y.formatter||x||SW,Q=Y.value,ie=Y.name,ce=Q,I=ie;if(H&&ce!=null&&I!=null){var G=H(Q,ie,Y,K,p);if(Array.isArray(G)){var ae=pW(G,2);ce=ae[0],I=ae[1]}else ce=G}return U.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(K),style:B},Xt(I)?U.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Xt(I)?U.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,U.createElement("span",{className:"recharts-tooltip-item-value"},ce),U.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return U.createElement("ul",{className:"recharts-tooltip-item-list",style:$},F)}return null},T=m0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},l),N=m0({margin:0},h),E=!Re(S),k=E?S:"",R=ze("recharts-default-tooltip",j),L=ze("recharts-tooltip-label",w);E&&v&&p!==void 0&&p!==null&&(k=v(S,p));var D=O?{role:"status","aria-live":"assertive"}:{};return U.createElement("div",hj({className:R,style:T},D),U.createElement("p",{className:L,style:N},U.isValidElement(k)?k:"".concat(k)),A())};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 Kf(e,t,n){return t=AW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AW(e){var t=_W(e,"string");return gu(t)=="symbol"?t:t+""}function _W(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 $c="recharts-tooltip-wrapper",OW={visibility:"hidden"};function TW(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ze($c,Kf(Kf(Kf(Kf({},"".concat($c,"-right"),he(n)&&t&&he(t.x)&&n>=t.x),"".concat($c,"-left"),he(n)&&t&&he(t.x)&&n<t.x),"".concat($c,"-bottom"),he(r)&&t&&he(t.y)&&r>=t.y),"".concat($c,"-top"),he(r)&&t&&he(t.y)&&r<t.y))}function $k(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,l=e.position,c=e.reverseDirection,d=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(l&&he(l[r]))return l[r];var p=n[r]-d-i,x=n[r]+i;if(t[r])return c[r]?p:x;if(c[r]){var y=p,j=f[r];return y<j?Math.max(x,f[r]):Math.max(p,f[r])}var w=x+d,S=f[r]+h;return w>S?Math.max(p,f[r]):Math.max(x,f[r])}function EW(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 CW(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,l=e.reverseDirection,c=e.tooltipBox,d=e.useTranslate3d,f=e.viewBox,h,p,x;return c.height>0&&c.width>0&&n?(p=$k({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),x=$k({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),h=EW({translateX:p,translateY:x,useTranslate3d:d})):h=OW,{cssProperties:h,cssClasses:TW({translateX:p,translateY:x,coordinate:n})}}function Qo(e){"@babel/helpers - typeof";return Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(e)}function Bk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ik(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bk(Object(n),!0).forEach(function(r){pj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kW(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,W6(r.key),r)}}function PW(e,t,n){return t&&kW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RW(e,t,n){return t=Hh(t),DW(e,X6()?Reflect.construct(t,n||[],Hh(e).constructor):t.apply(e,n))}function DW(e,t){if(t&&(Qo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zW(e)}function zW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X6=function(){return!!e})()}function Hh(e){return Hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hh(e)}function LW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mj(e,t)}function mj(e,t){return mj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mj(e,t)}function pj(e,t,n){return t=W6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W6(e){var t=$W(e,"string");return Qo(t)=="symbol"?t:t+""}function $W(e,t){if(Qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qk=1,BW=(function(e){function t(){var n;MW(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=RW(this,t,[].concat(i)),pj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),pj(n,"handleKeyDown",function(c){if(c.key==="Escape"){var d,f,h,p;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(d=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&d!==void 0?d:0,y:(h=(p=n.props.coordinate)===null||p===void 0?void 0:p.y)!==null&&h!==void 0?h:0}})}}),n}return LW(t,e),PW(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>qk||Math.abs(r.height-this.state.lastBoundingBox.height)>qk)&&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,l=i.active,c=i.allowEscapeViewBox,d=i.animationDuration,f=i.animationEasing,h=i.children,p=i.coordinate,x=i.hasPayload,y=i.isAnimationActive,j=i.offset,w=i.position,S=i.reverseDirection,v=i.useTranslate3d,_=i.viewBox,O=i.wrapperStyle,A=CW({allowEscapeViewBox:c,coordinate:p,offsetTopLeft:j,position:w,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:_}),T=A.cssClasses,N=A.cssProperties,E=Ik(Ik({transition:y&&l?"transform ".concat(d,"ms ").concat(f):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&l&&x?"visible":"hidden",position:"absolute",top:0,left:0},O);return U.createElement("div",{tabIndex:-1,className:T,style:E,ref:function(R){r.wrapperNode=R}},h)}}])})(M.PureComponent),IW=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ls={isSsr:IW()};function Jo(e){"@babel/helpers - typeof";return Jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jo(e)}function Uk(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 Vk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uk(Object(n),!0).forEach(function(r){LS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UW(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,Q6(r.key),r)}}function VW(e,t,n){return t&&UW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HW(e,t,n){return t=Fh(t),FW(e,Z6()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function FW(e,t){if(t&&(Jo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GW(e)}function GW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z6=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function KW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xj(e,t)}function xj(e,t){return xj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xj(e,t)}function LS(e,t,n){return t=Q6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q6(e){var t=YW(e,"string");return Jo(t)=="symbol"?t:t+""}function YW(e,t){if(Jo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function XW(e){return e.dataKey}function WW(e,t){return U.isValidElement(e)?U.cloneElement(e,t):typeof e=="function"?U.createElement(e,t):U.createElement(NW,t)}var mr=(function(e){function t(){return qW(this,t),HW(this,t,arguments)}return KW(t,e),VW(t,[{key:"render",value:function(){var r=this,i=this.props,l=i.active,c=i.allowEscapeViewBox,d=i.animationDuration,f=i.animationEasing,h=i.content,p=i.coordinate,x=i.filterNull,y=i.isAnimationActive,j=i.offset,w=i.payload,S=i.payloadUniqBy,v=i.position,_=i.reverseDirection,O=i.useTranslate3d,A=i.viewBox,T=i.wrapperStyle,N=w??[];x&&N.length&&(N=U6(w.filter(function(k){return k.value!=null&&(k.hide!==!0||r.props.includeHidden)}),S,XW));var E=N.length>0;return U.createElement(BW,{allowEscapeViewBox:c,animationDuration:d,animationEasing:f,isAnimationActive:y,active:l,coordinate:p,hasPayload:E,offset:j,position:v,reverseDirection:_,useTranslate3d:O,viewBox:A,wrapperStyle:T},WW(h,Vk(Vk({},this.props),{},{payload:N})))}}])})(M.PureComponent);LS(mr,"displayName","Tooltip");LS(mr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ls.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 p0,Hk;function ZW(){if(Hk)return p0;Hk=1;var e=ia(),t=function(){return e.Date.now()};return p0=t,p0}var x0,Fk;function QW(){if(Fk)return x0;Fk=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return x0=t,x0}var y0,Gk;function JW(){if(Gk)return y0;Gk=1;var e=QW(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return y0=n,y0}var g0,Kk;function J6(){if(Kk)return g0;Kk=1;var e=JW(),t=Bi(),n=Cl(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function f(h){if(typeof h=="number")return h;if(n(h))return r;if(t(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=t(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=e(h);var x=l.test(h);return x||c.test(h)?d(h.slice(2),x?2:8):i.test(h)?r:+h}return g0=f,g0}var v0,Yk;function eZ(){if(Yk)return v0;Yk=1;var e=Bi(),t=ZW(),n=J6(),r="Expected a function",i=Math.max,l=Math.min;function c(d,f,h){var p,x,y,j,w,S,v=0,_=!1,O=!1,A=!0;if(typeof d!="function")throw new TypeError(r);f=n(f)||0,e(h)&&(_=!!h.leading,O="maxWait"in h,y=O?i(n(h.maxWait)||0,f):y,A="trailing"in h?!!h.trailing:A);function T(F){var Y=p,K=x;return p=x=void 0,v=F,j=d.apply(K,Y),j}function N(F){return v=F,w=setTimeout(R,f),_?T(F):j}function E(F){var Y=F-S,K=F-v,B=f-Y;return O?l(B,y-K):B}function k(F){var Y=F-S,K=F-v;return S===void 0||Y>=f||Y<0||O&&K>=y}function R(){var F=t();if(k(F))return L(F);w=setTimeout(R,E(F))}function L(F){return w=void 0,A&&p?T(F):(p=x=void 0,j)}function D(){w!==void 0&&clearTimeout(w),v=0,p=S=x=w=void 0}function z(){return w===void 0?j:L(t())}function $(){var F=t(),Y=k(F);if(p=arguments,x=this,S=F,Y){if(w===void 0)return N(S);if(O)return clearTimeout(w),w=setTimeout(R,f),T(S)}return w===void 0&&(w=setTimeout(R,f)),j}return $.cancel=D,$.flush=z,$}return v0=c,v0}var b0,Xk;function tZ(){if(Xk)return b0;Xk=1;var e=eZ(),t=Bi(),n="Expected a function";function r(i,l,c){var d=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(c)&&(d="leading"in c?!!c.leading:d,f="trailing"in c?!!c.trailing:f),e(i,l,{leading:d,maxWait:l,trailing:f})}return b0=r,b0}var nZ=tZ();const ez=st(nZ);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 Wk(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 Yf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wk(Object(n),!0).forEach(function(r){rZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rZ(e,t,n){return t=aZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aZ(e){var t=iZ(e,"string");return vu(t)=="symbol"?t:t+""}function iZ(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 sZ(e,t){return uZ(e)||cZ(e,t)||lZ(e,t)||oZ()}function oZ(){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 lZ(e,t){if(e){if(typeof e=="string")return Zk(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 Zk(e,t)}}function Zk(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 cZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function uZ(e){if(Array.isArray(e))return e}var yj=M.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,l=e.width,c=l===void 0?"100%":l,d=e.height,f=d===void 0?"100%":d,h=e.minWidth,p=h===void 0?0:h,x=e.minHeight,y=e.maxHeight,j=e.children,w=e.debounce,S=w===void 0?0:w,v=e.id,_=e.className,O=e.onResize,A=e.style,T=A===void 0?{}:A,N=M.useRef(null),E=M.useRef();E.current=O,M.useImperativeHandle(t,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var k=M.useState({containerWidth:i.width,containerHeight:i.height}),R=sZ(k,2),L=R[0],D=R[1],z=M.useCallback(function(F,Y){D(function(K){var B=Math.round(F),H=Math.round(Y);return K.containerWidth===B&&K.containerHeight===H?K:{containerWidth:B,containerHeight:H}})},[]);M.useEffect(function(){var F=function(ie){var ce,I=ie[0].contentRect,G=I.width,ae=I.height;z(G,ae),(ce=E.current)===null||ce===void 0||ce.call(E,G,ae)};S>0&&(F=ez(F,S,{trailing:!0,leading:!1}));var Y=new ResizeObserver(F),K=N.current.getBoundingClientRect(),B=K.width,H=K.height;return z(B,H),Y.observe(N.current),function(){Y.disconnect()}},[z,S]);var $=M.useMemo(function(){var F=L.containerWidth,Y=L.containerHeight;if(F<0||Y<0)return null;Br(vs(c)||vs(f),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,c,f),Br(!n||n>0,"The aspect(%s) must be greater than zero.",n);var K=vs(c)?F:c,B=vs(f)?Y:f;n&&n>0&&(K?B=K/n:B&&(K=B*n),y&&B>y&&(B=y)),Br(K>0||B>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.`,K,B,c,f,p,x,n);var H=!Array.isArray(j)&&za(j.type).endsWith("Chart");return U.Children.map(j,function(Q){return U.isValidElement(Q)?M.cloneElement(Q,Yf({width:K,height:B},H?{style:Yf({height:"100%",width:"100%",maxHeight:B,maxWidth:K},Q.props.style)}:{})):Q})},[n,j,f,y,x,p,L,c]);return U.createElement("div",{id:v?"".concat(v):void 0,className:ze("recharts-responsive-container",_),style:Yf(Yf({},T),{},{width:c,height:f,minWidth:p,minHeight:x,maxHeight:y}),ref:N},$)}),rp=function(t){return null};rp.displayName="Cell";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 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 gj(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){dZ(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 dZ(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=hZ(e,"string");return bu(t)=="symbol"?t:t+""}function hZ(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 _o={widthCache:{},cacheCount:0},mZ=2e3,pZ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Jk="recharts_measurement_span";function xZ(e){var t=gj({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var nu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ls.isSsr)return{width:0,height:0};var r=xZ(n),i=JSON.stringify({text:t,copyStyle:r});if(_o.widthCache[i])return _o.widthCache[i];try{var l=document.getElementById(Jk);l||(l=document.createElement("span"),l.setAttribute("id",Jk),l.setAttribute("aria-hidden","true"),document.body.appendChild(l));var c=gj(gj({},pZ),r);Object.assign(l.style,c),l.textContent="".concat(t);var d=l.getBoundingClientRect(),f={width:d.width,height:d.height};return _o.widthCache[i]=f,++_o.cacheCount>mZ&&(_o.cacheCount=0,_o.widthCache={}),f}catch{return{width:0,height:0}}},yZ=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ju(e){"@babel/helpers - typeof";return ju=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},ju(e)}function Gh(e,t){return jZ(e)||bZ(e,t)||vZ(e,t)||gZ()}function gZ(){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 vZ(e,t){if(e){if(typeof e=="string")return eP(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 eP(e,t)}}function eP(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 bZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function jZ(e){if(Array.isArray(e))return e}function wZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tP(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,NZ(r.key),r)}}function SZ(e,t,n){return t&&tP(e.prototype,t),n&&tP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function NZ(e){var t=AZ(e,"string");return ju(t)=="symbol"?t:t+""}function AZ(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,rP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,_Z=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,OZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,tz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},TZ=Object.keys(tz),Ro="NaN";function EZ(e,t){return e*tz[t]}var Xf=(function(){function e(t,n){wZ(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!_Z.test(n)&&(this.num=NaN,this.unit=""),TZ.includes(n)&&(this.num=EZ(t,n),this.unit="px")}return SZ(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=OZ.exec(n))!==null&&r!==void 0?r:[],l=Gh(i,3),c=l[1],d=l[2];return new e(parseFloat(c),d??"")}}])})();function nz(e){if(e.includes(Ro))return Ro;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=nP.exec(t))!==null&&n!==void 0?n:[],i=Gh(r,4),l=i[1],c=i[2],d=i[3],f=Xf.parse(l??""),h=Xf.parse(d??""),p=c==="*"?f.multiply(h):f.divide(h);if(p.isNaN())return Ro;t=t.replace(nP,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var x,y=(x=rP.exec(t))!==null&&x!==void 0?x:[],j=Gh(y,4),w=j[1],S=j[2],v=j[3],_=Xf.parse(w??""),O=Xf.parse(v??""),A=S==="+"?_.add(O):_.subtract(O);if(A.isNaN())return Ro;t=t.replace(rP,A.toString())}return t}var aP=/\(([^()]*)\)/;function CZ(e){for(var t=e;t.includes("(");){var n=aP.exec(t),r=Gh(n,2),i=r[1];t=t.replace(aP,nz(i))}return t}function MZ(e){var t=e.replace(/\s+/g,"");return t=CZ(t),t=nz(t),t}function kZ(e){try{return MZ(e)}catch{return Ro}}function j0(e){var t=kZ(e.slice(5,-1));return t===Ro?"":t}var PZ=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],RZ=["dx","dy","angle","className","breakAll"];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 iP(e,t){if(e==null)return{};var n=DZ(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DZ(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 sP(e,t){return BZ(e)||$Z(e,t)||LZ(e,t)||zZ()}function zZ(){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 LZ(e,t){if(e){if(typeof e=="string")return oP(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 oP(e,t)}}function oP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $Z(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function BZ(e){if(Array.isArray(e))return e}var rz=/[ \f\n\r\t\v\u2028\u2029]+/,az=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var l=[];Re(n)||(r?l=n.toString().split(""):l=n.toString().split(rz));var c=l.map(function(f){return{word:f,width:nu(f,i).width}}),d=r?0:nu(" ",i).width;return{wordsWithComputedWidth:c,spaceWidth:d}}catch{return null}},IZ=function(t,n,r,i,l){var c=t.maxLines,d=t.children,f=t.style,h=t.breakAll,p=he(c),x=d,y=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return K.reduce(function(B,H){var Q=H.word,ie=H.width,ce=B[B.length-1];if(ce&&(i==null||l||ce.width+ie+r<Number(i)))ce.words.push(Q),ce.width+=ie+r;else{var I={words:[Q],width:ie};B.push(I)}return B},[])},j=y(n),w=function(K){return K.reduce(function(B,H){return B.width>H.width?B:H})};if(!p)return j;for(var S="…",v=function(K){var B=x.slice(0,K),H=az({breakAll:h,style:f,children:B+S}).wordsWithComputedWidth,Q=y(H),ie=Q.length>c||w(Q).width>Number(i);return[ie,Q]},_=0,O=x.length-1,A=0,T;_<=O&&A<=x.length-1;){var N=Math.floor((_+O)/2),E=N-1,k=v(E),R=sP(k,2),L=R[0],D=R[1],z=v(N),$=sP(z,1),F=$[0];if(!L&&!F&&(_=N+1),L&&F&&(O=N-1),!L&&F){T=D;break}A++}return T||j},lP=function(t){var n=Re(t)?[]:t.toString().split(rz);return[{words:n}]},qZ=function(t){var n=t.width,r=t.scaleToFit,i=t.children,l=t.style,c=t.breakAll,d=t.maxLines;if((n||r)&&!Ls.isSsr){var f,h,p=az({breakAll:c,children:i,style:l});if(p){var x=p.wordsWithComputedWidth,y=p.spaceWidth;f=x,h=y}else return lP(i);return IZ({breakAll:c,children:i,maxLines:d,style:l},f,h,n,r)}return lP(i)},cP="#808080",Ms=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,l=i===void 0?0:i,c=t.lineHeight,d=c===void 0?"1em":c,f=t.capHeight,h=f===void 0?"0.71em":f,p=t.scaleToFit,x=p===void 0?!1:p,y=t.textAnchor,j=y===void 0?"start":y,w=t.verticalAnchor,S=w===void 0?"end":w,v=t.fill,_=v===void 0?cP:v,O=iP(t,PZ),A=M.useMemo(function(){return qZ({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:x,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,x,O.style,O.width]),T=O.dx,N=O.dy,E=O.angle,k=O.className,R=O.breakAll,L=iP(O,RZ);if(!Xt(r)||!Xt(l))return null;var D=r+(he(T)?T:0),z=l+(he(N)?N:0),$;switch(S){case"start":$=j0("calc(".concat(h,")"));break;case"middle":$=j0("calc(".concat((A.length-1)/2," * -").concat(d," + (").concat(h," / 2))"));break;default:$=j0("calc(".concat(A.length-1," * -").concat(d,")"));break}var F=[];if(x){var Y=A[0].width,K=O.width;F.push("scale(".concat((he(K)?K/Y:1)/Y,")"))}return E&&F.push("rotate(".concat(E,", ").concat(D,", ").concat(z,")")),F.length&&(L.transform=F.join(" ")),U.createElement("text",vj({},je(L,!0),{x:D,y:z,className:ze("recharts-text",k),textAnchor:j,fill:_.includes("url")?cP:_}),A.map(function(B,H){var Q=B.words.join(R?"":" ");return U.createElement("tspan",{x:D,dy:H===0?$:d,key:"".concat(Q,"-").concat(H)},Q)}))};function Ei(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function UZ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $S(e){let t,n,r;e.length!==2?(t=Ei,n=(d,f)=>Ei(e(d),f),r=(d,f)=>e(d)-f):(t=e===Ei||e===UZ?e:VZ,n=e,r=e);function i(d,f,h=0,p=d.length){if(h<p){if(t(f,f)!==0)return p;do{const x=h+p>>>1;n(d[x],f)<0?h=x+1:p=x}while(h<p)}return h}function l(d,f,h=0,p=d.length){if(h<p){if(t(f,f)!==0)return p;do{const x=h+p>>>1;n(d[x],f)<=0?h=x+1:p=x}while(h<p)}return h}function c(d,f,h=0,p=d.length){const x=i(d,f,h,p-1);return x>h&&r(d[x-1],f)>-r(d[x],f)?x-1:x}return{left:i,center:c,right:l}}function VZ(){return 0}function iz(e){return e===null?NaN:+e}function*HZ(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const FZ=$S(Ei),sd=FZ.right;$S(iz).center;class uP extends Map{constructor(t,n=YZ){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(dP(this,t))}has(t){return super.has(dP(this,t))}set(t,n){return super.set(GZ(this,t),n)}delete(t){return super.delete(KZ(this,t))}}function dP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function GZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function KZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function YZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function XZ(e=Ei){if(e===Ei)return sz;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 sz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const WZ=Math.sqrt(50),ZZ=Math.sqrt(10),QZ=Math.sqrt(2);function Kh(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),l=r/Math.pow(10,i),c=l>=WZ?10:l>=ZZ?5:l>=QZ?2:1;let d,f,h;return i<0?(h=Math.pow(10,-i)/c,d=Math.round(e*h),f=Math.round(t*h),d/h<e&&++d,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*c,d=Math.round(e/h),f=Math.round(t/h),d*h<e&&++d,f*h>t&&--f),f<d&&.5<=n&&n<2?Kh(e,t,n*2):[d,f,h]}function bj(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,l,c]=r?Kh(t,e,n):Kh(e,t,n);if(!(l>=i))return[];const d=l-i+1,f=new Array(d);if(r)if(c<0)for(let h=0;h<d;++h)f[h]=(l-h)/-c;else for(let h=0;h<d;++h)f[h]=(l-h)*c;else if(c<0)for(let h=0;h<d;++h)f[h]=(i+h)/-c;else for(let h=0;h<d;++h)f[h]=(i+h)*c;return f}function jj(e,t,n){return t=+t,e=+e,n=+n,Kh(e,t,n)[2]}function wj(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?jj(t,e,n):jj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function fP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function hP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function oz(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?sz:XZ(i);r>n;){if(r-n>600){const f=r-n+1,h=t-n+1,p=Math.log(f),x=.5*Math.exp(2*p/3),y=.5*Math.sqrt(p*x*(f-x)/f)*(h-f/2<0?-1:1),j=Math.max(n,Math.floor(t-h*x/f+y)),w=Math.min(r,Math.floor(t+(f-h)*x/f+y));oz(e,t,j,w,i)}const l=e[t];let c=n,d=r;for(Bc(e,n,t),i(e[r],l)>0&&Bc(e,n,r);c<d;){for(Bc(e,c,d),++c,--d;i(e[c],l)<0;)++c;for(;i(e[d],l)>0;)--d}i(e[n],l)===0?Bc(e,n,d):(++d,Bc(e,d,r)),d<=t&&(n=d+1),t<=d&&(r=d-1)}return e}function Bc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function JZ(e,t,n){if(e=Float64Array.from(HZ(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return hP(e);if(t>=1)return fP(e);var r,i=(r-1)*t,l=Math.floor(i),c=fP(oz(e,l).subarray(0,l+1)),d=hP(e.subarray(l+1));return c+(d-c)*(i-l)}}function eQ(e,t,n=iz){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,l=Math.floor(i),c=+n(e[l],l,e),d=+n(e[l+1],l+1,e);return c+(d-c)*(i-l)}}function tQ(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,l=new Array(i);++r<i;)l[r]=e+r*n;return l}function Nr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ka(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 Sj=Symbol("implicit");function BS(){var e=new uP,t=[],n=[],r=Sj;function i(l){let c=e.get(l);if(c===void 0){if(r!==Sj)return r;e.set(l,c=t.push(l)-1)}return n[c%n.length]}return i.domain=function(l){if(!arguments.length)return t.slice();t=[],e=new uP;for(const c of l)e.has(c)||e.set(c,t.push(c)-1);return i},i.range=function(l){return arguments.length?(n=Array.from(l),i):n.slice()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return BS(t,n).unknown(r)},Nr.apply(i,arguments),i}function wu(){var e=BS().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,l,c,d=!1,f=0,h=0,p=.5;delete e.unknown;function x(){var y=t().length,j=i<r,w=j?i:r,S=j?r:i;l=(S-w)/Math.max(1,y-f+h*2),d&&(l=Math.floor(l)),w+=(S-w-l*(y-f))*p,c=l*(1-f),d&&(w=Math.round(w),c=Math.round(c));var v=tQ(y).map(function(_){return w+l*_});return n(j?v.reverse():v)}return e.domain=function(y){return arguments.length?(t(y),x()):t()},e.range=function(y){return arguments.length?([r,i]=y,r=+r,i=+i,x()):[r,i]},e.rangeRound=function(y){return[r,i]=y,r=+r,i=+i,d=!0,x()},e.bandwidth=function(){return c},e.step=function(){return l},e.round=function(y){return arguments.length?(d=!!y,x()):d},e.padding=function(y){return arguments.length?(f=Math.min(1,h=+y),x()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),x()):f},e.paddingOuter=function(y){return arguments.length?(h=+y,x()):h},e.align=function(y){return arguments.length?(p=Math.max(0,Math.min(1,y)),x()):p},e.copy=function(){return wu(t(),[r,i]).round(d).paddingInner(f).paddingOuter(h).align(p)},Nr.apply(x(),arguments)}function lz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return lz(t())},e}function ru(){return lz(wu.apply(null,arguments).paddingInner(1))}function IS(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 od(){}var Su=.7,Yh=1/Su,Ho="\\s*([+-]?\\d+)\\s*",Nu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nQ=/^#([0-9a-f]{3,8})$/,rQ=new RegExp(`^rgb\\(${Ho},${Ho},${Ho}\\)$`),aQ=new RegExp(`^rgb\\(${Jr},${Jr},${Jr}\\)$`),iQ=new RegExp(`^rgba\\(${Ho},${Ho},${Ho},${Nu}\\)$`),sQ=new RegExp(`^rgba\\(${Jr},${Jr},${Jr},${Nu}\\)$`),oQ=new RegExp(`^hsl\\(${Nu},${Jr},${Jr}\\)$`),lQ=new RegExp(`^hsla\\(${Nu},${Jr},${Jr},${Nu}\\)$`),mP={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};IS(od,Au,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pP,formatHex:pP,formatHex8:cQ,formatHsl:uQ,formatRgb:xP,toString:xP});function pP(){return this.rgb().formatHex()}function cQ(){return this.rgb().formatHex8()}function uQ(){return uz(this).formatHsl()}function xP(){return this.rgb().formatRgb()}function Au(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=nQ.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?yP(t):n===3?new Rn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Wf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Wf(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=rQ.exec(e))?new Rn(t[1],t[2],t[3],1):(t=aQ.exec(e))?new Rn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iQ.exec(e))?Wf(t[1],t[2],t[3],t[4]):(t=sQ.exec(e))?Wf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oQ.exec(e))?bP(t[1],t[2]/100,t[3]/100,1):(t=lQ.exec(e))?bP(t[1],t[2]/100,t[3]/100,t[4]):mP.hasOwnProperty(e)?yP(mP[e]):e==="transparent"?new Rn(NaN,NaN,NaN,0):null}function yP(e){return new Rn(e>>16&255,e>>8&255,e&255,1)}function Wf(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rn(e,t,n,r)}function dQ(e){return e instanceof od||(e=Au(e)),e?(e=e.rgb(),new Rn(e.r,e.g,e.b,e.opacity)):new Rn}function Nj(e,t,n,r){return arguments.length===1?dQ(e):new Rn(e,t,n,r??1)}function Rn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}IS(Rn,Nj,cz(od,{brighter(e){return e=e==null?Yh:Math.pow(Yh,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Su:Math.pow(Su,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn(_s(this.r),_s(this.g),_s(this.b),Xh(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:gP,formatHex:gP,formatHex8:fQ,formatRgb:vP,toString:vP}));function gP(){return`#${bs(this.r)}${bs(this.g)}${bs(this.b)}`}function fQ(){return`#${bs(this.r)}${bs(this.g)}${bs(this.b)}${bs((isNaN(this.opacity)?1:this.opacity)*255)}`}function vP(){const e=Xh(this.opacity);return`${e===1?"rgb(":"rgba("}${_s(this.r)}, ${_s(this.g)}, ${_s(this.b)}${e===1?")":`, ${e})`}`}function Xh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _s(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function bs(e){return e=_s(e),(e<16?"0":"")+e.toString(16)}function bP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dr(e,t,n,r)}function uz(e){if(e instanceof Dr)return new Dr(e.h,e.s,e.l,e.opacity);if(e instanceof od||(e=Au(e)),!e)return new Dr;if(e instanceof Dr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),l=Math.max(t,n,r),c=NaN,d=l-i,f=(l+i)/2;return d?(t===l?c=(n-r)/d+(n<r)*6:n===l?c=(r-t)/d+2:c=(t-n)/d+4,d/=f<.5?l+i:2-l-i,c*=60):d=f>0&&f<1?0:c,new Dr(c,d,f,e.opacity)}function hQ(e,t,n,r){return arguments.length===1?uz(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}IS(Dr,hQ,cz(od,{brighter(e){return e=e==null?Yh:Math.pow(Yh,e),new Dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Su:Math.pow(Su,e),new Dr(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 Rn(w0(e>=240?e-240:e+120,i,r),w0(e,i,r),w0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Dr(jP(this.h),Zf(this.s),Zf(this.l),Xh(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=Xh(this.opacity);return`${e===1?"hsl(":"hsla("}${jP(this.h)}, ${Zf(this.s)*100}%, ${Zf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function jP(e){return e=(e||0)%360,e<0?e+360:e}function Zf(e){return Math.max(0,Math.min(1,e||0))}function w0(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 qS=e=>()=>e;function mQ(e,t){return function(n){return e+n*t}}function pQ(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 xQ(e){return(e=+e)==1?dz:function(t,n){return n-t?pQ(t,n,e):qS(isNaN(t)?n:t)}}function dz(e,t){var n=t-e;return n?mQ(e,n):qS(isNaN(e)?t:e)}const wP=(function e(t){var n=xQ(t);function r(i,l){var c=n((i=Nj(i)).r,(l=Nj(l)).r),d=n(i.g,l.g),f=n(i.b,l.b),h=dz(i.opacity,l.opacity);return function(p){return i.r=c(p),i.g=d(p),i.b=f(p),i.opacity=h(p),i+""}}return r.gamma=e,r})(1);function yQ(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(l){for(i=0;i<n;++i)r[i]=e[i]*(1-l)+t[i]*l;return r}}function gQ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vQ(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),l=new Array(n),c;for(c=0;c<r;++c)i[c]=Rl(e[c],t[c]);for(;c<n;++c)l[c]=t[c];return function(d){for(c=0;c<r;++c)l[c]=i[c](d);return l}}function bQ(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Wh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function jQ(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]=Rl(e[i],t[i]):r[i]=t[i];return function(l){for(i in n)r[i]=n[i](l);return r}}var Aj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,S0=new RegExp(Aj.source,"g");function wQ(e){return function(){return e}}function SQ(e){return function(t){return e(t)+""}}function NQ(e,t){var n=Aj.lastIndex=S0.lastIndex=0,r,i,l,c=-1,d=[],f=[];for(e=e+"",t=t+"";(r=Aj.exec(e))&&(i=S0.exec(t));)(l=i.index)>n&&(l=t.slice(n,l),d[c]?d[c]+=l:d[++c]=l),(r=r[0])===(i=i[0])?d[c]?d[c]+=i:d[++c]=i:(d[++c]=null,f.push({i:c,x:Wh(r,i)})),n=S0.lastIndex;return n<t.length&&(l=t.slice(n),d[c]?d[c]+=l:d[++c]=l),d.length<2?f[0]?SQ(f[0].x):wQ(t):(t=f.length,function(h){for(var p=0,x;p<t;++p)d[(x=f[p]).i]=x.x(h);return d.join("")})}function Rl(e,t){var n=typeof t,r;return t==null||n==="boolean"?qS(t):(n==="number"?Wh:n==="string"?(r=Au(t))?(t=r,wP):NQ:t instanceof Au?wP:t instanceof Date?bQ:gQ(t)?yQ:Array.isArray(t)?vQ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?jQ:Wh)(e,t)}function US(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function AQ(e,t){t===void 0&&(t=e,e=Rl);for(var n=0,r=t.length-1,i=t[0],l=new Array(r<0?0:r);n<r;)l[n]=e(i,i=t[++n]);return function(c){var d=Math.max(0,Math.min(r-1,Math.floor(c*=r)));return l[d](c-d)}}function _Q(e){return function(){return e}}function Zh(e){return+e}var SP=[0,1];function Nn(e){return e}function _j(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:_Q(isNaN(t)?NaN:.5)}function OQ(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function TQ(e,t,n){var r=e[0],i=e[1],l=t[0],c=t[1];return i<r?(r=_j(i,r),l=n(c,l)):(r=_j(r,i),l=n(l,c)),function(d){return l(r(d))}}function EQ(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),l=new Array(r),c=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++c<r;)i[c]=_j(e[c],e[c+1]),l[c]=n(t[c],t[c+1]);return function(d){var f=sd(e,d,1,r)-1;return l[f](i[f](d))}}function ld(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ap(){var e=SP,t=SP,n=Rl,r,i,l,c=Nn,d,f,h;function p(){var y=Math.min(e.length,t.length);return c!==Nn&&(c=OQ(e[0],e[y-1])),d=y>2?EQ:TQ,f=h=null,x}function x(y){return y==null||isNaN(y=+y)?l:(f||(f=d(e.map(r),t,n)))(r(c(y)))}return x.invert=function(y){return c(i((h||(h=d(t,e.map(r),Wh)))(y)))},x.domain=function(y){return arguments.length?(e=Array.from(y,Zh),p()):e.slice()},x.range=function(y){return arguments.length?(t=Array.from(y),p()):t.slice()},x.rangeRound=function(y){return t=Array.from(y),n=US,p()},x.clamp=function(y){return arguments.length?(c=y?!0:Nn,p()):c!==Nn},x.interpolate=function(y){return arguments.length?(n=y,p()):n},x.unknown=function(y){return arguments.length?(l=y,x):l},function(y,j){return r=y,i=j,p()}}function VS(){return ap()(Nn,Nn)}function CQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Qh(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function el(e){return e=Qh(Math.abs(e)),e?e[1]:NaN}function MQ(e,t){return function(n,r){for(var i=n.length,l=[],c=0,d=e[0],f=0;i>0&&d>0&&(f+d+1>r&&(d=Math.max(1,r-f)),l.push(n.substring(i-=d,i+d)),!((f+=d+1)>r));)d=e[c=(c+1)%e.length];return l.reverse().join(t)}}function kQ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var PQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _u(e){if(!(t=PQ.exec(e)))throw new Error("invalid format: "+e);var t;return new HS({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]})}_u.prototype=HS.prototype;function HS(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+""}HS.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 RQ(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 Jh;function DQ(e,t){var n=Qh(e,t);if(!n)return Jh=void 0,e.toPrecision(t);var r=n[0],i=n[1],l=i-(Jh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,c=r.length;return l===c?r:l>c?r+new Array(l-c+1).join("0"):l>0?r.slice(0,l)+"."+r.slice(l):"0."+new Array(1-l).join("0")+Qh(e,Math.max(0,t+l-1))[0]}function NP(e,t){var n=Qh(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const AP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:CQ,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)=>NP(e*100,t),r:NP,s:DQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _P(e){return e}var OP=Array.prototype.map,TP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zQ(e){var t=e.grouping===void 0||e.thousands===void 0?_P:MQ(OP.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+"",l=e.numerals===void 0?_P:kQ(OP.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",d=e.minus===void 0?"":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(x,y){x=_u(x);var j=x.fill,w=x.align,S=x.sign,v=x.symbol,_=x.zero,O=x.width,A=x.comma,T=x.precision,N=x.trim,E=x.type;E==="n"?(A=!0,E="g"):AP[E]||(T===void 0&&(T=12),N=!0,E="g"),(_||j==="0"&&w==="=")&&(_=!0,j="0",w="=");var k=(y&&y.prefix!==void 0?y.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),R=(v==="$"?r:/[%p]/.test(E)?c:"")+(y&&y.suffix!==void 0?y.suffix:""),L=AP[E],D=/[defgprs%]/.test(E);T=T===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function z($){var F=k,Y=R,K,B,H;if(E==="c")Y=L($)+Y,$="";else{$=+$;var Q=$<0||1/$<0;if($=isNaN($)?f:L(Math.abs($),T),N&&($=RQ($)),Q&&+$==0&&S!=="+"&&(Q=!1),F=(Q?S==="("?S:d:S==="-"||S==="("?"":S)+F,Y=(E==="s"&&!isNaN($)&&Jh!==void 0?TP[8+Jh/3]:"")+Y+(Q&&S==="("?")":""),D){for(K=-1,B=$.length;++K<B;)if(H=$.charCodeAt(K),48>H||H>57){Y=(H===46?i+$.slice(K+1):$.slice(K))+Y,$=$.slice(0,K);break}}}A&&!_&&($=t($,1/0));var ie=F.length+$.length+Y.length,ce=ie<O?new Array(O-ie+1).join(j):"";switch(A&&_&&($=t(ce+$,ce.length?O-Y.length:1/0),ce=""),w){case"<":$=F+$+Y+ce;break;case"=":$=F+ce+$+Y;break;case"^":$=ce.slice(0,ie=ce.length>>1)+F+$+Y+ce.slice(ie);break;default:$=ce+F+$+Y;break}return l($)}return z.toString=function(){return x+""},z}function p(x,y){var j=Math.max(-8,Math.min(8,Math.floor(el(y)/3)))*3,w=Math.pow(10,-j),S=h((x=_u(x),x.type="f",x),{suffix:TP[8+j/3]});return function(v){return S(w*v)}}return{format:h,formatPrefix:p}}var Qf,FS,fz;LQ({thousands:",",grouping:[3],currency:["$",""]});function LQ(e){return Qf=zQ(e),FS=Qf.format,fz=Qf.formatPrefix,Qf}function $Q(e){return Math.max(0,-el(Math.abs(e)))}function BQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(el(t)/3)))*3-el(Math.abs(e)))}function IQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,el(t)-el(e))+1}function hz(e,t,n,r){var i=wj(e,t,n),l;switch(r=_u(r??",f"),r.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(l=BQ(i,c))&&(r.precision=l),fz(r,c)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(l=IQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=l-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(l=$Q(i))&&(r.precision=l-(r.type==="%")*2);break}}return FS(r)}function Ii(e){var t=e.domain;return e.ticks=function(n){var r=t();return bj(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return hz(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,l=r.length-1,c=r[i],d=r[l],f,h,p=10;for(d<c&&(h=c,c=d,d=h,h=i,i=l,l=h);p-- >0;){if(h=jj(c,d,n),h===f)return r[i]=c,r[l]=d,t(r);if(h>0)c=Math.floor(c/h)*h,d=Math.ceil(d/h)*h;else if(h<0)c=Math.ceil(c*h)/h,d=Math.floor(d*h)/h;else break;f=h}return e},e}function em(){var e=VS();return e.copy=function(){return ld(e,em())},Nr.apply(e,arguments),Ii(e)}function mz(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,Zh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return mz(e).unknown(t)},e=arguments.length?Array.from(e,Zh):[0,1],Ii(n)}function pz(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],l=e[r],c;return l<i&&(c=n,n=r,r=c,c=i,i=l,l=c),e[n]=t.floor(i),e[r]=t.ceil(l),e}function EP(e){return Math.log(e)}function CP(e){return Math.exp(e)}function qQ(e){return-Math.log(-e)}function UQ(e){return-Math.exp(-e)}function VQ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function HQ(e){return e===10?VQ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function FQ(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 MP(e){return(t,n)=>-e(-t,n)}function GS(e){const t=e(EP,CP),n=t.domain;let r=10,i,l;function c(){return i=FQ(r),l=HQ(r),n()[0]<0?(i=MP(i),l=MP(l),e(qQ,UQ)):e(EP,CP),t}return t.base=function(d){return arguments.length?(r=+d,c()):r},t.domain=function(d){return arguments.length?(n(d),c()):n()},t.ticks=d=>{const f=n();let h=f[0],p=f[f.length-1];const x=p<h;x&&([h,p]=[p,h]);let y=i(h),j=i(p),w,S;const v=d==null?10:+d;let _=[];if(!(r%1)&&j-y<v){if(y=Math.floor(y),j=Math.ceil(j),h>0){for(;y<=j;++y)for(w=1;w<r;++w)if(S=y<0?w/l(-y):w*l(y),!(S<h)){if(S>p)break;_.push(S)}}else for(;y<=j;++y)for(w=r-1;w>=1;--w)if(S=y>0?w/l(-y):w*l(y),!(S<h)){if(S>p)break;_.push(S)}_.length*2<v&&(_=bj(h,p,v))}else _=bj(y,j,Math.min(j-y,v)).map(l);return x?_.reverse():_},t.tickFormat=(d,f)=>{if(d==null&&(d=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=_u(f)).precision==null&&(f.trim=!0),f=FS(f)),d===1/0)return f;const h=Math.max(1,r*d/t.ticks().length);return p=>{let x=p/l(Math.round(i(p)));return x*r<r-.5&&(x*=r),x<=h?f(p):""}},t.nice=()=>n(pz(n(),{floor:d=>l(Math.floor(i(d))),ceil:d=>l(Math.ceil(i(d)))})),t}function xz(){const e=GS(ap()).domain([1,10]);return e.copy=()=>ld(e,xz()).base(e.base()),Nr.apply(e,arguments),e}function kP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function PP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function KS(e){var t=1,n=e(kP(t),PP(t));return n.constant=function(r){return arguments.length?e(kP(t=+r),PP(t)):t},Ii(n)}function yz(){var e=KS(ap());return e.copy=function(){return ld(e,yz()).constant(e.constant())},Nr.apply(e,arguments)}function RP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function GQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function KQ(e){return e<0?-e*e:e*e}function YS(e){var t=e(Nn,Nn),n=1;function r(){return n===1?e(Nn,Nn):n===.5?e(GQ,KQ):e(RP(n),RP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ii(t)}function XS(){var e=YS(ap());return e.copy=function(){return ld(e,XS()).exponent(e.exponent())},Nr.apply(e,arguments),e}function YQ(){return XS.apply(null,arguments).exponent(.5)}function DP(e){return Math.sign(e)*e*e}function XQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function gz(){var e=VS(),t=[0,1],n=!1,r;function i(l){var c=XQ(e(l));return isNaN(c)?r:n?Math.round(c):c}return i.invert=function(l){return e.invert(DP(l))},i.domain=function(l){return arguments.length?(e.domain(l),i):e.domain()},i.range=function(l){return arguments.length?(e.range((t=Array.from(l,Zh)).map(DP)),i):t.slice()},i.rangeRound=function(l){return i.range(l).round(!0)},i.round=function(l){return arguments.length?(n=!!l,i):n},i.clamp=function(l){return arguments.length?(e.clamp(l),i):e.clamp()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return gz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Nr.apply(i,arguments),Ii(i)}function vz(){var e=[],t=[],n=[],r;function i(){var c=0,d=Math.max(1,t.length);for(n=new Array(d-1);++c<d;)n[c-1]=eQ(e,c/d);return l}function l(c){return c==null||isNaN(c=+c)?r:t[sd(n,c)]}return l.invertExtent=function(c){var d=t.indexOf(c);return d<0?[NaN,NaN]:[d>0?n[d-1]:e[0],d<n.length?n[d]:e[e.length-1]]},l.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let d of c)d!=null&&!isNaN(d=+d)&&e.push(d);return e.sort(Ei),i()},l.range=function(c){return arguments.length?(t=Array.from(c),i()):t.slice()},l.unknown=function(c){return arguments.length?(r=c,l):r},l.quantiles=function(){return n.slice()},l.copy=function(){return vz().domain(e).range(t).unknown(r)},Nr.apply(l,arguments)}function bz(){var e=0,t=1,n=1,r=[.5],i=[0,1],l;function c(f){return f!=null&&f<=f?i[sd(r,f,0,n)]:l}function d(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return c}return c.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,d()):[e,t]},c.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,d()):i.slice()},c.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},c.unknown=function(f){return arguments.length&&(l=f),c},c.thresholds=function(){return r.slice()},c.copy=function(){return bz().domain([e,t]).range(i).unknown(l)},Nr.apply(Ii(c),arguments)}function jz(){var e=[.5],t=[0,1],n,r=1;function i(l){return l!=null&&l<=l?t[sd(e,l,0,r)]:n}return i.domain=function(l){return arguments.length?(e=Array.from(l),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(l){return arguments.length?(t=Array.from(l),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(l){var c=t.indexOf(l);return[e[c-1],e[c]]},i.unknown=function(l){return arguments.length?(n=l,i):n},i.copy=function(){return jz().domain(e).range(t).unknown(n)},Nr.apply(i,arguments)}const N0=new Date,A0=new Date;function Wt(e,t,n,r){function i(l){return e(l=arguments.length===0?new Date:new Date(+l)),l}return i.floor=l=>(e(l=new Date(+l)),l),i.ceil=l=>(e(l=new Date(l-1)),t(l,1),e(l),l),i.round=l=>{const c=i(l),d=i.ceil(l);return l-c<d-l?c:d},i.offset=(l,c)=>(t(l=new Date(+l),c==null?1:Math.floor(c)),l),i.range=(l,c,d)=>{const f=[];if(l=i.ceil(l),d=d==null?1:Math.floor(d),!(l<c)||!(d>0))return f;let h;do f.push(h=new Date(+l)),t(l,d),e(l);while(h<l&&l<c);return f},i.filter=l=>Wt(c=>{if(c>=c)for(;e(c),!l(c);)c.setTime(c-1)},(c,d)=>{if(c>=c)if(d<0)for(;++d<=0;)for(;t(c,-1),!l(c););else for(;--d>=0;)for(;t(c,1),!l(c););}),n&&(i.count=(l,c)=>(N0.setTime(+l),A0.setTime(+c),e(N0),e(A0),Math.floor(n(N0,A0))),i.every=l=>(l=Math.floor(l),!isFinite(l)||!(l>0)?null:l>1?i.filter(r?c=>r(c)%l===0:c=>i.count(0,c)%l===0):i)),i}const tm=Wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);tm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):tm);tm.range;const ka=1e3,gr=ka*60,Pa=gr*60,Ua=Pa*24,WS=Ua*7,zP=Ua*30,_0=Ua*365,js=Wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ka)},(e,t)=>(t-e)/ka,e=>e.getUTCSeconds());js.range;const ZS=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ka)},(e,t)=>{e.setTime(+e+t*gr)},(e,t)=>(t-e)/gr,e=>e.getMinutes());ZS.range;const QS=Wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*gr)},(e,t)=>(t-e)/gr,e=>e.getUTCMinutes());QS.range;const JS=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ka-e.getMinutes()*gr)},(e,t)=>{e.setTime(+e+t*Pa)},(e,t)=>(t-e)/Pa,e=>e.getHours());JS.range;const e2=Wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Pa)},(e,t)=>(t-e)/Pa,e=>e.getUTCHours());e2.range;const cd=Wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gr)/Ua,e=>e.getDate()-1);cd.range;const ip=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>e.getUTCDate()-1);ip.range;const wz=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>Math.floor(e/Ua));wz.range;function $s(e){return Wt(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())*gr)/WS)}const sp=$s(0),nm=$s(1),WQ=$s(2),ZQ=$s(3),tl=$s(4),QQ=$s(5),JQ=$s(6);sp.range;nm.range;WQ.range;ZQ.range;tl.range;QQ.range;JQ.range;function Bs(e){return Wt(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)/WS)}const op=Bs(0),rm=Bs(1),eJ=Bs(2),tJ=Bs(3),nl=Bs(4),nJ=Bs(5),rJ=Bs(6);op.range;rm.range;eJ.range;tJ.range;nl.range;nJ.range;rJ.range;const t2=Wt(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());t2.range;const n2=Wt(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());n2.range;const Va=Wt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Va.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)});Va.range;const Ha=Wt(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());Ha.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)});Ha.range;function Sz(e,t,n,r,i,l){const c=[[js,1,ka],[js,5,5*ka],[js,15,15*ka],[js,30,30*ka],[l,1,gr],[l,5,5*gr],[l,15,15*gr],[l,30,30*gr],[i,1,Pa],[i,3,3*Pa],[i,6,6*Pa],[i,12,12*Pa],[r,1,Ua],[r,2,2*Ua],[n,1,WS],[t,1,zP],[t,3,3*zP],[e,1,_0]];function d(h,p,x){const y=p<h;y&&([h,p]=[p,h]);const j=x&&typeof x.range=="function"?x:f(h,p,x),w=j?j.range(h,+p+1):[];return y?w.reverse():w}function f(h,p,x){const y=Math.abs(p-h)/x,j=$S(([,,v])=>v).right(c,y);if(j===c.length)return e.every(wj(h/_0,p/_0,x));if(j===0)return tm.every(Math.max(wj(h,p,x),1));const[w,S]=c[y/c[j-1][2]<c[j][2]/y?j-1:j];return w.every(S)}return[d,f]}const[aJ,iJ]=Sz(Ha,n2,op,wz,e2,QS),[sJ,oJ]=Sz(Va,t2,sp,cd,JS,ZS);function O0(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 T0(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 Ic(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function lJ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,l=e.days,c=e.shortDays,d=e.months,f=e.shortMonths,h=qc(i),p=Uc(i),x=qc(l),y=Uc(l),j=qc(c),w=Uc(c),S=qc(d),v=Uc(d),_=qc(f),O=Uc(f),A={a:H,A:Q,b:ie,B:ce,c:null,d:UP,e:UP,f:MJ,g:qJ,G:VJ,H:TJ,I:EJ,j:CJ,L:Nz,m:kJ,M:PJ,p:I,q:G,Q:FP,s:GP,S:RJ,u:DJ,U:zJ,V:LJ,w:$J,W:BJ,x:null,X:null,y:IJ,Y:UJ,Z:HJ,"%":HP},T={a:ae,A:fe,b:ye,B:we,c:null,d:VP,e:VP,f:YJ,g:aee,G:see,H:FJ,I:GJ,j:KJ,L:_z,m:XJ,M:WJ,p:Ie,q:et,Q:FP,s:GP,S:ZJ,u:QJ,U:JJ,V:eee,w:tee,W:nee,x:null,X:null,y:ree,Y:iee,Z:oee,"%":HP},N={a:D,A:z,b:$,B:F,c:Y,d:IP,e:IP,f:NJ,g:BP,G:$P,H:qP,I:qP,j:bJ,L:SJ,m:vJ,M:jJ,p:L,q:gJ,Q:_J,s:OJ,S:wJ,u:hJ,U:mJ,V:pJ,w:fJ,W:xJ,x:K,X:B,y:BP,Y:$P,Z:yJ,"%":AJ};A.x=E(n,A),A.X=E(r,A),A.c=E(t,A),T.x=E(n,T),T.X=E(r,T),T.c=E(t,T);function E(de,Oe){return function(ke){var ue=[],gt=-1,Le=0,Ot=de.length,Tt,mn,Ar;for(ke instanceof Date||(ke=new Date(+ke));++gt<Ot;)de.charCodeAt(gt)===37&&(ue.push(de.slice(Le,gt)),(mn=LP[Tt=de.charAt(++gt)])!=null?Tt=de.charAt(++gt):mn=Tt==="e"?" ":"0",(Ar=Oe[Tt])&&(Tt=Ar(ke,mn)),ue.push(Tt),Le=gt+1);return ue.push(de.slice(Le,gt)),ue.join("")}}function k(de,Oe){return function(ke){var ue=Ic(1900,void 0,1),gt=R(ue,de,ke+="",0),Le,Ot;if(gt!=ke.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(Oe&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(Le=T0(Ic(ue.y,0,1)),Ot=Le.getUTCDay(),Le=Ot>4||Ot===0?rm.ceil(Le):rm(Le),Le=ip.offset(Le,(ue.V-1)*7),ue.y=Le.getUTCFullYear(),ue.m=Le.getUTCMonth(),ue.d=Le.getUTCDate()+(ue.w+6)%7):(Le=O0(Ic(ue.y,0,1)),Ot=Le.getDay(),Le=Ot>4||Ot===0?nm.ceil(Le):nm(Le),Le=cd.offset(Le,(ue.V-1)*7),ue.y=Le.getFullYear(),ue.m=Le.getMonth(),ue.d=Le.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),Ot="Z"in ue?T0(Ic(ue.y,0,1)).getUTCDay():O0(Ic(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(Ot+5)%7:ue.w+ue.U*7-(Ot+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,T0(ue)):O0(ue)}}function R(de,Oe,ke,ue){for(var gt=0,Le=Oe.length,Ot=ke.length,Tt,mn;gt<Le;){if(ue>=Ot)return-1;if(Tt=Oe.charCodeAt(gt++),Tt===37){if(Tt=Oe.charAt(gt++),mn=N[Tt in LP?Oe.charAt(gt++):Tt],!mn||(ue=mn(de,ke,ue))<0)return-1}else if(Tt!=ke.charCodeAt(ue++))return-1}return ue}function L(de,Oe,ke){var ue=h.exec(Oe.slice(ke));return ue?(de.p=p.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function D(de,Oe,ke){var ue=j.exec(Oe.slice(ke));return ue?(de.w=w.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function z(de,Oe,ke){var ue=x.exec(Oe.slice(ke));return ue?(de.w=y.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function $(de,Oe,ke){var ue=_.exec(Oe.slice(ke));return ue?(de.m=O.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function F(de,Oe,ke){var ue=S.exec(Oe.slice(ke));return ue?(de.m=v.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function Y(de,Oe,ke){return R(de,t,Oe,ke)}function K(de,Oe,ke){return R(de,n,Oe,ke)}function B(de,Oe,ke){return R(de,r,Oe,ke)}function H(de){return c[de.getDay()]}function Q(de){return l[de.getDay()]}function ie(de){return f[de.getMonth()]}function ce(de){return d[de.getMonth()]}function I(de){return i[+(de.getHours()>=12)]}function G(de){return 1+~~(de.getMonth()/3)}function ae(de){return c[de.getUTCDay()]}function fe(de){return l[de.getUTCDay()]}function ye(de){return f[de.getUTCMonth()]}function we(de){return d[de.getUTCMonth()]}function Ie(de){return i[+(de.getUTCHours()>=12)]}function et(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var Oe=E(de+="",A);return Oe.toString=function(){return de},Oe},parse:function(de){var Oe=k(de+="",!1);return Oe.toString=function(){return de},Oe},utcFormat:function(de){var Oe=E(de+="",T);return Oe.toString=function(){return de},Oe},utcParse:function(de){var Oe=k(de+="",!0);return Oe.toString=function(){return de},Oe}}}var LP={"-":"",_:" ",0:"0"},tn=/^\s*\d+/,cJ=/^%/,uJ=/[\\^$*+?|[\]().{}]/g;function Qe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",l=i.length;return r+(l<n?new Array(n-l+1).join(t)+i:i)}function dJ(e){return e.replace(uJ,"\\$&")}function qc(e){return new RegExp("^(?:"+e.map(dJ).join("|")+")","i")}function Uc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function fJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function hJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function mJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function pJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function xJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $P(e,t,n){var r=tn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function BP(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 yJ(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 gJ(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 vJ(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 IP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function bJ(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 qP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function jJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function wJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function SJ(e,t,n){var r=tn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function NJ(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 AJ(e,t,n){var r=cJ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function _J(e,t,n){var r=tn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function OJ(e,t,n){var r=tn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function UP(e,t){return Qe(e.getDate(),t,2)}function TJ(e,t){return Qe(e.getHours(),t,2)}function EJ(e,t){return Qe(e.getHours()%12||12,t,2)}function CJ(e,t){return Qe(1+cd.count(Va(e),e),t,3)}function Nz(e,t){return Qe(e.getMilliseconds(),t,3)}function MJ(e,t){return Nz(e,t)+"000"}function kJ(e,t){return Qe(e.getMonth()+1,t,2)}function PJ(e,t){return Qe(e.getMinutes(),t,2)}function RJ(e,t){return Qe(e.getSeconds(),t,2)}function DJ(e){var t=e.getDay();return t===0?7:t}function zJ(e,t){return Qe(sp.count(Va(e)-1,e),t,2)}function Az(e){var t=e.getDay();return t>=4||t===0?tl(e):tl.ceil(e)}function LJ(e,t){return e=Az(e),Qe(tl.count(Va(e),e)+(Va(e).getDay()===4),t,2)}function $J(e){return e.getDay()}function BJ(e,t){return Qe(nm.count(Va(e)-1,e),t,2)}function IJ(e,t){return Qe(e.getFullYear()%100,t,2)}function qJ(e,t){return e=Az(e),Qe(e.getFullYear()%100,t,2)}function UJ(e,t){return Qe(e.getFullYear()%1e4,t,4)}function VJ(e,t){var n=e.getDay();return e=n>=4||n===0?tl(e):tl.ceil(e),Qe(e.getFullYear()%1e4,t,4)}function HJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qe(t/60|0,"0",2)+Qe(t%60,"0",2)}function VP(e,t){return Qe(e.getUTCDate(),t,2)}function FJ(e,t){return Qe(e.getUTCHours(),t,2)}function GJ(e,t){return Qe(e.getUTCHours()%12||12,t,2)}function KJ(e,t){return Qe(1+ip.count(Ha(e),e),t,3)}function _z(e,t){return Qe(e.getUTCMilliseconds(),t,3)}function YJ(e,t){return _z(e,t)+"000"}function XJ(e,t){return Qe(e.getUTCMonth()+1,t,2)}function WJ(e,t){return Qe(e.getUTCMinutes(),t,2)}function ZJ(e,t){return Qe(e.getUTCSeconds(),t,2)}function QJ(e){var t=e.getUTCDay();return t===0?7:t}function JJ(e,t){return Qe(op.count(Ha(e)-1,e),t,2)}function Oz(e){var t=e.getUTCDay();return t>=4||t===0?nl(e):nl.ceil(e)}function eee(e,t){return e=Oz(e),Qe(nl.count(Ha(e),e)+(Ha(e).getUTCDay()===4),t,2)}function tee(e){return e.getUTCDay()}function nee(e,t){return Qe(rm.count(Ha(e)-1,e),t,2)}function ree(e,t){return Qe(e.getUTCFullYear()%100,t,2)}function aee(e,t){return e=Oz(e),Qe(e.getUTCFullYear()%100,t,2)}function iee(e,t){return Qe(e.getUTCFullYear()%1e4,t,4)}function see(e,t){var n=e.getUTCDay();return e=n>=4||n===0?nl(e):nl.ceil(e),Qe(e.getUTCFullYear()%1e4,t,4)}function oee(){return"+0000"}function HP(){return"%"}function FP(e){return+e}function GP(e){return Math.floor(+e/1e3)}var Oo,Tz,Ez;lee({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 lee(e){return Oo=lJ(e),Tz=Oo.format,Oo.parse,Ez=Oo.utcFormat,Oo.utcParse,Oo}function cee(e){return new Date(e)}function uee(e){return e instanceof Date?+e:+new Date(+e)}function r2(e,t,n,r,i,l,c,d,f,h){var p=VS(),x=p.invert,y=p.domain,j=h(".%L"),w=h(":%S"),S=h("%I:%M"),v=h("%I %p"),_=h("%a %d"),O=h("%b %d"),A=h("%B"),T=h("%Y");function N(E){return(f(E)<E?j:d(E)<E?w:c(E)<E?S:l(E)<E?v:r(E)<E?i(E)<E?_:O:n(E)<E?A:T)(E)}return p.invert=function(E){return new Date(x(E))},p.domain=function(E){return arguments.length?y(Array.from(E,uee)):y().map(cee)},p.ticks=function(E){var k=y();return e(k[0],k[k.length-1],E??10)},p.tickFormat=function(E,k){return k==null?N:h(k)},p.nice=function(E){var k=y();return(!E||typeof E.range!="function")&&(E=t(k[0],k[k.length-1],E??10)),E?y(pz(k,E)):p},p.copy=function(){return ld(p,r2(e,t,n,r,i,l,c,d,f,h))},p}function dee(){return Nr.apply(r2(sJ,oJ,Va,t2,sp,cd,JS,ZS,js,Tz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function fee(){return Nr.apply(r2(aJ,iJ,Ha,n2,op,ip,e2,QS,js,Ez).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function lp(){var e=0,t=1,n,r,i,l,c=Nn,d=!1,f;function h(x){return x==null||isNaN(x=+x)?f:c(i===0?.5:(x=(l(x)-n)*i,d?Math.max(0,Math.min(1,x)):x))}h.domain=function(x){return arguments.length?([e,t]=x,n=l(e=+e),r=l(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(x){return arguments.length?(d=!!x,h):d},h.interpolator=function(x){return arguments.length?(c=x,h):c};function p(x){return function(y){var j,w;return arguments.length?([j,w]=y,c=x(j,w),h):[c(0),c(1)]}}return h.range=p(Rl),h.rangeRound=p(US),h.unknown=function(x){return arguments.length?(f=x,h):f},function(x){return l=x,n=x(e),r=x(t),i=n===r?0:1/(r-n),h}}function qi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Cz(){var e=Ii(lp()(Nn));return e.copy=function(){return qi(e,Cz())},Ka.apply(e,arguments)}function Mz(){var e=GS(lp()).domain([1,10]);return e.copy=function(){return qi(e,Mz()).base(e.base())},Ka.apply(e,arguments)}function kz(){var e=KS(lp());return e.copy=function(){return qi(e,kz()).constant(e.constant())},Ka.apply(e,arguments)}function a2(){var e=YS(lp());return e.copy=function(){return qi(e,a2()).exponent(e.exponent())},Ka.apply(e,arguments)}function hee(){return a2.apply(null,arguments).exponent(.5)}function Pz(){var e=[],t=Nn;function n(r){if(r!=null&&!isNaN(r=+r))return t((sd(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(Ei),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,l)=>JZ(e,l/r))},n.copy=function(){return Pz(t).domain(e)},Ka.apply(n,arguments)}function cp(){var e=0,t=.5,n=1,r=1,i,l,c,d,f,h=Nn,p,x=!1,y;function j(S){return isNaN(S=+S)?y:(S=.5+((S=+p(S))-l)*(r*S<r*l?d:f),h(x?Math.max(0,Math.min(1,S)):S))}j.domain=function(S){return arguments.length?([e,t,n]=S,i=p(e=+e),l=p(t=+t),c=p(n=+n),d=i===l?0:.5/(l-i),f=l===c?0:.5/(c-l),r=l<i?-1:1,j):[e,t,n]},j.clamp=function(S){return arguments.length?(x=!!S,j):x},j.interpolator=function(S){return arguments.length?(h=S,j):h};function w(S){return function(v){var _,O,A;return arguments.length?([_,O,A]=v,h=AQ(S,[_,O,A]),j):[h(0),h(.5),h(1)]}}return j.range=w(Rl),j.rangeRound=w(US),j.unknown=function(S){return arguments.length?(y=S,j):y},function(S){return p=S,i=S(e),l=S(t),c=S(n),d=i===l?0:.5/(l-i),f=l===c?0:.5/(c-l),r=l<i?-1:1,j}}function Rz(){var e=Ii(cp()(Nn));return e.copy=function(){return qi(e,Rz())},Ka.apply(e,arguments)}function Dz(){var e=GS(cp()).domain([.1,1,10]);return e.copy=function(){return qi(e,Dz()).base(e.base())},Ka.apply(e,arguments)}function zz(){var e=KS(cp());return e.copy=function(){return qi(e,zz()).constant(e.constant())},Ka.apply(e,arguments)}function i2(){var e=YS(cp());return e.copy=function(){return qi(e,i2()).exponent(e.exponent())},Ka.apply(e,arguments)}function mee(){return i2.apply(null,arguments).exponent(.5)}const KP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:wu,scaleDiverging:Rz,scaleDivergingLog:Dz,scaleDivergingPow:i2,scaleDivergingSqrt:mee,scaleDivergingSymlog:zz,scaleIdentity:mz,scaleImplicit:Sj,scaleLinear:em,scaleLog:xz,scaleOrdinal:BS,scalePoint:ru,scalePow:XS,scaleQuantile:vz,scaleQuantize:bz,scaleRadial:gz,scaleSequential:Cz,scaleSequentialLog:Mz,scaleSequentialPow:a2,scaleSequentialQuantile:Pz,scaleSequentialSqrt:hee,scaleSequentialSymlog:kz,scaleSqrt:YQ,scaleSymlog:yz,scaleThreshold:jz,scaleTime:dee,scaleUtc:fee,tickFormat:hz},Symbol.toStringTag,{value:"Module"}));var E0,YP;function up(){if(YP)return E0;YP=1;var e=Cl();function t(n,r,i){for(var l=-1,c=n.length;++l<c;){var d=n[l],f=r(d);if(f!=null&&(h===void 0?f===f&&!e(f):i(f,h)))var h=f,p=d}return p}return E0=t,E0}var C0,XP;function Lz(){if(XP)return C0;XP=1;function e(t,n){return t>n}return C0=e,C0}var M0,WP;function pee(){if(WP)return M0;WP=1;var e=up(),t=Lz(),n=Pl();function r(i){return i&&i.length?e(i,n,t):void 0}return M0=r,M0}var xee=pee();const dp=st(xee);var k0,ZP;function $z(){if(ZP)return k0;ZP=1;function e(t,n){return t<n}return k0=e,k0}var P0,QP;function yee(){if(QP)return P0;QP=1;var e=up(),t=$z(),n=Pl();function r(i){return i&&i.length?e(i,n,t):void 0}return P0=r,P0}var gee=yee();const fp=st(gee);var R0,JP;function vee(){if(JP)return R0;JP=1;var e=jS(),t=sa(),n=K6(),r=zn();function i(l,c){var d=r(l)?e:n;return d(l,t(c,3))}return R0=i,R0}var D0,e3;function bee(){if(e3)return D0;e3=1;var e=F6(),t=vee();function n(r,i){return e(t(r,i),1)}return D0=n,D0}var jee=bee();const wee=st(jee);var z0,t3;function See(){if(t3)return z0;t3=1;var e=RS();function t(n,r){return e(n,r)}return z0=t,z0}var Nee=See();const ud=st(Nee);var Dl=1e9,Aee={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},o2,At=!0,Sr="[DecimalError] ",Os=Sr+"Invalid argument: ",s2=Sr+"Exponent out of range: ",zl=Math.floor,ps=Math.pow,_ee=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wn,Jt=1e7,St=7,Bz=9007199254740991,am=zl(Bz/St),me={};me.absoluteValue=me.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};me.comparedTo=me.cmp=function(e){var t,n,r,i,l=this;if(e=new l.constructor(e),l.s!==e.s)return l.s||-e.s;if(l.e!==e.e)return l.e>e.e^l.s<0?1:-1;for(r=l.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(l.d[t]!==e.d[t])return l.d[t]>e.d[t]^l.s<0?1:-1;return r===i?0:r>i^l.s<0?1:-1};me.decimalPlaces=me.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*St;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};me.dividedBy=me.div=function(e){return La(this,new this.constructor(e))};me.dividedToIntegerBy=me.idiv=function(e){var t=this,n=t.constructor;return mt(La(t,new n(e),0,1),n.precision)};me.equals=me.eq=function(e){return!this.cmp(e)};me.exponent=function(){return Vt(this)};me.greaterThan=me.gt=function(e){return this.cmp(e)>0};me.greaterThanOrEqualTo=me.gte=function(e){return this.cmp(e)>=0};me.isInteger=me.isint=function(){return this.e>this.d.length-2};me.isNegative=me.isneg=function(){return this.s<0};me.isPositive=me.ispos=function(){return this.s>0};me.isZero=function(){return this.s===0};me.lessThan=me.lt=function(e){return this.cmp(e)<0};me.lessThanOrEqualTo=me.lte=function(e){return this.cmp(e)<1};me.logarithm=me.log=function(e){var t,n=this,r=n.constructor,i=r.precision,l=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Wn))throw Error(Sr+"NaN");if(n.s<1)throw Error(Sr+(n.s?"NaN":"-Infinity"));return n.eq(Wn)?new r(0):(At=!1,t=La(Ou(n,l),Ou(e,l),l),At=!0,mt(t,i))};me.minus=me.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Uz(t,e):Iz(t,(e.s=-e.s,e))};me.modulo=me.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Sr+"NaN");return n.s?(At=!1,t=La(n,e,0,1).times(e),At=!0,n.minus(t)):mt(new r(n),i)};me.naturalExponential=me.exp=function(){return qz(this)};me.naturalLogarithm=me.ln=function(){return Ou(this)};me.negated=me.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};me.plus=me.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Iz(t,e):Uz(t,(e.s=-e.s,e))};me.precision=me.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Os+e);if(t=Vt(i)+1,r=i.d.length-1,n=r*St+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};me.squareRoot=me.sqrt=function(){var e,t,n,r,i,l,c,d=this,f=d.constructor;if(d.s<1){if(!d.s)return new f(0);throw Error(Sr+"NaN")}for(e=Vt(d),At=!1,i=Math.sqrt(+d),i==0||i==1/0?(t=Xr(d.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=zl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new f(t)):r=new f(i.toString()),n=f.precision,i=c=n+3;;)if(l=r,r=l.plus(La(d,l,c+2)).times(.5),Xr(l.d).slice(0,c)===(t=Xr(r.d)).slice(0,c)){if(t=t.slice(c-3,c+1),i==c&&t=="4999"){if(mt(l,n+1,0),l.times(l).eq(d)){r=l;break}}else if(t!="9999")break;c+=4}return At=!0,mt(r,n)};me.times=me.mul=function(e){var t,n,r,i,l,c,d,f,h,p=this,x=p.constructor,y=p.d,j=(e=new x(e)).d;if(!p.s||!e.s)return new x(0);for(e.s*=p.s,n=p.e+e.e,f=y.length,h=j.length,f<h&&(l=y,y=j,j=l,c=f,f=h,h=c),l=[],c=f+h,r=c;r--;)l.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)d=l[i]+j[r]*y[i-r-1]+t,l[i--]=d%Jt|0,t=d/Jt|0;l[i]=(l[i]+t)%Jt|0}for(;!l[--c];)l.pop();return t?++n:l.shift(),e.d=l,e.e=n,At?mt(e,x.precision):e};me.toDecimalPlaces=me.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ra(e,0,Dl),t===void 0?t=r.rounding:ra(t,0,8),mt(n,e+Vt(n)+1,t))};me.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ks(r,!0):(ra(e,0,Dl),t===void 0?t=i.rounding:ra(t,0,8),r=mt(new i(r),e+1,t),n=ks(r,!0,e+1)),n};me.toFixed=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?ks(i):(ra(e,0,Dl),t===void 0?t=l.rounding:ra(t,0,8),r=mt(new l(i),e+Vt(i)+1,t),n=ks(r.abs(),!1,e+Vt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};me.toInteger=me.toint=function(){var e=this,t=e.constructor;return mt(new t(e),Vt(e)+1,t.rounding)};me.toNumber=function(){return+this};me.toPower=me.pow=function(e){var t,n,r,i,l,c,d=this,f=d.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Wn);if(d=new f(d),!d.s){if(e.s<1)throw Error(Sr+"Infinity");return d}if(d.eq(Wn))return d;if(r=f.precision,e.eq(Wn))return mt(d,r);if(t=e.e,n=e.d.length-1,c=t>=n,l=d.s,c){if((n=p<0?-p:p)<=Bz){for(i=new f(Wn),t=Math.ceil(r/St+4),At=!1;n%2&&(i=i.times(d),r3(i.d,t)),n=zl(n/2),n!==0;)d=d.times(d),r3(d.d,t);return At=!0,e.s<0?new f(Wn).div(i):mt(i,r)}}else if(l<0)throw Error(Sr+"NaN");return l=l<0&&e.d[Math.max(t,n)]&1?-1:1,d.s=1,At=!1,i=e.times(Ou(d,r+h)),At=!0,i=qz(i),i.s=l,i};me.toPrecision=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?(n=Vt(i),r=ks(i,n<=l.toExpNeg||n>=l.toExpPos)):(ra(e,1,Dl),t===void 0?t=l.rounding:ra(t,0,8),i=mt(new l(i),e,t),n=Vt(i),r=ks(i,e<=n||n<=l.toExpNeg,e)),r};me.toSignificantDigits=me.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ra(e,1,Dl),t===void 0?t=r.rounding:ra(t,0,8)),mt(new r(n),e,t)};me.toString=me.valueOf=me.val=me.toJSON=me[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Vt(e),n=e.constructor;return ks(e,t<=n.toExpNeg||t>=n.toExpPos)};function Iz(e,t){var n,r,i,l,c,d,f,h,p=e.constructor,x=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),At?mt(t,x):t;if(f=e.d,h=t.d,c=e.e,i=t.e,f=f.slice(),l=c-i,l){for(l<0?(r=f,l=-l,d=h.length):(r=h,i=c,d=f.length),c=Math.ceil(x/St),d=c>d?c+1:d+1,l>d&&(l=d,r.length=1),r.reverse();l--;)r.push(0);r.reverse()}for(d=f.length,l=h.length,d-l<0&&(l=d,r=h,h=f,f=r),n=0;l;)n=(f[--l]=f[l]+h[l]+n)/Jt|0,f[l]%=Jt;for(n&&(f.unshift(n),++i),d=f.length;f[--d]==0;)f.pop();return t.d=f,t.e=i,At?mt(t,x):t}function ra(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Os+e)}function Xr(e){var t,n,r,i=e.length-1,l="",c=e[0];if(i>0){for(l+=c,t=1;t<i;t++)r=e[t]+"",n=St-r.length,n&&(l+=Ni(n)),l+=r;c=e[t],r=c+"",n=St-r.length,n&&(l+=Ni(n))}else if(c===0)return"0";for(;c%10===0;)c/=10;return l+c}var La=(function(){function e(r,i){var l,c=0,d=r.length;for(r=r.slice();d--;)l=r[d]*i+c,r[d]=l%Jt|0,c=l/Jt|0;return c&&r.unshift(c),r}function t(r,i,l,c){var d,f;if(l!=c)f=l>c?1:-1;else for(d=f=0;d<l;d++)if(r[d]!=i[d]){f=r[d]>i[d]?1:-1;break}return f}function n(r,i,l){for(var c=0;l--;)r[l]-=c,c=r[l]<i[l]?1:0,r[l]=c*Jt+r[l]-i[l];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,l,c){var d,f,h,p,x,y,j,w,S,v,_,O,A,T,N,E,k,R,L=r.constructor,D=r.s==i.s?1:-1,z=r.d,$=i.d;if(!r.s)return new L(r);if(!i.s)throw Error(Sr+"Division by zero");for(f=r.e-i.e,k=$.length,N=z.length,j=new L(D),w=j.d=[],h=0;$[h]==(z[h]||0);)++h;if($[h]>(z[h]||0)&&--f,l==null?O=l=L.precision:c?O=l+(Vt(r)-Vt(i))+1:O=l,O<0)return new L(0);if(O=O/St+2|0,h=0,k==1)for(p=0,$=$[0],O++;(h<N||p)&&O--;h++)A=p*Jt+(z[h]||0),w[h]=A/$|0,p=A%$|0;else{for(p=Jt/($[0]+1)|0,p>1&&($=e($,p),z=e(z,p),k=$.length,N=z.length),T=k,S=z.slice(0,k),v=S.length;v<k;)S[v++]=0;R=$.slice(),R.unshift(0),E=$[0],$[1]>=Jt/2&&++E;do p=0,d=t($,S,k,v),d<0?(_=S[0],k!=v&&(_=_*Jt+(S[1]||0)),p=_/E|0,p>1?(p>=Jt&&(p=Jt-1),x=e($,p),y=x.length,v=S.length,d=t(x,S,y,v),d==1&&(p--,n(x,k<y?R:$,y))):(p==0&&(d=p=1),x=$.slice()),y=x.length,y<v&&x.unshift(0),n(S,x,v),d==-1&&(v=S.length,d=t($,S,k,v),d<1&&(p++,n(S,k<v?R:$,v))),v=S.length):d===0&&(p++,S=[0]),w[h++]=p,d&&S[0]?S[v++]=z[T]||0:(S=[z[T]],v=1);while((T++<N||S[0]!==void 0)&&O--)}return w[0]||w.shift(),j.e=f,mt(j,c?l+Vt(j)+1:l)}})();function qz(e,t){var n,r,i,l,c,d,f=0,h=0,p=e.constructor,x=p.precision;if(Vt(e)>16)throw Error(s2+Vt(e));if(!e.s)return new p(Wn);for(At=!1,d=x,c=new p(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(r=Math.log(ps(2,h))/Math.LN10*2+5|0,d+=r,n=i=l=new p(Wn),p.precision=d;;){if(i=mt(i.times(e),d),n=n.times(++f),c=l.plus(La(i,n,d)),Xr(c.d).slice(0,d)===Xr(l.d).slice(0,d)){for(;h--;)l=mt(l.times(l),d);return p.precision=x,t==null?(At=!0,mt(l,x)):l}l=c}}function Vt(e){for(var t=e.e*St,n=e.d[0];n>=10;n/=10)t++;return t}function L0(e,t,n){if(t>e.LN10.sd())throw At=!0,n&&(e.precision=n),Error(Sr+"LN10 precision limit exceeded");return mt(new e(e.LN10),t)}function Ni(e){for(var t="";e--;)t+="0";return t}function Ou(e,t){var n,r,i,l,c,d,f,h,p,x=1,y=10,j=e,w=j.d,S=j.constructor,v=S.precision;if(j.s<1)throw Error(Sr+(j.s?"NaN":"-Infinity"));if(j.eq(Wn))return new S(0);if(t==null?(At=!1,h=v):h=t,j.eq(10))return t==null&&(At=!0),L0(S,h);if(h+=y,S.precision=h,n=Xr(w),r=n.charAt(0),l=Vt(j),Math.abs(l)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)j=j.times(e),n=Xr(j.d),r=n.charAt(0),x++;l=Vt(j),r>1?(j=new S("0."+n),l++):j=new S(r+"."+n.slice(1))}else return f=L0(S,h+2,v).times(l+""),j=Ou(new S(r+"."+n.slice(1)),h-y).plus(f),S.precision=v,t==null?(At=!0,mt(j,v)):j;for(d=c=j=La(j.minus(Wn),j.plus(Wn),h),p=mt(j.times(j),h),i=3;;){if(c=mt(c.times(p),h),f=d.plus(La(c,new S(i),h)),Xr(f.d).slice(0,h)===Xr(d.d).slice(0,h))return d=d.times(2),l!==0&&(d=d.plus(L0(S,h+2,v).times(l+""))),d=La(d,new S(x),h),S.precision=v,t==null?(At=!0,mt(d,v)):d;d=f,i+=2}}function n3(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=zl(n/St),e.d=[],r=(n+1)%St,n<0&&(r+=St),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=St;r<i;)e.d.push(+t.slice(r,r+=St));t=t.slice(r),r=St-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),At&&(e.e>am||e.e<-am))throw Error(s2+n)}else e.s=0,e.e=0,e.d=[0];return e}function mt(e,t,n){var r,i,l,c,d,f,h,p,x=e.d;for(c=1,l=x[0];l>=10;l/=10)c++;if(r=t-c,r<0)r+=St,i=t,h=x[p=0];else{if(p=Math.ceil((r+1)/St),l=x.length,p>=l)return e;for(h=l=x[p],c=1;l>=10;l/=10)c++;r%=St,i=r-St+c}if(n!==void 0&&(l=ps(10,c-i-1),d=h/l%10|0,f=t<0||x[p+1]!==void 0||h%l,f=n<4?(d||f)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||f||n==6&&(r>0?i>0?h/ps(10,c-i):0:x[p-1])%10&1||n==(e.s<0?8:7))),t<1||!x[0])return f?(l=Vt(e),x.length=1,t=t-l-1,x[0]=ps(10,(St-t%St)%St),e.e=zl(-t/St)||0):(x.length=1,x[0]=e.e=e.s=0),e;if(r==0?(x.length=p,l=1,p--):(x.length=p+1,l=ps(10,St-r),x[p]=i>0?(h/ps(10,c-i)%ps(10,i)|0)*l:0),f)for(;;)if(p==0){(x[0]+=l)==Jt&&(x[0]=1,++e.e);break}else{if(x[p]+=l,x[p]!=Jt)break;x[p--]=0,l=1}for(r=x.length;x[--r]===0;)x.pop();if(At&&(e.e>am||e.e<-am))throw Error(s2+Vt(e));return e}function Uz(e,t){var n,r,i,l,c,d,f,h,p,x,y=e.constructor,j=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),At?mt(t,j):t;if(f=e.d,x=t.d,r=t.e,h=e.e,f=f.slice(),c=h-r,c){for(p=c<0,p?(n=f,c=-c,d=x.length):(n=x,r=h,d=f.length),i=Math.max(Math.ceil(j/St),d)+2,c>i&&(c=i,n.length=1),n.reverse(),i=c;i--;)n.push(0);n.reverse()}else{for(i=f.length,d=x.length,p=i<d,p&&(d=i),i=0;i<d;i++)if(f[i]!=x[i]){p=f[i]<x[i];break}c=0}for(p&&(n=f,f=x,x=n,t.s=-t.s),d=f.length,i=x.length-d;i>0;--i)f[d++]=0;for(i=x.length;i>c;){if(f[--i]<x[i]){for(l=i;l&&f[--l]===0;)f[l]=Jt-1;--f[l],f[i]+=Jt}f[i]-=x[i]}for(;f[--d]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,At?mt(t,j):t):new y(0)}function ks(e,t,n){var r,i=Vt(e),l=Xr(e.d),c=l.length;return t?(n&&(r=n-c)>0?l=l.charAt(0)+"."+l.slice(1)+Ni(r):c>1&&(l=l.charAt(0)+"."+l.slice(1)),l=l+(i<0?"e":"e+")+i):i<0?(l="0."+Ni(-i-1)+l,n&&(r=n-c)>0&&(l+=Ni(r))):i>=c?(l+=Ni(i+1-c),n&&(r=n-i-1)>0&&(l=l+"."+Ni(r))):((r=i+1)<c&&(l=l.slice(0,r)+"."+l.slice(r)),n&&(r=n-c)>0&&(i+1===c&&(l+="."),l+=Ni(r))),e.s<0?"-"+l:l}function r3(e,t){if(e.length>t)return e.length=t,!0}function Vz(e){var t,n,r;function i(l){var c=this;if(!(c instanceof i))return new i(l);if(c.constructor=i,l instanceof i){c.s=l.s,c.e=l.e,c.d=(l=l.d)?l.slice():l;return}if(typeof l=="number"){if(l*0!==0)throw Error(Os+l);if(l>0)c.s=1;else if(l<0)l=-l,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(l===~~l&&l<1e7){c.e=0,c.d=[l];return}return n3(c,l.toString())}else if(typeof l!="string")throw Error(Os+l);if(l.charCodeAt(0)===45?(l=l.slice(1),c.s=-1):c.s=1,_ee.test(l))n3(c,l);else throw Error(Os+l)}if(i.prototype=me,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=Vz,i.config=i.set=Oee,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 Oee(e){if(!e||typeof e!="object")throw Error(Sr+"Object expected");var t,n,r,i=["precision",1,Dl,"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(zl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Os+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Os+n+": "+r);return this}var o2=Vz(Aee);Wn=new o2(1);const ut=o2;function Tee(e){return kee(e)||Mee(e)||Cee(e)||Eee()}function Eee(){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 Cee(e,t){if(e){if(typeof e=="string")return Oj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oj(e,t)}}function Mee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function kee(e){if(Array.isArray(e))return Oj(e)}function Oj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pee=function(t){return t},Hz={},Fz=function(t){return t===Hz},a3=function(t){return function n(){return arguments.length===0||arguments.length===1&&Fz(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Ree=function e(t,n){return t===1?n:a3(function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];var c=i.filter(function(d){return d!==Hz}).length;return c>=t?n.apply(void 0,i):e(t-c,a3(function(){for(var d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];var p=i.map(function(x){return Fz(x)?f.shift():x});return n.apply(void 0,Tee(p).concat(f))}))})},hp=function(t){return Ree(t.length,t)},Tj=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},Dee=hp(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),zee=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Pee;var i=n.reverse(),l=i[0],c=i.slice(1);return function(){return c.reduce(function(d,f){return f(d)},l.apply(void 0,arguments))}},Ej=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Gz=function(t){var n=null,r=null;return function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return n&&l.every(function(d,f){return d===n[f]})||(n=l,r=t.apply(void 0,l)),r}};function Lee(e){var t;return e===0?t=1:t=Math.floor(new ut(e).abs().log(10).toNumber())+1,t}function $ee(e,t,n){for(var r=new ut(e),i=0,l=[];r.lt(t)&&i<1e5;)l.push(r.toNumber()),r=r.add(n),i++;return l}var Bee=hp(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),Iee=hp(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),qee=hp(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const mp={rangeStep:$ee,getDigitCount:Lee,interpolateNumber:Bee,uninterpolateNumber:Iee,uninterpolateTruncation:qee};function Cj(e){return Hee(e)||Vee(e)||Kz(e)||Uee()}function Uee(){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 Vee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Hee(e){if(Array.isArray(e))return Mj(e)}function Tu(e,t){return Kee(e)||Gee(e,t)||Kz(e,t)||Fee()}function Fee(){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 Kz(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 Mj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gee(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,l=void 0;try{for(var c=e[Symbol.iterator](),d;!(r=(d=c.next()).done)&&(n.push(d.value),!(t&&n.length===t));r=!0);}catch(f){i=!0,l=f}finally{try{!r&&c.return!=null&&c.return()}finally{if(i)throw l}}return n}}function Kee(e){if(Array.isArray(e))return e}function Yz(e){var t=Tu(e,2),n=t[0],r=t[1],i=n,l=r;return n>r&&(i=r,l=n),[i,l]}function Xz(e,t,n){if(e.lte(0))return new ut(0);var r=mp.getDigitCount(e.toNumber()),i=new ut(10).pow(r),l=e.div(i),c=r!==1?.05:.1,d=new ut(Math.ceil(l.div(c).toNumber())).add(n).mul(c),f=d.mul(i);return t?f:new ut(Math.ceil(f))}function Yee(e,t,n){var r=1,i=new ut(e);if(!i.isint()&&n){var l=Math.abs(e);l<1?(r=new ut(10).pow(mp.getDigitCount(e)-1),i=new ut(Math.floor(i.div(r).toNumber())).mul(r)):l>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):n||(i=new ut(Math.floor(e)));var c=Math.floor((t-1)/2),d=zee(Dee(function(f){return i.add(new ut(f-c).mul(r)).toNumber()}),Tj);return d(0,t)}function Wz(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 ut(0),tickMin:new ut(0),tickMax:new ut(0)};var l=Xz(new ut(t).sub(e).div(n-1),r,i),c;e<=0&&t>=0?c=new ut(0):(c=new ut(e).add(t).div(2),c=c.sub(new ut(c).mod(l)));var d=Math.ceil(c.sub(e).div(l).toNumber()),f=Math.ceil(new ut(t).sub(c).div(l).toNumber()),h=d+f+1;return h>n?Wz(e,t,n,r,i+1):(h<n&&(f=t>0?f+(n-h):f,d=t>0?d:d+(n-h)),{step:l,tickMin:c.sub(new ut(d).mul(l)),tickMax:c.add(new ut(f).mul(l))})}function Xee(e){var t=Tu(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Math.max(i,2),d=Yz([n,r]),f=Tu(d,2),h=f[0],p=f[1];if(h===-1/0||p===1/0){var x=p===1/0?[h].concat(Cj(Tj(0,i-1).map(function(){return 1/0}))):[].concat(Cj(Tj(0,i-1).map(function(){return-1/0})),[p]);return n>r?Ej(x):x}if(h===p)return Yee(h,i,l);var y=Wz(h,p,c,l),j=y.step,w=y.tickMin,S=y.tickMax,v=mp.rangeStep(w,S.add(new ut(.1).mul(j)),j);return n>r?Ej(v):v}function Wee(e,t){var n=Tu(e,2),r=n[0],i=n[1],l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Yz([r,i]),d=Tu(c,2),f=d[0],h=d[1];if(f===-1/0||h===1/0)return[r,i];if(f===h)return[f];var p=Math.max(t,2),x=Xz(new ut(h).sub(f).div(p-1),l,0),y=[].concat(Cj(mp.rangeStep(new ut(f),new ut(h).sub(new ut(.99).mul(x)),x)),[h]);return r>i?Ej(y):y}var Zee=Gz(Xee),Qee=Gz(Wee),Jee="Invariant failed";function Ps(e,t){throw new Error(Jee)}var ete=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 im(){return im=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},im.apply(this,arguments)}function tte(e,t){return ite(e)||ate(e,t)||rte(e,t)||nte()}function nte(){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 rte(e,t){if(e){if(typeof e=="string")return i3(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 i3(e,t)}}function i3(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 ate(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function ite(e){if(Array.isArray(e))return e}function ste(e,t){if(e==null)return{};var n=ote(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ote(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cte(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,Jz(r.key),r)}}function ute(e,t,n){return t&&cte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dte(e,t,n){return t=sm(t),fte(e,Zz()?Reflect.construct(t,n||[],sm(e).constructor):t.apply(e,n))}function fte(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 hte(e)}function hte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zz=function(){return!!e})()}function sm(e){return sm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sm(e)}function mte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kj(e,t)}function kj(e,t){return kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kj(e,t)}function Qz(e,t,n){return t=Jz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jz(e){var t=pte(e,"string");return rl(t)=="symbol"?t:t+""}function pte(e,t){if(rl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dd=(function(e){function t(){return lte(this,t),dte(this,t,arguments)}return mte(t,e),ute(t,[{key:"render",value:function(){var r=this.props,i=r.offset,l=r.layout,c=r.width,d=r.dataKey,f=r.data,h=r.dataPointFormatter,p=r.xAxis,x=r.yAxis,y=ste(r,ete),j=je(y,!1);this.props.direction==="x"&&p.type!=="number"&&Ps();var w=f.map(function(S){var v=h(S,d),_=v.x,O=v.y,A=v.value,T=v.errorVal;if(!T)return null;var N=[],E,k;if(Array.isArray(T)){var R=tte(T,2);E=R[0],k=R[1]}else E=k=T;if(l==="vertical"){var L=p.scale,D=O+i,z=D+c,$=D-c,F=L(A-E),Y=L(A+k);N.push({x1:Y,y1:z,x2:Y,y2:$}),N.push({x1:F,y1:D,x2:Y,y2:D}),N.push({x1:F,y1:z,x2:F,y2:$})}else if(l==="horizontal"){var K=x.scale,B=_+i,H=B-c,Q=B+c,ie=K(A-E),ce=K(A+k);N.push({x1:H,y1:ce,x2:Q,y2:ce}),N.push({x1:B,y1:ie,x2:B,y2:ce}),N.push({x1:H,y1:ie,x2:Q,y2:ie})}return U.createElement(We,im({className:"recharts-errorBar",key:"bar-".concat(N.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},j),N.map(function(I){return U.createElement("line",im({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return U.createElement(We,{className:"recharts-errorBars"},w)}}])})(U.Component);Qz(dd,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Qz(dd,"displayName","ErrorBar");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 s3(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 ls(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s3(Object(n),!0).forEach(function(r){xte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xte(e,t,n){return t=yte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yte(e){var t=gte(e,"string");return Eu(t)=="symbol"?t:t+""}function gte(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)}var eL=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,l=t.legendContent,c=Yn(n,Vo);if(!c)return null;var d=Vo.defaultProps,f=d!==void 0?ls(ls({},d),c.props):{},h;return c.props&&c.props.payload?h=c.props&&c.props.payload:l==="children"?h=(r||[]).reduce(function(p,x){var y=x.item,j=x.props,w=j.sectors||j.data||[];return p.concat(w.map(function(S){return{type:c.props.iconType||y.props.legendType,value:S.name,color:S.fill,payload:S}}))},[]):h=(r||[]).map(function(p){var x=p.item,y=x.type.defaultProps,j=y!==void 0?ls(ls({},y),x.props):{},w=j.dataKey,S=j.name,v=j.legendType,_=j.hide;return{inactive:_,dataKey:w,type:f.iconType||v||"square",color:l2(x),value:S||w,payload:j}}),ls(ls(ls({},f),Vo.getWithHeight(c,i)),{},{payload:h,item:c})};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)}function o3(e){return wte(e)||jte(e)||bte(e)||vte()}function vte(){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 bte(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 jte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wte(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 l3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l3(Object(n),!0).forEach(function(r){Fo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fo(e,t,n){return t=Ste(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ste(e){var t=Nte(e,"string");return Cu(t)=="symbol"?t:t+""}function Nte(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 Yt(e,t,n){return Re(e)||Re(t)?n:Xt(t)?Qn(e,t,n):Te(t)?t(e):n}function au(e,t,n,r){var i=wee(e,function(d){return Yt(d,t)});if(n==="number"){var l=i.filter(function(d){return he(d)||parseFloat(d)});return l.length?[fp(l),dp(l)]:[1/0,-1/0]}var c=r?i.filter(function(d){return!Re(d)}):i;return c.map(function(d){return Xt(d)||d instanceof Date?d:""})}var Ate=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0,c=-1,d=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(d<=1)return 0;if(l&&l.axisType==="angleAxis"&&Math.abs(Math.abs(l.range[1]-l.range[0])-360)<=1e-6)for(var f=l.range,h=0;h<d;h++){var p=h>0?i[h-1].coordinate:i[d-1].coordinate,x=i[h].coordinate,y=h>=d-1?i[0].coordinate:i[h+1].coordinate,j=void 0;if(wn(x-p)!==wn(y-x)){var w=[];if(wn(y-x)===wn(f[1]-f[0])){j=y;var S=x+f[1]-f[0];w[0]=Math.min(S,(S+p)/2),w[1]=Math.max(S,(S+p)/2)}else{j=p;var v=y+f[1]-f[0];w[0]=Math.min(x,(v+x)/2),w[1]=Math.max(x,(v+x)/2)}var _=[Math.min(x,(j+x)/2),Math.max(x,(j+x)/2)];if(t>_[0]&&t<=_[1]||t>=w[0]&&t<=w[1]){c=i[h].index;break}}else{var O=Math.min(p,y),A=Math.max(p,y);if(t>(O+x)/2&&t<=(A+x)/2){c=i[h].index;break}}}else for(var T=0;T<d;T++)if(T===0&&t<=(r[T].coordinate+r[T+1].coordinate)/2||T>0&&T<d-1&&t>(r[T].coordinate+r[T-1].coordinate)/2&&t<=(r[T].coordinate+r[T+1].coordinate)/2||T===d-1&&t>(r[T].coordinate+r[T-1].coordinate)/2){c=r[T].index;break}return c},l2=function(t){var n,r=t,i=r.type.displayName,l=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,c=l.stroke,d=l.fill,f;switch(i){case"Line":f=c;break;case"Area":case"Radar":f=c&&c!=="none"?c:d;break;default:f=d;break}return f},_te=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,l=i===void 0?{}:i;if(!l)return{};for(var c={},d=Object.keys(l),f=0,h=d.length;f<h;f++)for(var p=l[d[f]].stackGroups,x=Object.keys(p),y=0,j=x.length;y<j;y++){var w=p[x[y]],S=w.items,v=w.cateAxisId,_=S.filter(function(k){return za(k.type).indexOf("Bar")>=0});if(_&&_.length){var O=_[0].type.defaultProps,A=O!==void 0?Pt(Pt({},O),_[0].props):_[0].props,T=A.barSize,N=A[v];c[N]||(c[N]=[]);var E=Re(T)?n:T;c[N].push({item:_[0],stackList:_.slice(1),barSize:Re(E)?void 0:Sn(E,r,0)})}}return c},Ote=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,l=t.sizeList,c=l===void 0?[]:l,d=t.maxBarSize,f=c.length;if(f<1)return null;var h=Sn(n,i,0,!0),p,x=[];if(c[0].barSize===+c[0].barSize){var y=!1,j=i/f,w=c.reduce(function(T,N){return T+N.barSize||0},0);w+=(f-1)*h,w>=i&&(w-=(f-1)*h,h=0),w>=i&&j>0&&(y=!0,j*=.9,w=f*j);var S=(i-w)/2>>0,v={offset:S-h,size:0};p=c.reduce(function(T,N){var E={item:N.item,position:{offset:v.offset+v.size+h,size:y?j:N.barSize}},k=[].concat(o3(T),[E]);return v=k[k.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(R){k.push({item:R,position:v})}),k},x)}else{var _=Sn(r,i,0,!0);i-2*_-(f-1)*h<=0&&(h=0);var O=(i-2*_-(f-1)*h)/f;O>1&&(O>>=0);var A=d===+d?Math.min(O,d):O;p=c.reduce(function(T,N,E){var k=[].concat(o3(T),[{item:N.item,position:{offset:_+(O+h)*E+(O-A)/2,size:A}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(R){k.push({item:R,position:k[k.length-1].position})}),k},x)}return p},Tte=function(t,n,r,i){var l=r.children,c=r.width,d=r.margin,f=c-(d.left||0)-(d.right||0),h=eL({children:l,legendWidth:f});if(h){var p=i||{},x=p.width,y=p.height,j=h.align,w=h.verticalAlign,S=h.layout;if((S==="vertical"||S==="horizontal"&&w==="middle")&&j!=="center"&&he(t[j]))return Pt(Pt({},t),{},Fo({},j,t[j]+(x||0)));if((S==="horizontal"||S==="vertical"&&j==="center")&&w!=="middle"&&he(t[w]))return Pt(Pt({},t),{},Fo({},w,t[w]+(y||0)))}return t},Ete=function(t,n,r){return Re(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},tL=function(t,n,r,i,l){var c=n.props.children,d=Jn(c,dd).filter(function(h){return Ete(i,l,h.props.direction)});if(d&&d.length){var f=d.map(function(h){return h.props.dataKey});return t.reduce(function(h,p){var x=Yt(p,r);if(Re(x))return h;var y=Array.isArray(x)?[fp(x),dp(x)]:[x,x],j=f.reduce(function(w,S){var v=Yt(p,S,0),_=y[0]-Math.abs(Array.isArray(v)?v[0]:v),O=y[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(_,w[0]),Math.max(O,w[1])]},[1/0,-1/0]);return[Math.min(j[0],h[0]),Math.max(j[1],h[1])]},[1/0,-1/0])}return null},Cte=function(t,n,r,i,l){var c=n.map(function(d){return tL(t,d,r,l,i)}).filter(function(d){return!Re(d)});return c&&c.length?c.reduce(function(d,f){return[Math.min(d[0],f[0]),Math.max(d[1],f[1])]},[1/0,-1/0]):null},nL=function(t,n,r,i,l){var c=n.map(function(f){var h=f.props.dataKey;return r==="number"&&h&&tL(t,f,h,i)||au(t,h,r,l)});if(r==="number")return c.reduce(function(f,h){return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);var d={};return c.reduce(function(f,h){for(var p=0,x=h.length;p<x;p++)d[h[p]]||(d[h[p]]=!0,f.push(h[p]));return f},[])},rL=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},aL=function(t,n,r,i){if(i)return t.map(function(f){return f.coordinate});var l,c,d=t.map(function(f){return f.coordinate===n&&(l=!0),f.coordinate===r&&(c=!0),f.coordinate});return l||d.push(n),c||d.push(r),d},Ra=function(t,n,r){if(!t)return null;var i=t.scale,l=t.duplicateDomain,c=t.type,d=t.range,f=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,h=(n||r)&&c==="category"&&i.bandwidth?i.bandwidth()/f:0;if(h=t.axisType==="angleAxis"&&(d==null?void 0:d.length)>=2?wn(d[0]-d[1])*2*h:h,n&&(t.ticks||t.niceTicks)){var p=(t.ticks||t.niceTicks).map(function(x){var y=l?l.indexOf(x):x;return{coordinate:i(y)+h,value:x,offset:h}});return p.filter(function(x){return!ad(x.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(x,y){return{coordinate:i(x)+h,value:x,index:y,offset:h}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(x){return{coordinate:i(x)+h,value:x,offset:h}}):i.domain().map(function(x,y){return{coordinate:i(x)+h,value:l?l[x]:x,index:y,offset:h}})},$0=new WeakMap,Jf=function(t,n){if(typeof n!="function")return t;$0.has(t)||$0.set(t,new WeakMap);var r=$0.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},iL=function(t,n,r){var i=t.scale,l=t.type,c=t.layout,d=t.axisType;if(i==="auto")return c==="radial"&&d==="radiusAxis"?{scale:wu(),realScaleType:"band"}:c==="radial"&&d==="angleAxis"?{scale:em(),realScaleType:"linear"}:l==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:ru(),realScaleType:"point"}:l==="category"?{scale:wu(),realScaleType:"band"}:{scale:em(),realScaleType:"linear"};if(Es(i)){var f="scale".concat(Wm(i));return{scale:(KP[f]||ru)(),realScaleType:KP[f]?f:"point"}}return Te(i)?{scale:i}:{scale:ru(),realScaleType:"point"}},c3=1e-4,sL=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),l=Math.min(i[0],i[1])-c3,c=Math.max(i[0],i[1])+c3,d=t(n[0]),f=t(n[r-1]);(d<l||d>c||f<l||f>c)&&t.domain([n[0],n[r-1]])}},Mte=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},kte=function(t,n){if(!n||n.length!==2||!he(n[0])||!he(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),l=[t[0],t[1]];return(!he(t[0])||t[0]<r)&&(l[0]=r),(!he(t[1])||t[1]>i)&&(l[1]=i),l[0]>i&&(l[0]=i),l[1]<r&&(l[1]=r),l},Pte=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var l=0,c=0,d=0;d<n;++d){var f=ad(t[d][r][1])?t[d][r][0]:t[d][r][1];f>=0?(t[d][r][0]=l,t[d][r][1]=l+f,l=t[d][r][1]):(t[d][r][0]=c,t[d][r][1]=c+f,c=t[d][r][1])}},Rte=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var l=0,c=0;c<n;++c){var d=ad(t[c][r][1])?t[c][r][0]:t[c][r][1];d>=0?(t[c][r][0]=l,t[c][r][1]=l+d,l=t[c][r][1]):(t[c][r][0]=0,t[c][r][1]=0)}},Dte={sign:Pte,expand:wY,none:Xo,silhouette:SY,wiggle:NY,positive:Rte},zte=function(t,n,r){var i=n.map(function(d){return d.props.dataKey}),l=Dte[r],c=jY().keys(i).value(function(d,f){return+Yt(d,f,0)}).order(lj).offset(l);return c(t)},Lte=function(t,n,r,i,l,c){if(!t)return null;var d=c?n.reverse():n,f={},h=d.reduce(function(x,y){var j,w=(j=y.type)!==null&&j!==void 0&&j.defaultProps?Pt(Pt({},y.type.defaultProps),y.props):y.props,S=w.stackId,v=w.hide;if(v)return x;var _=w[r],O=x[_]||{hasStack:!1,stackGroups:{}};if(Xt(S)){var A=O.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};A.items.push(y),O.hasStack=!0,O.stackGroups[S]=A}else O.stackGroups[kl("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[y]};return Pt(Pt({},x),{},Fo({},_,O))},f),p={};return Object.keys(h).reduce(function(x,y){var j=h[y];if(j.hasStack){var w={};j.stackGroups=Object.keys(j.stackGroups).reduce(function(S,v){var _=j.stackGroups[v];return Pt(Pt({},S),{},Fo({},v,{numericAxisId:r,cateAxisId:i,items:_.items,stackedData:zte(t,_.items,l)}))},w)}return Pt(Pt({},x),{},Fo({},y,j))},p)},oL=function(t,n){var r=n.realScaleType,i=n.type,l=n.tickCount,c=n.originalDomain,d=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(l&&i==="number"&&c&&(c[0]==="auto"||c[1]==="auto")){var h=t.domain();if(!h.length)return null;var p=Zee(h,l,d);return t.domain([fp(p),dp(p)]),{niceTicks:p}}if(l&&i==="number"){var x=t.domain(),y=Qee(x,l,d);return{niceTicks:y}}return null};function u3(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,l=e.index,c=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Re(i[t.dataKey])){var d=Dh(n,"value",i[t.dataKey]);if(d)return d.coordinate+r/2}return n[l]?n[l].coordinate+r/2:null}var f=Yt(i,Re(c)?t.dataKey:c);return Re(f)?null:t.scale(f)}var d3=function(t){var n=t.axis,r=t.ticks,i=t.offset,l=t.bandSize,c=t.entry,d=t.index;if(n.type==="category")return r[d]?r[d].coordinate+i:null;var f=Yt(c,n.dataKey,n.domain[d]);return Re(f)?null:n.scale(f)-l/2+i},$te=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),l=Math.max(r[0],r[1]);return i<=0&&l>=0?0:l<0?l:i}return r[0]},Bte=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,l=i.stackId;if(Xt(l)){var c=n[l];if(c){var d=c.items.indexOf(t);return d>=0?c.stackedData[d]:null}}return null},Ite=function(t){return t.reduce(function(n,r){return[fp(r.concat([n[0]]).filter(he)),dp(r.concat([n[1]]).filter(he))]},[1/0,-1/0])},lL=function(t,n,r){return Object.keys(t).reduce(function(i,l){var c=t[l],d=c.stackedData,f=d.reduce(function(h,p){var x=Ite(p.slice(n,r+1));return[Math.min(h[0],x[0]),Math.max(h[1],x[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},f3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,h3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Rj=function(t,n,r){if(Te(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(he(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(f3.test(t[0])){var l=+f3.exec(t[0])[1];i[0]=n[0]-l}else Te(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(he(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(h3.test(t[1])){var c=+h3.exec(t[1])[1];i[1]=n[1]+c}else Te(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},om=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 l=zS(n,function(x){return x.coordinate}),c=1/0,d=1,f=l.length;d<f;d++){var h=l[d],p=l[d-1];c=Math.min((h.coordinate||0)-(p.coordinate||0),c)}return c===1/0?0:c}return r?void 0:0},m3=function(t,n,r){return!t||!t.length||ud(t,Qn(r,"type.defaultProps.domain"))?n:t},cL=function(t,n){var r=t.type.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,l=r.name,c=r.unit,d=r.formatter,f=r.tooltipType,h=r.chartType,p=r.hide;return Pt(Pt({},je(t,!1)),{},{dataKey:i,unit:c,formatter:d,name:l||i,color:l2(t),value:Yt(n,i),type:f,payload:n,chartType:h,hide:p})};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 p3(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 Ea(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p3(Object(n),!0).forEach(function(r){uL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uL(e,t,n){return t=qte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qte(e){var t=Ute(e,"string");return Mu(t)=="symbol"?t:t+""}function Ute(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 Vte(e,t){return Kte(e)||Gte(e,t)||Fte(e,t)||Hte()}function Hte(){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 Fte(e,t){if(e){if(typeof e=="string")return x3(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 x3(e,t)}}function x3(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 Gte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Kte(e){if(Array.isArray(e))return e}var lm=Math.PI/180,Yte=function(t){return t*180/Math.PI},yt=function(t,n,r,i){return{x:t+Math.cos(-lm*i)*r,y:n+Math.sin(-lm*i)*r}},dL=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},Xte=function(t,n,r,i,l){var c=t.width,d=t.height,f=t.startAngle,h=t.endAngle,p=Sn(t.cx,c,c/2),x=Sn(t.cy,d,d/2),y=dL(c,d,r),j=Sn(t.innerRadius,y,0),w=Sn(t.outerRadius,y,y*.8),S=Object.keys(n);return S.reduce(function(v,_){var O=n[_],A=O.domain,T=O.reversed,N;if(Re(O.range))i==="angleAxis"?N=[f,h]:i==="radiusAxis"&&(N=[j,w]),T&&(N=[N[1],N[0]]);else{N=O.range;var E=N,k=Vte(E,2);f=k[0],h=k[1]}var R=iL(O,l),L=R.realScaleType,D=R.scale;D.domain(A).range(N),sL(D);var z=oL(D,Ea(Ea({},O),{},{realScaleType:L})),$=Ea(Ea(Ea({},O),z),{},{range:N,radius:w,realScaleType:L,scale:D,cx:p,cy:x,innerRadius:j,outerRadius:w,startAngle:f,endAngle:h});return Ea(Ea({},v),{},uL({},_,$))},{})},Wte=function(t,n){var r=t.x,i=t.y,l=n.x,c=n.y;return Math.sqrt(Math.pow(r-l,2)+Math.pow(i-c,2))},Zte=function(t,n){var r=t.x,i=t.y,l=n.cx,c=n.cy,d=Wte({x:r,y:i},{x:l,y:c});if(d<=0)return{radius:d};var f=(r-l)/d,h=Math.acos(f);return i>c&&(h=2*Math.PI-h),{radius:d,angle:Yte(h),angleInRadian:h}},Qte=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),l=Math.floor(r/360),c=Math.min(i,l);return{startAngle:n-c*360,endAngle:r-c*360}},Jte=function(t,n){var r=n.startAngle,i=n.endAngle,l=Math.floor(r/360),c=Math.floor(i/360),d=Math.min(l,c);return t+d*360},y3=function(t,n){var r=t.x,i=t.y,l=Zte({x:r,y:i},n),c=l.radius,d=l.angle,f=n.innerRadius,h=n.outerRadius;if(c<f||c>h)return!1;if(c===0)return!0;var p=Qte(n),x=p.startAngle,y=p.endAngle,j=d,w;if(x<=y){for(;j>y;)j-=360;for(;j<x;)j+=360;w=j>=x&&j<=y}else{for(;j>x;)j-=360;for(;j<y;)j+=360;w=j>=y&&j<=x}return w?Ea(Ea({},n),{},{radius:c,angle:Jte(j,n)}):null},fL=function(t){return!M.isValidElement(t)&&!Te(t)&&typeof t!="boolean"?t.className:""};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)}var ene=["offset"];function tne(e){return ine(e)||ane(e)||rne(e)||nne()}function nne(){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 rne(e,t){if(e){if(typeof e=="string")return Dj(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 Dj(e,t)}}function ane(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ine(e){if(Array.isArray(e))return Dj(e)}function Dj(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 sne(e,t){if(e==null)return{};var n=one(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function one(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 g3(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 Gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g3(Object(n),!0).forEach(function(r){lne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lne(e,t,n){return t=cne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cne(e){var t=une(e,"string");return ku(t)=="symbol"?t:t+""}function une(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 Pu(){return Pu=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},Pu.apply(this,arguments)}var dne=function(t){var n=t.value,r=t.formatter,i=Re(t.children)?n:t.children;return Te(r)?r(i):i},fne=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},hne=function(t,n,r){var i=t.position,l=t.viewBox,c=t.offset,d=t.className,f=l,h=f.cx,p=f.cy,x=f.innerRadius,y=f.outerRadius,j=f.startAngle,w=f.endAngle,S=f.clockWise,v=(x+y)/2,_=fne(j,w),O=_>=0?1:-1,A,T;i==="insideStart"?(A=j+O*c,T=S):i==="insideEnd"?(A=w-O*c,T=!S):i==="end"&&(A=w+O*c,T=S),T=_<=0?T:!T;var N=yt(h,p,v,A),E=yt(h,p,v,A+(T?1:-1)*359),k="M".concat(N.x,",").concat(N.y,`
A`).concat(v,",").concat(v,",0,1,").concat(T?0:1,`,
`).concat(E.x,",").concat(E.y),R=Re(t.id)?kl("recharts-radial-line-"):t.id;return U.createElement("text",Pu({},r,{dominantBaseline:"central",className:ze("recharts-radial-bar-label",d)}),U.createElement("defs",null,U.createElement("path",{id:R,d:k})),U.createElement("textPath",{xlinkHref:"#".concat(R)},n))},mne=function(t){var n=t.viewBox,r=t.offset,i=t.position,l=n,c=l.cx,d=l.cy,f=l.innerRadius,h=l.outerRadius,p=l.startAngle,x=l.endAngle,y=(p+x)/2;if(i==="outside"){var j=yt(c,d,h+r,y),w=j.x,S=j.y;return{x:w,y:S,textAnchor:w>=c?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"end"};var v=(f+h)/2,_=yt(c,d,v,y),O=_.x,A=_.y;return{x:O,y:A,textAnchor:"middle",verticalAnchor:"middle"}},pne=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,l=t.position,c=n,d=c.x,f=c.y,h=c.width,p=c.height,x=p>=0?1:-1,y=x*i,j=x>0?"end":"start",w=x>0?"start":"end",S=h>=0?1:-1,v=S*i,_=S>0?"end":"start",O=S>0?"start":"end";if(l==="top"){var A={x:d+h/2,y:f-x*i,textAnchor:"middle",verticalAnchor:j};return Gt(Gt({},A),r?{height:Math.max(f-r.y,0),width:h}:{})}if(l==="bottom"){var T={x:d+h/2,y:f+p+y,textAnchor:"middle",verticalAnchor:w};return Gt(Gt({},T),r?{height:Math.max(r.y+r.height-(f+p),0),width:h}:{})}if(l==="left"){var N={x:d-v,y:f+p/2,textAnchor:_,verticalAnchor:"middle"};return Gt(Gt({},N),r?{width:Math.max(N.x-r.x,0),height:p}:{})}if(l==="right"){var E={x:d+h+v,y:f+p/2,textAnchor:O,verticalAnchor:"middle"};return Gt(Gt({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:p}:{})}var k=r?{width:h,height:p}:{};return l==="insideLeft"?Gt({x:d+v,y:f+p/2,textAnchor:O,verticalAnchor:"middle"},k):l==="insideRight"?Gt({x:d+h-v,y:f+p/2,textAnchor:_,verticalAnchor:"middle"},k):l==="insideTop"?Gt({x:d+h/2,y:f+y,textAnchor:"middle",verticalAnchor:w},k):l==="insideBottom"?Gt({x:d+h/2,y:f+p-y,textAnchor:"middle",verticalAnchor:j},k):l==="insideTopLeft"?Gt({x:d+v,y:f+y,textAnchor:O,verticalAnchor:w},k):l==="insideTopRight"?Gt({x:d+h-v,y:f+y,textAnchor:_,verticalAnchor:w},k):l==="insideBottomLeft"?Gt({x:d+v,y:f+p-y,textAnchor:O,verticalAnchor:j},k):l==="insideBottomRight"?Gt({x:d+h-v,y:f+p-y,textAnchor:_,verticalAnchor:j},k):Ml(l)&&(he(l.x)||vs(l.x))&&(he(l.y)||vs(l.y))?Gt({x:d+Sn(l.x,h),y:f+Sn(l.y,p),textAnchor:"end",verticalAnchor:"end"},k):Gt({x:d+h/2,y:f+p/2,textAnchor:"middle",verticalAnchor:"middle"},k)},xne=function(t){return"cx"in t&&he(t.cx)};function en(e){var t=e.offset,n=t===void 0?5:t,r=sne(e,ene),i=Gt({offset:n},r),l=i.viewBox,c=i.position,d=i.value,f=i.children,h=i.content,p=i.className,x=p===void 0?"":p,y=i.textBreakAll;if(!l||Re(d)&&Re(f)&&!M.isValidElement(h)&&!Te(h))return null;if(M.isValidElement(h))return M.cloneElement(h,i);var j;if(Te(h)){if(j=M.createElement(h,i),M.isValidElement(j))return j}else j=dne(i);var w=xne(l),S=je(i,!0);if(w&&(c==="insideStart"||c==="insideEnd"||c==="end"))return hne(i,j,S);var v=w?mne(i):pne(i);return U.createElement(Ms,Pu({className:ze("recharts-label",x)},S,v,{breakAll:y}),j)}en.displayName="Label";var hL=function(t){var n=t.cx,r=t.cy,i=t.angle,l=t.startAngle,c=t.endAngle,d=t.r,f=t.radius,h=t.innerRadius,p=t.outerRadius,x=t.x,y=t.y,j=t.top,w=t.left,S=t.width,v=t.height,_=t.clockWise,O=t.labelViewBox;if(O)return O;if(he(S)&&he(v)){if(he(x)&&he(y))return{x,y,width:S,height:v};if(he(j)&&he(w))return{x:j,y:w,width:S,height:v}}return he(x)&&he(y)?{x,y,width:0,height:0}:he(n)&&he(r)?{cx:n,cy:r,startAngle:l||i||0,endAngle:c||i||0,innerRadius:h||0,outerRadius:p||f||d||0,clockWise:_}:t.viewBox?t.viewBox:{}},yne=function(t,n){return t?t===!0?U.createElement(en,{key:"label-implicit",viewBox:n}):Xt(t)?U.createElement(en,{key:"label-implicit",viewBox:n,value:t}):M.isValidElement(t)?t.type===en?M.cloneElement(t,{key:"label-implicit",viewBox:n}):U.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Te(t)?U.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Ml(t)?U.createElement(en,Pu({viewBox:n},t,{key:"label-implicit"})):null:null},gne=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,l=hL(t),c=Jn(i,en).map(function(f,h){return M.cloneElement(f,{viewBox:n||l,key:"label-".concat(h)})});if(!r)return c;var d=yne(t.label,n||l);return[d].concat(tne(c))};en.parseViewBox=hL;en.renderCallByParent=gne;var B0,v3;function vne(){if(v3)return B0;v3=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return B0=e,B0}var bne=vne();const jne=st(bne);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)}var wne=["valueAccessor"],Sne=["data","dataKey","clockWise","id","textBreakAll"];function Nne(e){return Tne(e)||One(e)||_ne(e)||Ane()}function Ane(){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 _ne(e,t){if(e){if(typeof e=="string")return zj(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 zj(e,t)}}function One(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tne(e){if(Array.isArray(e))return zj(e)}function zj(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 cm(){return cm=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},cm.apply(this,arguments)}function b3(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 j3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b3(Object(n),!0).forEach(function(r){Ene(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ene(e,t,n){return t=Cne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cne(e){var t=Mne(e,"string");return Ru(t)=="symbol"?t:t+""}function Mne(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)}function w3(e,t){if(e==null)return{};var n=kne(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kne(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 Pne=function(t){return Array.isArray(t.value)?jne(t.value):t.value};function $a(e){var t=e.valueAccessor,n=t===void 0?Pne:t,r=w3(e,wne),i=r.data,l=r.dataKey,c=r.clockWise,d=r.id,f=r.textBreakAll,h=w3(r,Sne);return!i||!i.length?null:U.createElement(We,{className:"recharts-label-list"},i.map(function(p,x){var y=Re(l)?n(p,x):Yt(p&&p.payload,l),j=Re(d)?{}:{id:"".concat(d,"-").concat(x)};return U.createElement(en,cm({},je(p,!0),h,j,{parentViewBox:p.parentViewBox,value:y,textBreakAll:f,viewBox:en.parseViewBox(Re(c)?p:j3(j3({},p),{},{clockWise:c})),key:"label-".concat(x),index:x}))}))}$a.displayName="LabelList";function Rne(e,t){return e?e===!0?U.createElement($a,{key:"labelList-implicit",data:t}):U.isValidElement(e)||Te(e)?U.createElement($a,{key:"labelList-implicit",data:t,content:e}):Ml(e)?U.createElement($a,cm({data:t},e,{key:"labelList-implicit"})):null:null}function Dne(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=Jn(r,$a).map(function(c,d){return M.cloneElement(c,{data:t,key:"labelList-".concat(d)})});if(!n)return i;var l=Rne(e.label,t);return[l].concat(Nne(i))}$a.renderCallByParent=Dne;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 Lj(){return Lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lj.apply(this,arguments)}function S3(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 N3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S3(Object(n),!0).forEach(function(r){zne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zne(e,t,n){return t=Lne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lne(e){var t=$ne(e,"string");return Du(t)=="symbol"?t:t+""}function $ne(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bne=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},eh=function(t){var n=t.cx,r=t.cy,i=t.radius,l=t.angle,c=t.sign,d=t.isExternal,f=t.cornerRadius,h=t.cornerIsExternal,p=f*(d?1:-1)+i,x=Math.asin(f/p)/lm,y=h?l:l+c*x,j=yt(n,r,p,y),w=yt(n,r,i,y),S=h?l-c*x:l,v=yt(n,r,p*Math.cos(x*lm),S);return{center:j,circleTangency:w,lineTangency:v,theta:x}},mL=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,l=t.outerRadius,c=t.startAngle,d=t.endAngle,f=Bne(c,d),h=c+f,p=yt(n,r,l,c),x=yt(n,r,l,h),y="M ".concat(p.x,",").concat(p.y,`
A `).concat(l,",").concat(l,`,0,
`).concat(+(Math.abs(f)>180),",").concat(+(c>h),`,
`).concat(x.x,",").concat(x.y,`
`);if(i>0){var j=yt(n,r,i,c),w=yt(n,r,i,h);y+="L ".concat(w.x,",").concat(w.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(f)>180),",").concat(+(c<=h),`,
`).concat(j.x,",").concat(j.y," Z")}else y+="L ".concat(n,",").concat(r," Z");return y},Ine=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,l=t.outerRadius,c=t.cornerRadius,d=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,x=wn(p-h),y=eh({cx:n,cy:r,radius:l,angle:h,sign:x,cornerRadius:c,cornerIsExternal:f}),j=y.circleTangency,w=y.lineTangency,S=y.theta,v=eh({cx:n,cy:r,radius:l,angle:p,sign:-x,cornerRadius:c,cornerIsExternal:f}),_=v.circleTangency,O=v.lineTangency,A=v.theta,T=f?Math.abs(h-p):Math.abs(h-p)-S-A;if(T<0)return d?"M ".concat(w.x,",").concat(w.y,`
a`).concat(c,",").concat(c,",0,0,1,").concat(c*2,`,0
a`).concat(c,",").concat(c,",0,0,1,").concat(-c*2,`,0
`):mL({cx:n,cy:r,innerRadius:i,outerRadius:l,startAngle:h,endAngle:p});var N="M ".concat(w.x,",").concat(w.y,`
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(j.x,",").concat(j.y,`
A`).concat(l,",").concat(l,",0,").concat(+(T>180),",").concat(+(x<0),",").concat(_.x,",").concat(_.y,`
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(O.x,",").concat(O.y,`
`);if(i>0){var E=eh({cx:n,cy:r,radius:i,angle:h,sign:x,isExternal:!0,cornerRadius:c,cornerIsExternal:f}),k=E.circleTangency,R=E.lineTangency,L=E.theta,D=eh({cx:n,cy:r,radius:i,angle:p,sign:-x,isExternal:!0,cornerRadius:c,cornerIsExternal:f}),z=D.circleTangency,$=D.lineTangency,F=D.theta,Y=f?Math.abs(h-p):Math.abs(h-p)-L-F;if(Y<0&&c===0)return"".concat(N,"L").concat(n,",").concat(r,"Z");N+="L".concat($.x,",").concat($.y,`
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(z.x,",").concat(z.y,`
A`).concat(i,",").concat(i,",0,").concat(+(Y>180),",").concat(+(x>0),",").concat(k.x,",").concat(k.y,`
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(R.x,",").concat(R.y,"Z")}else N+="L".concat(n,",").concat(r,"Z");return N},qne={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},pL=function(t){var n=N3(N3({},qne),t),r=n.cx,i=n.cy,l=n.innerRadius,c=n.outerRadius,d=n.cornerRadius,f=n.forceCornerRadius,h=n.cornerIsExternal,p=n.startAngle,x=n.endAngle,y=n.className;if(c<l||p===x)return null;var j=ze("recharts-sector",y),w=c-l,S=Sn(d,w,0,!0),v;return S>0&&Math.abs(p-x)<360?v=Ine({cx:r,cy:i,innerRadius:l,outerRadius:c,cornerRadius:Math.min(S,w/2),forceCornerRadius:f,cornerIsExternal:h,startAngle:p,endAngle:x}):v=mL({cx:r,cy:i,innerRadius:l,outerRadius:c,startAngle:p,endAngle:x}),U.createElement("path",Lj({},je(n,!0),{className:j,d:v,role:"img"}))};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 $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 A3(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 _3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A3(Object(n),!0).forEach(function(r){Une(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Une(e,t,n){return t=Vne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vne(e){var t=Hne(e,"string");return zu(t)=="symbol"?t:t+""}function Hne(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 O3={curveBasisClosed:uY,curveBasisOpen:dY,curveBasis:cY,curveBumpX:XK,curveBumpY:WK,curveLinearClosed:fY,curveLinear:Qm,curveMonotoneX:hY,curveMonotoneY:mY,curveNatural:pY,curveStep:xY,curveStepAfter:gY,curveStepBefore:yY},th=function(t){return t.x===+t.x&&t.y===+t.y},Vc=function(t){return t.x},Hc=function(t){return t.y},Fne=function(t,n){if(Te(t))return t;var r="curve".concat(Wm(t));return(r==="curveMonotone"||r==="curveBump")&&n?O3["".concat(r).concat(n==="vertical"?"Y":"X")]:O3[r]||Qm},Gne=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,l=i===void 0?[]:i,c=t.baseLine,d=t.layout,f=t.connectNulls,h=f===void 0?!1:f,p=Fne(r,d),x=h?l.filter(function(S){return th(S)}):l,y;if(Array.isArray(c)){var j=h?c.filter(function(S){return th(S)}):c,w=x.map(function(S,v){return _3(_3({},S),{},{base:j[v]})});return d==="vertical"?y=Gf().y(Hc).x1(Vc).x0(function(S){return S.base.x}):y=Gf().x(Vc).y1(Hc).y0(function(S){return S.base.y}),y.defined(th).curve(p),y(w)}return d==="vertical"&&he(c)?y=Gf().y(Hc).x1(Vc).x0(c):he(c)?y=Gf().x(Vc).y1(Hc).y0(c):y=m6().x(Vc).y(Hc),y.defined(th).curve(p),y(x)},um=function(t){var n=t.className,r=t.points,i=t.path,l=t.pathRef;if((!r||!r.length)&&!i)return null;var c=r&&r.length?Gne(t):i;return M.createElement("path",$j({},je(t,!1),zh(t),{className:ze("recharts-curve",n),d:c,ref:l}))},I0={exports:{}},q0,T3;function Kne(){if(T3)return q0;T3=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return q0=e,q0}var U0,E3;function Yne(){if(E3)return U0;E3=1;var e=Kne();function t(){}function n(){}return n.resetWarningCache=t,U0=function(){function r(c,d,f,h,p,x){if(x!==e){var y=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 y.name="Invariant Violation",y}}r.isRequired=r;function i(){return r}var l={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 l.PropTypes=l,l},U0}var C3;function Xne(){return C3||(C3=1,I0.exports=Yne()()),I0.exports}var Wne=Xne();const nt=st(Wne),{getOwnPropertyNames:Zne,getOwnPropertySymbols:Qne}=Object,{hasOwnProperty:Jne}=Object.prototype;function V0(e,t){return function(r,i,l){return e(r,i,l)&&t(r,i,l)}}function nh(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:l}=i,c=l.get(n),d=l.get(r);if(c&&d)return c===r&&d===n;l.set(n,r),l.set(r,n);const f=e(n,r,i);return l.delete(n),l.delete(r),f}}function ere(e){return e!=null?e[Symbol.toStringTag]:void 0}function M3(e){return Zne(e).concat(Qne(e))}const tre=Object.hasOwn||((e,t)=>Jne.call(e,t));function Is(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const nre="__v",rre="__o",are="_owner",{getOwnPropertyDescriptor:k3,keys:P3}=Object;function ire(e,t){return e.byteLength===t.byteLength&&dm(new Uint8Array(e),new Uint8Array(t))}function sre(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 ore(e,t){return e.byteLength===t.byteLength&&dm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function lre(e,t){return Is(e.getTime(),t.getTime())}function cre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ure(e,t){return e===t}function R3(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),l=e.entries();let c,d,f=0;for(;(c=l.next())&&!c.done;){const h=t.entries();let p=!1,x=0;for(;(d=h.next())&&!d.done;){if(i[x]){x++;continue}const y=c.value,j=d.value;if(n.equals(y[0],j[0],f,x,e,t,n)&&n.equals(y[1],j[1],y[0],j[0],e,t,n)){p=i[x]=!0;break}x++}if(!p)return!1;f++}return!0}const dre=Is;function fre(e,t,n){const r=P3(e);let i=r.length;if(P3(t).length!==i)return!1;for(;i-- >0;)if(!xL(e,t,n,r[i]))return!1;return!0}function Fc(e,t,n){const r=M3(e);let i=r.length;if(M3(t).length!==i)return!1;let l,c,d;for(;i-- >0;)if(l=r[i],!xL(e,t,n,l)||(c=k3(e,l),d=k3(t,l),(c||d)&&(!c||!d||c.configurable!==d.configurable||c.enumerable!==d.enumerable||c.writable!==d.writable)))return!1;return!0}function hre(e,t){return Is(e.valueOf(),t.valueOf())}function mre(e,t){return e.source===t.source&&e.flags===t.flags}function D3(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),l=e.values();let c,d;for(;(c=l.next())&&!c.done;){const f=t.values();let h=!1,p=0;for(;(d=f.next())&&!d.done;){if(!i[p]&&n.equals(c.value,d.value,c.value,d.value,e,t,n)){h=i[p]=!0;break}p++}if(!h)return!1}return!0}function dm(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 pre(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 xL(e,t,n,r){return(r===are||r===rre||r===nre)&&(e.$$typeof||t.$$typeof)?!0:tre(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const xre="[object ArrayBuffer]",yre="[object Arguments]",gre="[object Boolean]",vre="[object DataView]",bre="[object Date]",jre="[object Error]",wre="[object Map]",Sre="[object Number]",Nre="[object Object]",Are="[object RegExp]",_re="[object Set]",Ore="[object String]",Tre={"[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},Ere="[object URL]",Cre=Object.prototype.toString;function Mre({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:l,areMapsEqual:c,areNumbersEqual:d,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:p,areSetsEqual:x,areTypedArraysEqual:y,areUrlsEqual:j,unknownTagComparators:w}){return function(v,_,O){if(v===_)return!0;if(v==null||_==null)return!1;const A=typeof v;if(A!==typeof _)return!1;if(A!=="object")return A==="number"?d(v,_,O):A==="function"?l(v,_,O):!1;const T=v.constructor;if(T!==_.constructor)return!1;if(T===Object)return f(v,_,O);if(Array.isArray(v))return t(v,_,O);if(T===Date)return r(v,_,O);if(T===RegExp)return p(v,_,O);if(T===Map)return c(v,_,O);if(T===Set)return x(v,_,O);const N=Cre.call(v);if(N===bre)return r(v,_,O);if(N===Are)return p(v,_,O);if(N===wre)return c(v,_,O);if(N===_re)return x(v,_,O);if(N===Nre)return typeof v.then!="function"&&typeof _.then!="function"&&f(v,_,O);if(N===Ere)return j(v,_,O);if(N===jre)return i(v,_,O);if(N===yre)return f(v,_,O);if(Tre[N])return y(v,_,O);if(N===xre)return e(v,_,O);if(N===vre)return n(v,_,O);if(N===gre||N===Sre||N===Ore)return h(v,_,O);if(w){let E=w[N];if(!E){const k=ere(v);k&&(E=w[k])}if(E)return E(v,_,O)}return!1}}function kre({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:ire,areArraysEqual:n?Fc:sre,areDataViewsEqual:ore,areDatesEqual:lre,areErrorsEqual:cre,areFunctionsEqual:ure,areMapsEqual:n?V0(R3,Fc):R3,areNumbersEqual:dre,areObjectsEqual:n?Fc:fre,arePrimitiveWrappersEqual:hre,areRegExpsEqual:mre,areSetsEqual:n?V0(D3,Fc):D3,areTypedArraysEqual:n?V0(dm,Fc):dm,areUrlsEqual:pre,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=nh(r.areArraysEqual),l=nh(r.areMapsEqual),c=nh(r.areObjectsEqual),d=nh(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:d})}return r}function Pre(e){return function(t,n,r,i,l,c,d){return e(t,n,d)}}function Rre({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(d,f){const{cache:h=e?new WeakMap:void 0,meta:p}=n();return t(d,f,{cache:h,equals:r,meta:p,strict:i})};if(e)return function(d,f){return t(d,f,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const l={cache:void 0,equals:r,meta:void 0,strict:i};return function(d,f){return t(d,f,l)}}const Dre=Ui();Ui({strict:!0});Ui({circular:!0});Ui({circular:!0,strict:!0});Ui({createInternalComparator:()=>Is});Ui({strict:!0,createInternalComparator:()=>Is});Ui({circular:!0,createInternalComparator:()=>Is});Ui({circular:!0,createInternalComparator:()=>Is,strict:!0});function Ui(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,l=kre(e),c=Mre(l),d=n?n(c):Pre(c);return Rre({circular:t,comparator:c,createState:r,equals:d,strict:i})}function zre(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function z3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(l){n<0&&(n=l),l-n>t?(e(l),n=-1):zre(i)};requestAnimationFrame(r)}function Bj(e){"@babel/helpers - typeof";return Bj=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},Bj(e)}function Lre(e){return qre(e)||Ire(e)||Bre(e)||$re()}function $re(){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 Bre(e,t){if(e){if(typeof e=="string")return L3(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 L3(e,t)}}function L3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ire(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qre(e){if(Array.isArray(e))return e}function Ure(){var e={},t=function(){return null},n=!1,r=function i(l){if(!n){if(Array.isArray(l)){if(!l.length)return;var c=l,d=Lre(c),f=d[0],h=d.slice(1);if(typeof f=="number"){z3(i.bind(null,h),f);return}i(f),z3(i.bind(null,h));return}Bj(l)==="object"&&(e=l,t(e)),typeof l=="function"&&l()}};return{stop:function(){n=!0},start:function(l){n=!1,r(l)},subscribe:function(l){return t=l,function(){t=function(){return 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 $3(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 B3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$3(Object(n),!0).forEach(function(r){yL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yL(e,t,n){return t=Vre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vre(e){var t=Hre(e,"string");return Lu(t)==="symbol"?t:String(t)}function Hre(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)}var Fre=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(l){return i.includes(l)})})},Gre=function(t){return t},Kre=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},iu=function(t,n){return Object.keys(n).reduce(function(r,i){return B3(B3({},r),{},yL({},i,t(i,n[i])))},{})},I3=function(t,n,r){return t.map(function(i){return"".concat(Kre(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Yre(e,t){return Zre(e)||Wre(e,t)||gL(e,t)||Xre()}function Xre(){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 Wre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Zre(e){if(Array.isArray(e))return e}function Qre(e){return tae(e)||eae(e)||gL(e)||Jre()}function Jre(){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 gL(e,t){if(e){if(typeof e=="string")return Ij(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ij(e,t)}}function eae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tae(e){if(Array.isArray(e))return Ij(e)}function Ij(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fm=1e-4,vL=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},bL=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},q3=function(t,n){return function(r){var i=vL(t,n);return bL(i,r)}},nae=function(t,n){return function(r){var i=vL(t,n),l=[].concat(Qre(i.map(function(c,d){return c*d}).slice(1)),[0]);return bL(l,r)}},U3=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],l=n[1],c=n[2],d=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,l=0,c=1,d=1;break;case"ease":i=.25,l=.1,c=.25,d=1;break;case"ease-in":i=.42,l=0,c=1,d=1;break;case"ease-out":i=.42,l=0,c=.58,d=1;break;case"ease-in-out":i=0,l=0,c=.58,d=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var h=f[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),p=Yre(h,4);i=p[0],l=p[1],c=p[2],d=p[3]}}}var x=q3(i,c),y=q3(l,d),j=nae(i,c),w=function(_){return _>1?1:_<0?0:_},S=function(_){for(var O=_>1?1:_,A=O,T=0;T<8;++T){var N=x(A)-O,E=j(A);if(Math.abs(N-O)<fm||E<fm)return y(A);A=w(A-N/E)}return y(A)};return S.isStepper=!1,S},rae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,l=i===void 0?8:i,c=t.dt,d=c===void 0?17:c,f=function(p,x,y){var j=-(p-x)*r,w=y*l,S=y+(j-w)*d/1e3,v=y*d/1e3+p;return Math.abs(v-x)<fm&&Math.abs(S)<fm?[x,0]:[v,S]};return f.isStepper=!0,f.dt=d,f},aae=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 U3(i);case"spring":return rae();default:if(i.split("(")[0]==="cubic-bezier")return U3(i)}return typeof i=="function"?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)}function V3(e){return oae(e)||sae(e)||jL(e)||iae()}function iae(){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 sae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oae(e){if(Array.isArray(e))return Uj(e)}function H3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H3(Object(n),!0).forEach(function(r){qj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qj(e,t,n){return t=lae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lae(e){var t=cae(e,"string");return $u(t)==="symbol"?t:String(t)}function cae(e,t){if($u(e)!=="object"||e===null)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 uae(e,t){return hae(e)||fae(e,t)||jL(e,t)||dae()}function dae(){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 jL(e,t){if(e){if(typeof e=="string")return Uj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uj(e,t)}}function Uj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function hae(e){if(Array.isArray(e))return e}var hm=function(t,n,r){return t+(n-t)*r},Vj=function(t){var n=t.from,r=t.to;return n!==r},mae=function e(t,n,r){var i=iu(function(l,c){if(Vj(c)){var d=t(c.from,c.to,c.velocity),f=uae(d,2),h=f[0],p=f[1];return ln(ln({},c),{},{from:h,velocity:p})}return c},n);return r<1?iu(function(l,c){return Vj(c)?ln(ln({},c),{},{velocity:hm(c.velocity,i[l].velocity,r),from:hm(c.from,i[l].from,r)}):c},n):e(t,i,r-1)};const pae=(function(e,t,n,r,i){var l=Fre(e,t),c=l.reduce(function(v,_){return ln(ln({},v),{},qj({},_,[e[_],t[_]]))},{}),d=l.reduce(function(v,_){return ln(ln({},v),{},qj({},_,{from:e[_],velocity:0,to:t[_]}))},{}),f=-1,h,p,x=function(){return null},y=function(){return iu(function(_,O){return O.from},d)},j=function(){return!Object.values(d).filter(Vj).length},w=function(_){h||(h=_);var O=_-h,A=O/n.dt;d=mae(n,d,A),i(ln(ln(ln({},e),t),y())),h=_,j()||(f=requestAnimationFrame(x))},S=function(_){p||(p=_);var O=(_-p)/r,A=iu(function(N,E){return hm.apply(void 0,V3(E).concat([n(O)]))},c);if(i(ln(ln(ln({},e),t),A)),O<1)f=requestAnimationFrame(x);else{var T=iu(function(N,E){return hm.apply(void 0,V3(E).concat([n(1)]))},c);i(ln(ln(ln({},e),t),T))}};return x=n.isStepper?w:S,function(){return requestAnimationFrame(x),function(){cancelAnimationFrame(f)}}});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)}var xae=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function yae(e,t){if(e==null)return{};var n=gae(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gae(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,l;for(l=0;l<r.length;l++)i=r[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function H0(e){return wae(e)||jae(e)||bae(e)||vae()}function vae(){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 bae(e,t){if(e){if(typeof e=="string")return Hj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hj(e,t)}}function jae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wae(e){if(Array.isArray(e))return Hj(e)}function Hj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F3(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 Mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F3(Object(n),!0).forEach(function(r){Wc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wc(e,t,n){return t=wL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nae(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,wL(r.key),r)}}function Aae(e,t,n){return t&&Nae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wL(e){var t=_ae(e,"string");return al(t)==="symbol"?t:String(t)}function _ae(e,t){if(al(e)!=="object"||e===null)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)}function Oae(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 Tae(e){var t=Eae();return function(){var r=mm(e),i;if(t){var l=mm(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Gj(this,i)}}function Gj(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 Kj(e)}function Kj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Eae(){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 mm(e){return mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mm(e)}var aa=(function(e){Oae(n,e);var t=Tae(n);function n(r,i){var l;Sae(this,n),l=t.call(this,r,i);var c=l.props,d=c.isActive,f=c.attributeName,h=c.from,p=c.to,x=c.steps,y=c.children,j=c.duration;if(l.handleStyleChange=l.handleStyleChange.bind(Kj(l)),l.changeStyle=l.changeStyle.bind(Kj(l)),!d||j<=0)return l.state={style:{}},typeof y=="function"&&(l.state={style:p}),Gj(l);if(x&&x.length)l.state={style:x[0].style};else if(h){if(typeof y=="function")return l.state={style:h},Gj(l);l.state={style:f?Wc({},f,h):h}}else l.state={style:{}};return l}return Aae(n,[{key:"componentDidMount",value:function(){var i=this.props,l=i.isActive,c=i.canBegin;this.mounted=!0,!(!l||!c)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var l=this.props,c=l.isActive,d=l.canBegin,f=l.attributeName,h=l.shouldReAnimate,p=l.to,x=l.from,y=this.state.style;if(d){if(!c){var j={style:f?Wc({},f,p):p};this.state&&y&&(f&&y[f]!==p||!f&&y!==p)&&this.setState(j);return}if(!(Dre(i.to,p)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=w||h?x:i.to;if(this.state&&y){var v={style:f?Wc({},f,S):S};(f&&y[f]!==S||!f&&y!==S)&&this.setState(v)}this.runAnimation(Mr(Mr({},this.props),{},{from:S,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 l=this,c=i.from,d=i.to,f=i.duration,h=i.easing,p=i.begin,x=i.onAnimationEnd,y=i.onAnimationStart,j=pae(c,d,aae(h),f,this.changeStyle),w=function(){l.stopJSAnimation=j()};this.manager.start([y,p,w,f,x])}},{key:"runStepAnimation",value:function(i){var l=this,c=i.steps,d=i.begin,f=i.onAnimationStart,h=c[0],p=h.style,x=h.duration,y=x===void 0?0:x,j=function(S,v,_){if(_===0)return S;var O=v.duration,A=v.easing,T=A===void 0?"ease":A,N=v.style,E=v.properties,k=v.onAnimationEnd,R=_>0?c[_-1]:v,L=E||Object.keys(N);if(typeof T=="function"||T==="spring")return[].concat(H0(S),[l.runJSAnimation.bind(l,{from:R.style,to:N,duration:O,easing:T}),O]);var D=I3(L,O,T),z=Mr(Mr(Mr({},R.style),N),{},{transition:D});return[].concat(H0(S),[z,O,k]).filter(Gre)};return this.manager.start([f].concat(H0(c.reduce(j,[p,Math.max(y,d)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Ure());var l=i.begin,c=i.duration,d=i.attributeName,f=i.to,h=i.easing,p=i.onAnimationStart,x=i.onAnimationEnd,y=i.steps,j=i.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof h=="function"||typeof j=="function"||h==="spring"){this.runJSAnimation(i);return}if(y.length>1){this.runStepAnimation(i);return}var S=d?Wc({},d,f):f,v=I3(Object.keys(S),c,h);w.start([p,l,Mr(Mr({},S),{},{transition:v}),c,x])}},{key:"render",value:function(){var i=this.props,l=i.children;i.begin;var c=i.duration;i.attributeName,i.easing;var d=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=yae(i,xae),h=M.Children.count(l),p=this.state.style;if(typeof l=="function")return l(p);if(!d||h===0||c<=0)return l;var x=function(j){var w=j.props,S=w.style,v=S===void 0?{}:S,_=w.className,O=M.cloneElement(j,Mr(Mr({},f),{},{style:Mr(Mr({},v),p),className:_}));return O};return h===1?x(M.Children.only(l)):U.createElement("div",null,M.Children.map(l,function(y){return x(y)}))}}]),n})(M.PureComponent);aa.displayName="Animate";aa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};aa.propTypes={from:nt.oneOfType([nt.object,nt.string]),to:nt.oneOfType([nt.object,nt.string]),attributeName:nt.string,duration:nt.number,begin:nt.number,easing:nt.oneOfType([nt.string,nt.func]),steps:nt.arrayOf(nt.shape({duration:nt.number.isRequired,style:nt.object.isRequired,easing:nt.oneOfType([nt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),nt.func]),properties:nt.arrayOf("string"),onAnimationEnd:nt.func})),children:nt.oneOfType([nt.node,nt.func]),isActive:nt.bool,canBegin:nt.bool,onAnimationEnd:nt.func,shouldReAnimate:nt.bool,onAnimationStart:nt.func,onAnimationReStart:nt.func};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 pm(){return pm=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},pm.apply(this,arguments)}function Cae(e,t){return Rae(e)||Pae(e,t)||kae(e,t)||Mae()}function Mae(){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 G3(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 G3(e,t)}}function G3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Rae(e){if(Array.isArray(e))return e}function K3(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 Y3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K3(Object(n),!0).forEach(function(r){Dae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dae(e,t,n){return t=zae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zae(e){var t=Lae(e,"string");return Bu(t)=="symbol"?t:t+""}function Lae(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 X3=function(t,n,r,i,l){var c=Math.min(Math.abs(r)/2,Math.abs(i)/2),d=i>=0?1:-1,f=r>=0?1:-1,h=i>=0&&r>=0||i<0&&r<0?1:0,p;if(c>0&&l instanceof Array){for(var x=[0,0,0,0],y=0,j=4;y<j;y++)x[y]=l[y]>c?c:l[y];p="M".concat(t,",").concat(n+d*x[0]),x[0]>0&&(p+="A ".concat(x[0],",").concat(x[0],",0,0,").concat(h,",").concat(t+f*x[0],",").concat(n)),p+="L ".concat(t+r-f*x[1],",").concat(n),x[1]>0&&(p+="A ".concat(x[1],",").concat(x[1],",0,0,").concat(h,`,
`).concat(t+r,",").concat(n+d*x[1])),p+="L ".concat(t+r,",").concat(n+i-d*x[2]),x[2]>0&&(p+="A ".concat(x[2],",").concat(x[2],",0,0,").concat(h,`,
`).concat(t+r-f*x[2],",").concat(n+i)),p+="L ".concat(t+f*x[3],",").concat(n+i),x[3]>0&&(p+="A ".concat(x[3],",").concat(x[3],",0,0,").concat(h,`,
`).concat(t,",").concat(n+i-d*x[3])),p+="Z"}else if(c>0&&l===+l&&l>0){var w=Math.min(c,l);p="M ".concat(t,",").concat(n+d*w,`
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+f*w,",").concat(n,`
L `).concat(t+r-f*w,",").concat(n,`
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+r,",").concat(n+d*w,`
L `).concat(t+r,",").concat(n+i-d*w,`
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+r-f*w,",").concat(n+i,`
L `).concat(t+f*w,",").concat(n+i,`
A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t,",").concat(n+i-d*w," Z")}else p="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return p},$ae=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,l=n.x,c=n.y,d=n.width,f=n.height;if(Math.abs(d)>0&&Math.abs(f)>0){var h=Math.min(l,l+d),p=Math.max(l,l+d),x=Math.min(c,c+f),y=Math.max(c,c+f);return r>=h&&r<=p&&i>=x&&i<=y}return!1},Bae={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},c2=function(t){var n=Y3(Y3({},Bae),t),r=M.useRef(),i=M.useState(-1),l=Cae(i,2),c=l[0],d=l[1];M.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var T=r.current.getTotalLength();T&&d(T)}catch{}},[]);var f=n.x,h=n.y,p=n.width,x=n.height,y=n.radius,j=n.className,w=n.animationEasing,S=n.animationDuration,v=n.animationBegin,_=n.isAnimationActive,O=n.isUpdateAnimationActive;if(f!==+f||h!==+h||p!==+p||x!==+x||p===0||x===0)return null;var A=ze("recharts-rectangle",j);return O?U.createElement(aa,{canBegin:c>0,from:{width:p,height:x,x:f,y:h},to:{width:p,height:x,x:f,y:h},duration:S,animationEasing:w,isActive:O},function(T){var N=T.width,E=T.height,k=T.x,R=T.y;return U.createElement(aa,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:S,isActive:_,easing:w},U.createElement("path",pm({},je(n,!0),{className:A,d:X3(k,R,N,E,y),ref:r})))}):U.createElement("path",pm({},je(n,!0),{className:A,d:X3(f,h,p,x,y)}))},Iae=["points","className","baseLinePoints","connectNulls"];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 qae(e,t){if(e==null)return{};var n=Uae(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uae(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 W3(e){return Gae(e)||Fae(e)||Hae(e)||Vae()}function Vae(){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 Hae(e,t){if(e){if(typeof e=="string")return Yj(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 Yj(e,t)}}function Fae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gae(e){if(Array.isArray(e))return Yj(e)}function Yj(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 Z3=function(t){return t&&t.x===+t.x&&t.y===+t.y},Kae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Z3(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Z3(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},su=function(t,n){var r=Kae(t);n&&(r=[r.reduce(function(l,c){return[].concat(W3(l),W3(c))},[])]);var i=r.map(function(l){return l.reduce(function(c,d,f){return"".concat(c).concat(f===0?"M":"L").concat(d.x,",").concat(d.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},Yae=function(t,n,r){var i=su(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(su(n.reverse(),r).slice(1))},Xae=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,l=t.connectNulls,c=qae(t,Iae);if(!n||!n.length)return null;var d=ze("recharts-polygon",r);if(i&&i.length){var f=c.stroke&&c.stroke!=="none",h=Yae(n,i,l);return U.createElement("g",{className:d},U.createElement("path",Do({},je(c,!0),{fill:h.slice(-1)==="Z"?c.fill:"none",stroke:"none",d:h})),f?U.createElement("path",Do({},je(c,!0),{fill:"none",d:su(n,l)})):null,f?U.createElement("path",Do({},je(c,!0),{fill:"none",d:su(i,l)})):null)}var p=su(n,l);return U.createElement("path",Do({},je(c,!0),{fill:p.slice(-1)==="Z"?c.fill:"none",className:d,d:p}))};function Xj(){return Xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xj.apply(this,arguments)}var pp=function(t){var n=t.cx,r=t.cy,i=t.r,l=t.className,c=ze("recharts-dot",l);return n===+n&&r===+r&&i===+i?M.createElement("circle",Xj({},je(t,!1),zh(t),{className:c,cx:n,cy:r,r:i})):null};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)}var Wae=["x","y","top","left","width","height","className"];function Wj(){return Wj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wj.apply(this,arguments)}function Q3(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 Zae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q3(Object(n),!0).forEach(function(r){Qae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qae(e,t,n){return t=Jae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jae(e){var t=eie(e,"string");return Iu(t)=="symbol"?t:t+""}function eie(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 tie(e,t){if(e==null)return{};var n=nie(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nie(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 rie=function(t,n,r,i,l,c){return"M".concat(t,",").concat(l,"v").concat(i,"M").concat(c,",").concat(n,"h").concat(r)},aie=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,l=i===void 0?0:i,c=t.top,d=c===void 0?0:c,f=t.left,h=f===void 0?0:f,p=t.width,x=p===void 0?0:p,y=t.height,j=y===void 0?0:y,w=t.className,S=tie(t,Wae),v=Zae({x:r,y:l,top:d,left:h,width:x,height:j},S);return!he(r)||!he(l)||!he(x)||!he(j)||!he(d)||!he(h)?null:U.createElement("path",Wj({},je(v,!0),{className:ze("recharts-cross",w),d:rie(r,l,x,j,d,h)}))},F0,J3;function iie(){if(J3)return F0;J3=1;var e=up(),t=Lz(),n=sa();function r(i,l){return i&&i.length?e(i,n(l,2),t):void 0}return F0=r,F0}var sie=iie();const oie=st(sie);var G0,e4;function lie(){if(e4)return G0;e4=1;var e=up(),t=sa(),n=$z();function r(i,l){return i&&i.length?e(i,t(l,2),n):void 0}return G0=r,G0}var cie=lie();const uie=st(cie);var die=["cx","cy","angle","ticks","axisLine"],fie=["ticks","tick","angle","tickFormatter","stroke"];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 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 t4(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 cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t4(Object(n),!0).forEach(function(r){xp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n4(e,t){if(e==null)return{};var n=hie(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[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 mie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r4(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,NL(r.key),r)}}function pie(e,t,n){return t&&r4(e.prototype,t),n&&r4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xie(e,t,n){return t=xm(t),yie(e,SL()?Reflect.construct(t,n||[],xm(e).constructor):t.apply(e,n))}function yie(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 gie(e)}function gie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SL=function(){return!!e})()}function xm(e){return xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xm(e)}function vie(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 xp(e,t,n){return t=NL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NL(e){var t=bie(e,"string");return il(t)=="symbol"?t:t+""}function bie(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(t==="string"?String:Number)(e)}var yp=(function(e){function t(){return mie(this,t),xie(this,t,arguments)}return vie(t,e),pie(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,l=this.props,c=l.angle,d=l.cx,f=l.cy;return yt(d,f,i,c)}},{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,l=r.cy,c=r.angle,d=r.ticks,f=oie(d,function(p){return p.coordinate||0}),h=uie(d,function(p){return p.coordinate||0});return{cx:i,cy:l,startAngle:c,endAngle:c,innerRadius:h.coordinate||0,outerRadius:f.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,l=r.cy,c=r.angle,d=r.ticks,f=r.axisLine,h=n4(r,die),p=d.reduce(function(w,S){return[Math.min(w[0],S.coordinate),Math.max(w[1],S.coordinate)]},[1/0,-1/0]),x=yt(i,l,p[0],c),y=yt(i,l,p[1],c),j=cs(cs(cs({},je(h,!1)),{},{fill:"none"},je(f,!1)),{},{x1:x.x,y1:x.y,x2:y.x,y2:y.y});return U.createElement("line",ou({className:"recharts-polar-radius-axis-line"},j))}},{key:"renderTicks",value:function(){var r=this,i=this.props,l=i.ticks,c=i.tick,d=i.angle,f=i.tickFormatter,h=i.stroke,p=n4(i,fie),x=this.getTickTextAnchor(),y=je(p,!1),j=je(c,!1),w=l.map(function(S,v){var _=r.getTickValueCoord(S),O=cs(cs(cs(cs({textAnchor:x,transform:"rotate(".concat(90-d,", ").concat(_.x,", ").concat(_.y,")")},y),{},{stroke:"none",fill:h},j),{},{index:v},_),{},{payload:S});return U.createElement(We,ou({className:ze("recharts-polar-radius-axis-tick",fL(c)),key:"tick-".concat(S.coordinate)},Cs(r.props,S,v)),t.renderTickItem(c,O,f?f(S.value,v):S.value))});return U.createElement(We,{className:"recharts-polar-radius-axis-ticks"},w)}},{key:"render",value:function(){var r=this.props,i=r.ticks,l=r.axisLine,c=r.tick;return!i||!i.length?null:U.createElement(We,{className:ze("recharts-polar-radius-axis",this.props.className)},l&&this.renderAxisLine(),c&&this.renderTicks(),en.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,l){var c;return U.isValidElement(r)?c=U.cloneElement(r,i):Te(r)?c=r(i):c=U.createElement(Ms,ou({},i,{className:"recharts-polar-radius-axis-tick-value"}),l),c}}])})(M.PureComponent);xp(yp,"displayName","PolarRadiusAxis");xp(yp,"axisType","radiusAxis");xp(yp,"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 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 xs(){return xs=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},xs.apply(this,arguments)}function a4(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 us(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a4(Object(n),!0).forEach(function(r){gp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i4(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 wie(e,t,n){return t&&i4(e.prototype,t),n&&i4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sie(e,t,n){return t=ym(t),Nie(e,AL()?Reflect.construct(t,n||[],ym(e).constructor):t.apply(e,n))}function Nie(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 Aie(e)}function Aie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AL=function(){return!!e})()}function ym(e){return ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ym(e)}function _ie(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 gp(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=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(t==="string"?String:Number)(e)}var Tie=Math.PI/180,s4=1e-5,vp=(function(e){function t(){return jie(this,t),Sie(this,t,arguments)}return _ie(t,e),wie(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,l=i.cx,c=i.cy,d=i.radius,f=i.orientation,h=i.tickSize,p=h||8,x=yt(l,c,d,r.coordinate),y=yt(l,c,d+(f==="inner"?-1:1)*p,r.coordinate);return{x1:x.x,y1:x.y,x2:y.x,y2:y.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,l=Math.cos(-r.coordinate*Tie),c;return l>s4?c=i==="outer"?"start":"end":l<-s4?c=i==="outer"?"end":"start":c="middle",c}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,l=r.cy,c=r.radius,d=r.axisLine,f=r.axisLineType,h=us(us({},je(this.props,!1)),{},{fill:"none"},je(d,!1));if(f==="circle")return U.createElement(pp,xs({className:"recharts-polar-angle-axis-line"},h,{cx:i,cy:l,r:c}));var p=this.props.ticks,x=p.map(function(y){return yt(i,l,c,y.coordinate)});return U.createElement(Xae,xs({className:"recharts-polar-angle-axis-line"},h,{points:x}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,l=i.ticks,c=i.tick,d=i.tickLine,f=i.tickFormatter,h=i.stroke,p=je(this.props,!1),x=je(c,!1),y=us(us({},p),{},{fill:"none"},je(d,!1)),j=l.map(function(w,S){var v=r.getTickLineCoord(w),_=r.getTickTextAnchor(w),O=us(us(us({textAnchor:_},p),{},{stroke:"none",fill:h},x),{},{index:S,payload:w,x:v.x2,y:v.y2});return U.createElement(We,xs({className:ze("recharts-polar-angle-axis-tick",fL(c)),key:"tick-".concat(w.coordinate)},Cs(r.props,w,S)),d&&U.createElement("line",xs({className:"recharts-polar-angle-axis-tick-line"},y,v)),c&&t.renderTickItem(c,O,f?f(w.value,S):w.value))});return U.createElement(We,{className:"recharts-polar-angle-axis-ticks"},j)}},{key:"render",value:function(){var r=this.props,i=r.ticks,l=r.radius,c=r.axisLine;return l<=0||!i||!i.length?null:U.createElement(We,{className:ze("recharts-polar-angle-axis",this.props.className)},c&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,l){var c;return U.isValidElement(r)?c=U.cloneElement(r,i):Te(r)?c=r(i):c=U.createElement(Ms,xs({},i,{className:"recharts-polar-angle-axis-tick-value"}),l),c}}])})(M.PureComponent);gp(vp,"displayName","PolarAngleAxis");gp(vp,"axisType","angleAxis");gp(vp,"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 K0,o4;function Eie(){if(o4)return K0;o4=1;var e=L6(),t=e(Object.getPrototypeOf,Object);return K0=t,K0}var Y0,l4;function Cie(){if(l4)return Y0;l4=1;var e=Fa(),t=Eie(),n=Ga(),r="[object Object]",i=Function.prototype,l=Object.prototype,c=i.toString,d=l.hasOwnProperty,f=c.call(Object);function h(p){if(!n(p)||e(p)!=r)return!1;var x=t(p);if(x===null)return!0;var y=d.call(x,"constructor")&&x.constructor;return typeof y=="function"&&y instanceof y&&c.call(y)==f}return Y0=h,Y0}var Mie=Cie();const kie=st(Mie);var X0,c4;function Pie(){if(c4)return X0;c4=1;var e=Fa(),t=Ga(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return X0=r,X0}var Rie=Pie();const Die=st(Rie);function qu(e){"@babel/helpers - typeof";return qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qu(e)}function gm(){return gm=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},gm.apply(this,arguments)}function zie(e,t){return Iie(e)||Bie(e,t)||$ie(e,t)||Lie()}function Lie(){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 $ie(e,t){if(e){if(typeof e=="string")return u4(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 u4(e,t)}}function u4(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 Bie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Iie(e){if(Array.isArray(e))return e}function d4(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 f4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d4(Object(n),!0).forEach(function(r){qie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qie(e,t,n){return t=Uie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uie(e){var t=Vie(e,"string");return qu(t)=="symbol"?t:t+""}function Vie(e,t){if(qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var h4=function(t,n,r,i,l){var c=r-i,d;return d="M ".concat(t,",").concat(n),d+="L ".concat(t+r,",").concat(n),d+="L ".concat(t+r-c/2,",").concat(n+l),d+="L ".concat(t+r-c/2-i,",").concat(n+l),d+="L ".concat(t,",").concat(n," Z"),d},Hie={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Fie=function(t){var n=f4(f4({},Hie),t),r=M.useRef(),i=M.useState(-1),l=zie(i,2),c=l[0],d=l[1];M.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&d(A)}catch{}},[]);var f=n.x,h=n.y,p=n.upperWidth,x=n.lowerWidth,y=n.height,j=n.className,w=n.animationEasing,S=n.animationDuration,v=n.animationBegin,_=n.isUpdateAnimationActive;if(f!==+f||h!==+h||p!==+p||x!==+x||y!==+y||p===0&&x===0||y===0)return null;var O=ze("recharts-trapezoid",j);return _?U.createElement(aa,{canBegin:c>0,from:{upperWidth:0,lowerWidth:0,height:y,x:f,y:h},to:{upperWidth:p,lowerWidth:x,height:y,x:f,y:h},duration:S,animationEasing:w,isActive:_},function(A){var T=A.upperWidth,N=A.lowerWidth,E=A.height,k=A.x,R=A.y;return U.createElement(aa,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:S,easing:w},U.createElement("path",gm({},je(n,!0),{className:O,d:h4(k,R,T,N,E),ref:r})))}):U.createElement("g",null,U.createElement("path",gm({},je(n,!0),{className:O,d:h4(f,h,p,x,y)})))},Gie=["option","shapeType","propTransformer","activeClassName","isActive"];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 Kie(e,t){if(e==null)return{};var n=Yie(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yie(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 m4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m4(Object(n),!0).forEach(function(r){Xie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xie(e,t,n){return t=Wie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wie(e){var t=Zie(e,"string");return Uu(t)=="symbol"?t:t+""}function Zie(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)}function Qie(e,t){return vm(vm({},t),e)}function Jie(e,t){return e==="symbols"}function p4(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return U.createElement(c2,n);case"trapezoid":return U.createElement(Fie,n);case"sector":return U.createElement(pL,n);case"symbols":if(Jie(t))return U.createElement(TS,n);break;default:return null}}function ese(e){return M.isValidElement(e)?e.props:e}function OL(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Qie:r,l=e.activeClassName,c=l===void 0?"recharts-active-shape":l,d=e.isActive,f=Kie(e,Gie),h;if(M.isValidElement(t))h=M.cloneElement(t,vm(vm({},f),ese(t)));else if(Te(t))h=t(f);else if(kie(t)&&!Die(t)){var p=i(t,f);h=U.createElement(p4,{shapeType:n,elementProps:p})}else{var x=f;h=U.createElement(p4,{shapeType:n,elementProps:x})}return d?U.createElement(We,{className:c},h):h}function bp(e,t){return t!=null&&"trapezoids"in e.props}function jp(e,t){return t!=null&&"sectors"in e.props}function Vu(e,t){return t!=null&&"points"in e.props}function tse(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,l=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&l}function nse(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function rse(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function ase(e,t){var n;return bp(e,t)?n=tse:jp(e,t)?n=nse:Vu(e,t)&&(n=rse),n}function ise(e,t){var n;return bp(e,t)?n="trapezoids":jp(e,t)?n="sectors":Vu(e,t)&&(n="points"),n}function sse(e,t){if(bp(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(jp(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 Vu(e,t)?t.payload:{}}function ose(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=ise(n,t),l=sse(n,t),c=r.filter(function(f,h){var p=ud(l,f),x=n.props[i].filter(function(w){var S=ase(n,t);return S(w,t)}),y=n.props[i].indexOf(x[x.length-1]),j=h===y;return p&&j}),d=r.indexOf(c[c.length-1]);return d}var yh;function ol(e){"@babel/helpers - typeof";return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}function zo(){return zo=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},zo.apply(this,arguments)}function x4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x4(Object(n),!0).forEach(function(r){pr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y4(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,EL(r.key),r)}}function cse(e,t,n){return t&&y4(e.prototype,t),n&&y4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function use(e,t,n){return t=bm(t),dse(e,TL()?Reflect.construct(t,n||[],bm(e).constructor):t.apply(e,n))}function dse(e,t){if(t&&(ol(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fse(e)}function fse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TL=function(){return!!e})()}function bm(e){return bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bm(e)}function hse(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 pr(e,t,n){return t=EL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EL(e){var t=mse(e,"string");return ol(t)=="symbol"?t:t+""}function mse(e,t){if(ol(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ol(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ya=(function(e){function t(n){var r;return lse(this,t),r=use(this,t,[n]),pr(r,"pieRef",null),pr(r,"sectorRefs",[]),pr(r,"id",kl("recharts-pie-")),pr(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Te(i)&&i()}),pr(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 hse(t,e),cse(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 l=this.props,c=l.label,d=l.labelLine,f=l.dataKey,h=l.valueKey,p=je(this.props,!1),x=je(c,!1),y=je(d,!1),j=c&&c.offsetRadius||20,w=r.map(function(S,v){var _=(S.startAngle+S.endAngle)/2,O=yt(S.cx,S.cy,S.outerRadius+j,_),A=pt(pt(pt(pt({},p),S),{},{stroke:"none"},x),{},{index:v,textAnchor:t.getTextAnchor(O.x,S.cx)},O),T=pt(pt(pt(pt({},p),S),{},{fill:"none",stroke:S.fill},y),{},{index:v,points:[yt(S.cx,S.cy,S.outerRadius,_),O]}),N=f;return Re(f)&&Re(h)?N="value":Re(f)&&(N=h),U.createElement(We,{key:"label-".concat(S.startAngle,"-").concat(S.endAngle,"-").concat(S.midAngle,"-").concat(v)},d&&t.renderLabelLineItem(d,T,"line"),t.renderLabelItem(c,A,Yt(S,N)))});return U.createElement(We,{className:"recharts-pie-labels"},w)}},{key:"renderSectorsStatically",value:function(r){var i=this,l=this.props,c=l.activeShape,d=l.blendStroke,f=l.inactiveShape;return r.map(function(h,p){if((h==null?void 0:h.startAngle)===0&&(h==null?void 0:h.endAngle)===0&&r.length!==1)return null;var x=i.isActiveIndex(p),y=f&&i.hasActiveIndex()?f:null,j=x?c:y,w=pt(pt({},h),{},{stroke:d?h.fill:h.stroke,tabIndex:-1});return U.createElement(We,zo({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Cs(i.props,h,p),{key:"sector-".concat(h==null?void 0:h.startAngle,"-").concat(h==null?void 0:h.endAngle,"-").concat(h.midAngle,"-").concat(p)}),U.createElement(OL,zo({option:j,isActive:x,shapeType:"sector"},w)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,l=i.sectors,c=i.isAnimationActive,d=i.animationBegin,f=i.animationDuration,h=i.animationEasing,p=i.animationId,x=this.state,y=x.prevSectors,j=x.prevIsAnimationActive;return U.createElement(aa,{begin:d,duration:f,isActive:c,easing:h,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(j),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(w){var S=w.t,v=[],_=l&&l[0],O=_.startAngle;return l.forEach(function(A,T){var N=y&&y[T],E=T>0?Qn(A,"paddingAngle",0):0;if(N){var k=Xn(N.endAngle-N.startAngle,A.endAngle-A.startAngle),R=pt(pt({},A),{},{startAngle:O+E,endAngle:O+k(S)+E});v.push(R),O=R.endAngle}else{var L=A.endAngle,D=A.startAngle,z=Xn(0,L-D),$=z(S),F=pt(pt({},A),{},{startAngle:O+E,endAngle:O+$+E});v.push(F),O=F.endAngle}}),U.createElement(We,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(l){if(!l.altKey)switch(l.key){case"ArrowLeft":{var c=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[c].focus(),i.setState({sectorToFocus:c});break}case"ArrowRight":{var d=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[d].focus(),i.setState({sectorToFocus:d});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,l=r.isAnimationActive,c=this.state.prevSectors;return l&&i&&i.length&&(!c||!ud(c,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,l=i.hide,c=i.sectors,d=i.className,f=i.label,h=i.cx,p=i.cy,x=i.innerRadius,y=i.outerRadius,j=i.isAnimationActive,w=this.state.isAnimationFinished;if(l||!c||!c.length||!he(h)||!he(p)||!he(x)||!he(y))return null;var S=ze("recharts-pie",d);return U.createElement(We,{tabIndex:this.props.rootTabIndex,className:S,ref:function(_){r.pieRef=_}},this.renderSectors(),f&&this.renderLabels(c),en.renderCallByParent(this.props,null,!1),(!j||w)&&$a.renderCallByParent(this.props,c,!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,l){if(U.isValidElement(r))return U.cloneElement(r,i);if(Te(r))return r(i);var c=ze("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return U.createElement(um,zo({},i,{key:l,type:"linear",className:c}))}},{key:"renderLabelItem",value:function(r,i,l){if(U.isValidElement(r))return U.cloneElement(r,i);var c=l;if(Te(r)&&(c=r(i),U.isValidElement(c)))return c;var d=ze("recharts-pie-label-text",typeof r!="boolean"&&!Te(r)?r.className:"");return U.createElement(Ms,zo({},i,{alignmentBaseline:"middle",className:d}),c)}}])})(M.PureComponent);yh=Ya;pr(Ya,"displayName","Pie");pr(Ya,"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:!Ls.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});pr(Ya,"parseDeltaAngle",function(e,t){var n=wn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});pr(Ya,"getRealPieData",function(e){var t=e.data,n=e.children,r=je(e,!1),i=Jn(n,rp);return t&&t.length?t.map(function(l,c){return pt(pt(pt({payload:l},r),l),i&&i[c]&&i[c].props)}):i&&i.length?i.map(function(l){return pt(pt({},r),l.props)}):[]});pr(Ya,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,l=t.height,c=dL(i,l),d=r+Sn(e.cx,i,i/2),f=n+Sn(e.cy,l,l/2),h=Sn(e.innerRadius,c,0),p=Sn(e.outerRadius,c,c*.8),x=e.maxRadius||Math.sqrt(i*i+l*l)/2;return{cx:d,cy:f,innerRadius:h,outerRadius:p,maxRadius:x}});pr(Ya,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?pt(pt({},t.type.defaultProps),t.props):t.props,i=yh.getRealPieData(r);if(!i||!i.length)return null;var l=r.cornerRadius,c=r.startAngle,d=r.endAngle,f=r.paddingAngle,h=r.dataKey,p=r.nameKey,x=r.valueKey,y=r.tooltipType,j=Math.abs(r.minAngle),w=yh.parseCoordinateOfPie(r,n),S=yh.parseDeltaAngle(c,d),v=Math.abs(S),_=h;Re(h)&&Re(x)?(Br(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),_="value"):Re(h)&&(Br(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),_=x);var O=i.filter(function(R){return Yt(R,_,0)!==0}).length,A=(v>=360?O:O-1)*f,T=v-O*j-A,N=i.reduce(function(R,L){var D=Yt(L,_,0);return R+(he(D)?D:0)},0),E;if(N>0){var k;E=i.map(function(R,L){var D=Yt(R,_,0),z=Yt(R,p,L),$=(he(D)?D:0)/N,F;L?F=k.endAngle+wn(S)*f*(D!==0?1:0):F=c;var Y=F+wn(S)*((D!==0?j:0)+$*T),K=(F+Y)/2,B=(w.innerRadius+w.outerRadius)/2,H=[{name:z,value:D,payload:R,dataKey:_,type:y}],Q=yt(w.cx,w.cy,B,K);return k=pt(pt(pt({percent:$,cornerRadius:l,name:z,tooltipPayload:H,midAngle:K,middleRadius:B,tooltipPosition:Q},R),w),{},{value:Yt(R,_),startAngle:F,endAngle:Y,payload:R,paddingAngle:wn(S)*f}),k})}return pt(pt({},w),{},{sectors:E,data:i})});var W0,g4;function pse(){if(g4)return W0;g4=1;var e=Math.ceil,t=Math.max;function n(r,i,l,c){for(var d=-1,f=t(e((i-r)/(l||1)),0),h=Array(f);f--;)h[c?f:++d]=r,r+=l;return h}return W0=n,W0}var Z0,v4;function CL(){if(v4)return Z0;v4=1;var e=J6(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var l=i<0?-1:1;return l*n}return i===i?i:0}return Z0=r,Z0}var Q0,b4;function xse(){if(b4)return Q0;b4=1;var e=pse(),t=np(),n=CL();function r(i){return function(l,c,d){return d&&typeof d!="number"&&t(l,c,d)&&(c=d=void 0),l=n(l),c===void 0?(c=l,l=0):c=n(c),d=d===void 0?l<c?1:-1:n(d),e(l,c,d,i)}}return Q0=r,Q0}var J0,j4;function yse(){if(j4)return J0;j4=1;var e=xse(),t=e();return J0=t,J0}var gse=yse();const jm=st(gse);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 w4(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 S4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w4(Object(n),!0).forEach(function(r){ML(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ML(e,t,n){return t=vse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vse(e){var t=bse(e,"string");return Hu(t)=="symbol"?t:t+""}function bse(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 jse=["Webkit","Moz","O","ms"],wse=function(t,n){var r=t.replace(/(\w)/,function(l){return l.toUpperCase()}),i=jse.reduce(function(l,c){return S4(S4({},l),{},ML({},c+r,n))},{});return i[t]=n,i};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 wm(){return wm=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},wm.apply(this,arguments)}function N4(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 e1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N4(Object(n),!0).forEach(function(r){Kn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A4(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,PL(r.key),r)}}function Nse(e,t,n){return t&&A4(e.prototype,t),n&&A4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ase(e,t,n){return t=Sm(t),_se(e,kL()?Reflect.construct(t,n||[],Sm(e).constructor):t.apply(e,n))}function _se(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 Ose(e)}function Ose(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kL=function(){return!!e})()}function Sm(e){return Sm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sm(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&&ew(e,t)}function ew(e,t){return ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ew(e,t)}function Kn(e,t,n){return t=PL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PL(e){var t=Ese(e,"string");return ll(t)=="symbol"?t:t+""}function Ese(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 Cse=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,l=t.x,c=t.width,d=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,h=ru().domain(jm(0,f)).range([l,l+c-d]),p=h.domain().map(function(x){return h(x)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:h(r),endX:h(i),scale:h,scaleValues:p}},_4=function(t){return t.changedTouches&&!!t.changedTouches.length},cl=(function(e){function t(n){var r;return Sse(this,t),r=Ase(this,t,[n]),Kn(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Kn(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Kn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,l=i.endIndex,c=i.onDragEnd,d=i.startIndex;c==null||c({endIndex:l,startIndex:d})}),r.detachDragEndListener()}),Kn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Kn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Kn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Kn(r,"handleSlideDragStart",function(i){var l=_4(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:l.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Tse(t,e),Nse(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,l=r.endX,c=this.state.scaleValues,d=this.props,f=d.gap,h=d.data,p=h.length-1,x=Math.min(i,l),y=Math.max(i,l),j=t.getIndexInRange(c,x),w=t.getIndexInRange(c,y);return{startIndex:j-j%f,endIndex:w===p?p:w-w%f}}},{key:"getTextOfTick",value:function(r){var i=this.props,l=i.data,c=i.tickFormatter,d=i.dataKey,f=Yt(l[r],d,r);return Te(c)?c(f,r):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,l=i.slideMoveStartX,c=i.startX,d=i.endX,f=this.props,h=f.x,p=f.width,x=f.travellerWidth,y=f.startIndex,j=f.endIndex,w=f.onChange,S=r.pageX-l;S>0?S=Math.min(S,h+p-x-d,h+p-x-c):S<0&&(S=Math.max(S,h-c,h-d));var v=this.getIndex({startX:c+S,endX:d+S});(v.startIndex!==y||v.endIndex!==j)&&w&&w(v),this.setState({startX:c+S,endX:d+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var l=_4(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:l.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,l=i.brushMoveStartX,c=i.movingTravellerId,d=i.endX,f=i.startX,h=this.state[c],p=this.props,x=p.x,y=p.width,j=p.travellerWidth,w=p.onChange,S=p.gap,v=p.data,_={startX:this.state.startX,endX:this.state.endX},O=r.pageX-l;O>0?O=Math.min(O,x+y-j-h):O<0&&(O=Math.max(O,x-h)),_[c]=h+O;var A=this.getIndex(_),T=A.startIndex,N=A.endIndex,E=function(){var R=v.length-1;return c==="startX"&&(d>f?T%S===0:N%S===0)||d<f&&N===R||c==="endX"&&(d>f?N%S===0:T%S===0)||d>f&&N===R};this.setState(Kn(Kn({},c,h+O),"brushMoveStartX",r.pageX),function(){w&&E()&&w(A)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var l=this,c=this.state,d=c.scaleValues,f=c.startX,h=c.endX,p=this.state[i],x=d.indexOf(p);if(x!==-1){var y=x+r;if(!(y===-1||y>=d.length)){var j=d[y];i==="startX"&&j>=h||i==="endX"&&j<=f||this.setState(Kn({},i,j),function(){l.props.onChange(l.getIndex({startX:l.state.startX,endX:l.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,l=r.y,c=r.width,d=r.height,f=r.fill,h=r.stroke;return U.createElement("rect",{stroke:h,fill:f,x:i,y:l,width:c,height:d})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,l=r.y,c=r.width,d=r.height,f=r.data,h=r.children,p=r.padding,x=M.Children.only(h);return x?U.cloneElement(x,{x:i,y:l,width:c,height:d,margin:p,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,i){var l,c,d=this,f=this.props,h=f.y,p=f.travellerWidth,x=f.height,y=f.traveller,j=f.ariaLabel,w=f.data,S=f.startIndex,v=f.endIndex,_=Math.max(r,this.props.x),O=e1(e1({},je(this.props,!1)),{},{x:_,y:h,width:p,height:x}),A=j||"Min value: ".concat((l=w[S])===null||l===void 0?void 0:l.name,", Max value: ").concat((c=w[v])===null||c===void 0?void 0:c.name);return U.createElement(We,{tabIndex:0,role:"slider","aria-label":A,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),d.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,i))},onFocus:function(){d.setState({isTravellerFocused:!0})},onBlur:function(){d.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(y,O))}},{key:"renderSlide",value:function(r,i){var l=this.props,c=l.y,d=l.height,f=l.stroke,h=l.travellerWidth,p=Math.min(r,i)+h,x=Math.max(Math.abs(i-r)-h,0);return U.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:p,y:c,width:x,height:d})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,l=r.endIndex,c=r.y,d=r.height,f=r.travellerWidth,h=r.stroke,p=this.state,x=p.startX,y=p.endX,j=5,w={pointerEvents:"none",fill:h};return U.createElement(We,{className:"recharts-brush-texts"},U.createElement(Ms,wm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(x,y)-j,y:c+d/2},w),this.getTextOfTick(i)),U.createElement(Ms,wm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(x,y)+f+j,y:c+d/2},w),this.getTextOfTick(l)))}},{key:"render",value:function(){var r=this.props,i=r.data,l=r.className,c=r.children,d=r.x,f=r.y,h=r.width,p=r.height,x=r.alwaysShowText,y=this.state,j=y.startX,w=y.endX,S=y.isTextActive,v=y.isSlideMoving,_=y.isTravellerMoving,O=y.isTravellerFocused;if(!i||!i.length||!he(d)||!he(f)||!he(h)||!he(p)||h<=0||p<=0)return null;var A=ze("recharts-brush",l),T=U.Children.count(c)===1,N=wse("userSelect","none");return U.createElement(We,{className:A,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(j,w),this.renderTravellerLayer(j,"startX"),this.renderTravellerLayer(w,"endX"),(S||v||_||O||x)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,l=r.y,c=r.width,d=r.height,f=r.stroke,h=Math.floor(l+d/2)-1;return U.createElement(U.Fragment,null,U.createElement("rect",{x:i,y:l,width:c,height:d,fill:f,stroke:"none"}),U.createElement("line",{x1:i+1,y1:h,x2:i+c-1,y2:h,fill:"none",stroke:"#fff"}),U.createElement("line",{x1:i+1,y1:h+2,x2:i+c-1,y2:h+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var l;return U.isValidElement(r)?l=U.cloneElement(r,i):Te(r)?l=r(i):l=t.renderDefaultTraveller(i),l}},{key:"getDerivedStateFromProps",value:function(r,i){var l=r.data,c=r.width,d=r.x,f=r.travellerWidth,h=r.updateId,p=r.startIndex,x=r.endIndex;if(l!==i.prevData||h!==i.prevUpdateId)return e1({prevData:l,prevTravellerWidth:f,prevUpdateId:h,prevX:d,prevWidth:c},l&&l.length?Cse({data:l,width:c,x:d,travellerWidth:f,startIndex:p,endIndex:x}):{scale:null,scaleValues:null});if(i.scale&&(c!==i.prevWidth||d!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([d,d+c-f]);var y=i.scale.domain().map(function(j){return i.scale(j)});return{prevData:l,prevTravellerWidth:f,prevUpdateId:h,prevX:d,prevWidth:c,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:y}}return null}},{key:"getIndexInRange",value:function(r,i){for(var l=r.length,c=0,d=l-1;d-c>1;){var f=Math.floor((c+d)/2);r[f]>i?d=f:c=f}return i>=r[d]?d:c}}])})(M.PureComponent);Kn(cl,"displayName","Brush");Kn(cl,"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 t1,O4;function Mse(){if(O4)return t1;O4=1;var e=DS();function t(n,r){var i;return e(n,function(l,c,d){return i=r(l,c,d),!i}),!!i}return t1=t,t1}var n1,T4;function kse(){if(T4)return n1;T4=1;var e=C6(),t=sa(),n=Mse(),r=zn(),i=np();function l(c,d,f){var h=r(c)?e:n;return f&&i(c,d,f)&&(d=void 0),h(c,t(d,3))}return n1=l,n1}var Pse=kse();const Rse=st(Pse);var ea=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},r1,E4;function Dse(){if(E4)return r1;E4=1;var e=Y6();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return r1=t,r1}var a1,C4;function zse(){if(C4)return a1;C4=1;var e=Dse(),t=G6(),n=sa();function r(i,l){var c={};return l=n(l,3),t(i,function(d,f,h){e(c,f,l(d,f,h))}),c}return a1=r,a1}var Lse=zse();const $se=st(Lse);var i1,M4;function Bse(){if(M4)return i1;M4=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 i1=e,i1}var s1,k4;function Ise(){if(k4)return s1;k4=1;var e=DS();function t(n,r){var i=!0;return e(n,function(l,c,d){return i=!!r(l,c,d),i}),i}return s1=t,s1}var o1,P4;function qse(){if(P4)return o1;P4=1;var e=Bse(),t=Ise(),n=sa(),r=zn(),i=np();function l(c,d,f){var h=r(c)?e:t;return f&&i(c,d,f)&&(d=void 0),h(c,n(d,3))}return o1=l,o1}var Use=qse();const RL=st(Use);var Vse=["x","y"];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 tw(){return tw=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},tw.apply(this,arguments)}function R4(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 Gc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R4(Object(n),!0).forEach(function(r){Hse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hse(e,t,n){return t=Fse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fse(e){var t=Gse(e,"string");return Fu(t)=="symbol"?t:t+""}function Gse(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 Kse(e,t){if(e==null)return{};var n=Yse(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yse(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 Xse(e,t){var n=e.x,r=e.y,i=Kse(e,Vse),l="".concat(n),c=parseInt(l,10),d="".concat(r),f=parseInt(d,10),h="".concat(t.height||i.height),p=parseInt(h,10),x="".concat(t.width||i.width),y=parseInt(x,10);return Gc(Gc(Gc(Gc(Gc({},t),i),c?{x:c}:{}),f?{y:f}:{}),{},{height:p,width:y,name:t.name,radius:t.radius})}function D4(e){return U.createElement(OL,tw({shapeType:"rectangle",propTransformer:Xse,activeClassName:"recharts-active-bar"},e))}var Wse=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 l=he(r)||xK(r);return l?t(r,i):(l||Ps(),n)}},Zse=["value","background"],DL;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 Qse(e,t){if(e==null)return{};var n=Jse(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jse(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 Nm(){return Nm=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},Nm.apply(this,arguments)}function z4(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 qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z4(Object(n),!0).forEach(function(r){Oi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L4(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,LL(r.key),r)}}function toe(e,t,n){return t&&L4(e.prototype,t),n&&L4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function noe(e,t,n){return t=Am(t),roe(e,zL()?Reflect.construct(t,n||[],Am(e).constructor):t.apply(e,n))}function roe(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 aoe(e)}function aoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zL=function(){return!!e})()}function Am(e){return Am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Am(e)}function ioe(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&&nw(e,t)}function nw(e,t){return nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nw(e,t)}function Oi(e,t,n){return t=LL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LL(e){var t=soe(e,"string");return ul(t)=="symbol"?t:t+""}function soe(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 zi=(function(e){function t(){var n;eoe(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=noe(this,t,[].concat(i)),Oi(n,"state",{isAnimationFinished:!1}),Oi(n,"id",kl("recharts-bar-")),Oi(n,"handleAnimationEnd",function(){var c=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),c&&c()}),Oi(n,"handleAnimationStart",function(){var c=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),c&&c()}),n}return ioe(t,e),toe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,l=this.props,c=l.shape,d=l.dataKey,f=l.activeIndex,h=l.activeBar,p=je(this.props,!1);return r&&r.map(function(x,y){var j=y===f,w=j?h:c,S=qt(qt(qt({},p),x),{},{isActive:j,option:w,index:y,dataKey:d,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return U.createElement(We,Nm({className:"recharts-bar-rectangle"},Cs(i.props,x,y),{key:"rectangle-".concat(x==null?void 0:x.x,"-").concat(x==null?void 0:x.y,"-").concat(x==null?void 0:x.value,"-").concat(y)}),U.createElement(D4,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,l=i.data,c=i.layout,d=i.isAnimationActive,f=i.animationBegin,h=i.animationDuration,p=i.animationEasing,x=i.animationId,y=this.state.prevData;return U.createElement(aa,{begin:f,duration:h,isActive:d,easing:p,from:{t:0},to:{t:1},key:"bar-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var w=j.t,S=l.map(function(v,_){var O=y&&y[_];if(O){var A=Xn(O.x,v.x),T=Xn(O.y,v.y),N=Xn(O.width,v.width),E=Xn(O.height,v.height);return qt(qt({},v),{},{x:A(w),y:T(w),width:N(w),height:E(w)})}if(c==="horizontal"){var k=Xn(0,v.height),R=k(w);return qt(qt({},v),{},{y:v.y+v.height-R,height:R})}var L=Xn(0,v.width),D=L(w);return qt(qt({},v),{},{width:D})});return U.createElement(We,null,r.renderRectanglesStatically(S))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,l=r.isAnimationActive,c=this.state.prevData;return l&&i&&i.length&&(!c||!ud(c,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,l=i.data,c=i.dataKey,d=i.activeIndex,f=je(this.props.background,!1);return l.map(function(h,p){h.value;var x=h.background,y=Qse(h,Zse);if(!x)return null;var j=qt(qt(qt(qt(qt({},y),{},{fill:"#eee"},x),f),Cs(r.props,h,p)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:c,index:p,className:"recharts-bar-background-rectangle"});return U.createElement(D4,Nm({key:"background-bar-".concat(p),option:r.props.background,isActive:p===d},j))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.data,d=l.xAxis,f=l.yAxis,h=l.layout,p=l.children,x=Jn(p,dd);if(!x)return null;var y=h==="vertical"?c[0].height/2:c[0].width/2,j=function(v,_){var O=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:O,errorVal:Yt(v,_)}},w={clipPath:r?"url(#clipPath-".concat(i,")"):null};return U.createElement(We,w,x.map(function(S){return U.cloneElement(S,{key:"error-bar-".concat(i,"-").concat(S.props.dataKey),data:c,xAxis:d,yAxis:f,layout:h,offset:y,dataPointFormatter:j})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,l=r.data,c=r.className,d=r.xAxis,f=r.yAxis,h=r.left,p=r.top,x=r.width,y=r.height,j=r.isAnimationActive,w=r.background,S=r.id;if(i||!l||!l.length)return null;var v=this.state.isAnimationFinished,_=ze("recharts-bar",c),O=d&&d.allowDataOverflow,A=f&&f.allowDataOverflow,T=O||A,N=Re(S)?this.id:S;return U.createElement(We,{className:_},O||A?U.createElement("defs",null,U.createElement("clipPath",{id:"clipPath-".concat(N)},U.createElement("rect",{x:O?h:h-x/2,y:A?p:p-y/2,width:O?x:x*2,height:A?y:y*2}))):null,U.createElement(We,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(N,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,N),(!j||v)&&$a.renderCallByParent(this.props,l))}}],[{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}}])})(M.PureComponent);DL=zi;Oi(zi,"displayName","Bar");Oi(zi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ls.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Oi(zi,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,l=e.xAxis,c=e.yAxis,d=e.xAxisTicks,f=e.yAxisTicks,h=e.stackedData,p=e.dataStartIndex,x=e.displayedData,y=e.offset,j=Mte(r,n);if(!j)return null;var w=t.layout,S=n.type.defaultProps,v=S!==void 0?qt(qt({},S),n.props):n.props,_=v.dataKey,O=v.children,A=v.minPointSize,T=w==="horizontal"?c:l,N=h?T.scale.domain():null,E=$te({numericAxis:T}),k=Jn(O,rp),R=x.map(function(L,D){var z,$,F,Y,K,B;h?z=kte(h[p+D],N):(z=Yt(L,_),Array.isArray(z)||(z=[E,z]));var H=Wse(A,DL.defaultProps.minPointSize)(z[1],D);if(w==="horizontal"){var Q,ie=[c.scale(z[0]),c.scale(z[1])],ce=ie[0],I=ie[1];$=d3({axis:l,ticks:d,bandSize:i,offset:j.offset,entry:L,index:D}),F=(Q=I??ce)!==null&&Q!==void 0?Q:void 0,Y=j.size;var G=ce-I;if(K=Number.isNaN(G)?0:G,B={x:$,y:c.y,width:Y,height:c.height},Math.abs(H)>0&&Math.abs(K)<Math.abs(H)){var ae=wn(K||H)*(Math.abs(H)-Math.abs(K));F-=ae,K+=ae}}else{var fe=[l.scale(z[0]),l.scale(z[1])],ye=fe[0],we=fe[1];if($=ye,F=d3({axis:c,ticks:f,bandSize:i,offset:j.offset,entry:L,index:D}),Y=we-ye,K=j.size,B={x:l.x,y:F,width:l.width,height:K},Math.abs(H)>0&&Math.abs(Y)<Math.abs(H)){var Ie=wn(Y||H)*(Math.abs(H)-Math.abs(Y));Y+=Ie}}return qt(qt(qt({},L),{},{x:$,y:F,width:Y,height:K,value:h?z:z[1],payload:L,background:B},k&&k[D]&&k[D].props),{},{tooltipPayload:[cL(n,L)],tooltipPosition:{x:$+Y/2,y:F+K/2}})});return qt({data:R,layout:w},y)});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 ooe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $4(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 loe(e,t,n){return t&&$4(e.prototype,t),n&&$4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function B4(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 Pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B4(Object(n),!0).forEach(function(r){wp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wp(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=coe(e,"string");return Gu(t)=="symbol"?t:t+""}function coe(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 BL=function(t,n,r,i,l){var c=t.width,d=t.height,f=t.layout,h=t.children,p=Object.keys(n),x={left:r.left,leftMirror:r.left,right:c-r.right,rightMirror:c-r.right,top:r.top,topMirror:r.top,bottom:d-r.bottom,bottomMirror:d-r.bottom},y=!!Yn(h,zi);return p.reduce(function(j,w){var S=n[w],v=S.orientation,_=S.domain,O=S.padding,A=O===void 0?{}:O,T=S.mirror,N=S.reversed,E="".concat(v).concat(T?"Mirror":""),k,R,L,D,z;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var $=_[1]-_[0],F=1/0,Y=S.categoricalDomain.sort(vK);if(Y.forEach(function(fe,ye){ye>0&&(F=Math.min((fe||0)-(Y[ye-1]||0),F))}),Number.isFinite(F)){var K=F/$,B=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(k=K*B/2),S.padding==="no-gap"){var H=Sn(t.barCategoryGap,K*B),Q=K*B/2;k=Q-H-(Q-H)/B*H}}}i==="xAxis"?R=[r.left+(A.left||0)+(k||0),r.left+r.width-(A.right||0)-(k||0)]:i==="yAxis"?R=f==="horizontal"?[r.top+r.height-(A.bottom||0),r.top+(A.top||0)]:[r.top+(A.top||0)+(k||0),r.top+r.height-(A.bottom||0)-(k||0)]:R=S.range,N&&(R=[R[1],R[0]]);var ie=iL(S,l,y),ce=ie.scale,I=ie.realScaleType;ce.domain(_).range(R),sL(ce);var G=oL(ce,Pr(Pr({},S),{},{realScaleType:I}));i==="xAxis"?(z=v==="top"&&!T||v==="bottom"&&T,L=r.left,D=x[E]-z*S.height):i==="yAxis"&&(z=v==="left"&&!T||v==="right"&&T,L=x[E]-z*S.width,D=r.top);var ae=Pr(Pr(Pr({},S),G),{},{realScaleType:I,x:L,y:D,scale:ce,width:i==="xAxis"?r.width:S.width,height:i==="yAxis"?r.height:S.height});return ae.bandSize=om(ae,G),!S.hide&&i==="xAxis"?x[E]+=(z?-1:1)*ae.height:S.hide||(x[E]+=(z?-1:1)*ae.width),Pr(Pr({},j),{},wp({},w,ae))},{})},IL=function(t,n){var r=t.x,i=t.y,l=n.x,c=n.y;return{x:Math.min(r,l),y:Math.min(i,c),width:Math.abs(l-r),height:Math.abs(c-i)}},uoe=function(t){var n=t.x1,r=t.y1,i=t.x2,l=t.y2;return IL({x:n,y:r},{x:i,y:l})},qL=(function(){function e(t){ooe(this,e),this.scale=t}return loe(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,l=r.position;if(n!==void 0){if(l)switch(l){case"start":return this.scale(n);case"middle":{var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}case"end":{var d=this.bandwidth?this.bandwidth():0;return this.scale(n)+d}default:return this.scale(n)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],l=r[r.length-1];return i<=l?n>=i&&n<=l:n>=l&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();wp(qL,"EPS",1e-4);var u2=function(t){var n=Object.keys(t).reduce(function(r,i){return Pr(Pr({},r),{},wp({},i,qL.create(t[i])))},{});return Pr(Pr({},n),{},{apply:function(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=l.bandAware,d=l.position;return $se(i,function(f,h){return n[h].apply(f,{bandAware:c,position:d})})},isInRange:function(i){return RL(i,function(l,c){return n[c].isInRange(l)})}})};function doe(e){return(e%180+180)%180}var foe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=doe(i),c=l*Math.PI/180,d=Math.atan(r/n),f=c>d&&c<Math.PI-d?r/Math.sin(c):n/Math.cos(c);return Math.abs(f)},l1,I4;function hoe(){if(I4)return l1;I4=1;var e=sa(),t=id(),n=ep();function r(i){return function(l,c,d){var f=Object(l);if(!t(l)){var h=e(c,3);l=n(l),c=function(x){return h(f[x],x,f)}}var p=i(l,c,d);return p>-1?f[h?l[p]:p]:void 0}}return l1=r,l1}var c1,q4;function moe(){if(q4)return c1;q4=1;var e=CL();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return c1=t,c1}var u1,U4;function poe(){if(U4)return u1;U4=1;var e=q6(),t=sa(),n=moe(),r=Math.max;function i(l,c,d){var f=l==null?0:l.length;if(!f)return-1;var h=d==null?0:n(d);return h<0&&(h=r(f+h,0)),e(l,t(c,3),h)}return u1=i,u1}var d1,V4;function xoe(){if(V4)return d1;V4=1;var e=hoe(),t=poe(),n=e(t);return d1=n,d1}var yoe=xoe();const goe=st(yoe);var voe=r6();const boe=st(voe);var joe=boe(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("")}),d2=M.createContext(void 0),f2=M.createContext(void 0),UL=M.createContext(void 0),VL=M.createContext({}),HL=M.createContext(void 0),FL=M.createContext(0),GL=M.createContext(0),H4=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,l=n.offset,c=t.clipPathId,d=t.children,f=t.width,h=t.height,p=joe(l);return U.createElement(d2.Provider,{value:r},U.createElement(f2.Provider,{value:i},U.createElement(VL.Provider,{value:l},U.createElement(UL.Provider,{value:p},U.createElement(HL.Provider,{value:c},U.createElement(FL.Provider,{value:h},U.createElement(GL.Provider,{value:f},d)))))))},woe=function(){return M.useContext(HL)},KL=function(t){var n=M.useContext(d2);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},Soe=function(){var t=M.useContext(d2);return Ai(t)},Noe=function(){var t=M.useContext(f2),n=goe(t,function(r){return RL(r.domain,Number.isFinite)});return n||Ai(t)},YL=function(t){var n=M.useContext(f2);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},Aoe=function(){var t=M.useContext(UL);return t},_oe=function(){return M.useContext(VL)},h2=function(){return M.useContext(GL)},m2=function(){return M.useContext(FL)};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 Ooe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Toe(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,WL(r.key),r)}}function Eoe(e,t,n){return t&&Toe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Coe(e,t,n){return t=_m(t),Moe(e,XL()?Reflect.construct(t,n||[],_m(e).constructor):t.apply(e,n))}function Moe(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 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 XL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XL=function(){return!!e})()}function _m(e){return _m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_m(e)}function Poe(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&&rw(e,t)}function rw(e,t){return rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rw(e,t)}function F4(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 G4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F4(Object(n),!0).forEach(function(r){p2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p2(e,t,n){return t=WL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WL(e){var t=Roe(e,"string");return dl(t)=="symbol"?t:t+""}function Roe(e,t){if(dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Doe(e,t){return Boe(e)||$oe(e,t)||Loe(e,t)||zoe()}function zoe(){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 Loe(e,t){if(e){if(typeof e=="string")return K4(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 K4(e,t)}}function K4(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 $oe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function Boe(e){if(Array.isArray(e))return e}function aw(){return aw=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},aw.apply(this,arguments)}var Ioe=function(t,n){var r;return U.isValidElement(t)?r=U.cloneElement(t,n):Te(t)?r=t(n):r=U.createElement("line",aw({},n,{className:"recharts-reference-line-line"})),r},qoe=function(t,n,r,i,l,c,d,f,h){var p=l.x,x=l.y,y=l.width,j=l.height;if(r){var w=h.y,S=t.y.apply(w,{position:c});if(ea(h,"discard")&&!t.y.isInRange(S))return null;var v=[{x:p+y,y:S},{x:p,y:S}];return f==="left"?v.reverse():v}if(n){var _=h.x,O=t.x.apply(_,{position:c});if(ea(h,"discard")&&!t.x.isInRange(O))return null;var A=[{x:O,y:x+j},{x:O,y:x}];return d==="top"?A.reverse():A}if(i){var T=h.segment,N=T.map(function(E){return t.apply(E,{position:c})});return ea(h,"discard")&&Rse(N,function(E){return!t.isInRange(E)})?null:N}return null};function Uoe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,l=e.yAxisId,c=e.shape,d=e.className,f=e.alwaysShow,h=woe(),p=KL(i),x=YL(l),y=Aoe();if(!h||!y)return null;Br(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var j=u2({x:p.scale,y:x.scale}),w=Xt(t),S=Xt(n),v=r&&r.length===2,_=qoe(j,w,S,v,y,e.position,p.orientation,x.orientation,e);if(!_)return null;var O=Doe(_,2),A=O[0],T=A.x,N=A.y,E=O[1],k=E.x,R=E.y,L=ea(e,"hidden")?"url(#".concat(h,")"):void 0,D=G4(G4({clipPath:L},je(e,!0)),{},{x1:T,y1:N,x2:k,y2:R});return U.createElement(We,{className:ze("recharts-reference-line",d)},Ioe(c,D),en.renderCallByParent(e,uoe({x1:T,y1:N,x2:k,y2:R})))}var x2=(function(e){function t(){return Ooe(this,t),Coe(this,t,arguments)}return Poe(t,e),Eoe(t,[{key:"render",value:function(){return U.createElement(Uoe,this.props)}}])})(U.Component);p2(x2,"displayName","ReferenceLine");p2(x2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function iw(){return iw=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},iw.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 Y4(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 X4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y4(Object(n),!0).forEach(function(r){Sp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Voe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hoe(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,QL(r.key),r)}}function Foe(e,t,n){return t&&Hoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Goe(e,t,n){return t=Om(t),Koe(e,ZL()?Reflect.construct(t,n||[],Om(e).constructor):t.apply(e,n))}function Koe(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 Yoe(e)}function Yoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZL=function(){return!!e})()}function Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Om(e)}function Xoe(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&&sw(e,t)}function sw(e,t){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sw(e,t)}function Sp(e,t,n){return t=QL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QL(e){var t=Woe(e,"string");return fl(t)=="symbol"?t:t+""}function Woe(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 Zoe=function(t){var n=t.x,r=t.y,i=t.xAxis,l=t.yAxis,c=u2({x:i.scale,y:l.scale}),d=c.apply({x:n,y:r},{bandAware:!0});return ea(t,"discard")&&!c.isInRange(d)?null:d},Np=(function(e){function t(){return Voe(this,t),Goe(this,t,arguments)}return Xoe(t,e),Foe(t,[{key:"render",value:function(){var r=this.props,i=r.x,l=r.y,c=r.r,d=r.alwaysShow,f=r.clipPathId,h=Xt(i),p=Xt(l);if(Br(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!p)return null;var x=Zoe(this.props);if(!x)return null;var y=x.x,j=x.y,w=this.props,S=w.shape,v=w.className,_=ea(this.props,"hidden")?"url(#".concat(f,")"):void 0,O=X4(X4({clipPath:_},je(this.props,!0)),{},{cx:y,cy:j});return U.createElement(We,{className:ze("recharts-reference-dot",v)},t.renderDot(S,O),en.renderCallByParent(this.props,{x:y-c,y:j-c,width:2*c,height:2*c}))}}])})(U.Component);Sp(Np,"displayName","ReferenceDot");Sp(Np,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Sp(Np,"renderDot",function(e,t){var n;return U.isValidElement(e)?n=U.cloneElement(e,t):Te(e)?n=e(t):n=U.createElement(pp,iw({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function ow(){return ow=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},ow.apply(this,arguments)}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 W4(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 Z4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W4(Object(n),!0).forEach(function(r){Ap(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Joe(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,e8(r.key),r)}}function ele(e,t,n){return t&&Joe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tle(e,t,n){return t=Tm(t),nle(e,JL()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function nle(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 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 JL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JL=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(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&&lw(e,t)}function lw(e,t){return lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lw(e,t)}function Ap(e,t,n){return t=e8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e8(e){var t=ile(e,"string");return hl(t)=="symbol"?t:t+""}function ile(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 sle=function(t,n,r,i,l){var c=l.x1,d=l.x2,f=l.y1,h=l.y2,p=l.xAxis,x=l.yAxis;if(!p||!x)return null;var y=u2({x:p.scale,y:x.scale}),j={x:t?y.x.apply(c,{position:"start"}):y.x.rangeMin,y:r?y.y.apply(f,{position:"start"}):y.y.rangeMin},w={x:n?y.x.apply(d,{position:"end"}):y.x.rangeMax,y:i?y.y.apply(h,{position:"end"}):y.y.rangeMax};return ea(l,"discard")&&(!y.isInRange(j)||!y.isInRange(w))?null:IL(j,w)},_p=(function(e){function t(){return Qoe(this,t),tle(this,t,arguments)}return ale(t,e),ele(t,[{key:"render",value:function(){var r=this.props,i=r.x1,l=r.x2,c=r.y1,d=r.y2,f=r.className,h=r.alwaysShow,p=r.clipPathId;Br(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=Xt(i),y=Xt(l),j=Xt(c),w=Xt(d),S=this.props.shape;if(!x&&!y&&!j&&!w&&!S)return null;var v=sle(x,y,j,w,this.props);if(!v&&!S)return null;var _=ea(this.props,"hidden")?"url(#".concat(p,")"):void 0;return U.createElement(We,{className:ze("recharts-reference-area",f)},t.renderRect(S,Z4(Z4({clipPath:_},je(this.props,!0)),v)),en.renderCallByParent(this.props,v))}}])})(U.Component);Ap(_p,"displayName","ReferenceArea");Ap(_p,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Ap(_p,"renderRect",function(e,t){var n;return U.isValidElement(e)?n=U.cloneElement(e,t):Te(e)?n=e(t):n=U.createElement(c2,ow({},t,{className:"recharts-reference-area-rect"})),n});function t8(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 ole(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return foe(r,n)}function lle(e,t,n){var r=n==="width",i=e.x,l=e.y,c=e.width,d=e.height;return t===1?{start:r?i:l,end:r?i+c:l+d}:{start:r?i+c:l+d,end:r?i:l}}function Em(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var l=n();return e*(t-e*l/2-r)>=0&&e*(t+e*l/2-i)<=0}function cle(e,t){return t8(e,t+1)}function ule(e,t,n,r,i){for(var l=(r||[]).slice(),c=t.start,d=t.end,f=0,h=1,p=c,x=function(){var w=r==null?void 0:r[f];if(w===void 0)return{v:t8(r,h)};var S=f,v,_=function(){return v===void 0&&(v=n(w,S)),v},O=w.coordinate,A=f===0||Em(e,O,_,p,d);A||(f=0,p=c,h+=1),A&&(p=O+e*(_()/2+i),f+=h)},y;h<=l.length;)if(y=x(),y)return y.v;return[]}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 Q4(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?Q4(Object(n),!0).forEach(function(r){dle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dle(e,t,n){return t=fle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fle(e){var t=hle(e,"string");return Ku(t)=="symbol"?t:t+""}function hle(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 mle(e,t,n,r,i){for(var l=(r||[]).slice(),c=l.length,d=t.start,f=t.end,h=function(y){var j=l[y],w,S=function(){return w===void 0&&(w=n(j,y)),w};if(y===c-1){var v=e*(j.coordinate+e*S()/2-f);l[y]=j=yn(yn({},j),{},{tickCoord:v>0?j.coordinate-v*e:j.coordinate})}else l[y]=j=yn(yn({},j),{},{tickCoord:j.coordinate});var _=Em(e,j.tickCoord,S,d,f);_&&(f=j.tickCoord-e*(S()/2+i),l[y]=yn(yn({},j),{},{isShow:!0}))},p=c-1;p>=0;p--)h(p);return l}function ple(e,t,n,r,i,l){var c=(r||[]).slice(),d=c.length,f=t.start,h=t.end;if(l){var p=r[d-1],x=n(p,d-1),y=e*(p.coordinate+e*x/2-h);c[d-1]=p=yn(yn({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate});var j=Em(e,p.tickCoord,function(){return x},f,h);j&&(h=p.tickCoord-e*(x/2+i),c[d-1]=yn(yn({},p),{},{isShow:!0}))}for(var w=l?d-1:d,S=function(O){var A=c[O],T,N=function(){return T===void 0&&(T=n(A,O)),T};if(O===0){var E=e*(A.coordinate-e*N()/2-f);c[O]=A=yn(yn({},A),{},{tickCoord:E<0?A.coordinate-E*e:A.coordinate})}else c[O]=A=yn(yn({},A),{},{tickCoord:A.coordinate});var k=Em(e,A.tickCoord,N,f,h);k&&(f=A.tickCoord+e*(N()/2+i),c[O]=yn(yn({},A),{},{isShow:!0}))},v=0;v<w;v++)S(v);return c}function y2(e,t,n){var r=e.tick,i=e.ticks,l=e.viewBox,c=e.minTickGap,d=e.orientation,f=e.interval,h=e.tickFormatter,p=e.unit,x=e.angle;if(!i||!i.length||!r)return[];if(he(f)||Ls.isSsr)return cle(i,typeof f=="number"&&he(f)?f:0);var y=[],j=d==="top"||d==="bottom"?"width":"height",w=p&&j==="width"?nu(p,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(A,T){var N=Te(h)?h(A.value,T):A.value;return j==="width"?ole(nu(N,{fontSize:t,letterSpacing:n}),w,x):nu(N,{fontSize:t,letterSpacing:n})[j]},v=i.length>=2?wn(i[1].coordinate-i[0].coordinate):1,_=lle(l,v,j);return f==="equidistantPreserveStart"?ule(v,_,S,i,c):(f==="preserveStart"||f==="preserveStartEnd"?y=ple(v,_,S,i,c,f==="preserveStartEnd"):y=mle(v,_,S,i,c),y.filter(function(O){return O.isShow}))}var xle=["viewBox"],yle=["viewBox"],gle=["ticks"];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 Lo(){return Lo=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},Lo.apply(this,arguments)}function J4(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 Ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J4(Object(n),!0).forEach(function(r){g2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function f1(e,t){if(e==null)return{};var n=vle(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vle(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 ble(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eR(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,r8(r.key),r)}}function jle(e,t,n){return t&&eR(e.prototype,t),n&&eR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wle(e,t,n){return t=Cm(t),Sle(e,n8()?Reflect.construct(t,n||[],Cm(e).constructor):t.apply(e,n))}function Sle(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 Nle(e)}function Nle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n8=function(){return!!e})()}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cm(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&&cw(e,t)}function cw(e,t){return cw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cw(e,t)}function g2(e,t,n){return t=r8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r8(e){var t=_le(e,"string");return ml(t)=="symbol"?t:t+""}function _le(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)}var Ll=(function(e){function t(n){var r;return ble(this,t),r=wle(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Ale(t,e),jle(t,[{key:"shouldComponentUpdate",value:function(r,i){var l=r.viewBox,c=f1(r,xle),d=this.props,f=d.viewBox,h=f1(d,yle);return!Uo(l,f)||!Uo(c,h)||!Uo(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,l=i.x,c=i.y,d=i.width,f=i.height,h=i.orientation,p=i.tickSize,x=i.mirror,y=i.tickMargin,j,w,S,v,_,O,A=x?-1:1,T=r.tickSize||p,N=he(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":j=w=r.coordinate,v=c+ +!x*f,S=v-A*T,O=S-A*y,_=N;break;case"left":S=v=r.coordinate,w=l+ +!x*d,j=w-A*T,_=j-A*y,O=N;break;case"right":S=v=r.coordinate,w=l+ +x*d,j=w+A*T,_=j+A*y,O=N;break;default:j=w=r.coordinate,v=c+ +x*f,S=v+A*T,O=S+A*y,_=N;break}return{line:{x1:j,y1:S,x2:w,y2:v},tick:{x:_,y:O}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,l=r.mirror,c;switch(i){case"left":c=l?"start":"end";break;case"right":c=l?"end":"start";break;default:c="middle";break}return c}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,l=r.mirror,c="end";switch(i){case"left":case"right":c="middle";break;case"top":c=l?"start":"end";break;default:c=l?"end":"start";break}return c}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,l=r.y,c=r.width,d=r.height,f=r.orientation,h=r.mirror,p=r.axisLine,x=Ft(Ft(Ft({},je(this.props,!1)),je(p,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var y=+(f==="top"&&!h||f==="bottom"&&h);x=Ft(Ft({},x),{},{x1:i,y1:l+y*d,x2:i+c,y2:l+y*d})}else{var j=+(f==="left"&&!h||f==="right"&&h);x=Ft(Ft({},x),{},{x1:i+j*c,y1:l,x2:i+j*c,y2:l+d})}return U.createElement("line",Lo({},x,{className:ze("recharts-cartesian-axis-line",Qn(p,"className"))}))}},{key:"renderTicks",value:function(r,i,l){var c=this,d=this.props,f=d.tickLine,h=d.stroke,p=d.tick,x=d.tickFormatter,y=d.unit,j=y2(Ft(Ft({},this.props),{},{ticks:r}),i,l),w=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),v=je(this.props,!1),_=je(p,!1),O=Ft(Ft({},v),{},{fill:"none"},je(f,!1)),A=j.map(function(T,N){var E=c.getTickLineCoord(T),k=E.line,R=E.tick,L=Ft(Ft(Ft(Ft({textAnchor:w,verticalAnchor:S},v),{},{stroke:"none",fill:h},_),R),{},{index:N,payload:T,visibleTicksCount:j.length,tickFormatter:x});return U.createElement(We,Lo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},Cs(c.props,T,N)),f&&U.createElement("line",Lo({},O,k,{className:ze("recharts-cartesian-axis-tick-line",Qn(f,"className"))})),p&&t.renderTickItem(p,L,"".concat(Te(x)?x(T.value,N):T.value).concat(y||"")))});return U.createElement("g",{className:"recharts-cartesian-axis-ticks"},A)}},{key:"render",value:function(){var r=this,i=this.props,l=i.axisLine,c=i.width,d=i.height,f=i.ticksGenerator,h=i.className,p=i.hide;if(p)return null;var x=this.props,y=x.ticks,j=f1(x,gle),w=y;return Te(f)&&(w=y&&y.length>0?f(this.props):f(j)),c<=0||d<=0||!w||!w.length?null:U.createElement(We,{className:ze("recharts-cartesian-axis",h),ref:function(v){r.layerReference=v}},l&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),en.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,l){var c,d=ze(i.className,"recharts-cartesian-axis-tick-value");return U.isValidElement(r)?c=U.cloneElement(r,Ft(Ft({},i),{},{className:d})):Te(r)?c=r(Ft(Ft({},i),{},{className:d})):c=U.createElement(Ms,Lo({},i,{className:"recharts-cartesian-axis-tick-value"}),l),c}}])})(M.Component);g2(Ll,"displayName","CartesianAxis");g2(Ll,"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 Ole=["x1","y1","x2","y2","key"],Tle=["offset"];function Rs(e){"@babel/helpers - typeof";return Rs=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},Rs(e)}function tR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tR(Object(n),!0).forEach(function(r){Ele(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ele(e,t,n){return t=Cle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cle(e){var t=Mle(e,"string");return Rs(t)=="symbol"?t:t+""}function Mle(e,t){if(Rs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ws(){return ws=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},ws.apply(this,arguments)}function nR(e,t){if(e==null)return{};var n=kle(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kle(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 Ple=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,l=t.y,c=t.width,d=t.height,f=t.ry;return U.createElement("rect",{x:i,y:l,ry:f,width:c,height:d,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function a8(e,t){var n;if(U.isValidElement(e))n=U.cloneElement(e,t);else if(Te(e))n=e(t);else{var r=t.x1,i=t.y1,l=t.x2,c=t.y2,d=t.key,f=nR(t,Ole),h=je(f,!1);h.offset;var p=nR(h,Tle);n=U.createElement("line",ws({},p,{x1:r,y1:i,x2:l,y2:c,fill:"none",key:d}))}return n}function Rle(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,l=e.horizontalPoints;if(!i||!l||!l.length)return null;var c=l.map(function(d,f){var h=gn(gn({},e),{},{x1:t,y1:d,x2:t+n,y2:d,key:"line-".concat(f),index:f});return a8(i,h)});return U.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Dle(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,l=e.verticalPoints;if(!i||!l||!l.length)return null;var c=l.map(function(d,f){var h=gn(gn({},e),{},{x1:d,y1:t,x2:d,y2:t+n,key:"line-".concat(f),index:f});return a8(i,h)});return U.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function zle(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,l=e.width,c=e.height,d=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length)return null;var p=d.map(function(y){return Math.round(y+i-i)}).sort(function(y,j){return y-j});i!==p[0]&&p.unshift(0);var x=p.map(function(y,j){var w=!p[j+1],S=w?i+c-y:p[j+1]-y;if(S<=0)return null;var v=j%t.length;return U.createElement("rect",{key:"react-".concat(j),y,x:r,height:S,width:l,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},x)}function Lle(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,l=e.x,c=e.y,d=e.width,f=e.height,h=e.verticalPoints;if(!n||!r||!r.length)return null;var p=h.map(function(y){return Math.round(y+l-l)}).sort(function(y,j){return y-j});l!==p[0]&&p.unshift(0);var x=p.map(function(y,j){var w=!p[j+1],S=w?l+d-y:p[j+1]-y;if(S<=0)return null;var v=j%r.length;return U.createElement("rect",{key:"react-".concat(j),x:y,y:c,width:S,height:f,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},x)}var $le=function(t,n){var r=t.xAxis,i=t.width,l=t.height,c=t.offset;return aL(y2(gn(gn(gn({},Ll.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.left,c.left+c.width,n)},Ble=function(t,n){var r=t.yAxis,i=t.width,l=t.height,c=t.offset;return aL(y2(gn(gn(gn({},Ll.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.top,c.top+c.height,n)},To={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function uw(e){var t,n,r,i,l,c,d=h2(),f=m2(),h=_oe(),p=gn(gn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:To.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:To.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:To.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:To.horizontalFill,vertical:(l=e.vertical)!==null&&l!==void 0?l:To.vertical,verticalFill:(c=e.verticalFill)!==null&&c!==void 0?c:To.verticalFill,x:he(e.x)?e.x:h.left,y:he(e.y)?e.y:h.top,width:he(e.width)?e.width:h.width,height:he(e.height)?e.height:h.height}),x=p.x,y=p.y,j=p.width,w=p.height,S=p.syncWithTicks,v=p.horizontalValues,_=p.verticalValues,O=Soe(),A=Noe();if(!he(j)||j<=0||!he(w)||w<=0||!he(x)||x!==+x||!he(y)||y!==+y)return null;var T=p.verticalCoordinatesGenerator||$le,N=p.horizontalCoordinatesGenerator||Ble,E=p.horizontalPoints,k=p.verticalPoints;if((!E||!E.length)&&Te(N)){var R=v&&v.length,L=N({yAxis:A?gn(gn({},A),{},{ticks:R?v:A.ticks}):void 0,width:d,height:f,offset:h},R?!0:S);Br(Array.isArray(L),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(L),"]")),Array.isArray(L)&&(E=L)}if((!k||!k.length)&&Te(T)){var D=_&&_.length,z=T({xAxis:O?gn(gn({},O),{},{ticks:D?_:O.ticks}):void 0,width:d,height:f,offset:h},D?!0:S);Br(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(z),"]")),Array.isArray(z)&&(k=z)}return U.createElement("g",{className:"recharts-cartesian-grid"},U.createElement(Ple,{fill:p.fill,fillOpacity:p.fillOpacity,x:p.x,y:p.y,width:p.width,height:p.height,ry:p.ry}),U.createElement(Rle,ws({},p,{offset:h,horizontalPoints:E,xAxis:O,yAxis:A})),U.createElement(Dle,ws({},p,{offset:h,verticalPoints:k,xAxis:O,yAxis:A})),U.createElement(zle,ws({},p,{horizontalPoints:E})),U.createElement(Lle,ws({},p,{verticalPoints:k})))}uw.displayName="CartesianGrid";var Ile=["type","layout","connectNulls","ref"],qle=["key"];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 rR(e,t){if(e==null)return{};var n=Ule(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ule(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 lu(){return lu=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},lu.apply(this,arguments)}function aR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aR(Object(n),!0).forEach(function(r){Rr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eo(e){return Gle(e)||Fle(e)||Hle(e)||Vle()}function Vle(){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 Hle(e,t){if(e){if(typeof e=="string")return dw(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 dw(e,t)}}function Fle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gle(e){if(Array.isArray(e))return dw(e)}function dw(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 Kle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iR(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,s8(r.key),r)}}function Yle(e,t,n){return t&&iR(e.prototype,t),n&&iR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xle(e,t,n){return t=Mm(t),Wle(e,i8()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}function Wle(e,t){if(t&&(pl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zle(e)}function Zle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i8=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mm(e)}function Qle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fw(e,t)}function fw(e,t){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fw(e,t)}function Rr(e,t,n){return t=s8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s8(e){var t=Jle(e,"string");return pl(t)=="symbol"?t:t+""}function Jle(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 fd=(function(e){function t(){var n;Kle(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=Xle(this,t,[].concat(i)),Rr(n,"state",{isAnimationFinished:!0,totalLength:0}),Rr(n,"generateSimpleStrokeDasharray",function(c,d){return"".concat(d,"px ").concat(c-d,"px")}),Rr(n,"getStrokeDasharray",function(c,d,f){var h=f.reduce(function(_,O){return _+O});if(!h)return n.generateSimpleStrokeDasharray(d,c);for(var p=Math.floor(c/h),x=c%h,y=d-c,j=[],w=0,S=0;w<f.length;S+=f[w],++w)if(S+f[w]>x){j=[].concat(Eo(f.slice(0,w)),[x-S]);break}var v=j.length%2===0?[0,y]:[y];return[].concat(Eo(t.repeat(f,p)),Eo(j),v).map(function(_){return"".concat(_,"px")}).join(", ")}),Rr(n,"id",kl("recharts-line-")),Rr(n,"pathRef",function(c){n.mainCurve=c}),Rr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Rr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Qle(t,e),Yle(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 l=this.props,c=l.points,d=l.xAxis,f=l.yAxis,h=l.layout,p=l.children,x=Jn(p,dd);if(!x)return null;var y=function(S,v){return{x:S.x,y:S.y,value:S.value,errorVal:Yt(S.payload,v)}},j={clipPath:r?"url(#clipPath-".concat(i,")"):null};return U.createElement(We,j,x.map(function(w){return U.cloneElement(w,{key:"bar-".concat(w.props.dataKey),data:c,xAxis:d,yAxis:f,layout:h,dataPointFormatter:y})}))}},{key:"renderDots",value:function(r,i,l){var c=this.props.isAnimationActive;if(c&&!this.state.isAnimationFinished)return null;var d=this.props,f=d.dot,h=d.points,p=d.dataKey,x=je(this.props,!1),y=je(f,!0),j=h.map(function(S,v){var _=Gn(Gn(Gn({key:"dot-".concat(v),r:3},x),y),{},{index:v,cx:S.x,cy:S.y,value:S.value,dataKey:p,payload:S.payload,points:h});return t.renderDotItem(f,_)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(l,")"):null};return U.createElement(We,lu({className:"recharts-line-dots",key:"dots"},w),j)}},{key:"renderCurveStatically",value:function(r,i,l,c){var d=this.props,f=d.type,h=d.layout,p=d.connectNulls;d.ref;var x=rR(d,Ile),y=Gn(Gn(Gn({},je(x,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(l,")"):null,points:r},c),{},{type:f,layout:h,connectNulls:p});return U.createElement(um,lu({},y,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var l=this,c=this.props,d=c.points,f=c.strokeDasharray,h=c.isAnimationActive,p=c.animationBegin,x=c.animationDuration,y=c.animationEasing,j=c.animationId,w=c.animateNewValues,S=c.width,v=c.height,_=this.state,O=_.prevPoints,A=_.totalLength;return U.createElement(aa,{begin:p,duration:x,isActive:h,easing:y,from:{t:0},to:{t:1},key:"line-".concat(j),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var N=T.t;if(O){var E=O.length/d.length,k=d.map(function($,F){var Y=Math.floor(F*E);if(O[Y]){var K=O[Y],B=Xn(K.x,$.x),H=Xn(K.y,$.y);return Gn(Gn({},$),{},{x:B(N),y:H(N)})}if(w){var Q=Xn(S*2,$.x),ie=Xn(v/2,$.y);return Gn(Gn({},$),{},{x:Q(N),y:ie(N)})}return Gn(Gn({},$),{},{x:$.x,y:$.y})});return l.renderCurveStatically(k,r,i)}var R=Xn(0,A),L=R(N),D;if(f){var z="".concat(f).split(/[,\s]+/gim).map(function($){return parseFloat($)});D=l.getStrokeDasharray(L,A,z)}else D=l.generateSimpleStrokeDasharray(A,L);return l.renderCurveStatically(d,r,i,{strokeDasharray:D})})}},{key:"renderCurve",value:function(r,i){var l=this.props,c=l.points,d=l.isAnimationActive,f=this.state,h=f.prevPoints,p=f.totalLength;return d&&c&&c.length&&(!h&&p>0||!ud(h,c))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(c,r,i)}},{key:"render",value:function(){var r,i=this.props,l=i.hide,c=i.dot,d=i.points,f=i.className,h=i.xAxis,p=i.yAxis,x=i.top,y=i.left,j=i.width,w=i.height,S=i.isAnimationActive,v=i.id;if(l||!d||!d.length)return null;var _=this.state.isAnimationFinished,O=d.length===1,A=ze("recharts-line",f),T=h&&h.allowDataOverflow,N=p&&p.allowDataOverflow,E=T||N,k=Re(v)?this.id:v,R=(r=je(c,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=R.r,D=L===void 0?3:L,z=R.strokeWidth,$=z===void 0?2:z,F=TK(c)?c:{},Y=F.clipDot,K=Y===void 0?!0:Y,B=D*2+$;return U.createElement(We,{className:A},T||N?U.createElement("defs",null,U.createElement("clipPath",{id:"clipPath-".concat(k)},U.createElement("rect",{x:T?y:y-j/2,y:N?x:x-w/2,width:T?j:j*2,height:N?w:w*2})),!K&&U.createElement("clipPath",{id:"clipPath-dots-".concat(k)},U.createElement("rect",{x:y-B/2,y:x-B/2,width:j+B,height:w+B}))):null,!O&&this.renderCurve(E,k),this.renderErrorBar(E,k),(O||c)&&this.renderDots(E,K,k),(!S||_)&&$a.renderCallByParent(this.props,d))}}],[{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 l=r.length%2!==0?[].concat(Eo(r),[0]):r,c=[],d=0;d<i;++d)c=[].concat(Eo(c),Eo(l));return c}},{key:"renderDotItem",value:function(r,i){var l;if(U.isValidElement(r))l=U.cloneElement(r,i);else if(Te(r))l=r(i);else{var c=i.key,d=rR(i,qle),f=ze("recharts-line-dot",typeof r!="boolean"?r.className:"");l=U.createElement(pp,lu({key:c},d,{className:f}))}return l}}])})(M.PureComponent);Rr(fd,"displayName","Line");Rr(fd,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ls.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Rr(fd,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,l=e.yAxisTicks,c=e.dataKey,d=e.bandSize,f=e.displayedData,h=e.offset,p=t.layout,x=f.map(function(y,j){var w=Yt(y,c);return p==="horizontal"?{x:u3({axis:n,ticks:i,bandSize:d,entry:y,index:j}),y:Re(w)?null:r.scale(w),value:w,payload:y}:{x:Re(w)?null:n.scale(w),y:u3({axis:r,ticks:l,bandSize:d,entry:y,index:j}),value:w,payload:y}});return Gn({points:x,layout:p},h)});function xl(e){"@babel/helpers - typeof";return xl=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},xl(e)}function ece(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tce(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,c8(r.key),r)}}function nce(e,t,n){return t&&tce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rce(e,t,n){return t=km(t),ace(e,o8()?Reflect.construct(t,n||[],km(e).constructor):t.apply(e,n))}function ace(e,t){if(t&&(xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ice(e)}function ice(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o8=function(){return!!e})()}function km(e){return km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},km(e)}function sce(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&&hw(e,t)}function hw(e,t){return hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hw(e,t)}function l8(e,t,n){return t=c8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c8(e){var t=oce(e,"string");return xl(t)=="symbol"?t:t+""}function oce(e,t){if(xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mw(){return mw=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},mw.apply(this,arguments)}function lce(e){var t=e.xAxisId,n=h2(),r=m2(),i=KL(t);return i==null?null:M.createElement(Ll,mw({},i,{className:ze("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(c){return Ra(c,!0)}}))}var yl=(function(e){function t(){return ece(this,t),rce(this,t,arguments)}return sce(t,e),nce(t,[{key:"render",value:function(){return M.createElement(lce,this.props)}}])})(M.Component);l8(yl,"displayName","XAxis");l8(yl,"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 gl(e){"@babel/helpers - typeof";return gl=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},gl(e)}function cce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uce(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,f8(r.key),r)}}function dce(e,t,n){return t&&uce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fce(e,t,n){return t=Pm(t),hce(e,u8()?Reflect.construct(t,n||[],Pm(e).constructor):t.apply(e,n))}function hce(e,t){if(t&&(gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mce(e)}function mce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u8=function(){return!!e})()}function Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pm(e)}function pce(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&&pw(e,t)}function pw(e,t){return pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pw(e,t)}function d8(e,t,n){return t=f8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f8(e){var t=xce(e,"string");return gl(t)=="symbol"?t:t+""}function xce(e,t){if(gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xw(){return xw=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},xw.apply(this,arguments)}var yce=function(t){var n=t.yAxisId,r=h2(),i=m2(),l=YL(n);return l==null?null:M.createElement(Ll,xw({},l,{className:ze("recharts-".concat(l.axisType," ").concat(l.axisType),l.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(d){return Ra(d,!0)}}))},vl=(function(e){function t(){return cce(this,t),fce(this,t,arguments)}return pce(t,e),dce(t,[{key:"render",value:function(){return M.createElement(yce,this.props)}}])})(M.Component);d8(vl,"displayName","YAxis");d8(vl,"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 sR(e){return jce(e)||bce(e)||vce(e)||gce()}function gce(){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 vce(e,t){if(e){if(typeof e=="string")return yw(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 yw(e,t)}}function bce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jce(e){if(Array.isArray(e))return yw(e)}function yw(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 gw=function(t,n,r,i,l){var c=Jn(t,x2),d=Jn(t,Np),f=[].concat(sR(c),sR(d)),h=Jn(t,_p),p="".concat(i,"Id"),x=i[0],y=n;if(f.length&&(y=f.reduce(function(S,v){if(v.props[p]===r&&ea(v.props,"extendDomain")&&he(v.props[x])){var _=v.props[x];return[Math.min(S[0],_),Math.max(S[1],_)]}return S},y)),h.length){var j="".concat(x,"1"),w="".concat(x,"2");y=h.reduce(function(S,v){if(v.props[p]===r&&ea(v.props,"extendDomain")&&he(v.props[j])&&he(v.props[w])){var _=v.props[j],O=v.props[w];return[Math.min(S[0],_,O),Math.max(S[1],_,O)]}return S},y)}return l&&l.length&&(y=l.reduce(function(S,v){return he(v)?[Math.min(S[0],v),Math.max(S[1],v)]:S},y)),y},h1={exports:{}},oR;function wce(){return oR||(oR=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function l(f,h,p,x,y){if(typeof p!="function")throw new TypeError("The listener must be a function");var j=new i(p,x||f,y),w=n?n+h:h;return f._events[w]?f._events[w].fn?f._events[w]=[f._events[w],j]:f._events[w].push(j):(f._events[w]=j,f._eventsCount++),f}function c(f,h){--f._eventsCount===0?f._events=new r:delete f._events[h]}function d(){this._events=new r,this._eventsCount=0}d.prototype.eventNames=function(){var h=[],p,x;if(this._eventsCount===0)return h;for(x in p=this._events)t.call(p,x)&&h.push(n?x.slice(1):x);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},d.prototype.listeners=function(h){var p=n?n+h:h,x=this._events[p];if(!x)return[];if(x.fn)return[x.fn];for(var y=0,j=x.length,w=new Array(j);y<j;y++)w[y]=x[y].fn;return w},d.prototype.listenerCount=function(h){var p=n?n+h:h,x=this._events[p];return x?x.fn?1:x.length:0},d.prototype.emit=function(h,p,x,y,j,w){var S=n?n+h:h;if(!this._events[S])return!1;var v=this._events[S],_=arguments.length,O,A;if(v.fn){switch(v.once&&this.removeListener(h,v.fn,void 0,!0),_){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,p),!0;case 3:return v.fn.call(v.context,p,x),!0;case 4:return v.fn.call(v.context,p,x,y),!0;case 5:return v.fn.call(v.context,p,x,y,j),!0;case 6:return v.fn.call(v.context,p,x,y,j,w),!0}for(A=1,O=new Array(_-1);A<_;A++)O[A-1]=arguments[A];v.fn.apply(v.context,O)}else{var T=v.length,N;for(A=0;A<T;A++)switch(v[A].once&&this.removeListener(h,v[A].fn,void 0,!0),_){case 1:v[A].fn.call(v[A].context);break;case 2:v[A].fn.call(v[A].context,p);break;case 3:v[A].fn.call(v[A].context,p,x);break;case 4:v[A].fn.call(v[A].context,p,x,y);break;default:if(!O)for(N=1,O=new Array(_-1);N<_;N++)O[N-1]=arguments[N];v[A].fn.apply(v[A].context,O)}}return!0},d.prototype.on=function(h,p,x){return l(this,h,p,x,!1)},d.prototype.once=function(h,p,x){return l(this,h,p,x,!0)},d.prototype.removeListener=function(h,p,x,y){var j=n?n+h:h;if(!this._events[j])return this;if(!p)return c(this,j),this;var w=this._events[j];if(w.fn)w.fn===p&&(!y||w.once)&&(!x||w.context===x)&&c(this,j);else{for(var S=0,v=[],_=w.length;S<_;S++)(w[S].fn!==p||y&&!w[S].once||x&&w[S].context!==x)&&v.push(w[S]);v.length?this._events[j]=v.length===1?v[0]:v:c(this,j)}return this},d.prototype.removeAllListeners=function(h){var p;return h?(p=n?n+h:h,this._events[p]&&c(this,p)):(this._events=new r,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=n,d.EventEmitter=d,e.exports=d})(h1)),h1.exports}var Sce=wce();const Nce=st(Sce);var m1=new Nce,p1="recharts.syncMouseEvents";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 Ace(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _ce(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,h8(r.key),r)}}function Oce(e,t,n){return t&&_ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function x1(e,t,n){return t=h8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h8(e){var t=Tce(e,"string");return Yu(t)=="symbol"?t:t+""}function Tce(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 String(e)}var Ece=(function(){function e(){Ace(this,e),x1(this,"activeIndex",0),x1(this,"coordinateList",[]),x1(this,"layout","horizontal")}return Oce(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,l=i===void 0?null:i,c=n.container,d=c===void 0?null:c,f=n.layout,h=f===void 0?null:f,p=n.offset,x=p===void 0?null:p,y=n.mouseHandlerCallback,j=y===void 0?null:y;this.coordinateList=(r=l??this.coordinateList)!==null&&r!==void 0?r:[],this.container=d??this.container,this.layout=h??this.layout,this.offset=x??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(),l=i.x,c=i.y,d=i.height,f=this.coordinateList[this.activeIndex].coordinate,h=((n=window)===null||n===void 0?void 0:n.scrollX)||0,p=((r=window)===null||r===void 0?void 0:r.scrollY)||0,x=l+f+h,y=c+this.offset.top+d/2+p;this.mouseHandlerCallback({pageX:x,pageY:y})}}}])})();function Cce(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&&he(r)&&he(i))return!0}return!1}function Mce(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 m8(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,l=e.endAngle,c=yt(t,n,r,i),d=yt(t,n,r,l);return{points:[c,d],cx:t,cy:n,radius:r,startAngle:i,endAngle:l}}function kce(e,t,n){var r,i,l,c;if(e==="horizontal")r=t.x,l=r,i=n.top,c=n.top+n.height;else if(e==="vertical")i=t.y,c=i,r=n.left,l=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var d=t.cx,f=t.cy,h=t.innerRadius,p=t.outerRadius,x=t.angle,y=yt(d,f,h,x),j=yt(d,f,p,x);r=y.x,i=y.y,l=j.x,c=j.y}else return m8(t);return[{x:r,y:i},{x:l,y:c}]}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 lR(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 rh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lR(Object(n),!0).forEach(function(r){Pce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pce(e,t,n){return t=Rce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rce(e){var t=Dce(e,"string");return Xu(t)=="symbol"?t:t+""}function Dce(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(t==="string"?String:Number)(e)}function zce(e){var t,n,r=e.element,i=e.tooltipEventType,l=e.isActive,c=e.activeCoordinate,d=e.activePayload,f=e.offset,h=e.activeTooltipIndex,p=e.tooltipAxisBandSize,x=e.layout,y=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||!l||!c||y!=="ScatterChart"&&i!=="axis")return null;var w,S=um;if(y==="ScatterChart")w=c,S=aie;else if(y==="BarChart")w=Mce(x,c,f,p),S=c2;else if(x==="radial"){var v=m8(c),_=v.cx,O=v.cy,A=v.radius,T=v.startAngle,N=v.endAngle;w={cx:_,cy:O,startAngle:T,endAngle:N,innerRadius:A,outerRadius:A},S=pL}else w={points:kce(x,c,f)},S=um;var E=rh(rh(rh(rh({stroke:"#ccc",pointerEvents:"none"},f),w),je(j,!1)),{},{payload:d,payloadIndex:h,className:ze("recharts-tooltip-cursor",j.className)});return M.isValidElement(j)?M.cloneElement(j,E):M.createElement(S,E)}var Lce=["item"],$ce=["children","className","width","height","style","compact","title","desc"];function bl(e){"@babel/helpers - typeof";return bl=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},bl(e)}function $o(){return $o=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},$o.apply(this,arguments)}function cR(e,t){return qce(e)||Ice(e,t)||x8(e,t)||Bce()}function Bce(){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 Ice(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,d=[],f=!0,h=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(f=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);f=!0);}catch(p){h=!0,i=p}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(h)throw i}}return d}}function qce(e){if(Array.isArray(e))return e}function uR(e,t){if(e==null)return{};var n=Uce(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uce(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 Vce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hce(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,y8(r.key),r)}}function Fce(e,t,n){return t&&Hce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gce(e,t,n){return t=Rm(t),Kce(e,p8()?Reflect.construct(t,n||[],Rm(e).constructor):t.apply(e,n))}function Kce(e,t){if(t&&(bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yce(e)}function Yce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p8=function(){return!!e})()}function Rm(e){return Rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rm(e)}function Xce(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&&vw(e,t)}function vw(e,t){return vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vw(e,t)}function jl(e){return Qce(e)||Zce(e)||x8(e)||Wce()}function Wce(){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 x8(e,t){if(e){if(typeof e=="string")return bw(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 bw(e,t)}}function Zce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qce(e){if(Array.isArray(e))return bw(e)}function bw(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 dR(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 re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dR(Object(n),!0).forEach(function(r){Ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(e,t,n){return t=y8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y8(e){var t=Jce(e,"string");return bl(t)=="symbol"?t:t+""}function Jce(e,t){if(bl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eue={xAxis:["bottom","top"],yAxis:["left","right"]},tue={width:"100%",height:"100%"},g8={x:0,y:0};function ah(e){return e}var nue=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},rue=function(t,n,r,i){var l=n.find(function(p){return p&&p.index===r});if(l){if(t==="horizontal")return{x:l.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:l.coordinate};if(t==="centric"){var c=l.coordinate,d=i.radius;return re(re(re({},i),yt(i.cx,i.cy,d,c)),{},{angle:c,radius:d})}var f=l.coordinate,h=i.angle;return re(re(re({},i),yt(i.cx,i.cy,f,h)),{},{angle:h,radius:f})}return g8},Op=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,l=n.dataEndIndex,c=(r??[]).reduce(function(d,f){var h=f.props.data;return h&&h.length?[].concat(jl(d),jl(h)):d},[]);return c.length>0?c:t&&t.length&&he(i)&&he(l)?t.slice(i,l+1):[]};function v8(e){return e==="number"?[0,"auto"]:void 0}var jw=function(t,n,r,i){var l=t.graphicalItems,c=t.tooltipAxis,d=Op(n,t);return r<0||!l||!l.length||r>=d.length?null:l.reduce(function(f,h){var p,x=(p=h.props.data)!==null&&p!==void 0?p:n;x&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(x=x.slice(t.dataStartIndex,t.dataEndIndex+1));var y;if(c.dataKey&&!c.allowDuplicatedCategory){var j=x===void 0?d:x;y=Dh(j,c.dataKey,i)}else y=x&&x[r]||d[r];return y?[].concat(jl(f),[cL(h,y)]):f},[])},fR=function(t,n,r,i){var l=i||{x:t.chartX,y:t.chartY},c=nue(l,r),d=t.orderedTooltipTicks,f=t.tooltipAxis,h=t.tooltipTicks,p=Ate(c,d,h,f);if(p>=0&&h){var x=h[p]&&h[p].value,y=jw(t,n,p,x),j=rue(r,d,p,l);return{activeTooltipIndex:p,activeLabel:x,activePayload:y,activeCoordinate:j}}return null},aue=function(t,n){var r=n.axes,i=n.graphicalItems,l=n.axisType,c=n.axisIdKey,d=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,p=t.layout,x=t.children,y=t.stackOffset,j=rL(p,l);return r.reduce(function(w,S){var v,_=S.type.defaultProps!==void 0?re(re({},S.type.defaultProps),S.props):S.props,O=_.type,A=_.dataKey,T=_.allowDataOverflow,N=_.allowDuplicatedCategory,E=_.scale,k=_.ticks,R=_.includeHidden,L=_[c];if(w[L])return w;var D=Op(t.data,{graphicalItems:i.filter(function(G){var ae,fe=c in G.props?G.props[c]:(ae=G.type.defaultProps)===null||ae===void 0?void 0:ae[c];return fe===L}),dataStartIndex:f,dataEndIndex:h}),z=D.length,$,F,Y;Cce(_.domain,T,O)&&($=Rj(_.domain,null,T),j&&(O==="number"||E!=="auto")&&(Y=au(D,A,"category")));var K=v8(O);if(!$||$.length===0){var B,H=(B=_.domain)!==null&&B!==void 0?B:K;if(A){if($=au(D,A,O),O==="category"&&j){var Q=gK($);N&&Q?(F=$,$=jm(0,z)):N||($=m3(H,$,S).reduce(function(G,ae){return G.indexOf(ae)>=0?G:[].concat(jl(G),[ae])},[]))}else if(O==="category")N?$=$.filter(function(G){return G!==""&&!Re(G)}):$=m3(H,$,S).reduce(function(G,ae){return G.indexOf(ae)>=0||ae===""||Re(ae)?G:[].concat(jl(G),[ae])},[]);else if(O==="number"){var ie=Cte(D,i.filter(function(G){var ae,fe,ye=c in G.props?G.props[c]:(ae=G.type.defaultProps)===null||ae===void 0?void 0:ae[c],we="hide"in G.props?G.props.hide:(fe=G.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return ye===L&&(R||!we)}),A,l,p);ie&&($=ie)}j&&(O==="number"||E!=="auto")&&(Y=au(D,A,"category"))}else j?$=jm(0,z):d&&d[L]&&d[L].hasStack&&O==="number"?$=y==="expand"?[0,1]:lL(d[L].stackGroups,f,h):$=nL(D,i.filter(function(G){var ae=c in G.props?G.props[c]:G.type.defaultProps[c],fe="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return ae===L&&(R||!fe)}),O,p,!0);if(O==="number")$=gw(x,$,L,l,k),H&&($=Rj(H,$,T));else if(O==="category"&&H){var ce=H,I=$.every(function(G){return ce.indexOf(G)>=0});I&&($=ce)}}return re(re({},w),{},Ne({},L,re(re({},_),{},{axisType:l,domain:$,categoricalDomain:Y,duplicateDomain:F,originalDomain:(v=_.domain)!==null&&v!==void 0?v:K,isCategorical:j,layout:p})))},{})},iue=function(t,n){var r=n.graphicalItems,i=n.Axis,l=n.axisType,c=n.axisIdKey,d=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,p=t.layout,x=t.children,y=Op(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:h}),j=y.length,w=rL(p,l),S=-1;return r.reduce(function(v,_){var O=_.type.defaultProps!==void 0?re(re({},_.type.defaultProps),_.props):_.props,A=O[c],T=v8("number");if(!v[A]){S++;var N;return w?N=jm(0,j):d&&d[A]&&d[A].hasStack?(N=lL(d[A].stackGroups,f,h),N=gw(x,N,A,l)):(N=Rj(T,nL(y,r.filter(function(E){var k,R,L=c in E.props?E.props[c]:(k=E.type.defaultProps)===null||k===void 0?void 0:k[c],D="hide"in E.props?E.props.hide:(R=E.type.defaultProps)===null||R===void 0?void 0:R.hide;return L===A&&!D}),"number",p),i.defaultProps.allowDataOverflow),N=gw(x,N,A,l)),re(re({},v),{},Ne({},A,re(re({axisType:l},i.defaultProps),{},{hide:!0,orientation:Qn(eue,"".concat(l,".").concat(S%2),null),domain:N,originalDomain:T,isCategorical:w,layout:p})))}return v},{})},sue=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,l=n.AxisComp,c=n.graphicalItems,d=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,p=t.children,x="".concat(i,"Id"),y=Jn(p,l),j={};return y&&y.length?j=aue(t,{axes:y,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h}):c&&c.length&&(j=iue(t,{Axis:l,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h})),j},oue=function(t){var n=Ai(t),r=Ra(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:zS(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:om(n,r)}},hR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Yn(n,cl),l=0,c=0;return t.data&&t.data.length!==0&&(c=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(l=i.props.startIndex),i.props.endIndex>=0&&(c=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:l,dataEndIndex:c,activeTooltipIndex:-1,isTooltipActive:!!r}},lue=function(t){return!t||!t.length?!1:t.some(function(n){var r=za(n&&n.type);return r&&r.indexOf("Bar")>=0})},mR=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"}},cue=function(t,n){var r=t.props,i=t.graphicalItems,l=t.xAxisMap,c=l===void 0?{}:l,d=t.yAxisMap,f=d===void 0?{}:d,h=r.width,p=r.height,x=r.children,y=r.margin||{},j=Yn(x,cl),w=Yn(x,Vo),S=Object.keys(f).reduce(function(N,E){var k=f[E],R=k.orientation;return!k.mirror&&!k.hide?re(re({},N),{},Ne({},R,N[R]+k.width)):N},{left:y.left||0,right:y.right||0}),v=Object.keys(c).reduce(function(N,E){var k=c[E],R=k.orientation;return!k.mirror&&!k.hide?re(re({},N),{},Ne({},R,Qn(N,"".concat(R))+k.height)):N},{top:y.top||0,bottom:y.bottom||0}),_=re(re({},v),S),O=_.bottom;j&&(_.bottom+=j.props.height||cl.defaultProps.height),w&&n&&(_=Tte(_,i,r,n));var A=h-_.left-_.right,T=p-_.top-_.bottom;return re(re({brushBottom:O},_),{},{width:Math.max(A,0),height:Math.max(T,0)})},uue=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},v2=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,l=i===void 0?"axis":i,c=t.validateTooltipEventTypes,d=c===void 0?["axis"]:c,f=t.axisComponents,h=t.legendContent,p=t.formatAxisMap,x=t.defaultProps,y=function(_,O){var A=O.graphicalItems,T=O.stackGroups,N=O.offset,E=O.updateId,k=O.dataStartIndex,R=O.dataEndIndex,L=_.barSize,D=_.layout,z=_.barGap,$=_.barCategoryGap,F=_.maxBarSize,Y=mR(D),K=Y.numericAxisName,B=Y.cateAxisName,H=lue(A),Q=[];return A.forEach(function(ie,ce){var I=Op(_.data,{graphicalItems:[ie],dataStartIndex:k,dataEndIndex:R}),G=ie.type.defaultProps!==void 0?re(re({},ie.type.defaultProps),ie.props):ie.props,ae=G.dataKey,fe=G.maxBarSize,ye=G["".concat(K,"Id")],we=G["".concat(B,"Id")],Ie={},et=f.reduce(function(_r,oa){var $l=O["".concat(oa.axisType,"Map")],pn=G["".concat(oa.axisType,"Id")];$l&&$l[pn]||oa.axisType==="zAxis"||Ps();var hd=$l[pn];return re(re({},_r),{},Ne(Ne({},oa.axisType,hd),"".concat(oa.axisType,"Ticks"),Ra(hd)))},Ie),de=et[B],Oe=et["".concat(B,"Ticks")],ke=T&&T[ye]&&T[ye].hasStack&&Bte(ie,T[ye].stackGroups),ue=za(ie.type).indexOf("Bar")>=0,gt=om(de,Oe),Le=[],Ot=H&&_te({barSize:L,stackGroups:T,totalSize:uue(et,B)});if(ue){var Tt,mn,Ar=Re(fe)?F:fe,Ur=(Tt=(mn=om(de,Oe,!0))!==null&&mn!==void 0?mn:Ar)!==null&&Tt!==void 0?Tt:0;Le=Ote({barGap:z,barCategoryGap:$,bandSize:Ur!==gt?Ur:gt,sizeList:Ot[we],maxBarSize:Ar}),Ur!==gt&&(Le=Le.map(function(_r){return re(re({},_r),{},{position:re(re({},_r.position),{},{offset:_r.position.offset-Ur/2})})}))}var Xa=ie&&ie.type&&ie.type.getComposedData;Xa&&Q.push({props:re(re({},Xa(re(re({},et),{},{displayedData:I,props:_,dataKey:ae,item:ie,bandSize:gt,barPosition:Le,offset:N,stackedData:ke,layout:D,dataStartIndex:k,dataEndIndex:R}))),{},Ne(Ne(Ne({key:ie.key||"item-".concat(ce)},K,et[K]),B,et[B]),"animationId",E)),childIndex:MK(ie,_.children),item:ie})}),Q},j=function(_,O){var A=_.props,T=_.dataStartIndex,N=_.dataEndIndex,E=_.updateId;if(!TC({props:A}))return null;var k=A.children,R=A.layout,L=A.stackOffset,D=A.data,z=A.reverseStackOrder,$=mR(R),F=$.numericAxisName,Y=$.cateAxisName,K=Jn(k,r),B=Lte(D,K,"".concat(F,"Id"),"".concat(Y,"Id"),L,z),H=f.reduce(function(G,ae){var fe="".concat(ae.axisType,"Map");return re(re({},G),{},Ne({},fe,sue(A,re(re({},ae),{},{graphicalItems:K,stackGroups:ae.axisType===F&&B,dataStartIndex:T,dataEndIndex:N}))))},{}),Q=cue(re(re({},H),{},{props:A,graphicalItems:K}),O==null?void 0:O.legendBBox);Object.keys(H).forEach(function(G){H[G]=p(A,H[G],Q,G.replace("Map",""),n)});var ie=H["".concat(Y,"Map")],ce=oue(ie),I=y(A,re(re({},H),{},{dataStartIndex:T,dataEndIndex:N,updateId:E,graphicalItems:K,stackGroups:B,offset:Q}));return re(re({formattedGraphicalItems:I,graphicalItems:K,offset:Q,stackGroups:B},ce),H)},w=(function(v){function _(O){var A,T,N;return Vce(this,_),N=Gce(this,_,[O]),Ne(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(N,"accessibilityManager",new Ece),Ne(N,"handleLegendBBoxUpdate",function(E){if(E){var k=N.state,R=k.dataStartIndex,L=k.dataEndIndex,D=k.updateId;N.setState(re({legendBBox:E},j({props:N.props,dataStartIndex:R,dataEndIndex:L,updateId:D},re(re({},N.state),{},{legendBBox:E}))))}}),Ne(N,"handleReceiveSyncEvent",function(E,k,R){if(N.props.syncId===E){if(R===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(k)}}),Ne(N,"handleBrushChange",function(E){var k=E.startIndex,R=E.endIndex;if(k!==N.state.dataStartIndex||R!==N.state.dataEndIndex){var L=N.state.updateId;N.setState(function(){return re({dataStartIndex:k,dataEndIndex:R},j({props:N.props,dataStartIndex:k,dataEndIndex:R,updateId:L},N.state))}),N.triggerSyncEvent({dataStartIndex:k,dataEndIndex:R})}}),Ne(N,"handleMouseEnter",function(E){var k=N.getMouseInfo(E);if(k){var R=re(re({},k),{},{isTooltipActive:!0});N.setState(R),N.triggerSyncEvent(R);var L=N.props.onMouseEnter;Te(L)&&L(R,E)}}),Ne(N,"triggeredAfterMouseMove",function(E){var k=N.getMouseInfo(E),R=k?re(re({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(R),N.triggerSyncEvent(R);var L=N.props.onMouseMove;Te(L)&&L(R,E)}),Ne(N,"handleItemMouseEnter",function(E){N.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Ne(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),Ne(N,"handleMouseMove",function(E){E.persist(),N.throttleTriggeredAfterMouseMove(E)}),Ne(N,"handleMouseLeave",function(E){N.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};N.setState(k),N.triggerSyncEvent(k);var R=N.props.onMouseLeave;Te(R)&&R(k,E)}),Ne(N,"handleOuterEvent",function(E){var k=CK(E),R=Qn(N.props,"".concat(k));if(k&&Te(R)){var L,D;/.*touch.*/i.test(k)?D=N.getMouseInfo(E.changedTouches[0]):D=N.getMouseInfo(E),R((L=D)!==null&&L!==void 0?L:{},E)}}),Ne(N,"handleClick",function(E){var k=N.getMouseInfo(E);if(k){var R=re(re({},k),{},{isTooltipActive:!0});N.setState(R),N.triggerSyncEvent(R);var L=N.props.onClick;Te(L)&&L(R,E)}}),Ne(N,"handleMouseDown",function(E){var k=N.props.onMouseDown;if(Te(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"handleMouseUp",function(E){var k=N.props.onMouseUp;if(Te(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Ne(N,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseDown(E.changedTouches[0])}),Ne(N,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseUp(E.changedTouches[0])}),Ne(N,"handleDoubleClick",function(E){var k=N.props.onDoubleClick;if(Te(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"handleContextMenu",function(E){var k=N.props.onContextMenu;if(Te(k)){var R=N.getMouseInfo(E);k(R,E)}}),Ne(N,"triggerSyncEvent",function(E){N.props.syncId!==void 0&&m1.emit(p1,N.props.syncId,E,N.eventEmitterSymbol)}),Ne(N,"applySyncEvent",function(E){var k=N.props,R=k.layout,L=k.syncMethod,D=N.state.updateId,z=E.dataStartIndex,$=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)N.setState(re({dataStartIndex:z,dataEndIndex:$},j({props:N.props,dataStartIndex:z,dataEndIndex:$,updateId:D},N.state)));else if(E.activeTooltipIndex!==void 0){var F=E.chartX,Y=E.chartY,K=E.activeTooltipIndex,B=N.state,H=B.offset,Q=B.tooltipTicks;if(!H)return;if(typeof L=="function")K=L(Q,E);else if(L==="value"){K=-1;for(var ie=0;ie<Q.length;ie++)if(Q[ie].value===E.activeLabel){K=ie;break}}var ce=re(re({},H),{},{x:H.left,y:H.top}),I=Math.min(F,ce.x+ce.width),G=Math.min(Y,ce.y+ce.height),ae=Q[K]&&Q[K].value,fe=jw(N.state,N.props.data,K),ye=Q[K]?{x:R==="horizontal"?Q[K].coordinate:I,y:R==="horizontal"?G:Q[K].coordinate}:g8;N.setState(re(re({},E),{},{activeLabel:ae,activeCoordinate:ye,activePayload:fe,activeTooltipIndex:K}))}else N.setState(E)}),Ne(N,"renderCursor",function(E){var k,R=N.state,L=R.isTooltipActive,D=R.activeCoordinate,z=R.activePayload,$=R.offset,F=R.activeTooltipIndex,Y=R.tooltipAxisBandSize,K=N.getTooltipEventType(),B=(k=E.props.active)!==null&&k!==void 0?k:L,H=N.props.layout,Q=E.key||"_recharts-cursor";return U.createElement(zce,{key:Q,activeCoordinate:D,activePayload:z,activeTooltipIndex:F,chartName:n,element:E,isActive:B,layout:H,offset:$,tooltipAxisBandSize:Y,tooltipEventType:K})}),Ne(N,"renderPolarAxis",function(E,k,R){var L=Qn(E,"type.axisType"),D=Qn(N.state,"".concat(L,"Map")),z=E.type.defaultProps,$=z!==void 0?re(re({},z),E.props):E.props,F=D&&D[$["".concat(L,"Id")]];return M.cloneElement(E,re(re({},F),{},{className:ze(L,F.className),key:E.key||"".concat(k,"-").concat(R),ticks:Ra(F,!0)}))}),Ne(N,"renderPolarGrid",function(E){var k=E.props,R=k.radialLines,L=k.polarAngles,D=k.polarRadius,z=N.state,$=z.radiusAxisMap,F=z.angleAxisMap,Y=Ai($),K=Ai(F),B=K.cx,H=K.cy,Q=K.innerRadius,ie=K.outerRadius;return M.cloneElement(E,{polarAngles:Array.isArray(L)?L:Ra(K,!0).map(function(ce){return ce.coordinate}),polarRadius:Array.isArray(D)?D:Ra(Y,!0).map(function(ce){return ce.coordinate}),cx:B,cy:H,innerRadius:Q,outerRadius:ie,key:E.key||"polar-grid",radialLines:R})}),Ne(N,"renderLegend",function(){var E=N.state.formattedGraphicalItems,k=N.props,R=k.children,L=k.width,D=k.height,z=N.props.margin||{},$=L-(z.left||0)-(z.right||0),F=eL({children:R,formattedGraphicalItems:E,legendWidth:$,legendContent:h});if(!F)return null;var Y=F.item,K=uR(F,Lce);return M.cloneElement(Y,re(re({},K),{},{chartWidth:L,chartHeight:D,margin:z,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),Ne(N,"renderTooltip",function(){var E,k=N.props,R=k.children,L=k.accessibilityLayer,D=Yn(R,mr);if(!D)return null;var z=N.state,$=z.isTooltipActive,F=z.activeCoordinate,Y=z.activePayload,K=z.activeLabel,B=z.offset,H=(E=D.props.active)!==null&&E!==void 0?E:$;return M.cloneElement(D,{viewBox:re(re({},B),{},{x:B.left,y:B.top}),active:H,label:K,payload:H?Y:[],coordinate:F,accessibilityLayer:L})}),Ne(N,"renderBrush",function(E){var k=N.props,R=k.margin,L=k.data,D=N.state,z=D.offset,$=D.dataStartIndex,F=D.dataEndIndex,Y=D.updateId;return M.cloneElement(E,{key:E.key||"_recharts-brush",onChange:Jf(N.handleBrushChange,E.props.onChange),data:L,x:he(E.props.x)?E.props.x:z.left,y:he(E.props.y)?E.props.y:z.top+z.height+z.brushBottom-(R.bottom||0),width:he(E.props.width)?E.props.width:z.width,startIndex:$,endIndex:F,updateId:"brush-".concat(Y)})}),Ne(N,"renderReferenceElement",function(E,k,R){if(!E)return null;var L=N,D=L.clipPathId,z=N.state,$=z.xAxisMap,F=z.yAxisMap,Y=z.offset,K=E.type.defaultProps||{},B=E.props,H=B.xAxisId,Q=H===void 0?K.xAxisId:H,ie=B.yAxisId,ce=ie===void 0?K.yAxisId:ie;return M.cloneElement(E,{key:E.key||"".concat(k,"-").concat(R),xAxis:$[Q],yAxis:F[ce],viewBox:{x:Y.left,y:Y.top,width:Y.width,height:Y.height},clipPathId:D})}),Ne(N,"renderActivePoints",function(E){var k=E.item,R=E.activePoint,L=E.basePoint,D=E.childIndex,z=E.isRange,$=[],F=k.props.key,Y=k.item.type.defaultProps!==void 0?re(re({},k.item.type.defaultProps),k.item.props):k.item.props,K=Y.activeDot,B=Y.dataKey,H=re(re({index:D,dataKey:B,cx:R.x,cy:R.y,r:4,fill:l2(k.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},je(K,!1)),zh(K));return $.push(_.renderActiveDot(K,H,"".concat(F,"-activePoint-").concat(D))),L?$.push(_.renderActiveDot(K,re(re({},H),{},{cx:L.x,cy:L.y}),"".concat(F,"-basePoint-").concat(D))):z&&$.push(null),$}),Ne(N,"renderGraphicChild",function(E,k,R){var L=N.filterFormatItem(E,k,R);if(!L)return null;var D=N.getTooltipEventType(),z=N.state,$=z.isTooltipActive,F=z.tooltipAxis,Y=z.activeTooltipIndex,K=z.activeLabel,B=N.props.children,H=Yn(B,mr),Q=L.props,ie=Q.points,ce=Q.isRange,I=Q.baseLine,G=L.item.type.defaultProps!==void 0?re(re({},L.item.type.defaultProps),L.item.props):L.item.props,ae=G.activeDot,fe=G.hide,ye=G.activeBar,we=G.activeShape,Ie=!!(!fe&&$&&H&&(ae||ye||we)),et={};D!=="axis"&&H&&H.props.trigger==="click"?et={onClick:Jf(N.handleItemMouseEnter,E.props.onClick)}:D!=="axis"&&(et={onMouseLeave:Jf(N.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:Jf(N.handleItemMouseEnter,E.props.onMouseEnter)});var de=M.cloneElement(E,re(re({},L.props),et));function Oe(oa){return typeof F.dataKey=="function"?F.dataKey(oa.payload):null}if(Ie)if(Y>=0){var ke,ue;if(F.dataKey&&!F.allowDuplicatedCategory){var gt=typeof F.dataKey=="function"?Oe:"payload.".concat(F.dataKey.toString());ke=Dh(ie,gt,K),ue=ce&&I&&Dh(I,gt,K)}else ke=ie==null?void 0:ie[Y],ue=ce&&I&&I[Y];if(we||ye){var Le=E.props.activeIndex!==void 0?E.props.activeIndex:Y;return[M.cloneElement(E,re(re(re({},L.props),et),{},{activeIndex:Le})),null,null]}if(!Re(ke))return[de].concat(jl(N.renderActivePoints({item:L,activePoint:ke,basePoint:ue,childIndex:Y,isRange:ce})))}else{var Ot,Tt=(Ot=N.getItemByXY(N.state.activeCoordinate))!==null&&Ot!==void 0?Ot:{graphicalItem:de},mn=Tt.graphicalItem,Ar=mn.item,Ur=Ar===void 0?E:Ar,Xa=mn.childIndex,_r=re(re(re({},L.props),et),{},{activeIndex:Xa});return[M.cloneElement(Ur,_r),null,null]}return ce?[de,null,null]:[de,null]}),Ne(N,"renderCustomized",function(E,k,R){return M.cloneElement(E,re(re({key:"recharts-customized-".concat(R)},N.props),N.state))}),Ne(N,"renderMap",{CartesianGrid:{handler:ah,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:ah},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:ah},YAxis:{handler:ah},Brush:{handler:N.renderBrush,once:!0},Bar:{handler:N.renderGraphicChild},Line:{handler:N.renderGraphicChild},Area:{handler:N.renderGraphicChild},Radar:{handler:N.renderGraphicChild},RadialBar:{handler:N.renderGraphicChild},Scatter:{handler:N.renderGraphicChild},Pie:{handler:N.renderGraphicChild},Funnel:{handler:N.renderGraphicChild},Tooltip:{handler:N.renderCursor,once:!0},PolarGrid:{handler:N.renderPolarGrid,once:!0},PolarAngleAxis:{handler:N.renderPolarAxis},PolarRadiusAxis:{handler:N.renderPolarAxis},Customized:{handler:N.renderCustomized}}),N.clipPathId="".concat((A=O.id)!==null&&A!==void 0?A:kl("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=ez(N.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),N.state={},N}return Xce(_,v),Fce(_,[{key:"componentDidMount",value:function(){var A,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var A=this.props,T=A.children,N=A.data,E=A.height,k=A.layout,R=Yn(T,mr);if(R){var L=R.props.defaultIndex;if(!(typeof L!="number"||L<0||L>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[L]&&this.state.tooltipTicks[L].value,z=jw(this.state,N,L,D),$=this.state.tooltipTicks[L].coordinate,F=(this.state.offset.top+E)/2,Y=k==="horizontal",K=Y?{x:$,y:F}:{y:$,x:F},B=this.state.formattedGraphicalItems.find(function(Q){var ie=Q.item;return ie.type.name==="Scatter"});B&&(K=re(re({},K),B.props.points[L].tooltipPosition),z=B.props.points[L].tooltipPayload);var H={activeTooltipIndex:L,isTooltipActive:!0,activeLabel:D,activePayload:z,activeCoordinate:K};this.setState(H),this.renderCursor(R),this.accessibilityManager.setIndex(L)}}}},{key:"getSnapshotBeforeUpdate",value:function(A,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==A.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==A.margin){var N,E;this.accessibilityManager.setDetails({offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(A){tj([Yn(A.children,mr)],[Yn(this.props.children,mr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var A=Yn(this.props.children,mr);if(A&&typeof A.props.shared=="boolean"){var T=A.props.shared?"axis":"item";return d.indexOf(T)>=0?T:l}return l}},{key:"getMouseInfo",value:function(A){if(!this.container)return null;var T=this.container,N=T.getBoundingClientRect(),E=yZ(N),k={chartX:Math.round(A.pageX-E.left),chartY:Math.round(A.pageY-E.top)},R=N.width/T.offsetWidth||1,L=this.inRange(k.chartX,k.chartY,R);if(!L)return null;var D=this.state,z=D.xAxisMap,$=D.yAxisMap,F=this.getTooltipEventType(),Y=fR(this.state,this.props.data,this.props.layout,L);if(F!=="axis"&&z&&$){var K=Ai(z).scale,B=Ai($).scale,H=K&&K.invert?K.invert(k.chartX):null,Q=B&&B.invert?B.invert(k.chartY):null;return re(re({},k),{},{xValue:H,yValue:Q},Y)}return Y?re(re({},k),Y):null}},{key:"inRange",value:function(A,T){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,k=A/N,R=T/N;if(E==="horizontal"||E==="vertical"){var L=this.state.offset,D=k>=L.left&&k<=L.left+L.width&&R>=L.top&&R<=L.top+L.height;return D?{x:k,y:R}:null}var z=this.state,$=z.angleAxisMap,F=z.radiusAxisMap;if($&&F){var Y=Ai($);return y3({x:k,y:R},Y)}return null}},{key:"parseEventsOfWrapper",value:function(){var A=this.props.children,T=this.getTooltipEventType(),N=Yn(A,mr),E={};N&&T==="axis"&&(N.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 k=zh(this.props,this.handleOuterEvent);return re(re({},k),E)}},{key:"addListener",value:function(){m1.on(p1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){m1.removeListener(p1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(A,T,N){for(var E=this.state.formattedGraphicalItems,k=0,R=E.length;k<R;k++){var L=E[k];if(L.item===A||L.props.key===A.key||T===za(L.item.type)&&N===L.childIndex)return L}return null}},{key:"renderClipPath",value:function(){var A=this.clipPathId,T=this.state.offset,N=T.left,E=T.top,k=T.height,R=T.width;return U.createElement("defs",null,U.createElement("clipPath",{id:A},U.createElement("rect",{x:N,y:E,height:k,width:R})))}},{key:"getXScales",value:function(){var A=this.state.xAxisMap;return A?Object.entries(A).reduce(function(T,N){var E=cR(N,2),k=E[0],R=E[1];return re(re({},T),{},Ne({},k,R.scale))},{}):null}},{key:"getYScales",value:function(){var A=this.state.yAxisMap;return A?Object.entries(A).reduce(function(T,N){var E=cR(N,2),k=E[0],R=E[1];return re(re({},T),{},Ne({},k,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(A){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[A])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(A){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[A])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(A){var T=this.state,N=T.formattedGraphicalItems,E=T.activeItem;if(N&&N.length)for(var k=0,R=N.length;k<R;k++){var L=N[k],D=L.props,z=L.item,$=z.type.defaultProps!==void 0?re(re({},z.type.defaultProps),z.props):z.props,F=za(z.type);if(F==="Bar"){var Y=(D.data||[]).find(function(Q){return $ae(A,Q)});if(Y)return{graphicalItem:L,payload:Y}}else if(F==="RadialBar"){var K=(D.data||[]).find(function(Q){return y3(A,Q)});if(K)return{graphicalItem:L,payload:K}}else if(bp(L,E)||jp(L,E)||Vu(L,E)){var B=ose({graphicalItem:L,activeTooltipItem:E,itemData:$.data}),H=$.activeIndex===void 0?B:$.activeIndex;return{graphicalItem:re(re({},L),{},{childIndex:H}),payload:Vu(L,E)?$.data[B]:L.props.data[B]}}}return null}},{key:"render",value:function(){var A=this;if(!TC(this))return null;var T=this.props,N=T.children,E=T.className,k=T.width,R=T.height,L=T.style,D=T.compact,z=T.title,$=T.desc,F=uR(T,$ce),Y=je(F,!1);if(D)return U.createElement(H4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},U.createElement(rj,$o({},Y,{width:k,height:R,title:z,desc:$}),this.renderClipPath(),CC(N,this.renderMap)));if(this.props.accessibilityLayer){var K,B;Y.tabIndex=(K=this.props.tabIndex)!==null&&K!==void 0?K:0,Y.role=(B=this.props.role)!==null&&B!==void 0?B:"application",Y.onKeyDown=function(Q){A.accessibilityManager.keyboardEvent(Q)},Y.onFocus=function(){A.accessibilityManager.focus()}}var H=this.parseEventsOfWrapper();return U.createElement(H4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},U.createElement("div",$o({className:ze("recharts-wrapper",E),style:re({position:"relative",cursor:"default",width:k,height:R},L)},H,{ref:function(ie){A.container=ie}}),U.createElement(rj,$o({},Y,{width:k,height:R,title:z,desc:$,style:tue}),this.renderClipPath(),CC(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(M.Component);Ne(w,"displayName",n),Ne(w,"defaultProps",re({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},x)),Ne(w,"getDerivedStateFromProps",function(v,_){var O=v.dataKey,A=v.data,T=v.children,N=v.width,E=v.height,k=v.layout,R=v.stackOffset,L=v.margin,D=_.dataStartIndex,z=_.dataEndIndex;if(_.updateId===void 0){var $=hR(v);return re(re(re({},$),{},{updateId:0},j(re(re({props:v},$),{},{updateId:0}),_)),{},{prevDataKey:O,prevData:A,prevWidth:N,prevHeight:E,prevLayout:k,prevStackOffset:R,prevMargin:L,prevChildren:T})}if(O!==_.prevDataKey||A!==_.prevData||N!==_.prevWidth||E!==_.prevHeight||k!==_.prevLayout||R!==_.prevStackOffset||!Uo(L,_.prevMargin)){var F=hR(v),Y={chartX:_.chartX,chartY:_.chartY,isTooltipActive:_.isTooltipActive},K=re(re({},fR(_,A,k)),{},{updateId:_.updateId+1}),B=re(re(re({},F),Y),K);return re(re(re({},B),j(re({props:v},B),_)),{},{prevDataKey:O,prevData:A,prevWidth:N,prevHeight:E,prevLayout:k,prevStackOffset:R,prevMargin:L,prevChildren:T})}if(!tj(T,_.prevChildren)){var H,Q,ie,ce,I=Yn(T,cl),G=I&&(H=(Q=I.props)===null||Q===void 0?void 0:Q.startIndex)!==null&&H!==void 0?H:D,ae=I&&(ie=(ce=I.props)===null||ce===void 0?void 0:ce.endIndex)!==null&&ie!==void 0?ie:z,fe=G!==D||ae!==z,ye=!Re(A),we=ye&&!fe?_.updateId:_.updateId+1;return re(re({updateId:we},j(re(re({props:v},_),{},{updateId:we,dataStartIndex:G,dataEndIndex:ae}),_)),{},{prevChildren:T,dataStartIndex:G,dataEndIndex:ae})}return null}),Ne(w,"renderActiveDot",function(v,_,O){var A;return M.isValidElement(v)?A=M.cloneElement(v,_):Te(v)?A=v(_):A=U.createElement(pp,_),U.createElement(We,{className:"recharts-active-dot",key:O},A)});var S=M.forwardRef(function(_,O){return U.createElement(w,$o({},_,{ref:O}))});return S.displayName=w.displayName,S},due=v2({chartName:"LineChart",GraphicalChild:fd,axisComponents:[{axisType:"xAxis",AxisComp:yl},{axisType:"yAxis",AxisComp:vl}],formatAxisMap:BL}),fue=v2({chartName:"BarChart",GraphicalChild:zi,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:yl},{axisType:"yAxis",AxisComp:vl}],formatAxisMap:BL}),hue=v2({chartName:"PieChart",GraphicalChild:Ya,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:vp},{axisType:"radiusAxis",AxisComp:yp}],formatAxisMap:Xte,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const mue=["Deals","Products","MRR","ARR"];function pue(){const[e,t]=M.useState("Deals"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState([]),[y,j]=M.useState([]),[w,S]=M.useState([]),[v,_]=M.useState(0);M.useEffect(()=>{async function N(){l(!0),d("");try{const[E,k,R,L]=await Promise.all([Uf.deals(),Uf.products(),Uf.mrr(),Uf.arr()]);h(E.deals||[]),x(k.products||[]),_(R.mrr||0),j([]);const z=L;S([])}catch(E){d(E instanceof Error?E.message:"Failed to load sales data")}finally{l(!1)}}N()},[]);const O=f.reduce((N,E)=>N+(E.value||0),0),A=f.filter(N=>N.stage==="Closed Won").reduce((N,E)=>N+(E.value||0),0),T=p.filter(N=>N.active).length;return i?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"})]}),s.jsx(Me,{className:"h-[400px]"})]}):c?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Sales"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Deals, products, and revenue metrics"})]}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),children:"New Deal"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(P5,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce(O)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Pipeline"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce(A)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Closed Won"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(aF,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:T}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Products"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:mue.map(N=>s.jsx("button",{onClick:()=>t(N),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===N?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:N},N))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Search...",value:n,onChange:N=>r(N.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"})]}),s.jsx(Ze,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),e==="Deals"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Deal"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{align:"right",children:"Value"}),s.jsx(Ae,{children:"Stage"}),s.jsx(Ae,{align:"right",children:"Probability"}),s.jsx(Ae,{children:"Owner"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[f.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:7,className:"text-center text-text-secondary py-8",children:"No deals found"})}),f.map(N=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:N.name})}),s.jsx(be,{children:N.company}),s.jsx(be,{align:"right",children:Ce(N.value)}),s.jsx(be,{children:s.jsx(_e,{variant:N.stage==="Closed Won"?"success":N.stage==="Negotiation"?"primary":"default",children:N.stage})}),s.jsxs(be,{align:"right",children:[N.probability,"%"]}),s.jsx(be,{children:N.owner}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},N.id))]})]})}),e==="Products"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Product"}),s.jsx(Ae,{children:"SKU"}),s.jsx(Ae,{align:"right",children:"Price"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[p.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No products found"})}),p.map(N=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:N.name})}),s.jsx(be,{children:s.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:N.sku})}),s.jsx(be,{align:"right",children:Ce(N.price)}),s.jsx(be,{children:s.jsx(_e,{variant:N.recurring?"primary":"default",children:N.recurring?"Recurring":"One-time"})}),s.jsx(be,{children:s.jsx(_e,{variant:N.active?"success":"danger",children:N.active?"Active":"Inactive"})}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},N.id))]})]})}),e==="MRR"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Monthly Recurring Revenue",subtitle:`Current MRR: ${Ce(v)}`}),y.length>0?s.jsx("div",{className:"h-[320px]",children:s.jsx(yj,{width:"100%",height:"100%",children:s.jsxs(fue,{data:y,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(uw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(yl,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(vl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(mr,{content:({active:N,payload:E,label:k})=>!N||!(E!=null&&E.length)?null:s.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary mb-2",children:k}),E.map((R,L)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:R.color}}),s.jsxs("span",{className:"text-text-secondary",children:[R.name,":"]}),s.jsx("span",{className:"font-semibold text-text-primary",children:Ce(Number(R.value))})]},L))]})}),s.jsx(zi,{dataKey:"mrr",fill:"#2563EB",radius:[4,4,0,0]}),s.jsx(zi,{dataKey:"arr",fill:"#16A34A",radius:[4,4,0,0]})]})})}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No MRR history data available"})]}),e==="ARR"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Annual Recurring Revenue",subtitle:"ARR growth by quarter"}),w.length>0?s.jsx("div",{className:"h-[320px]",children:s.jsx(yj,{width:"100%",height:"100%",children:s.jsxs(due,{data:w,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(uw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(yl,{dataKey:"quarter",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(vl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(mr,{content:({active:N,payload:E,label:k})=>!N||!(E!=null&&E.length)?null:s.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary mb-1",children:k}),s.jsx("p",{className:"text-sm font-semibold text-text-primary",children:Ce(Number(E[0].value))})]})}),s.jsx(fd,{type:"monotone",dataKey:"arr",stroke:"#2563EB",strokeWidth:2,dot:{r:4,strokeWidth:0,fill:"#2563EB"},activeDot:{r:6}})]})})}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No ARR history data available"})]})]})}const xue=["Balance","Income","MOMS","Accounts","Invoices","Cashflow"],pR=["#2563EB","#16A34A","#D97706","#DC2626","#9CA3AF"];function yue(){var R,L;const e=An(),[t,n]=M.useState(()=>{var D;return((D=e.state)==null?void 0:D.activeTab)||"Balance"}),[r,i]=M.useState(""),[l,c]=M.useState(!0),[d,f]=M.useState(""),[h,p]=M.useState(null),[x,y]=M.useState(null),[j,w]=M.useState(null),[S,v]=M.useState([]),[_,O]=M.useState([]),[A,T]=M.useState(null);M.useEffect(()=>{async function D(){var z,$;c(!0),f("");try{const[F,Y,K,B,H,Q]=await Promise.all([hs.balance(),hs.income(),hs.moms(),hs.accounts(),hs.invoices(),hs.cashflow()]);p(F.report||F),y(Y.report||Y),w(K.report||K),v(((z=B.report)==null?void 0:z.accounts)||B.accounts||[]),O((($=H.report)==null?void 0:$.invoices)||H.invoices||[]),T(Q.report||Q)}catch(F){f(F instanceof Error?F.message:"Failed to load finance data")}finally{c(!1)}}D()},[]);const N=S.filter(D=>D.name.toLowerCase().includes(r.toLowerCase())||D.id.toLowerCase().includes(r.toLowerCase())),E=_.filter(D=>D.customer.toLowerCase().includes(r.toLowerCase())||D.id.toLowerCase().includes(r.toLowerCase())),k=(x==null?void 0:x.expenses.map((D,z)=>({name:D.name||D.account,value:D.amount??D.balance??0,color:pR[z%pR.length]})))||[];return l?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"})]}),s.jsx(Me,{className:"h-[400px]"})]}):d?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:d})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Finance"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Financial reports and accounting"})]}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),children:"New Invoice"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Bo,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce((h==null?void 0:h.total_assets)||0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Assets"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce((x==null?void 0:x.total_revenue)||0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Revenue"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(G5,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce((x==null?void 0:x.total_expense)||(x==null?void 0:x.total_expenses)||0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"YTD Expenses"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:xue.map(D=>s.jsx("button",{onClick:()=>n(D),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${t===D?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:D},D))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Search...",value:r,onChange:D=>i(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"})]}),s.jsx(Ze,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),t==="Balance"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[s.jsxs(te,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Assets"}),s.jsx(G1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce((h==null?void 0:h.total_assets)||0)})]}),s.jsxs(te,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Liabilities"}),s.jsx(IH,{size:14,className:"text-danger"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce((h==null?void 0:h.total_liabilities)||0)})]}),s.jsxs(te,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-sm text-text-secondary",children:"Equity"}),s.jsx(G1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce((h==null?void 0:h.total_equity)||0)})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Balance Sheet",subtitle:`Period: ${(h==null?void 0:h.period)||""}`}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Assets"}),s.jsxs("div",{className:"space-y-2",children:[h==null?void 0:h.assets.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ce(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.assets)||h.assets.length===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No asset accounts"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Liabilities"}),s.jsxs("div",{className:"space-y-2",children:[h==null?void 0:h.liabilities.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ce(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.liabilities)||h.liabilities.length===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No liability accounts"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Equity"}),s.jsxs("div",{className:"space-y-2",children:[(R=h==null?void 0:h.equity)==null?void 0:R.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ce(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.equity)||((L=h.equity)==null?void 0:L.length)===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No equity accounts"})]})]})]})]})]}),t==="Income"&&s.jsx("div",{className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5",children:[s.jsxs(te,{className:"lg:col-span-2",children:[s.jsx(Ge,{title:"Income Statement",subtitle:`Period: ${(x==null?void 0:x.period)||""}`}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Revenue"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Ce((x==null?void 0:x.total_revenue)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Expenses"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Ce((x==null?void 0:x.total_expense)||(x==null?void 0:x.total_expenses)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net Income"}),s.jsx("p",{className:"text-lg font-semibold text-success",children:Ce((x==null?void 0:x.net_income)||0)})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Revenue Accounts"}),x==null?void 0:x.revenue.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ce(D.amount??D.balance??0)})]},z))]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Expense Accounts"}),x==null?void 0:x.expenses.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ce(D.amount??D.balance??0)})]},z))]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Expense Breakdown",subtitle:"By category"}),k.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-[220px]",children:s.jsx(yj,{width:"100%",height:"100%",children:s.jsxs(hue,{children:[s.jsx(Ya,{data:k,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:4,dataKey:"value",children:k.map((D,z)=>s.jsx(rp,{fill:D.color},`cell-${z}`))}),s.jsx(mr,{content:({active:D,payload:z})=>{if(!D||!(z!=null&&z.length))return null;const $=z[0].payload;return s.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-3 py-2",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:$.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:Ce($.value)})]})}})]})})}),s.jsx("div",{className:"space-y-2 mt-2",children:k.map(D=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:D.color}}),s.jsx("span",{className:"text-text-secondary",children:D.name})]}),s.jsx("span",{className:"font-medium text-text-primary",children:Ce(D.value)})]},D.name))})]}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No expense data"})]})]})}),t==="MOMS"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"MOMS Report",subtitle:`Period: ${(j==null?void 0:j.period)||""}`}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS In (Input VAT)"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Ce((j==null?void 0:j.moms_in)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS Ut (Output VAT)"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Ce((j==null?void 0:j.moms_ut)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"MOMS att betala"}),s.jsx("p",{className:"text-lg font-semibold text-success",children:Ce((j==null?void 0:j.moms_att_betala)||0)})]})]})]}),t==="Accounts"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Chart of Accounts",subtitle:"General ledger accounts"}),s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Account"}),s.jsx(Ae,{children:"Number"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{align:"right",children:"Balance"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[N.map(D=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:D.name})}),s.jsx(be,{children:s.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:D.id})}),s.jsx(be,{children:s.jsx(_e,{variant:D.type==="asset"?"success":D.type==="equity"?"primary":"warning",children:D.type})}),s.jsx(be,{align:"right",children:Ce(D.balance)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},D.id)),N.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:5,className:"text-center text-text-secondary py-8",children:"No accounts found"})})]})]})]}),t==="Invoices"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Invoices",subtitle:"All invoices"}),s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Number"}),s.jsx(Ae,{children:"Customer"}),s.jsx(Ae,{align:"right",children:"Amount"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Due Date"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[E.map(D=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:D.id})}),s.jsx(be,{children:D.customer}),s.jsx(be,{align:"right",children:Ce(D.amount)}),s.jsx(be,{children:s.jsx(_e,{variant:D.status==="paid"?"success":D.status==="overdue"?"danger":D.status==="sent"||D.status==="pending"?"primary":"default",children:D.status})}),s.jsx(be,{children:Et(D.due_date)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},D.id)),E.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No invoices found"})})]})]})]}),t==="Cashflow"&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Cash Flow",subtitle:`Period: ${(A==null?void 0:A.period)||""}`}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-6",children:[s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Inflow"}),s.jsx("p",{className:"text-lg font-semibold text-success",children:Ce((A==null?void 0:A.inflow)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Outflow"}),s.jsx("p",{className:"text-lg font-semibold text-danger",children:Ce((A==null?void 0:A.outflow)||0)})]}),s.jsxs("div",{className:"p-4 bg-bg rounded-xl",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Net"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Ce((A==null?void 0:A.net)||0)})]})]})]})]})}const gue=["Employees","Leaves"],vue={Sales:"primary",Engineering:"success",Finance:"warning",HR:"primary",Legal:"default"};function bue(){const[e,t]=M.useState("Employees"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState([]);M.useEffect(()=>{async function O(){l(!0),d("");try{const[A,T]=await Promise.all([gE.employees(),gE.leaves()]);h(A.employees||[]),x(T.leaves||[])}catch(A){d(A instanceof Error?A.message:"Failed to load HR data")}finally{l(!1)}}O()},[]);const y=f.filter(O=>O.status==="active").length,j=f.filter(O=>O.status==="on_leave").length,w=p.filter(O=>O.status==="pending").length,v=f.filter(O=>O.status!=="deleted").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())),_=p.filter(O=>O.employeeName.toLowerCase().includes(n.toLowerCase())||O.type.toLowerCase().includes(n.toLowerCase()));return i?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"})]}),s.jsx(Me,{className:"h-[400px]"})]}):c?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"HR"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Employees and leave management"})]}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),children:"Add Employee"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx($r,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:y}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Employees"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:j}),s.jsx("p",{className:"text-xs text-text-secondary",children:"On Leave"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(cS,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:w}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Pending Requests"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:gue.map(O=>s.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))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(Tl,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.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"})]}),s.jsx(Ze,{variant:"secondary",size:"sm",icon:s.jsx(nd,{size:14}),children:"Filter"})]})]}),e==="Employees"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Employee"}),s.jsx(Ae,{children:"Department"}),s.jsx(Ae,{children:"Role"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Start Date"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[v.map(O=>{const A=O.name||`${O.first_name} ${O.last_name}`,T=O.role||O.position,N=O.startDate||O.start_date;return s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:A.split(" ").map(E=>E[0]).join("")}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:A}),s.jsx("p",{className:"text-xs text-text-secondary",children:O.email})]})]})}),s.jsx(be,{children:s.jsx(_e,{variant:vue[O.department]||"default",children:O.department})}),s.jsx(be,{children:T}),s.jsx(be,{children:s.jsx(_e,{variant:O.status==="active"?"success":O.status==="on_leave"?"warning":"danger",children:O.status.replace("_"," ")})}),s.jsx(be,{children:Et(N||"")}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},O.id)}),v.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No employees found"})})]})]})}),e==="Leaves"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Employee"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{children:"Period"}),s.jsx(Ae,{align:"right",children:"Days"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[_.map(O=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.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(A=>A[0]).join("")}),s.jsx("span",{className:"font-medium text-text-primary",children:O.employeeName})]})}),s.jsx(be,{children:s.jsx(_e,{variant:O.type==="vacation"?"primary":O.type==="sick"?"warning":"default",children:O.type})}),s.jsx(be,{children:s.jsxs("span",{className:"text-sm text-text-primary",children:[Et(O.startDate)," — ",Et(O.endDate)]})}),s.jsx(be,{align:"right",children:s.jsx("span",{className:"font-medium",children:O.days})}),s.jsx(be,{children:s.jsx(_e,{variant:O.status==="approved"?"success":O.status==="pending"?"warning":"danger",children:O.status})}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:16})})})]},O.id)),_.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No leave requests found"})})]})]})})]})}const xR={draft:{variant:"default",icon:dn},pending_signature:{variant:"warning",icon:dn},active:{variant:"success",icon:yr},expired:{variant:"danger",icon:hn},terminated:{variant:"default",icon:hn},disputed:{variant:"danger",icon:hn}},jue={aamos:"primary",quixzoom:"success",legal:"warning",hr:"default"};function wue(){const[e,t]=M.useState("contracts"),[n,r]=M.useState(""),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState([]),[p,x]=M.useState([]),[y,j]=M.useState([]),[w,S]=M.useState(null),[v,_]=M.useState(!1);M.useEffect(()=>{async function N(){l(!0),d("");try{const[E,k,R]=await Promise.all([fetch("/api/v1/legal/contracts").then(L=>L.json()),fetch("/api/v1/legal/templates").then(L=>L.json()),fetch("/api/v1/legal/product-links").then(L=>L.json())]);h(E.contracts||[]),x(k.templates||[]),j(R.links||[])}catch(E){d(E instanceof Error?E.message:"Failed to load legal data")}finally{l(!1)}}N()},[]);const O=f.filter(N=>N.name.toLowerCase().includes(n.toLowerCase())||N.counterparty.toLowerCase().includes(n.toLowerCase())||N.template_type.toLowerCase().includes(n.toLowerCase())),A=p.filter(N=>N.name.toLowerCase().includes(n.toLowerCase())||N.description.toLowerCase().includes(n.toLowerCase())||N.category.toLowerCase().includes(n.toLowerCase()));if(i)return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"})]}),s.jsx(Me,{className:"h-[400px]"})]});if(c)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:c})});const T=[{id:"contracts",label:"Avtal",icon:Pn},{id:"templates",label:"Mallar",icon:M5},{id:"products",label:"Produktkopplingar",icon:Yo}];return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Legal"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Avtal, mallar och produktkopplingar"})]}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),children:"Nytt avtal"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:s.jsx(Pn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Totalt avtal"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success/10 text-success flex items-center justify-center",children:s.jsx(yr,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(N=>N.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning/10 text-warning flex items-center justify-center",children:s.jsx(dn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(N=>N.status==="pending_signature").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Väntar signering"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger/10 text-danger flex items-center justify-center",children:s.jsx(hn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(N=>N.status==="expired"||N.status==="terminated").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Utgångna"})]})]})})]}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto",children:T.map(N=>s.jsxs("button",{onClick:()=>t(N.id),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===N.id?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(N.icon,{size:16}),N.label]},N.id))}),s.jsxs("div",{className:"relative",children:[s.jsx(Tl,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Sök avtal, mallar eller produkter...",value:n,onChange:N=>r(N.target.value),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]}),e==="contracts"&&s.jsx(te,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border",children:[s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Avtal"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Motpart"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Typ"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Status"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Värde"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Period"}),s.jsx("th",{className:"text-right text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3"})]})}),s.jsxs("tbody",{className:"divide-y divide-border",children:[O.map(N=>{const E=xR[N.status]||xR.draft;return s.jsxs("tr",{className:"hover:bg-bg transition-colors",children:[s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary flex items-center justify-center",children:s.jsx(Pn,{size:14})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:N.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:N.template_type})]})]})}),s.jsxs("td",{className:"px-4 py-3",children:[s.jsx("p",{className:"text-sm text-text-primary",children:N.counterparty}),N.counterparty_org&&s.jsx("p",{className:"text-xs text-text-secondary",children:N.counterparty_org})]}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(_e,{variant:"default",className:"text-xs",children:N.template_type})}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs(_e,{variant:E.variant,className:"text-xs flex items-center gap-1",children:[s.jsx(E.icon,{size:12}),N.status]})}),s.jsx("td",{className:"px-4 py-3",children:N.value?s.jsxs("p",{className:"text-sm font-medium",children:[Ce(N.value)," ",N.currency]}):s.jsx("p",{className:"text-sm text-text-secondary",children:"—"})}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("p",{className:"text-sm text-text-secondary",children:[N.start_date?Et(N.start_date):"—",N.end_date&&` → ${Et(N.end_date)}`]})}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-1",children:[s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(fS,{size:14})}),s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(nE,{size:14})}),s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(qa,{size:14})})]})})]},N.id)}),O.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"text-center text-text-secondary py-8",children:"Inga avtal hittades"})})]})]})})}),e==="templates"&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[A.map(N=>s.jsx("div",{className:"cursor-pointer hover:border-primary transition-colors",onClick:()=>{S(N),_(!0)},children:s.jsx(te,{children:s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:s.jsx(Pn,{size:20})}),s.jsx(_e,{variant:jue[N.category],className:"text-xs",children:N.category})]}),s.jsx("h3",{className:"font-semibold text-text-primary mb-1",children:N.name}),s.jsx("p",{className:"text-sm text-text-secondary mb-3",children:N.description}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-tertiary",children:[s.jsx(fn,{size:12}),N.jurisdiction,s.jsx("span",{className:"mx-1",children:"•"}),s.jsx(Qr,{size:12}),"v",N.version,s.jsx("span",{className:"mx-1",children:"•"}),N.sections.length," sektioner"]})]})})},N.id)),A.length===0&&s.jsx("div",{className:"col-span-full text-center text-text-secondary py-8",children:"Inga mallar hittades"})]}),e==="products"&&s.jsx("div",{className:"space-y-6",children:y.map(N=>s.jsx(te,{children:s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:s.jsx(Yo,{size:20})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-text-primary",children:N.product_name}),s.jsx("p",{className:"text-sm text-text-secondary",children:N.product_type})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Krävs"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:N.required_contracts.map(E=>s.jsx(_e,{variant:"primary",className:"text-xs",children:E},E))})]}),N.optional_contracts.length>0&&s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Valbart"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:N.optional_contracts.map(E=>s.jsx(_e,{variant:"default",className:"text-xs",children:E},E))})]})]})]})},N.product_id))}),v&&w&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:s.jsx("div",{className:"w-full max-w-3xl max-h-[90vh] overflow-y-auto",children:s.jsx(te,{children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-start justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold",children:w.name}),s.jsx("p",{className:"text-text-secondary",children:w.description})]}),s.jsx("button",{onClick:()=>_(!1),className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:"✕"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Kategori"}),s.jsx("p",{className:"font-medium",children:w.category})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Jurisdiktion"}),s.jsx("p",{className:"font-medium",children:w.jurisdiction})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Språk"}),s.jsx("p",{className:"font-medium",children:w.language})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Version"}),s.jsx("p",{className:"font-medium",children:w.version})]})]}),s.jsx("h3",{className:"font-semibold mb-3",children:"Avtalssektioner"}),s.jsx("div",{className:"space-y-2 mb-6",children:w.sections.map(N=>s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsxs("span",{className:"text-xs text-text-tertiary",children:[N.order,"."]}),s.jsx("p",{className:"font-medium text-sm",children:N.title}),N.required&&s.jsx(_e,{variant:"danger",className:"text-xs",children:"Krävs"})]}),s.jsx("p",{className:"text-sm text-text-secondary",children:N.content}),N.variables&&N.variables.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:N.variables.map(E=>s.jsx("code",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded",children:"{{"+E+"}}"},E))})]},N.id))}),s.jsx("h3",{className:"font-semibold mb-3",children:"Standardvillkor"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Betalningsvillkor"}),s.jsx("p",{className:"text-sm",children:w.default_terms.payment_terms})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Valuta"}),s.jsx("p",{className:"text-sm",children:w.default_terms.currency})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Avtalsperiod"}),s.jsx("p",{className:"text-sm",children:w.default_terms.contract_period})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Uppsägningstid"}),s.jsx("p",{className:"text-sm",children:w.default_terms.notice_period})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Auto-förnyelse"}),s.jsx("p",{className:"text-sm",children:w.default_terms.auto_renewal?"Ja":"Nej"})]}),s.jsxs("div",{className:"p-3 bg-surface rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"SLA"}),s.jsx("p",{className:"text-sm",children:w.default_terms.sla_enabled?`${w.default_terms.sla_uptime}% uptime`:"Ej aktiverat"})]})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs(Ze,{className:"flex-1",children:[s.jsx(wr,{size:16,className:"mr-2"}),"Skapa avtal från mall"]}),s.jsxs(Ze,{variant:"secondary",children:[s.jsx(nE,{size:16,className:"mr-2"}),"Förhandsgranska"]})]})]})})})})]})}const Sue=[{id:"c1",name:"Vinterservice Kampanj",description:"Komplett vinterservice för bilägare",strategy:"Fokus på säkerhet och förebyggande underhåll",targetAudience:"Bilägare i Sverige",cta:"Boka vinterservice nu",status:"active",startDate:"2024-01-15",endDate:"2024-03-15",budget:5e4,goals:[{metric:"bookings",target:200,current:145},{metric:"reach",target:5e4,current:42e3}],activities:[]},{id:"c2",name:"ALVA Launch",description:"Lansering av ALVA diagnosplattform",strategy:"B2B-fokus på verkstäder och fordonsbolag",targetAudience:"Fordonsverkstäder",cta:"Ansök om demo",status:"active",startDate:"2024-02-01",endDate:"2024-04-30",budget:1e5,goals:[{metric:"demos",target:50,current:32},{metric:"signups",target:20,current:12}],activities:[]},{id:"c3",name:"Sommar Erbjudande",description:"Sommarcheck och AC-service",strategy:"Säsongserbjudande för sommarförberedelser",targetAudience:"Bilägare",cta:"Boka sommarcheck",status:"planned",startDate:"2024-05-01",endDate:"2024-07-31",budget:4e4,goals:[{metric:"bookings",target:300},{metric:"revenue",target:15e4}],activities:[]}],b8=[{id:"a1",date:"2024-08-12",time:"09:00",channel:"instagram",activityType:"reel",campaign:"Vinterservice Kampanj",product:"Service",targetAudience:"Bilägare 25-45",purpose:"Öka medvetenhet om vinterservice",cta:"Boka nu",status:"approved",assignee:"Anna Lind",publicationStatus:"scheduled",publicationDestination:"Instagram",metadata:{hashtags:"#vinterservice #bilservice #säkerhet"}},{id:"a2",date:"2024-08-12",time:"14:00",channel:"linkedin",activityType:"article",campaign:"ALVA Launch",product:"ALVA",targetAudience:"Verkstadsägare",purpose:"Positionera ALVA som branschlösning",cta:"Läs mer",status:"in_production",assignee:"Erik Svensson",publicationStatus:"draft",publicationDestination:"LinkedIn",metadata:{topic:"Digitalisering av fordonsbranschen"}},{id:"a3",date:"2024-08-13",time:"10:00",channel:"newsletter",activityType:"newsletter",campaign:"Vinterservice Kampanj",product:"Service",targetAudience:"Befintliga kunder",purpose:"Driva bokningar för vinterservice",cta:"Boka online",status:"scheduled",assignee:"Johan Berg",publicationStatus:"scheduled",publicationDestination:"Email",metadata:{segment:"kunder_senaste_12_manader"}},{id:"a4",date:"2024-08-14",time:"11:00",channel:"facebook",activityType:"carousel",campaign:"Sommar Erbjudande",product:"AC-service",targetAudience:"Bilägare 30-55",purpose:"Visa fördelar med AC-service",cta:"Se erbjudande",status:"planned",assignee:"Anna Lind",publicationStatus:"draft",publicationDestination:"Facebook",metadata:{images:5,format:"carousel"}},{id:"a5",date:"2024-08-15",time:"08:00",channel:"google_business",activityType:"post",campaign:"Vinterservice Kampanj",product:"Service",targetAudience:"Lokal målgrupp",purpose:"Lokal synlighet",cta:"Ring oss",status:"published",assignee:"Johan Berg",publicationStatus:"published",publicationDestination:"Google Business Profile",result:{impressions:1200,engagement:45,clicks:12},metadata:{}}],Nue=[{id:"b1",name:"Vinterservice - Instagram Reel",type:"template",content:{format:"reel",duration:"15-30s",hook:"Visa isig bilruta",cta:"Boka vinterservice"},tags:["vinterservice","instagram","reel","video"],usageCount:12},{id:"b2",name:"ALVA - LinkedIn Article",type:"template",content:{format:"article",length:"800-1200 words",structure:["problem","solution","proof","cta"],tone:"professional"},tags:["alva","linkedin","article","b2b"],usageCount:8},{id:"b3",name:"Sommarcheck - Newsletter",type:"template",content:{format:"newsletter",sections:["header","offer","benefits","testimonial","cta"],subject_line_templates:["Förbered bilen för sommaren","Sommarcheck - 20% rabatt"]},tags:["sommar","newsletter","email","erbjudande"],usageCount:15}],Tp={instagram:z5,facebook:R5,linkedin:L5,newsletter:Dn,website:fn,google_business:Y1,youtube:fF,tiktok:K5,email:Dn},Ds={planned:"bg-gray-100 text-gray-600",brief_created:"bg-blue-50 text-blue-600",in_production:"bg-yellow-50 text-yellow-600",generated:"bg-purple-50 text-purple-600",review_required:"bg-orange-50 text-orange-600",approved:"bg-green-50 text-green-600",scheduled:"bg-cyan-50 text-cyan-600",publishing:"bg-indigo-50 text-indigo-600",published:"bg-emerald-50 text-emerald-600",verified:"bg-teal-50 text-teal-600",failed:"bg-red-50 text-red-600",paused:"bg-amber-50 text-amber-600",cancelled:"bg-slate-50 text-slate-600"},b2={planned:dn,brief_created:dn,in_production:dn,generated:yr,review_required:Zr,approved:yr,scheduled:dn,publishing:W1,published:yr,verified:yr,failed:Zr,paused:X1,cancelled:Zr};function Aue(){const[e,t]=M.useState(new Date),[n,r]=M.useState("month"),[i,l]=M.useState(null),[c,d]=M.useState("all"),[f,h]=M.useState("all"),x=b8.filter(w=>!(c!=="all"&&w.channel!==c||f!=="all"&&w.status!==f)),y=w=>{const S=new Date(e);switch(n){case"year":S.setFullYear(S.getFullYear()+(w==="next"?1:-1));break;case"quarter":S.setMonth(S.getMonth()+(w==="next"?3:-3));break;case"month":S.setMonth(S.getMonth()+(w==="next"?1:-1));break;case"week":S.setDate(S.getDate()+(w==="next"?7:-7));break;case"day":S.setDate(S.getDate()+(w==="next"?1:-1));break}t(S)},j=()=>{switch(n){case"year":return e.getFullYear().toString();case"quarter":return`Q${Math.floor(e.getMonth()/3)+1} ${e.getFullYear()}`;case"month":return e.toLocaleDateString("sv-SE",{month:"long",year:"numeric"});case"week":const S=new Date(e);S.setDate(e.getDate()-e.getDay());const v=new Date(S);return v.setDate(S.getDate()+6),`${S.toLocaleDateString("sv-SE")} - ${v.toLocaleDateString("sv-SE")}`;case"day":return e.toLocaleDateString("sv-SE",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}};return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Calendar"}),s.jsx("div",{className:"flex items-center gap-2 bg-gray-100 rounded-lg p-1",children:["year","quarter","month","week","day"].map(w=>s.jsx("button",{onClick:()=>r(w),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors capitalize ${n===w?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:w},w))})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>y("prev"),className:"p-2 hover:bg-gray-100 rounded-lg",children:s.jsx(C5,{size:20})}),s.jsx("span",{className:"text-lg font-semibold min-w-[200px] text-center",children:j()}),s.jsx("button",{onClick:()=>y("next"),className:"p-2 hover:bg-gray-100 rounded-lg",children:s.jsx(tu,{size:20})}),s.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:[s.jsx(wr,{size:18}),"New Activity"]})]})]}),s.jsxs("div",{className:"flex items-center gap-4 p-4 border-b bg-gray-50",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nd,{size:16,className:"text-gray-500"}),s.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),s.jsxs("select",{value:c,onChange:w=>d(w.target.value),className:"px-3 py-1.5 text-sm border rounded-lg bg-white",children:[s.jsx("option",{value:"all",children:"All Channels"}),s.jsx("option",{value:"instagram",children:"Instagram"}),s.jsx("option",{value:"facebook",children:"Facebook"}),s.jsx("option",{value:"linkedin",children:"LinkedIn"}),s.jsx("option",{value:"newsletter",children:"Newsletter"}),s.jsx("option",{value:"website",children:"Website"}),s.jsx("option",{value:"google_business",children:"Google Business"})]}),s.jsxs("select",{value:f,onChange:w=>h(w.target.value),className:"px-3 py-1.5 text-sm border rounded-lg bg-white",children:[s.jsx("option",{value:"all",children:"All Status"}),s.jsx("option",{value:"planned",children:"Planned"}),s.jsx("option",{value:"in_production",children:"In Production"}),s.jsx("option",{value:"approved",children:"Approved"}),s.jsx("option",{value:"scheduled",children:"Scheduled"}),s.jsx("option",{value:"published",children:"Published"})]})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[n==="month"&&s.jsx(_ue,{date:e,activities:x,onSelect:l}),n==="week"&&s.jsx(Oue,{date:e,activities:x,onSelect:l}),n==="day"&&s.jsx(Tue,{date:e,activities:x,onSelect:l}),n==="year"&&s.jsx(Eue,{year:e.getFullYear(),activities:x,onSelect:l}),n==="quarter"&&s.jsx(Cue,{date:e,activities:x,onSelect:l})]}),s.jsx(Ma,{children:i&&s.jsx(Mue,{activity:i,onClose:()=>l(null)})})]})}function _ue({date:e,activities:t,onSelect:n}){const r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),i=new Date(e.getFullYear(),e.getMonth(),1).getDay(),l=Array.from({length:r},(d,f)=>f+1),c=Array.from({length:i===0?6:i-1},(d,f)=>f);return s.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(d=>s.jsx("div",{className:"p-2 text-center text-sm font-medium text-gray-500",children:d},d)),c.map(d=>s.jsx("div",{className:"min-h-[100px] bg-gray-50 rounded-lg"},`empty-${d}`)),l.map(d=>{const f=t.filter(h=>{const p=new Date(h.date);return p.getDate()===d&&p.getMonth()===e.getMonth()});return s.jsxs("div",{className:"min-h-[100px] bg-white border rounded-lg p-2 hover:shadow-md transition-shadow",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700",children:d}),s.jsx("div",{className:"mt-1 space-y-1",children:f.map(h=>{const p=Tp[h.channel],x=b2[h.status];return s.jsxs(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(h),className:`w-full text-left px-2 py-1 rounded text-xs flex items-center gap-1.5 ${Ds[h.status]}`,children:[p&&s.jsx(p,{size:12}),s.jsx("span",{className:"truncate flex-1",children:h.activityType}),s.jsx(x,{size:10})]},h.id)})})]},d)})]})}function Oue({date:e,activities:t,onSelect:n}){const r=new Date(e);r.setDate(e.getDate()-e.getDay()+1);const i=Array.from({length:7},(l,c)=>{const d=new Date(r);return d.setDate(r.getDate()+c),d});return s.jsx("div",{className:"grid grid-cols-7 gap-2",children:i.map((l,c)=>{const d=t.filter(f=>new Date(f.date).toDateString()===l.toDateString());return s.jsxs("div",{className:"bg-white border rounded-lg p-3 min-h-[400px]",children:[s.jsxs("div",{className:"text-center mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 uppercase",children:l.toLocaleDateString("sv-SE",{weekday:"short"})}),s.jsx("div",{className:"text-lg font-bold",children:l.getDate()})]}),s.jsx("div",{className:"space-y-2",children:d.map(f=>{const h=Tp[f.channel];return s.jsxs(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(f),className:`w-full text-left p-2 rounded-lg text-xs ${Ds[f.status]}`,children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[h&&s.jsx(h,{size:12}),s.jsx("span",{className:"font-medium",children:f.time})]}),s.jsx("div",{className:"truncate",children:f.campaign}),s.jsx("div",{className:"truncate text-gray-600",children:f.purpose})]},f.id)})})]},c)})})}function Tue({date:e,activities:t,onSelect:n}){const r=t.filter(l=>new Date(l.date).toDateString()===e.toDateString()).sort((l,c)=>(l.time||"").localeCompare(c.time||"")),i=Array.from({length:24},(l,c)=>`${String(c).padStart(2,"0")}:00`);return s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-center mb-4",children:s.jsx("h2",{className:"text-xl font-bold",children:e.toLocaleDateString("sv-SE",{weekday:"long",day:"numeric",month:"long"})})}),i.map(l=>{const c=r.filter(d=>{var f;return(f=d.time)==null?void 0:f.startsWith(l.split(":")[0])});return s.jsxs("div",{className:"flex gap-4 min-h-[60px]",children:[s.jsx("div",{className:"w-16 text-right text-sm text-gray-500 pt-2",children:l}),s.jsx("div",{className:"flex-1 border-l-2 border-gray-200 pl-4 space-y-2",children:c.map(d=>{const f=Tp[d.channel],h=b2[d.status];return s.jsxs(Ke.button,{whileHover:{scale:1.01},onClick:()=>n(d),className:`w-full text-left p-3 rounded-lg ${Ds[d.status]}`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[f&&s.jsx(f,{size:16}),s.jsx("span",{className:"font-medium",children:d.campaign})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs",children:d.time}),s.jsx(h,{size:14})]})]}),s.jsx("div",{className:"mt-1 text-sm",children:d.purpose}),s.jsxs("div",{className:"mt-1 text-xs opacity-75",children:[d.channel," → ",d.publicationDestination]})]},d.id)})})]},l)})]})}function Eue({year:e,activities:t,onSelect:n}){const r=Array.from({length:12},(i,l)=>l);return s.jsx("div",{className:"grid grid-cols-4 gap-4",children:r.map(i=>{const l=t.filter(d=>{const f=new Date(d.date);return f.getMonth()===i&&f.getFullYear()===e}),c=new Date(e,i).toLocaleDateString("sv-SE",{month:"long"});return s.jsxs("div",{className:"bg-white border rounded-lg p-4",children:[s.jsx("h3",{className:"font-bold text-lg mb-3 capitalize",children:c}),s.jsxs("div",{className:"space-y-2",children:[l.slice(0,5).map(d=>s.jsx(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(d),className:`w-full text-left px-2 py-1.5 rounded text-xs ${Ds[d.status]}`,children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"font-medium",children:new Date(d.date).getDate()}),s.jsx("span",{className:"truncate",children:d.campaign})]})},d.id)),l.length>5&&s.jsxs("div",{className:"text-xs text-gray-500 text-center",children:["+",l.length-5," more"]})]})]},i)})})}function Cue({date:e,activities:t,onSelect:n}){const r=Math.floor(e.getMonth()/3)+1,i=Array.from({length:3},(l,c)=>r*3-3+c);return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"text-center",children:s.jsxs("h2",{className:"text-2xl font-bold",children:["Q",r," ",e.getFullYear()]})}),s.jsx("div",{className:"grid grid-cols-3 gap-4",children:i.map(l=>{const c=t.filter(f=>new Date(f.date).getMonth()===l),d=new Date(e.getFullYear(),l).toLocaleDateString("sv-SE",{month:"long"});return s.jsxs("div",{className:"bg-white border rounded-lg p-4",children:[s.jsx("h3",{className:"font-bold text-lg mb-3 capitalize",children:d}),s.jsx("div",{className:"space-y-2 max-h-[400px] overflow-auto",children:c.map(f=>s.jsxs(Ke.button,{whileHover:{scale:1.02},onClick:()=>n(f),className:`w-full text-left p-2 rounded text-xs ${Ds[f.status]}`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium",children:f.campaign}),s.jsx("span",{children:new Date(f.date).getDate()})]}),s.jsx("div",{className:"mt-1",children:f.purpose})]},f.id))})]},l)})})]})}function Mue({activity:e,onClose:t}){const n=Tp[e.channel],r=b2[e.status];return s.jsx(Ke.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:t,children:s.jsxs(Ke.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},onClick:i=>i.stopPropagation(),className:"bg-white rounded-xl shadow-xl max-w-2xl w-full max-h-[90vh] overflow-auto",children:[s.jsx("div",{className:"p-6 border-b",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[n&&s.jsx(n,{size:24,className:"text-blue-600"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-bold",children:e.campaign}),s.jsxs("p",{className:"text-sm text-gray-500",children:[e.activityType," on ",e.channel]})]})]}),s.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-lg",children:"✕"})]})}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${Ds[e.status]}`,children:[s.jsx(r,{size:14,className:"inline mr-1"}),e.status.replace("_"," ")]}),s.jsxs("span",{className:"text-sm text-gray-500",children:[e.date," ",e.time]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Purpose"}),s.jsx("p",{className:"text-gray-900",children:e.purpose})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Call to Action"}),s.jsx("p",{className:"text-blue-600 font-medium",children:e.cta})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Target Audience"}),s.jsx("p",{children:e.targetAudience})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Product"}),s.jsx("p",{children:e.product})]})]}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-2",children:"Publication"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fn,{size:16}),s.jsx("span",{children:e.publicationDestination}),s.jsx("span",{className:"text-gray-400",children:"→"}),s.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${Ds[e.publicationStatus]}`,children:e.publicationStatus})]})]}),e.result&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-2",children:"Results"}),s.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[e.result.impressions!==void 0&&s.jsxs("div",{className:"bg-blue-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-blue-600",children:e.result.impressions.toLocaleString()}),s.jsx("div",{className:"text-xs text-blue-600",children:"Impressions"})]}),e.result.engagement!==void 0&&s.jsxs("div",{className:"green-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:e.result.engagement}),s.jsx("div",{className:"text-xs text-green-600",children:"Engagement"})]}),e.result.clicks!==void 0&&s.jsxs("div",{className:"bg-purple-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-purple-600",children:e.result.clicks}),s.jsx("div",{className:"text-xs text-purple-600",children:"Clicks"})]}),e.result.conversions!==void 0&&s.jsxs("div",{className:"bg-orange-50 rounded-lg p-3 text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-orange-600",children:e.result.conversions}),s.jsx("div",{className:"text-xs text-orange-600",children:"Conversions"})]})]})]}),e.assignee&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-1",children:"Assigned to"}),s.jsx("p",{children:e.assignee})]}),s.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[s.jsx("button",{className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:"Edit Activity"}),s.jsx("button",{className:"flex-1 px-4 py-2 border rounded-lg hover:bg-gray-50",children:"Preview Content"}),s.jsx("button",{className:"flex-1 px-4 py-2 border rounded-lg hover:bg-gray-50",children:"Publish Now"})]})]})]})})}function kue(){const[e,t]=M.useState("30d"),n=Sue,r=b8,i={activeCampaigns:n.filter(c=>c.status==="active").length,plannedActivities:r.filter(c=>c.status==="planned").length,inProduction:r.filter(c=>c.status==="in_production").length,scheduled:r.filter(c=>c.status==="scheduled").length,published:r.filter(c=>c.status==="published").length,failed:r.filter(c=>c.status==="failed").length,totalImpressions:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.impressions)||0)},0),totalEngagement:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.engagement)||0)},0),totalClicks:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.clicks)||0)},0),totalConversions:r.reduce((c,d)=>{var f;return c+(((f=d.result)==null?void 0:f.conversions)||0)},0)},l=r.filter(c=>new Date(c.date)>=new Date).sort((c,d)=>new Date(c.date).getTime()-new Date(d.date).getTime()).slice(0,5);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Control Tower"}),s.jsx("p",{className:"text-gray-500",children:"Real-time overview of all marketing operations"})]}),s.jsx("div",{className:"flex items-center gap-2 bg-gray-100 rounded-lg p-1",children:["7d","30d","90d","year"].map(c=>s.jsx("button",{onClick:()=>t(c),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${e===c?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,children:c==="7d"?"7 days":c==="30d"?"30 days":c==="90d"?"90 days":"Year"},c))})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center",children:s.jsx(Io,{size:20,className:"text-blue-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.activeCampaigns}),s.jsx("div",{className:"text-sm text-gray-500",children:"Active Campaigns"})]})]})}),s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-yellow-100 rounded-lg flex items-center justify-center",children:s.jsx(dn,{size:20,className:"text-yellow-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.inProduction}),s.jsx("div",{className:"text-sm text-gray-500",children:"In Production"})]})]})}),s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center",children:s.jsx(yr,{size:20,className:"text-green-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.published}),s.jsx("div",{className:"text-sm text-gray-500",children:"Published"})]})]})}),s.jsx(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-lg flex items-center justify-center",children:s.jsx(Zr,{size:20,className:"text-red-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.failed}),s.jsx("div",{className:"text-sm text-gray-500",children:"Failed"})]})]})})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(fS,{size:16,className:"text-blue-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Impressions"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalImpressions.toLocaleString()})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(rF,{size:16,className:"text-green-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Engagement"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalEngagement})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(UH,{size:16,className:"text-purple-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Clicks"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalClicks})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(lF,{size:16,className:"text-orange-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Conversions"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalConversions})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Active Campaigns"}),s.jsx("div",{className:"space-y-4",children:n.filter(c=>c.status==="active").map(c=>{var d;return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"font-medium",children:c.name}),s.jsx("span",{className:"px-2 py-1 bg-green-100 text-green-700 text-xs rounded-full",children:"Active"})]}),s.jsx("p",{className:"text-sm text-gray-500 mb-3",children:c.description}),s.jsx("div",{className:"space-y-2",children:(d=c.goals)==null?void 0:d.map((f,h)=>{var p;return s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:f.metric}),s.jsxs("span",{children:[(p=f.current)==null?void 0:p.toLocaleString()," / ",f.target.toLocaleString()]})]}),s.jsx("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden",children:s.jsx(Ke.div,{initial:{width:0},animate:{width:`${(f.current||0)/f.target*100}%`},className:"h-full bg-blue-600 rounded-full"})})]},h)})})]},c.id)})})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Upcoming Activities"}),s.jsx("div",{className:"space-y-3",children:l.map(c=>s.jsxs("div",{className:"flex items-center gap-4 p-3 border rounded-lg",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-50 rounded-lg flex items-center justify-center",children:s.jsx(cS,{size:20,className:"text-blue-600"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-medium",children:c.campaign}),s.jsx("p",{className:"text-sm text-gray-500",children:c.purpose})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-sm font-medium",children:c.date}),s.jsx("div",{className:"text-xs text-gray-500",children:c.time})]})]},c.id))})]})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Channel Performance"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:["instagram","facebook","linkedin","newsletter"].map(c=>{const d=r.filter(p=>p.channel===c),f=d.filter(p=>p.status==="published").length,h=d.reduce((p,x)=>{var y;return p+(((y=x.result)==null?void 0:y.impressions)||0)},0);return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-medium capitalize mb-2",children:c}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-500",children:"Activities"}),s.jsx("span",{children:d.length})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-500",children:"Published"}),s.jsx("span",{children:f})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-gray-500",children:"Impressions"}),s.jsx("span",{children:h.toLocaleString()})]})]})]},c)})})]})]})}const Pue={campaign:iF,template:Pn,cta:wr,image_format:XH,video_format:K5,text_template:Pn};function Rue(){const[e]=M.useState(Nue),[t,n]=M.useState("all"),r=t==="all"?e:e.filter(i=>i.type===t);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Battery"}),s.jsx("p",{className:"text-gray-500",children:"Reusable campaigns, templates, and content formats"})]}),s.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:[s.jsx(wr,{size:18}),"Add Asset"]})]}),s.jsx("div",{className:"flex items-center gap-2",children:["all","campaign","template","cta","image_format","video_format"].map(i=>s.jsx("button",{onClick:()=>n(i),className:`px-3 py-1.5 text-sm font-medium rounded-lg transition-colors capitalize ${t===i?"bg-blue-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:i.replace("_"," ")},i))}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(i=>{const l=Pue[i.type]||T5;return s.jsxs(Ke.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-50 rounded-lg flex items-center justify-center",children:s.jsx(l,{size:20,className:"text-blue-600"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:i.name}),s.jsx("span",{className:"text-xs text-gray-500 capitalize",children:i.type.replace("_"," ")})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(M5,{size:14})}),s.jsx("button",{className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(cF,{size:14})})]})]}),s.jsx("div",{className:"bg-gray-50 rounded-lg p-3 mb-3",children:s.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(i.content,null,2)})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex gap-1",children:i.tags.map(c=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 text-xs rounded",children:c},c))}),s.jsxs("span",{className:"text-xs text-gray-500",children:["Used ",i.usageCount," times"]})]})]},i.id)})})]})}function Due(){const[e,t]=M.useState("control-tower"),n=[{id:"control-tower",label:"Control Tower",icon:hS},{id:"calendar",label:"Calendar",icon:cS},{id:"battery",label:"Battery",icon:T5},{id:"settings",label:"Settings",icon:V5}];return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsx("div",{className:"flex items-center gap-1 bg-gray-100 rounded-xl p-1 mb-6",children:n.map(r=>{const i=r.icon;return s.jsxs("button",{onClick:()=>t(r.id),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===r.id?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[s.jsx(i,{size:16}),r.label]},r.id)})}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx(Ma,{mode:"wait",children:s.jsxs(Ke.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e==="calendar"&&s.jsx(Aue,{}),e==="control-tower"&&s.jsx(kue,{}),e==="battery"&&s.jsx(Rue,{}),e==="settings"&&s.jsx(zue,{})]},e)})})]})}function zue(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Marketing Settings"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Company Profile"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Company Name"}),s.jsx("input",{type:"text",defaultValue:"Landvex Inc",className:"w-full px-3 py-2 border rounded-lg"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Industry"}),s.jsx("input",{type:"text",defaultValue:"Automotive Technology",className:"w-full px-3 py-2 border rounded-lg"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Brand Voice"}),s.jsx("textarea",{defaultValue:"Professional, innovative, customer-focused",className:"w-full px-3 py-2 border rounded-lg",rows:3})]})]})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Channels"}),s.jsx("div",{className:"space-y-3",children:[{name:"Instagram",connected:!0,followers:"2.4K"},{name:"Facebook",connected:!0,followers:"1.8K"},{name:"LinkedIn",connected:!0,followers:"856"},{name:"Newsletter",connected:!0,subscribers:"3.2K"},{name:"YouTube",connected:!1}].map(e=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:e.name}),e.followers&&s.jsxs("span",{className:"text-sm text-gray-500",children:[e.followers," followers"]}),e.subscribers&&s.jsxs("span",{className:"text-sm text-gray-500",children:[e.subscribers," subscribers"]})]}),s.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${e.connected?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:e.connected?"Connected":"Disconnected"})]},e.name))})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Publishing Schedule"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Instagram"}),s.jsx("span",{className:"text-sm text-gray-500",children:"3 posts per week"})]}),s.jsx(tu,{size:16,className:"text-gray-400"})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"LinkedIn"}),s.jsx("span",{className:"text-sm text-gray-500",children:"2 articles per week"})]}),s.jsx(tu,{size:16,className:"text-gray-400"})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Newsletter"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Weekly on Tuesdays"})]}),s.jsx(tu,{size:16,className:"text-gray-400"})]})]})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Automation"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-publish approved content"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Publish when approved and scheduled"})]}),s.jsx("div",{className:"w-12 h-6 bg-blue-600 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute right-0.5 top-0.5"})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-generate reports"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Weekly performance reports"})]}),s.jsx("div",{className:"w-12 h-6 bg-blue-600 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute right-0.5 top-0.5"})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-reschedule failed posts"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Retry failed publications"})]}),s.jsx("div",{className:"w-12 h-6 bg-gray-300 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute left-0.5 top-0.5"})})]})]})]})]})]})}function Lue(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Support"}),s.jsx(te,{className:"p-6",children:s.jsx("p",{className:"text-gray-500",children:"Support tickets coming soon..."})})]})}const $ue={send_email:s.jsx(Dn,{size:12}),slack_message:s.jsx(xh,{size:12}),create_task:s.jsx(Pn,{size:12}),add_to_crm:s.jsx(cE,{size:12}),update_hr:s.jsx(cE,{size:12})},Bue={send_email:"Send Email",slack_message:"Slack Message",create_task:"Create Task",add_to_crm:"Add to CRM",update_hr:"Update HR"};function Iue(e){if(!e)return"Never";const t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"Just now":r<3600?`${Math.floor(r/60)} min ago`:r<86400?`${Math.floor(r/3600)} hours ago`:r<604800?`${Math.floor(r/86400)} days ago`:t.toLocaleDateString()}function que(e){return Array.isArray(e)?e.map(t=>{if(typeof t=="object"&&t!==null){const n=t.type;return Bue[n]||n}return String(t)}):[]}function Uue(){const[e,t]=M.useState([]),[n,r]=M.useState(!0),[i,l]=M.useState(""),[c,d]=M.useState(!1),[f,h]=M.useState(!1),{token:p}=Ia(),[x,y]=M.useState({name:"",description:"",trigger_type:"schedule",trigger_config:{cron:"0 9 * * *"},actions:[{type:"send_email",to:"",subject:"",body:""}]}),j=async()=>{r(!0),l("");try{const _={};p&&(_.Authorization=`Bearer ${p}`);const O=await fetch("/api/v1/automation/workflows",{headers:_});if(!O.ok)throw new Error(`Failed to fetch workflows: ${O.status}`);const A=await O.json();t(A.workflows||[])}catch(_){l(_ instanceof Error?_.message:"Failed to load workflows")}finally{r(!1)}};M.useEffect(()=>{j()},[p]);const w=async()=>{if(!(!x.name||!x.description)){h(!0);try{const _={"Content-Type":"application/json"};p&&(_.Authorization=`Bearer ${p}`);const O=await fetch("/api/v1/automation/workflows",{method:"POST",headers:_,body:JSON.stringify(x)});if(!O.ok)throw new Error(`Failed to create: ${O.status}`);d(!1),y({name:"",description:"",trigger_type:"schedule",trigger_config:{cron:"0 9 * * *"},actions:[{type:"send_email",to:"",subject:"",body:""}]}),j()}catch(_){l(_ instanceof Error?_.message:"Failed to create workflow")}finally{h(!1)}}},S=e.filter(_=>_.status==="active").length,v=e.reduce((_,O)=>_+(O.run_count||0),0);return n?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Me,{className:"h-12"}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:Array.from({length:4}).map((_,O)=>s.jsx(Me,{className:"h-[80px]"},O))}),s.jsx(Me,{className:"h-[400px]"})]}):i&&e.length===0?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-danger mb-4",children:i}),s.jsx(Ze,{onClick:j,children:"Retry"})]})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Automation"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Workflows and automated tasks"})]}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),onClick:()=>d(!0),children:"New Workflow"})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Io,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:e.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Workflows"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(W1,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:S}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(X1,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:e.length-S}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Paused"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(yr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:v.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Runs"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Workflows",subtitle:"Automated processes and triggers"}),s.jsx("div",{className:"space-y-3",children:e.length===0?s.jsxs("div",{className:"text-center py-12 text-text-secondary",children:[s.jsx(Io,{size:48,className:"mx-auto mb-4 text-text-tertiary"}),s.jsx("p",{children:"No workflows yet. Create your first workflow to get started."})]}):e.map(_=>{const O=que(_.actions);return s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl bg-bg/50 hover:bg-bg transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center ${_.status==="active"?"bg-success-light text-success":"bg-warning-light text-warning"}`,children:_.status==="active"?s.jsx(W1,{size:18}):s.jsx(X1,{size:18})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium text-text-primary",children:_.name}),s.jsx(_e,{variant:_.status==="active"?"success":"warning",size:"sm",children:_.status})]}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:_.description}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(KH,{size:12,className:"text-text-secondary/60"}),s.jsx("span",{className:"text-[11px] text-text-secondary",children:_.trigger_type})]}),O.length>0&&s.jsx("div",{className:"flex items-center gap-1",children:O.map((A,T)=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 bg-bg rounded text-[10px] text-text-secondary",children:[$ue[A]||s.jsx(Io,{size:12}),A]},T))})]})]})]}),s.jsxs("div",{className:"flex items-center gap-6 text-right",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:(_.run_count||0).toLocaleString()}),s.jsx("p",{className:"text-[11px] text-text-secondary",children:"runs"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Iue(_.last_run_at)}),s.jsx("p",{className:"text-[11px] text-text-secondary",children:"last run"})]}),s.jsx("div",{className:"flex items-center",children:s.jsx("div",{className:`w-9 h-5 rounded-full relative cursor-pointer transition-colors ${_.status==="active"?"bg-success/20":"bg-warning/20"}`,children:s.jsx("div",{className:`absolute top-0.5 w-4 h-4 rounded-full transition-all ${_.status==="active"?"right-0.5 bg-success":"left-0.5 bg-warning"}`})})})]})]},_.id)})})]}),c&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:s.jsxs("div",{className:"w-full max-w-lg bg-surface rounded-2xl shadow-xl",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"New Workflow"}),s.jsx("button",{onClick:()=>d(!1),className:"p-2 hover:bg-bg rounded-lg transition-colors",children:s.jsx(Ts,{size:18})})]}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Name"}),s.jsx("input",{type:"text",value:x.name,onChange:_=>y({...x,name:_.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"e.g. Invoice Reminder"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Description"}),s.jsx("textarea",{value:x.description,onChange:_=>y({...x,description:_.target.value}),className:"w-full h-20 px-3 py-2 rounded-lg border bg-bg text-sm resize-none",placeholder:"What does this workflow do?"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Trigger Type"}),s.jsxs("select",{value:x.trigger_type,onChange:_=>y({...x,trigger_type:_.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"schedule",children:"Schedule (Cron)"}),s.jsx("option",{value:"webhook",children:"Webhook"}),s.jsx("option",{value:"event",children:"Event"})]})]}),x.trigger_type==="schedule"&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Cron Expression"}),s.jsx("input",{type:"text",value:x.trigger_config.cron||"",onChange:_=>y({...x,trigger_config:{cron:_.target.value}}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"0 9 * * *"}),s.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:"e.g. 0 9 * * * = daily at 9:00"})]})]}),s.jsxs("div",{className:"flex gap-3 p-4 border-t border-border",children:[s.jsx(Ze,{className:"flex-1",onClick:w,disabled:f||!x.name||!x.description,children:f?"Creating...":"Create Workflow"}),s.jsx(Ze,{variant:"secondary",onClick:()=>d(!1),children:"Cancel"})]})]})})]})}function Vue(){const[e,t]=M.useState([]),[n,r]=M.useState(null),[i,l]=M.useState(!0),[c,d]=M.useState(""),[f,h]=M.useState(null);M.useEffect(()=>{p()},[]);async function p(){l(!0),d("");try{const w=await yE.engines();t(w.engines||[]),r(w.summary||null)}catch(w){d(w instanceof Error?w.message:"Failed to load engines")}finally{l(!1)}}async function x(w){h(w);try{await yE.restartEngine(w),setTimeout(p,2e3)}catch(S){console.error("Restart failed:",S)}finally{h(null)}}function y(w){switch(w){case"healthy":return"success";case"warning":return"warning";case"critical":return"danger";case"maintenance":return"default";default:return"default"}}function j(w){switch(w){case"healthy":return s.jsx(br,{size:16,className:"text-success"});case"warning":return s.jsx(hn,{size:16,className:"text-warning"});case"critical":return s.jsx(Mh,{size:16,className:"text-danger"});case"maintenance":return s.jsx(dn,{size:16,className:"text-text-secondary"});default:return s.jsx($H,{size:16,className:"text-text-secondary"})}}if(i)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:Array.from({length:6}).map((w,S)=>s.jsx(Me,{className:"h-[200px]"},S))})]});if(c){const w=c.includes("authorization")||c.includes("unauthorized")||c.includes("missing authorization");return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-center max-w-md px-4",children:w?s.jsxs(s.Fragment,{children:[s.jsx(Rh,{size:48,className:"mx-auto text-warning mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Authentication required"}),s.jsx("p",{className:"text-text-secondary mb-4",children:"Please log in to access AMOS Control Panel"}),s.jsx("button",{onClick:()=>window.location.href="/login",className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover flex items-center gap-2 mx-auto",children:"Log in"})]}):s.jsxs(s.Fragment,{children:[s.jsx(hn,{size:48,className:"text-danger mx-auto mb-4"}),s.jsx("p",{className:"text-danger font-medium",children:c}),s.jsx(Ze,{onClick:p,className:"mt-4",icon:s.jsx(Da,{size:16}),children:"Retry"})]})})})}return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"AMOS Control Panel"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Monitor and control all AMOS engines"})]}),s.jsx(Ze,{onClick:p,icon:s.jsx(Da,{size:16}),children:"Refresh"})]}),n&&s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Rh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.total}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Engines"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.healthy}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Healthy"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(hn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.warning}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Warning"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(Mh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.critical+n.maintenance}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Critical/Maintenance"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:e.map(w=>s.jsx(te,{className:"relative",children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j(w.health),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:w.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:w.version})]})]}),s.jsx(_e,{variant:y(w.health),children:w.health})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Requests (24h)"}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:w.requests_24h.toLocaleString()})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Latency"}),s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[w.latency_ms.toFixed(1)," ms"]})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Error Rate"}),s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[(w.error_rate*100).toFixed(1),"%"]})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Uptime"}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:w.uptime})]})]}),w.models&&w.models.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase",children:"Models"}),w.models.map(S=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(dS,{size:14,className:"text-text-secondary"}),s.jsx("span",{className:"text-text-primary",children:S.name})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-text-secondary",children:[(S.accuracy*100).toFixed(0),"%"]}),s.jsx(_e,{variant:S.status==="active"?"success":"warning",size:"sm",children:S.status})]})]},S.id))]}),s.jsx("div",{className:"pt-2 border-t border-border/40",children:s.jsx(Ze,{variant:"secondary",size:"sm",className:"w-full",icon:s.jsx(Da,{size:14}),disabled:f===w.id,onClick:()=>x(w.id),children:f===w.id?"Restarting...":"Restart Engine"})})]})},w.id))})]})}function Hue(){var _,O;const[e,t]=M.useState("zoomers"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState([]),[f,h]=M.useState(null),[p,x]=M.useState(!0),[y,j]=M.useState(""),w=[{key:"zoomers",label:"Zoomers",icon:$r},{key:"field-data",label:"Field Data",icon:ph},{key:"payouts",label:"Payouts",icon:Bo},{key:"insights",label:"Insights",icon:tE}];M.useEffect(()=>{S()},[]);async function S(){x(!0),j("");try{const[A,T,N,E]=await Promise.all([Vf.zoomers(),Vf.fieldData(),Vf.payouts(),Vf.insights()]);r(A.zoomers||[]),l(T.fieldData||[]),d(N.payouts||[]),h(E.insights||null)}catch(A){const T=A instanceof Error?A.message:"Failed to load data";T.includes("not configured"),j(T)}finally{x(!1)}}function v(A){switch(A){case"active":case"completed":case"processed":return"success";case"pending":case"processing":return"warning";case"inactive":case"failed":return"danger";default:return"default"}}if(p)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[400px]"})]});if(y){const A=y.includes("not configured");return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-center max-w-md",children:A?s.jsxs(s.Fragment,{children:[s.jsx(fn,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"quiXzoom not configured"}),s.jsx("p",{className:"text-text-secondary mb-4",children:y}),s.jsx("p",{className:"text-sm text-text-tertiary",children:"Contact your administrator to set up quiXzoom integration."})]}):s.jsx("p",{className:"text-danger",children:y})})})}return s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"quiXzoom"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Field intelligence network and zoomer management"})]})}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:w.map(A=>s.jsxs("button",{onClick:()=>t(A.key),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===A.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(A.icon,{size:16}),A.label]},A.key))}),e==="zoomers"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx($r,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Zoomers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(A=>A.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(Bo,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce(n.reduce((A,T)=>A+T.earnings,0))}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Earnings"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Zoomers",subtitle:"All field intelligence agents"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Name"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Location"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Tasks"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Rating"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Earnings"})]})}),s.jsx("tbody",{children:n.map(A=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:A.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:A.email})]})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-1 text-sm text-text-primary",children:[s.jsx(Y1,{size:14,className:"text-text-secondary"}),A.city,", ",A.country]})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:v(A.status),children:A.status})}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[A.completed_tasks,"/",A.total_tasks]}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[A.rating.toFixed(1)," ★"]}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm font-medium text-text-primary",children:Ce(A.earnings)})]},A.id))})]})})]})]}),e==="field-data"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(ph,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Observations"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.filter(A=>A.status==="processed").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Processed"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.filter(A=>A.status==="pending").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Pending"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:i.map(A=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:A.type}),s.jsx("p",{className:"text-xs text-text-secondary",children:A.zoomer_name})]}),s.jsx(_e,{variant:v(A.status),children:A.status})]}),s.jsxs("div",{className:"flex items-center gap-1 text-xs text-text-secondary",children:[s.jsx(Y1,{size:14}),A.location.address,", ",A.location.city]}),A.ai_result&&s.jsxs("div",{className:"p-3 bg-bg rounded-lg space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(tE,{size:14,className:"text-primary"}),s.jsxs("span",{className:"text-xs font-medium text-text-primary",children:["AI Analysis (",A.ai_result.engine,")"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-2 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-2 bg-primary rounded-full",style:{width:`${A.ai_result.confidence*100}%`}})}),s.jsxs("span",{className:"text-xs text-text-secondary",children:[(A.ai_result.confidence*100).toFixed(0),"%"]})]}),A.ai_result.detections.map((T,N)=>s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-text-secondary",children:T.label}),s.jsxs("span",{className:"text-text-primary",children:[(T.confidence*100).toFixed(0),"%"]})]},N))]}),s.jsx("p",{className:"text-xs text-text-secondary",children:Et(A.created_at)})]})},A.id))})]}),e==="payouts"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Bo,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Payouts"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(A=>A.status==="completed").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Completed"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ce(c.reduce((A,T)=>A+T.amount,0))}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Amount"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Payouts",subtitle:"All zoomer payments"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Zoomer"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Period"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Method"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Amount"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Net"})]})}),s.jsx("tbody",{children:c.map(A=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:A.zoomer_name}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:A.period}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:v(A.status),children:A.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:A.method}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[Ce(A.amount)," ",A.currency]}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm font-medium text-success",children:Ce(A.net_amount)})]},A.id))})]})})]})]}),e==="insights"&&f&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(ph,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:(_=f.total_observations)==null?void 0:_.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Observations"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx($r,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.active_zoomers}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Zoomers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.cities_covered}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Cities"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.countries_covered}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Countries"})]})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[f.urban_sanitation_index&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Urban Sanitation Index",subtitle:`Score: ${f.urban_sanitation_index.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-primary rounded-full",style:{width:`${f.urban_sanitation_index.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.urban_sanitation_index.score})]}),s.jsx("div",{className:"space-y-2",children:(O=f.urban_sanitation_index.cities)==null?void 0:O.map((A,T)=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsx("span",{className:"text-text-secondary",children:A.city}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-24 h-2 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-2 bg-primary rounded-full",style:{width:`${A.score/10*100}%`}})}),s.jsx("span",{className:"text-text-primary",children:A.score})]})]},T))})]})]}),f.reality_gap_index&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Reality Gap Index",subtitle:`Score: ${f.reality_gap_index.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-danger rounded-full",style:{width:`${f.reality_gap_index.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.reality_gap_index.score})]}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["Trend: ",f.reality_gap_index.trend]})]})]}),f.reality_contradiction_score&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Reality Contradiction Score",subtitle:`Score: ${f.reality_contradiction_score.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-warning rounded-full",style:{width:`${f.reality_contradiction_score.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.reality_contradiction_score.score})]}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["Trend: ",f.reality_contradiction_score.trend]})]})]}),f.implementation_gap_score&&s.jsxs(te,{children:[s.jsx(Ge,{title:"Implementation Gap Score",subtitle:`Score: ${f.implementation_gap_score.score}/10`}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-3 bg-surface-2 rounded-full",children:s.jsx("div",{className:"h-3 bg-success rounded-full",style:{width:`${f.implementation_gap_score.score/10*100}%`}})}),s.jsx("span",{className:"text-sm font-medium text-text-primary",children:f.implementation_gap_score.score})]}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["Trend: ",f.implementation_gap_score.trend]})]})]})]})]})]})}function Fue(){var T;const[e,t]=M.useState("entities"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState([]),[f,h]=M.useState(null),[p,x]=M.useState(null),[y,j]=M.useState(!0),[w,S]=M.useState(""),v=[{key:"entities",label:"Entities",icon:ki},{key:"ownership",label:"Ownership",icon:na},{key:"documents",label:"Documents",icon:Pn},{key:"compliance",label:"Compliance",icon:Qr}];M.useEffect(()=>{_()},[]);async function _(){j(!0),S("");try{const[N,E,k,R]=await Promise.all([Hf.entities(),Hf.documents(),Hf.compliance(),Hf.ownership()]);r(N.entities||[]),l(E.documents||[]),d(k.compliance_items||[]),h(k.summary||null),x(R.ownership||null)}catch(N){S(N instanceof Error?N.message:"Failed to load data")}finally{j(!1)}}function O(N){switch(N){case"active":case"completed":case"signed":return"success";case"pending":case"in_progress":case"draft":return"warning";case"inactive":case"failed":return"danger";default:return"default"}}function A(N){switch(N){case"completed":return s.jsx(br,{size:16,className:"text-success"});case"in_progress":return s.jsx(dn,{size:16,className:"text-warning"});case"pending":return s.jsx(hn,{size:16,className:"text-danger"});default:return s.jsx(Mh,{size:16,className:"text-text-secondary"})}}return y?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[400px]"})]}):w?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:w})}):s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Landvex Control"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Corporate structure, ownership & compliance"})]})}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:v.map(N=>s.jsxs("button",{onClick:()=>t(N.key),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===N.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(N.icon,{size:16}),N.label]},N.key))}),e==="entities"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(ki,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Entities"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:new Set(n.map(N=>N.country)).size}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Countries"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx($r,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.reduce((N,E)=>N+E.employees,0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Employees"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:n.map(N=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-semibold text-text-primary",children:N.name}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[N.org_number," • ",N.city,", ",N.country]})]}),s.jsx(_e,{variant:O(N.status),children:N.status})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Type"}),s.jsx("p",{className:"text-text-primary",children:N.type})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"CEO"}),s.jsx("p",{className:"text-text-primary",children:N.ceo})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Founded"}),s.jsx("p",{className:"text-text-primary",children:Et(N.founded_at)})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Employees"}),s.jsx("p",{className:"text-text-primary",children:N.employees})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase mb-2",children:"Board"}),s.jsx("div",{className:"space-y-2",children:N.board_members.map(E=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-text-primary",children:E.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:E.role})]}),s.jsx("span",{className:"text-xs text-text-secondary",children:E.since})]},E.id))})]}),s.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-border/40",children:[s.jsx(Qr,{size:14,className:N.compliance_status==="compliant"?"text-success":"text-warning"}),s.jsxs("span",{className:"text-xs text-text-secondary",children:["Compliance: ",N.compliance_status]})]})]})},N.id))})]}),e==="ownership"&&p&&s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(Ge,{title:"Ownership Structure",subtitle:"Ultimate Beneficial Owner"}),s.jsxs("div",{className:"p-5",children:[p.ultimate_beneficial_owner&&s.jsxs("div",{className:"flex items-center gap-4 p-4 bg-bg rounded-xl mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary text-lg font-semibold",children:p.ultimate_beneficial_owner.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:p.ultimate_beneficial_owner.name}),s.jsxs("p",{className:"text-sm text-text-secondary",children:[p.ultimate_beneficial_owner.ownership,"% ownership •"," ",p.ultimate_beneficial_owner.nationality]})]})]}),s.jsx("div",{className:"space-y-3",children:(T=p.entities)==null?void 0:T.map((N,E)=>s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center text-primary text-xs font-medium",children:N.jurisdiction}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:N.name}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[N.type," • ",N.jurisdiction]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[N.ownership,"%"]}),s.jsx("p",{className:"text-xs text-text-secondary",children:N.owner})]})]},E))})]})]})}),e==="documents"&&s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(Ge,{title:"Documents",subtitle:"Corporate documents & agreements"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Title"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Type"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Signed By"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Date"})]})}),s.jsx("tbody",{children:i.map(N=>{var E;return s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Pn,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:N.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.type}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(N.status),children:N.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:((E=N.signed_by)==null?void 0:E.join(", "))||"-"}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm text-text-secondary",children:Et(N.created_at)})]},N.id)})})]})})]})}),e==="compliance"&&s.jsxs("div",{className:"space-y-6",children:[f&&s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Qr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.total}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Items"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.completed}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Completed"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.in_progress}),s.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(hn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.overdue}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Overdue"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Compliance Items",subtitle:"Regulatory requirements & deadlines"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Item"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Type"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Due Date"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Responsible"})]})}),s.jsx("tbody",{children:c.map(N=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[A(N.status),s.jsx("span",{className:"text-sm text-text-primary",children:N.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.type}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(N.status),children:N.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:Et(N.due_date)}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.responsible})]},N.id))})]})})]})]})]})}function Gue(){const[e,t]=M.useState("iso"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState([]),[f,h]=M.useState([]),[p,x]=M.useState([]),[y,j]=M.useState(!0),[w,S]=M.useState(""),v=[{key:"iso",label:"ISO Certifications",icon:rE},{key:"gdpr",label:"GDPR / Privacy",icon:$5},{key:"risks",label:"Risk Register",icon:hn},{key:"legal",label:"Legal Cases",icon:lE},{key:"policies",label:"Policies",icon:Ch}];M.useEffect(()=>{_()},[]);async function _(){j(!0),S("");try{const[T,N,E,k,R]=await Promise.all([Lc.iso(),Lc.gdpr(),Lc.risks(),Lc.legalCases(),Lc.policies()]);r(T.certifications||[]),l(N.records||[]),d(E.risks||[]),h(k.cases||[]),x(R.policies||[])}catch(T){S(T instanceof Error?T.message:"Failed to load compliance data")}finally{j(!1)}}function O(T){switch(T){case"active":case"completed":case"signed":case"mitigated":return"success";case"in_progress":case"pending":case"draft":return"warning";case"critical":case"failed":case"high":return"danger";default:return"default"}}function A(T){return T>=15?"text-danger":T>=10?"text-warning":"text-success"}return y?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[400px]"})]}):w?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:w})}):s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Compliance & Legal"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"ISO, GDPR, risk management, legal cases & policies"})]})}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:v.map(T=>s.jsxs("button",{onClick:()=>t(T.key),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===T.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(T.icon,{size:16}),T.label]},T.key))}),e==="iso"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(rE,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(T=>T.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(T=>T.status==="in_progress").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(hn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.reduce((T,N)=>T+N.major_findings,0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Major Findings"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:n.map(T=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.standard}),s.jsx("p",{className:"text-xs text-text-secondary",children:T.name})]}),s.jsx(_e,{variant:O(T.status),children:T.status})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Issuer"}),s.jsx("p",{className:"text-text-primary",children:T.issuer})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Auditor"}),s.jsx("p",{className:"text-text-primary",children:T.auditor})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Issued"}),s.jsx("p",{className:"text-text-primary",children:T.issued_at?Et(T.issued_at):"N/A"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Expires"}),s.jsx("p",{className:"text-text-primary",children:T.expires_at?Et(T.expires_at):"N/A"})]})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary mb-1",children:"Scope"}),s.jsx("p",{className:"text-sm text-text-primary",children:T.scope})]}),T.findings>0&&s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:"text-text-secondary",children:["Findings: ",T.findings]}),T.major_findings>0&&s.jsxs("span",{className:"text-danger",children:["Major: ",T.major_findings]})]})]})},T.id))})]}),e==="gdpr"&&s.jsx("div",{className:"space-y-6",children:i.map(T=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.purpose}),s.jsx(_e,{variant:T.impact_assessment?"success":"warning",children:T.impact_assessment?"DPIA Done":"No DPIA"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Legal Basis"}),s.jsx("p",{className:"text-text-primary",children:T.legal_basis})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Retention"}),s.jsx("p",{className:"text-text-primary",children:T.retention})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary mb-2",children:"Data Types"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:T.data_types.map((N,E)=>s.jsx(_e,{variant:"default",size:"sm",children:N},E))})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary mb-2",children:"Processors"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:T.processors.map((N,E)=>s.jsx(_e,{variant:"default",size:"sm",children:N},E))})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:T.dpa_exists?"text-success":"text-danger",children:["DPA: ",T.dpa_exists?"✓":"✗"]}),s.jsxs("span",{className:T.cross_border?"text-warning":"text-text-secondary",children:["Cross-border: ",T.cross_border?"Yes":"No"]})]})]})},T.id))}),e==="risks"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(hn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Risks"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="mitigated").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Mitigated"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="monitored").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Monitored"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Risk Register",subtitle:"Identified risks and mitigations"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Risk"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Category"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-center",children:"P"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-center",children:"I"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-center",children:"Score"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Owner"})]})}),s.jsx("tbody",{children:c.map(T=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-text-primary",children:T.description}),s.jsx("p",{className:"text-xs text-text-secondary",children:T.mitigation})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.category}),s.jsx("td",{className:"py-3.5 px-4 text-center text-sm text-text-primary",children:T.probability}),s.jsx("td",{className:"py-3.5 px-4 text-center text-sm text-text-primary",children:T.impact}),s.jsx("td",{className:"py-3.5 px-4 text-center",children:s.jsx("span",{className:`text-sm font-semibold ${A(T.score)}`,children:T.score})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(T.status),children:T.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:T.owner})]},T.id))})]})})]})]}),e==="legal"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(lE,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Cases"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(hn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.filter(T=>T.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(na,{size:18})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-2xl font-semibold text-text-primary",children:[f.reduce((T,N)=>T+N.value,0).toLocaleString()," SEK"]}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Exposure"})]})]})})]}),s.jsx("div",{className:"space-y-4",children:f.map(T=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.title}),s.jsx("p",{className:"text-xs text-text-secondary",children:T.opposing_party})]}),s.jsx(_e,{variant:O(T.status),children:T.status})]}),s.jsx("p",{className:"text-sm text-text-secondary",children:T.description}),s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:"text-text-secondary",children:["Type: ",T.type]}),s.jsxs("span",{className:"text-text-secondary",children:["Lawyer: ",T.lawyer]}),s.jsxs("span",{className:"text-text-secondary",children:["Opened: ",Et(T.opened_at)]})]}),T.value>0&&s.jsxs("p",{className:"text-sm font-medium text-danger",children:["Exposure: ",T.value.toLocaleString()," ",T.currency]})]})},T.id))})]}),e==="policies"&&s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(Ge,{title:"Policies",subtitle:"Corporate policies and procedures"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"border-b border-border",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Policy"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Category"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Version"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Status"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-left",children:"Approved"}),s.jsx("th",{className:"py-3 px-4 text-xs font-medium text-text-secondary uppercase text-right",children:"Review"})]})}),s.jsx("tbody",{children:p.map(T=>s.jsxs("tr",{className:"border-b border-border/50",children:[s.jsx("td",{className:"py-3.5 px-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ch,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:T.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.category}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:T.version}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(T.status),children:T.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.approved_by||"Not approved"}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:Et(T.review_date)})]},T.id))})]})})]})})]})}function Kue({account:e,onSync:t,onConnect:n}){const r={revolut:"bg-blue-50 border-blue-200",nordea:"bg-red-50 border-red-200",other:"bg-gray-50 border-gray-200"},i={revolut:"🔵",nordea:"🔴",other:"⚪"};return s.jsxs(te,{className:`p-5 ${r[e.bank]} border`,children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-white flex items-center justify-center text-xl shadow-sm",children:i[e.bank]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-gray-900",children:e.name}),s.jsx("p",{className:"text-sm text-gray-500",children:e.accountNumber}),e.iban&&s.jsxs("p",{className:"text-xs text-gray-400 mt-0.5",children:["IBAN: ",e.iban]})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:e.apiConnected?s.jsx("button",{onClick:()=>t(e.id),className:"p-2 rounded-lg bg-white hover:bg-gray-50 text-green-600 transition-colors",title:"Synka nu",children:s.jsx(Da,{size:16})}):s.jsx("button",{onClick:()=>n(e.id),className:"p-2 rounded-lg bg-white hover:bg-gray-50 text-gray-400 hover:text-blue-600 transition-colors",title:"Koppla API",children:s.jsx(ZH,{size:16})})})]}),s.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200/60",children:[s.jsxs("div",{className:"flex items-baseline justify-between",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Saldo"}),s.jsx("span",{className:"text-2xl font-bold text-gray-900",children:e.balance.toLocaleString("sv-SE",{style:"currency",currency:e.currency})})]}),e.lastSync&&s.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["Senast synkad: ",new Date(e.lastSync).toLocaleString("sv-SE")]}),e.apiConnected&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-green-600 mt-2",children:[s.jsx(QH,{size:12}),"API kopplad"]})]})]})}function Yue({transactions:e,onMatch:t}){return s.jsx("div",{className:"space-y-2",children:e.map(n=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-white border border-gray-100 hover:border-gray-200 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${n.type==="credit"?"bg-green-50 text-green-600":"bg-red-50 text-red-600"}`,children:n.type==="credit"?s.jsx(BH,{size:16}):s.jsx(G1,{size:16})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-900",children:n.description}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx("span",{children:n.date}),n.counterparty&&s.jsxs("span",{children:["• ",n.counterparty]}),n.category&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-gray-100",children:n.category})]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:`text-sm font-semibold ${n.type==="credit"?"text-green-600":"text-red-600"}`,children:[n.type==="credit"?"+":"-",Math.abs(n.amount).toLocaleString("sv-SE",{style:"currency",currency:n.currency})]}),n.matchedJournalEntryId?s.jsxs("span",{className:"text-xs text-green-600 flex items-center gap-1 justify-end mt-1",children:[s.jsx(Pn,{size:10}),"Bokförd"]}):t&&s.jsx("button",{onClick:()=>t(n.id),className:"text-xs text-blue-600 hover:text-blue-700 mt-1",children:"Matcha med verifikat"})]})]},n.id))})}function Xue({accountId:e,accountName:t,onUpload:n}){const[r,i]=M.useState(!1),[l,c]=M.useState(null),d=M.useRef(null),f=w=>{w.preventDefault(),i(!0)},h=()=>{i(!1)},p=w=>{w.preventDefault(),i(!1);const S=w.dataTransfer.files[0];S&&c(S)},x=w=>{var v;const S=(v=w.target.files)==null?void 0:v[0];S&&c(S)},y=()=>{l&&(n(l,e),c(null))},j=w=>w.endsWith(".csv")?s.jsx(GH,{size:24,className:"text-green-600"}):w.endsWith(".pdf")?s.jsx(Pn,{size:24,className:"text-red-600"}):s.jsx(Pn,{size:24,className:"text-gray-600"});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h4",{className:"font-medium text-gray-900",children:["Ladda upp kontoutdrag - ",t]}),l?s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[j(l.name),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-900",children:l.name}),s.jsxs("p",{className:"text-xs text-gray-500",children:[(l.size/1024).toFixed(1)," KB"]})]})]}),s.jsx("button",{onClick:()=>c(null),className:"p-1 rounded hover:bg-gray-100 text-gray-400",children:s.jsx(Ts,{size:16})})]}),s.jsx("button",{onClick:y,className:"w-full mt-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm font-medium",children:"Importera kontoutrag"})]}):s.jsxs("div",{onDragOver:f,onDragLeave:h,onDrop:p,onClick:()=>{var w;return(w=d.current)==null?void 0:w.click()},className:`border-2 border-dashed rounded-xl p-8 text-center cursor-pointer transition-colors ${r?"border-blue-400 bg-blue-50":"border-gray-300 hover:border-gray-400 bg-gray-50"}`,children:[s.jsx(Z1,{size:32,className:"mx-auto text-gray-400 mb-3"}),s.jsxs("p",{className:"text-sm text-gray-600",children:["Dra och släpp fil här, eller ",s.jsx("span",{className:"text-blue-600",children:"klicka för att välja"})]}),s.jsx("p",{className:"text-xs text-gray-400 mt-2",children:"Stödjer CSV, PDF, XLSX"}),s.jsx("input",{ref:d,type:"file",accept:".csv,.pdf,.xlsx",onChange:x,className:"hidden"})]})]})}const ds=[{id:"revolut-main",name:"Revolut Business",bank:"revolut",accountNumber:"1234 5678 9012 3456",iban:"GB29 NWBK 6016 1331 9268 19",currency:"SEK",balance:125430.5,status:"active",lastSync:"2026-08-08T22:00:00Z",apiConnected:!1},{id:"nordea-checking",name:"Nordea Företagskonto",bank:"nordea",accountNumber:"3456 7890 1234 5678",iban:"SE45 5000 0000 0583 9825 7466",currency:"SEK",balance:89200,status:"active",lastSync:"2026-08-08T22:00:00Z",apiConnected:!1},{id:"nordea-savings",name:"Nordea Sparkonto",bank:"nordea",accountNumber:"9876 5432 1098 7654",currency:"SEK",balance:25e4,status:"active",apiConnected:!1}],yR=[{id:"tx-001",accountId:"revolut-main",date:"2026-08-08",description:"Atlas Capture AB - Månadsavgift",amount:-299,currency:"SEK",type:"debit",category:"Programvara",counterparty:"Atlas Capture AB",importedFrom:"manual"},{id:"tx-002",accountId:"revolut-main",date:"2026-08-07",description:"Kundbetalning - Faktura #1001",amount:15e3,currency:"SEK",type:"credit",category:"Försäljning",counterparty:"Kund AB",importedFrom:"manual"},{id:"tx-003",accountId:"nordea-checking",date:"2026-08-06",description:"Lön - Johan Berglund",amount:-45e3,currency:"SEK",type:"debit",category:"Lönekostnad",counterparty:"Johan Berglund",importedFrom:"manual"},{id:"tx-004",accountId:"nordea-checking",date:"2026-08-05",description:"Hyra kontor - Wavult Group",amount:-8500,currency:"SEK",type:"debit",category:"Lokalhyra",counterparty:"Wavult Group",importedFrom:"manual"}],Wue=[{id:"stmt-001",accountId:"revolut-main",fileName:"revolut_2026-07.csv",fileType:"csv",uploadDate:"2026-08-01T10:00:00Z",periodStart:"2026-07-01",periodEnd:"2026-07-31",transactionCount:45,status:"completed"},{id:"stmt-002",accountId:"nordea-checking",fileName:"nordea_juli_2026.pdf",fileType:"pdf",uploadDate:"2026-08-02T14:30:00Z",periodStart:"2026-07-01",periodEnd:"2026-07-31",transactionCount:32,status:"completed"}];function Zue(){var E;const[e,t]=M.useState("banks"),[n,r]=M.useState([]),[i,l]=M.useState([]),[c,d]=M.useState(!0),[f,h]=M.useState(""),[p,x]=M.useState(null),[y,j]=M.useState(!1);M.useEffect(()=>{w()},[]);async function w(){d(!0),h("");try{const[k,R]=await Promise.all([uG.entries(),hs.accounts()]);r(k.entries||[]),l(R.accounts||[])}catch(k){h(k instanceof Error?k.message:"Failed to load data")}finally{d(!1)}}const S=k=>{alert(`Synkar konto ${k}... (API-koppling krävs)`)},v=k=>{alert(`Kopplar API för konto ${k}...`)},_=(k,R)=>{alert(`Laddar upp ${k.name} för konto ${R}...`)},O=k=>{alert(`Matchar transaktion ${k} med verifikat...`)};if(c)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[400px]"})]});if(f)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:f})});const A=n.filter(k=>k.status==="posted").length;i.reduce((k,R)=>k+R.balance,0);const T=ds.reduce((k,R)=>k+R.balance,0),N=[{id:"banks",label:"Bankkonton",icon:ki},{id:"transactions",label:"Transaktioner",icon:qH},{id:"ledger",label:"Huvudbok",icon:Ch},{id:"accounts",label:"Konton",icon:br}];return s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Accounting"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Bankkoppling, dubbel bokföring — riktig data från aamos-ledger"})]})}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(ki,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Bankkonton"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:ds.length})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Banktotalt"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:Ce(T)})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Ch,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Verifikat"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:n.length})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(br,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Bokfört"}),s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:A})]})]})})]}),s.jsx("div",{className:"border-b border-border",children:s.jsx("div",{className:"flex gap-1",children:N.map(k=>{const R=k.icon;return s.jsxs("button",{onClick:()=>t(k.id),className:`flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-t-lg transition-colors ${e===k.id?"text-primary bg-primary-light border-b-2 border-primary":"text-text-secondary hover:text-text-primary hover:bg-bg"}`,children:[s.jsx(R,{size:16}),k.label]},k.id)})})}),e==="banks"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Bankkonton"}),s.jsxs("button",{onClick:()=>j(!y),className:"flex items-center gap-2 px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors text-sm",children:[s.jsx(Z1,{size:16}),"Ladda upp kontoutdrag"]})]}),y&&s.jsx(te,{className:"p-6",children:s.jsx(Xue,{accountId:p||ds[0].id,accountName:((E=ds.find(k=>k.id===(p||ds[0].id)))==null?void 0:E.name)||"",onUpload:_})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:ds.map(k=>s.jsx(Kue,{account:k,onSync:S,onConnect:v},k.id))}),s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(YH,{size:18,className:"text-text-secondary"}),s.jsx("h3",{className:"font-semibold text-text-primary",children:"Importerade kontoutdrag"})]}),s.jsx("div",{className:"space-y-2",children:Wue.map(k=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-bg border border-border hover:border-primary/30 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary-light flex items-center justify-center text-primary",children:s.jsx(Z1,{size:14})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:k.fileName}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[k.periodStart," — ",k.periodEnd," • ",k.transactionCount," transaktioner"]})]})]}),s.jsx(_e,{variant:k.status==="completed"?"default":"warning",children:k.status==="completed"?"Klart":"Bearbetar"})]},k.id))})]})]}),e==="transactions"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Senaste transaktioner"}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs("select",{value:p||"",onChange:k=>x(k.target.value||null),className:"px-3 py-2 rounded-lg border border-border bg-white text-sm",children:[s.jsx("option",{value:"",children:"Alla konton"}),ds.map(k=>s.jsx("option",{value:k.id,children:k.name},k.id))]})})]}),s.jsx(Yue,{transactions:p?yR.filter(k=>k.accountId===p):yR,onMatch:O})]}),e==="ledger"&&s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Huvudbok"}),s.jsx(te,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border",children:[s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Ver.nr"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Beskrivning"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Datum"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Period"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Status"})]})}),s.jsx("tbody",{className:"divide-y divide-border",children:n.map(k=>s.jsxs("tr",{className:"hover:bg-bg transition-colors",children:[s.jsx("td",{className:"px-4 py-3 text-sm font-medium text-text-primary",children:k.entry_number}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-primary",children:k.description}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:Et(k.entry_date)}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:k.period}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(_e,{variant:k.status==="posted"?"default":"warning",children:k.status==="posted"?"Bokförd":"Utkast"})})]},k.id))})]})})})]}),e==="accounts"&&s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Konton"}),s.jsx(te,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border",children:[s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Kod"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Namn"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Typ"}),s.jsx("th",{className:"text-right text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Saldo"})]})}),s.jsx("tbody",{className:"divide-y divide-border",children:i.map(k=>s.jsxs("tr",{className:"hover:bg-bg transition-colors",children:[s.jsx("td",{className:"px-4 py-3 text-sm font-medium text-text-primary",children:k.code}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-primary",children:k.name}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:k.type}),s.jsx("td",{className:"px-4 py-3 text-sm text-right font-medium text-text-primary",children:Ce(k.balance)})]},k.code))})]})})})]})]})}function gR({isOpen:e,onClose:t,replyTo:n,onSent:r}){const[i,l]=M.useState(n?_(n.from):""),[c,d]=M.useState(n?`Re: ${n.subject.replace(/^Re: /i,"")}`:""),[f,h]=M.useState(n?`
---
${n.body.substring(0,500)}`:""),[p,x]=M.useState(!1),[y,j]=M.useState(!1),[w,S]=M.useState([]),v=M.useRef(null);if(!e)return null;function _(N){const E=N.match(/<([^>]+)>/);return E?E[1]:N}async function O(){if(!(!i||!c||!f)){x(!0);try{const N=localStorage.getItem("amos_token"),k=await(await fetch("/api/v1/mail/send",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${N}`},body:JSON.stringify({to:[i],subject:c,body:f,reply_to:n==null?void 0:n.from})})).json();k.ok?(l(""),d(""),h(""),S([]),r==null||r(),t()):alert(k.error||"Failed to send")}catch{alert("Failed to send email")}finally{x(!1)}}}async function A(){if(f.trim()){j(!0);try{const N=localStorage.getItem("amos_token"),k=await(await fetch("/api/v1/mail/ai-assist",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${N}`},body:JSON.stringify({context:f,tone:"professional",language:"sv"})})).json();k.ok&&k.improved&&h(k.improved)}catch(N){console.error("AI assist failed:",N)}finally{j(!1)}}}function T(N){N.target.files&&S(Array.from(N.target.files))}return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50",children:s.jsxs(te,{className:"w-full max-w-2xl max-h-[90vh] flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:n?"Svara":"Nytt meddelande"}),s.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Ts,{size:20})})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Till"}),s.jsx("input",{type:"email",value:i,onChange:N=>l(N.target.value),className:"w-full h-10 px-3 rounded-xl border bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"email@example.com"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Ämne"}),s.jsx("input",{type:"text",value:c,onChange:N=>d(N.target.value),className:"w-full h-10 px-3 rounded-xl border bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Ämne"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Meddelande"}),s.jsx("textarea",{value:f,onChange:N=>h(N.target.value),rows:12,className:"w-full px-3 py-2 rounded-xl border bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 resize-none",placeholder:"Skriv ditt meddelande..."})]}),w.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm font-medium text-text-secondary",children:"Bilagor"}),w.map((N,E)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-bg rounded-lg",children:[s.jsx(sE,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:N.name}),s.jsxs("span",{className:"text-xs text-text-secondary",children:["(",(N.size/1024).toFixed(0)," KB)"]})]},E))]})]}),s.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"file",ref:v,onChange:T,multiple:!0,className:"hidden"}),s.jsx(Ze,{variant:"secondary",size:"sm",icon:s.jsx(sE,{size:16}),onClick:()=>{var N;return(N=v.current)==null?void 0:N.click()},children:"Bifoga"}),s.jsx(Ze,{variant:"secondary",size:"sm",icon:y?s.jsx(Ph,{size:16,className:"animate-spin"}):s.jsx(H5,{size:16}),onClick:A,disabled:y||!f.trim(),children:"AI-hjälp"})]}),s.jsx(Ze,{icon:p?s.jsx(Ph,{size:16,className:"animate-spin"}):s.jsx(Hm,{size:16}),onClick:O,disabled:p||!i||!c||!f,children:p?"Skickar...":"Skicka"})]})]})})}function Que(){const[e,t]=M.useState([]),[n,r]=M.useState(!0),[i,l]=M.useState(""),[c,d]=M.useState(null),[f,h]=M.useState(0),[p,x]=M.useState([]),[y,j]=M.useState("all"),[w,S]=M.useState(!1),[v,_]=M.useState(!1),[O,A]=M.useState(void 0),{token:T}=Ia(),{user:N}=Ia(),E=async()=>{try{if(!T)return;const z={Authorization:`Bearer ${T}`},$=await fetch("/api/v1/mail/mailboxes",{headers:z});if($.ok){const F=await $.json();if(F.ok&&F.mailboxes){const Y=(N==null?void 0:N.email)||"",K=(N==null?void 0:N.role)||"";let B;Y.includes("erik")||K==="ceo"?B=F.mailboxes.filter(H=>H.startsWith("erik@")||H==="info@landvex.com"||H==="invoice@landvex.com"||H==="hello@quixzoom.com"||H==="finance@quixzoom.com"||H==="cfo@aamos.systems"||H.startsWith("recovery@")||H.startsWith("social@")):Y.includes("johan")||K==="cto"?B=F.mailboxes.filter(H=>H.startsWith("johan@")||H==="cto@aamos.systems"||H==="info@aamos.systems"||H==="dev@hypbit.com"||H.startsWith("recovery@")||H.startsWith("social@")):B=F.mailboxes,x(B)}}}catch(z){console.error("Failed to fetch mailboxes:",z)}},k=async()=>{r(!0),l("");try{if(!T){l("Please log in to access mail"),t([]),h(0);return}const z={Authorization:`Bearer ${T}`},[$,F]=await Promise.all([fetch("/api/v1/mail/inbox?limit=50",{headers:z}),fetch("/api/v1/mail/unread-count",{headers:z})]),Y=await $.json();if($.status===503){l(Y.error||"Mail integration not configured"),t([]),h(0);return}if(!$.ok){if($.status===401){l("Please log in to access mail"),t([]),h(0);return}throw new Error(Y.error||"Failed to fetch inbox")}if(Y.ok&&t(Y.messages||[]),F.ok){const K=await F.json();K.ok&&h(K.count||0)}}catch(z){l(z instanceof Error?z.message:"Failed to load mail")}finally{r(!1)}};M.useEffect(()=>{E(),k()},[]);const R=async z=>{try{if(!T)return;const $={Authorization:`Bearer ${T}`};await fetch(`/api/v1/mail/message/${z}/read`,{method:"POST",headers:$}),t(F=>F.map(Y=>Y.uid===z?{...Y,read:!0}:Y)),h(F=>Math.max(0,F-1))}catch($){console.error("Failed to mark as read:",$)}},L=z=>{d(z),z.read||R(z.uid)},D=y==="all"?e:e.filter(z=>z.to.some($=>$.includes(y)));if(n)return s.jsxs("div",{className:"space-y-4",children:[s.jsx(Me,{className:"h-12"}),Array.from({length:5}).map((z,$)=>s.jsx(Me,{className:"h-20"},$))]});if(i){const z=i.includes("not configured")||i.includes("IMAP"),$=i.includes("log in")||i.includes("authorization")||i.includes("missing authorization");return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-center max-w-md px-4",children:z?s.jsxs(s.Fragment,{children:[s.jsx(fg,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Mail not configured"}),s.jsx("p",{className:"text-text-secondary mb-4",children:i}),s.jsx("p",{className:"text-sm text-text-tertiary",children:"Contact your administrator to set up IMAP integration."})]}):$?s.jsxs(s.Fragment,{children:[s.jsx(Bf,{size:48,className:"mx-auto text-warning mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Authentication required"}),s.jsx("p",{className:"text-text-secondary mb-4",children:i}),s.jsx("button",{onClick:()=>window.location.href="/login",className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover flex items-center gap-2 mx-auto",children:"Log in"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Bf,{size:48,className:"mx-auto text-danger mb-4"}),s.jsx("p",{className:"text-danger mb-4",children:i}),s.jsxs("button",{onClick:k,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-hover flex items-center gap-2 mx-auto",children:[s.jsx(Da,{size:16}),"Retry"]})]})})})}return c?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("button",{onClick:()=>d(null),className:"p-2 hover:bg-surface rounded-lg",children:"← Back"}),s.jsx(Ze,{icon:s.jsx(sF,{size:16}),onClick:()=>{A(c),_(!0)},children:"Svara"})]}),s.jsx(te,{children:s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:c.subject}),s.jsxs("p",{className:"text-sm text-text-secondary",children:["From: ",c.from]}),s.jsxs("p",{className:"text-sm text-text-secondary",children:["To: ",c.to.join(", ")]}),s.jsx("p",{className:"text-sm text-text-secondary",children:Et(c.date)})]}),!c.read&&s.jsx(_e,{variant:"primary",children:"New"})]}),s.jsx("div",{className:"border-t border-border-subtle pt-4",children:s.jsx("p",{className:"text-text-primary whitespace-pre-wrap",children:c.body})})]})}),s.jsx(gR,{isOpen:v,onClose:()=>{_(!1),A(void 0)},replyTo:O?{uid:O.uid,subject:O.subject,from:O.from,body:O.body}:void 0,onSent:()=>{k()}})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Mail"}),s.jsx(Ze,{icon:s.jsx(Hm,{size:16}),onClick:()=>{A(void 0),_(!0)},children:"Nytt meddelande"})]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>S(!w),className:"w-full flex items-center justify-between p-3 bg-surface rounded-lg border border-border hover:border-border-hover transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Dn,{size:18,className:"text-text-secondary"}),s.jsx("span",{className:"font-medium",children:y==="all"?"All Mailboxes":y})]}),s.jsx(uS,{size:18,className:`text-text-secondary transition-transform ${w?"rotate-180":""}`})]}),w&&s.jsxs("div",{className:"absolute top-full left-0 right-0 mt-1 bg-surface border border-border rounded-lg shadow-lg z-50 max-h-64 overflow-y-auto",children:[s.jsx("button",{onClick:()=>{j("all"),S(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors ${y==="all"?"bg-accent/10 text-accent":""}`,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bf,{size:16}),s.jsx("span",{children:"All Mailboxes"}),s.jsx(_e,{variant:"default",className:"ml-auto",children:e.length})]})}),p.map(z=>s.jsx("button",{onClick:()=>{j(z),S(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors ${y===z?"bg-accent/10 text-accent":""}`,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Dn,{size:16}),s.jsx("span",{className:"text-sm",children:z})]})},z))]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bf,{size:18,className:"text-text-secondary"}),s.jsxs("span",{className:"text-sm text-text-secondary",children:[D.length," messages"]})]}),f>0&&s.jsxs(_e,{variant:"primary",children:[f," unread"]})]}),s.jsx("button",{onClick:k,className:"p-2 hover:bg-surface rounded-lg transition-colors",title:"Refresh",children:s.jsx(Da,{size:18,className:"text-text-secondary"})})]}),s.jsx("div",{className:"space-y-2",children:D.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(fg,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("p",{className:"text-text-secondary",children:"No messages"})]}):D.map(z=>s.jsx("button",{onClick:()=>L(z),className:`w-full text-left p-4 rounded-lg border transition-colors hover:bg-surface-hover ${z.read?"bg-surface border-border-subtle":"bg-surface border-border hover:border-border-hover"}`,children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-1",children:z.read?s.jsx(fg,{size:18,className:"text-text-tertiary"}):s.jsx(Dn,{size:18,className:"text-accent"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[!z.read&&s.jsx(_e,{variant:"primary",className:"shrink-0",children:"New"}),s.jsx("span",{className:`font-medium truncate ${z.read?"text-text-secondary":"text-text-primary"}`,children:z.from}),s.jsx("span",{className:"text-text-tertiary text-sm shrink-0",children:Et(z.date)})]}),s.jsx("p",{className:`font-medium truncate ${z.read?"text-text-secondary":"text-text-primary"}`,children:z.subject}),s.jsx("p",{className:"text-sm text-text-tertiary truncate",children:z.preview}),z.attachments>0&&s.jsx("div",{className:"flex items-center gap-1 mt-1",children:s.jsxs("span",{className:"text-xs text-text-tertiary",children:[z.attachments," attachment",z.attachments>1?"s":""]})})]})]})},z.uid))}),s.jsx(gR,{isOpen:v,onClose:()=>{_(!1),A(void 0)},replyTo:O?{uid:O.uid,subject:O.subject,from:O.from,body:O.body}:void 0,onSent:()=>{k()}})]})}function Jue(){const[e,t]=M.useState({email:"erik@aamos.systems",password:"",server:"mail.aamos.systems",port:993,useTLS:!0}),[n,r]=M.useState(!1),[i,l]=M.useState(!1),[c,d]=M.useState("idle"),[f,h]=M.useState(""),p=async()=>{r(!0),d("idle");try{(await fetch("/api/v1/mail/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok?(d("success"),h("Mail configuration saved successfully")):(d("error"),h("Failed to save configuration"))}catch{d("error"),h("Network error")}finally{r(!1)}},x=async()=>{l(!0),d("idle");try{const j=await(await fetch("/api/v1/mail/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();j.ok?(d("success"),h(`Connection successful! ${j.messageCount||0} unread messages.`)):(d("error"),h(j.error||"Connection failed"))}catch{d("error"),h("Network error")}finally{l(!1)}};return s.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Dn,{size:24,className:"text-primary"}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Mail Settings"}),s.jsx("p",{className:"text-text-secondary",children:"Connect your IMAP inbox"})]})]}),c!=="idle"&&s.jsxs("div",{className:`p-4 rounded-xl flex items-center gap-3 ${c==="success"?"bg-success-light text-success":"bg-danger-light text-danger"}`,children:[c==="success"?s.jsx(VH,{size:20}):s.jsx(Zr,{size:20}),s.jsx("p",{children:f})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"IMAP Configuration",subtitle:"Enter your mail credentials"}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Email Address"}),s.jsxs("select",{className:"w-full h-10 px-3 rounded-xl border border-border bg-surface text-text-primary",value:e.email,onChange:y=>t({...e,email:y.target.value}),children:[s.jsx("option",{value:"erik@aamos.systems",children:"erik@aamos.systems"}),s.jsx("option",{value:"erik@landvex.com",children:"erik@landvex.com"}),s.jsx("option",{value:"erik@wavult.com",children:"erik@wavult.com"}),s.jsx("option",{value:"erik@hypbit.com",children:"erik@hypbit.com"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Password"}),s.jsx(As,{type:"password",placeholder:"Enter your mail password",value:e.password,onChange:y=>t({...e,password:y.target.value})}),s.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Don't remember your password? Contact your admin to reset it."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Server"}),s.jsxs("div",{className:"relative",children:[s.jsx(Rh,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary"}),s.jsx(As,{className:"pl-10",value:e.server,onChange:y=>t({...e,server:y.target.value})})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Port"}),s.jsx(As,{type:"number",value:e.port,onChange:y=>t({...e,port:parseInt(y.target.value)||993})})]})]}),s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-bg rounded-xl",children:[s.jsx(Qr,{size:20,className:"text-primary"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium",children:"Use TLS/SSL"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Encrypt connection to mail server"})]}),s.jsx("button",{onClick:()=>t({...e,useTLS:!e.useTLS}),className:`w-12 h-7 rounded-full transition-colors ${e.useTLS?"bg-primary":"bg-text-tertiary"}`,children:s.jsx("div",{className:`w-5 h-5 rounded-full bg-white transition-transform ${e.useTLS?"translate-x-6":"translate-x-1"}`})})]})]})]}),s.jsxs(te,{children:[s.jsx(Ge,{title:"Forgot Password?",subtitle:"Reset your mail password"}),s.jsx("div",{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(WH,{size:24,className:"text-warning shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-text-secondary mb-3",children:"If you've forgotten your mail password, you can reset it through the Mailu admin panel or contact your system administrator."}),s.jsx("a",{href:"https://mail.aamos.systems/admin",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm",children:"Open Mailu Admin →"})]})]})})]}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx(Ze,{onClick:x,disabled:i||!e.email||!e.password,variant:"secondary",className:"flex-1",children:i?"Testing...":"Test Connection"}),s.jsx(Ze,{onClick:p,disabled:n||!e.email||!e.password,className:"flex-1",children:n?"Saving...":"Save Configuration"})]})]})}const vR={instagram:s.jsx(z5,{size:20}),twitter:s.jsx(dF,{size:20}),facebook:s.jsx(R5,{size:20}),linkedin:s.jsx(L5,{size:20}),tiktok:s.jsx(fn,{size:20})},bR={instagram:"bg-gradient-to-br from-purple-500 to-pink-500",twitter:"bg-blue-500",facebook:"bg-blue-600",linkedin:"bg-blue-700",tiktok:"bg-black"};function ede(){var j,w,S;const[e,t]=M.useState([]),[n,r]=M.useState([]),[i,l]=M.useState(null),[c,d]=M.useState(!0),[f,h]=M.useState(""),[p,x]=M.useState("accounts");M.useEffect(()=>{y()},[]);async function y(){d(!0),h("");try{const _=await(await fetch("/api/v1/social/accounts")).json();_.ok&&t(_.accounts||[]);const A=await(await fetch("/api/v1/social/stats")).json();A.ok&&l(A.stats);const N=await(await fetch("/api/v1/social/posts")).json();N.ok&&r(N.posts||[])}catch(v){h(v instanceof Error?v.message:"Failed to load data")}finally{d(!1)}}return c?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:[s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"}),s.jsx(Me,{className:"h-[80px]"})]}),s.jsx(Me,{className:"h-[400px]"})]}):f?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-danger",children:f})}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Social Media"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Hantera alla sociala media-konton"})]}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),children:"Add Account"})]}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx($r,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:((j=i==null?void 0:i.total_followers)==null?void 0:j.toLocaleString())||"0"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Followers"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(xh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:((w=i==null?void 0:i.total_posts)==null?void 0:w.toLocaleString())||"0"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Posts"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(aE,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:((S=i==null?void 0:i.total_engagement)==null?void 0:S.toLocaleString())||"0"}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Engagement"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-info-light flex items-center justify-center text-info",children:s.jsx(fn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:(i==null?void 0:i.accounts)||0}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Accounts"})]})]})})]}),s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1 overflow-x-auto max-w-full",children:["accounts","posts","analytics"].map(v=>s.jsx("button",{onClick:()=>x(v),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${p===v?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:v.charAt(0).toUpperCase()+v.slice(1)},v))}),p==="accounts"&&s.jsx("div",{className:"space-y-4",children:e.length===0?s.jsxs(te,{className:"p-8 text-center",children:[s.jsx(fn,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Inga konton kopplade"}),s.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"Lägg till dina sociala media-konton för att se statistik och hantera inlägg"}),s.jsx(Ze,{icon:s.jsx(wr,{size:16}),children:"Add First Account"})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:e.map(v=>s.jsxs(te,{className:"relative",children:[s.jsxs("div",{className:"flex items-start justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`w-12 h-12 rounded-xl ${bR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white`,children:vR[v.platform]||s.jsx(fn,{size:20})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-text-primary",children:v.display_name||v.account_name}),s.jsxs("p",{className:"text-xs text-text-secondary",children:["@",v.account_name]})]})]}),s.jsx(_e,{variant:v.is_connected?"success":"default",children:v.is_connected?"Connected":"Disconnected"})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.followers.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Followers"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.following.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Following"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.posts.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Posts"})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs text-text-tertiary",children:["Last synced: ",v.last_synced?new Date(v.last_synced).toLocaleDateString():"Never"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",onClick:()=>window.open(v.profile_url,"_blank"),children:s.jsx(HH,{size:16})}),s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Da,{size:16})})]})]})]},v.id))})}),p==="posts"&&s.jsx("div",{className:"space-y-4",children:n.length===0?s.jsxs(te,{className:"p-8 text-center",children:[s.jsx(xh,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Inga inlägg än"}),s.jsx("p",{className:"text-sm text-text-secondary",children:"Inlägg visas här när du har kopplat konton"})]}):s.jsx("div",{className:"space-y-4",children:n.map(v=>s.jsx(te,{children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:`w-10 h-10 rounded-lg ${bR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white flex-shrink-0`,children:vR[v.platform]||s.jsx(fn,{size:16})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm text-text-primary mb-2",children:v.content}),v.media_url&&s.jsx("img",{src:v.media_url,alt:"Post media",className:"rounded-lg max-h-48 object-cover mb-3"}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-text-secondary",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(aE,{size:14}),v.likes]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(xh,{size:14}),v.comments]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(mS,{size:14}),v.shares]}),s.jsxs("span",{children:[v.reach.toLocaleString()," reach"]}),s.jsx("span",{children:"•"}),s.jsx("span",{children:new Date(v.posted_at).toLocaleDateString()})]})]})]})},v.id))})}),p==="analytics"&&s.jsxs(te,{className:"p-8 text-center",children:[s.jsx(Da,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Analytics kommer snart"}),s.jsx("p",{className:"text-sm text-text-secondary",children:"Detaljerad analys av dina sociala media-kanaler"})]})]})}function tde(){const[e,t]=M.useState([{id:"1",role:"assistant",content:`Hej! Jag är Alva, din AI-assistent. Jag kan hjälpa dig med:
• Analysera data och rapporter
• Skriva och granska avtal
• Besvara frågor om BOC
• Hjälpa med email och kommunikation
• Ge råd om affärsbeslut
Vad kan jag hjälpa dig med idag?`,timestamp:new Date}]),[n,r]=M.useState(""),[i,l]=M.useState(!1),c=M.useRef(null),d=()=>{var p;(p=c.current)==null||p.scrollIntoView({behavior:"smooth"})};M.useEffect(()=>{d()},[e]);const f=async()=>{if(!n.trim())return;const p={id:Date.now().toString(),role:"user",content:n,timestamp:new Date};t(x=>[...x,p]),r(""),l(!0),setTimeout(()=>{const x={id:(Date.now()+1).toString(),role:"assistant",content:h(n),timestamp:new Date};t(y=>[...y,x]),l(!1)},1500)},h=p=>{const x=p.toLowerCase();return x.includes("hej")||x.includes("hallå")?"Hej! Vad kan jag hjälpa dig med?":x.includes("avtal")||x.includes("kontrakt")?"Jag kan hjälpa dig att granska avtal, skapa nya mallar, eller analysera befintliga kontrakt. Vill du att jag tittar på ett specifikt avtal?":x.includes("mail")||x.includes("email")?"Jag kan hjälpa dig att skriva professionella mail, förbättra befintliga utkast, eller analysera inkommande meddelanden. Vad behöver du hjälp med?":x.includes("rapport")||x.includes("analys")?"Jag kan analysera data, skapa rapporter, eller hjälpa dig tolka finansiella siffror. Vilken typ av analys behöver du?":"Jag förstår. Jag kan hjälpa dig med detta. Kan du ge mig mer kontext eller specificera vad du vill ha hjälp med?"};return s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:s.jsx(Ti,{size:20,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-text-primary",children:"Alva"}),s.jsx("p",{className:"text-sm text-text-secondary",children:"Din AI-assistent"})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto space-y-4 mb-4 pr-2",children:[e.map(p=>s.jsxs("div",{className:`flex gap-3 ${p.role==="user"?"flex-row-reverse":""}`,children:[s.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 ${p.role==="assistant"?"bg-primary/10 text-primary":"bg-surface text-text-secondary"}`,children:p.role==="assistant"?s.jsx(Ti,{size:16}):s.jsx(mu,{size:16})}),s.jsx(te,{className:`max-w-[80%] ${p.role==="user"?"bg-primary text-white":""}`,padding:"sm",children:s.jsx("p",{className:"text-sm whitespace-pre-wrap",children:p.content})})]},p.id)),i&&s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Ti,{size:16,className:"text-primary"})}),s.jsx(te,{className:"max-w-[80%]",padding:"sm",children:s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary",children:[s.jsx(Ph,{size:16,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Tänker..."})]})})]}),s.jsx("div",{ref:c})]}),s.jsxs("div",{className:"flex gap-2 pt-4 border-t border-border",children:[s.jsx(As,{value:n,onChange:p=>r(p.target.value),onKeyDown:p=>p.key==="Enter"&&f(),placeholder:"Skriv ett meddelande...",className:"flex-1"}),s.jsx(Ze,{icon:i?s.jsx(Ph,{size:16,className:"animate-spin"}):s.jsx(Hm,{size:16}),onClick:f,disabled:i||!n.trim(),children:"Skicka"})]})]})}function nde(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Projects"}),s.jsx(te,{className:"p-6",children:s.jsx("p",{className:"text-gray-500",children:"Project management coming soon..."})})]})}function rde({children:e}){const{isAuthenticated:t}=Ia();return t?s.jsx(s.Fragment,{children:e}):s.jsx(Tw,{to:"/login",replace:!0})}function ade({children:e}){const{isAuthenticated:t}=Ia();return t?s.jsx(Tw,{to:"/",replace:!0}):s.jsx(s.Fragment,{children:e})}function ide(){return s.jsxs(ZI,{children:[s.jsx(wt,{path:"/login",element:s.jsx(ade,{children:s.jsx(dG,{})})}),s.jsxs(wt,{element:s.jsx(rde,{children:s.jsx(oG,{})}),children:[s.jsx(wt,{path:"/",element:s.jsx(NG,{})}),s.jsx(wt,{path:"/dashboard",element:s.jsx(yG,{})}),s.jsx(wt,{path:"/crm",element:s.jsx(EG,{})}),s.jsx(wt,{path:"/sales",element:s.jsx(pue,{})}),s.jsx(wt,{path:"/finance",element:s.jsx(yue,{})}),s.jsx(wt,{path:"/hr",element:s.jsx(bue,{})}),s.jsx(wt,{path:"/legal",element:s.jsx(wue,{})}),s.jsx(wt,{path:"/marketing",element:s.jsx(Due,{})}),s.jsx(wt,{path:"/support",element:s.jsx(Lue,{})}),s.jsx(wt,{path:"/projects",element:s.jsx(nde,{})}),s.jsx(wt,{path:"/automation",element:s.jsx(Uue,{})}),s.jsx(wt,{path:"/amos",element:s.jsx(Vue,{})}),s.jsx(wt,{path:"/quixzoom",element:s.jsx(Hue,{})}),s.jsx(wt,{path:"/landvex",element:s.jsx(Fue,{})}),s.jsx(wt,{path:"/compliance",element:s.jsx(Gue,{})}),s.jsx(wt,{path:"/accounting",element:s.jsx(Zue,{})}),s.jsx(wt,{path:"/mail",element:s.jsx(Que,{})}),s.jsx(wt,{path:"/mail/settings",element:s.jsx(Jue,{})}),s.jsx(wt,{path:"/social",element:s.jsx(ede,{})}),s.jsx(wt,{path:"/alva",element:s.jsx(tde,{})}),s.jsx(wt,{path:"/profile",element:s.jsx(AG,{})})]}),s.jsx(wt,{path:"*",element:s.jsx(Tw,{to:"/",replace:!0})})]})}"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()});XB.createRoot(document.getElementById("root")).render(s.jsx(M.StrictMode,{children:s.jsx(wq,{children:s.jsx(ide,{})})}));