Files
boc/web-v2/dist/assets/index-DxcmfXcv.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

764 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 Df=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function it(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uy={exports:{}},zc={};/**
* @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 wO;function $B(){if(wO)return zc;wO=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 zc.Fragment=t,zc.jsx=n,zc.jsxs=n,zc}var SO;function BB(){return SO||(SO=1,Uy.exports=$B()),Uy.exports}var s=BB(),Vy={exports:{}},Re={};/**
* @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 NO;function IB(){if(NO)return Re;NO=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(q){return q===null||typeof q!="object"?null:(q=y&&q[y]||q["@@iterator"],typeof q=="function"?q:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,v={};function A(q,Y,ae){this.props=q,this.context=Y,this.refs=v,this.updater=ae||w}A.prototype.isReactComponent={},A.prototype.setState=function(q,Y){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,Y,"setState")},A.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function O(){}O.prototype=A.prototype;function _(q,Y,ae){this.props=q,this.context=Y,this.refs=v,this.updater=ae||w}var T=_.prototype=new O;T.constructor=_,S(T,A.prototype),T.isPureReactComponent=!0;var N=Array.isArray;function E(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function B(q,Y,ae){var fe=ae.ref;return{$$typeof:e,type:q,key:Y,ref:fe!==void 0?fe:null,props:ae}}function z(q,Y){return B(q.type,Y,q.props)}function D(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function L(q){var Y={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(ae){return Y[ae]})}var $=/\/+/g;function F(q,Y){return typeof q=="object"&&q!==null&&q.key!=null?L(""+q.key):Y.toString(36)}function H(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(E,E):(q.status="pending",q.then(function(Y){q.status==="pending"&&(q.status="fulfilled",q.value=Y)},function(Y){q.status==="pending"&&(q.status="rejected",q.reason=Y)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function I(q,Y,ae,fe,ye){var Se=typeof q;(Se==="undefined"||Se==="boolean")&&(q=null);var qe=!1;if(q===null)qe=!0;else switch(Se){case"bigint":case"string":case"number":qe=!0;break;case"object":switch(q.$$typeof){case e:case t:qe=!0;break;case p:return qe=q._init,I(qe(q._payload),Y,ae,fe,ye)}}if(qe)return ye=ye(q),qe=fe===""?"."+F(q,0):fe,N(ye)?(ae="",qe!=null&&(ae=qe.replace($,"$&/")+"/"),I(ye,Y,ae,"",function(Te){return Te})):ye!=null&&(D(ye)&&(ye=z(ye,ae+(ye.key==null||q&&q.key===ye.key?"":(""+ye.key).replace($,"$&/")+"/")+qe)),Y.push(ye)),1;qe=0;var et=fe===""?".":fe+":";if(N(q))for(var de=0;de<q.length;de++)fe=q[de],Se=et+F(fe,de),qe+=I(fe,Y,ae,Se,ye);else if(de=j(q),typeof de=="function")for(q=de.call(q),de=0;!(fe=q.next()).done;)fe=fe.value,Se=et+F(fe,de++),qe+=I(fe,Y,ae,Se,ye);else if(Se==="object"){if(typeof q.then=="function")return I(H(q),Y,ae,fe,ye);throw Y=String(q),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return qe}function G(q,Y,ae){if(q==null)return q;var fe=[],ye=0;return I(q,fe,"","",function(Se){return Y.call(ae,Se,ye++)}),fe}function Z(q){if(q._status===-1){var Y=q._result;Y=Y(),Y.then(function(ae){(q._status===0||q._status===-1)&&(q._status=1,q._result=ae)},function(ae){(q._status===0||q._status===-1)&&(q._status=2,q._result=ae)}),q._status===-1&&(q._status=0,q._result=Y)}if(q._status===1)return q._result.default;throw q._result}var ie=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},ce={map:G,forEach:function(q,Y,ae){G(q,function(){Y.apply(this,arguments)},ae)},count:function(q){var Y=0;return G(q,function(){Y++}),Y},toArray:function(q){return G(q,function(Y){return Y})||[]},only:function(q){if(!D(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return Re.Activity=x,Re.Children=ce,Re.Component=A,Re.Fragment=n,Re.Profiler=i,Re.PureComponent=_,Re.StrictMode=r,Re.Suspense=f,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Re.__COMPILER_RUNTIME={__proto__:null,c:function(q){return M.H.useMemoCache(q)}},Re.cache=function(q){return function(){return q.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(q,Y,ae){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var fe=S({},q.props),ye=q.key;if(Y!=null)for(Se in Y.key!==void 0&&(ye=""+Y.key),Y)!R.call(Y,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&Y.ref===void 0||(fe[Se]=Y[Se]);var Se=arguments.length-2;if(Se===1)fe.children=ae;else if(1<Se){for(var qe=Array(Se),et=0;et<Se;et++)qe[et]=arguments[et+2];fe.children=qe}return B(q.type,ye,fe)},Re.createContext=function(q){return q={$$typeof:c,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:l,_context:q},q},Re.createElement=function(q,Y,ae){var fe,ye={},Se=null;if(Y!=null)for(fe in Y.key!==void 0&&(Se=""+Y.key),Y)R.call(Y,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(ye[fe]=Y[fe]);var qe=arguments.length-2;if(qe===1)ye.children=ae;else if(1<qe){for(var et=Array(qe),de=0;de<qe;de++)et[de]=arguments[de+2];ye.children=et}if(q&&q.defaultProps)for(fe in qe=q.defaultProps,qe)ye[fe]===void 0&&(ye[fe]=qe[fe]);return B(q,Se,ye)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(q){return{$$typeof:d,render:q}},Re.isValidElement=D,Re.lazy=function(q){return{$$typeof:p,_payload:{_status:-1,_result:q},_init:Z}},Re.memo=function(q,Y){return{$$typeof:h,type:q,compare:Y===void 0?null:Y}},Re.startTransition=function(q){var Y=M.T,ae={};M.T=ae;try{var fe=q(),ye=M.S;ye!==null&&ye(ae,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(E,ie)}catch(Se){ie(Se)}finally{Y!==null&&ae.types!==null&&(Y.types=ae.types),M.T=Y}},Re.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Re.use=function(q){return M.H.use(q)},Re.useActionState=function(q,Y,ae){return M.H.useActionState(q,Y,ae)},Re.useCallback=function(q,Y){return M.H.useCallback(q,Y)},Re.useContext=function(q){return M.H.useContext(q)},Re.useDebugValue=function(){},Re.useDeferredValue=function(q,Y){return M.H.useDeferredValue(q,Y)},Re.useEffect=function(q,Y){return M.H.useEffect(q,Y)},Re.useEffectEvent=function(q){return M.H.useEffectEvent(q)},Re.useId=function(){return M.H.useId()},Re.useImperativeHandle=function(q,Y,ae){return M.H.useImperativeHandle(q,Y,ae)},Re.useInsertionEffect=function(q,Y){return M.H.useInsertionEffect(q,Y)},Re.useLayoutEffect=function(q,Y){return M.H.useLayoutEffect(q,Y)},Re.useMemo=function(q,Y){return M.H.useMemo(q,Y)},Re.useOptimistic=function(q,Y){return M.H.useOptimistic(q,Y)},Re.useReducer=function(q,Y,ae){return M.H.useReducer(q,Y,ae)},Re.useRef=function(q){return M.H.useRef(q)},Re.useState=function(q){return M.H.useState(q)},Re.useSyncExternalStore=function(q,Y,ae){return M.H.useSyncExternalStore(q,Y,ae)},Re.useTransition=function(){return M.H.useTransition()},Re.version="19.2.7",Re}var AO;function Nw(){return AO||(AO=1,Vy.exports=IB()),Vy.exports}var k=Nw();const V=it(k);var Hy={exports:{}},Lc={},Fy={exports:{}},Gy={};/**
* @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 _O;function qB(){return _O||(_O=1,(function(e){function t(I,G){var Z=I.length;I.push(G);e:for(;0<Z;){var ie=Z-1>>>1,ce=I[ie];if(0<i(ce,G))I[ie]=G,I[Z]=ce,Z=ie;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var G=I[0],Z=I.pop();if(Z!==G){I[0]=Z;e:for(var ie=0,ce=I.length,q=ce>>>1;ie<q;){var Y=2*(ie+1)-1,ae=I[Y],fe=Y+1,ye=I[fe];if(0>i(ae,Z))fe<ce&&0>i(ye,ae)?(I[ie]=ye,I[fe]=Z,ie=fe):(I[ie]=ae,I[Y]=Z,ie=Y);else if(fe<ce&&0>i(ye,Z))I[ie]=ye,I[fe]=Z,ie=fe;else break e}}return G}function i(I,G){var Z=I.sortIndex-G.sortIndex;return Z!==0?Z:I.id-G.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,A=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function T(I){for(var G=n(h);G!==null;){if(G.callback===null)r(h);else if(G.startTime<=I)r(h),G.sortIndex=G.expirationTime,t(f,G);else break;G=n(h)}}function N(I){if(S=!1,T(I),!w)if(n(f)!==null)w=!0,E||(E=!0,L());else{var G=n(h);G!==null&&H(N,G.startTime-I)}}var E=!1,M=-1,R=5,B=-1;function z(){return v?!0:!(e.unstable_now()-B<R)}function D(){if(v=!1,E){var I=e.unstable_now();B=I;var G=!0;try{e:{w=!1,S&&(S=!1,O(M),M=-1),j=!0;var Z=y;try{t:{for(T(I),x=n(f);x!==null&&!(x.expirationTime>I&&z());){var ie=x.callback;if(typeof ie=="function"){x.callback=null,y=x.priorityLevel;var ce=ie(x.expirationTime<=I);if(I=e.unstable_now(),typeof ce=="function"){x.callback=ce,T(I),G=!0;break t}x===n(f)&&r(f),T(I)}else r(f);x=n(f)}if(x!==null)G=!0;else{var q=n(h);q!==null&&H(N,q.startTime-I),G=!1}}break e}finally{x=null,y=Z,j=!1}G=void 0}}finally{G?L():E=!1}}}var L;if(typeof _=="function")L=function(){_(D)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,F=$.port2;$.port1.onmessage=D,L=function(){F.postMessage(null)}}else L=function(){A(D,0)};function H(I,G){M=A(function(){I(e.unstable_now())},G)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(I){switch(y){case 1:case 2:case 3:var G=3;break;default:G=y}var Z=y;y=G;try{return I()}finally{y=Z}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(I,G){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var Z=y;y=I;try{return G()}finally{y=Z}},e.unstable_scheduleCallback=function(I,G,Z){var ie=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ie+Z:ie):Z=ie,I){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=Z+ce,I={id:p++,callback:G,priorityLevel:I,startTime:Z,expirationTime:ce,sortIndex:-1},Z>ie?(I.sortIndex=Z,t(h,I),n(f)===null&&I===n(h)&&(S?(O(M),M=-1):S=!0,H(N,Z-ie))):(I.sortIndex=ce,t(f,I),w||j||(w=!0,E||(E=!0,L()))),I},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(I){var G=y;return function(){var Z=y;y=G;try{return I.apply(this,arguments)}finally{y=Z}}}})(Gy)),Gy}var OO;function UB(){return OO||(OO=1,Fy.exports=qB()),Fy.exports}var Ky={exports:{}},pn={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var TO;function VB(){if(TO)return pn;TO=1;var e=Nw();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 pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pn.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)},pn.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()}},pn.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))},pn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},pn.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})}},pn.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)},pn.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})}},pn.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)},pn.requestFormReset=function(f){r.d.r(f)},pn.unstable_batchedUpdates=function(f,h){return f(h)},pn.useFormState=function(f,h,p){return c.H.useFormState(f,h,p)},pn.useFormStatus=function(){return c.H.useHostTransitionStatus()},pn.version="19.2.7",pn}var EO;function HB(){if(EO)return Ky.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(),Ky.exports=VB(),Ky.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 kO;function FB(){if(kO)return Lc;kO=1;var e=UB(),t=Nw(),n=HB();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"),A=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),_=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function L(a){return a===null||typeof a!="object"?null:(a=D&&a[D]||a["@@iterator"],typeof a=="function"?a:null)}var $=Symbol.for("react.client.reference");function F(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===$?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case A:return"Profiler";case v:return"StrictMode";case N:return"Suspense";case E:return"SuspenseList";case B:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case _: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 M:return o=a.displayName||null,o!==null?o:F(a.type)||"Memo";case R:o=a._payload,a=a._init;try{return F(a(o))}catch{}}return null}var H=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ie=[],ce=-1;function q(a){return{current:a}}function Y(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=q(null),ye=q(null),Se=q(null),qe=q(null);function et(a,o){switch(ae(Se,o),ae(ye,a),ae(fe,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?F_(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=F_(o),a=G_(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Y(fe),ae(fe,a)}function de(){Y(fe),Y(ye),Y(Se)}function Te(a){a.memoizedState!==null&&ae(qe,a);var o=fe.current,u=G_(o,a.type);o!==u&&(ae(ye,a),ae(fe,u))}function Pe(a){ye.current===a&&(Y(fe),Y(ye)),qe.current===a&&(Y(qe),Mc._currentValue=Z)}var ue,gt;function $e(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 Tt=!1;function Et(a,o){if(!a||Tt)return"";Tt=!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 U=C.split(`
`),Q=P.split(`
`);for(g=m=0;m<U.length&&!U[m].includes("DetermineComponentFrameRoot");)m++;for(;g<Q.length&&!Q[g].includes("DetermineComponentFrameRoot");)g++;if(m===U.length||g===Q.length)for(m=U.length-1,g=Q.length-1;1<=m&&0<=g&&U[m]!==Q[g];)g--;for(;1<=m&&0<=g;m--,g--)if(U[m]!==Q[g]){if(m!==1||g!==1)do if(m--,g--,0>g||U[m]!==Q[g]){var ne=`
`+U[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{Tt=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?$e(u):""}function hn(a,o){switch(a.tag){case 26:case 27:case 5:return $e(a.type);case 16:return $e("Lazy");case 13:return a.child!==o&&o!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return Et(a.type,!1);case 11:return Et(a.type.render,!1);case 1:return Et(a.type,!0);case 31:return $e("Activity");default:return""}}function Or(a){try{var o="",u=null;do o+=hn(a,u),u=a,a=a.return;while(a);return o}catch(m){return`
Error generating stack: `+m.message+`
`+m.stack}}var Fr=Object.prototype.hasOwnProperty,Xa=e.unstable_scheduleCallback,Tr=e.unstable_cancelCallback,ca=e.unstable_shouldYield,Vl=e.unstable_requestPaint,mn=e.unstable_now,xd=e.unstable_getCurrentPriorityLevel,SN=e.unstable_ImmediatePriority,NN=e.unstable_UserBlockingPriority,yd=e.unstable_NormalPriority,v8=e.unstable_LowPriority,AN=e.unstable_IdlePriority,b8=e.log,j8=e.unstable_setDisableYieldValue,Hl=null,$n=null;function Wa(a){if(typeof b8=="function"&&j8(a),$n&&typeof $n.setStrictMode=="function")try{$n.setStrictMode(Hl,a)}catch{}}var Bn=Math.clz32?Math.clz32:N8,w8=Math.log,S8=Math.LN2;function N8(a){return a>>>=0,a===0?32:31-(w8(a)/S8|0)|0}var gd=256,vd=262144,bd=4194304;function Ui(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 jd(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=Ui(m):(C&=P,C!==0?g=Ui(C):u||(u=P&~a,u!==0&&(g=Ui(u))))):(P=m&~b,P!==0?g=Ui(P):C!==0?g=Ui(C):u||(u=m&~a,u!==0&&(g=Ui(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 Fl(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function A8(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 _N(){var a=bd;return bd<<=1,(bd&62914560)===0&&(bd=4194304),a}function kp(a){for(var o=[],u=0;31>u;u++)o.push(a);return o}function Gl(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function _8(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,U=a.expirationTimes,Q=a.hiddenUpdates;for(u=C&~u;0<u;){var ne=31-Bn(u),oe=1<<ne;P[ne]=0,U[ne]=-1;var J=Q[ne];if(J!==null)for(Q[ne]=null,ne=0;ne<J.length;ne++){var ee=J[ne];ee!==null&&(ee.lane&=-536870913)}u&=~oe}m!==0&&ON(a,m,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(C&~o))}function ON(a,o,u){a.pendingLanes|=o,a.suspendedLanes&=~o;var m=31-Bn(o);a.entangledLanes|=o,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function TN(a,o){var u=a.entangledLanes|=o;for(a=a.entanglements;u;){var m=31-Bn(u),g=1<<m;g&o|a[m]&o&&(a[m]|=o),u&=~g}}function EN(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 kN(){var a=G.p;return a!==0?a:(a=window.event,a===void 0?32:pO(a.type))}function CN(a,o){var u=G.p;try{return G.p=a,o()}finally{G.p=u}}var Za=Math.random().toString(36).slice(2),rn="__reactFiber$"+Za,Tn="__reactProps$"+Za,Us="__reactContainer$"+Za,Pp="__reactEvents$"+Za,O8="__reactListeners$"+Za,T8="__reactHandles$"+Za,MN="__reactResources$"+Za,Kl="__reactMarker$"+Za;function Rp(a){delete a[rn],delete a[Tn],delete a[Pp],delete a[O8],delete a[T8]}function Vs(a){var o=a[rn];if(o)return o;for(var u=a.parentNode;u;){if(o=u[Us]||u[rn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(a=J_(a);a!==null;){if(u=a[rn])return u;a=J_(a)}return o}a=u,u=a.parentNode}return null}function Hs(a){if(a=a[rn]||a[Us]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function Yl(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(r(33))}function Fs(a){var o=a[MN];return o||(o=a[MN]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Qt(a){a[Kl]=!0}var PN=new Set,RN={};function Vi(a,o){Gs(a,o),Gs(a+"Capture",o)}function Gs(a,o){for(RN[a]=o,a=0;a<o.length;a++)PN.add(o[a])}var E8=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]*$"),DN={},zN={};function k8(a){return Fr.call(zN,a)?!0:Fr.call(DN,a)?!1:E8.test(a)?zN[a]=!0:(DN[a]=!0,!1)}function wd(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 Sd(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 ua(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 rr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function LN(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function C8(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 Dp(a){if(!a._valueTracker){var o=LN(a)?"checked":"value";a._valueTracker=C8(a,o,""+a[o])}}function $N(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var u=o.getValue(),m="";return a&&(m=LN(a)?a.checked?"true":"false":a.value),a=m,a!==u?(o.setValue(a),!0):!1}function Nd(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 M8=/[\n"\\]/g;function ar(a){return a.replace(M8,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function zp(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=""+rr(o)):a.value!==""+rr(o)&&(a.value=""+rr(o)):C!=="submit"&&C!=="reset"||a.removeAttribute("value"),o!=null?Lp(a,C,rr(o)):u!=null?Lp(a,C,rr(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=""+rr(P):a.removeAttribute("name")}function BN(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)){Dp(a);return}u=u!=null?""+rr(u):"",o=o!=null?""+rr(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),Dp(a)}function Lp(a,o,u){o==="number"&&Nd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Ks(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=""+rr(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 IN(a,o,u){if(o!=null&&(o=""+rr(o),o!==a.value&&(a.value=o),u==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=u!=null?""+rr(u):""}function qN(a,o,u,m){if(o==null){if(m!=null){if(u!=null)throw Error(r(92));if(H(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),o=u}u=rr(o),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),Dp(a)}function Ys(a,o){if(o){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=o;return}}a.textContent=o}var P8=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 UN(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||P8.has(o)?o==="float"?a.cssFloat=u:a[o]=(""+u).trim():a[o]=u+"px"}function VN(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&&UN(a,g,m)}else for(var b in o)o.hasOwnProperty(b)&&UN(a,b,o[b])}function $p(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 R8=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"]]),D8=/^[\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 Ad(a){return D8.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function da(){}var Bp=null;function Ip(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Xs=null,Ws=null;function HN(a){var o=Hs(a);if(o&&(a=o.stateNode)){var u=a[Tn]||null;e:switch(a=o.stateNode,o.type){case"input":if(zp(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="'+ar(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var m=u[o];if(m!==a&&m.form===a.form){var g=m[Tn]||null;if(!g)throw Error(r(90));zp(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&&$N(m)}break e;case"textarea":IN(a,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Ks(a,!!u.multiple,o,!1)}}}var qp=!1;function FN(a,o,u){if(qp)return a(o,u);qp=!0;try{var m=a(o);return m}finally{if(qp=!1,(Xs!==null||Ws!==null)&&(hf(),Xs&&(o=Xs,a=Ws,Ws=Xs=null,HN(o),a)))for(o=0;o<a.length;o++)HN(a[o])}}function Xl(a,o){var u=a.stateNode;if(u===null)return null;var m=u[Tn]||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 fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Up=!1;if(fa)try{var Wl={};Object.defineProperty(Wl,"passive",{get:function(){Up=!0}}),window.addEventListener("test",Wl,Wl),window.removeEventListener("test",Wl,Wl)}catch{Up=!1}var Qa=null,Vp=null,_d=null;function GN(){if(_d)return _d;var a,o=Vp,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 _d=g.slice(a,1<m?1-m:void 0)}function Od(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 Td(){return!0}function KN(){return!1}function En(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)?Td:KN,this.isPropagationStopped=KN,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=Td)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Td)},persist:function(){},isPersistent:Td}),o}var Hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ed=En(Hi),Zl=x({},Hi,{view:0,detail:0}),z8=En(Zl),Hp,Fp,Ql,kd=x({},Zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kp,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Ql&&(Ql&&a.type==="mousemove"?(Hp=a.screenX-Ql.screenX,Fp=a.screenY-Ql.screenY):Fp=Hp=0,Ql=a),Hp)},movementY:function(a){return"movementY"in a?a.movementY:Fp}}),YN=En(kd),L8=x({},kd,{dataTransfer:0}),$8=En(L8),B8=x({},Zl,{relatedTarget:0}),Gp=En(B8),I8=x({},Hi,{animationName:0,elapsedTime:0,pseudoElement:0}),q8=En(I8),U8=x({},Hi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),V8=En(U8),H8=x({},Hi,{data:0}),XN=En(H8),F8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G8={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"},K8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y8(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=K8[a])?!!o[a]:!1}function Kp(){return Y8}var X8=x({},Zl,{key:function(a){if(a.key){var o=F8[a.key]||a.key;if(o!=="Unidentified")return o}return a.type==="keypress"?(a=Od(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?G8[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kp,charCode:function(a){return a.type==="keypress"?Od(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Od(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),W8=En(X8),Z8=x({},kd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),WN=En(Z8),Q8=x({},Zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kp}),J8=En(Q8),e$=x({},Hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),t$=En(e$),n$=x({},kd,{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}),r$=En(n$),a$=x({},Hi,{newState:0,oldState:0}),i$=En(a$),s$=[9,13,27,32],Yp=fa&&"CompositionEvent"in window,Jl=null;fa&&"documentMode"in document&&(Jl=document.documentMode);var o$=fa&&"TextEvent"in window&&!Jl,ZN=fa&&(!Yp||Jl&&8<Jl&&11>=Jl),QN=" ",JN=!1;function e2(a,o){switch(a){case"keyup":return s$.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function t2(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Zs=!1;function l$(a,o){switch(a){case"compositionend":return t2(o);case"keypress":return o.which!==32?null:(JN=!0,QN);case"textInput":return a=o.data,a===QN&&JN?null:a;default:return null}}function c$(a,o){if(Zs)return a==="compositionend"||!Yp&&e2(a,o)?(a=GN(),_d=Vp=Qa=null,Zs=!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 ZN&&o.locale!=="ko"?null:o.data;default:return null}}var u$={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 n2(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!u$[a.type]:o==="textarea"}function r2(a,o,u,m){Xs?Ws?Ws.push(m):Ws=[m]:Xs=m,o=bf(o,"onChange"),0<o.length&&(u=new Ed("onChange","change",null,u,m),a.push({event:u,listeners:o}))}var ec=null,tc=null;function d$(a){B_(a,0)}function Cd(a){var o=Yl(a);if($N(o))return a}function a2(a,o){if(a==="change")return o}var i2=!1;if(fa){var Xp;if(fa){var Wp="oninput"in document;if(!Wp){var s2=document.createElement("div");s2.setAttribute("oninput","return;"),Wp=typeof s2.oninput=="function"}Xp=Wp}else Xp=!1;i2=Xp&&(!document.documentMode||9<document.documentMode)}function o2(){ec&&(ec.detachEvent("onpropertychange",l2),tc=ec=null)}function l2(a){if(a.propertyName==="value"&&Cd(tc)){var o=[];r2(o,tc,a,Ip(a)),FN(d$,o)}}function f$(a,o,u){a==="focusin"?(o2(),ec=o,tc=u,ec.attachEvent("onpropertychange",l2)):a==="focusout"&&o2()}function h$(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Cd(tc)}function m$(a,o){if(a==="click")return Cd(o)}function p$(a,o){if(a==="input"||a==="change")return Cd(o)}function x$(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var In=typeof Object.is=="function"?Object.is:x$;function nc(a,o){if(In(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(!Fr.call(o,g)||!In(a[g],o[g]))return!1}return!0}function c2(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function u2(a,o){var u=c2(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=c2(u)}}function d2(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?d2(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function f2(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=Nd(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=Nd(a.document)}return o}function Zp(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 y$=fa&&"documentMode"in document&&11>=document.documentMode,Qs=null,Qp=null,rc=null,Jp=!1;function h2(a,o,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Jp||Qs==null||Qs!==Nd(m)||(m=Qs,"selectionStart"in m&&Zp(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}),rc&&nc(rc,m)||(rc=m,m=bf(Qp,"onSelect"),0<m.length&&(o=new Ed("onSelect","select",null,o,u),a.push({event:o,listeners:m}),o.target=Qs)))}function Fi(a,o){var u={};return u[a.toLowerCase()]=o.toLowerCase(),u["Webkit"+a]="webkit"+o,u["Moz"+a]="moz"+o,u}var Js={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},ex={},m2={};fa&&(m2=document.createElement("div").style,"AnimationEvent"in window||(delete Js.animationend.animation,delete Js.animationiteration.animation,delete Js.animationstart.animation),"TransitionEvent"in window||delete Js.transitionend.transition);function Gi(a){if(ex[a])return ex[a];if(!Js[a])return a;var o=Js[a],u;for(u in o)if(o.hasOwnProperty(u)&&u in m2)return ex[a]=o[u];return a}var p2=Gi("animationend"),x2=Gi("animationiteration"),y2=Gi("animationstart"),g$=Gi("transitionrun"),v$=Gi("transitionstart"),b$=Gi("transitioncancel"),g2=Gi("transitionend"),v2=new Map,tx="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(" ");tx.push("scrollEnd");function Er(a,o){v2.set(a,o),Vi(o,[a])}var Md=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)},ir=[],eo=0,nx=0;function Pd(){for(var a=eo,o=nx=eo=0;o<a;){var u=ir[o];ir[o++]=null;var m=ir[o];ir[o++]=null;var g=ir[o];ir[o++]=null;var b=ir[o];if(ir[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&&b2(u,g,b)}}function Rd(a,o,u,m){ir[eo++]=a,ir[eo++]=o,ir[eo++]=u,ir[eo++]=m,nx|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function rx(a,o,u,m){return Rd(a,o,u,m),Dd(a)}function Ki(a,o){return Rd(a,null,null,o),Dd(a)}function b2(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-Bn(u),a=b.hiddenUpdates,m=a[g],m===null?a[g]=[o]:m.push(o),o.lane=u|536870912),b):null}function Dd(a){if(50<Ac)throw Ac=0,fy=null,Error(r(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var to={};function j$(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 qn(a,o,u,m){return new j$(a,o,u,m)}function ax(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ha(a,o){var u=a.alternate;return u===null?(u=qn(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 j2(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 zd(a,o,u,m,g,b){var C=0;if(m=a,typeof a=="function")ax(a)&&(C=1);else if(typeof a=="string")C=_B(a,u,fe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case B:return a=qn(31,u,o,g),a.elementType=B,a.lanes=b,a;case S:return Yi(u.children,g,b,o);case v:C=8,g|=24;break;case A:return a=qn(12,u,o,g|2),a.elementType=A,a.lanes=b,a;case N:return a=qn(13,u,o,g),a.elementType=N,a.lanes=b,a;case E:return a=qn(19,u,o,g),a.elementType=E,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case _:C=10;break e;case O:C=9;break e;case T:C=11;break e;case M: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=qn(C,u,o,g),o.elementType=a,o.type=m,o.lanes=b,o}function Yi(a,o,u,m){return a=qn(7,a,m,o),a.lanes=u,a}function ix(a,o,u){return a=qn(6,a,null,o),a.lanes=u,a}function w2(a){var o=qn(18,null,null,0);return o.stateNode=a,o}function sx(a,o,u){return o=qn(4,a.children!==null?a.children:[],a.key,o),o.lanes=u,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var S2=new WeakMap;function sr(a,o){if(typeof a=="object"&&a!==null){var u=S2.get(a);return u!==void 0?u:(o={value:a,source:o,stack:Or(o)},S2.set(a,o),o)}return{value:a,source:o,stack:Or(o)}}var no=[],ro=0,Ld=null,ac=0,or=[],lr=0,Ja=null,Gr=1,Kr="";function ma(a,o){no[ro++]=ac,no[ro++]=Ld,Ld=a,ac=o}function N2(a,o,u){or[lr++]=Gr,or[lr++]=Kr,or[lr++]=Ja,Ja=a;var m=Gr;a=Kr;var g=32-Bn(m)-1;m&=~(1<<g),u+=1;var b=32-Bn(o)+g;if(30<b){var C=g-g%5;b=(m&(1<<C)-1).toString(32),m>>=C,g-=C,Gr=1<<32-Bn(o)+g|u<<g|m,Kr=b+a}else Gr=1<<b|u<<g|m,Kr=a}function ox(a){a.return!==null&&(ma(a,1),N2(a,1,0))}function lx(a){for(;a===Ld;)Ld=no[--ro],no[ro]=null,ac=no[--ro],no[ro]=null;for(;a===Ja;)Ja=or[--lr],or[lr]=null,Kr=or[--lr],or[lr]=null,Gr=or[--lr],or[lr]=null}function A2(a,o){or[lr++]=Gr,or[lr++]=Kr,or[lr++]=Ja,Gr=o.id,Kr=o.overflow,Ja=a}var an=null,vt=null,Ye=!1,ei=null,cr=!1,cx=Error(r(519));function ti(a){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ic(sr(o,a)),cx}function _2(a){var o=a.stateNode,u=a.type,m=a.memoizedProps;switch(o[rn]=a,o[Tn]=m,u){case"dialog":Ve("cancel",o),Ve("close",o);break;case"iframe":case"object":case"embed":Ve("load",o);break;case"video":case"audio":for(u=0;u<Oc.length;u++)Ve(Oc[u],o);break;case"source":Ve("error",o);break;case"img":case"image":case"link":Ve("error",o),Ve("load",o);break;case"details":Ve("toggle",o);break;case"input":Ve("invalid",o),BN(o,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Ve("invalid",o);break;case"textarea":Ve("invalid",o),qN(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||V_(o.textContent,u)?(m.popover!=null&&(Ve("beforetoggle",o),Ve("toggle",o)),m.onScroll!=null&&Ve("scroll",o),m.onScrollEnd!=null&&Ve("scrollend",o),m.onClick!=null&&(o.onclick=da),o=!0):o=!1,o||ti(a,!0)}function O2(a){for(an=a.return;an;)switch(an.tag){case 5:case 31:case 13:cr=!1;return;case 27:case 3:cr=!0;return;default:an=an.return}}function ao(a){if(a!==an)return!1;if(!Ye)return O2(a),Ye=!0,!1;var o=a.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Oy(a.type,a.memoizedProps)),u=!u),u&&vt&&ti(a),O2(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=Q_(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=Q_(a)}else o===27?(o=vt,pi(a.type)?(a=My,My=null,vt=a):vt=o):vt=an?dr(a.stateNode.nextSibling):null;return!0}function Xi(){vt=an=null,Ye=!1}function ux(){var a=ei;return a!==null&&(Pn===null?Pn=a:Pn.push.apply(Pn,a),ei=null),a}function ic(a){ei===null?ei=[a]:ei.push(a)}var dx=q(null),Wi=null,pa=null;function ni(a,o,u){ae(dx,o._currentValue),o._currentValue=u}function xa(a){a._currentValue=dx.current,Y(dx)}function fx(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 hx(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 U=0;U<o.length;U++)if(P.context===o[U]){b.lanes|=u,P=b.alternate,P!==null&&(P.lanes|=u),fx(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),fx(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 io(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;In(g.pendingProps.value,C.value)||(a!==null?a.push(P):a=[P])}}else if(g===qe.current){if(C=g.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(Mc):a=[Mc])}g=g.return}a!==null&&hx(o,a,u,m),o.flags|=262144}function $d(a){for(a=a.firstContext;a!==null;){if(!In(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Zi(a){Wi=a,pa=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function sn(a){return T2(Wi,a)}function Bd(a,o){return Wi===null&&Zi(a),T2(a,o)}function T2(a,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},pa===null){if(a===null)throw Error(r(308));pa=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else pa=pa.next=o;return u}var w$=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()})}},S$=e.unstable_scheduleCallback,N$=e.unstable_NormalPriority,Lt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mx(){return{controller:new w$,data:new Map,refCount:0}}function sc(a){a.refCount--,a.refCount===0&&S$(N$,function(){a.controller.abort()})}var oc=null,px=0,so=0,oo=null;function A$(a,o){if(oc===null){var u=oc=[];px=0,so=gy(),oo={status:"pending",value:void 0,then:function(m){u.push(m)}}}return px++,o.then(E2,E2),o}function E2(){if(--px===0&&oc!==null){oo!==null&&(oo.status="fulfilled");var a=oc;oc=null,so=0,oo=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function _$(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 k2=I.S;I.S=function(a,o){h_=mn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&A$(a,o),k2!==null&&k2(a,o)};var Qi=q(null);function xx(){var a=Qi.current;return a!==null?a:ut.pooledCache}function Id(a,o){o===null?ae(Qi,Qi.current):ae(Qi,o.pool)}function C2(){var a=xx();return a===null?null:{parent:Lt._currentValue,pool:a}}var lo=Error(r(460)),yx=Error(r(474)),qd=Error(r(542)),Ud={then:function(){}};function M2(a){return a=a.status,a==="fulfilled"||a==="rejected"}function P2(a,o,u){switch(u=a[u],u===void 0?a.push(o):u!==o&&(o.then(da,da),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,D2(a),a;default:if(typeof o.status=="string")o.then(da,da);else{if(a=ut,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,D2(a),a}throw es=o,lo}}function Ji(a){try{var o=a._init;return o(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(es=u,lo):u}}var es=null;function R2(){if(es===null)throw Error(r(459));var a=es;return es=null,a}function D2(a){if(a===lo||a===qd)throw Error(r(483))}var co=null,lc=0;function Vd(a){var o=lc;return lc+=1,co===null&&(co=[]),P2(co,a,o)}function cc(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function Hd(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 z2(a){function o(X,K){if(a){var W=X.deletions;W===null?(X.deletions=[K],X.flags|=16):W.push(K)}}function u(X,K){if(!a)return null;for(;K!==null;)o(X,K),K=K.sibling;return null}function m(X){for(var K=new Map;X!==null;)X.key!==null?K.set(X.key,X):K.set(X.index,X),X=X.sibling;return K}function g(X,K){return X=ha(X,K),X.index=0,X.sibling=null,X}function b(X,K,W){return X.index=W,a?(W=X.alternate,W!==null?(W=W.index,W<K?(X.flags|=67108866,K):W):(X.flags|=67108866,K)):(X.flags|=1048576,K)}function C(X){return a&&X.alternate===null&&(X.flags|=67108866),X}function P(X,K,W,se){return K===null||K.tag!==6?(K=ix(W,X.mode,se),K.return=X,K):(K=g(K,W),K.return=X,K)}function U(X,K,W,se){var ve=W.type;return ve===S?ne(X,K,W.props.children,se,W.key):K!==null&&(K.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&Ji(ve)===K.type)?(K=g(K,W.props),cc(K,W),K.return=X,K):(K=zd(W.type,W.key,W.props,null,X.mode,se),cc(K,W),K.return=X,K)}function Q(X,K,W,se){return K===null||K.tag!==4||K.stateNode.containerInfo!==W.containerInfo||K.stateNode.implementation!==W.implementation?(K=sx(W,X.mode,se),K.return=X,K):(K=g(K,W.children||[]),K.return=X,K)}function ne(X,K,W,se,ve){return K===null||K.tag!==7?(K=Yi(W,X.mode,se,ve),K.return=X,K):(K=g(K,W),K.return=X,K)}function oe(X,K,W){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=ix(""+K,X.mode,W),K.return=X,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case j:return W=zd(K.type,K.key,K.props,null,X.mode,W),cc(W,K),W.return=X,W;case w:return K=sx(K,X.mode,W),K.return=X,K;case R:return K=Ji(K),oe(X,K,W)}if(H(K)||L(K))return K=Yi(K,X.mode,W,null),K.return=X,K;if(typeof K.then=="function")return oe(X,Vd(K),W);if(K.$$typeof===_)return oe(X,Bd(X,K),W);Hd(X,K)}return null}function J(X,K,W,se){var ve=K!==null?K.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return ve!==null?null:P(X,K,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case j:return W.key===ve?U(X,K,W,se):null;case w:return W.key===ve?Q(X,K,W,se):null;case R:return W=Ji(W),J(X,K,W,se)}if(H(W)||L(W))return ve!==null?null:ne(X,K,W,se,null);if(typeof W.then=="function")return J(X,K,Vd(W),se);if(W.$$typeof===_)return J(X,K,Bd(X,W),se);Hd(X,W)}return null}function ee(X,K,W,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return X=X.get(W)||null,P(K,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,U(K,X,se,ve);case w:return X=X.get(se.key===null?W:se.key)||null,Q(K,X,se,ve);case R:return se=Ji(se),ee(X,K,W,se,ve)}if(H(se)||L(se))return X=X.get(W)||null,ne(K,X,se,ve,null);if(typeof se.then=="function")return ee(X,K,W,Vd(se),ve);if(se.$$typeof===_)return ee(X,K,W,Bd(K,se),ve);Hd(K,se)}return null}function pe(X,K,W,se){for(var ve=null,Xe=null,ge=K,Be=K=0,Fe=null;ge!==null&&Be<W.length;Be++){ge.index>Be?(Fe=ge,ge=null):Fe=ge.sibling;var We=J(X,ge,W[Be],se);if(We===null){ge===null&&(ge=Fe);break}a&&ge&&We.alternate===null&&o(X,ge),K=b(We,K,Be),Xe===null?ve=We:Xe.sibling=We,Xe=We,ge=Fe}if(Be===W.length)return u(X,ge),Ye&&ma(X,Be),ve;if(ge===null){for(;Be<W.length;Be++)ge=oe(X,W[Be],se),ge!==null&&(K=b(ge,K,Be),Xe===null?ve=ge:Xe.sibling=ge,Xe=ge);return Ye&&ma(X,Be),ve}for(ge=m(ge);Be<W.length;Be++)Fe=ee(ge,X,Be,W[Be],se),Fe!==null&&(a&&Fe.alternate!==null&&ge.delete(Fe.key===null?Be:Fe.key),K=b(Fe,K,Be),Xe===null?ve=Fe:Xe.sibling=Fe,Xe=Fe);return a&&ge.forEach(function(bi){return o(X,bi)}),Ye&&ma(X,Be),ve}function Ne(X,K,W,se){if(W==null)throw Error(r(151));for(var ve=null,Xe=null,ge=K,Be=K=0,Fe=null,We=W.next();ge!==null&&!We.done;Be++,We=W.next()){ge.index>Be?(Fe=ge,ge=null):Fe=ge.sibling;var bi=J(X,ge,We.value,se);if(bi===null){ge===null&&(ge=Fe);break}a&&ge&&bi.alternate===null&&o(X,ge),K=b(bi,K,Be),Xe===null?ve=bi:Xe.sibling=bi,Xe=bi,ge=Fe}if(We.done)return u(X,ge),Ye&&ma(X,Be),ve;if(ge===null){for(;!We.done;Be++,We=W.next())We=oe(X,We.value,se),We!==null&&(K=b(We,K,Be),Xe===null?ve=We:Xe.sibling=We,Xe=We);return Ye&&ma(X,Be),ve}for(ge=m(ge);!We.done;Be++,We=W.next())We=ee(ge,X,Be,We.value,se),We!==null&&(a&&We.alternate!==null&&ge.delete(We.key===null?Be:We.key),K=b(We,K,Be),Xe===null?ve=We:Xe.sibling=We,Xe=We);return a&&ge.forEach(function(LB){return o(X,LB)}),Ye&&ma(X,Be),ve}function lt(X,K,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;K!==null;){if(K.key===ve){if(ve=W.type,ve===S){if(K.tag===7){u(X,K.sibling),se=g(K,W.props.children),se.return=X,X=se;break e}}else if(K.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&Ji(ve)===K.type){u(X,K.sibling),se=g(K,W.props),cc(se,W),se.return=X,X=se;break e}u(X,K);break}else o(X,K);K=K.sibling}W.type===S?(se=Yi(W.props.children,X.mode,se,W.key),se.return=X,X=se):(se=zd(W.type,W.key,W.props,null,X.mode,se),cc(se,W),se.return=X,X=se)}return C(X);case w:e:{for(ve=W.key;K!==null;){if(K.key===ve)if(K.tag===4&&K.stateNode.containerInfo===W.containerInfo&&K.stateNode.implementation===W.implementation){u(X,K.sibling),se=g(K,W.children||[]),se.return=X,X=se;break e}else{u(X,K);break}else o(X,K);K=K.sibling}se=sx(W,X.mode,se),se.return=X,X=se}return C(X);case R:return W=Ji(W),lt(X,K,W,se)}if(H(W))return pe(X,K,W,se);if(L(W)){if(ve=L(W),typeof ve!="function")throw Error(r(150));return W=ve.call(W),Ne(X,K,W,se)}if(typeof W.then=="function")return lt(X,K,Vd(W),se);if(W.$$typeof===_)return lt(X,K,Bd(X,W),se);Hd(X,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,K!==null&&K.tag===6?(u(X,K.sibling),se=g(K,W),se.return=X,X=se):(u(X,K),se=ix(W,X.mode,se),se.return=X,X=se),C(X)):u(X,K)}return function(X,K,W,se){try{lc=0;var ve=lt(X,K,W,se);return co=null,ve}catch(ge){if(ge===lo||ge===qd)throw ge;var Xe=qn(29,ge,null,X.mode);return Xe.lanes=se,Xe.return=X,Xe}finally{}}}var ts=z2(!0),L2=z2(!1),ri=!1;function gx(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vx(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=Dd(a),b2(a,null,u),o}return Rd(a,m,o,u),Dd(a)}function uc(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,TN(a,u)}}function bx(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 jx=!1;function dc(){if(jx){var a=oo;if(a!==null)throw a}}function fc(a,o,u,m){jx=!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 U=P,Q=U.next;U.next=null,C===null?b=Q:C.next=Q,C=U;var ne=a.alternate;ne!==null&&(ne=ne.updateQueue,P=ne.lastBaseUpdate,P!==C&&(P===null?ne.firstBaseUpdate=Q:P.next=Q,ne.lastBaseUpdate=U))}if(b!==null){var oe=g.baseState;C=0,ne=Q=U=null,P=b;do{var J=P.lane&-536870913,ee=J!==P.lane;if(ee?(He&J)===J:(m&J)===J){J!==0&&J===so&&(jx=!0),ne!==null&&(ne=ne.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var pe=a,Ne=P;J=o;var lt=u;switch(Ne.tag){case 1:if(pe=Ne.payload,typeof pe=="function"){oe=pe.call(lt,oe,J);break e}oe=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Ne.payload,J=typeof pe=="function"?pe.call(lt,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?(Q=ne=ee,U=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&&(U=oe),g.baseState=U,g.firstBaseUpdate=Q,g.lastBaseUpdate=ne,b===null&&(g.shared.lanes=0),ui|=C,a.lanes=C,a.memoizedState=oe}}function $2(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function B2(a,o){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)$2(u[a],o)}var uo=q(null),Fd=q(0);function I2(a,o){a=Aa,ae(Fd,a),ae(uo,o),Aa=a|o.baseLanes}function wx(){ae(Fd,Aa),ae(uo,uo.current)}function Sx(){Aa=Fd.current,Y(uo),Y(Fd)}var Un=q(null),ur=null;function si(a){var o=a.alternate;ae(Dt,Dt.current&1),ae(Un,a),ur===null&&(o===null||uo.current!==null||o.memoizedState!==null)&&(ur=a)}function Nx(a){ae(Dt,Dt.current),ae(Un,a),ur===null&&(ur=a)}function q2(a){a.tag===22?(ae(Dt,Dt.current),ae(Un,a),ur===null&&(ur=a)):oi()}function oi(){ae(Dt,Dt.current),ae(Un,Un.current)}function Vn(a){Y(Un),ur===a&&(ur=null),Y(Dt)}var Dt=q(0);function Gd(a){for(var o=a;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||ky(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 ya=0,ze=null,st=null,$t=null,Kd=!1,fo=!1,ns=!1,Yd=0,hc=0,ho=null,O$=0;function kt(){throw Error(r(321))}function Ax(a,o){if(o===null)return!1;for(var u=0;u<o.length&&u<a.length;u++)if(!In(a[u],o[u]))return!1;return!0}function _x(a,o,u,m,g,b){return ya=b,ze=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=a===null||a.memoizedState===null?NA:qx,ns=!1,b=u(m,g),ns=!1,fo&&(b=V2(o,u,m,g)),U2(a),b}function U2(a){I.H=xc;var o=st!==null&&st.next!==null;if(ya=0,$t=st=ze=null,Kd=!1,hc=0,ho=null,o)throw Error(r(300));a===null||Bt||(a=a.dependencies,a!==null&&$d(a)&&(Bt=!0))}function V2(a,o,u,m){ze=a;var g=0;do{if(fo&&(ho=null),hc=0,fo=!1,25<=g)throw Error(r(301));if(g+=1,$t=st=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}I.H=AA,b=o(u,m)}while(fo);return b}function T$(){var a=I.H,o=a.useState()[0];return o=typeof o.then=="function"?mc(o):o,a=a.useState()[0],(st!==null?st.memoizedState:null)!==a&&(ze.flags|=1024),o}function Ox(){var a=Yd!==0;return Yd=0,a}function Tx(a,o,u){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~u}function Ex(a){if(Kd){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}Kd=!1}ya=0,$t=st=ze=null,fo=!1,hc=Yd=0,ho=null}function vn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?ze.memoizedState=$t=a:$t=$t.next=a,$t}function zt(){if(st===null){var a=ze.alternate;a=a!==null?a.memoizedState:null}else a=st.next;var o=$t===null?ze.memoizedState:$t.next;if(o!==null)$t=o,st=a;else{if(a===null)throw ze.alternate===null?Error(r(467)):Error(r(310));st=a,a={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},$t===null?ze.memoizedState=$t=a:$t=$t.next=a}return $t}function Xd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mc(a){var o=hc;return hc+=1,ho===null&&(ho=[]),a=P2(ho,a,o),o=ze,($t===null?o.memoizedState:$t.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?NA:qx),a}function Wd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return mc(a);if(a.$$typeof===_)return sn(a)}throw Error(r(438,String(a)))}function kx(a){var o=null,u=ze.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var m=ze.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=Xd(),ze.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]=z;return o.index++,u}function ga(a,o){return typeof o=="function"?o(a):o}function Zd(a){var o=zt();return Cx(o,st,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,U=null,Q=o,ne=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(He&oe)===oe:(ya&oe)===oe){var J=Q.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),oe===so&&(ne=!0);else if((ya&J)===J){Q=Q.next,J===so&&(ne=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},U===null?(P=U=oe,C=b):U=U.next=oe,ze.lanes|=J,ui|=J;oe=Q.action,ns&&u(b,oe),b=Q.hasEagerState?Q.eagerState:u(b,oe)}else J={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},U===null?(P=U=J,C=b):U=U.next=J,ze.lanes|=oe,ui|=oe;Q=Q.next}while(Q!==null&&Q!==o);if(U===null?C=b:U.next=P,!In(b,a.memoizedState)&&(Bt=!0,ne&&(u=oo,u!==null)))throw u;a.memoizedState=b,a.baseState=C,a.baseQueue=U,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);In(b,o.memoizedState)||(Bt=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),u.lastRenderedState=b}return[b,m]}function H2(a,o,u){var m=ze,g=zt(),b=Ye;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=o();var C=!In((st||g).memoizedState,u);if(C&&(g.memoizedState=u,Bt=!0),g=g.queue,Dx(K2.bind(null,m,g,a),[a]),g.getSnapshot!==o||C||$t!==null&&$t.memoizedState.tag&1){if(m.flags|=2048,mo(9,{destroy:void 0},G2.bind(null,m,g,u,o),null),ut===null)throw Error(r(349));b||(ya&127)!==0||F2(m,o,u)}return u}function F2(a,o,u){a.flags|=16384,a={getSnapshot:o,value:u},o=ze.updateQueue,o===null?(o=Xd(),ze.updateQueue=o,o.stores=[a]):(u=o.stores,u===null?o.stores=[a]:u.push(a))}function G2(a,o,u,m){o.value=u,o.getSnapshot=m,Y2(o)&&X2(a)}function K2(a,o,u){return u(function(){Y2(o)&&X2(a)})}function Y2(a){var o=a.getSnapshot;a=a.value;try{var u=o();return!In(a,u)}catch{return!0}}function X2(a){var o=Ki(a,2);o!==null&&Rn(o,a,2)}function Px(a){var o=vn();if(typeof a=="function"){var u=a;if(a=u(),ns){Wa(!0);try{u()}finally{Wa(!1)}}}return o.memoizedState=o.baseState=a,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:a},o}function W2(a,o,u,m){return a.baseState=u,Cx(a,st,typeof m=="function"?m:ga)}function E$(a,o,u,m,g){if(ef(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)}};I.T!==null?u(!0):b.isTransition=!1,m(b),u=o.pending,u===null?(b.next=o.pending=b,Z2(o,b)):(b.next=u.next,o.pending=u.next=b)}}function Z2(a,o){var u=o.action,m=o.payload,g=a.state;if(o.isTransition){var b=I.T,C={};I.T=C;try{var P=u(g,m),U=I.S;U!==null&&U(C,P),Q2(a,o,P)}catch(Q){Rx(a,o,Q)}finally{b!==null&&C.types!==null&&(b.types=C.types),I.T=b}}else try{b=u(g,m),Q2(a,o,b)}catch(Q){Rx(a,o,Q)}}function Q2(a,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){J2(a,o,m)},function(m){return Rx(a,o,m)}):J2(a,o,u)}function J2(a,o,u){o.status="fulfilled",o.value=u,eA(o),a.state=u,o=a.pending,o!==null&&(u=o.next,u===o?a.pending=null:(u=u.next,o.next=u,Z2(a,u)))}function Rx(a,o,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do o.status="rejected",o.reason=u,eA(o),o=o.next;while(o!==m)}a.action=null}function eA(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function tA(a,o){return o}function nA(a,o){if(Ye){var u=ut.formState;if(u!==null){e:{var m=ze;if(Ye){if(vt){t:{for(var g=vt,b=cr;g.nodeType!==8;){if(!b){g=null;break t}if(g=dr(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){vt=dr(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:tA,lastRenderedState:o},u.queue=m,u=jA.bind(null,ze,m),m.dispatch=u,m=Px(!1),b=Ix.bind(null,ze,!1,m.queue),m=vn(),g={state:o,dispatch:null,action:a,pending:null},m.queue=g,u=E$.bind(null,ze,g,b,u),g.dispatch=u,m.memoizedState=a,[o,u,!1]}function rA(a){var o=zt();return aA(o,st,a)}function aA(a,o,u){if(o=Cx(a,o,tA)[0],a=Zd(ga)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var m=mc(o)}catch(C){throw C===lo?qd:C}else m=o;o=zt();var g=o.queue,b=g.dispatch;return u!==o.memoizedState&&(ze.flags|=2048,mo(9,{destroy:void 0},k$.bind(null,g,u),null)),[m,b,a]}function k$(a,o){a.action=o}function iA(a){var o=zt(),u=st;if(u!==null)return aA(o,u,a);zt(),o=o.memoizedState,u=zt();var m=u.queue.dispatch;return u.memoizedState=a,[o,m,!1]}function mo(a,o,u,m){return a={tag:a,create:u,deps:m,inst:o,next:null},o=ze.updateQueue,o===null&&(o=Xd(),ze.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 sA(){return zt().memoizedState}function Qd(a,o,u,m){var g=vn();ze.flags|=a,g.memoizedState=mo(1|o,{destroy:void 0},u,m===void 0?null:m)}function Jd(a,o,u,m){var g=zt();m=m===void 0?null:m;var b=g.memoizedState.inst;st!==null&&m!==null&&Ax(m,st.memoizedState.deps)?g.memoizedState=mo(o,b,u,m):(ze.flags|=a,g.memoizedState=mo(1|o,b,u,m))}function oA(a,o){Qd(8390656,8,a,o)}function Dx(a,o){Jd(2048,8,a,o)}function C$(a){ze.flags|=4;var o=ze.updateQueue;if(o===null)o=Xd(),ze.updateQueue=o,o.events=[a];else{var u=o.events;u===null?o.events=[a]:u.push(a)}}function lA(a){var o=zt().memoizedState;return C$({ref:o,nextImpl:a}),function(){if((Je&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function cA(a,o){return Jd(4,2,a,o)}function uA(a,o){return Jd(4,4,a,o)}function dA(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 fA(a,o,u){u=u!=null?u.concat([a]):null,Jd(4,4,dA.bind(null,o,a),u)}function zx(){}function hA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;return o!==null&&Ax(o,m[1])?m[0]:(u.memoizedState=[a,o],a)}function mA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;if(o!==null&&Ax(o,m[1]))return m[0];if(m=a(),ns){Wa(!0);try{a()}finally{Wa(!1)}}return u.memoizedState=[m,o],m}function Lx(a,o,u){return u===void 0||(ya&1073741824)!==0&&(He&261930)===0?a.memoizedState=o:(a.memoizedState=u,a=p_(),ze.lanes|=a,ui|=a,u)}function pA(a,o,u,m){return In(u,o)?u:uo.current!==null?(a=Lx(a,u,m),In(a,o)||(Bt=!0),a):(ya&42)===0||(ya&1073741824)!==0&&(He&261930)===0?(Bt=!0,a.memoizedState=u):(a=p_(),ze.lanes|=a,ui|=a,o)}function xA(a,o,u,m,g){var b=G.p;G.p=b!==0&&8>b?b:8;var C=I.T,P={};I.T=P,Ix(a,!1,o,u);try{var U=g(),Q=I.S;if(Q!==null&&Q(P,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ne=_$(U,m);pc(a,o,ne,Gn(a))}else pc(a,o,m,Gn(a))}catch(oe){pc(a,o,{then:function(){},status:"rejected",reason:oe},Gn())}finally{G.p=b,C!==null&&P.types!==null&&(C.types=P.types),I.T=C}}function M$(){}function $x(a,o,u,m){if(a.tag!==5)throw Error(r(476));var g=yA(a).queue;xA(a,g,o,Z,u===null?M$:function(){return gA(a),u(m)})}function yA(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:Z},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:u},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function gA(a){var o=yA(a);o.next===null&&(o=a.alternate.memoizedState),pc(a,o.next.queue,{},Gn())}function Bx(){return sn(Mc)}function vA(){return zt().memoizedState}function bA(){return zt().memoizedState}function P$(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var u=Gn();a=ai(u);var m=ii(o,a,u);m!==null&&(Rn(m,o,u),uc(m,o,u)),o={cache:mx()},a.payload=o;return}o=o.return}}function R$(a,o,u){var m=Gn();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ef(a)?wA(o,u):(u=rx(a,o,u,m),u!==null&&(Rn(u,a,m),SA(u,o,m)))}function jA(a,o,u){var m=Gn();pc(a,o,u,m)}function pc(a,o,u,m){var g={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ef(a))wA(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,In(P,C))return Rd(a,o,g,0),ut===null&&Pd(),!1}catch{}finally{}if(u=rx(a,o,g,m),u!==null)return Rn(u,a,m),SA(u,o,m),!0}return!1}function Ix(a,o,u,m){if(m={lane:2,revertLane:gy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},ef(a)){if(o)throw Error(r(479))}else o=rx(a,u,m,2),o!==null&&Rn(o,a,2)}function ef(a){var o=a.alternate;return a===ze||o!==null&&o===ze}function wA(a,o){fo=Kd=!0;var u=a.pending;u===null?o.next=o:(o.next=u.next,u.next=o),a.pending=o}function SA(a,o,u){if((u&4194048)!==0){var m=o.lanes;m&=a.pendingLanes,u|=m,o.lanes=u,TN(a,u)}}var xc={readContext:sn,use:Wd,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt};xc.useEffectEvent=kt;var NA={readContext:sn,use:Wd,useCallback:function(a,o){return vn().memoizedState=[a,o===void 0?null:o],a},useContext:sn,useEffect:oA,useImperativeHandle:function(a,o,u){u=u!=null?u.concat([a]):null,Qd(4194308,4,dA.bind(null,o,a),u)},useLayoutEffect:function(a,o){return Qd(4194308,4,a,o)},useInsertionEffect:function(a,o){Qd(4,2,a,o)},useMemo:function(a,o){var u=vn();o=o===void 0?null:o;var m=a();if(ns){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(ns){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=R$.bind(null,ze,a),[m.memoizedState,a]},useRef:function(a){var o=vn();return a={current:a},o.memoizedState=a},useState:function(a){a=Px(a);var o=a.queue,u=jA.bind(null,ze,o);return o.dispatch=u,[a.memoizedState,u]},useDebugValue:zx,useDeferredValue:function(a,o){var u=vn();return Lx(u,a,o)},useTransition:function(){var a=Px(!1);return a=xA.bind(null,ze,a.queue,!0,!1),vn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,u){var m=ze,g=vn();if(Ye){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),ut===null)throw Error(r(349));(He&127)!==0||F2(m,o,u)}g.memoizedState=u;var b={value:u,getSnapshot:o};return g.queue=b,oA(K2.bind(null,m,b,a),[a]),m.flags|=2048,mo(9,{destroy:void 0},G2.bind(null,m,b,u,o),null),u},useId:function(){var a=vn(),o=ut.identifierPrefix;if(Ye){var u=Kr,m=Gr;u=(m&~(1<<32-Bn(m)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Yd++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=O$++,o="_"+o+"r_"+u.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:Bx,useFormState:nA,useActionState:nA,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=Ix.bind(null,ze,!0,u),u.dispatch=o,[a,o]},useMemoCache:kx,useCacheRefresh:function(){return vn().memoizedState=P$.bind(null,ze)},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)}}},qx={readContext:sn,use:Wd,useCallback:hA,useContext:sn,useEffect:Dx,useImperativeHandle:fA,useInsertionEffect:cA,useLayoutEffect:uA,useMemo:mA,useReducer:Zd,useRef:sA,useState:function(){return Zd(ga)},useDebugValue:zx,useDeferredValue:function(a,o){var u=zt();return pA(u,st.memoizedState,a,o)},useTransition:function(){var a=Zd(ga)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:mc(a),o]},useSyncExternalStore:H2,useId:vA,useHostTransitionStatus:Bx,useFormState:rA,useActionState:rA,useOptimistic:function(a,o){var u=zt();return W2(u,st,a,o)},useMemoCache:kx,useCacheRefresh:bA};qx.useEffectEvent=lA;var AA={readContext:sn,use:Wd,useCallback:hA,useContext:sn,useEffect:Dx,useImperativeHandle:fA,useInsertionEffect:cA,useLayoutEffect:uA,useMemo:mA,useReducer:Mx,useRef:sA,useState:function(){return Mx(ga)},useDebugValue:zx,useDeferredValue:function(a,o){var u=zt();return st===null?Lx(u,a,o):pA(u,st.memoizedState,a,o)},useTransition:function(){var a=Mx(ga)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:mc(a),o]},useSyncExternalStore:H2,useId:vA,useHostTransitionStatus:Bx,useFormState:iA,useActionState:iA,useOptimistic:function(a,o){var u=zt();return st!==null?W2(u,st,a,o):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:kx,useCacheRefresh:bA};AA.useEffectEvent=lA;function Ux(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 Vx={enqueueSetState:function(a,o,u){a=a._reactInternals;var m=Gn(),g=ai(m);g.payload=o,u!=null&&(g.callback=u),o=ii(a,g,m),o!==null&&(Rn(o,a,m),uc(o,a,m))},enqueueReplaceState:function(a,o,u){a=a._reactInternals;var m=Gn(),g=ai(m);g.tag=1,g.payload=o,u!=null&&(g.callback=u),o=ii(a,g,m),o!==null&&(Rn(o,a,m),uc(o,a,m))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var u=Gn(),m=ai(u);m.tag=2,o!=null&&(m.callback=o),o=ii(a,m,u),o!==null&&(Rn(o,a,u),uc(o,a,u))}};function _A(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?!nc(u,m)||!nc(g,b):!0}function OA(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&&Vx.enqueueReplaceState(o,o.state,null)}function rs(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 TA(a){Md(a)}function EA(a){console.error(a)}function kA(a){Md(a)}function tf(a,o){try{var u=a.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(m){setTimeout(function(){throw m})}}function CA(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 Hx(a,o,u){return u=ai(u),u.tag=3,u.payload={element:null},u.callback=function(){tf(a,o)},u}function MA(a){return a=ai(a),a.tag=3,a}function PA(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(){CA(o,u,m)}}var C=u.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(a.callback=function(){CA(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 D$(a,o,u,m,g){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(o=u.alternate,o!==null&&io(o,u,g,!0),u=Un.current,u!==null){switch(u.tag){case 31:case 13:return ur===null?mf():u.alternate===null&&Ct===0&&(Ct=3),u.flags&=-257,u.flags|=65536,u.lanes=g,m===Ud?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([m]):o.add(m),py(a,m,g)),!1;case 22:return u.flags|=65536,m===Ud?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)),py(a,m,g)),!1}throw Error(r(435,u.tag))}return py(a,m,g),mf(),!1}if(Ye)return o=Un.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=g,m!==cx&&(a=Error(r(422),{cause:m}),ic(sr(a,u)))):(m!==cx&&(o=Error(r(423),{cause:m}),ic(sr(o,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,m=sr(m,u),g=Hx(a.stateNode,m,g),bx(a,g),Ct!==4&&(Ct=2)),!1;var b=Error(r(520),{cause:m});if(b=sr(b,u),Nc===null?Nc=[b]:Nc.push(b),Ct!==4&&(Ct=2),o===null)return!0;m=sr(m,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=Hx(u.stateNode,m,a),bx(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=MA(g),PA(g,a,u,m),bx(u,g),!1}u=u.return}while(u!==null);return!1}var Fx=Error(r(461)),Bt=!1;function on(a,o,u,m){o.child=a===null?L2(o,null,u,m):ts(o,a.child,u,m)}function RA(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 Zi(o),m=_x(a,o,u,C,b,g),P=Ox(),a!==null&&!Bt?(Tx(a,o,g),va(a,o,g)):(Ye&&P&&ox(o),o.flags|=1,on(a,o,m,g),o.child)}function DA(a,o,u,m,g){if(a===null){var b=u.type;return typeof b=="function"&&!ax(b)&&b.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=b,zA(a,o,b,m,g)):(a=zd(u.type,null,m,o,o.mode,g),a.ref=o.ref,a.return=o,o.child=a)}if(b=a.child,!Jx(a,g)){var C=b.memoizedProps;if(u=u.compare,u=u!==null?u:nc,u(C,m)&&a.ref===o.ref)return va(a,o,g)}return o.flags|=1,a=ha(b,m),a.ref=o.ref,a.return=o,o.child=a}function zA(a,o,u,m,g){if(a!==null){var b=a.memoizedProps;if(nc(b,m)&&a.ref===o.ref)if(Bt=!1,o.pendingProps=m=b,Jx(a,g))(a.flags&131072)!==0&&(Bt=!0);else return o.lanes=a.lanes,va(a,o,g)}return Gx(a,o,u,m,g)}function LA(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 $A(a,o,b,u,m)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&Id(o,b!==null?b.cachePool:null),b!==null?I2(o,b):wx(),q2(o);else return m=o.lanes=536870912,$A(a,o,b!==null?b.baseLanes|u:u,u,m)}else b!==null?(Id(o,b.cachePool),I2(o,b),oi(),o.memoizedState=null):(a!==null&&Id(o,null),wx(),oi());return on(a,o,g,u),o.child}function yc(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function $A(a,o,u,m,g){var b=xx();return b=b===null?null:{parent:Lt._currentValue,pool:b},o.memoizedState={baseLanes:u,cachePool:b},a!==null&&Id(o,null),wx(),q2(o),a!==null&&io(a,o,m,!0),o.childLanes=g,null}function nf(a,o){return o=af({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function BA(a,o,u){return ts(o,a.child,null,u),a=nf(o,o.pendingProps),a.flags|=2,Vn(o),o.memoizedState=null,a}function z$(a,o,u){var m=o.pendingProps,g=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(Ye){if(m.mode==="hidden")return a=nf(o,m),o.lanes=536870912,yc(null,a);if(Nx(o),(a=vt)?(a=Z_(a,cr),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ja!==null?{id:Gr,overflow:Kr}:null,retryLane:536870912,hydrationErrors:null},u=w2(a),u.return=o,o.child=u,an=o,vt=null)):a=null,a===null)throw ti(o);return o.lanes=536870912,null}return nf(o,m)}var b=a.memoizedState;if(b!==null){var C=b.dehydrated;if(Nx(o),g)if(o.flags&256)o.flags&=-257,o=BA(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||io(a,o,u,!1),g=(u&a.childLanes)!==0,Bt||g){if(m=ut,m!==null&&(C=EN(m,u),C!==0&&C!==b.retryLane))throw b.retryLane=C,Ki(a,C),Rn(m,a,C),Fx;mf(),o=BA(a,o,u)}else a=b.treeContext,vt=dr(C.nextSibling),an=o,Ye=!0,ei=null,cr=!1,a!==null&&A2(o,a),o=nf(o,m),o.flags|=4096;return o}return a=ha(a.child,{mode:m.mode,children:m.children}),a.ref=o.ref,o.child=a,a.return=o,a}function rf(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 Gx(a,o,u,m,g){return Zi(o),u=_x(a,o,u,m,void 0,g),m=Ox(),a!==null&&!Bt?(Tx(a,o,g),va(a,o,g)):(Ye&&m&&ox(o),o.flags|=1,on(a,o,u,g),o.child)}function IA(a,o,u,m,g,b){return Zi(o),o.updateQueue=null,u=V2(o,m,u,g),U2(a),m=Ox(),a!==null&&!Bt?(Tx(a,o,b),va(a,o,b)):(Ye&&m&&ox(o),o.flags|=1,on(a,o,u,b),o.child)}function qA(a,o,u,m,g){if(Zi(o),o.stateNode===null){var b=to,C=u.contextType;typeof C=="object"&&C!==null&&(b=sn(C)),b=new u(m,b),o.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Vx,o.stateNode=b,b._reactInternals=o,b=o.stateNode,b.props=m,b.state=o.memoizedState,b.refs={},gx(o),C=u.contextType,b.context=typeof C=="object"&&C!==null?sn(C):to,b.state=o.memoizedState,C=u.getDerivedStateFromProps,typeof C=="function"&&(Ux(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&&Vx.enqueueReplaceState(b,b.state,null),fc(o,m,b,g),dc(),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308),m=!0}else if(a===null){b=o.stateNode;var P=o.memoizedProps,U=rs(u,P);b.props=U;var Q=b.context,ne=u.contextType;C=to,typeof ne=="object"&&ne!==null&&(C=sn(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||Q!==C)&&OA(o,b,m,C),ri=!1;var J=o.memoizedState;b.state=J,fc(o,m,b,g),dc(),Q=o.memoizedState,P||J!==Q||ri?(typeof oe=="function"&&(Ux(o,u,oe,m),Q=o.memoizedState),(U=ri||_A(o,u,U,m,J,Q,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=Q),b.props=m,b.state=Q,b.context=C,m=U):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),m=!1)}else{b=o.stateNode,vx(a,o),C=o.memoizedProps,ne=rs(u,C),b.props=ne,oe=o.pendingProps,J=b.context,Q=u.contextType,U=to,typeof Q=="object"&&Q!==null&&(U=sn(Q)),P=u.getDerivedStateFromProps,(Q=typeof P=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C!==oe||J!==U)&&OA(o,b,m,U),ri=!1,J=o.memoizedState,b.state=J,fc(o,m,b,g),dc();var ee=o.memoizedState;C!==oe||J!==ee||ri||a!==null&&a.dependencies!==null&&$d(a.dependencies)?(typeof P=="function"&&(Ux(o,u,P,m),ee=o.memoizedState),(ne=ri||_A(o,u,ne,m,J,ee,U)||a!==null&&a.dependencies!==null&&$d(a.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(m,ee,U),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(m,ee,U)),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=U,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,rf(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=ts(o,a.child,null,g),o.child=ts(o,null,u,g)):on(a,o,u,g),o.memoizedState=b.state,a=o.child):a=va(a,o,g),a}function UA(a,o,u,m){return Xi(),o.flags|=256,on(a,o,u,m),o.child}var Kx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yx(a){return{baseLanes:a,cachePool:C2()}}function Xx(a,o,u){return a=a!==null?a.childLanes&~u:0,o&&(a|=Fn),a}function VA(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(Ye){if(g?si(o):oi(),(a=vt)?(a=Z_(a,cr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ja!==null?{id:Gr,overflow:Kr}:null,retryLane:536870912,hydrationErrors:null},u=w2(a),u.return=o,o.child=u,an=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=af({mode:"hidden",children:P},g),m=Yi(m,g,u,null),P.return=o,m.return=o,P.sibling=m,o.child=P,m=o.child,m.memoizedState=Yx(u),m.childLanes=Xx(a,C,u),o.memoizedState=Kx,yc(null,m)):(si(o),Wx(o,P))}var U=a.memoizedState;if(U!==null&&(P=U.dehydrated,P!==null)){if(b)o.flags&256?(si(o),o.flags&=-257,o=Zx(a,o,u)):o.memoizedState!==null?(oi(),o.child=a.child,o.flags|=128,o=null):(oi(),P=m.fallback,g=o.mode,m=af({mode:"visible",children:m.children},g),P=Yi(P,g,u,null),P.flags|=2,m.return=o,P.return=o,m.sibling=P,o.child=m,ts(o,a.child,null,u),m=o.child,m.memoizedState=Yx(u),m.childLanes=Xx(a,C,u),o.memoizedState=Kx,o=yc(null,m));else if(si(o),Cy(P)){if(C=P.nextSibling&&P.nextSibling.dataset,C)var Q=C.dgst;C=Q,m=Error(r(419)),m.stack="",m.digest=C,ic({value:m,source:null,stack:null}),o=Zx(a,o,u)}else if(Bt||io(a,o,u,!1),C=(u&a.childLanes)!==0,Bt||C){if(C=ut,C!==null&&(m=EN(C,u),m!==0&&m!==U.retryLane))throw U.retryLane=m,Ki(a,m),Rn(C,a,m),Fx;ky(P)||mf(),o=Zx(a,o,u)}else ky(P)?(o.flags|=192,o.child=a.child,o=null):(a=U.treeContext,vt=dr(P.nextSibling),an=o,Ye=!0,ei=null,cr=!1,a!==null&&A2(o,a),o=Wx(o,m.children),o.flags|=4096);return o}return g?(oi(),P=m.fallback,g=o.mode,U=a.child,Q=U.sibling,m=ha(U,{mode:"hidden",children:m.children}),m.subtreeFlags=U.subtreeFlags&65011712,Q!==null?P=ha(Q,P):(P=Yi(P,g,u,null),P.flags|=2),P.return=o,m.return=o,m.sibling=P,o.child=m,yc(null,m),m=o.child,P=a.child.memoizedState,P===null?P=Yx(u):(g=P.cachePool,g!==null?(U=Lt._currentValue,g=g.parent!==U?{parent:U,pool:U}:g):g=C2(),P={baseLanes:P.baseLanes|u,cachePool:g}),m.memoizedState=P,m.childLanes=Xx(a,C,u),o.memoizedState=Kx,yc(a.child,m)):(si(o),u=a.child,a=u.sibling,u=ha(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 Wx(a,o){return o=af({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function af(a,o){return a=qn(22,a,null,o),a.lanes=0,a}function Zx(a,o,u){return ts(o,a.child,null,u),a=Wx(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function HA(a,o,u){a.lanes|=o;var m=a.alternate;m!==null&&(m.lanes|=o),fx(a.return,o,u)}function Qx(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 FA(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),on(a,o,m,u),m=Ye?ac:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&HA(a,u,o);else if(a.tag===19)HA(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&&Gd(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),Qx(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&&Gd(a)===null){o.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}Qx(o,!0,u,null,b,m);break;case"together":Qx(o,!1,null,null,void 0,m);break;default:o.memoizedState=null}return o.child}function va(a,o,u){if(a!==null&&(o.dependencies=a.dependencies),ui|=o.lanes,(u&o.childLanes)===0)if(a!==null){if(io(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=ha(a,a.pendingProps),o.child=u,u.return=o;a.sibling!==null;)a=a.sibling,u=u.sibling=ha(a,a.pendingProps),u.return=o;u.sibling=null}return o.child}function Jx(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&$d(a)))}function L$(a,o,u){switch(o.tag){case 3:et(o,o.stateNode.containerInfo),ni(o,Lt,a.memoizedState.cache),Xi();break;case 27:case 5:Te(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,Nx(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?VA(a,o,u):(si(o),a=va(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||(io(a,o,u,!1),m=(u&o.childLanes)!==0),g){if(m)return FA(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,LA(a,o,u,o.pendingProps);case 24:ni(o,Lt,a.memoizedState.cache)}return va(a,o,u)}function GA(a,o,u){if(a!==null)if(a.memoizedProps!==o.pendingProps)Bt=!0;else{if(!Jx(a,u)&&(o.flags&128)===0)return Bt=!1,L$(a,o,u);Bt=(a.flags&131072)!==0}else Bt=!1,Ye&&(o.flags&1048576)!==0&&N2(o,ac,o.index);switch(o.lanes=0,o.tag){case 16:e:{var m=o.pendingProps;if(a=Ji(o.elementType),o.type=a,typeof a=="function")ax(a)?(m=rs(a,m),o.tag=1,o=qA(null,o,a,m,u)):(o.tag=0,o=Gx(null,o,a,m,u));else{if(a!=null){var g=a.$$typeof;if(g===T){o.tag=11,o=RA(null,o,a,m,u);break e}else if(g===M){o.tag=14,o=DA(null,o,a,m,u);break e}}throw o=F(a)||a,Error(r(306,o,""))}}return o;case 0:return Gx(a,o,o.type,o.pendingProps,u);case 1:return m=o.type,g=rs(m,o.pendingProps),qA(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,vx(a,o),fc(o,m,null,u);var C=o.memoizedState;if(m=C.cache,ni(o,Lt,m),m!==b.cache&&hx(o,[Lt],u,!0),dc(),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=UA(a,o,m,u);break e}else if(m!==g){g=sr(Error(r(424)),o),ic(g),o=UA(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=dr(a.firstChild),an=o,Ye=!0,ei=null,cr=!0,u=L2(o,null,m,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Xi(),m===g){o=va(a,o,u);break e}on(a,o,m,u)}o=o.child}return o;case 26:return rf(a,o),a===null?(u=rO(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ye||(u=o.type,a=o.pendingProps,m=jf(Se.current).createElement(u),m[rn]=o,m[Tn]=a,ln(m,u,a),Qt(m),o.stateNode=m):o.memoizedState=rO(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return Te(o),a===null&&Ye&&(m=o.stateNode=eO(o.type,o.pendingProps,Se.current),an=o,cr=!0,g=vt,pi(o.type)?(My=g,vt=dr(m.firstChild)):vt=g),on(a,o,o.pendingProps.children,u),rf(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&Ye&&((g=m=vt)&&(m=hB(m,o.type,o.pendingProps,cr),m!==null?(o.stateNode=m,an=o,vt=dr(m.firstChild),cr=!1,g=!0):g=!1),g||ti(o)),Te(o),g=o.type,b=o.pendingProps,C=a!==null?a.memoizedProps:null,m=b.children,Oy(g,b)?m=null:C!==null&&Oy(g,C)&&(o.flags|=32),o.memoizedState!==null&&(g=_x(a,o,T$,null,null,u),Mc._currentValue=g),rf(a,o),on(a,o,m,u),o.child;case 6:return a===null&&Ye&&((a=u=vt)&&(u=mB(u,o.pendingProps,cr),u!==null?(o.stateNode=u,an=o,vt=null,a=!0):a=!1),a||ti(o)),null;case 13:return VA(a,o,u);case 4:return et(o,o.stateNode.containerInfo),m=o.pendingProps,a===null?o.child=ts(o,null,m,u):on(a,o,m,u),o.child;case 11:return RA(a,o,o.type,o.pendingProps,u);case 7:return on(a,o,o.pendingProps,u),o.child;case 8:return on(a,o,o.pendingProps.children,u),o.child;case 12:return on(a,o,o.pendingProps.children,u),o.child;case 10:return m=o.pendingProps,ni(o,o.type,m.value),on(a,o,m.children,u),o.child;case 9:return g=o.type._context,m=o.pendingProps.children,Zi(o),g=sn(g),m=m(g),o.flags|=1,on(a,o,m,u),o.child;case 14:return DA(a,o,o.type,o.pendingProps,u);case 15:return zA(a,o,o.type,o.pendingProps,u);case 19:return FA(a,o,u);case 31:return z$(a,o,u);case 22:return LA(a,o,u,o.pendingProps);case 24:return Zi(o),m=sn(Lt),a===null?(g=xx(),g===null&&(g=ut,b=mx(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),o.memoizedState={parent:m,cache:g},gx(o),ni(o,Lt,g)):((a.lanes&u)!==0&&(vx(a,o),fc(o,null,null,u),dc()),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&&hx(o,[Lt],u,!0))),on(a,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function ba(a){a.flags|=4}function ey(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(v_())a.flags|=8192;else throw es=Ud,yx}else a.flags&=-16777217}function KA(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!lO(o))if(v_())a.flags|=8192;else throw es=Ud,yx}function sf(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?_N():536870912,a.lanes|=o,go|=o)}function gc(a,o){if(!Ye)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 $$(a,o,u){var m=o.pendingProps;switch(lx(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),xa(Lt),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(ao(o)?ba(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,ux())),bt(o),null;case 26:var g=o.type,b=o.memoizedState;return a===null?(ba(o),b!==null?(bt(o),KA(o,b)):(bt(o),ey(o,g,null,m,u))):b?b!==a.memoizedState?(ba(o),bt(o),KA(o,b)):(bt(o),o.flags&=-16777217):(a=a.memoizedProps,a!==m&&ba(o),bt(o),ey(o,g,a,m,u)),null;case 27:if(Pe(o),u=Se.current,g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&ba(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}a=fe.current,ao(o)?_2(o):(a=eO(g,m,u),o.stateNode=a,ba(o))}return bt(o),null;case 5:if(Pe(o),g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&ba(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}if(b=fe.current,ao(o))_2(o);else{var C=jf(Se.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[rn]=o,b[Tn]=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(ln(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&&ba(o)}}return bt(o),ey(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,u),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==m&&ba(o);else{if(typeof m!="string"&&o.stateNode===null)throw Error(r(166));if(a=Se.current,ao(o)){if(a=o.stateNode,u=o.memoizedProps,m=null,g=an,g!==null)switch(g.tag){case 27:case 5:m=g.memoizedProps}a[rn]=o,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||V_(a.nodeValue,u)),a||ti(o,!0)}else a=jf(a).createTextNode(m),a[rn]=o,o.stateNode=a}return bt(o),null;case 31:if(u=o.memoizedState,a===null||a.memoizedState!==null){if(m=ao(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[rn]=o}else Xi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),a=!1}else u=ux(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return o.flags&256?(Vn(o),o):(Vn(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=ao(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[rn]=o}else Xi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),g=!1}else g=ux(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return o.flags&256?(Vn(o),o):(Vn(o),null)}return Vn(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),sf(o,o.updateQueue),bt(o),null);case 4:return de(),a===null&&wy(o.stateNode.containerInfo),bt(o),null;case 10:return xa(o.type),bt(o),null;case 19:if(Y(Dt),m=o.memoizedState,m===null)return bt(o),null;if(g=(o.flags&128)!==0,b=m.rendering,b===null)if(g)gc(m,!1);else{if(Ct!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(b=Gd(a),b!==null){for(o.flags|=128,gc(m,!1),a=b.updateQueue,o.updateQueue=a,sf(o,a),o.subtreeFlags=0,a=u,u=o.child;u!==null;)j2(u,a),u=u.sibling;return ae(Dt,Dt.current&1|2),Ye&&ma(o,m.treeForkCount),o.child}a=a.sibling}m.tail!==null&&mn()>df&&(o.flags|=128,g=!0,gc(m,!1),o.lanes=4194304)}else{if(!g)if(a=Gd(b),a!==null){if(o.flags|=128,g=!0,a=a.updateQueue,o.updateQueue=a,sf(o,a),gc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!Ye)return bt(o),null}else 2*mn()-m.renderingStartTime>df&&u!==536870912&&(o.flags|=128,g=!0,gc(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=mn(),a.sibling=null,u=Dt.current,ae(Dt,g?u&1|2:u&1),Ye&&ma(o,m.treeForkCount),a):(bt(o),null);case 22:case 23:return Vn(o),Sx(),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&&sf(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&&Y(Qi),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),xa(Lt),bt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function B$(a,o){switch(lx(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return xa(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 Pe(o),null;case 31:if(o.memoizedState!==null){if(Vn(o),o.alternate===null)throw Error(r(340));Xi()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(Vn(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Xi()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return Y(Dt),null;case 4:return de(),null;case 10:return xa(o.type),null;case 22:case 23:return Vn(o),Sx(),a!==null&&Y(Qi),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return xa(Lt),null;case 25:return null;default:return null}}function YA(a,o){switch(lx(o),o.tag){case 3:xa(Lt),de();break;case 26:case 27:case 5:Pe(o);break;case 4:de();break;case 31:o.memoizedState!==null&&Vn(o);break;case 13:Vn(o);break;case 19:Y(Dt);break;case 10:xa(o.type);break;case 22:case 23:Vn(o),Sx(),a!==null&&Y(Qi);break;case 24:xa(Lt)}}function vc(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 U=u,Q=P;try{Q()}catch(ne){at(g,U,ne)}}}m=m.next}while(m!==b)}}catch(ne){at(o,o.return,ne)}}function XA(a){var o=a.updateQueue;if(o!==null){var u=a.stateNode;try{B2(o,u)}catch(m){at(a,a.return,m)}}}function WA(a,o,u){u.props=rs(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){at(a,o,m)}}function bc(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 Yr(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 ZA(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 ty(a,o,u){try{var m=a.stateNode;oB(m,a.type,u,o),m[Tn]=o}catch(g){at(a,a.return,g)}}function QA(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&pi(a.type)||a.tag===4}function ny(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||QA(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 ry(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=da));else if(m!==4&&(m===27&&pi(a.type)&&(u=a.stateNode,o=null),a=a.child,a!==null))for(ry(a,o,u),a=a.sibling;a!==null;)ry(a,o,u),a=a.sibling}function of(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(of(a,o,u),a=a.sibling;a!==null;)of(a,o,u),a=a.sibling}function JA(a){var o=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,g=o.attributes;g.length;)o.removeAttributeNode(g[0]);ln(o,m,u),o[rn]=a,o[Tn]=u}catch(b){at(a,a.return,b)}}var ja=!1,It=!1,ay=!1,e_=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function I$(a,o){if(a=a.containerInfo,Ay=Tf,a=f2(a),Zp(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,U=-1,Q=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||(U=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&&++Q===g&&(P=C),J===b&&++ne===m&&(U=C),(ee=oe.nextSibling)!==null)break;oe=J,J=oe.parentNode}oe=ee}u=P===-1||U===-1?null:{start:P,end:U}}else u=null}u=u||{start:0,end:0}}else u=null;for(_y={focusedElem:a,selectionRange:u},Tf=!1,Jt=o;Jt!==null;)if(o=Jt,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,Jt=a;else for(;Jt!==null;){switch(o=Jt,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=rs(u.type,g);a=m.getSnapshotBeforeUpdate(pe,b),m.__reactInternalSnapshotBeforeUpdate=a}catch(Ne){at(u,u.return,Ne)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,u=a.nodeType,u===9)Ey(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Ey(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,Jt=a;break}Jt=o.return}}function t_(a,o,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Sa(a,u),m&4&&vc(5,u);break;case 1:if(Sa(a,u),m&4)if(a=u.stateNode,o===null)try{a.componentDidMount()}catch(C){at(u,u.return,C)}else{var g=rs(u.type,o.memoizedProps);o=o.memoizedState;try{a.componentDidUpdate(g,o,a.__reactInternalSnapshotBeforeUpdate)}catch(C){at(u,u.return,C)}}m&64&&XA(u),m&512&&bc(u,u.return);break;case 3:if(Sa(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{B2(a,o)}catch(C){at(u,u.return,C)}}break;case 27:o===null&&m&4&&JA(u);case 26:case 5:Sa(a,u),o===null&&m&4&&ZA(u),m&512&&bc(u,u.return);break;case 12:Sa(a,u);break;case 31:Sa(a,u),m&4&&a_(a,u);break;case 13:Sa(a,u),m&4&&i_(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=X$.bind(null,u),pB(a,u))));break;case 22:if(m=u.memoizedState!==null||ja,!m){o=o!==null&&o.memoizedState!==null||It,g=ja;var b=It;ja=m,(It=o)&&!b?Na(a,u,(u.subtreeFlags&8772)!==0):Sa(a,u),ja=g,It=b}break;case 30:break;default:Sa(a,u)}}function n_(a){var o=a.alternate;o!==null&&(a.alternate=null,n_(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&Rp(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 At=null,kn=!1;function wa(a,o,u){for(u=u.child;u!==null;)r_(a,o,u),u=u.sibling}function r_(a,o,u){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(Hl,u)}catch{}switch(u.tag){case 26:It||Yr(u,o),wa(a,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:It||Yr(u,o);var m=At,g=kn;pi(u.type)&&(At=u.stateNode,kn=!1),wa(a,o,u),Ec(u.stateNode),At=m,kn=g;break;case 5:It||Yr(u,o);case 6:if(m=At,g=kn,At=null,wa(a,o,u),At=m,kn=g,At!==null)if(kn)try{(At.nodeType===9?At.body:At.nodeName==="HTML"?At.ownerDocument.body:At).removeChild(u.stateNode)}catch(b){at(u,o,b)}else try{At.removeChild(u.stateNode)}catch(b){at(u,o,b)}break;case 18:At!==null&&(kn?(a=At,X_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),_o(a)):X_(At,u.stateNode));break;case 4:m=At,g=kn,At=u.stateNode.containerInfo,kn=!0,wa(a,o,u),At=m,kn=g;break;case 0:case 11:case 14:case 15:li(2,u,o),It||li(4,u,o),wa(a,o,u);break;case 1:It||(Yr(u,o),m=u.stateNode,typeof m.componentWillUnmount=="function"&&WA(u,o,m)),wa(a,o,u);break;case 21:wa(a,o,u);break;case 22:It=(m=It)||u.memoizedState!==null,wa(a,o,u),It=m;break;default:wa(a,o,u)}}function a_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{_o(a)}catch(u){at(o,o.return,u)}}}function i_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{_o(a)}catch(u){at(o,o.return,u)}}function q$(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new e_),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new e_),o;default:throw Error(r(435,a.tag))}}function lf(a,o){var u=q$(a);o.forEach(function(m){if(!u.has(m)){u.add(m);var g=W$.bind(null,a,m);m.then(g,g)}})}function Cn(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)){At=P.stateNode,kn=!1;break e}break;case 5:At=P.stateNode,kn=!1;break e;case 3:case 4:At=P.stateNode.containerInfo,kn=!0;break e}P=P.return}if(At===null)throw Error(r(160));r_(b,C,g),At=null,kn=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)s_(o,a),o=o.sibling}var kr=null;function s_(a,o){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Cn(o,a),Mn(a),m&4&&(li(3,a,a.return),vc(3,a),li(5,a,a.return));break;case 1:Cn(o,a),Mn(a),m&512&&(It||u===null||Yr(u,u.return)),m&64&&ja&&(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=kr;if(Cn(o,a),Mn(a),m&512&&(It||u===null||Yr(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[Kl]||b[rn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(m),g.head.insertBefore(b,g.querySelector("head > title"))),ln(b,m,u),b[rn]=a,Qt(b),m=b;break e;case"link":var C=sO("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),ln(b,m,u),g.head.appendChild(b);break;case"meta":if(C=sO("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),ln(b,m,u),g.head.appendChild(b);break;default:throw Error(r(468,m))}b[rn]=a,Qt(b),m=b}a.stateNode=m}else oO(g,a.type,a.stateNode);else a.stateNode=iO(g,m,a.memoizedProps);else b!==m?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,m===null?oO(g,a.type,a.stateNode):iO(g,m,a.memoizedProps)):m===null&&a.stateNode!==null&&ty(a,a.memoizedProps,u.memoizedProps)}break;case 27:Cn(o,a),Mn(a),m&512&&(It||u===null||Yr(u,u.return)),u!==null&&m&4&&ty(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Cn(o,a),Mn(a),m&512&&(It||u===null||Yr(u,u.return)),a.flags&32){g=a.stateNode;try{Ys(g,"")}catch(pe){at(a,a.return,pe)}}m&4&&a.stateNode!=null&&(g=a.memoizedProps,ty(a,g,u!==null?u.memoizedProps:g)),m&1024&&(ay=!0);break;case 6:if(Cn(o,a),Mn(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(Nf=null,g=kr,kr=wf(o.containerInfo),Cn(o,a),kr=g,Mn(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{_o(o.containerInfo)}catch(pe){at(a,a.return,pe)}ay&&(ay=!1,o_(a));break;case 4:m=kr,kr=wf(a.stateNode.containerInfo),Cn(o,a),Mn(a),kr=m;break;case 12:Cn(o,a),Mn(a);break;case 31:Cn(o,a),Mn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,lf(a,m)));break;case 13:Cn(o,a),Mn(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(uf=mn()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,lf(a,m)));break;case 22:g=a.memoizedState!==null;var U=u!==null&&u.memoizedState!==null,Q=ja,ne=It;if(ja=Q||g,It=ne||U,Cn(o,a),It=ne,ja=Q,Mn(a),m&8192)e:for(o=a.stateNode,o._visibility=g?o._visibility&-2:o._visibility|1,g&&(u===null||U||ja||It||as(a)),u=null,o=a;;){if(o.tag===5||o.tag===26){if(u===null){U=u=o;try{if(b=U.stateNode,g)C=b.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{P=U.stateNode;var oe=U.memoizedProps.style,J=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;P.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(pe){at(U,U.return,pe)}}}else if(o.tag===6){if(u===null){U=o;try{U.stateNode.nodeValue=g?"":U.memoizedProps}catch(pe){at(U,U.return,pe)}}}else if(o.tag===18){if(u===null){U=o;try{var ee=U.stateNode;g?W_(ee,!0):W_(U.stateNode,!1)}catch(pe){at(U,U.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,lf(a,u))));break;case 19:Cn(o,a),Mn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,lf(a,m)));break;case 30:break;case 21:break;default:Cn(o,a),Mn(a)}}function Mn(a){var o=a.flags;if(o&2){try{for(var u,m=a.return;m!==null;){if(QA(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,b=ny(a);of(a,b,g);break;case 5:var C=u.stateNode;u.flags&32&&(Ys(C,""),u.flags&=-33);var P=ny(a);of(a,P,C);break;case 3:case 4:var U=u.stateNode.containerInfo,Q=ny(a);ry(a,Q,U);break;default:throw Error(r(161))}}catch(ne){at(a,a.return,ne)}a.flags&=-3}o&4096&&(a.flags&=-4097)}function o_(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;o_(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function Sa(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)t_(a,o.alternate,o),o=o.sibling}function as(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),as(o);break;case 1:Yr(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&WA(o,o.return,u),as(o);break;case 27:Ec(o.stateNode);case 26:case 5:Yr(o,o.return),as(o);break;case 22:o.memoizedState===null&&as(o);break;case 30:as(o);break;default:as(o)}a=a.sibling}}function Na(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:Na(g,b,u),vc(4,b);break;case 1:if(Na(g,b,u),m=b,g=m.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Q){at(m,m.return,Q)}if(m=b,g=m.updateQueue,g!==null){var P=m.stateNode;try{var U=g.shared.hiddenCallbacks;if(U!==null)for(g.shared.hiddenCallbacks=null,g=0;g<U.length;g++)$2(U[g],P)}catch(Q){at(m,m.return,Q)}}u&&C&64&&XA(b),bc(b,b.return);break;case 27:JA(b);case 26:case 5:Na(g,b,u),u&&m===null&&C&4&&ZA(b),bc(b,b.return);break;case 12:Na(g,b,u);break;case 31:Na(g,b,u),u&&C&4&&a_(g,b);break;case 13:Na(g,b,u),u&&C&4&&i_(g,b);break;case 22:b.memoizedState===null&&Na(g,b,u),bc(b,b.return);break;case 30:break;default:Na(g,b,u)}o=o.sibling}}function iy(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&&sc(u))}function sy(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&sc(a))}function Cr(a,o,u,m){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)l_(a,o,u,m),o=o.sibling}function l_(a,o,u,m){var g=o.flags;switch(o.tag){case 0:case 11:case 15:Cr(a,o,u,m),g&2048&&vc(9,o);break;case 1:Cr(a,o,u,m);break;case 3:Cr(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&&sc(a)));break;case 12:if(g&2048){Cr(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(U){at(o,o.return,U)}}else Cr(a,o,u,m);break;case 31:Cr(a,o,u,m);break;case 13:Cr(a,o,u,m);break;case 23:break;case 22:b=o.stateNode,C=o.alternate,o.memoizedState!==null?b._visibility&2?Cr(a,o,u,m):jc(a,o):b._visibility&2?Cr(a,o,u,m):(b._visibility|=2,po(a,o,u,m,(o.subtreeFlags&10256)!==0||!1)),g&2048&&iy(C,o);break;case 24:Cr(a,o,u,m),g&2048&&sy(o.alternate,o);break;default:Cr(a,o,u,m)}}function po(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,U=m,Q=C.flags;switch(C.tag){case 0:case 11:case 15:po(b,C,P,U,g),vc(8,C);break;case 23:break;case 22:var ne=C.stateNode;C.memoizedState!==null?ne._visibility&2?po(b,C,P,U,g):jc(b,C):(ne._visibility|=2,po(b,C,P,U,g)),g&&Q&2048&&iy(C.alternate,C);break;case 24:po(b,C,P,U,g),g&&Q&2048&&sy(C.alternate,C);break;default:po(b,C,P,U,g)}o=o.sibling}}function jc(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:jc(u,m),g&2048&&iy(m.alternate,m);break;case 24:jc(u,m),g&2048&&sy(m.alternate,m);break;default:jc(u,m)}o=o.sibling}}var wc=8192;function xo(a,o,u){if(a.subtreeFlags&wc)for(a=a.child;a!==null;)c_(a,o,u),a=a.sibling}function c_(a,o,u){switch(a.tag){case 26:xo(a,o,u),a.flags&wc&&a.memoizedState!==null&&OB(u,kr,a.memoizedState,a.memoizedProps);break;case 5:xo(a,o,u);break;case 3:case 4:var m=kr;kr=wf(a.stateNode.containerInfo),xo(a,o,u),kr=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=wc,wc=16777216,xo(a,o,u),wc=m):xo(a,o,u));break;default:xo(a,o,u)}}function u_(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 Sc(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];Jt=m,f_(m,a)}u_(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)d_(a),a=a.sibling}function d_(a){switch(a.tag){case 0:case 11:case 15:Sc(a),a.flags&2048&&li(9,a,a.return);break;case 3:Sc(a);break;case 12:Sc(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,cf(a)):Sc(a);break;default:Sc(a)}}function cf(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];Jt=m,f_(m,a)}u_(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:li(8,o,o.return),cf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,cf(o));break;default:cf(o)}a=a.sibling}}function f_(a,o){for(;Jt!==null;){var u=Jt;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:sc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Jt=m;else e:for(u=a;Jt!==null;){m=Jt;var g=m.sibling,b=m.return;if(n_(m),m===u){Jt=null;break e}if(g!==null){g.return=b,Jt=g;break e}Jt=b}}}var U$={getCacheForType:function(a){var o=sn(Lt),u=o.data.get(a);return u===void 0&&(u=a(),o.data.set(a,u)),u},cacheSignal:function(){return sn(Lt).controller.signal}},V$=typeof WeakMap=="function"?WeakMap:Map,Je=0,ut=null,Ue=null,He=0,rt=0,Hn=null,ci=!1,yo=!1,oy=!1,Aa=0,Ct=0,ui=0,is=0,ly=0,Fn=0,go=0,Nc=null,Pn=null,cy=!1,uf=0,h_=0,df=1/0,ff=null,di=null,Ht=0,fi=null,vo=null,_a=0,uy=0,dy=null,m_=null,Ac=0,fy=null;function Gn(){return(Je&2)!==0&&He!==0?He&-He:I.T!==null?gy():kN()}function p_(){if(Fn===0)if((He&536870912)===0||Ye){var a=vd;vd<<=1,(vd&3932160)===0&&(vd=262144),Fn=a}else Fn=536870912;return a=Un.current,a!==null&&(a.flags|=32),Fn}function Rn(a,o,u){(a===ut&&(rt===2||rt===9)||a.cancelPendingCommit!==null)&&(bo(a,0),hi(a,He,Fn,!1)),Gl(a,u),((Je&2)===0||a!==ut)&&(a===ut&&((Je&2)===0&&(is|=u),Ct===4&&hi(a,He,Fn,!1)),Xr(a))}function x_(a,o,u){if((Je&6)!==0)throw Error(r(327));var m=!u&&(o&127)===0&&(o&a.expiredLanes)===0||Fl(a,o),g=m?G$(a,o):my(a,o,!0),b=m;do{if(g===0){yo&&!m&&hi(a,o,0,!1);break}else{if(u=a.current.alternate,b&&!H$(u)){g=my(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=Nc;var U=P.current.memoizedState.isDehydrated;if(U&&(bo(P,C).flags|=256),C=my(P,C,!1),C!==2){if(oy&&!U){P.errorRecoveryDisabledLanes|=b,is|=b,g=4;break e}b=Pn,Pn=g,b!==null&&(Pn===null?Pn=b:Pn.push.apply(Pn,b))}g=C}if(b=!1,g!==2)continue}}if(g===1){bo(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,Fn,!ci);break e;case 2:Pn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(g=uf+300-mn(),10<g)){if(hi(m,o,Fn,!ci),jd(m,0,!0)!==0)break e;_a=o,m.timeoutHandle=K_(y_.bind(null,m,u,Pn,ff,cy,o,Fn,is,go,ci,b,"Throttled",-0,0),g);break e}y_(m,u,Pn,ff,cy,o,Fn,is,go,ci,b,null,-0,0)}}break}while(!0);Xr(a)}function y_(a,o,u,m,g,b,C,P,U,Q,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:da},c_(o,b,oe);var pe=(b&62914560)===b?uf-mn():(b&4194048)===b?h_-mn():0;if(pe=TB(oe,pe),pe!==null){_a=b,a.cancelPendingCommit=pe(A_.bind(null,a,o,b,u,m,g,C,P,U,ne,oe,null,J,ee)),hi(a,b,C,!Q);return}}A_(a,o,b,u,m,g,C,P,U)}function H$(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(!In(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&=~ly,o&=~is,a.suspendedLanes|=o,a.pingedLanes&=~o,m&&(a.warmLanes|=o),m=a.expirationTimes;for(var g=o;0<g;){var b=31-Bn(g),C=1<<b;m[b]=-1,g&=~C}u!==0&&ON(a,u,o)}function hf(){return(Je&6)===0?(_c(0),!1):!0}function hy(){if(Ue!==null){if(rt===0)var a=Ue.return;else a=Ue,pa=Wi=null,Ex(a),co=null,lc=0,a=Ue;for(;a!==null;)YA(a.alternate,a),a=a.return;Ue=null}}function bo(a,o){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,uB(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),_a=0,hy(),ut=a,Ue=u=ha(a.current,null),He=o,rt=0,Hn=null,ci=!1,yo=Fl(a,o),oy=!1,go=Fn=ly=is=ui=Ct=0,Pn=Nc=null,cy=!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-Bn(m),b=1<<g;o|=a[g],m&=~b}return Aa=o,Pd(),u}function g_(a,o){ze=null,I.H=xc,o===lo||o===qd?(o=R2(),rt=3):o===yx?(o=R2(),rt=4):rt=o===Fx?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Hn=o,Ue===null&&(Ct=1,tf(a,sr(o,a.current)))}function v_(){var a=Un.current;return a===null?!0:(He&4194048)===He?ur===null:(He&62914560)===He||(He&536870912)!==0?a===ur:!1}function b_(){var a=I.H;return I.H=xc,a===null?xc:a}function j_(){var a=I.A;return I.A=U$,a}function mf(){Ct=4,ci||(He&4194048)!==He&&Un.current!==null||(yo=!0),(ui&134217727)===0&&(is&134217727)===0||ut===null||hi(ut,He,Fn,!1)}function my(a,o,u){var m=Je;Je|=2;var g=b_(),b=j_();(ut!==a||He!==o)&&(ff=null,bo(a,o)),o=!1;var C=Ct;e:do try{if(rt!==0&&Ue!==null){var P=Ue,U=Hn;switch(rt){case 8:hy(),C=6;break e;case 3:case 2:case 9:case 6:Un.current===null&&(o=!0);var Q=rt;if(rt=0,Hn=null,jo(a,P,U,Q),u&&yo){C=0;break e}break;default:Q=rt,rt=0,Hn=null,jo(a,P,U,Q)}}F$(),C=Ct;break}catch(ne){g_(a,ne)}while(!0);return o&&a.shellSuspendCounter++,pa=Wi=null,Je=m,I.H=g,I.A=b,Ue===null&&(ut=null,He=0,Pd()),C}function F$(){for(;Ue!==null;)w_(Ue)}function G$(a,o){var u=Je;Je|=2;var m=b_(),g=j_();ut!==a||He!==o?(ff=null,df=mn()+500,bo(a,o)):yo=Fl(a,o);e:do try{if(rt!==0&&Ue!==null){o=Ue;var b=Hn;t:switch(rt){case 1:rt=0,Hn=null,jo(a,o,b,1);break;case 2:case 9:if(M2(b)){rt=0,Hn=null,S_(o);break}o=function(){rt!==2&&rt!==9||ut!==a||(rt=7),Xr(a)},b.then(o,o);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:M2(b)?(rt=0,Hn=null,S_(o)):(rt=0,Hn=null,jo(a,o,b,7));break;case 5:var C=null;switch(Ue.tag){case 26:C=Ue.memoizedState;case 5:case 27:var P=Ue;if(C?lO(C):P.stateNode.complete){rt=0,Hn=null;var U=P.sibling;if(U!==null)Ue=U;else{var Q=P.return;Q!==null?(Ue=Q,pf(Q)):Ue=null}break t}}rt=0,Hn=null,jo(a,o,b,5);break;case 6:rt=0,Hn=null,jo(a,o,b,6);break;case 8:hy(),Ct=6;break e;default:throw Error(r(462))}}K$();break}catch(ne){g_(a,ne)}while(!0);return pa=Wi=null,I.H=m,I.A=g,Je=u,Ue!==null?0:(ut=null,He=0,Pd(),Ct)}function K$(){for(;Ue!==null&&!ca();)w_(Ue)}function w_(a){var o=GA(a.alternate,a,Aa);a.memoizedProps=a.pendingProps,o===null?pf(a):Ue=o}function S_(a){var o=a,u=o.alternate;switch(o.tag){case 15:case 0:o=IA(u,o,o.pendingProps,o.type,void 0,He);break;case 11:o=IA(u,o,o.pendingProps,o.type.render,o.ref,He);break;case 5:Ex(o);default:YA(u,o),o=Ue=j2(o,Aa),o=GA(u,o,Aa)}a.memoizedProps=a.pendingProps,o===null?pf(a):Ue=o}function jo(a,o,u,m){pa=Wi=null,Ex(o),co=null,lc=0;var g=o.return;try{if(D$(a,g,o,u,He)){Ct=1,tf(a,sr(u,a.current)),Ue=null;return}}catch(b){if(g!==null)throw Ue=g,b;Ct=1,tf(a,sr(u,a.current)),Ue=null;return}o.flags&32768?(Ye||m===1?a=!0:yo||(He&536870912)!==0?a=!1:(ci=a=!0,(m===2||m===9||m===3||m===6)&&(m=Un.current,m!==null&&m.tag===13&&(m.flags|=16384))),N_(o,a)):pf(o)}function pf(a){var o=a;do{if((o.flags&32768)!==0){N_(o,ci);return}a=o.return;var u=$$(o.alternate,o,Aa);if(u!==null){Ue=u;return}if(o=o.sibling,o!==null){Ue=o;return}Ue=o=a}while(o!==null);Ct===0&&(Ct=5)}function N_(a,o){do{var u=B$(a.alternate,a);if(u!==null){u.flags&=32767,Ue=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(a=a.sibling,a!==null)){Ue=a;return}Ue=a=u}while(a!==null);Ct=6,Ue=null}function A_(a,o,u,m,g,b,C,P,U){a.cancelPendingCommit=null;do xf();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|=nx,_8(a,u,b,C,P,U),a===ut&&(Ue=ut=null,He=0),vo=o,fi=a,_a=u,uy=b,dy=g,m_=m,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Z$(yd,function(){return k_(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||m){m=I.T,I.T=null,g=G.p,G.p=2,C=Je,Je|=4;try{I$(a,o,u)}finally{Je=C,G.p=g,I.T=m}}Ht=1,__(),O_(),T_()}}function __(){if(Ht===1){Ht=0;var a=fi,o=vo,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=I.T,I.T=null;var m=G.p;G.p=2;var g=Je;Je|=4;try{s_(o,a);var b=_y,C=f2(a.containerInfo),P=b.focusedElem,U=b.selectionRange;if(C!==P&&P&&P.ownerDocument&&d2(P.ownerDocument.documentElement,P)){if(U!==null&&Zp(P)){var Q=U.start,ne=U.end;if(ne===void 0&&(ne=Q),"selectionStart"in P)P.selectionStart=Q,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,Ne=Math.min(U.start,pe),lt=U.end===void 0?Ne:Math.min(U.end,pe);!ee.extend&&Ne>lt&&(C=lt,lt=Ne,Ne=C);var X=u2(P,Ne),K=u2(P,lt);if(X&&K&&(ee.rangeCount!==1||ee.anchorNode!==X.node||ee.anchorOffset!==X.offset||ee.focusNode!==K.node||ee.focusOffset!==K.offset)){var W=oe.createRange();W.setStart(X.node,X.offset),ee.removeAllRanges(),Ne>lt?(ee.addRange(W),ee.extend(K.node,K.offset)):(W.setEnd(K.node,K.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}}Tf=!!Ay,_y=Ay=null}finally{Je=g,G.p=m,I.T=u}}a.current=o,Ht=2}}function O_(){if(Ht===2){Ht=0;var a=fi,o=vo,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=I.T,I.T=null;var m=G.p;G.p=2;var g=Je;Je|=4;try{t_(a,o.alternate,o)}finally{Je=g,G.p=m,I.T=u}}Ht=3}}function T_(){if(Ht===4||Ht===3){Ht=0,Vl();var a=fi,o=vo,u=_a,m=m_;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Ht=5:(Ht=0,vo=fi=null,E_(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(di=null),Mp(u),o=o.stateNode,$n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(Hl,o,void 0,(o.current.flags&128)===128)}catch{}if(m!==null){o=I.T,g=G.p,G.p=2,I.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{I.T=o,G.p=g}}(_a&3)!==0&&xf(),Xr(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===fy?Ac++:(Ac=0,fy=a):Ac=0,_c(0)}}function E_(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,sc(o)))}function xf(){return __(),O_(),T_(),k_()}function k_(){if(Ht!==5)return!1;var a=fi,o=uy;uy=0;var u=Mp(_a),m=I.T,g=G.p;try{G.p=32>u?32:u,I.T=null,u=dy,dy=null;var b=fi,C=_a;if(Ht=0,vo=fi=null,_a=0,(Je&6)!==0)throw Error(r(331));var P=Je;if(Je|=4,d_(b.current),l_(b,b.current,C,u),Je=P,_c(0,!1),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(Hl,b)}catch{}return!0}finally{G.p=g,I.T=m,E_(a,o)}}function C_(a,o,u){o=sr(u,o),o=Hx(a.stateNode,o,2),a=ii(a,o,2),a!==null&&(Gl(a,2),Xr(a))}function at(a,o,u){if(a.tag===3)C_(a,a,u);else for(;o!==null;){if(o.tag===3){C_(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=sr(u,a),u=MA(2),m=ii(o,u,2),m!==null&&(PA(u,m,o,a),Gl(m,2),Xr(m));break}}o=o.return}}function py(a,o,u){var m=a.pingCache;if(m===null){m=a.pingCache=new V$;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)||(oy=!0,g.add(u),a=Y$.bind(null,a,o,u),o.then(a,a))}function Y$(a,o,u){var m=a.pingCache;m!==null&&m.delete(o),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,ut===a&&(He&u)===u&&(Ct===4||Ct===3&&(He&62914560)===He&&300>mn()-uf?(Je&2)===0&&bo(a,0):ly|=u,go===He&&(go=0)),Xr(a)}function M_(a,o){o===0&&(o=_N()),a=Ki(a,o),a!==null&&(Gl(a,o),Xr(a))}function X$(a){var o=a.memoizedState,u=0;o!==null&&(u=o.retryLane),M_(a,u)}function W$(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),M_(a,u)}function Z$(a,o){return Xa(a,o)}var yf=null,wo=null,xy=!1,gf=!1,yy=!1,mi=0;function Xr(a){a!==wo&&a.next===null&&(wo===null?yf=wo=a:wo=wo.next=a),gf=!0,xy||(xy=!0,J$())}function _c(a,o){if(!yy&&gf){yy=!0;do for(var u=!1,m=yf;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-Bn(42|a)+1)-1,b&=g&~(C&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,z_(m,b))}else b=He,b=jd(m,m===ut?b:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(b&3)===0||Fl(m,b)||(u=!0,z_(m,b));m=m.next}while(u);yy=!1}}function Q$(){P_()}function P_(){gf=xy=!1;var a=0;mi!==0&&cB()&&(a=mi);for(var o=mn(),u=null,m=yf;m!==null;){var g=m.next,b=R_(m,o);b===0?(m.next=null,u===null?yf=g:u.next=g,g===null&&(wo=u)):(u=m,(a!==0||(b&3)!==0)&&(gf=!0)),m=g}Ht!==0&&Ht!==5||_c(a),mi!==0&&(mi=0)}function R_(a,o){for(var u=a.suspendedLanes,m=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var C=31-Bn(b),P=1<<C,U=g[C];U===-1?((P&u)===0||(P&m)!==0)&&(g[C]=A8(P,o)):U<=o&&(a.expiredLanes|=P),b&=~P}if(o=ut,u=He,u=jd(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&&Tr(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Fl(a,u)){if(o=u&-u,o===a.callbackPriority)return o;switch(m!==null&&Tr(m),Mp(u)){case 2:case 8:u=NN;break;case 32:u=yd;break;case 268435456:u=AN;break;default:u=yd}return m=D_.bind(null,a),u=Xa(u,m),a.callbackPriority=o,a.callbackNode=u,o}return m!==null&&m!==null&&Tr(m),a.callbackPriority=2,a.callbackNode=null,2}function D_(a,o){if(Ht!==0&&Ht!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(xf()&&a.callbackNode!==u)return null;var m=He;return m=jd(a,a===ut?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(x_(a,m,o),R_(a,mn()),a.callbackNode!=null&&a.callbackNode===u?D_.bind(null,a):null)}function z_(a,o){if(xf())return null;x_(a,o,!0)}function J$(){dB(function(){(Je&6)!==0?Xa(SN,Q$):P_()})}function gy(){if(mi===0){var a=so;a===0&&(a=gd,gd<<=1,(gd&261888)===0&&(gd=256)),mi=a}return mi}function L_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Ad(""+a)}function $_(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 eB(a,o,u,m,g){if(o==="submit"&&u&&u.stateNode===g){var b=L_((g[Tn]||null).action),C=m.submitter;C&&(o=(o=C[Tn]||null)?L_(o.formAction):C.getAttribute("formAction"),o!==null&&(b=o,C=null));var P=new Ed("action","action",null,m,g);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(mi!==0){var U=C?$_(g,C):new FormData(g);$x(u,{pending:!0,data:U,method:g.method,action:b},null,U)}}else typeof b=="function"&&(P.preventDefault(),U=C?$_(g,C):new FormData(g),$x(u,{pending:!0,data:U,method:g.method,action:b},b,U))},currentTarget:g}]})}}for(var vy=0;vy<tx.length;vy++){var by=tx[vy],tB=by.toLowerCase(),nB=by[0].toUpperCase()+by.slice(1);Er(tB,"on"+nB)}Er(p2,"onAnimationEnd"),Er(x2,"onAnimationIteration"),Er(y2,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(g$,"onTransitionRun"),Er(v$,"onTransitionStart"),Er(b$,"onTransitionCancel"),Er(g2,"onTransitionEnd"),Gs("onMouseEnter",["mouseout","mouseover"]),Gs("onMouseLeave",["mouseout","mouseover"]),Gs("onPointerEnter",["pointerout","pointerover"]),Gs("onPointerLeave",["pointerout","pointerover"]),Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oc="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(" "),rB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oc));function B_(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],U=P.instance,Q=P.currentTarget;if(P=P.listener,U!==b&&g.isPropagationStopped())break e;b=P,g.currentTarget=Q;try{b(g)}catch(ne){Md(ne)}g.currentTarget=null,b=U}else for(C=0;C<m.length;C++){if(P=m[C],U=P.instance,Q=P.currentTarget,P=P.listener,U!==b&&g.isPropagationStopped())break e;b=P,g.currentTarget=Q;try{b(g)}catch(ne){Md(ne)}g.currentTarget=null,b=U}}}}function Ve(a,o){var u=o[Pp];u===void 0&&(u=o[Pp]=new Set);var m=a+"__bubble";u.has(m)||(I_(o,a,2,!1),u.add(m))}function jy(a,o,u){var m=0;o&&(m|=4),I_(u,a,m,o)}var vf="_reactListening"+Math.random().toString(36).slice(2);function wy(a){if(!a[vf]){a[vf]=!0,PN.forEach(function(u){u!=="selectionchange"&&(rB.has(u)||jy(u,!1,a),jy(u,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[vf]||(o[vf]=!0,jy("selectionchange",!1,o))}}function I_(a,o,u,m){switch(pO(o)){case 2:var g=CB;break;case 8:g=MB;break;default:g=Ly}u=g.bind(null,o,u,a),g=void 0,!Up||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 Sy(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 U=C.tag;if((U===3||U===4)&&C.stateNode.containerInfo===g)return;C=C.return}for(;P!==null;){if(C=Vs(P),C===null)return;if(U=C.tag,U===5||U===6||U===26||U===27){m=b=C;continue e}P=P.parentNode}}m=m.return}FN(function(){var Q=b,ne=Ip(u),oe=[];e:{var J=v2.get(a);if(J!==void 0){var ee=Ed,pe=a;switch(a){case"keypress":if(Od(u)===0)break e;case"keydown":case"keyup":ee=W8;break;case"focusin":pe="focus",ee=Gp;break;case"focusout":pe="blur",ee=Gp;break;case"beforeblur":case"afterblur":ee=Gp;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=YN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=$8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=J8;break;case p2:case x2:case y2:ee=q8;break;case g2:ee=t$;break;case"scroll":case"scrollend":ee=z8;break;case"wheel":ee=r$;break;case"copy":case"cut":case"paste":ee=V8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=WN;break;case"toggle":case"beforetoggle":ee=i$}var Ne=(o&4)!==0,lt=!Ne&&(a==="scroll"||a==="scrollend"),X=Ne?J!==null?J+"Capture":null:J;Ne=[];for(var K=Q,W;K!==null;){var se=K;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||X===null||(se=Xl(K,X),se!=null&&Ne.push(Tc(K,se,W))),lt)break;K=K.return}0<Ne.length&&(J=new ee(J,pe,null,u,ne),oe.push({event:J,listeners:Ne}))}}if((o&7)===0){e:{if(J=a==="mouseover"||a==="pointerover",ee=a==="mouseout"||a==="pointerout",J&&u!==Bp&&(pe=u.relatedTarget||u.fromElement)&&(Vs(pe)||pe[Us]))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=Q,pe=pe?Vs(pe):null,pe!==null&&(lt=l(pe),Ne=pe.tag,pe!==lt||Ne!==5&&Ne!==27&&Ne!==6)&&(pe=null)):(ee=null,pe=Q),ee!==pe)){if(Ne=YN,se="onMouseLeave",X="onMouseEnter",K="mouse",(a==="pointerout"||a==="pointerover")&&(Ne=WN,se="onPointerLeave",X="onPointerEnter",K="pointer"),lt=ee==null?J:Yl(ee),W=pe==null?J:Yl(pe),J=new Ne(se,K+"leave",ee,u,ne),J.target=lt,J.relatedTarget=W,se=null,Vs(ne)===Q&&(Ne=new Ne(X,K+"enter",pe,u,ne),Ne.target=W,Ne.relatedTarget=lt,se=Ne),lt=se,ee&&pe)t:{for(Ne=aB,X=ee,K=pe,W=0,se=X;se;se=Ne(se))W++;se=0;for(var ve=K;ve;ve=Ne(ve))se++;for(;0<W-se;)X=Ne(X),W--;for(;0<se-W;)K=Ne(K),se--;for(;W--;){if(X===K||K!==null&&X===K.alternate){Ne=X;break t}X=Ne(X),K=Ne(K)}Ne=null}else Ne=null;ee!==null&&q_(oe,J,ee,Ne,!1),pe!==null&&lt!==null&&q_(oe,lt,pe,Ne,!0)}}e:{if(J=Q?Yl(Q):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var Xe=a2;else if(n2(J))if(i2)Xe=p$;else{Xe=h$;var ge=f$}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&$p(Q.elementType)&&(Xe=a2):Xe=m$;if(Xe&&(Xe=Xe(a,Q))){r2(oe,Xe,u,ne);break e}ge&&ge(a,J,Q),a==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&Lp(J,"number",J.value)}switch(ge=Q?Yl(Q):window,a){case"focusin":(n2(ge)||ge.contentEditable==="true")&&(Qs=ge,Qp=Q,rc=null);break;case"focusout":rc=Qp=Qs=null;break;case"mousedown":Jp=!0;break;case"contextmenu":case"mouseup":case"dragend":Jp=!1,h2(oe,u,ne);break;case"selectionchange":if(y$)break;case"keydown":case"keyup":h2(oe,u,ne)}var Be;if(Yp)e:{switch(a){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Zs?e2(a,u)&&(Fe="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Fe="onCompositionStart");Fe&&(ZN&&u.locale!=="ko"&&(Zs||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Zs&&(Be=GN()):(Qa=ne,Vp="value"in Qa?Qa.value:Qa.textContent,Zs=!0)),ge=bf(Q,Fe),0<ge.length&&(Fe=new XN(Fe,a,null,u,ne),oe.push({event:Fe,listeners:ge}),Be?Fe.data=Be:(Be=t2(u),Be!==null&&(Fe.data=Be)))),(Be=o$?l$(a,u):c$(a,u))&&(Fe=bf(Q,"onBeforeInput"),0<Fe.length&&(ge=new XN("onBeforeInput","beforeinput",null,u,ne),oe.push({event:ge,listeners:Fe}),ge.data=Be)),eB(oe,a,Q,u,ne)}B_(oe,o)})}function Tc(a,o,u){return{instance:a,listener:o,currentTarget:u}}function bf(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=Xl(a,u),g!=null&&m.unshift(Tc(a,g,b)),g=Xl(a,o),g!=null&&m.push(Tc(a,g,b))),a.tag===3)return m;a=a.return}return[]}function aB(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function q_(a,o,u,m,g){for(var b=o._reactName,C=[];u!==null&&u!==m;){var P=u,U=P.alternate,Q=P.stateNode;if(P=P.tag,U!==null&&U===m)break;P!==5&&P!==26&&P!==27||Q===null||(U=Q,g?(Q=Xl(u,b),Q!=null&&C.unshift(Tc(u,Q,U))):g||(Q=Xl(u,b),Q!=null&&C.push(Tc(u,Q,U)))),u=u.return}C.length!==0&&a.push({event:o,listeners:C})}var iB=/\r\n?/g,sB=/\u0000|\uFFFD/g;function U_(a){return(typeof a=="string"?a:""+a).replace(iB,`
`).replace(sB,"")}function V_(a,o){return o=U_(o),U_(a)===o}function ot(a,o,u,m,g,b){switch(u){case"children":typeof m=="string"?o==="body"||o==="textarea"&&m===""||Ys(a,m):(typeof m=="number"||typeof m=="bigint")&&o!=="body"&&Ys(a,""+m);break;case"className":Sd(a,"class",m);break;case"tabIndex":Sd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Sd(a,u,m);break;case"style":VN(a,m,b);break;case"data":if(o!=="object"){Sd(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=Ad(""+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"&&ot(a,o,"name",g.name,g,null),ot(a,o,"formEncType",g.formEncType,g,null),ot(a,o,"formMethod",g.formMethod,g,null),ot(a,o,"formTarget",g.formTarget,g,null)):(ot(a,o,"encType",g.encType,g,null),ot(a,o,"method",g.method,g,null),ot(a,o,"target",g.target,g,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Ad(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=da);break;case"onScroll":m!=null&&Ve("scroll",a);break;case"onScrollEnd":m!=null&&Ve("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=Ad(""+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":Ve("beforetoggle",a),Ve("toggle",a),wd(a,"popover",m);break;case"xlinkActuate":ua(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ua(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ua(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ua(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ua(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ua(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ua(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ua(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ua(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":wd(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=R8.get(u)||u,wd(a,u,m))}}function Ny(a,o,u,m,g,b){switch(u){case"style":VN(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"?Ys(a,m):(typeof m=="number"||typeof m=="bigint")&&Ys(a,""+m);break;case"onScroll":m!=null&&Ve("scroll",a);break;case"onScrollEnd":m!=null&&Ve("scrollend",a);break;case"onClick":m!=null&&(a.onclick=da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!RN.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[Tn]||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,""):wd(a,u,m)}}}function ln(a,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",a),Ve("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:ot(a,o,b,C,u,null)}}g&&ot(a,o,"srcSet",u.srcSet,u,null),m&&ot(a,o,"src",u.src,u,null);return;case"input":Ve("invalid",a);var P=b=C=g=null,U=null,Q=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":U=ne;break;case"defaultChecked":Q=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:ot(a,o,m,ne,u,null)}}BN(a,b,P,U,Q,C,g,!1);return;case"select":Ve("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:ot(a,o,g,P,u,null)}o=b,u=C,a.multiple=!!m,o!=null?Ks(a,!!m,o,!1):u!=null&&Ks(a,!!m,u,!0);return;case"textarea":Ve("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:ot(a,o,C,P,u,null)}qN(a,m,g,b);return;case"option":for(U in u)if(u.hasOwnProperty(U)&&(m=u[U],m!=null))switch(U){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:ot(a,o,U,m,u,null)}return;case"dialog":Ve("beforetoggle",a),Ve("toggle",a),Ve("cancel",a),Ve("close",a);break;case"iframe":case"object":Ve("load",a);break;case"video":case"audio":for(m=0;m<Oc.length;m++)Ve(Oc[m],a);break;case"image":Ve("error",a),Ve("load",a);break;case"details":Ve("toggle",a);break;case"embed":case"source":case"link":Ve("error",a),Ve("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(Q in u)if(u.hasOwnProperty(Q)&&(m=u[Q],m!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:ot(a,o,Q,m,u,null)}return;default:if($p(o)){for(ne in u)u.hasOwnProperty(ne)&&(m=u[ne],m!==void 0&&Ny(a,o,ne,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&ot(a,o,P,m,u,null))}function oB(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,U=null,Q=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":U=oe;default:m.hasOwnProperty(ee)||ot(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":Q=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&&ot(a,o,J,ee,m,oe)}}zp(a,C,P,U,Q,ne,b,g);return;case"select":ee=C=P=J=null;for(b in u)if(U=u[b],u.hasOwnProperty(b)&&U!=null)switch(b){case"value":break;case"multiple":ee=U;default:m.hasOwnProperty(b)||ot(a,o,b,null,m,U)}for(g in m)if(b=m[g],U=u[g],m.hasOwnProperty(g)&&(b!=null||U!=null))switch(g){case"value":J=b;break;case"defaultValue":P=b;break;case"multiple":C=b;default:b!==U&&ot(a,o,g,b,m,U)}o=P,u=C,m=ee,J!=null?Ks(a,!!u,J,!1):!!m!=!!u&&(o!=null?Ks(a,!!u,o,!0):Ks(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:ot(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&&ot(a,o,C,g,m,b)}IN(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:ot(a,o,pe,null,m,J)}for(U in m)if(J=m[U],ee=u[U],m.hasOwnProperty(U)&&J!==ee&&(J!=null||ee!=null))switch(U){case"selected":a.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:ot(a,o,U,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 Ne in u)J=u[Ne],u.hasOwnProperty(Ne)&&J!=null&&!m.hasOwnProperty(Ne)&&ot(a,o,Ne,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"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,o));break;default:ot(a,o,Q,J,m,ee)}return;default:if($p(o)){for(var lt in u)J=u[lt],u.hasOwnProperty(lt)&&J!==void 0&&!m.hasOwnProperty(lt)&&Ny(a,o,lt,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||Ny(a,o,ne,J,m,ee);return}}for(var X in u)J=u[X],u.hasOwnProperty(X)&&J!=null&&!m.hasOwnProperty(X)&&ot(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||ot(a,o,oe,J,m,ee)}function H_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lB(){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&&H_(C)){for(C=0,P=g.responseEnd,m+=1;m<u.length;m++){var U=u[m],Q=U.startTime;if(Q>P)break;var ne=U.transferSize,oe=U.initiatorType;ne&&H_(oe)&&(U=U.responseEnd,C+=ne*(U<P?1:(P-Q)/(U-Q)))}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 Ay=null,_y=null;function jf(a){return a.nodeType===9?a:a.ownerDocument}function F_(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 G_(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 Oy(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 Ty=null;function cB(){var a=window.event;return a&&a.type==="popstate"?a===Ty?!1:(Ty=a,!0):(Ty=null,!1)}var K_=typeof setTimeout=="function"?setTimeout:void 0,uB=typeof clearTimeout=="function"?clearTimeout:void 0,Y_=typeof Promise=="function"?Promise:void 0,dB=typeof queueMicrotask=="function"?queueMicrotask:typeof Y_<"u"?function(a){return Y_.resolve(null).then(a).catch(fB)}:K_;function fB(a){setTimeout(function(){throw a})}function pi(a){return a==="head"}function X_(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),_o(o);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Ec(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Ec(u);for(var b=u.firstChild;b;){var C=b.nextSibling,P=b.nodeName;b[Kl]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=C}}else u==="body"&&Ec(a.ownerDocument.body);u=g}while(u);_o(o)}function W_(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 Ey(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":Ey(u),Rp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function hB(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[Kl])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=dr(a.nextSibling),a===null)break}return null}function mB(a,o,u){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=dr(a.nextSibling),a===null))return null;return a}function Z_(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=dr(a.nextSibling),a===null))return null;return a}function ky(a){return a.data==="$?"||a.data==="$~"}function Cy(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function pB(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 dr(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 Q_(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(o===0)return dr(a.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}a=a.nextSibling}return null}function J_(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 eO(a,o,u){switch(o=jf(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 Ec(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);Rp(a)}var fr=new Map,tO=new Set;function wf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Oa=G.d;G.d={f:xB,r:yB,D:gB,C:vB,L:bB,m:jB,X:SB,S:wB,M:NB};function xB(){var a=Oa.f(),o=hf();return a||o}function yB(a){var o=Hs(a);o!==null&&o.tag===5&&o.type==="form"?gA(o):Oa.r(a)}var So=typeof document>"u"?null:document;function nO(a,o,u){var m=So;if(m&&typeof o=="string"&&o){var g=ar(o);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),tO.has(g)||(tO.add(g),a={rel:a,crossOrigin:u,href:o},m.querySelector(g)===null&&(o=m.createElement("link"),ln(o,"link",a),Qt(o),m.head.appendChild(o)))}}function gB(a){Oa.D(a),nO("dns-prefetch",a,null)}function vB(a,o){Oa.C(a,o),nO("preconnect",a,o)}function bB(a,o,u){Oa.L(a,o,u);var m=So;if(m&&a&&o){var g='link[rel="preload"][as="'+ar(o)+'"]';o==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+ar(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+ar(u.imageSizes)+'"]')):g+='[href="'+ar(a)+'"]';var b=g;switch(o){case"style":b=No(a);break;case"script":b=Ao(a)}fr.has(b)||(a=x({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:a,as:o},u),fr.set(b,a),m.querySelector(g)!==null||o==="style"&&m.querySelector(kc(b))||o==="script"&&m.querySelector(Cc(b))||(o=m.createElement("link"),ln(o,"link",a),Qt(o),m.head.appendChild(o)))}}function jB(a,o){Oa.m(a,o);var u=So;if(u&&a){var m=o&&typeof o.as=="string"?o.as:"script",g='link[rel="modulepreload"][as="'+ar(m)+'"][href="'+ar(a)+'"]',b=g;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Ao(a)}if(!fr.has(b)&&(a=x({rel:"modulepreload",href:a},o),fr.set(b,a),u.querySelector(g)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Cc(b)))return}m=u.createElement("link"),ln(m,"link",a),Qt(m),u.head.appendChild(m)}}}function wB(a,o,u){Oa.S(a,o,u);var m=So;if(m&&a){var g=Fs(m).hoistableStyles,b=No(a);o=o||"default";var C=g.get(b);if(!C){var P={loading:0,preload:null};if(C=m.querySelector(kc(b)))P.loading=5;else{a=x({rel:"stylesheet",href:a,"data-precedence":o},u),(u=fr.get(b))&&Py(a,u);var U=C=m.createElement("link");Qt(U),ln(U,"link",a),U._p=new Promise(function(Q,ne){U.onload=Q,U.onerror=ne}),U.addEventListener("load",function(){P.loading|=1}),U.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Sf(C,o,m)}C={type:"stylesheet",instance:C,count:1,state:P},g.set(b,C)}}}function SB(a,o){Oa.X(a,o);var u=So;if(u&&a){var m=Fs(u).hoistableScripts,g=Ao(a),b=m.get(g);b||(b=u.querySelector(Cc(g)),b||(a=x({src:a,async:!0},o),(o=fr.get(g))&&Ry(a,o),b=u.createElement("script"),Qt(b),ln(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function NB(a,o){Oa.M(a,o);var u=So;if(u&&a){var m=Fs(u).hoistableScripts,g=Ao(a),b=m.get(g);b||(b=u.querySelector(Cc(g)),b||(a=x({src:a,async:!0,type:"module"},o),(o=fr.get(g))&&Ry(a,o),b=u.createElement("script"),Qt(b),ln(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function rO(a,o,u,m){var g=(g=Se.current)?wf(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=No(u.href),u=Fs(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=No(u.href);var b=Fs(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(kc(a)))&&!b._p&&(C.instance=b,C.state.loading=5),fr.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},fr.set(a,u),b||AB(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=Ao(u),u=Fs(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 No(a){return'href="'+ar(a)+'"'}function kc(a){return'link[rel="stylesheet"]['+a+"]"}function aO(a){return x({},a,{"data-precedence":a.precedence,precedence:null})}function AB(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}),ln(o,"link",u),Qt(o),a.head.appendChild(o))}function Ao(a){return'[src="'+ar(a)+'"]'}function Cc(a){return"script[async]"+a}function iO(a,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var m=a.querySelector('style[data-href~="'+ar(u.href)+'"]');if(m)return o.instance=m,Qt(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"),Qt(m),ln(m,"style",g),Sf(m,u.precedence,a),o.instance=m;case"stylesheet":g=No(u.href);var b=a.querySelector(kc(g));if(b)return o.state.loading|=4,o.instance=b,Qt(b),b;m=aO(u),(g=fr.get(g))&&Py(m,g),b=(a.ownerDocument||a).createElement("link"),Qt(b);var C=b;return C._p=new Promise(function(P,U){C.onload=P,C.onerror=U}),ln(b,"link",m),o.state.loading|=4,Sf(b,u.precedence,a),o.instance=b;case"script":return b=Ao(u.src),(g=a.querySelector(Cc(b)))?(o.instance=g,Qt(g),g):(m=u,(g=fr.get(b))&&(m=x({},u),Ry(m,g)),a=a.ownerDocument||a,g=a.createElement("script"),Qt(g),ln(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,Sf(m,u.precedence,a));return o.instance}function Sf(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 Py(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function Ry(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var Nf=null;function sO(a,o,u){if(Nf===null){var m=new Map,g=Nf=new Map;g.set(u,m)}else g=Nf,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[Kl]||b[rn]||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 oO(a,o,u){a=a.ownerDocument||a,a.head.insertBefore(u,o==="title"?a.querySelector("head > title"):null)}function _B(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 lO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function OB(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=No(m.href),b=o.querySelector(kc(g));if(b){o=b._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=Af.bind(a),o.then(a,a)),u.state.loading|=4,u.instance=b,Qt(b);return}b=o.ownerDocument||o,m=aO(m),(g=fr.get(g))&&Py(m,g),b=b.createElement("link"),Qt(b);var C=b;C._p=new Promise(function(P,U){C.onload=P,C.onerror=U}),ln(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=Af.bind(a),o.addEventListener("load",u),o.addEventListener("error",u))}}var Dy=0;function TB(a,o){return a.stylesheets&&a.count===0&&Of(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Of(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+o);0<a.imgBytes&&Dy===0&&(Dy=62500*lB());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Of(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>Dy?50:800)+o);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(g)}}:null}function Af(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Of(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var _f=null;function Of(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,_f=new Map,o.forEach(EB,a),_f=null,Af.call(a))}function EB(a,o){if(!(o.state.loading&4)){var u=_f.get(a);if(u)var m=u.get(null);else{u=new Map,_f.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=Af.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 Mc={$$typeof:_,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function kB(a,o,u,m,g,b,C,P,U){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=kp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kp(0),this.hiddenUpdates=kp(null),this.identifierPrefix=m,this.onUncaughtError=g,this.onCaughtError=b,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function cO(a,o,u,m,g,b,C,P,U,Q,ne,oe){return a=new kB(a,o,u,C,U,Q,ne,oe,P),o=1,b===!0&&(o|=24),b=qn(3,null,null,o),a.current=b,b.stateNode=a,o=mx(),o.refCount++,a.pooledCache=o,o.refCount++,b.memoizedState={element:m,isDehydrated:u,cache:o},gx(b),a}function uO(a){return a?(a=to,a):to}function dO(a,o,u,m,g,b){g=uO(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&&(Rn(u,a,o),uc(u,a,o))}function fO(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<o?u:o}}function zy(a,o){fO(a,o),(a=a.alternate)&&fO(a,o)}function hO(a){if(a.tag===13||a.tag===31){var o=Ki(a,67108864);o!==null&&Rn(o,a,67108864),zy(a,67108864)}}function mO(a){if(a.tag===13||a.tag===31){var o=Gn();o=Cp(o);var u=Ki(a,o);u!==null&&Rn(u,a,o),zy(a,o)}}var Tf=!0;function CB(a,o,u,m){var g=I.T;I.T=null;var b=G.p;try{G.p=2,Ly(a,o,u,m)}finally{G.p=b,I.T=g}}function MB(a,o,u,m){var g=I.T;I.T=null;var b=G.p;try{G.p=8,Ly(a,o,u,m)}finally{G.p=b,I.T=g}}function Ly(a,o,u,m){if(Tf){var g=$y(m);if(g===null)Sy(a,o,m,Ef,u),xO(a,m);else if(RB(g,a,o,u,m))m.stopPropagation();else if(xO(a,m),o&4&&-1<PB.indexOf(a)){for(;g!==null;){var b=Hs(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var C=Ui(b.pendingLanes);if(C!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;C;){var U=1<<31-Bn(C);P.entanglements[1]|=U,C&=~U}Xr(b),(Je&6)===0&&(df=mn()+500,_c(0))}}break;case 31:case 13:P=Ki(b,2),P!==null&&Rn(P,b,2),hf(),zy(b,2)}if(b=$y(m),b===null&&Sy(a,o,m,Ef,u),b===g)break;g=b}g!==null&&m.stopPropagation()}else Sy(a,o,m,null,u)}}function $y(a){return a=Ip(a),By(a)}var Ef=null;function By(a){if(Ef=null,a=Vs(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 Ef=a,null}function pO(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(xd()){case SN:return 2;case NN:return 8;case yd:case v8:return 32;case AN:return 268435456;default:return 32}default:return 32}}var Iy=!1,xi=null,yi=null,gi=null,Pc=new Map,Rc=new Map,vi=[],PB="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 xO(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":Pc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rc.delete(o.pointerId)}}function Dc(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=Hs(o),o!==null&&hO(o)),a):(a.eventSystemFlags|=m,o=a.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),a)}function RB(a,o,u,m,g){switch(o){case"focusin":return xi=Dc(xi,a,o,u,m,g),!0;case"dragenter":return yi=Dc(yi,a,o,u,m,g),!0;case"mouseover":return gi=Dc(gi,a,o,u,m,g),!0;case"pointerover":var b=g.pointerId;return Pc.set(b,Dc(Pc.get(b)||null,a,o,u,m,g)),!0;case"gotpointercapture":return b=g.pointerId,Rc.set(b,Dc(Rc.get(b)||null,a,o,u,m,g)),!0}return!1}function yO(a){var o=Vs(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,CN(a.priority,function(){mO(u)});return}}else if(o===31){if(o=d(u),o!==null){a.blockedOn=o,CN(a.priority,function(){mO(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 kf(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var u=$y(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);Bp=m,u.target.dispatchEvent(m),Bp=null}else return o=Hs(u),o!==null&&hO(o),a.blockedOn=u,!1;o.shift()}return!0}function gO(a,o,u){kf(a)&&u.delete(o)}function DB(){Iy=!1,xi!==null&&kf(xi)&&(xi=null),yi!==null&&kf(yi)&&(yi=null),gi!==null&&kf(gi)&&(gi=null),Pc.forEach(gO),Rc.forEach(gO)}function Cf(a,o){a.blockedOn===o&&(a.blockedOn=null,Iy||(Iy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,DB)))}var Mf=null;function vO(a){Mf!==a&&(Mf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Mf===a&&(Mf=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(By(m||u)===null)continue;break}var b=Hs(u);b!==null&&(a.splice(o,3),o-=3,$x(b,{pending:!0,data:g,method:u.method,action:m},m,g))}}))}function _o(a){function o(U){return Cf(U,a)}xi!==null&&Cf(xi,a),yi!==null&&Cf(yi,a),gi!==null&&Cf(gi,a),Pc.forEach(o),Rc.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);)yO(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[Tn]||null;if(typeof b=="function")C||vO(u);else if(C){var P=null;if(b&&b.hasAttribute("formAction")){if(g=b,C=b[Tn]||null)P=C.formAction;else if(By(g)!==null)continue}else P=C.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),vO(u)}}}function bO(){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 qy(a){this._internalRoot=a}Pf.prototype.render=qy.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,m=Gn();dO(u,m,a,o,null,null)},Pf.prototype.unmount=qy.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;dO(a.current,2,null,a,null,null),hf(),o[Us]=null}};function Pf(a){this._internalRoot=a}Pf.prototype.unstable_scheduleHydration=function(a){if(a){var o=kN();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&&yO(a)}};var jO=t.version;if(jO!=="19.2.7")throw Error(r(527,jO,"19.2.7"));G.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 zB={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rf.isDisabled&&Rf.supportsFiber)try{Hl=Rf.inject(zB),$n=Rf}catch{}}return Lc.createRoot=function(a,o){if(!i(a))throw Error(r(299));var u=!1,m="",g=TA,b=EA,C=kA;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=cO(a,1,!1,null,null,u,m,null,g,b,C,bO),a[Us]=o.current,wy(a),new qy(o)},Lc.hydrateRoot=function(a,o,u){if(!i(a))throw Error(r(299));var m=!1,g="",b=TA,C=EA,P=kA,U=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&&(U=u.formState)),o=cO(a,1,!0,o,u??null,m,g,U,b,C,P,bO),o.context=uO(null),u=o.current,m=Gn(),m=Cp(m),g=ai(m),g.callback=null,ii(u,g,m),u=m,o.current.lanes=u,Gl(o,u),Xr(o),a[Us]=o.current,wy(a),new Pf(o)},Lc.version="19.2.7",Lc}var CO;function GB(){if(CO)return Hy.exports;CO=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(),Hy.exports=FB(),Hy.exports}var KB=GB();/**
* 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 Aw=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,NR=/^[\\/]{2}/;function YB(e,t){return t+e.replace(/\\/g,"/")}var MO="popstate";function PO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function XB(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 v1("",{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:hu(i)}return ZB(t,n,null,e)}function Ot(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function WB(){return Math.random().toString(36).substring(2,10)}function RO(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 v1(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?_l(t):t,state:n,key:t&&t.key||r||WB(),mask:i}}function hu({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 _l(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 ZB(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(),A=v==null?null:v-h;h=v,f&&f({action:d,location:S.location,delta:A})}function y(v,A){d="PUSH";let O=PO(v)?v:v1(S.location,v,A);h=p()+1;let _=RO(O,h),T=S.createHref(O.mask||O);try{c.pushState(_,"",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,A){d="REPLACE";let O=PO(v)?v:v1(S.location,v,A);h=p();let _=RO(O,h),T=S.createHref(O.mask||O);c.replaceState(_,"",T),l&&f&&f({action:d,location:S.location,delta:0})}function w(v){return QB(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(MO,x),f=v,()=>{i.removeEventListener(MO,x),f=null}},createHref(v){return t(i,v)},createURL:w,encodeLocation(v){let A=w(v);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:y,replace:j,go(v){return c.go(v)}};return S}function QB(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),Ot(r,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:hu(t);return i=i.replace(/ $/,"%20"),!n&&NR.test(i)&&(i=r+i),new URL(i,r)}function AR(e,t,n="/"){return JB(e,t,n,!1)}function JB(e,t,n,r,i){let l=typeof t=="string"?_l(t):t,c=Ba(l.pathname||"/",n);if(c==null)return null;let d=eI(e),f=null,h=dI(c);for(let p=0;f==null&&p<d.length;++p)f=uI(d[p],h,r);return f}function eI(e){let t=_R(e);return tI(t),t}function _R(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;Ot(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=$r([r,p.relativePath]),y=n.concat(p);c.children&&c.children.length>0&&(Ot(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),_R(c.children,t,y,x,f)),!(c.path==null&&!c.index)&&t.push({path:x,score:lI(x,c.index),routesMeta:y.map((j,w)=>{let[S,v]=ER(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 OR(c.path))l(c,d,!0,h)}),t}function OR(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=OR(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 tI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cI(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var nI=/^:[\w-]+$/,rI=3,aI=2,iI=1,sI=10,oI=-2,DO=e=>e==="*";function lI(e,t){let n=e.split("/"),r=n.length;return n.some(DO)&&(r+=oI),t&&(r+=aI),n.filter(i=>!DO(i)).reduce((i,l)=>i+(nI.test(l)?rI:l===""?iI:sI),r)}function cI(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 uI(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?TR(x,p,f.matcher,f.compiledParams):bh(x,p),j=f.route;if(!y&&h&&n&&!r[r.length-1].route.index&&(y=bh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!y)return null;Object.assign(i,y.params),c.push({params:i,pathname:$r([l,y.pathname]),pathnameBase:mI($r([l,y.pathnameBase])),route:j}),y.pathnameBase!=="/"&&(l=$r([l,y.pathnameBase]))}return c}function bh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ER(e.path,e.caseSensitive,e.end);return TR(e,t,n,r)}function TR(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 ER(e,t=!1,n=!0){wr(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 dI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wr(!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 fI(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?_l(e):e,l;return n?(n=kR(n),n.startsWith("/")?l=zO(n.substring(1),"/"):l=zO(n,t)):l=t,{pathname:l,search:pI(r),hash:xI(i)}}function zO(e,t){let n=jh(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Yy(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 hI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _w(e){let t=hI(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function zm(e,t,n,r=!1){let i;typeof e=="string"?i=_l(e):(i={...e},Ot(!i.pathname||!i.pathname.includes("?"),Yy("?","pathname","search",i)),Ot(!i.pathname||!i.pathname.includes("#"),Yy("#","pathname","hash",i)),Ot(!i.search||!i.search.includes("#"),Yy("#","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=fI(i,d),h=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}var kR=e=>e.replace(/[\\/]{2,}/g,"/"),$r=e=>kR(e.join("/")),jh=e=>e.replace(/\/+$/,""),mI=e=>jh(e).replace(/^\/*/,"/"),pI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yI=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 gI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vI(e){let t=e.map(n=>n.route.path).filter(Boolean);return $r(t)||"/"}var CR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function MR(e,t){let n=e;if(typeof n!="string"||!Aw.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(CR)try{let l=new URL(window.location.href),c=NR.test(n)?new URL(YB(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{wr(!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 PR=["POST","PUT","PATCH","DELETE"];new Set(PR);var bI=["GET",...PR];new Set(bI);var jI=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function wI(e){try{return jI.includes(new URL(e).protocol)}catch{return!1}}var Ol=k.createContext(null);Ol.displayName="DataRouter";var Lm=k.createContext(null);Lm.displayName="DataRouterState";var RR=k.createContext(!1);function SI(){return k.useContext(RR)}var DR=k.createContext({isTransitioning:!1});DR.displayName="ViewTransition";var NI=k.createContext(new Map);NI.displayName="Fetchers";var AI=k.createContext(null);AI.displayName="Await";var nr=k.createContext(null);nr.displayName="Navigation";var ed=k.createContext(null);ed.displayName="Location";var Vr=k.createContext({outlet:null,matches:[],isDataRoute:!1});Vr.displayName="Route";var Ow=k.createContext(null);Ow.displayName="RouteError";var zR="REACT_ROUTER_ERROR",_I="REDIRECT",OI="ROUTE_ERROR_RESPONSE";function TI(e){if(e.startsWith(`${zR}:${_I}:{`))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 EI(e){if(e.startsWith(`${zR}:${OI}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new yI(t.status,t.statusText,t.data)}catch{}}function kI(e,{relative:t}={}){Ot(Tl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=k.useContext(nr),{hash:i,pathname:l,search:c}=td(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:$r([n,l])),r.createHref({pathname:d,search:c,hash:i})}function Tl(){return k.useContext(ed)!=null}function On(){return Ot(Tl(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(ed).location}var LR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $R(e){k.useContext(nr).static||k.useLayoutEffect(e)}function El(){let{isDataRoute:e}=k.useContext(Vr);return e?FI():CI()}function CI(){Ot(Tl(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(Ol),{basename:t,navigator:n}=k.useContext(nr),{matches:r}=k.useContext(Vr),{pathname:i}=On(),l=JSON.stringify(_w(r)),c=k.useRef(!1);return $R(()=>{c.current=!0}),k.useCallback((f,h={})=>{if(wr(c.current,LR),!c.current)return;if(typeof f=="number"){n.go(f);return}let p=zm(f,JSON.parse(l),i,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:$r([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,l,i,e])}var MI=k.createContext(null);function PI(e){let t=k.useContext(Vr).outlet;return k.useMemo(()=>t&&k.createElement(MI.Provider,{value:e},t),[t,e])}function td(e,{relative:t}={}){let{matches:n}=k.useContext(Vr),{pathname:r}=On(),i=JSON.stringify(_w(n));return k.useMemo(()=>zm(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function RI(e,t){return BR(e,t)}function BR(e,t,n){var v;Ot(Tl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=k.useContext(nr),{matches:i}=k.useContext(Vr),l=i[i.length-1],c=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",h=l&&l.route;{let A=h&&h.path||"";qR(d,!h||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let p=On(),x;if(t){let A=typeof t=="string"?_l(t):t;Ot(f==="/"||((v=A.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 "${A.pathname}" was given in the \`location\` prop.`),x=A}else x=p;let y=x.pathname||"/",j=y;if(f!=="/"){let A=f.replace(/^\//,"").split("/");j="/"+y.replace(/^\//,"").split("/").slice(A.length).join("/")}let w=n&&n.state.matches.length?n.state.matches.map(A=>Object.assign(A,{route:n.manifest[A.route.id]||A.route})):AR(e,{pathname:j});wr(h||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),wr(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=BI(w&&w.map(A=>Object.assign({},A,{params:Object.assign({},c,A.params),pathname:$r([f,r.encodeLocation?r.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?f:$r([f,r.encodeLocation?r.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),i,n);return t&&S?k.createElement(ed.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},S):S}function DI(){let e=HI(),t=gI(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=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:l},"ErrorBoundary")," or"," ",k.createElement("code",{style:l},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,c)}var zI=k.createElement(DI,null),IR=class extends k.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=EI(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(Vr.Provider,{value:this.props.routeContext},k.createElement(Ow.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(LI,{error:e},t):t}};IR.contextType=RR;var Xy=new WeakMap;function LI({children:e,error:t}){let{basename:n}=k.useContext(nr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=TI(t.digest);if(r){let i=Xy.get(t);if(i)throw i;let l=MR(r.location,n),c=l.absoluteURL||l.to;if(wI(c))throw new Error("Invalid redirect location");if(CR&&!Xy.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 Xy.set(t,d),d}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c}`})}}return e}function $I({routeContext:e,match:t,children:n}){let r=k.useContext(Ol);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(Vr.Provider,{value:e},n)}function BI(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);Ot(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:vI(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||zI,c&&(d<0&&y===0?(qR("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 A=t.concat(i.slice(0,y+1)),O=()=>{let _;return j?_=S:w?_=v:x.route.Component?_=k.createElement(x.route.Component,null):x.route.element?_=x.route.element:_=p,k.createElement($I,{match:x,routeContext:{outlet:p,matches:A,isDataRoute:r!=null},children:_})};return r&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?k.createElement(IR,{location:r.location,revalidation:r.revalidation,component:S,error:j,children:O(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:h}):O()},null)}function Tw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function II(e){let t=k.useContext(Ol);return Ot(t,Tw(e)),t}function qI(e){let t=k.useContext(Lm);return Ot(t,Tw(e)),t}function UI(e){let t=k.useContext(Vr);return Ot(t,Tw(e)),t}function Ew(e){let t=UI(e),n=t.matches[t.matches.length-1];return Ot(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function VI(){return Ew("useRouteId")}function HI(){var r;let e=k.useContext(Ow),t=qI("useRouteError"),n=Ew("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function FI(){let{router:e}=II("useNavigate"),t=Ew("useNavigate"),n=k.useRef(!1);return $R(()=>{n.current=!0}),k.useCallback(async(i,l={})=>{wr(n.current,LR),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var LO={};function qR(e,t,n){!t&&!LO[e]&&(LO[e]=!0,wr(!1,n))}k.memo(GI);function GI({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:l}){return BR(e,void 0,{manifest:t,state:r,isStatic:i,onError:l})}function kw({to:e,replace:t,state:n,relative:r}){Ot(Tl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=k.useContext(nr);wr(!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}=k.useContext(Vr),{pathname:c}=On(),d=El(),f=zm(e,_w(l),c,r==="path"),h=JSON.stringify(f);return k.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:r})},[d,h,r,t,n]),null}function KI(e){return PI(e.context)}function wt(e){Ot(!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 YI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:l=!1,useTransitions:c}){Ot(!Tl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=k.useMemo(()=>({basename:d,navigator:i,static:l,useTransitions:c,future:{}}),[d,i,l,c]);typeof n=="string"&&(n=_l(n));let{pathname:h="/",search:p="",hash:x="",state:y=null,key:j="default",mask:w}=n,S=k.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 wr(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:k.createElement(nr.Provider,{value:f},k.createElement(ed.Provider,{children:t,value:S}))}function XI({children:e,location:t}){return RI(b1(e),t)}function b1(e,t=[]){let n=[];return k.Children.forEach(e,(r,i)=>{if(!k.isValidElement(r))return;let l=[...t,i];if(r.type===k.Fragment){n.push.apply(n,b1(r.props.children,l));return}Ot(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>`),Ot(!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=b1(r.props.children,l)),n.push(c)}),n}var oh="get",lh="application/x-www-form-urlencoded";function $m(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function WI(e){return $m(e)&&e.tagName.toLowerCase()==="button"}function ZI(e){return $m(e)&&e.tagName.toLowerCase()==="form"}function QI(e){return $m(e)&&e.tagName.toLowerCase()==="input"}function JI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function eq(e,t){return e.button===0&&(!t||t==="_self")&&!JI(e)}function j1(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 tq(e,t){let n=j1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}var zf=null;function nq(){if(zf===null)try{new FormData(document.createElement("form"),0),zf=!1}catch{zf=!0}return zf}var rq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wy(e){return e!=null&&!rq.has(e)?(wr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lh}"`),null):e}function aq(e,t){let n,r,i,l,c;if(ZI(e)){let d=e.getAttribute("action");r=d?Ba(d,t):null,n=e.getAttribute("method")||oh,i=Wy(e.getAttribute("enctype"))||lh,l=new FormData(e)}else if(WI(e)||QI(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")||oh,i=Wy(e.getAttribute("formenctype"))||Wy(d.getAttribute("enctype"))||lh,l=new FormData(d,e),!nq()){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($m(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=oh,r=null,i=lh,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 Cw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function UR(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=`${jh(t)}/_root.${r}`:i.pathname=`${jh(i.pathname)}.${r}`,i}async function iq(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 sq(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 oq(e,t,n){let r=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await iq(l,n);return c.links?c.links():[]}return[]}));return dq(r.flat(1).filter(sq).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function $O(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 lq(e,t,{includeHydrateFallback:n}={}){return cq(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 cq(e){return[...new Set(e)]}function uq(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function dq(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let l=JSON.stringify(uq(i));return n.has(l)||(n.add(l),r.push({key:l,link:i})),r},[])}function Mw(){let e=k.useContext(Ol);return Cw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function fq(){let e=k.useContext(Lm);return Cw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Pw=k.createContext(void 0);Pw.displayName="FrameworkContext";function Bm(){let e=k.useContext(Pw);return Cw(e,"You must render this element inside a <HydratedRouter> element"),e}function hq(e,t){let n=k.useContext(Pw),[r,i]=k.useState(!1),[l,c]=k.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:p,onTouchStart:x}=t,y=k.useRef(null);k.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=A=>{A.forEach(O=>{c(O.isIntersecting)})},v=new IntersectionObserver(S,{threshold:.5});return y.current&&v.observe(y.current),()=>{v.disconnect()}}},[e]),k.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:$c(d,j),onBlur:$c(f,w),onMouseEnter:$c(h,j),onMouseLeave:$c(p,w),onTouchStart:$c(x,j)}]:[!1,y,{}]}function $c(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function mq({page:e,...t}){let n=SI(),{nonce:r}=Bm(),{router:i}=Mw(),l=k.useMemo(()=>AR(i.routes,e,i.basename),[i.routes,e,i.basename]);return l?(t.nonce==null&&r&&(t={...t,nonce:r}),n?k.createElement(xq,{page:e,matches:l,...t}):k.createElement(yq,{page:e,matches:l,...t})):null}function pq(e){let{manifest:t,routeModules:n}=Bm(),[r,i]=k.useState([]);return k.useEffect(()=>{let l=!1;return oq(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),r}function xq({page:e,matches:t,...n}){let r=On(),{future:i}=Bm(),{basename:l}=Mw(),c=k.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=UR(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 k.createElement(k.Fragment,null,c.map(d=>k.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function yq({page:e,matches:t,...n}){let r=On(),{future:i,manifest:l,routeModules:c}=Bm(),{basename:d}=Mw(),{loaderData:f,matches:h}=fq(),p=k.useMemo(()=>$O(e,t,h,l,r,"data"),[e,t,h,l,r]),x=k.useMemo(()=>$O(e,t,h,l,r,"assets"),[e,t,h,l,r]),y=k.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,v=!1;if(t.forEach(O=>{var T;let _=l.routes[O.route.id];!_||!_.hasLoader||(!p.some(N=>N.route.id===O.route.id)&&O.route.id in f&&((T=c[O.route.id])!=null&&T.shouldRevalidate)||_.hasClientLoader?v=!0:S.add(O.route.id))}),S.size===0)return[];let A=UR(e,d,i.v8_trailingSlashAwareDataRequests,"data");return v&&S.size>0&&A.searchParams.set("_routes",t.filter(O=>S.has(O.route.id)).map(O=>O.route.id).join(",")),[A.pathname+A.search]},[d,i.v8_trailingSlashAwareDataRequests,f,r,l,p,t,e,c]),j=k.useMemo(()=>lq(x,l),[x,l]),w=pq(x);return k.createElement(k.Fragment,null,y.map(S=>k.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),j.map(S=>k.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),w.map(({key:S,link:v})=>k.createElement("link",{key:S,nonce:n.nonce,...v,crossOrigin:v.crossOrigin??n.crossOrigin})))}function gq(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var vq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vq&&(window.__reactRouterVersion="7.18.1")}catch{}function bq({basename:e,children:t,useTransitions:n,window:r}){let i=k.useRef();i.current==null&&(i.current=XB({window:r,v5Compat:!0}));let l=i.current,[c,d]=k.useState({action:l.action,location:l.location}),f=k.useCallback(h=>{n===!1?d(h):k.startTransition(()=>d(h))},[n]);return k.useLayoutEffect(()=>l.listen(f),[l,f]),k.createElement(YI,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:n})}var Ts=k.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:A,useTransitions:O}=k.useContext(nr),_=typeof p=="string"&&Aw.test(p),T=MR(p,v);p=T.to;let N=kI(p,{relative:i}),E=On(),M=null;if(d){let H=zm(d,[],E.mask?E.mask.pathname:"/",!0);v!=="/"&&(H.pathname=H.pathname==="/"?v:$r([v,H.pathname])),M=A.createHref(H)}let[R,B,z]=hq(r,w),D=Sq(p,{replace:c,mask:d,state:f,target:h,preventScrollReset:x,relative:i,viewTransition:y,defaultShouldRevalidate:j,useTransitions:O});function L(H){t&&t(H),H.defaultPrevented||D(H)}let $=!(T.isExternal||l),F=k.createElement("a",{...w,...z,href:($?M:void 0)||T.absoluteURL||N,onClick:$?L:t,ref:gq(S,B),target:h,"data-discover":!_&&n==="render"?"true":void 0});return R&&!_?k.createElement(k.Fragment,null,F,k.createElement(mq,{page:N})):F});Ts.displayName="Link";var VR=k.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=td(c,{relative:h.relative}),y=On(),j=k.useContext(Lm),{navigator:w,basename:S}=k.useContext(nr),v=j!=null&&Eq(x)&&d===!0,A=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,O=y.pathname,_=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;n||(O=O.toLowerCase(),_=_?_.toLowerCase():null,A=A.toLowerCase()),_&&S&&(_=Ba(_,S)||_);const T=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let N=O===A||!i&&O.startsWith(A)&&O.charAt(T)==="/",E=_!=null&&(_===A||!i&&_.startsWith(A)&&_.charAt(A.length)==="/"),M={isActive:N,isPending:E,isTransitioning:v},R=N?t:void 0,B;typeof r=="function"?B=r(M):B=[r,N?"active":null,E?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let z=typeof l=="function"?l(M):l;return k.createElement(Ts,{...h,"aria-current":R,className:B,ref:p,style:z,to:c,viewTransition:d},typeof f=="function"?f(M):f)});VR.displayName="NavLink";var jq=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:l,method:c=oh,action:d,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:y,...j},w)=>{let{useTransitions:S}=k.useContext(nr),v=Oq(),A=Tq(d,{relative:h}),O=c.toLowerCase()==="get"?"get":"post",_=typeof d=="string"&&Aw.test(d),T=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let E=N.nativeEvent.submitter,M=(E==null?void 0:E.getAttribute("formmethod"))||c,R=()=>v(E||N.currentTarget,{fetcherKey:t,method:M,navigate:n,replace:i,state:l,relative:h,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:y});S&&n!==!1?k.startTransition(()=>R()):R()};return k.createElement("form",{ref:w,method:O,action:A,onSubmit:r?f:T,...j,"data-discover":!_&&e==="render"?"true":void 0})});jq.displayName="Form";function wq(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function HR(e){let t=k.useContext(Ol);return Ot(t,wq(e)),t}function Sq(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let p=El(),x=On(),y=td(e,{relative:c});return k.useCallback(j=>{if(eq(j,t)){j.preventDefault();let w=n!==void 0?n:hu(x)===hu(y),S=()=>p(e,{replace:w,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f});h?k.startTransition(()=>S()):S()}},[x,p,y,n,r,i,t,e,l,c,d,f,h])}function Nq(e){wr(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=k.useRef(j1(e)),n=k.useRef(!1),r=On(),i=k.useMemo(()=>tq(r.search,n.current?null:t.current),[r.search]),l=El(),c=k.useCallback((d,f)=>{const h=j1(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,l("?"+h,f)},[l,i]);return[i,c]}var Aq=0,_q=()=>`__${String(++Aq)}__`;function Oq(){let{router:e}=HR("useSubmit"),{basename:t}=k.useContext(nr),n=VI(),r=e.fetch,i=e.navigate;return k.useCallback(async(l,c={})=>{let{action:d,method:f,encType:h,formData:p,body:x}=aq(l,t);if(c.navigate===!1){let y=c.fetcherKey||_q();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 Tq(e,{relative:t}={}){let{basename:n}=k.useContext(nr),r=k.useContext(Vr);Ot(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),l={...td(e||".",{relative:t})},c=On();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:$r([n,l.pathname])),hu(l)}function Eq(e,{relative:t}={}){let n=k.useContext(DR);Ot(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=HR("useViewTransitionState"),i=td(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 bh(i.pathname,c)!=null||bh(i.pathname,l)!=null}const BO=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?BO(e):BO),Cq=e=>e;function Mq(e,t=Cq){const n=V.useSyncExternalStore(e.subscribe,V.useCallback(()=>t(e.getState()),[e,t]),V.useCallback(()=>t(e.getInitialState()),[e,t]));return V.useDebugValue(n),n}const IO=e=>{const t=kq(e),n=r=>Mq(t,r);return Object.assign(n,t),n},FR=(e=>e?IO(e):IO);function Pq(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 w1=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return w1(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return w1(r)(n)}}}},Rq=(e,t)=>(n,r,i)=>{let l={storage:Pq(()=>window.localStorage),partialize:v=>v,version:0,merge:(v,A)=>({...A,...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,A)=>(y(v,A),x());const j=e((...v)=>(n(...v),x()),r,i);i.getInitialState=()=>j;let w;const S=()=>{var v,A;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:A.call(l,(v=r())!=null?v:j))||void 0;return w1(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,M]=T;if(w=l.merge(M,(N=r())!=null?N:j),n(w,!0),E)return x()}).then(()=>{O===d&&(_==null||_(r(),void 0),w=r(),c=!0,h.forEach(T=>T(w)))}).catch(T=>{O===d&&(_==null||_(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},Dq=Rq,tr=FR()(Dq(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})})),Rw=k.createContext({});function Dw(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const zq=typeof window<"u",zw=zq?k.useLayoutEffect:k.useEffect,Im=k.createContext(null);function Lw(e,t){e.indexOf(t)===-1&&e.push(t)}function wh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ra=(e,t,n)=>n>t?t:n<e?e:n;let $w=()=>{};const Ci={},GR=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),KR=e=>typeof e=="object"&&e!==null,YR=e=>/^0[^.\s]+$/u.test(e);function XR(e){let t;return()=>(t===void 0&&(t=e()),t)}const br=e=>e,nd=(...e)=>e.reduce((t,n)=>r=>n(t(r))),mu=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Bw{constructor(){this.subscriptions=[]}add(t){return Lw(this.subscriptions,t),()=>wh(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 Qn=e=>e*1e3,gr=e=>e/1e3,WR=(e,t)=>t?e*(1e3/t):0,ZR=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Lq=1e-7,$q=12;function Bq(e,t,n,r,i){let l,c,d=0;do c=t+(n-t)/2,l=ZR(c,r,i)-e,l>0?n=c:t=c;while(Math.abs(l)>Lq&&++d<$q);return c}function rd(e,t,n,r){if(e===t&&n===r)return br;const i=l=>Bq(l,0,1,e,n);return l=>l===0||l===1?l:ZR(i(l),t,r)}const QR=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,JR=e=>t=>1-e(1-t),eD=rd(.33,1.53,.69,.99),Iw=JR(eD),tD=QR(Iw),nD=e=>e>=1?1:(e*=2)<1?.5*Iw(e):.5*(2-Math.pow(2,-10*(e-1))),qw=e=>1-Math.sin(Math.acos(e)),rD=JR(qw),aD=QR(qw),Iq=rd(.42,0,1,1),qq=rd(0,0,.58,1),iD=rd(.42,0,.58,1),Uq=e=>Array.isArray(e)&&typeof e[0]!="number",sD=e=>Array.isArray(e)&&typeof e[0]=="number",Vq={linear:br,easeIn:Iq,easeInOut:iD,easeOut:qq,circIn:qw,circInOut:aD,circOut:rD,backIn:Iw,backInOut:tD,backOut:eD,anticipate:nD},Hq=e=>typeof e=="string",qO=e=>{if(sD(e)){$w(e.length===4);const[t,n,r,i]=e;return rd(t,n,r,i)}else if(Hq(e))return Vq[e];return e},Lf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Fq(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 Gq=40;function oD(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Lf.reduce((_,T)=>(_[T]=Fq(l),_),{}),{setup:d,read:f,resolveKeyframes:h,preUpdate:p,update:x,preRender:y,render:j,postRender:w}=c,S=()=>{const _=Ci.useManualTiming,T=_?i.timestamp:performance.now();n=!1,_||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,Gq),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:Lf.reduce((_,T)=>{const N=c[T];return _[T]=(E,M=!1,R=!1)=>(n||v(),N.schedule(E,M,R)),_},{}),cancel:_=>{for(let T=0;T<Lf.length;T++)c[Lf[T]].cancel(_)},state:i,steps:c}}const{schedule:ft,cancel:Mi,state:un,steps:Zy}=oD(typeof requestAnimationFrame<"u"?requestAnimationFrame:br,!0);let ch;function Kq(){ch=void 0}const bn={now:()=>(ch===void 0&&bn.set(un.isProcessing||Ci.useManualTiming?un.timestamp:performance.now()),ch),set:e=>{ch=e,queueMicrotask(Kq)}},lD=e=>t=>typeof t=="string"&&t.startsWith(e),cD=lD("--"),Yq=lD("var(--"),Uw=e=>Yq(e)?Xq.test(e.split("/*")[0].trim()):!1,Xq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function UO(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const kl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pu={...kl,transform:e=>ra(0,1,e)},$f={...kl,default:1},nu=e=>Math.round(e*1e5)/1e5,Vw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Wq(e){return e==null}const Zq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hw=(e,t)=>n=>!!(typeof n=="string"&&Zq.test(n)&&n.startsWith(e)||t&&!Wq(n)&&Object.prototype.hasOwnProperty.call(n,t)),uD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,l,c,d]=r.match(Vw);return{[e]:parseFloat(i),[t]:parseFloat(l),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},Qq=e=>ra(0,255,e),Qy={...kl,transform:e=>Math.round(Qq(e))},xs={test:Hw("rgb","red"),parse:uD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Qy.transform(e)+", "+Qy.transform(t)+", "+Qy.transform(n)+", "+nu(pu.transform(r))+")"};function Jq(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 S1={test:Hw("#"),parse:Jq,transform:xs.transform},ad=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ka=ad("deg"),ea=ad("%"),xe=ad("px"),e7=ad("vh"),t7=ad("vw"),VO={...ea,parse:e=>ea.parse(e)/100,transform:e=>ea.transform(e*100)},Mo={test:Hw("hsl","hue"),parse:uD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ea.transform(nu(t))+", "+ea.transform(nu(n))+", "+nu(pu.transform(r))+")"},Ut={test:e=>xs.test(e)||S1.test(e)||Mo.test(e),parse:e=>xs.test(e)?xs.parse(e):Mo.test(e)?Mo.parse(e):S1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xs.transform(e):Mo.transform(e),getAnimatableNone:e=>{const t=Ut.parse(e);return t.alpha=0,Ut.transform(t)}},n7=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function r7(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vw))==null?void 0:t.length)||0)+(((n=e.match(n7))==null?void 0:n.length)||0)>0}const dD="number",fD="color",a7="var",i7="var(",HO="${}",s7=/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 Yo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let l=0;const d=t.replace(s7,f=>(Ut.test(f)?(r.color.push(l),i.push(fD),n.push(Ut.parse(f))):f.startsWith(i7)?(r.var.push(l),i.push(a7),n.push(f)):(r.number.push(l),i.push(dD),n.push(parseFloat(f))),++l,HO)).split(HO);return{values:n,split:d,indexes:r,types:i}}function o7(e){return Yo(e).values}function hD({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===dD?i+=nu(r[l]):c===fD?i+=Ut.transform(r[l]):i+=r[l]}return i}}function l7(e){return hD(Yo(e))}const c7=e=>typeof e=="number"?0:Ut.test(e)?Ut.getAnimatableNone(e):e,u7=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:c7(e);function d7(e){const t=Yo(e);return hD(t)(t.values.map((r,i)=>u7(r,t.split[i])))}const Br={test:r7,parse:o7,createTransformer:l7,getAnimatableNone:d7};function Jy(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 f7({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=Jy(f,d,e+1/3),l=Jy(f,d,e),c=Jy(f,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:r}}function Sh(e,t){return n=>n>0?t:e}const dt=(e,t,n)=>e+(t-e)*n,eg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},h7=[S1,xs,Mo],m7=e=>h7.find(t=>t.test(e));function FO(e){const t=m7(e);if(!t)return!1;let n=t.parse(e);return t===Mo&&(n=f7(n)),n}const GO=(e,t)=>{const n=FO(e),r=FO(t);if(!n||!r)return Sh(e,t);const i={...n};return l=>(i.red=eg(n.red,r.red,l),i.green=eg(n.green,r.green,l),i.blue=eg(n.blue,r.blue,l),i.alpha=dt(n.alpha,r.alpha,l),xs.transform(i))},N1=new Set(["none","hidden"]);function p7(e,t){return N1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function x7(e,t){return n=>dt(e,t,n)}function Fw(e){return typeof e=="number"?x7:typeof e=="string"?Uw(e)?Sh:Ut.test(e)?GO:v7:Array.isArray(e)?mD:typeof e=="object"?Ut.test(e)?GO:y7:Sh}function mD(e,t){const n=[...e],r=n.length,i=e.map((l,c)=>Fw(l)(l,t[c]));return l=>{for(let c=0;c<r;c++)n[c]=i[c](l);return n}}function y7(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Fw(e[i])(e[i],t[i]));return i=>{for(const l in r)n[l]=r[l](i);return n}}function g7(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 v7=(e,t)=>{const n=Br.createTransformer(t),r=Yo(e),i=Yo(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?N1.has(e)&&!i.values.length||N1.has(t)&&!r.values.length?p7(e,t):nd(mD(g7(r,i),i.values),n):Sh(e,t)};function pD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?dt(e,t,n):Fw(e)(e,t)}const b7=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ft.update(t,n),stop:()=>Mi(t),now:()=>un.isProcessing?un.timestamp:bn.now()}},xD=(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)})`},Nh=2e4;function Gw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Nh;)t+=n,r=e.next(t);return t>=Nh?1/0:t}function j7(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Gw(r),Nh);return{type:"keyframes",ease:l=>r.next(i*l).value/t,duration:gr(i)}}const Mt={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 A1(e,t){return e*Math.sqrt(1-t*t)}const w7=12;function S7(e,t,n){let r=n;for(let i=1;i<w7;i++)r=r-e(r)/t(r);return r}const tg=.001;function N7({duration:e=Mt.duration,bounce:t=Mt.bounce,velocity:n=Mt.velocity,mass:r=Mt.mass}){let i,l,c=1-t;c=ra(Mt.minDamping,Mt.maxDamping,c),e=ra(Mt.minDuration,Mt.maxDuration,gr(e)),c<1?(i=h=>{const p=h*c,x=p*e,y=p-n,j=A1(h,c),w=Math.exp(-x);return tg-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=A1(Math.pow(h,2),c);return(-i(h)+tg>0?-1:1)*((y-j)*w)/S}):(i=h=>{const p=Math.exp(-h*e),x=(h-n)*e+1;return-tg+p*x},l=h=>{const p=Math.exp(-h*e),x=(n-h)*(e*e);return p*x});const d=5/e,f=S7(i,l,d);if(e=Qn(e),isNaN(f))return{stiffness:Mt.stiffness,damping:Mt.damping,duration:e};{const h=Math.pow(f,2)*r;return{stiffness:h,damping:c*2*Math.sqrt(r*h),duration:e}}}const A7=["duration","bounce"],_7=["stiffness","damping","mass"];function KO(e,t){return t.some(n=>e[n]!==void 0)}function O7(e){let t={velocity:Mt.velocity,stiffness:Mt.stiffness,damping:Mt.damping,mass:Mt.mass,isResolvedFromDuration:!1,...e};if(!KO(e,_7)&&KO(e,A7))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,l=2*ra(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Mt.mass,stiffness:i,damping:l}}else{const n=N7({...e,velocity:0});t={...t,...n,mass:Mt.mass},t.isResolvedFromDuration=!0}return t}function Ah(e=Mt.visualDuration,t=Mt.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}=O7({...n,velocity:-gr(n.velocity||0)}),w=y||0,S=h/(2*Math.sqrt(f*p)),v=c-l,A=gr(Math.sqrt(f/p)),O=Math.abs(v)<5;r||(r=O?Mt.restSpeed.granular:Mt.restSpeed.default),i||(i=O?Mt.restDelta.granular:Mt.restDelta.default);let _,T,N,E,M,R;if(S<1)N=A1(A,S),E=(w+S*A*v)/N,_=z=>{const D=Math.exp(-S*A*z);return c-D*(E*Math.sin(N*z)+v*Math.cos(N*z))},M=S*A*E+v*N,R=S*A*v-E*N,T=z=>Math.exp(-S*A*z)*(M*Math.sin(N*z)+R*Math.cos(N*z));else if(S===1){_=D=>c-Math.exp(-A*D)*(v+(w+A*v)*D);const z=w+A*v;T=D=>Math.exp(-A*D)*(A*z*D-w)}else{const z=A*Math.sqrt(S*S-1);_=F=>{const H=Math.exp(-S*A*F),I=Math.min(z*F,300);return c-H*((w+S*A*v)*Math.sinh(I)+z*v*Math.cosh(I))/z};const D=(w+S*A*v)/z,L=S*A*D-v*z,$=S*A*v-D*z;T=F=>{const H=Math.exp(-S*A*F),I=Math.min(z*F,300);return H*(L*Math.sinh(I)+$*Math.cosh(I))}}const B={calculatedDuration:j&&x||null,velocity:z=>Qn(T(z)),next:z=>{if(!j&&S<1){const L=Math.exp(-S*A*z),$=Math.sin(N*z),F=Math.cos(N*z),H=c-L*(E*$+v*F),I=Qn(L*(M*$+R*F));return d.done=Math.abs(I)<=r&&Math.abs(c-H)<=i,d.value=d.done?c:H,d}const D=_(z);if(j)d.done=z>=x;else{const L=Qn(T(z));d.done=Math.abs(L)<=r&&Math.abs(c-D)<=i}return d.value=d.done?c:D,d},toString:()=>{const z=Math.min(Gw(B),Nh),D=xD(L=>B.next(z*L).value,z,30);return z+"ms "+D},toTransition:()=>{}};return B}Ah.applyToOptions=e=>{const t=j7(e,100,Ah);return e.ease=t.ease,e.duration=Qn(t.duration),e.type="keyframes",e};const T7=5;function yD(e,t,n){const r=Math.max(t-T7,0);return WR(n-e(r),t-r)}function _1({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,A=c===void 0?v:c(v);A!==v&&(S=A-x);const O=R=>-S*Math.exp(-R/r),_=R=>A+O(R),T=R=>{const B=O(R),z=_(R);y.done=Math.abs(B)<=h,y.value=y.done?A:z};let N,E;const M=R=>{j(y.value)&&(N=R,E=Ah({keyframes:[y.value,w(y.value)],velocity:yD(_,R,y.value),damping:i,stiffness:l,restDelta:h,restSpeed:p}))};return M(0),{calculatedDuration:null,next:R=>{let B=!1;return!E&&N===void 0&&(B=!0,T(R),M(R)),N!==void 0&&R>=N?E.next(R-N):(!B&&T(R),y)}}}function E7(e,t,n){const r=[],i=n||Ci.mix||pD,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]||br:t;d=nd(f,d)}r.push(d)}return r}function k7(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const l=e.length;if($w(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=E7(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=mu(e[x],e[x+1],p);return d[x](y)};return n?p=>h(ra(e[0],e[l-1],p)):h}function C7(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=mu(0,t,r);e.push(dt(n,1,i))}}function M7(e){const t=[0];return C7(t,e.length-1),t}function P7(e,t){return e.map(n=>n*t)}function R7(e,t){return e.map(()=>t||iD).splice(0,e.length-1)}function ru({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Uq(r)?r.map(qO):qO(r),l={done:!1,value:t[0]},c=P7(n&&n.length===t.length?n:M7(t),e),d=k7(c,t,{ease:Array.isArray(i)?i:R7(t,i)});return{calculatedDuration:e,next:f=>(l.value=d(f),l.done=f>=e,l)}}const D7=e=>e!==null;function qm(e,{repeat:t,repeatType:n="loop"},r,i=1){const l=e.filter(D7),d=i<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!d||r===void 0?l[d]:r}const z7={decay:_1,inertia:_1,tween:ru,keyframes:ru,spring:Ah};function gD(e){typeof e.type=="string"&&(e.type=z7[e.type])}class Kw{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 L7=e=>e/100;class _h extends Kw{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;gD(t);const{type:n=ru,repeat:r=0,repeatDelay:i=0,repeatType:l,velocity:c=0}=t;let{keyframes:d}=t;const f=n||ru;f!==ru&&typeof d[0]!="number"&&(this.mixKeyframes=nd(L7,pD(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=Gw(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 A=this.currentTime-h*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?A<0:A>i;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let _=this.currentTime,T=r;if(x){const R=Math.min(this.currentTime,i)/d;let B=Math.floor(R),z=R%1;!z&&R>=1&&(z=1),z===1&&B--,B=Math.min(B,x+1),!!(B%2)&&(y==="reverse"?(z=1-z,j&&(z-=j/d)):y==="mirror"&&(T=c)),_=ra(0,1,z)*d}let N;O?(this.delayState.value=p[0],N=this.delayState):N=T.next(_),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 M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return M&&w!==_1&&(N.value=qm(p,this.options,v,this.speed)),S&&S(N.value),M&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return gr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+gr(t)}get time(){return gr(this.currentTime)}set time(t){t=Qn(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 yD(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=gr(this.currentTime))}play(){var i,l;if(this.isStopped)return;const{driver:t=b7,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 $7(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ys=e=>e*180/Math.PI,O1=e=>{const t=ys(Math.atan2(e[1],e[0]));return T1(t)},B7={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:O1,rotateZ:O1,skewX:e=>ys(Math.atan(e[1])),skewY:e=>ys(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},T1=e=>(e=e%360,e<0&&(e+=360),e),YO=O1,XO=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),WO=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),I7={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:XO,scaleY:WO,scale:e=>(XO(e)+WO(e))/2,rotateX:e=>T1(ys(Math.atan2(e[6],e[5]))),rotateY:e=>T1(ys(Math.atan2(-e[2],e[0]))),rotateZ:YO,rotate:YO,skewX:e=>ys(Math.atan(e[4])),skewY:e=>ys(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function E1(e){return e.includes("scale")?1:0}function k1(e,t){if(!e||e==="none")return E1(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=I7,i=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=B7,i=d}if(!i)return E1(t);const l=r[t],c=i[1].split(",").map(U7);return typeof l=="function"?l(c):c[l]}const q7=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return k1(n,t)};function U7(e){return parseFloat(e.trim())}const Cl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ml=new Set([...Cl,"pathRotation"]),ZO=e=>e===kl||e===xe,V7=new Set(["x","y","z"]),H7=Cl.filter(e=>!V7.has(e));function F7(e){const t=[];return H7.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})=>k1(t,"x"),y:(e,{transform:t})=>k1(t,"y")};_i.translateX=_i.x;_i.translateY=_i.y;const ws=new Set;let C1=!1,M1=!1,P1=!1;function vD(){if(M1){const e=Array.from(ws).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=F7(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)})}M1=!1,C1=!1,ws.forEach(e=>e.complete(P1)),ws.clear()}function bD(){ws.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(M1=!0)})}function G7(){P1=!0,bD(),vD(),P1=!1}class Yw{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?(ws.add(this),C1||(C1=!0,ft.read(bD),ft.resolveKeyframes(vD))):(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])}$7(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ws.delete(this)}cancel(){this.state==="scheduled"&&(ws.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const K7=e=>e.startsWith("--");function jD(e,t,n){K7(t)?e.style.setProperty(t,n):e.style[t]=n}const Y7={};function wD(e,t){const n=XR(e);return()=>Y7[t]??n()}const X7=wD(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),SD=wD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,QO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qc([0,.65,.55,1]),circOut:Qc([.55,0,1,.45]),backIn:Qc([.31,.01,.66,-.59]),backOut:Qc([.33,1.53,.69,.99])};function ND(e,t){if(e)return typeof e=="function"?SD()?xD(e,t):"ease-out":sD(e)?Qc(e):Array.isArray(e)?e.map(n=>ND(n,t)||QO.easeOut):QO[e]}function W7(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=ND(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 AD(e){return typeof e=="function"&&"applyToOptions"in e}function Z7({type:e,...t}){return AD(e)&&SD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class _D extends Kw{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,$w(typeof t.type!="string");const h=Z7(t);this.animation=W7(n,r,i,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const p=qm(i,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(p),jD(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 gr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+gr(t)}get time(){return gr(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Qn(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&&X7()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),br):i(this)}}const OD={anticipate:nD,backInOut:tD,circInOut:aD};function Q7(e){return e in OD}function J7(e){typeof e.ease=="string"&&Q7(e.ease)&&(e.ease=OD[e.ease])}const ng=10;class e9 extends _D{constructor(t){J7(t),gD(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 _h({...c,autoplay:!1}),f=Math.max(ng,bn.now()-this.startTime),h=ra(0,ng,f-ng),p=d.sample(f).value,{name:x}=this.options;l&&x&&jD(l,x,p),n.setWithVelocity(d.sample(Math.max(0,f-h)).value,p,h),d.stop()}}const JO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Br.test(e)||e==="0")&&!e.startsWith("url("));function t9(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 n9(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=JO(i,t),d=JO(l,t);return!c||!d?!1:t9(e)||(n==="spring"||AD(n))&&r}function R1(e){e.duration=0,e.type="keyframes"}const TD=new Set(["opacity","clipPath","filter","transform"]),r9=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function a9(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&r9.test(e[t]))return!0;return!1}const i9=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),s9=XR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function o9(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 s9()&&n&&(TD.has(n)||i9.has(n)&&a9(d))&&(n!=="transform"||!p)&&!h&&!r&&i!=="mirror"&&l!==0&&c!=="inertia"}const l9=40;class c9 extends Kw{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)||Yw;this.keyframeResolver=new j(d,(S,v,A)=>this.onKeyframesResolved(S,v,y,!A),f,h,p),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,i){var A,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;n9(t,l,c,d)||(x=!1,(Ci.instantAnimations||!f)&&(p==null||p(qm(t,r,n))),t[0]=t[t.length-1],R1(r),r.repeat=0);const j={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>l9?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=x&&!h&&o9(j),S=(O=(A=j.motionValue)==null?void 0:A.owner)==null?void 0:O.current;let v;if(w)try{v=new e9({...j,element:S})}catch{v=new _h(j)}else v=new _h(j);v.finished.then(()=>{this.notifyFinished()}).catch(br),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(),G7()),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 ED(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 eT=30,u9=e=>!isNaN(parseFloat(e));class d9{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=u9(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 Bw);const r=this.events[t].add(n);return t==="change"?()=>{r(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>eT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,eT);return WR(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 Xo(e,t){return new d9(e,t)}function kD(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Xw(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?kD(n,e):n}const f9={type:"spring",stiffness:500,damping:25,restSpeed:10},h9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),m9={type:"keyframes",duration:.8},p9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},x9=(e,{keyframes:t})=>t.length>2?m9:Ml.has(e)?e.startsWith("scale")?h9(t[1]):f9:p9,y9=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function g9(e){for(const t in e)if(!y9.has(t))return!0;return!1}const Ww=(e,t,n,r={},i,l)=>c=>{const d=Xw(r,e)||{},f=d.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Qn(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};g9(d)||Object.assign(p,x9(e,p)),p.duration&&(p.duration=Qn(p.duration)),p.repeatDelay&&(p.repeatDelay=Qn(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let x=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(R1(p),p.delay===0&&(x=!0)),(Ci.instantAnimations||Ci.skipAnimations||i!=null&&i.shouldSkipAnimations||d.skipAnimations)&&(x=!0,R1(p),p.delay=0),p.allowFlatten=!d.type&&!d.ease,x&&!l&&t.get()!==void 0){const y=qm(p.keyframes,d);if(y!==void 0){ft.update(()=>{p.onUpdate(y),p.onComplete()});return}}return d.isSync?new _h(p):new c9(p)},v9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function b9(e){const t=v9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function CD(e,t,n=1){const[r,i]=b9(e);if(!r)return;const l=window.getComputedStyle(t).getPropertyValue(r);if(l){const c=l.trim();return GR(c)?parseFloat(c):c}return Uw(i)?CD(i,t,n+1):i}function tT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zw(e,t,n,r){if(typeof t=="function"){const[i,l]=tT(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]=tT(r);t=t(n!==void 0?n:e.custom,i,l)}return t}function Ss(e,t,n){const r=e.getProps();return Zw(r,t,n!==void 0?n:r.custom,e)}const MD=new Set(["width","height","top","left","right","bottom",...Cl]),D1=e=>Array.isArray(e);function j9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xo(n))}function w9(e){return D1(e)?e[e.length-1]||0:e}function S9(e,t){const n=Ss(e,t);let{transitionEnd:r={},transition:i={},...l}=n||{};l={...l,...r};for(const c in l){const d=w9(l[c]);j9(e,c,d)}}const dn=e=>!!(e&&e.getVelocity);function N9(e){return!!(dn(e)&&e.add)}function z1(e,t){const n=e.getValue("willChange");if(N9(n))return n.add(t);if(!n&&Ci.WillChange){const r=new Ci.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Qw(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const A9="framerAppearId",PD="data-"+Qw(A9);function RD(e){return e.props[PD]}function _9({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function DD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:l,transitionEnd:c,...d}=t;const f=e.getDefaultTransition();l=l?kD(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&&_9(y,w))continue;const A={delay:n,...Xw(l||{},w)};p&&(A.skipAnimations=!0);const O=S.get();if(O!==void 0&&!S.isAnimating()&&!Array.isArray(v)&&v===O&&!A.velocity){ft.update(()=>S.set(v));continue}let _=!1;if(window.MotionHandoffAnimation){const E=RD(e);if(E){const M=window.MotionHandoffAnimation(E,w,ft);M!==null&&(A.startTime=M,_=!0)}}z1(e,w);const T=h??e.shouldReduceMotion;S.start(Ww(w,S,v,T&&MD.has(w)?{type:!1}:A,e,_));const N=S.animation;N&&x.push(N)}if(c){const w=()=>ft.update(()=>{c&&S9(e,c)});x.length?Promise.all(x).then(w):w()}return x}function L1(e,t,n={}){var f;const r=Ss(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(DD(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:p=0,staggerChildren:x,staggerDirection:y}=i;return O9(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 O9(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(L1(f,t,{...c,delay:n+(typeof r=="function"?0:r)+ED(e.variantChildren,f,r,i,l)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(d)}function T9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(l=>L1(e,l,n));r=Promise.all(i)}else if(typeof t=="string")r=L1(e,t,n);else{const i=typeof t=="function"?Ss(e,t,n.custom):t;r=Promise.all(DD(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const E9={test:e=>e==="auto",parse:e=>e},zD=e=>t=>t.test(e),LD=[kl,xe,ea,ka,t7,e7,E9],nT=e=>LD.find(zD(e));function k9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||YR(e):!0}const C9=new Set(["brightness","contrast","saturate","opacity"]);function M9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vw)||[];if(!r)return e;const i=n.replace(r,"");let l=C9.has(t)?1:0;return r!==n&&(l*=100),t+"("+l+i+")"}const P9=/\b([a-z-]*)\(.*?\)/gu,$1={...Br,getAnimatableNone:e=>{const t=e.match(P9);return t?t.map(M9).join(" "):e}},B1={...Br,getAnimatableNone:e=>{const t=Br.parse(e);return Br.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},rT={...kl,transform:Math.round},R9={rotate:ka,pathRotation:ka,rotateX:ka,rotateY:ka,rotateZ:ka,scale:$f,scaleX:$f,scaleY:$f,scaleZ:$f,skew:ka,skewX:ka,skewY:ka,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:pu,originX:VO,originY:VO,originZ:xe},Oh={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,...R9,zIndex:rT,fillOpacity:pu,strokeOpacity:pu,numOctaves:rT},D9={...Oh,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:$1,WebkitFilter:$1,mask:B1,WebkitMask:B1},$D=e=>D9[e],z9=new Set([$1,B1]);function BD(e,t){let n=$D(e);return z9.has(n)||(n=Br),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const L9=new Set(["auto","none","0"]);function $9(e,t,n){let r=0,i;for(;r<e.length&&!i;){const l=e[r];typeof l=="string"&&!L9.has(l)&&Yo(l).values.length&&(i=e[r]),r++}if(i&&n)for(const l of t)e[l]=BD(n,i)}class B9 extends Yw{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(),Uw(x))){const y=CD(x,n.current);y!==void 0&&(t[p]=y),p===t.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!MD.has(r)||t.length!==2)return;const[i,l]=t,c=nT(i),d=nT(l),f=UO(i),h=UO(l);if(f!==h&&_i[r]){this.needsMeasurement=!0;return}if(c!==d)if(ZO(c)&&ZO(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&&$9(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 Jw=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function ID(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 I1=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function uh(e){return KR(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:eS}=oD(queueMicrotask,!1),Rr={x:!1,y:!1};function qD(){return Rr.x||Rr.y}function I9(e){return e==="x"||e==="y"?Rr[e]?null:(Rr[e]=!0,()=>{Rr[e]=!1}):Rr.x||Rr.y?null:(Rr.x=Rr.y=!0,()=>{Rr.x=Rr.y=!1})}function UD(e,t){const n=ID(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function q9(e){return!(e.pointerType==="touch"||qD())}function U9(e,t,n={}){const[r,i,l]=UD(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(!q9(v))return;f=!1;const A=t(c,v);typeof A=="function"&&(h=A,c.addEventListener("pointerleave",w,i))};c.addEventListener("pointerenter",S,i),c.addEventListener("pointerdown",j,i)}),l}const VD=(e,t)=>t?e===t?!0:VD(e,t.parentElement):!1,tS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,V9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function H9(e){return V9.has(e.tagName)||e.isContentEditable===!0}const F9=new Set(["INPUT","SELECT","TEXTAREA"]);function G9(e){return F9.has(e.tagName)||e.isContentEditable===!0}const dh=new WeakSet;function aT(e){return t=>{t.key==="Enter"&&e(t)}}function rg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const K9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=aT(()=>{if(dh.has(n))return;rg(n,"down");const i=aT(()=>{rg(n,"up")}),l=()=>rg(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 iT(e){return tS(e)&&!qD()}const sT=new WeakSet;function Y9(e,t,n={}){const[r,i,l]=UD(e,n),c=d=>{const f=d.currentTarget;if(!iT(d)||sT.has(d))return;dh.add(f),n.stopPropagation&&sT.add(d);const h=t(f,d),p={...i,capture:!0},x=(w,S)=>{window.removeEventListener("pointerup",y,p),window.removeEventListener("pointercancel",j,p),dh.has(f)&&dh.delete(f),iT(w)&&typeof h=="function"&&h(w,{success:S})},y=w=>{x(w,f===window||f===document||n.useGlobalTarget||VD(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),uh(d)&&(d.addEventListener("focus",h=>K9(h,i)),!H9(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}function nS(e){return KR(e)&&"ownerSVGElement"in e}const fh=new WeakMap;let Si;const HD=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:nS(r)&&"getBBox"in r?r.getBBox()[t]:r[n],X9=HD("inline","width","offsetWidth"),W9=HD("block","height","offsetHeight");function Z9({target:e,borderBoxSize:t}){var n;(n=fh.get(e))==null||n.forEach(r=>{r(e,{get width(){return X9(e,t)},get height(){return W9(e,t)}})})}function Q9(e){e.forEach(Z9)}function J9(){typeof ResizeObserver>"u"||(Si=new ResizeObserver(Q9))}function eU(e,t){Si||J9();const n=ID(e);return n.forEach(r=>{let i=fh.get(r);i||(i=new Set,fh.set(r,i)),i.add(t),Si==null||Si.observe(r)}),()=>{n.forEach(r=>{const i=fh.get(r);i==null||i.delete(t),i!=null&&i.size||Si==null||Si.unobserve(r)})}}const hh=new Set;let Po;function tU(){Po=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};hh.forEach(t=>t(e))},window.addEventListener("resize",Po)}function nU(e){return hh.add(e),Po||tU(),()=>{hh.delete(e),!hh.size&&typeof Po=="function"&&(window.removeEventListener("resize",Po),Po=void 0)}}function oT(e,t){return typeof e=="function"?nU(e):eU(e,t)}function rU(e){return nS(e)&&e.tagName==="svg"}const aU=[...LD,Ut,Br],iU=e=>aU.find(zD(e)),lT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ro=()=>({x:lT(),y:lT()}),cT=()=>({min:0,max:0}),Kt=()=>({x:cT(),y:cT()}),sU=new WeakMap;function Um(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function xu(e){return typeof e=="string"||Array.isArray(e)}const rS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],aS=["initial",...rS];function Vm(e){return Um(e.animate)||aS.some(t=>xu(e[t]))}function FD(e){return!!(Vm(e)||e.variants)}function oU(e,t,n){for(const r in t){const i=t[r],l=n[r];if(dn(i))e.addValue(r,i);else if(dn(l))e.addValue(r,Xo(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,Xo(c!==void 0?c:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const q1={current:null},GD={current:!1},lU=typeof window<"u";function cU(){if(GD.current=!0,!!lU)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>q1.current=e.matches;e.addEventListener("change",t),t()}else q1.current=!1}const uT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Th={};function KD(e){Th=e}function uU(){return Th}class dU{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=Yw,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,ft.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=Vm(n),this.isVariantNode=FD(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&&dn(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,sU.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:(GD.current||cU(),this.shouldReduceMotion=q1.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&&TD.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:d,times:f,ease:h,duration:p}=n.accelerate,x=new _D({element:this.current,name:t,keyframes:d,times:f,ease:h,duration:Qn(p)}),y=c(x);this.valueSubscriptions.set(t,()=>{y(),x.cancel()});return}const r=Ml.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&ft.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 Th){const n=Th[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<uT.length;r++){const i=uT[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=oU(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=Xo(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"&&(GR(r)||YR(r))?r=parseFloat(r):!iU(r)&&Br.test(n)&&(r=BD(t,n)),this.setBaseTarget(t,dn(r)?r.get():r)),dn(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=Zw(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&&!dn(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 Bw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){eS.render(this.render)}}class YD extends dU{constructor(){super(...arguments),this.KeyframeResolver=B9}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;dn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Li{constructor(t){this.isMounted=!1,this.node=t}update(){}}function XD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function fU({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hU(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 ag(e){return e===void 0||e===1}function U1({scale:e,scaleX:t,scaleY:n}){return!ag(e)||!ag(t)||!ag(n)}function ds(e){return U1(e)||WD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function WD(e){return dT(e.x)||dT(e.y)}function dT(e){return e&&e!=="0%"}function Eh(e,t,n){const r=e-n,i=t*r;return n+i}function fT(e,t,n,r,i){return i!==void 0&&(e=Eh(e,i,r)),Eh(e,n,r)+t}function V1(e,t=0,n=1,r,i){e.min=fT(e.min,t,n,r,i),e.max=fT(e.max,t,n,r,i)}function ZD(e,{x:t,y:n}){V1(e.x,t.translate,t.scale,t.originPoint),V1(e.y,n.translate,n.scale,n.originPoint)}const hT=.999999999999,mT=1.0000000000001;function mU(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&&(Zr(e.x,-l.scroll.offset.x),Zr(e.y,-l.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,ZD(e,c)),r&&ds(l.latestValues)&&mh(e,l.latestValues,(d=l.layout)==null?void 0:d.layoutBox))}t.x<mT&&t.x>hT&&(t.x=1),t.y<mT&&t.y>hT&&(t.y=1)}function Zr(e,t){e.min+=t,e.max+=t}function pT(e,t,n,r,i=.5){const l=dt(e.min,e.max,i);V1(e,t,n,l,r)}function xT(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function mh(e,t,n){const r=n??e;pT(e.x,xT(t.x,r.x),t.scaleX,t.scale,t.originX),pT(e.y,xT(t.y,r.y),t.scaleY,t.scale,t.originY)}function QD(e,t){return XD(hU(e.getBoundingClientRect(),t))}function pU(e,t,n){const r=QD(e,n),{scroll:i}=t;return i&&(Zr(r.x,i.offset.x),Zr(r.y,i.offset.y)),r}const xU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yU=Cl.length;function gU(e,t,n){let r="",i=!0;for(let c=0;c<yU;c++){const d=Cl[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=I1(f,Oh[d]);if(!h){i=!1;const x=xU[d]||d;r+=`${x}(${p}) `}n&&(t[d]=p)}}const l=e.pathRotation;return l&&(i=!1,r+=`rotate(${I1(l,Oh.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function iS(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(Ml.has(f)){c=!0;continue}else if(cD(f)){i[f]=h;continue}else{const p=I1(h,Oh[f]);f.startsWith("origin")?(d=!0,l[f]=p):r[f]=p}}if(t.transform||(c||n?r.transform=gU(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 JD(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 yT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Bc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=yT(e,t.target.x),r=yT(e,t.target.y);return`${n}% ${r}%`}},vU={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Br.parse(e);if(i.length>5)return r;const l=Br.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=dt(d,f,.5);return typeof i[2+c]=="number"&&(i[2+c]/=h),typeof i[3+c]=="number"&&(i[3+c]/=h),l(i)}},H1={borderRadius:{...Bc,applyTo:[...Jw]},borderTopLeftRadius:Bc,borderTopRightRadius:Bc,borderBottomLeftRadius:Bc,borderBottomRightRadius:Bc,boxShadow:vU};function e5(e,{layout:t,layoutId:n}){return Ml.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!H1[e]||e==="opacity")}function sS(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)(dn(r[d])||i&&dn(i[d])||e5(d,e)||((c=n==null?void 0:n.getValue(d))==null?void 0:c.liveStyle)!==void 0)&&(l[d]=r[d]);return l}function bU(e){return window.getComputedStyle(e)}class jU extends YD{constructor(){super(...arguments),this.type="html",this.renderInstance=JD}readValueFromInstance(t,n){var r;if(Ml.has(n))return(r=this.projection)!=null&&r.isProjecting?E1(n):q7(t,n);{const i=bU(t),l=(cD(n)?i.getPropertyValue(n):i[n])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(t,{transformPagePoint:n}){return QD(t,n)}build(t,n,r){iS(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return sS(t,n,r)}}const wU={offset:"stroke-dashoffset",array:"stroke-dasharray"},SU={offset:"strokeDashoffset",array:"strokeDasharray"};function NU(e,t,n=1,r=0,i=!0){e.pathLength=1;const l=i?wU:SU;e[l.offset]=`${-r}`,e[l.array]=`${t} ${n}`}const AU=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function t5(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:l=1,pathOffset:c=0,...d},f,h,p){if(iS(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 AU)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&&NU(x,i,l,c,!1)}const n5=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"]),r5=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _U(e,t,n,r){JD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(n5.has(i)?i:Qw(i),t.attrs[i])}function a5(e,t,n){const r=sS(e,t,n);for(const i in e)if(dn(e[i])||dn(t[i])){const l=Cl.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[l]=e[i]}return r}class OU extends YD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ml.has(n)){const r=$D(n);return r&&r.default||0}return n=n5.has(n)?n:Qw(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return a5(t,n,r)}build(t,n,r){t5(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){_U(t,n,r,i)}mount(t){this.isSVGTag=r5(t.tagName),super.mount(t)}}const TU=aS.length;function i5(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?i5(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<TU;n++){const r=aS[n],i=e.props[r];(xu(i)||i===!1)&&(t[r]=i)}return t}function s5(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 EU=[...rS].reverse(),kU=rS.length;function CU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>T9(e,n,r)))}function MU(e){let t=CU(e),n=gT(),r=!0,i=!1;const l=h=>(p,x)=>{var j;const y=Ss(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=i5(e.parent)||{},y=[],j=new Set;let w={},S=1/0;for(let A=0;A<kU;A++){const O=EU[A],_=n[O],T=p[O]!==void 0?p[O]:x[O],N=xu(T),E=O===h?_.isActive:null;E===!1&&(S=A);let M=T===x[O]&&T!==p[O]&&N;if(M&&(r||i)&&e.manuallyAnimateOnMount&&(M=!1),_.protectedKeys={...w},!_.isActive&&E===null||!T&&!_.prevProp||Um(T)||typeof T=="boolean")continue;if(O==="exit"&&_.isActive&&E!==!0){_.prevResolvedValues&&(w={...w,..._.prevResolvedValues});continue}const R=PU(_.prevProp,T);let B=R||O===h&&_.isActive&&!M&&N||A>S&&N,z=!1;const D=Array.isArray(T)?T:[T];let L=D.reduce(l(O),{});E===!1&&(L={});const{prevResolvedValues:$={}}=_,F={...$,...L},H=Z=>{B=!0,j.has(Z)&&(z=!0,j.delete(Z)),_.needsAnimating[Z]=!0;const ie=e.getValue(Z);ie&&(ie.liveStyle=!1)};for(const Z in F){const ie=L[Z],ce=$[Z];if(w.hasOwnProperty(Z))continue;let q=!1;D1(ie)&&D1(ce)?q=!s5(ie,ce)||R:q=ie!==ce,q?ie!=null?H(Z):j.add(Z):ie!==void 0&&j.has(Z)?H(Z):_.protectedKeys[Z]=!0}_.prevProp=T,_.prevResolvedValues=L,_.isActive&&(w={...w,...L}),(r||i)&&e.blockInitialAnimation&&(B=!1);const I=M&&R;B&&(!I||z)&&y.push(...D.map(Z=>{const ie={type:O};if(typeof Z=="string"&&(r||i)&&!I&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,q=Ss(ce,Z);if(ce.enteringChildren&&q){const{delayChildren:Y}=q.transition||{};ie.delay=ED(ce.enteringChildren,e,Y)}}return{animation:Z,options:ie}}))}if(j.size){const A={};if(typeof p.initial!="boolean"){const O=Ss(e,Array.isArray(p.initial)?p.initial[0]:p.initial);O&&O.transition&&(A.transition=O.transition)}j.forEach(O=>{const _=e.getBaseTarget(O),T=e.getValue(O);T&&(T.liveStyle=!0),A[O]=_??null}),y.push({animation:A})}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=gT(),i=!0}}}function PU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!s5(t,e):!1}function ss(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gT(){return{animate:ss(!0),whileInView:ss(),whileHover:ss(),whileTap:ss(),whileDrag:ss(),whileFocus:ss(),exit:ss()}}function F1(e,t){e.min=t.min,e.max=t.max}function Mr(e,t){F1(e.x,t.x),F1(e.y,t.y)}function vT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const o5=1e-4,RU=1-o5,DU=1+o5,l5=.01,zU=0-l5,LU=0+l5;function jn(e){return e.max-e.min}function $U(e,t,n){return Math.abs(e-t)<=n}function bT(e,t,n,r=.5){e.origin=r,e.originPoint=dt(t.min,t.max,e.origin),e.scale=jn(n)/jn(t),e.translate=dt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=RU&&e.scale<=DU||isNaN(e.scale))&&(e.scale=1),(e.translate>=zU&&e.translate<=LU||isNaN(e.translate))&&(e.translate=0)}function au(e,t,n,r){bT(e.x,t.x,n.x,r?r.originX:void 0),bT(e.y,t.y,n.y,r?r.originY:void 0)}function jT(e,t,n,r=0){const i=r?dt(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+jn(t)}function BU(e,t,n,r){jT(e.x,t.x,n.x,r==null?void 0:r.x),jT(e.y,t.y,n.y,r==null?void 0:r.y)}function wT(e,t,n,r=0){const i=r?dt(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+jn(t)}function kh(e,t,n,r){wT(e.x,t.x,n.x,r==null?void 0:r.x),wT(e.y,t.y,n.y,r==null?void 0:r.y)}function ST(e,t,n,r,i){return e-=t,e=Eh(e,1/n,r),i!==void 0&&(e=Eh(e,1/i,r)),e}function IU(e,t=0,n=1,r=.5,i,l=e,c=e){if(ea.test(t)&&(t=parseFloat(t),t=dt(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=dt(l.min,l.max,r);e===l&&(d-=t),e.min=ST(e.min,t,n,d,i),e.max=ST(e.max,t,n,d,i)}function NT(e,t,[n,r,i],l,c){IU(e,t[n],t[r],t[i],t.scale,l,c)}const qU=["x","scaleX","originX"],UU=["y","scaleY","originY"];function AT(e,t,n,r){NT(e.x,t,qU,n?n.x:void 0,r?r.x:void 0),NT(e.y,t,UU,n?n.y:void 0,r?r.y:void 0)}function _T(e){return e.translate===0&&e.scale===1}function c5(e){return _T(e.x)&&_T(e.y)}function OT(e,t){return e.min===t.min&&e.max===t.max}function VU(e,t){return OT(e.x,t.x)&&OT(e.y,t.y)}function TT(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function u5(e,t){return TT(e.x,t.x)&&TT(e.y,t.y)}function ET(e){return jn(e.x)/jn(e.y)}function kT(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Wr(e){return[e("x"),e("y")]}function HU(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 FU=Jw.length,CT=e=>typeof e=="string"?parseFloat(e):e,MT=e=>typeof e=="number"||xe.test(e);function GU(e,t,n,r,i,l){i?(e.opacity=dt(0,n.opacity??1,KU(r)),e.opacityExit=dt(t.opacity??1,0,YU(r))):l&&(e.opacity=dt(t.opacity??1,n.opacity??1,r));for(let c=0;c<FU;c++){const d=Jw[c];let f=PT(t,d),h=PT(n,d);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||MT(f)===MT(h)?(e[d]=Math.max(dt(CT(f),CT(h),r),0),(ea.test(h)||ea.test(f))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=dt(t.rotate||0,n.rotate||0,r))}function PT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const KU=d5(0,.5,rD),YU=d5(.5,.95,br);function d5(e,t,n){return r=>r<e?0:r>t?1:n(mu(e,t,r))}function XU(e,t,n){const r=dn(e)?e:Xo(e);return r.start(Ww("",r,t,n)),r.animation}function yu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const WU=(e,t)=>e.depth-t.depth;class ZU{constructor(){this.children=[],this.isDirty=!1}add(t){Lw(this.children,t),this.isDirty=!0}remove(t){wh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(WU),this.isDirty=!1,this.children.forEach(t)}}function QU(e,t){const n=bn.now(),r=({timestamp:i})=>{const l=i-n;l>=t&&(Mi(r),e(l-t))};return ft.setup(r,!0),()=>Mi(r)}function ph(e){return dn(e)?e.get():e}class JU{constructor(){this.members=[]}add(t){Lw(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&&(wh(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(wh(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 xh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ig=["","X","Y","Z"],eV=1e3;let tV=0;function sg(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function f5(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=RD(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(i||l))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&f5(r)}function h5({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(c={},d=t==null?void 0:t()){this.id=tV++,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(aV),this.nodes.forEach(uV),this.nodes.forEach(dV),this.nodes.forEach(iV)},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 ZU)}addEventListener(c,d){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Bw),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=nS(c)&&!rU(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;ft.read(()=>{x=window.innerWidth}),e(c,()=>{const j=window.innerWidth;j!==x&&(x=j,this.root.updateBlockedByResize=!0,p&&p(),p=QU(y,250),xh.hasAnimatedSinceResize&&(xh.hasAnimatedSinceResize=!1,this.nodes.forEach(zT)))})}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()||xV,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=h.getProps(),A=!this.targetLayout||!u5(this.targetLayout,j),O=!x&&y;if(this.options.layoutRoot||this.resumeFrom||O||x&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...Xw(w,"layout"),onPlay:S,onComplete:v};(h.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(p,O,_.path)}else x||zT(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(fV),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&&f5(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(oV),this.nodes.forEach(RT);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(DT);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(lV),this.nodes.forEach(cV),this.nodes.forEach(nV),this.nodes.forEach(rV)):this.nodes.forEach(DT),this.clearAllSnapshots();const d=bn.now();un.delta=ra(0,1e3/60,d-un.timestamp),un.timestamp=d,un.isProcessing=!0,Zy.update.process(un),Zy.preRender.process(un),Zy.render.process(un),un.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sV),this.sharedNodes.forEach(hV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!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&&!c5(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;c&&this.instance&&(d||ds(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)),yV(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(gV))){const{scroll:p}=this.root;p&&(Zr(d.x,p.offset.x),Zr(d.y,p.offset.y))}return d}removeElementScroll(c){var f;const d=Kt();if(Mr(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&&Mr(d,c),Zr(d.x,x.offset.x),Zr(d.y,x.offset.y))}return d}applyTransform(c,d=!1,f){var p,x;const h=f||Kt();Mr(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&&(Zr(h.x,-j.scroll.offset.x),Zr(h.y,-j.scroll.offset.y)),ds(j.latestValues)&&mh(h,j.latestValues,(p=j.layout)==null?void 0:p.layoutBox)}return ds(this.latestValues)&&mh(h,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),h}removeTransform(c){var f;const d=Kt();Mr(d,c);for(let h=0;h<this.path.length;h++){const p=this.path[h];if(!ds(p.latestValues))continue;let x;p.instance&&(U1(p.latestValues)&&p.updateSnapshot(),x=Kt(),Mr(x,p.measurePageBox())),AT(d,p.latestValues,(f=p.snapshot)==null?void 0:f.layoutBox,x)}return ds(this.latestValues)&&AT(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!==un.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=un.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(),BU(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Mr(this.target,this.layout.layoutBox),ZD(this.target,this.targetDelta)):Mr(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||U1(this.parent.latestValues)||WD(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(),kh(this.relativeTargetOrigin,d,f,this.options.layoutAnchor||void 0),Mr(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===un.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;Mr(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,y=this.treeScale.y;mU(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():(vT(this.prevProjectionDelta.x,this.projectionDelta.x),vT(this.prevProjectionDelta.y,this.projectionDelta.y)),au(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==y||!kT(this.projectionDelta.x,this.prevProjectionDelta.x)||!kT(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=Ro(),this.projectionDelta=Ro(),this.projectionDeltaWithTransform=Ro()}setAnimationOrigin(c,d=!1,f){const h=this.snapshot,p=h?h.latestValues:{},x={...this.latestValues},y=Ro();(!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,A=this.getStack(),O=!A||A.members.length<=1,_=!!(v&&!O&&this.options.crossfade===!0&&!this.path.some(pV));this.animationProgress=0;let T;const N=f==null?void 0:f.interpolateProjection(c);this.mixTargetDelta=E=>{const M=E/1e3,R=N==null?void 0:N(M);R?(y.x.translate=R.x,y.x.scale=dt(c.x.scale,1,M),y.x.origin=c.x.origin,y.x.originPoint=c.x.originPoint,y.y.translate=R.y,y.y.scale=dt(c.y.scale,1,M),y.y.origin=c.y.origin,y.y.originPoint=c.y.originPoint):(LT(y.x,c.x,M),LT(y.y,c.y,M)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kh(j,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),mV(this.relativeTarget,this.relativeTargetOrigin,j,M),T&&VU(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Kt()),Mr(T,this.relativeTarget)),v&&(this.animationValues=x,GU(x,p,this.latestValues,M,_,O)),R&&R.rotate!==void 0&&(this.animationValues||(this.animationValues=x),this.animationValues.pathRotation=R.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},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=ft.update(()=>{xh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xo(0)),this.motionValue.jump(0,!1),this.currentAnimation=XU(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(eV),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&&m5(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}Mr(d,f),mh(d,p),au(this.projectionDeltaWithTransform,this.layoutCorrected,d,p)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new JU),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&&sg("z",c,h,this.animationValues);for(let p=0;p<ig.length;p++)sg(`rotate${ig[p]}`,c,h,this.animationValues),sg(`skew${ig[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=ph(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=ph(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!ds(this.latestValues)&&(c.transform=f?f({},""):"none",this.hasProjected=!1);return}c.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let x=HU(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 H1){if(p[w]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:A}=H1[w],O=x==="none"?p[w]:S(p[w],h);if(v){const _=v.length;for(let T=0;T<_;T++)c[v[T]]=O}else A?this.options.visualElement.renderState.vars[w]=O:c[w]=O}this.options.layoutId&&(c.pointerEvents=h===this?ph(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(RT),this.root.sharedNodes.clear()}}}function nV(e){e.updateLayout()}function rV(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")Wr(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";F1(c?t.measuredBox[x]:t.layoutBox[x],r[x])}else m5(l,t.layoutBox,r)&&Wr(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=Ro();au(d,r,t.layoutBox);const f=Ro();c?au(f,e.applyTransform(i,!0),t.measuredBox):au(f,r,t.layoutBox);const h=!c5(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();kh(S,t.layoutBox,y.layoutBox,w);const v=Kt();kh(v,r,j.layoutBox,w),u5(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 aV(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 iV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function sV(e){e.clearSnapshot()}function RT(e){e.clearMeasurements()}function oV(e){e.isLayoutDirty=!0,e.updateLayout()}function DT(e){e.isLayoutDirty=!1}function lV(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function cV(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uV(e){e.resolveTargetDelta()}function dV(e){e.calcProjection()}function fV(e){e.resetSkewAndRotation()}function hV(e){e.removeLeadSnapshot()}function LT(e,t,n){e.translate=dt(t.translate,0,n),e.scale=dt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $T(e,t,n,r){e.min=dt(t.min,n.min,r),e.max=dt(t.max,n.max,r)}function mV(e,t,n,r){$T(e.x,t.x,n.x,r),$T(e.y,t.y,n.y,r)}function pV(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xV={duration:.45,ease:[.4,0,.1,1]},BT=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),IT=BT("applewebkit/")&&!BT("chrome/")?Math.round:br;function qT(e){e.min=IT(e.min),e.max=IT(e.max)}function yV(e){qT(e.x),qT(e.y)}function m5(e,t,n){return e==="position"||e==="preserve-aspect"&&!$U(ET(t),ET(n),.2)}function gV(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const vV=h5({attachResizeListener:(e,t)=>yu(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}),og={current:void 0},p5=h5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!og.current){const e=new vV({});e.mount(window),e.setOptions({layoutScroll:!0}),og.current=e}return og.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),oS=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function UT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bV(...e){return t=>{let n=!1;const r=e.map(i=>{const l=UT(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():UT(e[i],null)}}}}function jV(...e){return k.useCallback(bV(...e),e)}class wV extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(uh(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=uh(r)&&r.offsetWidth||0,l=uh(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 SV({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:l}){var y;const c=k.useId(),d=k.useRef(null),f=k.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=k.useContext(oS),p=((y=e.props)==null?void 0:y.ref)??(e==null?void 0:e.ref),x=jV(d,p);return k.useInsertionEffect(()=>{const{width:j,height:w,top:S,left:v,right:A,bottom:O,direction:_}=f.current;if(t||l===!1||!d.current||!j||!w)return;const T=_==="rtl",N=n==="left"?T?`right: ${A}`:`left: ${v}`:T?`left: ${v}`:`right: ${A}`,E=r==="bottom"?`bottom: ${O}`:`top: ${S}`;d.current.dataset.motionPopId=c;const M=document.createElement("style");h&&(M.nonce=h);const R=i??document.head;return R.appendChild(M),M.sheet&&M.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 B;(B=d.current)==null||B.removeAttribute("data-motion-pop-id"),R.contains(M)&&R.removeChild(M)}},[t]),s.jsx(wV,{isPresent:t,childRef:d,sizeRef:f,pop:l,children:l===!1?e:k.cloneElement(e,{ref:x})})}const NV=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:l,mode:c,anchorX:d,anchorY:f,root:h})=>{const p=Dw(AV),x=k.useId(),y=k.useRef(n),j=k.useRef(r);zw(()=>{y.current=n,j.current=r});let w=!0,S=k.useMemo(()=>(w=!1,{id:x,initial:t,isPresent:n,custom:i,onExitComplete:v=>{p.set(v,!0);for(const A of p.values())if(!A)return;r&&r()},register:v=>(p.set(v,!1),()=>{var A;p.delete(v),!y.current&&!p.size&&((A=j.current)==null||A.call(j))})}),[n,p,r]);return l&&w&&(S={...S}),k.useMemo(()=>{p.forEach((v,A)=>p.set(A,!1))},[n]),k.useEffect(()=>{!n&&!p.size&&r&&r()},[n]),e=s.jsx(SV,{pop:c==="popLayout",isPresent:n,anchorX:d,anchorY:f,root:h,children:e}),s.jsx(Im.Provider,{value:S,children:e})};function AV(){return new Map}function x5(e=!0){const t=k.useContext(Im);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,l=k.useId();k.useEffect(()=>{if(e)return i(l)},[e]);const c=k.useCallback(()=>e&&r&&r(l),[l,r,e]);return!n&&r?[!1,c]:[!0]}const Bf=e=>e.key||"";function VT(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const Qr=({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]=x5(c),y=k.useMemo(()=>VT(e),[e]),j=c&&!p?[]:y.map(Bf),w=k.useRef(!0),S=k.useRef(y),v=Dw(()=>new Map),A=k.useRef(new Set),[O,_]=k.useState(y),[T,N]=k.useState(y);zw(()=>{w.current=!1,S.current=y;for(let R=0;R<T.length;R++){const B=Bf(T[R]);j.includes(B)?(v.delete(B),A.current.delete(B)):v.get(B)!==!0&&v.set(B,!1)}},[T,j.length,j.join("-")]);const E=[];if(y!==O){let R=[...y];for(let B=0;B<T.length;B++){const z=T[B],D=Bf(z);j.includes(D)||(R.splice(B,0,z),E.push(z))}return l==="wait"&&E.length&&(R=E),N(VT(R)),_(y),null}const{forceRender:M}=k.useContext(Rw);return s.jsx(s.Fragment,{children:T.map(R=>{const B=Bf(R),z=c&&!p?!1:y===T||j.includes(B),D=()=>{if(A.current.has(B))return;if(v.has(B))A.current.add(B),v.set(B,!0);else return;let L=!0;v.forEach($=>{$||(L=!1)}),L&&(M==null||M(),N(S.current),c&&(x==null||x()),r&&r())};return s.jsx(NV,{isPresent:z,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:l,root:h,onExitComplete:z?void 0:D,anchorX:d,anchorY:f,children:R},B)})})},y5=k.createContext({strict:!1}),HT={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 FT=!1;function _V(){if(FT)return;const e={};for(const t in HT)e[t]={isEnabled:n=>HT[t].some(r=>!!n[r])};KD(e),FT=!0}function g5(){return _V(),uU()}function OV(e){const t=g5();for(const n in e)t[n]={...t[n],...e[n]};KD(t)}const TV=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 Ch(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||TV.has(e)}let v5=e=>!Ch(e);function EV(e){typeof e=="function"&&(v5=t=>t.startsWith("on")?!Ch(t):e(t))}try{EV(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"||dn(e[i])||(v5(i)||n===!0&&Ch(i)||!t&&!Ch(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Hm=k.createContext({});function CV(e,t){if(Vm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||xu(n)?n:void 0,animate:xu(r)?r:void 0}}return e.inherit!==!1?t:{}}function MV(e){const{initial:t,animate:n}=CV(e,k.useContext(Hm));return k.useMemo(()=>({initial:t,animate:n}),[GT(t),GT(n)])}function GT(e){return Array.isArray(e)?e.join(" "):e}const lS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function b5(e,t,n){for(const r in t)!dn(t[r])&&!e5(r,n)&&(e[r]=t[r])}function PV({transformTemplate:e},t){return k.useMemo(()=>{const n=lS();return iS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function RV(e,t){const n=e.style||{},r={};return b5(r,n,e),Object.assign(r,PV(e,t)),r}function DV(e,t){const n={},r=RV(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 j5=()=>({...lS(),attrs:{}});function zV(e,t,n,r){const i=k.useMemo(()=>{const l=j5();return t5(l,t,r5(r),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};b5(l,e.style,e),i.style={...l,...i.style}}return i}const LV=["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 cS(e){return typeof e!="string"||e.includes("-")?!1:!!(LV.indexOf(e)>-1||/[A-Z]/u.test(e))}function $V(e,t,n,{latestValues:r},i,l=!1,c){const f=(c??cS(e)?zV:DV)(t,r,i,e),h=kV(t,typeof e=="string",l),p=e!==k.Fragment?{...h,...f,ref:n}:{},{children:x}=t,y=k.useMemo(()=>dn(x)?x.get():x,[x]);return k.createElement(e,{...p,children:y})}function BV({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:IV(n,r,i,e),renderState:t()}}function IV(e,t,n,r){const i={},l=r(e,{});for(const y in l)i[y]=ph(l[y]);let{initial:c,animate:d}=e;const f=Vm(e),h=FD(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"&&!Um(x)){const y=Array.isArray(x)?x:[x];for(let j=0;j<y.length;j++){const w=Zw(e,y[j]);if(w){const{transitionEnd:S,transition:v,...A}=w;for(const O in A){let _=A[O];if(Array.isArray(_)){const T=p?_.length-1:0;_=_[T]}_!==null&&(i[O]=_)}for(const O in S)i[O]=S[O]}}}return i}const w5=e=>(t,n)=>{const r=k.useContext(Hm),i=k.useContext(Im),l=()=>BV(e,t,r,i);return n?l():Dw(l)},qV=w5({scrapeMotionValuesFromProps:sS,createRenderState:lS}),UV=w5({scrapeMotionValuesFromProps:a5,createRenderState:j5}),VV=Symbol.for("motionComponentSymbol");function HV(e,t,n){const r=k.useRef(n);k.useInsertionEffect(()=>{r.current=n});const i=k.useRef(null);return k.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 S5=k.createContext({});function Co(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function FV(e,t,n,r,i,l){var _,T;const{visualElement:c}=k.useContext(Hm),d=k.useContext(y5),f=k.useContext(Im),h=k.useContext(oS),p=h.reducedMotion,x=h.skipAnimations,y=k.useRef(null),j=k.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=k.useContext(S5);w&&!w.projection&&i&&(w.type==="html"||w.type==="svg")&&GV(y.current,n,i,S);const v=k.useRef(!1);k.useInsertionEffect(()=>{w&&v.current&&w.update(n,f)});const A=n[PD],O=k.useRef(!!A&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,A))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,A)));return zw(()=>{j.current=!0,w&&(v.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),O.current&&w.animationState&&w.animationState.animateChanges())}),k.useEffect(()=>{w&&(!O.current&&w.animationState&&w.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var N;(N=window.MotionHandoffMarkAsComplete)==null||N.call(window,A)}),O.current=!1),w.enteringChildren=void 0)}),w}function GV(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:N5(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 N5(e){if(e)return e.options.allowProjection!==!1?e.projection:N5(e.parent)}function lg(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&OV(r);const l=n?n==="svg":cS(e),c=l?UV:qV;function d(h,p){let x;const y={...k.useContext(oS),...h,layoutId:KV(h)},{isStatic:j}=y,w=MV(h),S=c(h,j);if(!j&&typeof window<"u"){YV();const v=XV(y);x=v.MeasureLayout,w.visualElement=FV(e,S,y,i,v.ProjectionNode,l)}return s.jsxs(Hm.Provider,{value:w,children:[x&&w.visualElement?s.jsx(x,{visualElement:w.visualElement,...y}):null,$V(e,h,HV(S,w.visualElement,p),S,j,t,l)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=k.forwardRef(d);return f[VV]=e,f}function KV({layoutId:e}){const t=k.useContext(Rw).id;return t&&e!==void 0?t+"-"+e:e}function YV(e,t){k.useContext(y5).strict}function XV(e){const t=g5(),{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 WV(e,t){if(typeof Proxy>"u")return lg;const n=new Map,r=(l,c)=>lg(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,lg(c,void 0,e,t)),n.get(c))})}const ZV=(e,t)=>t.isSVG??cS(e)?new OU(t):new jU(t,{allowProjection:e!==k.Fragment});class QV extends Li{constructor(t){super(t),t.animationState||(t.animationState=MU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Um(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 JV=0;class eH extends Li{constructor(){super(...arguments),this.id=JV++,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=Ss(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 tH={animation:{Feature:QV},exit:{Feature:eH}};function id(e){return{point:{x:e.pageX,y:e.pageY}}}const nH=e=>t=>tS(t)&&e(t,id(t));function iu(e,t,n,r){return yu(e,t,nH(n),r)}const A5=({current:e})=>e?e.ownerDocument.defaultView:null,KT=(e,t)=>Math.abs(e-t);function rH(e,t){const n=KT(e.x,t.x),r=KT(e.y,t.y);return Math.sqrt(n**2+r**2)}const YT=new Set(["auto","scroll"]);class _5{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=If(this.lastRawMoveEventInfo,this.transformPagePoint));const w=cg(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,v=rH(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!v)return;const{point:A}=w,{timestamp:O}=un;this.history.push({...A,timestamp:O});const{onStart:_,onMove:T}=this.handlers;S||(_&&_(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,w)},this.handlePointerMove=(w,S)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=S,this.lastMoveEventInfo=If(S,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(w,S)=>{this.end();const{onEnd:v,onSessionEnd:A,resumeAnimation:O}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=cg(w.type==="pointercancel"?this.lastMoveEventInfo:If(S,this.transformPagePoint),this.history);this.startEvent&&v&&v(w,_),A&&A(w,_)},!tS(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=i||window;const f=id(t),h=If(f,this.transformPagePoint),{point:p}=h,{timestamp:x}=un;this.history=[{...p,timestamp:x}];const{onSessionStart:y}=n;y&&y(t,cg(h,this.history));const j={passive:!0,capture:!0};this.removeListeners=nd(iu(this.contextWindow,"pointermove",this.handlePointerMove,j),iu(this.contextWindow,"pointerup",this.handlePointerUp,j),iu(this.contextWindow,"pointercancel",this.handlePointerUp,j)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(YT.has(r.overflowX)||YT.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),ft.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 If(e,t){return t?{point:t(e.point)}:e}function XT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cg({point:e},t){return{point:e,delta:XT(e,O5(t)),offset:XT(e,aH(t)),velocity:iH(t,.1)}}function aH(e){return e[0]}function O5(e){return e[e.length-1]}function iH(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=O5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Qn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Qn(t)*2&&(r=e[1]);const l=gr(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 sH(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?dt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?dt(n,e,r.max):Math.min(e,n)),e}function WT(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 oH(e,{top:t,left:n,bottom:r,right:i}){return{x:WT(e.x,n,i),y:WT(e.y,t,r)}}function ZT(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 lH(e,t){return{x:ZT(e.x,t.x),y:ZT(e.y,t.y)}}function cH(e,t){let n=.5;const r=jn(e),i=jn(t);return i>r?n=mu(t.min,t.max-r,e.min):r>i&&(n=mu(e.min,e.max-i,t.min)),ra(0,1,n)}function uH(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 G1=.35;function dH(e=G1){return e===!1?e=0:e===!0&&(e=G1),{x:QT(e,"left","right"),y:QT(e,"top","bottom")}}function QT(e,t,n){return{min:JT(e,t),max:JT(e,n)}}function JT(e,t){return typeof e=="number"?e:e[t]||0}const fH=new WeakMap;class hH{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(id(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=I9(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),Wr(A=>{let O=this.getAxisMotionValue(A).get()||0;if(ea.test(O)){const{projection:_}=this.visualElement;if(_&&_.layout){const T=_.layout.layoutBox[A];T&&(O=jn(T)*(parseFloat(O)/100))}}this.originPoint[A]=O}),S&&ft.update(()=>S(x,y),!1,!0),z1(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:A}=y;if(w&&this.currentDirection===null){this.currentDirection=pH(A),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",y.point,A),this.updateAxis("y",y.point,A),this.visualElement.render(),v&&ft.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 _5(t,{onSessionStart:l,onStart:c,onMove:d,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:r,contextWindow:A5(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&&ft.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||!qf(t,i,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=sH(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=oH(r.layoutBox,t):this.constraints=!1,this.elastic=dH(n),i!==this.constraints&&!Co(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Wr(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=uH(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=pU(r,i.root,this.visualElement.getTransformPagePoint());let c=lH(i.layout.layoutBox,l);if(n){const d=n(fU(c));this.hasMutatedConstraints=!!d,d&&(c=XD(d))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},h=Wr(p=>{if(!qf(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 z1(this.visualElement,t),r.start(Ww(t,r,0,n,this.visualElement,!1))}stopAnimation(){Wr(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){Wr(n=>{const{drag:r}=this.getProps();if(!qf(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]-dt(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};Wr(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const f=d.get();i[c]=cH({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(),Wr(c=>{if(!qf(c,t,null))return;const d=this.getAxisMotionValue(c),{min:f,max:h}=this.constraints[c];d.set(dt(f,h,i[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;fH.set(this.visualElement,this);const t=this.visualElement.current,n=iu(t,"pointerdown",h=>{const{drag:p,dragListener:x=!0}=this.getProps(),y=h.target,j=y!==t&&G9(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=mH(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",i);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),ft.read(i);const d=yu(window,"resize",()=>this.scalePositionWithinConstraints()),f=l.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(Wr(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=G1,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function eE(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function mH(e,t,n){const r=oT(e,eE(n)),i=oT(t,eE(n));return()=>{r(),i()}}function qf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class xH extends Li{constructor(t){super(t),this.removeGroupControls=br,this.removeListeners=br,this.controls=new hH(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||br}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 ug=e=>(t,n)=>{e&&ft.update(()=>e(t,n),!1,!0)};class yH extends Li{constructor(){super(...arguments),this.removePointerDownListener=br}onPointerDown(t){this.session=new _5(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:A5(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ug(t),onStart:ug(n),onMove:ug(r),onEnd:(l,c)=>{delete this.session,i&&ft.postRender(()=>i(l,c))}}}mount(){this.removePointerDownListener=iu(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 dg=!1;class gH extends k.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),dg&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),xh.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}),dg=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||ft.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(),eS.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;dg=!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 T5(e){const[t,n]=x5(),r=k.useContext(Rw);return s.jsx(gH,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(S5),isPresent:t,safeToRemove:n})}const vH={pan:{Feature:yH},drag:{Feature:xH,ProjectionNode:p5,MeasureLayout:T5}};function tE(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&&ft.postRender(()=>l(t,id(t)))}class bH extends Li{mount(){const{current:t}=this.node;t&&(this.unmount=U9(t,(n,r)=>(tE(this.node,r,"Start"),i=>tE(this.node,i,"End"))))}unmount(){}}class jH extends Li{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=nd(yu(this.node.current,"focus",()=>this.onFocus()),yu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function nE(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&&ft.postRender(()=>l(t,id(t)))}class wH extends Li{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Y9(t,(i,l)=>(nE(this.node,l,"Start"),(c,{success:d})=>nE(this.node,c,d?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const K1=new WeakMap,fg=new WeakMap,SH=e=>{const t=K1.get(e.target);t&&t(e)},NH=e=>{e.forEach(SH)};function AH({root:e,...t}){const n=e||document;fg.has(n)||fg.set(n,{});const r=fg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(NH,{root:e,...t})),r[i]}function _H(e,t,n){const r=AH(t);return K1.set(e,n),r.observe(e),()=>{K1.delete(e),r.unobserve(e)}}const OH={some:0,all:1};class TH extends Li{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:OH[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=_H(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(EH(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function EH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kH={inView:{Feature:TH},tap:{Feature:wH},focus:{Feature:jH},hover:{Feature:bH}},CH={layout:{ProjectionNode:p5,MeasureLayout:T5}},MH={...tH,...kH,...vH,...CH},Ge=WV(MH,ZV),E5=FR(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 PH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),k5=(...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 RH={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 DH=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:c,...d},f)=>k.createElement("svg",{ref:f,...RH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:k5("lucide",i),...d},[...c.map(([h,p])=>k.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=k.forwardRef(({className:r,...i},l)=>k.createElement(DH,{ref:l,iconNode:t,className:k5(`lucide-${PH(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 zH=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 LH=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 $H=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 BH=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 uS=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 Y1=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 C5=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 X1=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 Mh=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 rE=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 Wo=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 Ia=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 Zo=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 yh=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 IH=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 qH=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 Fm=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 M5=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 Io=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 Ir=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 jr=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 Dn=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 Ph=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 UH=le("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xt=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 VH=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 P5=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 fS=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 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 R5=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 D5=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 aE=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 Sr=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 Pl=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 KH=le("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
* @license lucide-react v0.460.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("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 YH=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 gn=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 Ns=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 iE=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 XH=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 WH=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 Uf=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 ZH=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 sE=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 mS=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 QH=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 JH=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 Rh=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 pS=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 hg=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 An=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 W1=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 eF=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 B5=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 tF=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 gh=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 nF=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 rF=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 I5=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 aF=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 q5=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 iF=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 sF=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 oE=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 Z1=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 lE=le("PenTool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/**
* @license lucide-react v0.460.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("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 Q1=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 _n=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 Ei=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 oF=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 lF=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 uE=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 zs=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 gu=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 Dh=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 U5=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 xS=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 Da=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 cF=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 V5=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 uF=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 H5=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 dF=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 F5=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 aa=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 fn=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 fF=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 J1=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 dE=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 Qo=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 qr=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 G5=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 qo=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 Nr=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 hF=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 Uo=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 K5(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=K5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Le(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=K5(e))&&(r&&(r+=" "),r+=t);return r}const yS="-",mF=e=>{const t=xF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const d=c.split(yS);return d[0]===""&&d.length!==1&&d.shift(),Y5(d,t)||pF(c)},getConflictingClassGroupIds:(c,d)=>{const f=n[c]||[];return d&&r[c]?[...f,...r[c]]:f}}},Y5=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Y5(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(yS);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},fE=/^\[(.+)\]$/,pF=e=>{if(fE.test(e)){const t=fE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},xF=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gF(Object.entries(e.classGroups),n).forEach(([l,c])=>{ej(c,r,l,t)}),r},ej=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:hE(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(yF(i)){ej(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{ej(c,hE(t,l),n,r)})})},hE=(e,t)=>{let n=e;return t.split(yS).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yF=e=>e.isThemeGetter,gF=(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,vF=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)}}},X5="!",bF=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 A=d[v];if(h===0){if(A===i&&(r||d.slice(v,v+l)===t)){f.push(d.slice(p,v)),p=v+l;continue}if(A==="/"){x=v;continue}}A==="["?h++:A==="]"&&h--}const y=f.length===0?d:d.substring(p),j=y.startsWith(X5),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},jF=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},wF=e=>({cache:vF(e.cacheSize),parseClassName:bF(e),...mF(e)}),SF=/\s+/,NF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,l=[],c=e.trim().split(SF);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=jF(p).join(":"),A=x?v+X5:v,O=A+S;if(l.includes(O))continue;l.push(O);const _=i(S,w);for(let T=0;T<_.length;++T){const N=_[T];l.push(A+N)}d=h+(d.length>0?" "+d:d)}return d};function AF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=W5(t))&&(r&&(r+=" "),r+=n);return r}const W5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=W5(e[r]))&&(n&&(n+=" "),n+=t);return n};function _F(e,...t){let n,r,i,l=c;function c(f){const h=t.reduce((p,x)=>x(p),e());return n=wF(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=NF(f,n);return i(f,p),p}return function(){return l(AF.apply(null,arguments))}}const jt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Z5=/^\[(?:([a-z-]+):)?(.+)\]$/i,OF=/^\d+\/\d+$/,TF=new Set(["px","full","screen"]),EF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kF=/\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)/,PF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ta=e=>Vo(e)||TF.has(e)||OF.test(e),ji=e=>Rl(e,"length",qF),Vo=e=>!!e&&!Number.isNaN(Number(e)),mg=e=>Rl(e,"number",Vo),Ic=e=>!!e&&Number.isInteger(Number(e)),RF=e=>e.endsWith("%")&&Vo(e.slice(0,-1)),Ie=e=>Z5.test(e),wi=e=>EF.test(e),DF=new Set(["length","size","percentage"]),zF=e=>Rl(e,DF,Q5),LF=e=>Rl(e,"position",Q5),$F=new Set(["image","url"]),BF=e=>Rl(e,$F,VF),IF=e=>Rl(e,"",UF),qc=()=>!0,Rl=(e,t,n)=>{const r=Z5.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},qF=e=>kF.test(e)&&!CF.test(e),Q5=()=>!1,UF=e=>MF.test(e),VF=e=>PF.test(e),HF=()=>{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"),A=jt("opacity"),O=jt("padding"),_=jt("saturate"),T=jt("scale"),N=jt("sepia"),E=jt("skew"),M=jt("space"),R=jt("translate"),B=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Ie,t],L=()=>[Ie,t],$=()=>["",Ta,ji],F=()=>["auto",Vo,Ie],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],ie=()=>["","0",Ie],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Vo,Ie];return{cacheSize:500,separator:":",theme:{colors:[qc],spacing:[Ta,ji],blur:["none","",wi,Ie],brightness:q(),borderColor:[e],borderRadius:["none","","full",wi,Ie],borderSpacing:L(),borderWidth:$(),contrast:q(),grayscale:ie(),hueRotate:q(),invert:ie(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[RF,ji],inset:D(),margin:D(),opacity:q(),padding:L(),saturate:q(),scale:q(),sepia:ie(),skew:q(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],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:[...H(),Ie]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],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",Ic,Ie]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",Ic,Ie]}],"grid-cols":[{"grid-cols":[qc]}],"col-start-end":[{col:["auto",{span:["full",Ic,Ie]},Ie]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[qc]}],"row-start-end":[{row:["auto",{span:[Ic,Ie]},Ie]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"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":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,t]}],"min-w":[{"min-w":[Ie,t,"min","max","fit"]}],"max-w":[{"max-w":[Ie,t,"none","full","min","max","fit","prose",{screen:[wi]},wi]}],h:[{h:[Ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,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",mg]}],"font-family":[{font:[qc]}],"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",Ie]}],"line-clamp":[{"line-clamp":["none",Vo,mg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ta,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ta,ji]}],"underline-offset":[{"underline-offset":["auto",Ta,Ie]}],"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:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],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",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),LF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},BF]}],"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":[A]}],"border-style":[{border:[...I(),"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":[A]}],"divide-style":[{divide:I()}],"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:["",...I()]}],"outline-offset":[{"outline-offset":[Ta,Ie]}],"outline-w":[{outline:[Ta,ji]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[Ta,ji]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wi,IF]}],"shadow-color":[{shadow:[qc]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",wi,Ie]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[x]}],saturate:[{saturate:[_]}],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":[A]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"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",Ie]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Ic,Ie]}],"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",Ie]}],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",Ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",Ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ta,ji,mg]}],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"]}}},FF=_F(HF);function xt(...e){return FF(Le(e))}function Ee(e,t="SEK"){return e==null||isNaN(e)?"-":new Intl.NumberFormat("sv-SE",{style:"currency",currency:t,maximumFractionDigits:0}).format(e)}function mE(e){return new Intl.NumberFormat("sv-SE").format(e)}function Nt(e){return new Intl.DateTimeFormat("sv-SE",{year:"numeric",month:"short",day:"numeric"}).format(new Date(e))}function GF(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`:Nt(e)}function KF(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}const YF=[{label:"Översikt",items:[{path:"/",label:"Briefing",icon:q5},{path:"/dashboard",label:"Dashboard",icon:mS},{path:"/mail",label:"Mail",icon:An}]},{label:"Produkter",items:[{path:"/alva",label:"Alva",icon:Ti},{path:"/amos",label:"AMOS",icon:dS},{path:"/quixzoom",label:"quiXzoom",icon:gn},{path:"/landvex",label:"Landvex",icon:P5}]},{label:"Verksamhet",items:[{path:"/crm",label:"CRM",icon:qr},{path:"/sales",label:"Sales",icon:aa},{path:"/marketing",label:"Marketing",icon:B5},{path:"/social",label:"Social",icon:xS},{path:"/finance",label:"Finance",icon:qo},{path:"/accounting",label:"Accounting",icon:Wo},{path:"/hr",label:"HR",icon:Wo},{path:"/legal",label:"Legal",icon:Sr},{path:"/compliance",label:"Compliance",icon:Da},{path:"/support",label:"Support",icon:Ns},{path:"/projects",label:"Projects",icon:hS},{path:"/automation",label:"Automation",icon:Uo}]}];function XF(){const{sidebarOpen:e,toggleSidebar:t}=E5(),{logout:n,isAuthenticated:r}=tr(),i=On(),[l,c]=k.useState({Översikt:!0,Produkter:!0,Verksamhet:!0}),d=h=>{c(p=>({...p,[h]:!p[h]}))},f=()=>{n(),window.location.href="/login"};return s.jsxs(s.Fragment,{children:[s.jsx(Qr,{children:e&&s.jsx(Ge.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(Ge.aside,{initial:!1,animate:{width:e?240:72},transition:{duration:.2,ease:"easeOut"},className:xt("fixed left-0 top-0 h-full bg-sidebar z-50 flex flex-col","border-r border-border/60",e?"px-3":"px-2"),children:[s.jsxs("div",{className:"h-14 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(Qr,{children:e&&s.jsx(Ge.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:"BOC"})})]}),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(M5,{size:14}):s.jsx(Io,{size:14})})]}),s.jsx("nav",{className:"flex-1 py-2 overflow-y-auto space-y-1",children:YF.map(h=>s.jsxs("div",{children:[s.jsx("button",{onClick:()=>d(h.label),className:xt("w-full flex items-center justify-between px-3 h-8 rounded-lg transition-colors","text-text-tertiary hover:text-text-secondary",!e&&"justify-center"),children:e?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",children:h.label}),s.jsx(Fm,{size:14,className:xt("transition-transform",!l[h.label]&&"-rotate-90")})]}):s.jsx("div",{className:"w-1 h-1 rounded-full bg-text-tertiary"})}),s.jsx(Qr,{initial:!1,children:(l[h.label]||!e)&&s.jsx(Ge.div,{initial:e?{height:0,opacity:0}:!1,animate:{height:"auto",opacity:1},exit:e?{height:0,opacity:0}:!1,transition:{duration:.15},className:"space-y-0.5 overflow-hidden",children:h.items.map(p=>{const x=i.pathname===p.path||p.path!=="/"&&i.pathname.startsWith(p.path),y=p.icon;return s.jsxs(VR,{to:p.path,onClick:()=>{window.innerWidth<1024&&t()},className:xt("flex items-center gap-3 h-9 rounded-xl px-3 transition-colors duration-150 relative","hover:bg-primary-light",x&&"bg-primary-light text-primary",!x&&"text-text-secondary"),title:e?void 0:p.label,children:[x&&s.jsx(Ge.div,{layoutId:"sidebar-active",className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-4 bg-primary rounded-full",transition:{duration:.18,ease:"easeOut"}}),s.jsx(y,{size:17,strokeWidth:x?2:1.5}),s.jsx(Qr,{children:e&&s.jsx(Ge.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:xt("text-sm font-medium whitespace-nowrap",x?"text-primary":"text-text-secondary"),children:p.label})})]},p.path)})})})]},h.label))}),r&&s.jsx("div",{className:"py-3 border-t border-border/60",children:s.jsxs("button",{onClick:f,className:xt("flex items-center gap-3 h-9 rounded-xl px-3 transition-colors duration-150 w-full","hover:bg-danger-light text-text-secondary hover:text-danger"),children:[s.jsx(pS,{size:17,strokeWidth:1.5}),s.jsx(Qr,{children:e&&s.jsx(Ge.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 WF(){const[e,t]=k.useState(!1);k.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:xt("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(I5,{size:18}):s.jsx(H5,{size:18})})}const ZF=[{id:"landvex",name:"Landvex AB",org:"559141-7042"},{id:"landvex-inc",name:"Landvex Inc.",org:"83-4567891"},{id:"quixzoom",name:"quiXzoom Inc",org:"-"}],pE=[{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 QF(){const{user:e,logout:t}=tr(),n=El(),[r,i]=k.useState(!1),[l,c]=k.useState(!1),[d,f]=k.useState(!1),[h,p]=k.useState("landvex"),x=()=>{const j=new Date().getHours();return j<12?"Good morning":j<17?"Good afternoon":"Good evening"},y=pE.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(zs,{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(WF,{})}),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(X1,{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(Qr,{children:r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),s.jsxs(Ge.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:pE.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:xt("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:xt("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:GF(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?KF(e.name):"?"}),s.jsx(Fm,{size:14,className:"text-text-secondary"})]}),s.jsx(Qr,{children:l&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),s.jsxs(Ge.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(Qo,{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(Ia,{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(U5,{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(pS,{size:15}),"Sign out"]})})]})]})]})})]})]}),s.jsx(Qr,{children:d&&s.jsxs(s.Fragment,{children:[s.jsx(Ge.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50",onClick:()=>f(!1)}),s.jsxs(Ge.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(Nr,{size:20})})]}),s.jsx("div",{className:"p-2",children:ZF.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(Ia,{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 JF=[{label:"Översikt",items:[{path:"/",label:"Briefing",icon:q5},{path:"/dashboard",label:"Dashboard",icon:mS},{path:"/mail",label:"Mail",icon:An}]},{label:"Produkter",items:[{path:"/alva",label:"Alva",icon:Ti},{path:"/amos",label:"AMOS",icon:dS},{path:"/quixzoom",label:"quiXzoom",icon:gn},{path:"/landvex",label:"Landvex",icon:P5}]},{label:"Verksamhet",items:[{path:"/crm",label:"CRM",icon:qr},{path:"/sales",label:"Sales",icon:aa},{path:"/marketing",label:"Marketing",icon:B5},{path:"/social",label:"Social",icon:xS},{path:"/finance",label:"Finance",icon:qo},{path:"/accounting",label:"Accounting",icon:Wo},{path:"/hr",label:"HR",icon:Wo},{path:"/legal",label:"Legal",icon:Sr},{path:"/compliance",label:"Compliance",icon:Da},{path:"/support",label:"Support",icon:Ns},{path:"/projects",label:"Projects",icon:hS},{path:"/automation",label:"Automation",icon:Uo}]}];function eG(){const[e,t]=k.useState(!1),[n,r]=k.useState({Översikt:!0,Produkter:!0,Verksamhet:!0}),i=On(),{logout:l,isAuthenticated:c}=tr(),d=h=>i.pathname===h,f=h=>{r(p=>({...p,[h]:!p[h]}))};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(Ts,{to:"/",className:"text-lg font-bold text-text-primary tracking-wide",children:"BOC"}),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(Nr,{size:24}):s.jsx(tF,{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:"Meny"}),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(Nr,{size:24})})]}),s.jsxs("div",{className:"p-4 space-y-2 overflow-y-auto flex-1",children:[JF.map(h=>s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>f(h.label),className:"flex items-center justify-between w-full px-4 py-2.5 rounded-xl text-sm font-semibold uppercase tracking-wider text-text-tertiary hover:bg-surface-hover transition-colors",children:[h.label,s.jsx(Fm,{size:16,className:xt("transition-transform",!n[h.label]&&"-rotate-90")})]}),n[h.label]&&s.jsx("div",{className:"ml-2 space-y-0.5 mt-1",children:h.items.map(p=>{const x=p.icon;return s.jsxs(Ts,{to:p.path,onClick:()=>t(!1),className:xt("flex items-center gap-3 px-4 py-3 rounded-xl text-base font-medium transition-colors",d(p.path)?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"),children:[s.jsx(x,{size:20}),p.label]},p.path)})})]},h.label)),c&&s.jsxs("button",{onClick:()=>{l(),t(!1),window.location.href="/login"},className:"flex items-center gap-3 px-4 py-3 rounded-xl text-base font-medium text-danger hover:bg-danger-light transition-colors w-full mt-4",children:[s.jsx(pS,{size:20}),"Logga ut"]})]})]})]})}const xE={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 tG(e){return xE[e]||xE.dashboard}function nG({rum:e,isOpen:t,onToggle:n}){const r=tG(e),[i,l]=k.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]=k.useState(""),[f,h]=k.useState(!1),[p,x]=k.useState(!1),y=k.useRef(null),j=k.useRef(null);k.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(A=>[...A,v]),d(""),h(!0);try{const A=await fetch("/api/agent/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rum:r.rum,systemPrompt:r.systemPrompt,meddelanden:[...i,v].map(O=>({roll:O.roll,innehall:O.innehall}))})});if(A.ok){const O=await A.json();l(_=>[..._,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O.svar,tid:new Date().toISOString()}])}else{const O=yE(r,c.trim());l(_=>[..._,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O,tid:new Date().toISOString()}])}}catch{const O=yE(r,c.trim());l(_=>[..._,{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(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 bg-black/20 z-40",onClick:n}),s.jsxs(Ge.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(nF,{size:16}):s.jsx(eF,{size:16})}),s.jsx("button",{onClick:n,className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:s.jsx(Nr,{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(Qo,{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(gu,{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(Ge.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(V5,{size:24})})}function yE(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 rG=["/","/dashboard","/crm","/finance","/amos","/quixzoom","/landvex","/compliance","/accounting"];function aG(){const{sidebarOpen:e}=E5(),t=On();El();const[n,r]=k.useState(!1),i=()=>t.pathname.replace("/","")||"dashboard";return k.useEffect(()=>{const l=()=>r(c=>!c);return window.addEventListener("toggle-agent",l),()=>window.removeEventListener("toggle-agent",l)},[]),rG.indexOf(t.pathname),s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsx("div",{className:"hidden lg:block",children:s.jsx(XF,{})}),s.jsx("div",{className:"lg:hidden",children:s.jsx(eG,{})}),s.jsxs("div",{className:xt("transition-all duration-200 ease-out",e?"lg:ml-[240px]":"lg:ml-[72px]",n&&"lg:mr-[380px]"),children:[s.jsx(QF,{}),s.jsx("main",{className:"p-4 lg:p-10",children:s.jsx(KI,{})})]}),s.jsx(nG,{rum:i(),isOpen:n,onToggle:()=>r(!n)})]})}const As=k.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:xt("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 Me({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:xt("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 iG="/api/v1";function sG(){var e;try{const t=localStorage.getItem("amos-auth");if(t){const n=JSON.parse(t);if((e=n.state)!=null&&e.token)return n.state.token}}catch{}return localStorage.getItem("amos_token")}async function Vf(e,t,n){const r=`${iG}${t}`,i={"Content-Type":"application/json"},l=sG();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 Ce={get:e=>Vf("GET",e),post:(e,t)=>Vf("POST",e,t),put:(e,t)=>Vf("PUT",e,t),delete:e=>Vf("DELETE",e)},gE={login:(e,t)=>Ce.post("/auth/login",{email:e,password:t}),me:()=>Ce.get("/auth/me")},pg={customers:()=>Ce.get("/crm/customers"),leads:()=>Ce.get("/crm/leads"),pipeline:()=>Ce.get("/crm/pipeline"),createCustomer:e=>Ce.post("/crm/customers",e),updateCustomer:(e,t)=>Ce.put(`/crm/customers/${e}`,t),deleteCustomer:e=>Ce.delete(`/crm/customers/${e}`)},Hf={deals:()=>Ce.get("/sales/deals"),products:()=>Ce.get("/sales/products"),mrr:()=>Ce.get("/sales/mrr"),arr:()=>Ce.get("/sales/arr"),createDeal:e=>Ce.post("/sales/deals",e),updateDeal:(e,t)=>Ce.put(`/sales/deals/${e}`,t)},fs={balance:()=>Ce.get("/finance/balance?period="),income:()=>Ce.get("/finance/income?period="),moms:()=>Ce.get("/finance/moms?period="),accounts:()=>Ce.get("/finance/accounts"),invoices:()=>Ce.get("/finance/invoices"),cashflow:()=>Ce.get("/finance/cashflow")},vE={engines:()=>Ce.get("/amos/engines"),engineDetails:e=>Ce.get(`/amos/engines/${e}`),restartEngine:e=>Ce.post(`/amos/engines/${e}/restart`),engineLogs:e=>Ce.get(`/amos/engines/${e}/logs`)},Ff={zoomers:()=>Ce.get("/quixzoom/zoomers"),zoomer:e=>Ce.get(`/quixzoom/zoomers/${e}`),fieldData:()=>Ce.get("/quixzoom/field-data"),payouts:()=>Ce.get("/quixzoom/payouts"),payoutStats:()=>Ce.get("/quixzoom/payouts/stats"),insights:()=>Ce.get("/quixzoom/insights")},Gf={entities:()=>Ce.get("/landvex/entities"),entity:e=>Ce.get(`/landvex/entities/${e}`),documents:()=>Ce.get("/landvex/documents"),compliance:()=>Ce.get("/landvex/compliance"),ownership:()=>Ce.get("/landvex/ownership")},Uc={iso:()=>Ce.get("/compliance/iso"),gdpr:()=>Ce.get("/compliance/gdpr"),risks:()=>Ce.get("/compliance/risks"),legalCases:()=>Ce.get("/compliance/legal-cases"),policies:()=>Ce.get("/compliance/policies")},bE={employees:()=>Ce.get("/hr/employees"),leaves:()=>Ce.get("/hr/leaves"),createEmployee:e=>Ce.post("/hr/employees",e),createLeave:e=>Ce.post("/hr/leaves",e)},oG={entries:()=>Ce.get("/journal/entries"),entry:e=>Ce.get(`/journal/entries/${e}`)};function lG(){const e=El(),{login:t}=tr(),[n,r]=k.useState(""),[i,l]=k.useState(""),[c,d]=k.useState(!1),[f,h]=k.useState(""),[p,x]=k.useState(!1),y=async j=>{var w;j.preventDefault(),h(""),x(!0);try{const S=await gE.login(n,i);if(!S.ok){h("Invalid credentials");return}localStorage.setItem("amos_token",S.token);const v=await gE.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(Ge.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(An,{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(R5,{size:16})})]}),f&&s.jsx(Ge.p,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"text-sm text-danger",children:f}),s.jsx(Me,{type:"submit",size:"lg",loading:p,className:"w-full",children:"Sign in"})]})]})})}function cG(){const[e,t]=k.useState({total:0,open:0,in_progress:0,resolved:0}),[n,r]=k.useState(!0);return k.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(Ge.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(Ns,{size:16,className:"text-blue-600"})}),s.jsx("h3",{className:"font-semibold",children:"Support Tickets"})]}),s.jsxs(Ts,{to:"/support",className:"text-sm text-blue-600 hover:text-blue-700 flex items-center gap-1",children:["View all ",s.jsx(uS,{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(Ir,{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(Xt,{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(Dn,{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(Ns,{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 uG(){const[e,t]=k.useState({active:0,completed:0,overdue:0}),[n,r]=k.useState(!0);return k.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(Ge.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(hS,{size:16,className:"text-purple-600"})}),s.jsx("h3",{className:"font-semibold",children:"Projects"})]}),s.jsxs(Ts,{to:"/projects",className:"text-sm text-purple-600 hover:text-purple-700 flex items-center gap-1",children:["View all ",s.jsx(uS,{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(aa,{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(Dn,{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(Ir,{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 dG(){const[e,t]=k.useState([]),[n,r]=k.useState(!0);k.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(Ge.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(Dh,{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(Dn,{size:14,className:"text-green-500"}):l.status==="down"?s.jsx(Ph,{size:14,className:"text-red-500"}):s.jsx(Ir,{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 fG(){const[e,t]=k.useState({active_campaigns:0,scheduled_posts:0,impressions:0,engagement:0}),[n,r]=k.useState(!0);return k.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(Ge.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(Ts,{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 hG(){const[e,t]=k.useState([]),[n,r]=k.useState(!0);return k.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(Ge.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 mG(){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(cG,{}),s.jsx(uG,{}),s.jsx(dG,{}),s.jsx(fG,{}),s.jsx(hG,{}),s.jsxs(Ge.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 pG={getRealBriefing:()=>Ce.get("/briefing/real")};function je({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:xt("inline-flex items-center rounded-full font-medium",i[t],l[n],r),children:e})}function Kf({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(aa,{size:14,className:"text-success"}),i==="down"&&s.jsx(F5,{size:14,className:"text-danger"}),i==="neutral"&&s.jsx(Ir,{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 xG({alert:e,onClick:t}){const n={info:{icon:s.jsx(Ir,{size:16}),color:"text-primary bg-primary/5 border-primary/20"},warning:{icon:s.jsx(fn,{size:16}),color:"text-warning bg-warning/5 border-warning/20"},critical:{icon:s.jsx(fn,{size:16}),color:"text-danger bg-danger/5 border-danger/20"}},r=n[e.level]||n.info,i=()=>{t?t():e.link&&(window.location.href=e.link)};return s.jsx("div",{onClick:i,className:`p-3 rounded-lg border ${r.color} hover:opacity-80 transition-opacity cursor-pointer active:scale-[0.98]`,role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&i()},children:s.jsxs("div",{className:"flex items-start gap-2",children:[r.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(je,{variant:"default",className:"text-xs",children:e.source})]})})}function yG({action:e,onClick:t}){const n={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"},r=()=>{t?t():e.link&&(window.location.href=e.link)};return s.jsx("div",{onClick:r,className:"p-3 rounded-lg border border-border bg-surface hover:bg-surface-hover transition-colors cursor-pointer group active:scale-[0.98]",role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&r()},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 ${n[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(Xt,{size:12}),e.time_estimate]}),s.jsx("span",{className:"text-xs text-text-tertiary",children:e.impact})]})]}),s.jsx(uS,{size:16,className:"text-text-tertiary group-hover:text-primary transition-colors shrink-0"})]})})}function gG({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(je,{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 vG({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(Wo,{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:Ee(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(Ge.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},onClick:i,className:xt("bg-surface rounded-[20px] card-shadow",l[r],(n||i)&&"transition-shadow duration-200 hover:shadow-hover cursor-pointer",t),children:e})}function Ke({title:e,subtitle:t,action:n,className:r}){return s.jsxs("div",{className:xt("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 Oe({className:e}){return s.jsx("div",{className:xt("animate-pulse rounded-[14px] bg-text-secondary/8",e)})}function bG(){var j;const[e,t]=k.useState(null),[n,r]=k.useState(!0),[i,l]=k.useState("");if(k.useEffect(()=>{async function w(){try{r(!0);const v=await pG.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(Oe,{className:"h-[120px]"},S))}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsx(Oe,{className:"h-[400px] lg:col-span-2"}),s.jsx(Oe,{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(fn,{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(Kf,{title:"Cash Position",value:Ee(c.cash_position),subtitle:"Eget kapital",icon:s.jsx(fS,{size:20}),trend:c.profit_margin>0?"up":"down",trendValue:`${mE(c.profit_margin)}% marginal`,variant:c.cash_position>1e6?"success":c.cash_position>5e5?"warning":"danger"}),s.jsx(Kf,{title:"Pipeline",value:Ee(c.total_pipeline),subtitle:`${c.active_deals} aktiva deals`,icon:s.jsx(Wo,{size:20}),trend:"up",trendValue:"+12% vs förra månaden"}),s.jsx(Kf,{title:"Team",value:`${h.active_now}/${h.total_members}`,subtitle:`${h.on_leave} på leave`,icon:s.jsx(qr,{size:20}),trend:h.on_leave>0?"neutral":"up",trendValue:h.on_leave>0?`${h.on_leave} borta idag`:"Alla närvarande"}),s.jsx(Kf,{title:"Mina Tasks",value:d.length,subtitle:`${d.filter(w=>w.priority==="critical").length} kritiska`,icon:s.jsx(dF,{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(fn,{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(xG,{alert:w,onClick:()=>{const v=w.title.toLowerCase();v.includes("moms")||v.includes("deklaration")||v.includes("inkomst")||v.includes("faktur")?window.location.href="/accounting":v.includes("avtal")||v.includes("legal")?window.location.href="/legal":v.includes("hr")||v.includes("personal")?window.location.href="/hr":window.location.href=w.link||"/dashboard"}},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(Ke,{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(yG,{action:w,onClick:()=>{const v=w.title.toLowerCase();v.includes("task")||v.includes("uppgift")?window.location.href="/projects":v.includes("deal")||v.includes("försälj")?window.location.href="/sales":v.includes("invoice")||v.includes("faktur")?window.location.href="/accounting":v.includes("mail")||v.includes("email")?window.location.href="/mail":v.includes("legal")||v.includes("avtal")?window.location.href="/legal":v.includes("hr")||v.includes("team")?window.location.href="/hr":window.location.href=w.link||"/dashboard"}},S))})]}),s.jsxs(te,{children:[s.jsx(Ke,{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(Dn,{size:48,className:"mx-auto mb-2 text-success"}),s.jsx("p",{children:"Alla uppgifter är klara!"})]}):d.map(w=>s.jsx(gG,{task:w},w.id))})]}),f.length>0&&s.jsxs(te,{children:[s.jsx(Ke,{title:"Mina Deals",subtitle:`${f.length} aktiva förhandlingar`}),s.jsx("div",{className:"p-4 space-y-1",children:f.map(w=>s.jsx(vG,{deal:w},w.id))})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{children:[s.jsx(Ke,{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(je,{variant:"warning",className:"text-xs",children:w.open_tasks})]},S))})]})]}),s.jsxs(te,{children:[s.jsx(Ke,{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:Ee(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:Ee(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:Ee(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:[mE(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:Ee(w.amount)})]},S))]})]})]})]})]})]})}function jG(){return s.jsx(bG,{})}function wG(){const{user:e}=tr(),[t]=Nq(),[n,r]=k.useState(null),[i,l]=k.useState(!0),[c,d]=k.useState(!1),[f,h]=k.useState(t.get("tab")||"general");k.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,A,O,_,T,N,E,M,R,B;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:((A=y.user)==null?void 0:A.role)||(e==null?void 0:e.role)||"user",department:((O=y.user)==null?void 0:O.department)||"",timezone:((_=y.user)==null?void 0:_.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:((M=y.user)==null?void 0:M.twoFactorEnabled)||!1,lastLogin:((R=y.user)==null?void 0:R.lastLogin)||new Date().toISOString(),createdAt:((B=y.user)==null?void 0:B.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(Oe,{className:"h-[200px]"}),s.jsx(Oe,{className:"h-[400px]"})]});if(!n)return null;const x=[{id:"general",label:"Allmänt",icon:Qo},{id:"security",label:"Säkerhet",icon:Da},{id:"notifications",label:"Notifikationer",icon:X1},{id:"preferences",label:"Inställningar",icon:gn}];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(Me,{onClick:p,disabled:c,icon:c?void 0:s.jsx(lF,{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(yh,{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(je,{variant:"primary",children:n.role}),s.jsx(je,{variant:"default",children:n.department})]})]}),s.jsxs("div",{className:"text-right text-sm text-text-secondary",children:[s.jsxs("p",{children:["Senaste inloggning: ",Nt(n.lastLogin)]}),s.jsxs("p",{children:["Medlem sedan: ",Nt(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(Ke,{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(Qo,{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(An,{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(cE,{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(Ia,{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(Ke,{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(je,{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(Da,{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(gn,{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(gn,{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(Ke,{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(sE,{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(Me,{variant:"secondary",className:"w-full",children:[s.jsx(sE,{size:16,className:"mr-2"}),"Ändra lösenord"]})]})]}),s.jsxs(te,{children:[s.jsx(Ke,{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(je,{variant:n.twoFactorEnabled?"success":"default",children:n.twoFactorEnabled?"Aktiv":"Inaktiv"})]}),!n.twoFactorEnabled&&s.jsxs(Me,{className:"w-full",children:[s.jsx(Da,{size:16,className:"mr-2"}),"Aktivera 2FA"]})]})]})]}),f==="notifications"&&s.jsxs(te,{children:[s.jsx(Ke,{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:An},{key:"push",label:"Push-notifikationer",description:"Få notifikationer i webbläsaren",icon:X1},{key:"sms",label:"SMS-notifikationer",description:"Få viktiga uppdateringar via SMS",icon:cE}].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(Ke,{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:H5},{id:"dark",label:"Mörkt",icon:I5},{id:"system",label:"System",icon:rF}].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(Ke,{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:xt("w-full",t),children:e})})}function Ri({children:e,className:t}){return s.jsx("thead",{className:xt("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:xt("border-b border-border/50 transition-colors hover:bg-bg/50",t),children:e})}function _e({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:xt("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:xt("py-3.5 px-4 text-sm text-text-primary",i[n],t),children:e})}function jE({icon:e,title:t,description:n,action:r,className:i}){return s.jsxs("div",{className:xt("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 SG({children:e,className:t,onClick:n}){return s.jsx("div",{onClick:n,className:xt("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 NG({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:xt("text-xs font-medium px-2.5 py-1 rounded-full",r[t],n),children:e})}const AG=["Customers","Leads","Pipeline"];function _G(){const[e,t]=k.useState("Customers"),[n,r]=k.useState(""),[i,l]=k.useState(!0),[c,d]=k.useState(""),[f,h]=k.useState([]),[p,x]=k.useState(0),[y,j]=k.useState([]),[w,S]=k.useState([]);k.useEffect(()=>{async function _(){l(!0),d("");try{const[T,N,E]=await Promise.all([pg.customers(),pg.leads(),pg.pipeline()]);h(T.customers),x(T.total),j(N.leads);const M=E;S(M.stages||M.pipeline||[])}catch(T){d(T instanceof Error?T.message:"Failed to load CRM data")}finally{l(!1)}}_()},[]);const v=f.filter(_=>_.name.toLowerCase().includes(n.toLowerCase())||(_.company||"").toLowerCase().includes(n.toLowerCase())),A=y.filter(_=>_.name.toLowerCase().includes(n.toLowerCase())||(_.company||"").toLowerCase().includes(n.toLowerCase())),O=w.reduce((_,T)=>_+(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(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"})]}),s.jsx(Oe,{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(Me,{icon:s.jsx(_n,{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(qr,{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(An,{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(Ia,{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:AG.map(_=>s.jsx("button",{onClick:()=>t(_),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors ${e===_?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:_},_))}),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(zs,{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:_=>r(_.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),s.jsx(Me,{variant:"secondary",size:"sm",icon:s.jsx(Pl,{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(_e,{children:"Customer"}),s.jsx(_e,{children:"Company"}),s.jsx(_e,{children:"Status"}),s.jsx(_e,{children:"Phone"}),s.jsx(_e,{children:"Created"}),s.jsx(_e,{align:"right"})]})}),s.jsx(Di,{children:v.map(_=>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:_.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:_.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.email})]})]})}),s.jsx(be,{children:_.company||"—"}),s.jsx(be,{children:s.jsx(je,{variant:_.status==="active"?"success":_.status==="lead"?"primary":"default",children:_.status})}),s.jsx(be,{children:_.phone||"—"}),s.jsx(be,{children:Nt(_.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})})})]},_.id))})]})}),s.jsx("div",{className:"md:hidden p-4 space-y-3",children:v.map(_=>s.jsx(SG,{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:_.name.charAt(0)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-medium text-text-primary",children:_.name}),s.jsx("div",{className:"text-sm text-text-secondary",children:_.email}),_.company&&s.jsx("div",{className:"text-sm text-text-secondary mt-1",children:_.company}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(NG,{variant:_.status==="active"?"success":_.status==="lead"?"info":"default",children:_.status}),s.jsx("span",{className:"text-xs text-text-secondary",children:Nt(_.created_at)})]})]})]})},_.id))}),v.length===0&&s.jsx(jE,{icon:s.jsx(qr,{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(_e,{children:"Lead"}),s.jsx(_e,{children:"Company"}),s.jsx(_e,{children:"Source"}),s.jsx(_e,{children:"Status"}),s.jsx(_e,{children:"Created"}),s.jsx(_e,{align:"right"})]})}),s.jsx(Di,{children:A.map(_=>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:_.name.charAt(0)}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:_.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.email})]})]})}),s.jsx(be,{children:_.company||"—"}),s.jsx(be,{children:_.source||"—"}),s.jsx(be,{children:s.jsx(je,{variant:_.status==="qualified"?"success":_.status==="contacted"?"primary":_.status==="lost"?"danger":"default",children:_.status})}),s.jsx(be,{children:Nt(_.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})})})]},_.id))})]}),A.length===0&&s.jsx(jE,{icon:s.jsx(An,{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(_=>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:_.name}),s.jsxs(je,{variant:"default",children:[_.deals," deals"]})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:_.value>0?new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK",maximumFractionDigits:0}).format(_.value):"—"}),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?_.value/O*100:0}%`}})})]},_.id))]})]})}var xg,wE;function Ln(){if(wE)return xg;wE=1;var e=Array.isArray;return xg=e,xg}var yg,SE;function J5(){if(SE)return yg;SE=1;var e=typeof Df=="object"&&Df&&Df.Object===Object&&Df;return yg=e,yg}var gg,NE;function oa(){if(NE)return gg;NE=1;var e=J5(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return gg=n,gg}var vg,AE;function sd(){if(AE)return vg;AE=1;var e=oa(),t=e.Symbol;return vg=t,vg}var bg,_E;function OG(){if(_E)return bg;_E=1;var e=sd(),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 bg=l,bg}var jg,OE;function TG(){if(OE)return jg;OE=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return jg=n,jg}var wg,TE;function Fa(){if(TE)return wg;TE=1;var e=sd(),t=OG(),n=TG(),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 wg=c,wg}var Sg,EE;function Ga(){if(EE)return Sg;EE=1;function e(t){return t!=null&&typeof t=="object"}return Sg=e,Sg}var Ng,kE;function Dl(){if(kE)return Ng;kE=1;var e=Fa(),t=Ga(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Ng=r,Ng}var Ag,CE;function gS(){if(CE)return Ag;CE=1;var e=Ln(),t=Dl(),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 Ag=i,Ag}var _g,ME;function $i(){if(ME)return _g;ME=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return _g=e,_g}var Og,PE;function vS(){if(PE)return Og;PE=1;var e=Fa(),t=$i(),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 Og=c,Og}var Tg,RE;function EG(){if(RE)return Tg;RE=1;var e=oa(),t=e["__core-js_shared__"];return Tg=t,Tg}var Eg,DE;function kG(){if(DE)return Eg;DE=1;var e=EG(),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 Eg=n,Eg}var kg,zE;function e6(){if(zE)return kg;zE=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 kg=n,kg}var Cg,LE;function CG(){if(LE)return Cg;LE=1;var e=vS(),t=kG(),n=$i(),r=e6(),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,$E;function MG(){if($E)return Mg;$E=1;function e(t,n){return t==null?void 0:t[n]}return Mg=e,Mg}var Pg,BE;function Ls(){if(BE)return Pg;BE=1;var e=CG(),t=MG();function n(r,i){var l=t(r,i);return e(l)?l:void 0}return Pg=n,Pg}var Rg,IE;function Gm(){if(IE)return Rg;IE=1;var e=Ls(),t=e(Object,"create");return Rg=t,Rg}var Dg,qE;function PG(){if(qE)return Dg;qE=1;var e=Gm();function t(){this.__data__=e?e(null):{},this.size=0}return Dg=t,Dg}var zg,UE;function RG(){if(UE)return zg;UE=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return zg=e,zg}var Lg,VE;function DG(){if(VE)return Lg;VE=1;var e=Gm(),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 Lg=i,Lg}var $g,HE;function zG(){if(HE)return $g;HE=1;var e=Gm(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var l=this.__data__;return e?l[i]!==void 0:n.call(l,i)}return $g=r,$g}var Bg,FE;function LG(){if(FE)return Bg;FE=1;var e=Gm(),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 Bg=n,Bg}var Ig,GE;function $G(){if(GE)return Ig;GE=1;var e=PG(),t=RG(),n=DG(),r=zG(),i=LG();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,Ig=l,Ig}var qg,KE;function BG(){if(KE)return qg;KE=1;function e(){this.__data__=[],this.size=0}return qg=e,qg}var Ug,YE;function bS(){if(YE)return Ug;YE=1;function e(t,n){return t===n||t!==t&&n!==n}return Ug=e,Ug}var Vg,XE;function Km(){if(XE)return Vg;XE=1;var e=bS();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Vg=t,Vg}var Hg,WE;function IG(){if(WE)return Hg;WE=1;var e=Km(),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 Hg=r,Hg}var Fg,ZE;function qG(){if(ZE)return Fg;ZE=1;var e=Km();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Fg=t,Fg}var Gg,QE;function UG(){if(QE)return Gg;QE=1;var e=Km();function t(n){return e(this.__data__,n)>-1}return Gg=t,Gg}var Kg,JE;function VG(){if(JE)return Kg;JE=1;var e=Km();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 Kg=t,Kg}var Yg,ek;function Ym(){if(ek)return Yg;ek=1;var e=BG(),t=IG(),n=qG(),r=UG(),i=VG();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,Yg=l,Yg}var Xg,tk;function jS(){if(tk)return Xg;tk=1;var e=Ls(),t=oa(),n=e(t,"Map");return Xg=n,Xg}var Wg,nk;function HG(){if(nk)return Wg;nk=1;var e=$G(),t=Ym(),n=jS();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Wg=r,Wg}var Zg,rk;function FG(){if(rk)return Zg;rk=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Zg=e,Zg}var Qg,ak;function Xm(){if(ak)return Qg;ak=1;var e=FG();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Qg=t,Qg}var Jg,ik;function GG(){if(ik)return Jg;ik=1;var e=Xm();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Jg=t,Jg}var ev,sk;function KG(){if(sk)return ev;sk=1;var e=Xm();function t(n){return e(this,n).get(n)}return ev=t,ev}var tv,ok;function YG(){if(ok)return tv;ok=1;var e=Xm();function t(n){return e(this,n).has(n)}return tv=t,tv}var nv,lk;function XG(){if(lk)return nv;lk=1;var e=Xm();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 nv=t,nv}var rv,ck;function wS(){if(ck)return rv;ck=1;var e=HG(),t=GG(),n=KG(),r=YG(),i=XG();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,rv=l,rv}var av,uk;function t6(){if(uk)return av;uk=1;var e=wS(),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,av=n,av}var iv,dk;function WG(){if(dk)return iv;dk=1;var e=t6(),t=500;function n(r){var i=e(r,function(c){return l.size===t&&l.clear(),c}),l=i.cache;return i}return iv=n,iv}var sv,fk;function ZG(){if(fk)return sv;fk=1;var e=WG(),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 sv=r,sv}var ov,hk;function SS(){if(hk)return ov;hk=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 ov=e,ov}var lv,mk;function QG(){if(mk)return lv;mk=1;var e=sd(),t=SS(),n=Ln(),r=Dl(),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 lv=c,lv}var cv,pk;function n6(){if(pk)return cv;pk=1;var e=QG();function t(n){return n==null?"":e(n)}return cv=t,cv}var uv,xk;function r6(){if(xk)return uv;xk=1;var e=Ln(),t=gS(),n=ZG(),r=n6();function i(l,c){return e(l)?l:t(l,c)?[l]:n(r(l))}return uv=i,uv}var dv,yk;function Wm(){if(yk)return dv;yk=1;var e=Dl();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return dv=t,dv}var fv,gk;function NS(){if(gk)return fv;gk=1;var e=r6(),t=Wm();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 fv=n,fv}var hv,vk;function a6(){if(vk)return hv;vk=1;var e=NS();function t(n,r,i){var l=n==null?void 0:e(n,r);return l===void 0?i:l}return hv=t,hv}var JG=a6();const Jn=it(JG);var mv,bk;function eK(){if(bk)return mv;bk=1;function e(t){return t==null}return mv=e,mv}var tK=eK();const De=it(tK);var pv,jk;function nK(){if(jk)return pv;jk=1;var e=Fa(),t=Ln(),n=Ga(),r="[object String]";function i(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==r}return pv=i,pv}var rK=nK();const Es=it(rK);var aK=vS();const ke=it(aK);var iK=$i();const zl=it(iK);var xv={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 wk;function sK(){if(wk)return tt;wk=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 A=v.$$typeof;switch(A){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 A}}case t:return A}}}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 Sk;function oK(){return Sk||(Sk=1,xv.exports=sK()),xv.exports}var lK=oK(),yv,Nk;function i6(){if(Nk)return yv;Nk=1;var e=Fa(),t=Ga(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return yv=r,yv}var gv,Ak;function cK(){if(Ak)return gv;Ak=1;var e=i6();function t(n){return e(n)&&n!=+n}return gv=t,gv}var uK=cK();const od=it(uK);var dK=i6();const fK=it(dK);var wn=function(t){return t===0?0:t>0?1:-1},gs=function(t){return Es(t)&&t.indexOf("%")===t.length-1},he=function(t){return fK(t)&&!od(t)},hK=function(t){return De(t)},Wt=function(t){return he(t)||Es(t)},mK=0,Ll=function(t){var n=++mK;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(gs(t)){var c=t.indexOf("%");l=n*parseFloat(t.slice(0,c))/100}else l=+t;return od(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},pK=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},Wn=function(t,n){return he(t)&&he(n)?function(r){return t+r*(n-t)}:function(){return n}};function zh(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Jn(r,t))===n})}var xK=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 Ho(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 tj(e){"@babel/helpers - typeof";return tj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tj(e)}var yK=["viewBox","children"],gK=["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"],_k=["points","pathLength"],vv={svg:yK,polygon:_k,polyline:_k},AS=["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"],Lh=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(k.isValidElement(t)&&(r=t.props),!zl(r))return null;var i={};return Object.keys(r).forEach(function(l){AS.includes(l)&&(i[l]=n||function(c){return r[l](r,c)})}),i},vK=function(t,n,r){return function(i){return t(n,r,i),null}},ks=function(t,n,r){if(!zl(t)||tj(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(l){var c=t[l];AS.includes(l)&&typeof c=="function"&&(i||(i={}),i[l]=vK(c,n,r))}),i},bK=["children"],jK=["children"];function Ok(e,t){if(e==null)return{};var n=wK(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 wK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nj(e){"@babel/helpers - typeof";return nj=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},nj(e)}var Tk={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":""},Ek=null,bv=null,_S=function e(t){if(t===Ek&&Array.isArray(bv))return bv;var n=[];return k.Children.forEach(t,function(r){De(r)||(lK.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),bv=n,Ek=t,n};function er(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return za(i)}):r=[za(t)],_S(e).forEach(function(i){var l=Jn(i,"type.displayName")||Jn(i,"type.name");r.indexOf(l)!==-1&&n.push(i)}),n}function Xn(e,t){var n=er(e,t);return n&&n[0]}var kk=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)},SK=["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"],NK=function(t){return t&&t.type&&Es(t.type)&&SK.indexOf(t.type)>=0},AK=function(t){return t&&nj(t)==="object"&&"clipDot"in t},_K=function(t,n,r,i){var l,c=(l=vv==null?void 0:vv[i])!==null&&l!==void 0?l:[];return n.startsWith("data-")||!ke(t)&&(i&&c.includes(n)||gK.includes(n))||r&&AS.includes(n)},we=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(k.isValidElement(t)&&(i=t.props),!zl(i))return null;var l={};return Object.keys(i).forEach(function(c){var d;_K((d=i)===null||d===void 0?void 0:d[c],c,n,r)&&(l[c]=i[c])}),l},rj=function e(t,n){if(t===n)return!0;var r=k.Children.count(t);if(r!==k.Children.count(n))return!1;if(r===0)return!0;if(r===1)return Ck(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(!Ck(l,c))return!1}return!0},Ck=function(t,n){if(De(t)&&De(n))return!0;if(!De(t)&&!De(n)){var r=t.props||{},i=r.children,l=Ok(r,bK),c=n.props||{},d=c.children,f=Ok(c,jK);return i&&d?Ho(l,f)&&rj(i,d):!i&&!d?Ho(l,f):!1}return!1},Mk=function(t,n){var r=[],i={};return _S(t).forEach(function(l,c){if(NK(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},OK=function(t){var n=t&&t.type;return n&&Tk[n]?Tk[n]:null},TK=function(t,n){return _S(n).indexOf(t)},EK=["children","width","height","viewBox","className","style","title","desc"];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 kK(e,t){if(e==null)return{};var n=CK(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 CK(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 ij(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=kK(e,EK),p=i||{width:n,height:r,x:0,y:0},x=Le("recharts-surface",l);return V.createElement("svg",aj({},we(h,!0,"svg"),{className:x,width:n,height:r,style:c,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),V.createElement("title",null,d),V.createElement("desc",null,f),t)}var MK=["children","className"];function sj(){return sj=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},sj.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}var Ze=V.forwardRef(function(e,t){var n=e.children,r=e.className,i=PK(e,MK),l=Le("recharts-layer",r);return V.createElement("g",sj({className:l},we(i,!0),{ref:t}),n)}),Ur=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]},jv,Pk;function DK(){if(Pk)return jv;Pk=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 jv=e,jv}var wv,Rk;function zK(){if(Rk)return wv;Rk=1;var e=DK();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 wv=t,wv}var Sv,Dk;function s6(){if(Dk)return Sv;Dk=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 Sv=f,Sv}var Nv,zk;function LK(){if(zk)return Nv;zk=1;function e(t){return t.split("")}return Nv=e,Nv}var Av,Lk;function $K(){if(Lk)return Av;Lk=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+")*",A=S+w+v,O="(?:"+[p+d+"?",d,x,y,c].join("|")+")",_=RegExp(f+"(?="+f+")|"+O+A,"g");function T(N){return N.match(_)||[]}return Av=T,Av}var _v,$k;function BK(){if($k)return _v;$k=1;var e=LK(),t=s6(),n=$K();function r(i){return t(i)?n(i):e(i)}return _v=r,_v}var Ov,Bk;function IK(){if(Bk)return Ov;Bk=1;var e=zK(),t=s6(),n=BK(),r=n6();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 Ov=i,Ov}var Tv,Ik;function qK(){if(Ik)return Tv;Ik=1;var e=IK(),t=e("toUpperCase");return Tv=t,Tv}var UK=qK();const Zm=it(UK);function pt(e){return function(){return e}}const o6=Math.cos,$h=Math.sin,Hr=Math.sqrt,Bh=Math.PI,Qm=2*Bh,oj=Math.PI,lj=2*oj,hs=1e-6,VK=lj-hs;function l6(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function HK(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return l6;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 FK{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?l6:HK(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>hs)if(!(Math.abs(x*f-h*p)>hs)||!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,A=Math.sqrt(S),O=Math.sqrt(y),_=l*Math.tan((oj-Math.acos((S+y-v)/(2*A*O)))/2),T=_/O,N=_/A;Math.abs(T-1)>hs&&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)>hs||Math.abs(this._y1-p)>hs)&&this._append`L${h},${p}`,r&&(y<0&&(y=y%lj+lj),y>VK?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>hs&&this._append`A${r},${r},0,${+(y>=oj)},${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 OS(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 FK(t)}function TS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function c6(e){this._context=e}c6.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 Jm(e){return new c6(e)}function u6(e){return e[0]}function d6(e){return e[1]}function f6(e,t){var n=pt(!0),r=null,i=Jm,l=null,c=OS(d);e=typeof e=="function"?e:e===void 0?u6:pt(e),t=typeof t=="function"?t:t===void 0?d6:pt(t);function d(f){var h,p=(f=TS(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:pt(+f),d):e},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:pt(+f),d):t},d.defined=function(f){return arguments.length?(n=typeof f=="function"?f:pt(!!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 Yf(e,t,n){var r=null,i=pt(!0),l=null,c=Jm,d=null,f=OS(h);e=typeof e=="function"?e:e===void 0?u6:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?d6:pt(+n);function h(x){var y,j,w,S=(x=TS(x)).length,v,A=!1,O,_=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))===A)if(A=!A)j=y,d.areaStart(),d.lineStart();else{for(d.lineEnd(),d.lineStart(),w=y-1;w>=j;--w)d.point(_[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):_[y],n?+n(v,y,x):T[y]))}if(O)return d=null,O+""||null}function p(){return f6().defined(i).curve(c).context(l)}return h.x=function(x){return arguments.length?(e=typeof x=="function"?x:pt(+x),r=null,h):e},h.x0=function(x){return arguments.length?(e=typeof x=="function"?x:pt(+x),h):e},h.x1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:pt(+x),h):r},h.y=function(x){return arguments.length?(t=typeof x=="function"?x:pt(+x),n=null,h):t},h.y0=function(x){return arguments.length?(t=typeof x=="function"?x:pt(+x),h):t},h.y1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:pt(+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:pt(!!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 h6{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 GK(e){return new h6(e,!0)}function KK(e){return new h6(e,!1)}const ES={draw(e,t){const n=Hr(t/Bh);e.moveTo(n,0),e.arc(0,0,n,0,Qm)}},YK={draw(e,t){const n=Hr(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()}},m6=Hr(1/3),XK=m6*2,WK={draw(e,t){const n=Hr(t/XK),r=n*m6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ZK={draw(e,t){const n=Hr(t),r=-n/2;e.rect(r,r,n,n)}},QK=.8908130915292852,p6=$h(Bh/10)/$h(7*Bh/10),JK=$h(Qm/10)*p6,eY=-o6(Qm/10)*p6,tY={draw(e,t){const n=Hr(t*QK),r=JK*n,i=eY*n;e.moveTo(0,-n),e.lineTo(r,i);for(let l=1;l<5;++l){const c=Qm*l/5,d=o6(c),f=$h(c);e.lineTo(f*n,-d*n),e.lineTo(d*r-f*i,f*r+d*i)}e.closePath()}},Ev=Hr(3),nY={draw(e,t){const n=-Hr(t/(Ev*3));e.moveTo(0,n*2),e.lineTo(-Ev*n,-n),e.lineTo(Ev*n,-n),e.closePath()}},hr=-.5,mr=Hr(3)/2,cj=1/Hr(12),rY=(cj/2+1)*3,aY={draw(e,t){const n=Hr(t/rY),r=n/2,i=n*cj,l=r,c=n*cj+n,d=-l,f=c;e.moveTo(r,i),e.lineTo(l,c),e.lineTo(d,f),e.lineTo(hr*r-mr*i,mr*r+hr*i),e.lineTo(hr*l-mr*c,mr*l+hr*c),e.lineTo(hr*d-mr*f,mr*d+hr*f),e.lineTo(hr*r+mr*i,hr*i-mr*r),e.lineTo(hr*l+mr*c,hr*c-mr*l),e.lineTo(hr*d+mr*f,hr*f-mr*d),e.closePath()}};function iY(e,t){let n=null,r=OS(i);e=typeof e=="function"?e:pt(e||ES),t=typeof t=="function"?t:pt(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:pt(l),i):e},i.size=function(l){return arguments.length?(t=typeof l=="function"?l:pt(+l),i):t},i.context=function(l){return arguments.length?(n=l??null,i):n},i}function Ih(){}function qh(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 x6(e){this._context=e}x6.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:qh(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:qh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sY(e){return new x6(e)}function y6(e){this._context=e}y6.prototype={areaStart:Ih,areaEnd:Ih,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:qh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oY(e){return new y6(e)}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(){(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:qh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lY(e){return new g6(e)}function v6(e){this._context=e}v6.prototype={areaStart:Ih,areaEnd:Ih,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 cY(e){return new v6(e)}function qk(e){return e<0?-1:1}function Uk(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(qk(l)+qk(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(d))||0}function Vk(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function kv(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 Uh(e){this._context=e}Uh.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:kv(this,this._t0,Vk(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,kv(this,Vk(this,n=Uk(this,e,t)),n);break;default:kv(this,this._t0,n=Uk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function b6(e){this._context=new j6(e)}(b6.prototype=Object.create(Uh.prototype)).point=function(e,t){Uh.prototype.point.call(this,t,e)};function j6(e){this._context=e}j6.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 uY(e){return new Uh(e)}function dY(e){return new b6(e)}function w6(e){this._context=e}w6.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=Hk(e),i=Hk(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 Hk(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 fY(e){return new w6(e)}function ep(e,t){this._context=e,this._t=t}ep.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 hY(e){return new ep(e,.5)}function mY(e){return new ep(e,0)}function pY(e){return new ep(e,1)}function Jo(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 uj(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function xY(e,t){return e[t]}function yY(e){const t=[];return t.key=e,t}function gY(){var e=pt([]),t=uj,n=Jo,r=xY;function i(l){var c=Array.from(e.apply(this,arguments),yY),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=TS(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:pt(Array.from(l)),i):e},i.value=function(l){return arguments.length?(r=typeof l=="function"?l:pt(+l),i):r},i.order=function(l){return arguments.length?(t=l==null?uj:typeof l=="function"?l:pt(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(n=l??Jo,i):n},i}function vY(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}Jo(e,t)}}function bY(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}Jo(e,t)}}function jY(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,A=S[r-1][1]||0;j+=v-A}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,Jo(e,t)}}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)}var wY=["type","size","sizeType"];function dj(){return dj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dj.apply(this,arguments)}function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(n),!0).forEach(function(r){SY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SY(e,t,n){return t=NY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NY(e){var t=AY(e,"string");return vu(t)=="symbol"?t:t+""}function AY(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 _Y(e,t){if(e==null)return{};var n=OY(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 OY(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 S6={symbolCircle:ES,symbolCross:YK,symbolDiamond:WK,symbolSquare:ZK,symbolStar:tY,symbolTriangle:nY,symbolWye:aY},TY=Math.PI/180,EY=function(t){var n="symbol".concat(Zm(t));return S6[n]||ES},kY=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*TY;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}},CY=function(t,n){S6["symbol".concat(Zm(t))]=n},kS=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=_Y(t,wY),h=Gk(Gk({},f),{},{type:r,size:l,sizeType:d}),p=function(){var v=EY(r),A=iY().type(v).size(kY(l,d,r));return A()},x=h.className,y=h.cx,j=h.cy,w=we(h,!0);return y===+y&&j===+j&&l===+l?V.createElement("path",dj({},w,{className:Le("recharts-symbols",x),transform:"translate(".concat(y,", ").concat(j,")"),d:p()})):null};kS.registerSymbol=CY;function el(e){"@babel/helpers - typeof";return el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}function fj(){return fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fj.apply(this,arguments)}function Kk(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 MY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kk(Object(n),!0).forEach(function(r){bu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RY(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,A6(r.key),r)}}function DY(e,t,n){return t&&RY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zY(e,t,n){return t=Vh(t),LY(e,N6()?Reflect.construct(t,n||[],Vh(e).constructor):t.apply(e,n))}function LY(e,t){if(t&&(el(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Y(e)}function $Y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N6=function(){return!!e})()}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vh(e)}function BY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hj(e,t)}function hj(e,t){return hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hj(e,t)}function bu(e,t,n){return t=A6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A6(e){var t=IY(e,"string");return el(t)=="symbol"?t:t+""}function IY(e,t){if(el(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(el(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pr=32,CS=(function(e){function t(){return PY(this,t),zY(this,t,arguments)}return BY(t,e),DY(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,l=pr/2,c=pr/6,d=pr/3,f=r.inactive?i:r.color;if(r.type==="plainline")return V.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:l,x2:pr,y2:l,className:"recharts-legend-icon"});if(r.type==="line")return V.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(pr,"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 V.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(pr/8,"h").concat(pr,"v").concat(pr*3/4,"h").concat(-pr,"z"),className:"recharts-legend-icon"});if(V.isValidElement(r.legendIcon)){var h=MY({},r);return delete h.legendIcon,V.cloneElement(r.legendIcon,h)}return V.createElement(kS,{fill:f,cx:l,cy:l,size:pr,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:pr,height:pr},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=Le(bu(bu({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",j.inactive));if(j.type==="none")return null;var A=ke(j.value)?null:j.value;Ur(!ke(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 V.createElement("li",fj({className:v,style:x,key:"legend-item-".concat(w)},ks(r.props,j,w)),V.createElement(ij,{width:c,height:c,viewBox:p,style:y},r.renderIcon(j)),V.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},S?S(A,j,w):A))})}},{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 V.createElement("ul",{className:"recharts-default-legend",style:d},this.renderItems())}}])})(k.PureComponent);bu(CS,"displayName","Legend");bu(CS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Cv,Yk;function qY(){if(Yk)return Cv;Yk=1;var e=Ym();function t(){this.__data__=new e,this.size=0}return Cv=t,Cv}var Mv,Xk;function UY(){if(Xk)return Mv;Xk=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Mv=e,Mv}var Pv,Wk;function VY(){if(Wk)return Pv;Wk=1;function e(t){return this.__data__.get(t)}return Pv=e,Pv}var Rv,Zk;function HY(){if(Zk)return Rv;Zk=1;function e(t){return this.__data__.has(t)}return Rv=e,Rv}var Dv,Qk;function FY(){if(Qk)return Dv;Qk=1;var e=Ym(),t=jS(),n=wS(),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 Dv=i,Dv}var zv,Jk;function _6(){if(Jk)return zv;Jk=1;var e=Ym(),t=qY(),n=UY(),r=VY(),i=HY(),l=FY();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,zv=c,zv}var Lv,eC;function GY(){if(eC)return Lv;eC=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Lv=t,Lv}var $v,tC;function KY(){if(tC)return $v;tC=1;function e(t){return this.__data__.has(t)}return $v=e,$v}var Bv,nC;function O6(){if(nC)return Bv;nC=1;var e=wS(),t=GY(),n=KY();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,Bv=r,Bv}var Iv,rC;function T6(){if(rC)return Iv;rC=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 Iv=e,Iv}var qv,aC;function E6(){if(aC)return qv;aC=1;function e(t,n){return t.has(n)}return qv=e,qv}var Uv,iC;function k6(){if(iC)return Uv;iC=1;var e=O6(),t=T6(),n=E6(),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 A=-1,O=!0,_=f&i?new e:void 0;for(x.set(c,d),x.set(d,c);++A<j;){var T=c[A],N=d[A];if(h)var E=y?h(N,T,A,d,c,x):h(T,N,A,c,d,x);if(E!==void 0){if(E)continue;O=!1;break}if(_){if(!t(d,function(M,R){if(!n(_,R)&&(T===M||p(T,M,f,h,x)))return _.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 Uv=l,Uv}var Vv,sC;function YY(){if(sC)return Vv;sC=1;var e=oa(),t=e.Uint8Array;return Vv=t,Vv}var Hv,oC;function XY(){if(oC)return Hv;oC=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,l){r[++n]=[l,i]}),r}return Hv=e,Hv}var Fv,lC;function MS(){if(lC)return Fv;lC=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Fv=e,Fv}var Gv,cC;function WY(){if(cC)return Gv;cC=1;var e=sd(),t=YY(),n=bS(),r=k6(),i=XY(),l=MS(),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]",A="[object ArrayBuffer]",O="[object DataView]",_=e?e.prototype:void 0,T=_?_.valueOf:void 0;function N(E,M,R,B,z,D,L){switch(R){case O:if(E.byteLength!=M.byteLength||E.byteOffset!=M.byteOffset)return!1;E=E.buffer,M=M.buffer;case A:return!(E.byteLength!=M.byteLength||!D(new t(E),new t(M)));case f:case h:case y:return n(+E,+M);case p:return E.name==M.name&&E.message==M.message;case j:case S:return E==M+"";case x:var $=i;case w:var F=B&c;if($||($=l),E.size!=M.size&&!F)return!1;var H=L.get(E);if(H)return H==M;B|=d,L.set(E,M);var I=r($(E),$(M),B,z,D,L);return L.delete(E),I;case v:if(T)return T.call(E)==T.call(M)}return!1}return Gv=N,Gv}var Kv,uC;function C6(){if(uC)return Kv;uC=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 Kv=e,Kv}var Yv,dC;function ZY(){if(dC)return Yv;dC=1;var e=C6(),t=Ln();function n(r,i,l){var c=i(r);return t(r)?c:e(c,l(r))}return Yv=n,Yv}var Xv,fC;function QY(){if(fC)return Xv;fC=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 Xv=e,Xv}var Wv,hC;function JY(){if(hC)return Wv;hC=1;function e(){return[]}return Wv=e,Wv}var Zv,mC;function eX(){if(mC)return Zv;mC=1;var e=QY(),t=JY(),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 Zv=l,Zv}var Qv,pC;function tX(){if(pC)return Qv;pC=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Qv=e,Qv}var Jv,xC;function nX(){if(xC)return Jv;xC=1;var e=Fa(),t=Ga(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Jv=r,Jv}var eb,yC;function PS(){if(yC)return eb;yC=1;var e=nX(),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 eb=l,eb}var Jc={exports:{}},tb,gC;function rX(){if(gC)return tb;gC=1;function e(){return!1}return tb=e,tb}Jc.exports;var vC;function M6(){return vC||(vC=1,(function(e,t){var n=oa(),r=rX(),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})(Jc,Jc.exports)),Jc.exports}var nb,bC;function RS(){if(bC)return nb;bC=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 nb=n,nb}var rb,jC;function DS(){if(jC)return rb;jC=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return rb=t,rb}var ab,wC;function aX(){if(wC)return ab;wC=1;var e=Fa(),t=DS(),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]",A="[object DataView]",O="[object Float32Array]",_="[object Float64Array]",T="[object Int8Array]",N="[object Int16Array]",E="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",D={};D[O]=D[_]=D[T]=D[N]=D[E]=D[M]=D[R]=D[B]=D[z]=!0,D[r]=D[i]=D[v]=D[l]=D[A]=D[c]=D[d]=D[f]=D[h]=D[p]=D[x]=D[y]=D[j]=D[w]=D[S]=!1;function L($){return n($)&&t($.length)&&!!D[e($)]}return ab=L,ab}var ib,SC;function P6(){if(SC)return ib;SC=1;function e(t){return function(n){return t(n)}}return ib=e,ib}var eu={exports:{}};eu.exports;var NC;function iX(){return NC||(NC=1,(function(e,t){var n=J5(),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})(eu,eu.exports)),eu.exports}var sb,AC;function R6(){if(AC)return sb;AC=1;var e=aX(),t=P6(),n=iX(),r=n&&n.isTypedArray,i=r?t(r):e;return sb=i,sb}var ob,_C;function sX(){if(_C)return ob;_C=1;var e=tX(),t=PS(),n=Ln(),r=M6(),i=RS(),l=R6(),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):[],A=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,A)))&&v.push(O);return v}return ob=f,ob}var lb,OC;function oX(){if(OC)return lb;OC=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return lb=t,lb}var cb,TC;function D6(){if(TC)return cb;TC=1;function e(t,n){return function(r){return t(n(r))}}return cb=e,cb}var ub,EC;function lX(){if(EC)return ub;EC=1;var e=D6(),t=e(Object.keys,Object);return ub=t,ub}var db,kC;function cX(){if(kC)return db;kC=1;var e=oX(),t=lX(),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 db=i,db}var fb,CC;function ld(){if(CC)return fb;CC=1;var e=vS(),t=DS();function n(r){return r!=null&&t(r.length)&&!e(r)}return fb=n,fb}var hb,MC;function tp(){if(MC)return hb;MC=1;var e=sX(),t=cX(),n=ld();function r(i){return n(i)?e(i):t(i)}return hb=r,hb}var mb,PC;function uX(){if(PC)return mb;PC=1;var e=ZY(),t=eX(),n=tp();function r(i){return e(i,n,t)}return mb=r,mb}var pb,RC;function dX(){if(RC)return pb;RC=1;var e=uX(),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 A=y[v];if(!(x?A in c:r.call(c,A)))return!1}var O=p.get(l),_=p.get(c);if(O&&_)return O==c&&_==l;var T=!0;p.set(l,c),p.set(c,l);for(var N=x;++v<j;){A=y[v];var E=l[A],M=c[A];if(f)var R=x?f(M,E,A,c,l,p):f(E,M,A,l,c,p);if(!(R===void 0?E===M||h(E,M,d,f,p):R)){T=!1;break}N||(N=A=="constructor")}if(T&&!N){var B=l.constructor,z=c.constructor;B!=z&&"constructor"in l&&"constructor"in c&&!(typeof B=="function"&&B instanceof B&&typeof z=="function"&&z instanceof z)&&(T=!1)}return p.delete(l),p.delete(c),T}return pb=i,pb}var xb,DC;function fX(){if(DC)return xb;DC=1;var e=Ls(),t=oa(),n=e(t,"DataView");return xb=n,xb}var yb,zC;function hX(){if(zC)return yb;zC=1;var e=Ls(),t=oa(),n=e(t,"Promise");return yb=n,yb}var gb,LC;function z6(){if(LC)return gb;LC=1;var e=Ls(),t=oa(),n=e(t,"Set");return gb=n,gb}var vb,$C;function mX(){if($C)return vb;$C=1;var e=Ls(),t=oa(),n=e(t,"WeakMap");return vb=n,vb}var bb,BC;function pX(){if(BC)return bb;BC=1;var e=fX(),t=jS(),n=hX(),r=z6(),i=mX(),l=Fa(),c=e6(),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),A=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(_){var T=l(_),N=T==f?_.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 A:return x}return T}),bb=O,bb}var jb,IC;function xX(){if(IC)return jb;IC=1;var e=_6(),t=k6(),n=WY(),r=dX(),i=pX(),l=Ln(),c=M6(),d=R6(),f=1,h="[object Arguments]",p="[object Array]",x="[object Object]",y=Object.prototype,j=y.hasOwnProperty;function w(S,v,A,O,_,T){var N=l(S),E=l(v),M=N?p:i(S),R=E?p:i(v);M=M==h?x:M,R=R==h?x:R;var B=M==x,z=R==x,D=M==R;if(D&&c(S)){if(!c(v))return!1;N=!0,B=!1}if(D&&!B)return T||(T=new e),N||d(S)?t(S,v,A,O,_,T):n(S,v,M,A,O,_,T);if(!(A&f)){var L=B&&j.call(S,"__wrapped__"),$=z&&j.call(v,"__wrapped__");if(L||$){var F=L?S.value():S,H=$?v.value():v;return T||(T=new e),_(F,H,A,O,T)}}return D?(T||(T=new e),r(S,v,A,O,_,T)):!1}return jb=w,jb}var wb,qC;function zS(){if(qC)return wb;qC=1;var e=xX(),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 wb=n,wb}var Sb,UC;function yX(){if(UC)return Sb;UC=1;var e=_6(),t=zS(),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 A=f(w,S,j,l,c,v);if(!(A===void 0?t(S,w,n|r,f,v):A))return!1}}return!0}return Sb=i,Sb}var Nb,VC;function L6(){if(VC)return Nb;VC=1;var e=$i();function t(n){return n===n&&!e(n)}return Nb=t,Nb}var Ab,HC;function gX(){if(HC)return Ab;HC=1;var e=L6(),t=tp();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 Ab=n,Ab}var _b,FC;function $6(){if(FC)return _b;FC=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return _b=e,_b}var Ob,GC;function vX(){if(GC)return Ob;GC=1;var e=yX(),t=gX(),n=$6();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 Ob=r,Ob}var Tb,KC;function bX(){if(KC)return Tb;KC=1;function e(t,n){return t!=null&&n in Object(t)}return Tb=e,Tb}var Eb,YC;function jX(){if(YC)return Eb;YC=1;var e=r6(),t=PS(),n=Ln(),r=RS(),i=DS(),l=Wm();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 Eb=c,Eb}var kb,XC;function wX(){if(XC)return kb;XC=1;var e=bX(),t=jX();function n(r,i){return r!=null&&t(r,i,e)}return kb=n,kb}var Cb,WC;function SX(){if(WC)return Cb;WC=1;var e=zS(),t=a6(),n=wX(),r=gS(),i=L6(),l=$6(),c=Wm(),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,ZC;function $l(){if(ZC)return Mb;ZC=1;function e(t){return t}return Mb=e,Mb}var Pb,QC;function NX(){if(QC)return Pb;QC=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Pb=e,Pb}var Rb,JC;function AX(){if(JC)return Rb;JC=1;var e=NS();function t(n){return function(r){return e(r,n)}}return Rb=t,Rb}var Db,eM;function _X(){if(eM)return Db;eM=1;var e=NX(),t=AX(),n=gS(),r=Wm();function i(l){return n(l)?e(r(l)):t(l)}return Db=i,Db}var zb,tM;function la(){if(tM)return zb;tM=1;var e=vX(),t=SX(),n=$l(),r=Ln(),i=_X();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 zb=l,zb}var Lb,nM;function B6(){if(nM)return Lb;nM=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 Lb=e,Lb}var $b,rM;function OX(){if(rM)return $b;rM=1;function e(t){return t!==t}return $b=e,$b}var Bb,aM;function TX(){if(aM)return Bb;aM=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 Bb=e,Bb}var Ib,iM;function EX(){if(iM)return Ib;iM=1;var e=B6(),t=OX(),n=TX();function r(i,l,c){return l===l?n(i,l,c):e(i,t,c)}return Ib=r,Ib}var qb,sM;function kX(){if(sM)return qb;sM=1;var e=EX();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return qb=t,qb}var Ub,oM;function CX(){if(oM)return Ub;oM=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 Ub=e,Ub}var Vb,lM;function MX(){if(lM)return Vb;lM=1;function e(){}return Vb=e,Vb}var Hb,cM;function PX(){if(cM)return Hb;cM=1;var e=z6(),t=MX(),n=MS(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(l){return new e(l)}:t;return Hb=i,Hb}var Fb,uM;function RX(){if(uM)return Fb;uM=1;var e=O6(),t=kX(),n=CX(),r=E6(),i=PX(),l=MS(),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 A=h?null:i(f);if(A)return l(A);w=!1,y=r,v=new e}else v=h?[]:S;e:for(;++x<j;){var O=f[x],_=h?h(O):O;if(O=p||O!==0?O:0,w&&_===_){for(var T=v.length;T--;)if(v[T]===_)continue e;h&&v.push(_),S.push(O)}else y(v,_,p)||(v!==S&&v.push(_),S.push(O))}return S}return Fb=d,Fb}var Gb,dM;function DX(){if(dM)return Gb;dM=1;var e=la(),t=RX();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Gb=n,Gb}var zX=DX();const fM=it(zX);function I6(e,t,n){return t===!0?fM(e,n):ke(t)?fM(e,t):e}function tl(e){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tl(e)}var LX=["ref"];function hM(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?hM(Object(n),!0).forEach(function(r){np(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mM(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,U6(r.key),r)}}function BX(e,t,n){return t&&mM(e.prototype,t),n&&mM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IX(e,t,n){return t=Hh(t),qX(e,q6()?Reflect.construct(t,n||[],Hh(e).constructor):t.apply(e,n))}function qX(e,t){if(t&&(tl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UX(e)}function UX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q6=function(){return!!e})()}function Hh(e){return Hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hh(e)}function VX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 np(e,t,n){return t=U6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U6(e){var t=HX(e,"string");return tl(t)=="symbol"?t:t+""}function HX(e,t){if(tl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function FX(e,t){if(e==null)return{};var n=GX(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 GX(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 KX(e){return e.value}function YX(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var n=FX(t,LX);return V.createElement(CS,n)}var pM=1,Fo=(function(e){function t(){var n;$X(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=IX(this,t,[].concat(i)),np(n,"lastBoundingBox",{width:-1,height:-1}),n}return VX(t,e),BX(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)>pM||Math.abs(i.height-this.lastBoundingBox.height)>pM)&&(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?Ea({},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 Ea(Ea({},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=Ea(Ea({position:"absolute",width:c||"auto",height:d||"auto"},this.getDefaultPosition(f)),f);return V.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:function(j){r.wrapperNode=j}},YX(l,Ea(Ea({},this.props),{},{payload:I6(p,h,KX)})))}}],[{key:"getWithHeight",value:function(r,i){var l=Ea(Ea({},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}}])})(k.PureComponent);np(Fo,"displayName","Legend");np(Fo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Kb,xM;function XX(){if(xM)return Kb;xM=1;var e=sd(),t=PS(),n=Ln(),r=e?e.isConcatSpreadable:void 0;function i(l){return n(l)||t(l)||!!(r&&l&&l[r])}return Kb=i,Kb}var Yb,yM;function V6(){if(yM)return Yb;yM=1;var e=C6(),t=XX();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 Yb=n,Yb}var Xb,gM;function WX(){if(gM)return Xb;gM=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 Xb=e,Xb}var Wb,vM;function ZX(){if(vM)return Wb;vM=1;var e=WX(),t=e();return Wb=t,Wb}var Zb,bM;function H6(){if(bM)return Zb;bM=1;var e=ZX(),t=tp();function n(r,i){return r&&e(r,i,t)}return Zb=n,Zb}var Qb,jM;function QX(){if(jM)return Qb;jM=1;var e=ld();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 Qb=t,Qb}var Jb,wM;function LS(){if(wM)return Jb;wM=1;var e=H6(),t=QX(),n=t(e);return Jb=n,Jb}var e0,SM;function F6(){if(SM)return e0;SM=1;var e=LS(),t=ld();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 e0=n,e0}var t0,NM;function JX(){if(NM)return t0;NM=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return t0=e,t0}var n0,AM;function eW(){if(AM)return n0;AM=1;var e=Dl();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 n0=t,n0}var r0,_M;function tW(){if(_M)return r0;_M=1;var e=eW();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 r0=t,r0}var a0,OM;function nW(){if(OM)return a0;OM=1;var e=SS(),t=NS(),n=la(),r=F6(),i=JX(),l=P6(),c=tW(),d=$l(),f=Ln();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,A){var O=e(x,function(_){return _(S)});return{criteria:O,index:++j,value:S}});return i(w,function(S,v){return c(S,v,y)})}return a0=h,a0}var i0,TM;function rW(){if(TM)return i0;TM=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 i0=e,i0}var s0,EM;function aW(){if(EM)return s0;EM=1;var e=rW(),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 s0=n,s0}var o0,kM;function iW(){if(kM)return o0;kM=1;function e(t){return function(){return t}}return o0=e,o0}var l0,CM;function G6(){if(CM)return l0;CM=1;var e=Ls(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return l0=t,l0}var c0,MM;function sW(){if(MM)return c0;MM=1;var e=iW(),t=G6(),n=$l(),r=t?function(i,l){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(l),writable:!0})}:n;return c0=r,c0}var u0,PM;function oW(){if(PM)return u0;PM=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 u0=r,u0}var d0,RM;function lW(){if(RM)return d0;RM=1;var e=sW(),t=oW(),n=t(e);return d0=n,d0}var f0,DM;function cW(){if(DM)return f0;DM=1;var e=$l(),t=aW(),n=lW();function r(i,l){return n(t(i,l,e),i+"")}return f0=r,f0}var h0,zM;function rp(){if(zM)return h0;zM=1;var e=bS(),t=ld(),n=RS(),r=$i();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 h0=i,h0}var m0,LM;function uW(){if(LM)return m0;LM=1;var e=V6(),t=nW(),n=cW(),r=rp(),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 m0=i,m0}var dW=uW();const $S=it(dW);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 pj(){return pj=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},pj.apply(this,arguments)}function fW(e,t){return xW(e)||pW(e,t)||mW(e,t)||hW()}function hW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mW(e,t){if(e){if(typeof e=="string")return $M(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 $M(e,t)}}function $M(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 pW(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 xW(e){if(Array.isArray(e))return e}function BM(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 p0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BM(Object(n),!0).forEach(function(r){yW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yW(e,t,n){return t=gW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gW(e){var t=vW(e,"string");return ju(t)=="symbol"?t:t+""}function vW(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(t==="string"?String:Number)(e)}function bW(e){return Array.isArray(e)&&Wt(e[0])&&Wt(e[1])?e.join(" ~ "):e}var jW=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,A=t.accessibilityLayer,O=A===void 0?!1:A,_=function(){if(p&&p.length){var L={padding:0,margin:0},$=(y?$S(p,y):p).map(function(F,H){if(F.type==="none")return null;var I=p0({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},d),G=F.formatter||x||bW,Z=F.value,ie=F.name,ce=Z,q=ie;if(G&&ce!=null&&q!=null){var Y=G(Z,ie,F,H,p);if(Array.isArray(Y)){var ae=fW(Y,2);ce=ae[0],q=ae[1]}else ce=Y}return V.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(H),style:I},Wt(q)?V.createElement("span",{className:"recharts-tooltip-item-name"},q):null,Wt(q)?V.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,V.createElement("span",{className:"recharts-tooltip-item-value"},ce),V.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return V.createElement("ul",{className:"recharts-tooltip-item-list",style:L},$)}return null},T=p0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},l),N=p0({margin:0},h),E=!De(S),M=E?S:"",R=Le("recharts-default-tooltip",j),B=Le("recharts-tooltip-label",w);E&&v&&p!==void 0&&p!==null&&(M=v(S,p));var z=O?{role:"status","aria-live":"assertive"}:{};return V.createElement("div",pj({className:R,style:T},z),V.createElement("p",{className:B,style:N},V.isValidElement(M)?M:"".concat(M)),_())};function wu(e){"@babel/helpers - typeof";return wu=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},wu(e)}function Xf(e,t,n){return t=wW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wW(e){var t=SW(e,"string");return wu(t)=="symbol"?t:t+""}function SW(e,t){if(wu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vc="recharts-tooltip-wrapper",NW={visibility:"hidden"};function AW(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Le(Vc,Xf(Xf(Xf(Xf({},"".concat(Vc,"-right"),he(n)&&t&&he(t.x)&&n>=t.x),"".concat(Vc,"-left"),he(n)&&t&&he(t.x)&&n<t.x),"".concat(Vc,"-bottom"),he(r)&&t&&he(t.y)&&r>=t.y),"".concat(Vc,"-top"),he(r)&&t&&he(t.y)&&r<t.y))}function IM(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 _W(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 OW(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=IM({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),x=IM({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),h=_W({translateX:p,translateY:x,useTranslate3d:d})):h=NW,{cssProperties:h,cssClasses:AW({translateX:p,translateY:x,coordinate:n})}}function nl(e){"@babel/helpers - typeof";return nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nl(e)}function qM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function UM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(n),!0).forEach(function(r){yj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EW(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,Y6(r.key),r)}}function kW(e,t,n){return t&&EW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CW(e,t,n){return t=Fh(t),MW(e,K6()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function MW(e,t){if(t&&(nl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PW(e)}function PW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K6=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function RW(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 yj(e,t,n){return t=Y6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y6(e){var t=DW(e,"string");return nl(t)=="symbol"?t:t+""}function DW(e,t){if(nl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var VM=1,zW=(function(e){function t(){var n;TW(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=CW(this,t,[].concat(i)),yj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),yj(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 RW(t,e),kW(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>VM||Math.abs(r.height-this.state.lastBoundingBox.height)>VM)&&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,A=i.viewBox,O=i.wrapperStyle,_=OW({allowEscapeViewBox:c,coordinate:p,offsetTopLeft:j,position:w,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:A}),T=_.cssClasses,N=_.cssProperties,E=UM(UM({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 V.createElement("div",{tabIndex:-1,className:T,style:E,ref:function(R){r.wrapperNode=R}},h)}}])})(k.PureComponent),LW=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},$s={isSsr:LW()};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 HM(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 FM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HM(Object(n),!0).forEach(function(r){BS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BW(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 IW(e,t,n){return t&&BW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qW(e,t,n){return t=Gh(t),UW(e,X6()?Reflect.construct(t,n||[],Gh(e).constructor):t.apply(e,n))}function UW(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 VW(e)}function VW(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 Gh(e){return Gh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gh(e)}function HW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gj(e,t)}function gj(e,t){return gj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gj(e,t)}function BS(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=FW(e,"string");return rl(t)=="symbol"?t:t+""}function FW(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)}function GW(e){return e.dataKey}function KW(e,t){return V.isValidElement(e)?V.cloneElement(e,t):typeof e=="function"?V.createElement(e,t):V.createElement(jW,t)}var xr=(function(e){function t(){return $W(this,t),qW(this,t,arguments)}return HW(t,e),IW(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,A=i.reverseDirection,O=i.useTranslate3d,_=i.viewBox,T=i.wrapperStyle,N=w??[];x&&N.length&&(N=I6(w.filter(function(M){return M.value!=null&&(M.hide!==!0||r.props.includeHidden)}),S,GW));var E=N.length>0;return V.createElement(zW,{allowEscapeViewBox:c,animationDuration:d,animationEasing:f,isAnimationActive:y,active:l,coordinate:p,hasPayload:E,offset:j,position:v,reverseDirection:A,useTranslate3d:O,viewBox:_,wrapperStyle:T},KW(h,FM(FM({},this.props),{},{payload:N})))}}])})(k.PureComponent);BS(xr,"displayName","Tooltip");BS(xr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!$s.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 x0,GM;function YW(){if(GM)return x0;GM=1;var e=oa(),t=function(){return e.Date.now()};return x0=t,x0}var y0,KM;function XW(){if(KM)return y0;KM=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return y0=t,y0}var g0,YM;function WW(){if(YM)return g0;YM=1;var e=XW(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return g0=n,g0}var v0,XM;function Z6(){if(XM)return v0;XM=1;var e=WW(),t=$i(),n=Dl(),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 v0=f,v0}var b0,WM;function ZW(){if(WM)return b0;WM=1;var e=$i(),t=YW(),n=Z6(),r="Expected a function",i=Math.max,l=Math.min;function c(d,f,h){var p,x,y,j,w,S,v=0,A=!1,O=!1,_=!0;if(typeof d!="function")throw new TypeError(r);f=n(f)||0,e(h)&&(A=!!h.leading,O="maxWait"in h,y=O?i(n(h.maxWait)||0,f):y,_="trailing"in h?!!h.trailing:_);function T($){var F=p,H=x;return p=x=void 0,v=$,j=d.apply(H,F),j}function N($){return v=$,w=setTimeout(R,f),A?T($):j}function E($){var F=$-S,H=$-v,I=f-F;return O?l(I,y-H):I}function M($){var F=$-S,H=$-v;return S===void 0||F>=f||F<0||O&&H>=y}function R(){var $=t();if(M($))return B($);w=setTimeout(R,E($))}function B($){return w=void 0,_&&p?T($):(p=x=void 0,j)}function z(){w!==void 0&&clearTimeout(w),v=0,p=S=x=w=void 0}function D(){return w===void 0?j:B(t())}function L(){var $=t(),F=M($);if(p=arguments,x=this,S=$,F){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 L.cancel=z,L.flush=D,L}return b0=c,b0}var j0,ZM;function QW(){if(ZM)return j0;ZM=1;var e=ZW(),t=$i(),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 j0=r,j0}var JW=QW();const Q6=it(JW);function Su(e){"@babel/helpers - typeof";return Su=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},Su(e)}function QM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QM(Object(n),!0).forEach(function(r){eZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eZ(e,t,n){return t=tZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tZ(e){var t=nZ(e,"string");return Su(t)=="symbol"?t:t+""}function nZ(e,t){if(Su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rZ(e,t){return oZ(e)||sZ(e,t)||iZ(e,t)||aZ()}function aZ(){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 iZ(e,t){if(e){if(typeof e=="string")return JM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JM(e,t)}}function JM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sZ(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 oZ(e){if(Array.isArray(e))return e}var vj=k.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,A=e.className,O=e.onResize,_=e.style,T=_===void 0?{}:_,N=k.useRef(null),E=k.useRef();E.current=O,k.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 M=k.useState({containerWidth:i.width,containerHeight:i.height}),R=rZ(M,2),B=R[0],z=R[1],D=k.useCallback(function($,F){z(function(H){var I=Math.round($),G=Math.round(F);return H.containerWidth===I&&H.containerHeight===G?H:{containerWidth:I,containerHeight:G}})},[]);k.useEffect(function(){var $=function(ie){var ce,q=ie[0].contentRect,Y=q.width,ae=q.height;D(Y,ae),(ce=E.current)===null||ce===void 0||ce.call(E,Y,ae)};S>0&&($=Q6($,S,{trailing:!0,leading:!1}));var F=new ResizeObserver($),H=N.current.getBoundingClientRect(),I=H.width,G=H.height;return D(I,G),F.observe(N.current),function(){F.disconnect()}},[D,S]);var L=k.useMemo(function(){var $=B.containerWidth,F=B.containerHeight;if($<0||F<0)return null;Ur(gs(c)||gs(f),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,c,f),Ur(!n||n>0,"The aspect(%s) must be greater than zero.",n);var H=gs(c)?$:c,I=gs(f)?F:f;n&&n>0&&(H?I=H/n:I&&(H=I*n),y&&I>y&&(I=y)),Ur(H>0||I>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.`,H,I,c,f,p,x,n);var G=!Array.isArray(j)&&za(j.type).endsWith("Chart");return V.Children.map(j,function(Z){return V.isValidElement(Z)?k.cloneElement(Z,Wf({width:H,height:I},G?{style:Wf({height:"100%",width:"100%",maxHeight:I,maxWidth:H},Z.props.style)}:{})):Z})},[n,j,f,y,x,p,B,c]);return V.createElement("div",{id:v?"".concat(v):void 0,className:Le("recharts-responsive-container",A),style:Wf(Wf({},T),{},{width:c,height:f,minWidth:p,minHeight:x,maxHeight:y}),ref:N},L)}),ap=function(t){return null};ap.displayName="Cell";function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function eP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eP(Object(n),!0).forEach(function(r){lZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lZ(e,t,n){return t=cZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cZ(e){var t=uZ(e,"string");return Nu(t)=="symbol"?t:t+""}function uZ(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oo={widthCache:{},cacheCount:0},dZ=2e3,fZ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tP="recharts_measurement_span";function hZ(e){var t=bj({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var su=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||$s.isSsr)return{width:0,height:0};var r=hZ(n),i=JSON.stringify({text:t,copyStyle:r});if(Oo.widthCache[i])return Oo.widthCache[i];try{var l=document.getElementById(tP);l||(l=document.createElement("span"),l.setAttribute("id",tP),l.setAttribute("aria-hidden","true"),document.body.appendChild(l));var c=bj(bj({},fZ),r);Object.assign(l.style,c),l.textContent="".concat(t);var d=l.getBoundingClientRect(),f={width:d.width,height:d.height};return Oo.widthCache[i]=f,++Oo.cacheCount>dZ&&(Oo.cacheCount=0,Oo.widthCache={}),f}catch{return{width:0,height:0}}},mZ=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Au(e){"@babel/helpers - typeof";return Au=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},Au(e)}function Kh(e,t){return gZ(e)||yZ(e,t)||xZ(e,t)||pZ()}function pZ(){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 xZ(e,t){if(e){if(typeof e=="string")return nP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nP(e,t)}}function nP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yZ(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 gZ(e){if(Array.isArray(e))return e}function vZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jZ(r.key),r)}}function bZ(e,t,n){return t&&rP(e.prototype,t),n&&rP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jZ(e){var t=wZ(e,"string");return Au(t)=="symbol"?t:t+""}function wZ(e,t){if(Au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var aP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,SZ=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,NZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,J6={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},AZ=Object.keys(J6),Do="NaN";function _Z(e,t){return e*J6[t]}var Zf=(function(){function e(t,n){vZ(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!SZ.test(n)&&(this.num=NaN,this.unit=""),AZ.includes(n)&&(this.num=_Z(t,n),this.unit="px")}return bZ(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=NZ.exec(n))!==null&&r!==void 0?r:[],l=Kh(i,3),c=l[1],d=l[2];return new e(parseFloat(c),d??"")}}])})();function ez(e){if(e.includes(Do))return Do;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=aP.exec(t))!==null&&n!==void 0?n:[],i=Kh(r,4),l=i[1],c=i[2],d=i[3],f=Zf.parse(l??""),h=Zf.parse(d??""),p=c==="*"?f.multiply(h):f.divide(h);if(p.isNaN())return Do;t=t.replace(aP,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var x,y=(x=iP.exec(t))!==null&&x!==void 0?x:[],j=Kh(y,4),w=j[1],S=j[2],v=j[3],A=Zf.parse(w??""),O=Zf.parse(v??""),_=S==="+"?A.add(O):A.subtract(O);if(_.isNaN())return Do;t=t.replace(iP,_.toString())}return t}var sP=/\(([^()]*)\)/;function OZ(e){for(var t=e;t.includes("(");){var n=sP.exec(t),r=Kh(n,2),i=r[1];t=t.replace(sP,ez(i))}return t}function TZ(e){var t=e.replace(/\s+/g,"");return t=OZ(t),t=ez(t),t}function EZ(e){try{return TZ(e)}catch{return Do}}function w0(e){var t=EZ(e.slice(5,-1));return t===Do?"":t}var kZ=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],CZ=["dx","dy","angle","className","breakAll"];function jj(){return jj=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},jj.apply(this,arguments)}function oP(e,t){if(e==null)return{};var n=MZ(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 MZ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lP(e,t){return zZ(e)||DZ(e,t)||RZ(e,t)||PZ()}function PZ(){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 RZ(e,t){if(e){if(typeof e=="string")return cP(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 cP(e,t)}}function cP(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 DZ(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 zZ(e){if(Array.isArray(e))return e}var tz=/[ \f\n\r\t\v\u2028\u2029]+/,nz=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var l=[];De(n)||(r?l=n.toString().split(""):l=n.toString().split(tz));var c=l.map(function(f){return{word:f,width:su(f,i).width}}),d=r?0:su(" ",i).width;return{wordsWithComputedWidth:c,spaceWidth:d}}catch{return null}},LZ=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 H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(I,G){var Z=G.word,ie=G.width,ce=I[I.length-1];if(ce&&(i==null||l||ce.width+ie+r<Number(i)))ce.words.push(Z),ce.width+=ie+r;else{var q={words:[Z],width:ie};I.push(q)}return I},[])},j=y(n),w=function(H){return H.reduce(function(I,G){return I.width>G.width?I:G})};if(!p)return j;for(var S="…",v=function(H){var I=x.slice(0,H),G=nz({breakAll:h,style:f,children:I+S}).wordsWithComputedWidth,Z=y(G),ie=Z.length>c||w(Z).width>Number(i);return[ie,Z]},A=0,O=x.length-1,_=0,T;A<=O&&_<=x.length-1;){var N=Math.floor((A+O)/2),E=N-1,M=v(E),R=lP(M,2),B=R[0],z=R[1],D=v(N),L=lP(D,1),$=L[0];if(!B&&!$&&(A=N+1),B&&$&&(O=N-1),!B&&$){T=z;break}_++}return T||j},uP=function(t){var n=De(t)?[]:t.toString().split(tz);return[{words:n}]},$Z=function(t){var n=t.width,r=t.scaleToFit,i=t.children,l=t.style,c=t.breakAll,d=t.maxLines;if((n||r)&&!$s.isSsr){var f,h,p=nz({breakAll:c,children:i,style:l});if(p){var x=p.wordsWithComputedWidth,y=p.spaceWidth;f=x,h=y}else return uP(i);return LZ({breakAll:c,children:i,maxLines:d,style:l},f,h,n,r)}return uP(i)},dP="#808080",Cs=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,A=v===void 0?dP:v,O=oP(t,kZ),_=k.useMemo(function(){return $Z({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,M=O.className,R=O.breakAll,B=oP(O,CZ);if(!Wt(r)||!Wt(l))return null;var z=r+(he(T)?T:0),D=l+(he(N)?N:0),L;switch(S){case"start":L=w0("calc(".concat(h,")"));break;case"middle":L=w0("calc(".concat((_.length-1)/2," * -").concat(d," + (").concat(h," / 2))"));break;default:L=w0("calc(".concat(_.length-1," * -").concat(d,")"));break}var $=[];if(x){var F=_[0].width,H=O.width;$.push("scale(".concat((he(H)?H/F:1)/F,")"))}return E&&$.push("rotate(".concat(E,", ").concat(z,", ").concat(D,")")),$.length&&(B.transform=$.join(" ")),V.createElement("text",jj({},we(B,!0),{x:z,y:D,className:Le("recharts-text",M),textAnchor:j,fill:A.includes("url")?dP:A}),_.map(function(I,G){var Z=I.words.join(R?"":" ");return V.createElement("tspan",{x:z,dy:G===0?L:d,key:"".concat(Z,"-").concat(G)},Z)}))};function ki(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function BZ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function IS(e){let t,n,r;e.length!==2?(t=ki,n=(d,f)=>ki(e(d),f),r=(d,f)=>e(d)-f):(t=e===ki||e===BZ?e:IZ,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 IZ(){return 0}function rz(e){return e===null?NaN:+e}function*qZ(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const UZ=IS(ki),cd=UZ.right;IS(rz).center;class fP extends Map{constructor(t,n=FZ){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(hP(this,t))}has(t){return super.has(hP(this,t))}set(t,n){return super.set(VZ(this,t),n)}delete(t){return super.delete(HZ(this,t))}}function hP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function VZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function HZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function FZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function GZ(e=ki){if(e===ki)return az;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 az(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const KZ=Math.sqrt(50),YZ=Math.sqrt(10),XZ=Math.sqrt(2);function Yh(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>=KZ?10:l>=YZ?5:l>=XZ?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?Yh(e,t,n*2):[d,f,h]}function wj(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?Yh(t,e,n):Yh(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 Sj(e,t,n){return t=+t,e=+e,n=+n,Yh(e,t,n)[2]}function Nj(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Sj(t,e,n):Sj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function mP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function pP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function iz(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?az:GZ(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));iz(e,t,j,w,i)}const l=e[t];let c=n,d=r;for(Hc(e,n,t),i(e[r],l)>0&&Hc(e,n,r);c<d;){for(Hc(e,c,d),++c,--d;i(e[c],l)<0;)++c;for(;i(e[d],l)>0;)--d}i(e[n],l)===0?Hc(e,n,d):(++d,Hc(e,d,r)),d<=t&&(n=d+1),t<=d&&(r=d-1)}return e}function Hc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function WZ(e,t,n){if(e=Float64Array.from(qZ(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return pP(e);if(t>=1)return mP(e);var r,i=(r-1)*t,l=Math.floor(i),c=mP(iz(e,l).subarray(0,l+1)),d=pP(e.subarray(l+1));return c+(d-c)*(i-l)}}function ZZ(e,t,n=rz){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 QZ(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 _r(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 Aj=Symbol("implicit");function qS(){var e=new fP,t=[],n=[],r=Aj;function i(l){let c=e.get(l);if(c===void 0){if(r!==Aj)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 fP;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 qS(t,n).unknown(r)},_r.apply(i,arguments),i}function _u(){var e=qS().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=QZ(y).map(function(A){return w+l*A});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 _u(t(),[r,i]).round(d).paddingInner(f).paddingOuter(h).align(p)},_r.apply(x(),arguments)}function sz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return sz(t())},e}function ou(){return sz(_u.apply(null,arguments).paddingInner(1))}function US(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function oz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ud(){}var Ou=.7,Xh=1/Ou,Go="\\s*([+-]?\\d+)\\s*",Tu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",JZ=/^#([0-9a-f]{3,8})$/,eQ=new RegExp(`^rgb\\(${Go},${Go},${Go}\\)$`),tQ=new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`),nQ=new RegExp(`^rgba\\(${Go},${Go},${Go},${Tu}\\)$`),rQ=new RegExp(`^rgba\\(${ta},${ta},${ta},${Tu}\\)$`),aQ=new RegExp(`^hsl\\(${Tu},${ta},${ta}\\)$`),iQ=new RegExp(`^hsla\\(${Tu},${ta},${ta},${Tu}\\)$`),xP={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};US(ud,Eu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yP,formatHex:yP,formatHex8:sQ,formatHsl:oQ,formatRgb:gP,toString:gP});function yP(){return this.rgb().formatHex()}function sQ(){return this.rgb().formatHex8()}function oQ(){return lz(this).formatHsl()}function gP(){return this.rgb().formatRgb()}function Eu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=JZ.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vP(t):n===3?new zn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Qf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Qf(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=eQ.exec(e))?new zn(t[1],t[2],t[3],1):(t=tQ.exec(e))?new zn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nQ.exec(e))?Qf(t[1],t[2],t[3],t[4]):(t=rQ.exec(e))?Qf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=aQ.exec(e))?wP(t[1],t[2]/100,t[3]/100,1):(t=iQ.exec(e))?wP(t[1],t[2]/100,t[3]/100,t[4]):xP.hasOwnProperty(e)?vP(xP[e]):e==="transparent"?new zn(NaN,NaN,NaN,0):null}function vP(e){return new zn(e>>16&255,e>>8&255,e&255,1)}function Qf(e,t,n,r){return r<=0&&(e=t=n=NaN),new zn(e,t,n,r)}function lQ(e){return e instanceof ud||(e=Eu(e)),e?(e=e.rgb(),new zn(e.r,e.g,e.b,e.opacity)):new zn}function _j(e,t,n,r){return arguments.length===1?lQ(e):new zn(e,t,n,r??1)}function zn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}US(zn,_j,oz(ud,{brighter(e){return e=e==null?Xh:Math.pow(Xh,e),new zn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ou:Math.pow(Ou,e),new zn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zn(_s(this.r),_s(this.g),_s(this.b),Wh(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:bP,formatHex:bP,formatHex8:cQ,formatRgb:jP,toString:jP}));function bP(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}`}function cQ(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}${vs((isNaN(this.opacity)?1:this.opacity)*255)}`}function jP(){const e=Wh(this.opacity);return`${e===1?"rgb(":"rgba("}${_s(this.r)}, ${_s(this.g)}, ${_s(this.b)}${e===1?")":`, ${e})`}`}function Wh(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 vs(e){return e=_s(e),(e<16?"0":"")+e.toString(16)}function wP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Lr(e,t,n,r)}function lz(e){if(e instanceof Lr)return new Lr(e.h,e.s,e.l,e.opacity);if(e instanceof ud||(e=Eu(e)),!e)return new Lr;if(e instanceof Lr)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 Lr(c,d,f,e.opacity)}function uQ(e,t,n,r){return arguments.length===1?lz(e):new Lr(e,t,n,r??1)}function Lr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}US(Lr,uQ,oz(ud,{brighter(e){return e=e==null?Xh:Math.pow(Xh,e),new Lr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ou:Math.pow(Ou,e),new Lr(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 zn(S0(e>=240?e-240:e+120,i,r),S0(e,i,r),S0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Lr(SP(this.h),Jf(this.s),Jf(this.l),Wh(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=Wh(this.opacity);return`${e===1?"hsl(":"hsla("}${SP(this.h)}, ${Jf(this.s)*100}%, ${Jf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function SP(e){return e=(e||0)%360,e<0?e+360:e}function Jf(e){return Math.max(0,Math.min(1,e||0))}function S0(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 VS=e=>()=>e;function dQ(e,t){return function(n){return e+n*t}}function fQ(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 hQ(e){return(e=+e)==1?cz:function(t,n){return n-t?fQ(t,n,e):VS(isNaN(t)?n:t)}}function cz(e,t){var n=t-e;return n?dQ(e,n):VS(isNaN(e)?t:e)}const NP=(function e(t){var n=hQ(t);function r(i,l){var c=n((i=_j(i)).r,(l=_j(l)).r),d=n(i.g,l.g),f=n(i.b,l.b),h=cz(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 mQ(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 pQ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function xQ(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]=Bl(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 yQ(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Zh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function gQ(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]=Bl(e[i],t[i]):r[i]=t[i];return function(l){for(i in n)r[i]=n[i](l);return r}}var Oj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,N0=new RegExp(Oj.source,"g");function vQ(e){return function(){return e}}function bQ(e){return function(t){return e(t)+""}}function jQ(e,t){var n=Oj.lastIndex=N0.lastIndex=0,r,i,l,c=-1,d=[],f=[];for(e=e+"",t=t+"";(r=Oj.exec(e))&&(i=N0.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:Zh(r,i)})),n=N0.lastIndex;return n<t.length&&(l=t.slice(n),d[c]?d[c]+=l:d[++c]=l),d.length<2?f[0]?bQ(f[0].x):vQ(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 Bl(e,t){var n=typeof t,r;return t==null||n==="boolean"?VS(t):(n==="number"?Zh:n==="string"?(r=Eu(t))?(t=r,NP):jQ:t instanceof Eu?NP:t instanceof Date?yQ:pQ(t)?mQ:Array.isArray(t)?xQ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?gQ:Zh)(e,t)}function HS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function wQ(e,t){t===void 0&&(t=e,e=Bl);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 SQ(e){return function(){return e}}function Qh(e){return+e}var AP=[0,1];function Nn(e){return e}function Tj(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:SQ(isNaN(t)?NaN:.5)}function NQ(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function AQ(e,t,n){var r=e[0],i=e[1],l=t[0],c=t[1];return i<r?(r=Tj(i,r),l=n(c,l)):(r=Tj(r,i),l=n(l,c)),function(d){return l(r(d))}}function _Q(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]=Tj(e[c],e[c+1]),l[c]=n(t[c],t[c+1]);return function(d){var f=cd(e,d,1,r)-1;return l[f](i[f](d))}}function dd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ip(){var e=AP,t=AP,n=Bl,r,i,l,c=Nn,d,f,h;function p(){var y=Math.min(e.length,t.length);return c!==Nn&&(c=NQ(e[0],e[y-1])),d=y>2?_Q:AQ,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),Zh)))(y)))},x.domain=function(y){return arguments.length?(e=Array.from(y,Qh),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=HS,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 FS(){return ip()(Nn,Nn)}function OQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Jh(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 al(e){return e=Jh(Math.abs(e)),e?e[1]:NaN}function TQ(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 EQ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var kQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ku(e){if(!(t=kQ.exec(e)))throw new Error("invalid format: "+e);var t;return new GS({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]})}ku.prototype=GS.prototype;function GS(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+""}GS.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 CQ(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 em;function MQ(e,t){var n=Jh(e,t);if(!n)return em=void 0,e.toPrecision(t);var r=n[0],i=n[1],l=i-(em=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")+Jh(e,Math.max(0,t+l-1))[0]}function _P(e,t){var n=Jh(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 OP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:OQ,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)=>_P(e*100,t),r:_P,s:MQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function TP(e){return e}var EP=Array.prototype.map,kP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function PQ(e){var t=e.grouping===void 0||e.thousands===void 0?TP:TQ(EP.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?TP:EQ(EP.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=ku(x);var j=x.fill,w=x.align,S=x.sign,v=x.symbol,A=x.zero,O=x.width,_=x.comma,T=x.precision,N=x.trim,E=x.type;E==="n"?(_=!0,E="g"):OP[E]||(T===void 0&&(T=12),N=!0,E="g"),(A||j==="0"&&w==="=")&&(A=!0,j="0",w="=");var M=(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:""),B=OP[E],z=/[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 D(L){var $=M,F=R,H,I,G;if(E==="c")F=B(L)+F,L="";else{L=+L;var Z=L<0||1/L<0;if(L=isNaN(L)?f:B(Math.abs(L),T),N&&(L=CQ(L)),Z&&+L==0&&S!=="+"&&(Z=!1),$=(Z?S==="("?S:d:S==="-"||S==="("?"":S)+$,F=(E==="s"&&!isNaN(L)&&em!==void 0?kP[8+em/3]:"")+F+(Z&&S==="("?")":""),z){for(H=-1,I=L.length;++H<I;)if(G=L.charCodeAt(H),48>G||G>57){F=(G===46?i+L.slice(H+1):L.slice(H))+F,L=L.slice(0,H);break}}}_&&!A&&(L=t(L,1/0));var ie=$.length+L.length+F.length,ce=ie<O?new Array(O-ie+1).join(j):"";switch(_&&A&&(L=t(ce+L,ce.length?O-F.length:1/0),ce=""),w){case"<":L=$+L+F+ce;break;case"=":L=$+ce+L+F;break;case"^":L=ce.slice(0,ie=ce.length>>1)+$+L+F+ce.slice(ie);break;default:L=ce+$+L+F;break}return l(L)}return D.toString=function(){return x+""},D}function p(x,y){var j=Math.max(-8,Math.min(8,Math.floor(al(y)/3)))*3,w=Math.pow(10,-j),S=h((x=ku(x),x.type="f",x),{suffix:kP[8+j/3]});return function(v){return S(w*v)}}return{format:h,formatPrefix:p}}var eh,KS,uz;RQ({thousands:",",grouping:[3],currency:["$",""]});function RQ(e){return eh=PQ(e),KS=eh.format,uz=eh.formatPrefix,eh}function DQ(e){return Math.max(0,-al(Math.abs(e)))}function zQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(al(t)/3)))*3-al(Math.abs(e)))}function LQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,al(t)-al(e))+1}function dz(e,t,n,r){var i=Nj(e,t,n),l;switch(r=ku(r??",f"),r.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(l=zQ(i,c))&&(r.precision=l),uz(r,c)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(l=LQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=l-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(l=DQ(i))&&(r.precision=l-(r.type==="%")*2);break}}return KS(r)}function Bi(e){var t=e.domain;return e.ticks=function(n){var r=t();return wj(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return dz(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=Sj(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 tm(){var e=FS();return e.copy=function(){return dd(e,tm())},_r.apply(e,arguments),Bi(e)}function fz(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Qh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return fz(e).unknown(t)},e=arguments.length?Array.from(e,Qh):[0,1],Bi(n)}function hz(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 CP(e){return Math.log(e)}function MP(e){return Math.exp(e)}function $Q(e){return-Math.log(-e)}function BQ(e){return-Math.exp(-e)}function IQ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function qQ(e){return e===10?IQ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function UQ(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function PP(e){return(t,n)=>-e(-t,n)}function YS(e){const t=e(CP,MP),n=t.domain;let r=10,i,l;function c(){return i=UQ(r),l=qQ(r),n()[0]<0?(i=PP(i),l=PP(l),e($Q,BQ)):e(CP,MP),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 A=[];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;A.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;A.push(S)}A.length*2<v&&(A=wj(h,p,v))}else A=wj(y,j,Math.min(j-y,v)).map(l);return x?A.reverse():A},t.tickFormat=(d,f)=>{if(d==null&&(d=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=ku(f)).precision==null&&(f.trim=!0),f=KS(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(hz(n(),{floor:d=>l(Math.floor(i(d))),ceil:d=>l(Math.ceil(i(d)))})),t}function mz(){const e=YS(ip()).domain([1,10]);return e.copy=()=>dd(e,mz()).base(e.base()),_r.apply(e,arguments),e}function RP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function DP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function XS(e){var t=1,n=e(RP(t),DP(t));return n.constant=function(r){return arguments.length?e(RP(t=+r),DP(t)):t},Bi(n)}function pz(){var e=XS(ip());return e.copy=function(){return dd(e,pz()).constant(e.constant())},_r.apply(e,arguments)}function zP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function VQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function HQ(e){return e<0?-e*e:e*e}function WS(e){var t=e(Nn,Nn),n=1;function r(){return n===1?e(Nn,Nn):n===.5?e(VQ,HQ):e(zP(n),zP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Bi(t)}function ZS(){var e=WS(ip());return e.copy=function(){return dd(e,ZS()).exponent(e.exponent())},_r.apply(e,arguments),e}function FQ(){return ZS.apply(null,arguments).exponent(.5)}function LP(e){return Math.sign(e)*e*e}function GQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function xz(){var e=FS(),t=[0,1],n=!1,r;function i(l){var c=GQ(e(l));return isNaN(c)?r:n?Math.round(c):c}return i.invert=function(l){return e.invert(LP(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,Qh)).map(LP)),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 xz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},_r.apply(i,arguments),Bi(i)}function yz(){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]=ZZ(e,c/d);return l}function l(c){return c==null||isNaN(c=+c)?r:t[cd(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(ki),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 yz().domain(e).range(t).unknown(r)},_r.apply(l,arguments)}function gz(){var e=0,t=1,n=1,r=[.5],i=[0,1],l;function c(f){return f!=null&&f<=f?i[cd(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 gz().domain([e,t]).range(i).unknown(l)},_r.apply(Bi(c),arguments)}function vz(){var e=[.5],t=[0,1],n,r=1;function i(l){return l!=null&&l<=l?t[cd(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 vz().domain(e).range(t).unknown(n)},_r.apply(i,arguments)}const A0=new Date,_0=new Date;function Zt(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=>Zt(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)=>(A0.setTime(+l),_0.setTime(+c),e(A0),e(_0),Math.floor(n(A0,_0))),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 nm=Zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):nm);nm.range;const Ma=1e3,vr=Ma*60,Pa=vr*60,Ua=Pa*24,QS=Ua*7,$P=Ua*30,O0=Ua*365,bs=Zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCSeconds());bs.range;const JS=Zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma)},(e,t)=>{e.setTime(+e+t*vr)},(e,t)=>(t-e)/vr,e=>e.getMinutes());JS.range;const eN=Zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*vr)},(e,t)=>(t-e)/vr,e=>e.getUTCMinutes());eN.range;const tN=Zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma-e.getMinutes()*vr)},(e,t)=>{e.setTime(+e+t*Pa)},(e,t)=>(t-e)/Pa,e=>e.getHours());tN.range;const nN=Zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Pa)},(e,t)=>(t-e)/Pa,e=>e.getUTCHours());nN.range;const fd=Zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*vr)/Ua,e=>e.getDate()-1);fd.range;const sp=Zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>e.getUTCDate()-1);sp.range;const bz=Zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>Math.floor(e/Ua));bz.range;function Bs(e){return Zt(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())*vr)/QS)}const op=Bs(0),rm=Bs(1),KQ=Bs(2),YQ=Bs(3),il=Bs(4),XQ=Bs(5),WQ=Bs(6);op.range;rm.range;KQ.range;YQ.range;il.range;XQ.range;WQ.range;function Is(e){return Zt(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)/QS)}const lp=Is(0),am=Is(1),ZQ=Is(2),QQ=Is(3),sl=Is(4),JQ=Is(5),eJ=Is(6);lp.range;am.range;ZQ.range;QQ.range;sl.range;JQ.range;eJ.range;const rN=Zt(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());rN.range;const aN=Zt(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());aN.range;const Va=Zt(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:Zt(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=Zt(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:Zt(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 jz(e,t,n,r,i,l){const c=[[bs,1,Ma],[bs,5,5*Ma],[bs,15,15*Ma],[bs,30,30*Ma],[l,1,vr],[l,5,5*vr],[l,15,15*vr],[l,30,30*vr],[i,1,Pa],[i,3,3*Pa],[i,6,6*Pa],[i,12,12*Pa],[r,1,Ua],[r,2,2*Ua],[n,1,QS],[t,1,$P],[t,3,3*$P],[e,1,O0]];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=IS(([,,v])=>v).right(c,y);if(j===c.length)return e.every(Nj(h/O0,p/O0,x));if(j===0)return nm.every(Math.max(Nj(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[tJ,nJ]=jz(Ha,aN,lp,bz,nN,eN),[rJ,aJ]=jz(Va,rN,op,fd,tN,JS);function T0(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 E0(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 Fc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function iJ(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=Gc(i),p=Kc(i),x=Gc(l),y=Kc(l),j=Gc(c),w=Kc(c),S=Gc(d),v=Kc(d),A=Gc(f),O=Kc(f),_={a:G,A:Z,b:ie,B:ce,c:null,d:HP,e:HP,f:TJ,g:$J,G:IJ,H:AJ,I:_J,j:OJ,L:wz,m:EJ,M:kJ,p:q,q:Y,Q:KP,s:YP,S:CJ,u:MJ,U:PJ,V:RJ,w:DJ,W:zJ,x:null,X:null,y:LJ,Y:BJ,Z:qJ,"%":GP},T={a:ae,A:fe,b:ye,B:Se,c:null,d:FP,e:FP,f:FJ,g:tee,G:ree,H:UJ,I:VJ,j:HJ,L:Nz,m:GJ,M:KJ,p:qe,q:et,Q:KP,s:YP,S:YJ,u:XJ,U:WJ,V:ZJ,w:QJ,W:JJ,x:null,X:null,y:eee,Y:nee,Z:aee,"%":GP},N={a:z,A:D,b:L,B:$,c:F,d:UP,e:UP,f:jJ,g:qP,G:IP,H:VP,I:VP,j:yJ,L:bJ,m:xJ,M:gJ,p:B,q:pJ,Q:SJ,s:NJ,S:vJ,u:uJ,U:dJ,V:fJ,w:cJ,W:hJ,x:H,X:I,y:qP,Y:IP,Z:mJ,"%":wJ};_.x=E(n,_),_.X=E(r,_),_.c=E(t,_),T.x=E(n,T),T.X=E(r,T),T.c=E(t,T);function E(de,Te){return function(Pe){var ue=[],gt=-1,$e=0,Tt=de.length,Et,hn,Or;for(Pe instanceof Date||(Pe=new Date(+Pe));++gt<Tt;)de.charCodeAt(gt)===37&&(ue.push(de.slice($e,gt)),(hn=BP[Et=de.charAt(++gt)])!=null?Et=de.charAt(++gt):hn=Et==="e"?" ":"0",(Or=Te[Et])&&(Et=Or(Pe,hn)),ue.push(Et),$e=gt+1);return ue.push(de.slice($e,gt)),ue.join("")}}function M(de,Te){return function(Pe){var ue=Fc(1900,void 0,1),gt=R(ue,de,Pe+="",0),$e,Tt;if(gt!=Pe.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(Te&&!("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?($e=E0(Fc(ue.y,0,1)),Tt=$e.getUTCDay(),$e=Tt>4||Tt===0?am.ceil($e):am($e),$e=sp.offset($e,(ue.V-1)*7),ue.y=$e.getUTCFullYear(),ue.m=$e.getUTCMonth(),ue.d=$e.getUTCDate()+(ue.w+6)%7):($e=T0(Fc(ue.y,0,1)),Tt=$e.getDay(),$e=Tt>4||Tt===0?rm.ceil($e):rm($e),$e=fd.offset($e,(ue.V-1)*7),ue.y=$e.getFullYear(),ue.m=$e.getMonth(),ue.d=$e.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),Tt="Z"in ue?E0(Fc(ue.y,0,1)).getUTCDay():T0(Fc(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(Tt+5)%7:ue.w+ue.U*7-(Tt+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,E0(ue)):T0(ue)}}function R(de,Te,Pe,ue){for(var gt=0,$e=Te.length,Tt=Pe.length,Et,hn;gt<$e;){if(ue>=Tt)return-1;if(Et=Te.charCodeAt(gt++),Et===37){if(Et=Te.charAt(gt++),hn=N[Et in BP?Te.charAt(gt++):Et],!hn||(ue=hn(de,Pe,ue))<0)return-1}else if(Et!=Pe.charCodeAt(ue++))return-1}return ue}function B(de,Te,Pe){var ue=h.exec(Te.slice(Pe));return ue?(de.p=p.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function z(de,Te,Pe){var ue=j.exec(Te.slice(Pe));return ue?(de.w=w.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function D(de,Te,Pe){var ue=x.exec(Te.slice(Pe));return ue?(de.w=y.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function L(de,Te,Pe){var ue=A.exec(Te.slice(Pe));return ue?(de.m=O.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function $(de,Te,Pe){var ue=S.exec(Te.slice(Pe));return ue?(de.m=v.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function F(de,Te,Pe){return R(de,t,Te,Pe)}function H(de,Te,Pe){return R(de,n,Te,Pe)}function I(de,Te,Pe){return R(de,r,Te,Pe)}function G(de){return c[de.getDay()]}function Z(de){return l[de.getDay()]}function ie(de){return f[de.getMonth()]}function ce(de){return d[de.getMonth()]}function q(de){return i[+(de.getHours()>=12)]}function Y(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 Se(de){return d[de.getUTCMonth()]}function qe(de){return i[+(de.getUTCHours()>=12)]}function et(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var Te=E(de+="",_);return Te.toString=function(){return de},Te},parse:function(de){var Te=M(de+="",!1);return Te.toString=function(){return de},Te},utcFormat:function(de){var Te=E(de+="",T);return Te.toString=function(){return de},Te},utcParse:function(de){var Te=M(de+="",!0);return Te.toString=function(){return de},Te}}}var BP={"-":"",_:" ",0:"0"},nn=/^\s*\d+/,sJ=/^%/,oJ=/[\\^$*+?|[\]().{}]/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 lJ(e){return e.replace(oJ,"\\$&")}function Gc(e){return new RegExp("^(?:"+e.map(lJ).join("|")+")","i")}function Kc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function cJ(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function uJ(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function dJ(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function fJ(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function hJ(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function IP(e,t,n){var r=nn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function qP(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mJ(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 pJ(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function xJ(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function UP(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yJ(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function VP(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function gJ(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vJ(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function bJ(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function jJ(e,t,n){var r=nn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wJ(e,t,n){var r=sJ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function SJ(e,t,n){var r=nn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function NJ(e,t,n){var r=nn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function HP(e,t){return Qe(e.getDate(),t,2)}function AJ(e,t){return Qe(e.getHours(),t,2)}function _J(e,t){return Qe(e.getHours()%12||12,t,2)}function OJ(e,t){return Qe(1+fd.count(Va(e),e),t,3)}function wz(e,t){return Qe(e.getMilliseconds(),t,3)}function TJ(e,t){return wz(e,t)+"000"}function EJ(e,t){return Qe(e.getMonth()+1,t,2)}function kJ(e,t){return Qe(e.getMinutes(),t,2)}function CJ(e,t){return Qe(e.getSeconds(),t,2)}function MJ(e){var t=e.getDay();return t===0?7:t}function PJ(e,t){return Qe(op.count(Va(e)-1,e),t,2)}function Sz(e){var t=e.getDay();return t>=4||t===0?il(e):il.ceil(e)}function RJ(e,t){return e=Sz(e),Qe(il.count(Va(e),e)+(Va(e).getDay()===4),t,2)}function DJ(e){return e.getDay()}function zJ(e,t){return Qe(rm.count(Va(e)-1,e),t,2)}function LJ(e,t){return Qe(e.getFullYear()%100,t,2)}function $J(e,t){return e=Sz(e),Qe(e.getFullYear()%100,t,2)}function BJ(e,t){return Qe(e.getFullYear()%1e4,t,4)}function IJ(e,t){var n=e.getDay();return e=n>=4||n===0?il(e):il.ceil(e),Qe(e.getFullYear()%1e4,t,4)}function qJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qe(t/60|0,"0",2)+Qe(t%60,"0",2)}function FP(e,t){return Qe(e.getUTCDate(),t,2)}function UJ(e,t){return Qe(e.getUTCHours(),t,2)}function VJ(e,t){return Qe(e.getUTCHours()%12||12,t,2)}function HJ(e,t){return Qe(1+sp.count(Ha(e),e),t,3)}function Nz(e,t){return Qe(e.getUTCMilliseconds(),t,3)}function FJ(e,t){return Nz(e,t)+"000"}function GJ(e,t){return Qe(e.getUTCMonth()+1,t,2)}function KJ(e,t){return Qe(e.getUTCMinutes(),t,2)}function YJ(e,t){return Qe(e.getUTCSeconds(),t,2)}function XJ(e){var t=e.getUTCDay();return t===0?7:t}function WJ(e,t){return Qe(lp.count(Ha(e)-1,e),t,2)}function Az(e){var t=e.getUTCDay();return t>=4||t===0?sl(e):sl.ceil(e)}function ZJ(e,t){return e=Az(e),Qe(sl.count(Ha(e),e)+(Ha(e).getUTCDay()===4),t,2)}function QJ(e){return e.getUTCDay()}function JJ(e,t){return Qe(am.count(Ha(e)-1,e),t,2)}function eee(e,t){return Qe(e.getUTCFullYear()%100,t,2)}function tee(e,t){return e=Az(e),Qe(e.getUTCFullYear()%100,t,2)}function nee(e,t){return Qe(e.getUTCFullYear()%1e4,t,4)}function ree(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sl(e):sl.ceil(e),Qe(e.getUTCFullYear()%1e4,t,4)}function aee(){return"+0000"}function GP(){return"%"}function KP(e){return+e}function YP(e){return Math.floor(+e/1e3)}var To,_z,Oz;iee({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 iee(e){return To=iJ(e),_z=To.format,To.parse,Oz=To.utcFormat,To.utcParse,To}function see(e){return new Date(e)}function oee(e){return e instanceof Date?+e:+new Date(+e)}function iN(e,t,n,r,i,l,c,d,f,h){var p=FS(),x=p.invert,y=p.domain,j=h(".%L"),w=h(":%S"),S=h("%I:%M"),v=h("%I %p"),A=h("%a %d"),O=h("%b %d"),_=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?A:O:n(E)<E?_:T)(E)}return p.invert=function(E){return new Date(x(E))},p.domain=function(E){return arguments.length?y(Array.from(E,oee)):y().map(see)},p.ticks=function(E){var M=y();return e(M[0],M[M.length-1],E??10)},p.tickFormat=function(E,M){return M==null?N:h(M)},p.nice=function(E){var M=y();return(!E||typeof E.range!="function")&&(E=t(M[0],M[M.length-1],E??10)),E?y(hz(M,E)):p},p.copy=function(){return dd(p,iN(e,t,n,r,i,l,c,d,f,h))},p}function lee(){return _r.apply(iN(rJ,aJ,Va,rN,op,fd,tN,JS,bs,_z).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function cee(){return _r.apply(iN(tJ,nJ,Ha,aN,lp,sp,nN,eN,bs,Oz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cp(){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(Bl),h.rangeRound=p(HS),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 Ii(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Tz(){var e=Bi(cp()(Nn));return e.copy=function(){return Ii(e,Tz())},Ka.apply(e,arguments)}function Ez(){var e=YS(cp()).domain([1,10]);return e.copy=function(){return Ii(e,Ez()).base(e.base())},Ka.apply(e,arguments)}function kz(){var e=XS(cp());return e.copy=function(){return Ii(e,kz()).constant(e.constant())},Ka.apply(e,arguments)}function sN(){var e=WS(cp());return e.copy=function(){return Ii(e,sN()).exponent(e.exponent())},Ka.apply(e,arguments)}function uee(){return sN.apply(null,arguments).exponent(.5)}function Cz(){var e=[],t=Nn;function n(r){if(r!=null&&!isNaN(r=+r))return t((cd(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(ki),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)=>WZ(e,l/r))},n.copy=function(){return Cz(t).domain(e)},Ka.apply(n,arguments)}function up(){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 A,O,_;return arguments.length?([A,O,_]=v,h=wQ(S,[A,O,_]),j):[h(0),h(.5),h(1)]}}return j.range=w(Bl),j.rangeRound=w(HS),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 Mz(){var e=Bi(up()(Nn));return e.copy=function(){return Ii(e,Mz())},Ka.apply(e,arguments)}function Pz(){var e=YS(up()).domain([.1,1,10]);return e.copy=function(){return Ii(e,Pz()).base(e.base())},Ka.apply(e,arguments)}function Rz(){var e=XS(up());return e.copy=function(){return Ii(e,Rz()).constant(e.constant())},Ka.apply(e,arguments)}function oN(){var e=WS(up());return e.copy=function(){return Ii(e,oN()).exponent(e.exponent())},Ka.apply(e,arguments)}function dee(){return oN.apply(null,arguments).exponent(.5)}const XP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:_u,scaleDiverging:Mz,scaleDivergingLog:Pz,scaleDivergingPow:oN,scaleDivergingSqrt:dee,scaleDivergingSymlog:Rz,scaleIdentity:fz,scaleImplicit:Aj,scaleLinear:tm,scaleLog:mz,scaleOrdinal:qS,scalePoint:ou,scalePow:ZS,scaleQuantile:yz,scaleQuantize:gz,scaleRadial:xz,scaleSequential:Tz,scaleSequentialLog:Ez,scaleSequentialPow:sN,scaleSequentialQuantile:Cz,scaleSequentialSqrt:uee,scaleSequentialSymlog:kz,scaleSqrt:FQ,scaleSymlog:pz,scaleThreshold:vz,scaleTime:lee,scaleUtc:cee,tickFormat:dz},Symbol.toStringTag,{value:"Module"}));var k0,WP;function dp(){if(WP)return k0;WP=1;var e=Dl();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 k0=t,k0}var C0,ZP;function Dz(){if(ZP)return C0;ZP=1;function e(t,n){return t>n}return C0=e,C0}var M0,QP;function fee(){if(QP)return M0;QP=1;var e=dp(),t=Dz(),n=$l();function r(i){return i&&i.length?e(i,n,t):void 0}return M0=r,M0}var hee=fee();const fp=it(hee);var P0,JP;function zz(){if(JP)return P0;JP=1;function e(t,n){return t<n}return P0=e,P0}var R0,e3;function mee(){if(e3)return R0;e3=1;var e=dp(),t=zz(),n=$l();function r(i){return i&&i.length?e(i,n,t):void 0}return R0=r,R0}var pee=mee();const hp=it(pee);var D0,t3;function xee(){if(t3)return D0;t3=1;var e=SS(),t=la(),n=F6(),r=Ln();function i(l,c){var d=r(l)?e:n;return d(l,t(c,3))}return D0=i,D0}var z0,n3;function yee(){if(n3)return z0;n3=1;var e=V6(),t=xee();function n(r,i){return e(t(r,i),1)}return z0=n,z0}var gee=yee();const vee=it(gee);var L0,r3;function bee(){if(r3)return L0;r3=1;var e=zS();function t(n,r){return e(n,r)}return L0=t,L0}var jee=bee();const hd=it(jee);var Il=1e9,wee={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},cN,_t=!0,Ar="[DecimalError] ",Os=Ar+"Invalid argument: ",lN=Ar+"Exponent out of range: ",ql=Math.floor,ms=Math.pow,See=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Zn,en=1e7,St=7,Lz=9007199254740991,im=ql(Lz/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 ht(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(Zn))throw Error(Ar+"NaN");if(n.s<1)throw Error(Ar+(n.s?"NaN":"-Infinity"));return n.eq(Zn)?new r(0):(_t=!1,t=La(Cu(n,l),Cu(e,l),l),_t=!0,ht(t,i))};me.minus=me.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Iz(t,e):$z(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(Ar+"NaN");return n.s?(_t=!1,t=La(n,e,0,1).times(e),_t=!0,n.minus(t)):ht(new r(n),i)};me.naturalExponential=me.exp=function(){return Bz(this)};me.naturalLogarithm=me.ln=function(){return Cu(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?$z(t,e):Iz(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(Ar+"NaN")}for(e=Vt(d),_t=!1,i=Math.sqrt(+d),i==0||i==1/0?(t=Jr(d.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ql((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),Jr(l.d).slice(0,c)===(t=Jr(r.d)).slice(0,c)){if(t=t.slice(c-3,c+1),i==c&&t=="4999"){if(ht(l,n+1,0),l.times(l).eq(d)){r=l;break}}else if(t!="9999")break;c+=4}return _t=!0,ht(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%en|0,t=d/en|0;l[i]=(l[i]+t)%en|0}for(;!l[--c];)l.pop();return t?++n:l.shift(),e.d=l,e.e=n,_t?ht(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:(ia(e,0,Il),t===void 0?t=r.rounding:ia(t,0,8),ht(n,e+Vt(n)+1,t))};me.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Ms(r,!0):(ia(e,0,Il),t===void 0?t=i.rounding:ia(t,0,8),r=ht(new i(r),e+1,t),n=Ms(r,!0,e+1)),n};me.toFixed=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?Ms(i):(ia(e,0,Il),t===void 0?t=l.rounding:ia(t,0,8),r=ht(new l(i),e+Vt(i)+1,t),n=Ms(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 ht(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(Zn);if(d=new f(d),!d.s){if(e.s<1)throw Error(Ar+"Infinity");return d}if(d.eq(Zn))return d;if(r=f.precision,e.eq(Zn))return ht(d,r);if(t=e.e,n=e.d.length-1,c=t>=n,l=d.s,c){if((n=p<0?-p:p)<=Lz){for(i=new f(Zn),t=Math.ceil(r/St+4),_t=!1;n%2&&(i=i.times(d),i3(i.d,t)),n=ql(n/2),n!==0;)d=d.times(d),i3(d.d,t);return _t=!0,e.s<0?new f(Zn).div(i):ht(i,r)}}else if(l<0)throw Error(Ar+"NaN");return l=l<0&&e.d[Math.max(t,n)]&1?-1:1,d.s=1,_t=!1,i=e.times(Cu(d,r+h)),_t=!0,i=Bz(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=Ms(i,n<=l.toExpNeg||n>=l.toExpPos)):(ia(e,1,Il),t===void 0?t=l.rounding:ia(t,0,8),i=ht(new l(i),e,t),n=Vt(i),r=Ms(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):(ia(e,1,Il),t===void 0?t=r.rounding:ia(t,0,8)),ht(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 Ms(e,t<=n.toExpNeg||t>=n.toExpPos)};function $z(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)),_t?ht(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)/en|0,f[l]%=en;for(n&&(f.unshift(n),++i),d=f.length;f[--d]==0;)f.pop();return t.d=f,t.e=i,_t?ht(t,x):t}function ia(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Os+e)}function Jr(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%en|0,c=l/en|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*en+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,A,O,_,T,N,E,M,R,B=r.constructor,z=r.s==i.s?1:-1,D=r.d,L=i.d;if(!r.s)return new B(r);if(!i.s)throw Error(Ar+"Division by zero");for(f=r.e-i.e,M=L.length,N=D.length,j=new B(z),w=j.d=[],h=0;L[h]==(D[h]||0);)++h;if(L[h]>(D[h]||0)&&--f,l==null?O=l=B.precision:c?O=l+(Vt(r)-Vt(i))+1:O=l,O<0)return new B(0);if(O=O/St+2|0,h=0,M==1)for(p=0,L=L[0],O++;(h<N||p)&&O--;h++)_=p*en+(D[h]||0),w[h]=_/L|0,p=_%L|0;else{for(p=en/(L[0]+1)|0,p>1&&(L=e(L,p),D=e(D,p),M=L.length,N=D.length),T=M,S=D.slice(0,M),v=S.length;v<M;)S[v++]=0;R=L.slice(),R.unshift(0),E=L[0],L[1]>=en/2&&++E;do p=0,d=t(L,S,M,v),d<0?(A=S[0],M!=v&&(A=A*en+(S[1]||0)),p=A/E|0,p>1?(p>=en&&(p=en-1),x=e(L,p),y=x.length,v=S.length,d=t(x,S,y,v),d==1&&(p--,n(x,M<y?R:L,y))):(p==0&&(d=p=1),x=L.slice()),y=x.length,y<v&&x.unshift(0),n(S,x,v),d==-1&&(v=S.length,d=t(L,S,M,v),d<1&&(p++,n(S,M<v?R:L,v))),v=S.length):d===0&&(p++,S=[0]),w[h++]=p,d&&S[0]?S[v++]=D[T]||0:(S=[D[T]],v=1);while((T++<N||S[0]!==void 0)&&O--)}return w[0]||w.shift(),j.e=f,ht(j,c?l+Vt(j)+1:l)}})();function Bz(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(lN+Vt(e));if(!e.s)return new p(Zn);for(_t=!1,d=x,c=new p(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(r=Math.log(ms(2,h))/Math.LN10*2+5|0,d+=r,n=i=l=new p(Zn),p.precision=d;;){if(i=ht(i.times(e),d),n=n.times(++f),c=l.plus(La(i,n,d)),Jr(c.d).slice(0,d)===Jr(l.d).slice(0,d)){for(;h--;)l=ht(l.times(l),d);return p.precision=x,t==null?(_t=!0,ht(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 $0(e,t,n){if(t>e.LN10.sd())throw _t=!0,n&&(e.precision=n),Error(Ar+"LN10 precision limit exceeded");return ht(new e(e.LN10),t)}function Ni(e){for(var t="";e--;)t+="0";return t}function Cu(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(Ar+(j.s?"NaN":"-Infinity"));if(j.eq(Zn))return new S(0);if(t==null?(_t=!1,h=v):h=t,j.eq(10))return t==null&&(_t=!0),$0(S,h);if(h+=y,S.precision=h,n=Jr(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=Jr(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=$0(S,h+2,v).times(l+""),j=Cu(new S(r+"."+n.slice(1)),h-y).plus(f),S.precision=v,t==null?(_t=!0,ht(j,v)):j;for(d=c=j=La(j.minus(Zn),j.plus(Zn),h),p=ht(j.times(j),h),i=3;;){if(c=ht(c.times(p),h),f=d.plus(La(c,new S(i),h)),Jr(f.d).slice(0,h)===Jr(d.d).slice(0,h))return d=d.times(2),l!==0&&(d=d.plus($0(S,h+2,v).times(l+""))),d=La(d,new S(x),h),S.precision=v,t==null?(_t=!0,ht(d,v)):d;d=f,i+=2}}function a3(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=ql(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),_t&&(e.e>im||e.e<-im))throw Error(lN+n)}else e.s=0,e.e=0,e.d=[0];return e}function ht(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=ms(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/ms(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]=ms(10,(St-t%St)%St),e.e=ql(-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=ms(10,St-r),x[p]=i>0?(h/ms(10,c-i)%ms(10,i)|0)*l:0),f)for(;;)if(p==0){(x[0]+=l)==en&&(x[0]=1,++e.e);break}else{if(x[p]+=l,x[p]!=en)break;x[p--]=0,l=1}for(r=x.length;x[--r]===0;)x.pop();if(_t&&(e.e>im||e.e<-im))throw Error(lN+Vt(e));return e}function Iz(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),_t?ht(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]=en-1;--f[l],f[i]+=en}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,_t?ht(t,j):t):new y(0)}function Ms(e,t,n){var r,i=Vt(e),l=Jr(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 i3(e,t){if(e.length>t)return e.length=t,!0}function qz(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 a3(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,See.test(l))a3(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=qz,i.config=i.set=Nee,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 Nee(e){if(!e||typeof e!="object")throw Error(Ar+"Object expected");var t,n,r,i=["precision",1,Il,"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(ql(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 cN=qz(wee);Zn=new cN(1);const ct=cN;function Aee(e){return Eee(e)||Tee(e)||Oee(e)||_ee()}function _ee(){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 Oee(e,t){if(e){if(typeof e=="string")return Ej(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ej(e,t)}}function Tee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Eee(e){if(Array.isArray(e))return Ej(e)}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kee=function(t){return t},Uz={},Vz=function(t){return t===Uz},s3=function(t){return function n(){return arguments.length===0||arguments.length===1&&Vz(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Cee=function e(t,n){return t===1?n:s3(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!==Uz}).length;return c>=t?n.apply(void 0,i):e(t-c,s3(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 Vz(x)?f.shift():x});return n.apply(void 0,Aee(p).concat(f))}))})},mp=function(t){return Cee(t.length,t)},kj=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},Mee=mp(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Pee=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return kee;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))}},Cj=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Hz=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 Ree(e){var t;return e===0?t=1:t=Math.floor(new ct(e).abs().log(10).toNumber())+1,t}function Dee(e,t,n){for(var r=new ct(e),i=0,l=[];r.lt(t)&&i<1e5;)l.push(r.toNumber()),r=r.add(n),i++;return l}var zee=mp(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),Lee=mp(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),$ee=mp(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const pp={rangeStep:Dee,getDigitCount:Ree,interpolateNumber:zee,uninterpolateNumber:Lee,uninterpolateTruncation:$ee};function Mj(e){return qee(e)||Iee(e)||Fz(e)||Bee()}function Bee(){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 Iee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function qee(e){if(Array.isArray(e))return Pj(e)}function Mu(e,t){return Hee(e)||Vee(e,t)||Fz(e,t)||Uee()}function Uee(){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 Fz(e,t){if(e){if(typeof e=="string")return Pj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pj(e,t)}}function Pj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vee(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 Hee(e){if(Array.isArray(e))return e}function Gz(e){var t=Mu(e,2),n=t[0],r=t[1],i=n,l=r;return n>r&&(i=r,l=n),[i,l]}function Kz(e,t,n){if(e.lte(0))return new ct(0);var r=pp.getDigitCount(e.toNumber()),i=new ct(10).pow(r),l=e.div(i),c=r!==1?.05:.1,d=new ct(Math.ceil(l.div(c).toNumber())).add(n).mul(c),f=d.mul(i);return t?f:new ct(Math.ceil(f))}function Fee(e,t,n){var r=1,i=new ct(e);if(!i.isint()&&n){var l=Math.abs(e);l<1?(r=new ct(10).pow(pp.getDigitCount(e)-1),i=new ct(Math.floor(i.div(r).toNumber())).mul(r)):l>1&&(i=new ct(Math.floor(e)))}else e===0?i=new ct(Math.floor((t-1)/2)):n||(i=new ct(Math.floor(e)));var c=Math.floor((t-1)/2),d=Pee(Mee(function(f){return i.add(new ct(f-c).mul(r)).toNumber()}),kj);return d(0,t)}function Yz(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 ct(0),tickMin:new ct(0),tickMax:new ct(0)};var l=Kz(new ct(t).sub(e).div(n-1),r,i),c;e<=0&&t>=0?c=new ct(0):(c=new ct(e).add(t).div(2),c=c.sub(new ct(c).mod(l)));var d=Math.ceil(c.sub(e).div(l).toNumber()),f=Math.ceil(new ct(t).sub(c).div(l).toNumber()),h=d+f+1;return h>n?Yz(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 ct(d).mul(l)),tickMax:c.add(new ct(f).mul(l))})}function Gee(e){var t=Mu(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=Gz([n,r]),f=Mu(d,2),h=f[0],p=f[1];if(h===-1/0||p===1/0){var x=p===1/0?[h].concat(Mj(kj(0,i-1).map(function(){return 1/0}))):[].concat(Mj(kj(0,i-1).map(function(){return-1/0})),[p]);return n>r?Cj(x):x}if(h===p)return Fee(h,i,l);var y=Yz(h,p,c,l),j=y.step,w=y.tickMin,S=y.tickMax,v=pp.rangeStep(w,S.add(new ct(.1).mul(j)),j);return n>r?Cj(v):v}function Kee(e,t){var n=Mu(e,2),r=n[0],i=n[1],l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Gz([r,i]),d=Mu(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=Kz(new ct(h).sub(f).div(p-1),l,0),y=[].concat(Mj(pp.rangeStep(new ct(f),new ct(h).sub(new ct(.99).mul(x)),x)),[h]);return r>i?Cj(y):y}var Yee=Hz(Gee),Xee=Hz(Kee),Wee="Invariant failed";function Ps(e,t){throw new Error(Wee)}var Zee=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 sm(){return sm=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},sm.apply(this,arguments)}function Qee(e,t){return nte(e)||tte(e,t)||ete(e,t)||Jee()}function Jee(){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 ete(e,t){if(e){if(typeof e=="string")return o3(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 o3(e,t)}}function o3(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 tte(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 nte(e){if(Array.isArray(e))return e}function rte(e,t){if(e==null)return{};var n=ate(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 ate(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 ite(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ste(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,Zz(r.key),r)}}function ote(e,t,n){return t&&ste(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lte(e,t,n){return t=om(t),cte(e,Xz()?Reflect.construct(t,n||[],om(e).constructor):t.apply(e,n))}function cte(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 ute(e)}function ute(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xz=function(){return!!e})()}function om(e){return om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},om(e)}function dte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rj(e,t)}function Rj(e,t){return Rj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Rj(e,t)}function Wz(e,t,n){return t=Zz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zz(e){var t=fte(e,"string");return ol(t)=="symbol"?t:t+""}function fte(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 md=(function(e){function t(){return ite(this,t),lte(this,t,arguments)}return dte(t,e),ote(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=rte(r,Zee),j=we(y,!1);this.props.direction==="x"&&p.type!=="number"&&Ps();var w=f.map(function(S){var v=h(S,d),A=v.x,O=v.y,_=v.value,T=v.errorVal;if(!T)return null;var N=[],E,M;if(Array.isArray(T)){var R=Qee(T,2);E=R[0],M=R[1]}else E=M=T;if(l==="vertical"){var B=p.scale,z=O+i,D=z+c,L=z-c,$=B(_-E),F=B(_+M);N.push({x1:F,y1:D,x2:F,y2:L}),N.push({x1:$,y1:z,x2:F,y2:z}),N.push({x1:$,y1:D,x2:$,y2:L})}else if(l==="horizontal"){var H=x.scale,I=A+i,G=I-c,Z=I+c,ie=H(_-E),ce=H(_+M);N.push({x1:G,y1:ce,x2:Z,y2:ce}),N.push({x1:I,y1:ie,x2:I,y2:ce}),N.push({x1:G,y1:ie,x2:Z,y2:ie})}return V.createElement(Ze,sm({className:"recharts-errorBar",key:"bar-".concat(N.map(function(q){return"".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))},j),N.map(function(q){return V.createElement("line",sm({},q,{key:"line-".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))}))});return V.createElement(Ze,{className:"recharts-errorBars"},w)}}])})(V.Component);Wz(md,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Wz(md,"displayName","ErrorBar");function Pu(e){"@babel/helpers - typeof";return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(e)}function 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 os(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){hte(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 hte(e,t,n){return t=mte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mte(e){var t=pte(e,"string");return Pu(t)=="symbol"?t:t+""}function pte(e,t){if(Pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qz=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,l=t.legendContent,c=Xn(n,Fo);if(!c)return null;var d=Fo.defaultProps,f=d!==void 0?os(os({},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?os(os({},y),x.props):{},w=j.dataKey,S=j.name,v=j.legendType,A=j.hide;return{inactive:A,dataKey:w,type:f.iconType||v||"square",color:uN(x),value:S||w,payload:j}}),os(os(os({},f),Fo.getWithHeight(c,i)),{},{payload:h,item:c})};function Ru(e){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}function c3(e){return vte(e)||gte(e)||yte(e)||xte()}function xte(){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 yte(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 gte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vte(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 u3(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?u3(Object(n),!0).forEach(function(r){Ko(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ko(e,t,n){return t=bte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bte(e){var t=jte(e,"string");return Ru(t)=="symbol"?t:t+""}function jte(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 Yt(e,t,n){return De(e)||De(t)?n:Wt(t)?Jn(e,t,n):ke(t)?t(e):n}function lu(e,t,n,r){var i=vee(e,function(d){return Yt(d,t)});if(n==="number"){var l=i.filter(function(d){return he(d)||parseFloat(d)});return l.length?[hp(l),fp(l)]:[1/0,-1/0]}var c=r?i.filter(function(d){return!De(d)}):i;return c.map(function(d){return Wt(d)||d instanceof Date?d:""})}var wte=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 A=[Math.min(x,(j+x)/2),Math.max(x,(j+x)/2)];if(t>A[0]&&t<=A[1]||t>=w[0]&&t<=w[1]){c=i[h].index;break}}else{var O=Math.min(p,y),_=Math.max(p,y);if(t>(O+x)/2&&t<=(_+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},uN=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},Ste=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,A=S.filter(function(M){return za(M.type).indexOf("Bar")>=0});if(A&&A.length){var O=A[0].type.defaultProps,_=O!==void 0?Pt(Pt({},O),A[0].props):A[0].props,T=_.barSize,N=_[v];c[N]||(c[N]=[]);var E=De(T)?n:T;c[N].push({item:A[0],stackList:A.slice(1),barSize:De(E)?void 0:Sn(E,r,0)})}}return c},Nte=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}},M=[].concat(c3(T),[E]);return v=M[M.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(R){M.push({item:R,position:v})}),M},x)}else{var A=Sn(r,i,0,!0);i-2*A-(f-1)*h<=0&&(h=0);var O=(i-2*A-(f-1)*h)/f;O>1&&(O>>=0);var _=d===+d?Math.min(O,d):O;p=c.reduce(function(T,N,E){var M=[].concat(c3(T),[{item:N.item,position:{offset:A+(O+h)*E+(O-_)/2,size:_}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(R){M.push({item:R,position:M[M.length-1].position})}),M},x)}return p},Ate=function(t,n,r,i){var l=r.children,c=r.width,d=r.margin,f=c-(d.left||0)-(d.right||0),h=Qz({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),{},Ko({},j,t[j]+(x||0)));if((S==="horizontal"||S==="vertical"&&j==="center")&&w!=="middle"&&he(t[w]))return Pt(Pt({},t),{},Ko({},w,t[w]+(y||0)))}return t},_te=function(t,n,r){return De(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Jz=function(t,n,r,i,l){var c=n.props.children,d=er(c,md).filter(function(h){return _te(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(De(x))return h;var y=Array.isArray(x)?[hp(x),fp(x)]:[x,x],j=f.reduce(function(w,S){var v=Yt(p,S,0),A=y[0]-Math.abs(Array.isArray(v)?v[0]:v),O=y[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(A,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},Ote=function(t,n,r,i,l){var c=n.map(function(d){return Jz(t,d,r,l,i)}).filter(function(d){return!De(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},eL=function(t,n,r,i,l){var c=n.map(function(f){var h=f.props.dataKey;return r==="number"&&h&&Jz(t,f,h,i)||lu(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},[])},tL=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},nL=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!od(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}})},B0=new WeakMap,th=function(t,n){if(typeof n!="function")return t;B0.has(t)||B0.set(t,new WeakMap);var r=B0.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},rL=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:_u(),realScaleType:"band"}:c==="radial"&&d==="angleAxis"?{scale:tm(),realScaleType:"linear"}:l==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:ou(),realScaleType:"point"}:l==="category"?{scale:_u(),realScaleType:"band"}:{scale:tm(),realScaleType:"linear"};if(Es(i)){var f="scale".concat(Zm(i));return{scale:(XP[f]||ou)(),realScaleType:XP[f]?f:"point"}}return ke(i)?{scale:i}:{scale:ou(),realScaleType:"point"}},d3=1e-4,aL=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])-d3,c=Math.max(i[0],i[1])+d3,d=t(n[0]),f=t(n[r-1]);(d<l||d>c||f<l||f>c)&&t.domain([n[0],n[r-1]])}},Tte=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},Ete=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},kte=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=od(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])}},Cte=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=od(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)}},Mte={sign:kte,expand:vY,none:Jo,silhouette:bY,wiggle:jY,positive:Cte},Pte=function(t,n,r){var i=n.map(function(d){return d.props.dataKey}),l=Mte[r],c=gY().keys(i).value(function(d,f){return+Yt(d,f,0)}).order(uj).offset(l);return c(t)},Rte=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 A=w[r],O=x[A]||{hasStack:!1,stackGroups:{}};if(Wt(S)){var _=O.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(y),O.hasStack=!0,O.stackGroups[S]=_}else O.stackGroups[Ll("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[y]};return Pt(Pt({},x),{},Ko({},A,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 A=j.stackGroups[v];return Pt(Pt({},S),{},Ko({},v,{numericAxisId:r,cateAxisId:i,items:A.items,stackedData:Pte(t,A.items,l)}))},w)}return Pt(Pt({},x),{},Ko({},y,j))},p)},iL=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=Yee(h,l,d);return t.domain([hp(p),fp(p)]),{niceTicks:p}}if(l&&i==="number"){var x=t.domain(),y=Xee(x,l,d);return{niceTicks:y}}return null};function f3(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&&!De(i[t.dataKey])){var d=zh(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,De(c)?t.dataKey:c);return De(f)?null:t.scale(f)}var h3=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 De(f)?null:n.scale(f)-l/2+i},Dte=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]},zte=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(Wt(l)){var c=n[l];if(c){var d=c.items.indexOf(t);return d>=0?c.stackedData[d]:null}}return null},Lte=function(t){return t.reduce(function(n,r){return[hp(r.concat([n[0]]).filter(he)),fp(r.concat([n[1]]).filter(he))]},[1/0,-1/0])},sL=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=Lte(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})},m3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zj=function(t,n,r){if(ke(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(m3.test(t[0])){var l=+m3.exec(t[0])[1];i[0]=n[0]-l}else ke(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(p3.test(t[1])){var c=+p3.exec(t[1])[1];i[1]=n[1]+c}else ke(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},lm=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=$S(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},x3=function(t,n,r){return!t||!t.length||hd(t,Jn(r,"type.defaultProps.domain"))?n:t},oL=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({},we(t,!1)),{},{dataKey:i,unit:c,formatter:d,name:l||i,color:uN(t),value:Yt(n,i),type:f,payload:n,chartType:h,hide:p})};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 y3(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 Ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y3(Object(n),!0).forEach(function(r){lL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lL(e,t,n){return t=$te(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $te(e){var t=Bte(e,"string");return Du(t)=="symbol"?t:t+""}function Bte(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ite(e,t){return Hte(e)||Vte(e,t)||Ute(e,t)||qte()}function qte(){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 Ute(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 Vte(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 Hte(e){if(Array.isArray(e))return e}var cm=Math.PI/180,Fte=function(t){return t*180/Math.PI},yt=function(t,n,r,i){return{x:t+Math.cos(-cm*i)*r,y:n+Math.sin(-cm*i)*r}},cL=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},Gte=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=cL(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,A){var O=n[A],_=O.domain,T=O.reversed,N;if(De(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,M=Ite(E,2);f=M[0],h=M[1]}var R=rL(O,l),B=R.realScaleType,z=R.scale;z.domain(_).range(N),aL(z);var D=iL(z,Ca(Ca({},O),{},{realScaleType:B})),L=Ca(Ca(Ca({},O),D),{},{range:N,radius:w,realScaleType:B,scale:z,cx:p,cy:x,innerRadius:j,outerRadius:w,startAngle:f,endAngle:h});return Ca(Ca({},v),{},lL({},A,L))},{})},Kte=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))},Yte=function(t,n){var r=t.x,i=t.y,l=n.cx,c=n.cy,d=Kte({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:Fte(h),angleInRadian:h}},Xte=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}},Wte=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},v3=function(t,n){var r=t.x,i=t.y,l=Yte({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=Xte(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?Ca(Ca({},n),{},{radius:c,angle:Wte(j,n)}):null},uL=function(t){return!k.isValidElement(t)&&!ke(t)&&typeof t!="boolean"?t.className:""};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)}var Zte=["offset"];function Qte(e){return nne(e)||tne(e)||ene(e)||Jte()}function Jte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ene(e,t){if(e){if(typeof e=="string")return Lj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lj(e,t)}}function tne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nne(e){if(Array.isArray(e))return Lj(e)}function Lj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rne(e,t){if(e==null)return{};var n=ane(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 ane(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 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 Gt(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){ine(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 ine(e,t,n){return t=sne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sne(e){var t=one(e,"string");return zu(t)=="symbol"?t:t+""}function one(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)}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)}var lne=function(t){var n=t.value,r=t.formatter,i=De(t.children)?n:t.children;return ke(r)?r(i):i},cne=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},une=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,A=cne(j,w),O=A>=0?1:-1,_,T;i==="insideStart"?(_=j+O*c,T=S):i==="insideEnd"?(_=w-O*c,T=!S):i==="end"&&(_=w+O*c,T=S),T=A<=0?T:!T;var N=yt(h,p,v,_),E=yt(h,p,v,_+(T?1:-1)*359),M="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=De(t.id)?Ll("recharts-radial-line-"):t.id;return V.createElement("text",Lu({},r,{dominantBaseline:"central",className:Le("recharts-radial-bar-label",d)}),V.createElement("defs",null,V.createElement("path",{id:R,d:M})),V.createElement("textPath",{xlinkHref:"#".concat(R)},n))},dne=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,A=yt(c,d,v,y),O=A.x,_=A.y;return{x:O,y:_,textAnchor:"middle",verticalAnchor:"middle"}},fne=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,A=S>0?"end":"start",O=S>0?"start":"end";if(l==="top"){var _={x:d+h/2,y:f-x*i,textAnchor:"middle",verticalAnchor:j};return Gt(Gt({},_),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:A,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 M=r?{width:h,height:p}:{};return l==="insideLeft"?Gt({x:d+v,y:f+p/2,textAnchor:O,verticalAnchor:"middle"},M):l==="insideRight"?Gt({x:d+h-v,y:f+p/2,textAnchor:A,verticalAnchor:"middle"},M):l==="insideTop"?Gt({x:d+h/2,y:f+y,textAnchor:"middle",verticalAnchor:w},M):l==="insideBottom"?Gt({x:d+h/2,y:f+p-y,textAnchor:"middle",verticalAnchor:j},M):l==="insideTopLeft"?Gt({x:d+v,y:f+y,textAnchor:O,verticalAnchor:w},M):l==="insideTopRight"?Gt({x:d+h-v,y:f+y,textAnchor:A,verticalAnchor:w},M):l==="insideBottomLeft"?Gt({x:d+v,y:f+p-y,textAnchor:O,verticalAnchor:j},M):l==="insideBottomRight"?Gt({x:d+h-v,y:f+p-y,textAnchor:A,verticalAnchor:j},M):zl(l)&&(he(l.x)||gs(l.x))&&(he(l.y)||gs(l.y))?Gt({x:d+Sn(l.x,h),y:f+Sn(l.y,p),textAnchor:"end",verticalAnchor:"end"},M):Gt({x:d+h/2,y:f+p/2,textAnchor:"middle",verticalAnchor:"middle"},M)},hne=function(t){return"cx"in t&&he(t.cx)};function tn(e){var t=e.offset,n=t===void 0?5:t,r=rne(e,Zte),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||De(d)&&De(f)&&!k.isValidElement(h)&&!ke(h))return null;if(k.isValidElement(h))return k.cloneElement(h,i);var j;if(ke(h)){if(j=k.createElement(h,i),k.isValidElement(j))return j}else j=lne(i);var w=hne(l),S=we(i,!0);if(w&&(c==="insideStart"||c==="insideEnd"||c==="end"))return une(i,j,S);var v=w?dne(i):fne(i);return V.createElement(Cs,Lu({className:Le("recharts-label",x)},S,v,{breakAll:y}),j)}tn.displayName="Label";var dL=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,A=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:A}:t.viewBox?t.viewBox:{}},mne=function(t,n){return t?t===!0?V.createElement(tn,{key:"label-implicit",viewBox:n}):Wt(t)?V.createElement(tn,{key:"label-implicit",viewBox:n,value:t}):k.isValidElement(t)?t.type===tn?k.cloneElement(t,{key:"label-implicit",viewBox:n}):V.createElement(tn,{key:"label-implicit",content:t,viewBox:n}):ke(t)?V.createElement(tn,{key:"label-implicit",content:t,viewBox:n}):zl(t)?V.createElement(tn,Lu({viewBox:n},t,{key:"label-implicit"})):null:null},pne=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=dL(t),c=er(i,tn).map(function(f,h){return k.cloneElement(f,{viewBox:n||l,key:"label-".concat(h)})});if(!r)return c;var d=mne(t.label,n||l);return[d].concat(Qte(c))};tn.parseViewBox=dL;tn.renderCallByParent=pne;var I0,j3;function xne(){if(j3)return I0;j3=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return I0=e,I0}var yne=xne();const gne=it(yne);function $u(e){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}var vne=["valueAccessor"],bne=["data","dataKey","clockWise","id","textBreakAll"];function jne(e){return Ane(e)||Nne(e)||Sne(e)||wne()}function wne(){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 Sne(e,t){if(e){if(typeof e=="string")return $j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $j(e,t)}}function Nne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ane(e){if(Array.isArray(e))return $j(e)}function $j(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function um(){return um=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},um.apply(this,arguments)}function w3(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 S3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w3(Object(n),!0).forEach(function(r){_ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ne(e,t,n){return t=One(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function One(e){var t=Tne(e,"string");return $u(t)=="symbol"?t:t+""}function Tne(e,t){if($u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N3(e,t){if(e==null)return{};var n=Ene(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 Ene(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 kne=function(t){return Array.isArray(t.value)?gne(t.value):t.value};function $a(e){var t=e.valueAccessor,n=t===void 0?kne:t,r=N3(e,vne),i=r.data,l=r.dataKey,c=r.clockWise,d=r.id,f=r.textBreakAll,h=N3(r,bne);return!i||!i.length?null:V.createElement(Ze,{className:"recharts-label-list"},i.map(function(p,x){var y=De(l)?n(p,x):Yt(p&&p.payload,l),j=De(d)?{}:{id:"".concat(d,"-").concat(x)};return V.createElement(tn,um({},we(p,!0),h,j,{parentViewBox:p.parentViewBox,value:y,textBreakAll:f,viewBox:tn.parseViewBox(De(c)?p:S3(S3({},p),{},{clockWise:c})),key:"label-".concat(x),index:x}))}))}$a.displayName="LabelList";function Cne(e,t){return e?e===!0?V.createElement($a,{key:"labelList-implicit",data:t}):V.isValidElement(e)||ke(e)?V.createElement($a,{key:"labelList-implicit",data:t,content:e}):zl(e)?V.createElement($a,um({data:t},e,{key:"labelList-implicit"})):null:null}function Mne(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=er(r,$a).map(function(c,d){return k.cloneElement(c,{data:t,key:"labelList-".concat(d)})});if(!n)return i;var l=Cne(e.label,t);return[l].concat(jne(i))}$a.renderCallByParent=Mne;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 Bj(){return Bj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bj.apply(this,arguments)}function 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){Pne(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 Pne(e,t,n){return t=Rne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rne(e){var t=Dne(e,"string");return Bu(t)=="symbol"?t:t+""}function Dne(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 zne=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},nh=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)/cm,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*cm),S);return{center:j,circleTangency:w,lineTangency:v,theta:x}},fL=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,l=t.outerRadius,c=t.startAngle,d=t.endAngle,f=zne(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},Lne=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=nh({cx:n,cy:r,radius:l,angle:h,sign:x,cornerRadius:c,cornerIsExternal:f}),j=y.circleTangency,w=y.lineTangency,S=y.theta,v=nh({cx:n,cy:r,radius:l,angle:p,sign:-x,cornerRadius:c,cornerIsExternal:f}),A=v.circleTangency,O=v.lineTangency,_=v.theta,T=f?Math.abs(h-p):Math.abs(h-p)-S-_;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
`):fL({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(A.x,",").concat(A.y,`
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(O.x,",").concat(O.y,`
`);if(i>0){var E=nh({cx:n,cy:r,radius:i,angle:h,sign:x,isExternal:!0,cornerRadius:c,cornerIsExternal:f}),M=E.circleTangency,R=E.lineTangency,B=E.theta,z=nh({cx:n,cy:r,radius:i,angle:p,sign:-x,isExternal:!0,cornerRadius:c,cornerIsExternal:f}),D=z.circleTangency,L=z.lineTangency,$=z.theta,F=f?Math.abs(h-p):Math.abs(h-p)-B-$;if(F<0&&c===0)return"".concat(N,"L").concat(n,",").concat(r,"Z");N+="L".concat(L.x,",").concat(L.y,`
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(D.x,",").concat(D.y,`
A`).concat(i,",").concat(i,",0,").concat(+(F>180),",").concat(+(x>0),",").concat(M.x,",").concat(M.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},$ne={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hL=function(t){var n=_3(_3({},$ne),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=Le("recharts-sector",y),w=c-l,S=Sn(d,w,0,!0),v;return S>0&&Math.abs(p-x)<360?v=Lne({cx:r,cy:i,innerRadius:l,outerRadius:c,cornerRadius:Math.min(S,w/2),forceCornerRadius:f,cornerIsExternal:h,startAngle:p,endAngle:x}):v=fL({cx:r,cy:i,innerRadius:l,outerRadius:c,startAngle:p,endAngle:x}),V.createElement("path",Bj({},we(n,!0),{className:j,d:v,role:"img"}))};function Iu(e){"@babel/helpers - typeof";return Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iu(e)}function Ij(){return Ij=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ij.apply(this,arguments)}function O3(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 T3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O3(Object(n),!0).forEach(function(r){Bne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bne(e,t,n){return t=Ine(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ine(e){var t=qne(e,"string");return Iu(t)=="symbol"?t:t+""}function qne(e,t){if(Iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E3={curveBasisClosed:oY,curveBasisOpen:lY,curveBasis:sY,curveBumpX:GK,curveBumpY:KK,curveLinearClosed:cY,curveLinear:Jm,curveMonotoneX:uY,curveMonotoneY:dY,curveNatural:fY,curveStep:hY,curveStepAfter:pY,curveStepBefore:mY},rh=function(t){return t.x===+t.x&&t.y===+t.y},Yc=function(t){return t.x},Xc=function(t){return t.y},Une=function(t,n){if(ke(t))return t;var r="curve".concat(Zm(t));return(r==="curveMonotone"||r==="curveBump")&&n?E3["".concat(r).concat(n==="vertical"?"Y":"X")]:E3[r]||Jm},Vne=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=Une(r,d),x=h?l.filter(function(S){return rh(S)}):l,y;if(Array.isArray(c)){var j=h?c.filter(function(S){return rh(S)}):c,w=x.map(function(S,v){return T3(T3({},S),{},{base:j[v]})});return d==="vertical"?y=Yf().y(Xc).x1(Yc).x0(function(S){return S.base.x}):y=Yf().x(Yc).y1(Xc).y0(function(S){return S.base.y}),y.defined(rh).curve(p),y(w)}return d==="vertical"&&he(c)?y=Yf().y(Xc).x1(Yc).x0(c):he(c)?y=Yf().x(Yc).y1(Xc).y0(c):y=f6().x(Yc).y(Xc),y.defined(rh).curve(p),y(x)},dm=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?Vne(t):i;return k.createElement("path",Ij({},we(t,!1),Lh(t),{className:Le("recharts-curve",n),d:c,ref:l}))},q0={exports:{}},U0,k3;function Hne(){if(k3)return U0;k3=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return U0=e,U0}var V0,C3;function Fne(){if(C3)return V0;C3=1;var e=Hne();function t(){}function n(){}return n.resetWarningCache=t,V0=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},V0}var M3;function Gne(){return M3||(M3=1,q0.exports=Fne()()),q0.exports}var Kne=Gne();const nt=it(Kne),{getOwnPropertyNames:Yne,getOwnPropertySymbols:Xne}=Object,{hasOwnProperty:Wne}=Object.prototype;function H0(e,t){return function(r,i,l){return e(r,i,l)&&t(r,i,l)}}function ah(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 Zne(e){return e!=null?e[Symbol.toStringTag]:void 0}function P3(e){return Yne(e).concat(Xne(e))}const Qne=Object.hasOwn||((e,t)=>Wne.call(e,t));function qs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Jne="__v",ere="__o",tre="_owner",{getOwnPropertyDescriptor:R3,keys:D3}=Object;function nre(e,t){return e.byteLength===t.byteLength&&fm(new Uint8Array(e),new Uint8Array(t))}function rre(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 are(e,t){return e.byteLength===t.byteLength&&fm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ire(e,t){return qs(e.getTime(),t.getTime())}function sre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ore(e,t){return e===t}function z3(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 lre=qs;function cre(e,t,n){const r=D3(e);let i=r.length;if(D3(t).length!==i)return!1;for(;i-- >0;)if(!mL(e,t,n,r[i]))return!1;return!0}function Wc(e,t,n){const r=P3(e);let i=r.length;if(P3(t).length!==i)return!1;let l,c,d;for(;i-- >0;)if(l=r[i],!mL(e,t,n,l)||(c=R3(e,l),d=R3(t,l),(c||d)&&(!c||!d||c.configurable!==d.configurable||c.enumerable!==d.enumerable||c.writable!==d.writable)))return!1;return!0}function ure(e,t){return qs(e.valueOf(),t.valueOf())}function dre(e,t){return e.source===t.source&&e.flags===t.flags}function L3(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 fm(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 fre(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 mL(e,t,n,r){return(r===tre||r===ere||r===Jne)&&(e.$$typeof||t.$$typeof)?!0:Qne(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const hre="[object ArrayBuffer]",mre="[object Arguments]",pre="[object Boolean]",xre="[object DataView]",yre="[object Date]",gre="[object Error]",vre="[object Map]",bre="[object Number]",jre="[object Object]",wre="[object RegExp]",Sre="[object Set]",Nre="[object String]",Are={"[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},_re="[object URL]",Ore=Object.prototype.toString;function Tre({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,A,O){if(v===A)return!0;if(v==null||A==null)return!1;const _=typeof v;if(_!==typeof A)return!1;if(_!=="object")return _==="number"?d(v,A,O):_==="function"?l(v,A,O):!1;const T=v.constructor;if(T!==A.constructor)return!1;if(T===Object)return f(v,A,O);if(Array.isArray(v))return t(v,A,O);if(T===Date)return r(v,A,O);if(T===RegExp)return p(v,A,O);if(T===Map)return c(v,A,O);if(T===Set)return x(v,A,O);const N=Ore.call(v);if(N===yre)return r(v,A,O);if(N===wre)return p(v,A,O);if(N===vre)return c(v,A,O);if(N===Sre)return x(v,A,O);if(N===jre)return typeof v.then!="function"&&typeof A.then!="function"&&f(v,A,O);if(N===_re)return j(v,A,O);if(N===gre)return i(v,A,O);if(N===mre)return f(v,A,O);if(Are[N])return y(v,A,O);if(N===hre)return e(v,A,O);if(N===xre)return n(v,A,O);if(N===pre||N===bre||N===Nre)return h(v,A,O);if(w){let E=w[N];if(!E){const M=Zne(v);M&&(E=w[M])}if(E)return E(v,A,O)}return!1}}function Ere({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:nre,areArraysEqual:n?Wc:rre,areDataViewsEqual:are,areDatesEqual:ire,areErrorsEqual:sre,areFunctionsEqual:ore,areMapsEqual:n?H0(z3,Wc):z3,areNumbersEqual:lre,areObjectsEqual:n?Wc:cre,arePrimitiveWrappersEqual:ure,areRegExpsEqual:dre,areSetsEqual:n?H0(L3,Wc):L3,areTypedArraysEqual:n?H0(fm,Wc):fm,areUrlsEqual:fre,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=ah(r.areArraysEqual),l=ah(r.areMapsEqual),c=ah(r.areObjectsEqual),d=ah(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:d})}return r}function kre(e){return function(t,n,r,i,l,c,d){return e(t,n,d)}}function Cre({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 Mre=qi();qi({strict:!0});qi({circular:!0});qi({circular:!0,strict:!0});qi({createInternalComparator:()=>qs});qi({strict:!0,createInternalComparator:()=>qs});qi({circular:!0,createInternalComparator:()=>qs});qi({circular:!0,createInternalComparator:()=>qs,strict:!0});function qi(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,l=Ere(e),c=Tre(l),d=n?n(c):kre(c);return Cre({circular:t,comparator:c,createState:r,equals:d,strict:i})}function Pre(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function $3(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):Pre(i)};requestAnimationFrame(r)}function qj(e){"@babel/helpers - typeof";return qj=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},qj(e)}function Rre(e){return $re(e)||Lre(e)||zre(e)||Dre()}function Dre(){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 zre(e,t){if(e){if(typeof e=="string")return B3(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 B3(e,t)}}function B3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $re(e){if(Array.isArray(e))return e}function Bre(){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=Rre(c),f=d[0],h=d.slice(1);if(typeof f=="number"){$3(i.bind(null,h),f);return}i(f),$3(i.bind(null,h));return}qj(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 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 I3(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 q3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I3(Object(n),!0).forEach(function(r){pL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pL(e,t,n){return t=Ire(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ire(e){var t=qre(e,"string");return qu(t)==="symbol"?t:String(t)}function qre(e,t){if(qu(e)!=="object"||e===null)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 Ure=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(l){return i.includes(l)})})},Vre=function(t){return t},Hre=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},cu=function(t,n){return Object.keys(n).reduce(function(r,i){return q3(q3({},r),{},pL({},i,t(i,n[i])))},{})},U3=function(t,n,r){return t.map(function(i){return"".concat(Hre(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Fre(e,t){return Yre(e)||Kre(e,t)||xL(e,t)||Gre()}function Gre(){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 Kre(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 Yre(e){if(Array.isArray(e))return e}function Xre(e){return Qre(e)||Zre(e)||xL(e)||Wre()}function Wre(){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 xL(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 Zre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qre(e){if(Array.isArray(e))return Uj(e)}function Uj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hm=1e-4,yL=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},gL=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},V3=function(t,n){return function(r){var i=yL(t,n);return gL(i,r)}},Jre=function(t,n){return function(r){var i=yL(t,n),l=[].concat(Xre(i.map(function(c,d){return c*d}).slice(1)),[0]);return gL(l,r)}},H3=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=Fre(h,4);i=p[0],l=p[1],c=p[2],d=p[3]}}}var x=V3(i,c),y=V3(l,d),j=Jre(i,c),w=function(A){return A>1?1:A<0?0:A},S=function(A){for(var O=A>1?1:A,_=O,T=0;T<8;++T){var N=x(_)-O,E=j(_);if(Math.abs(N-O)<hm||E<hm)return y(_);_=w(_-N/E)}return y(_)};return S.isStepper=!1,S},eae=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)<hm&&Math.abs(S)<hm?[x,0]:[v,S]};return f.isStepper=!0,f.dt=d,f},tae=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 H3(i);case"spring":return eae();default:if(i.split("(")[0]==="cubic-bezier")return H3(i)}return typeof i=="function"?i:null};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 F3(e){return aae(e)||rae(e)||vL(e)||nae()}function nae(){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 rae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aae(e){if(Array.isArray(e))return Hj(e)}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 cn(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){Vj(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 Vj(e,t,n){return t=iae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iae(e){var t=sae(e,"string");return Uu(t)==="symbol"?t:String(t)}function sae(e,t){if(Uu(e)!=="object"||e===null)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 oae(e,t){return uae(e)||cae(e,t)||vL(e,t)||lae()}function lae(){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 vL(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 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 cae(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 uae(e){if(Array.isArray(e))return e}var mm=function(t,n,r){return t+(n-t)*r},Fj=function(t){var n=t.from,r=t.to;return n!==r},dae=function e(t,n,r){var i=cu(function(l,c){if(Fj(c)){var d=t(c.from,c.to,c.velocity),f=oae(d,2),h=f[0],p=f[1];return cn(cn({},c),{},{from:h,velocity:p})}return c},n);return r<1?cu(function(l,c){return Fj(c)?cn(cn({},c),{},{velocity:mm(c.velocity,i[l].velocity,r),from:mm(c.from,i[l].from,r)}):c},n):e(t,i,r-1)};const fae=(function(e,t,n,r,i){var l=Ure(e,t),c=l.reduce(function(v,A){return cn(cn({},v),{},Vj({},A,[e[A],t[A]]))},{}),d=l.reduce(function(v,A){return cn(cn({},v),{},Vj({},A,{from:e[A],velocity:0,to:t[A]}))},{}),f=-1,h,p,x=function(){return null},y=function(){return cu(function(A,O){return O.from},d)},j=function(){return!Object.values(d).filter(Fj).length},w=function(A){h||(h=A);var O=A-h,_=O/n.dt;d=dae(n,d,_),i(cn(cn(cn({},e),t),y())),h=A,j()||(f=requestAnimationFrame(x))},S=function(A){p||(p=A);var O=(A-p)/r,_=cu(function(N,E){return mm.apply(void 0,F3(E).concat([n(O)]))},c);if(i(cn(cn(cn({},e),t),_)),O<1)f=requestAnimationFrame(x);else{var T=cu(function(N,E){return mm.apply(void 0,F3(E).concat([n(1)]))},c);i(cn(cn(cn({},e),t),T))}};return x=n.isStepper?w:S,function(){return requestAnimationFrame(x),function(){cancelAnimationFrame(f)}}});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)}var hae=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function mae(e,t){if(e==null)return{};var n=pae(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 pae(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 F0(e){return vae(e)||gae(e)||yae(e)||xae()}function xae(){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 yae(e,t){if(e){if(typeof e=="string")return Gj(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 Gj(e,t)}}function gae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vae(e){if(Array.isArray(e))return Gj(e)}function Gj(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 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 Pr(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){tu(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 tu(e,t,n){return t=bL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jae(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,bL(r.key),r)}}function wae(e,t,n){return t&&jae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bL(e){var t=Sae(e,"string");return ll(t)==="symbol"?t:String(t)}function Sae(e,t){if(ll(e)!=="object"||e===null)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(t==="string"?String:Number)(e)}function Nae(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 Aae(e){var t=_ae();return function(){var r=pm(e),i;if(t){var l=pm(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Yj(this,i)}}function Yj(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 Xj(e)}function Xj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _ae(){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 pm(e){return pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pm(e)}var sa=(function(e){Nae(n,e);var t=Aae(n);function n(r,i){var l;bae(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(Xj(l)),l.changeStyle=l.changeStyle.bind(Xj(l)),!d||j<=0)return l.state={style:{}},typeof y=="function"&&(l.state={style:p}),Yj(l);if(x&&x.length)l.state={style:x[0].style};else if(h){if(typeof y=="function")return l.state={style:h},Yj(l);l.state={style:f?tu({},f,h):h}}else l.state={style:{}};return l}return wae(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?tu({},f,p):p};this.state&&y&&(f&&y[f]!==p||!f&&y!==p)&&this.setState(j);return}if(!(Mre(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?tu({},f,S):S};(f&&y[f]!==S||!f&&y!==S)&&this.setState(v)}this.runAnimation(Pr(Pr({},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=fae(c,d,tae(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,A){if(A===0)return S;var O=v.duration,_=v.easing,T=_===void 0?"ease":_,N=v.style,E=v.properties,M=v.onAnimationEnd,R=A>0?c[A-1]:v,B=E||Object.keys(N);if(typeof T=="function"||T==="spring")return[].concat(F0(S),[l.runJSAnimation.bind(l,{from:R.style,to:N,duration:O,easing:T}),O]);var z=U3(B,O,T),D=Pr(Pr(Pr({},R.style),N),{},{transition:z});return[].concat(F0(S),[D,O,M]).filter(Vre)};return this.manager.start([f].concat(F0(c.reduce(j,[p,Math.max(y,d)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Bre());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?tu({},d,f):f,v=U3(Object.keys(S),c,h);w.start([p,l,Pr(Pr({},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=mae(i,hae),h=k.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,A=w.className,O=k.cloneElement(j,Pr(Pr({},f),{},{style:Pr(Pr({},v),p),className:A}));return O};return h===1?x(k.Children.only(l)):V.createElement("div",null,k.Children.map(l,function(y){return x(y)}))}}]),n})(k.PureComponent);sa.displayName="Animate";sa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};sa.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 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 xm(){return xm=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},xm.apply(this,arguments)}function Oae(e,t){return Cae(e)||kae(e,t)||Eae(e,t)||Tae()}function Tae(){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 Eae(e,t){if(e){if(typeof e=="string")return Y3(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 Y3(e,t)}}function Y3(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 kae(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 Cae(e){if(Array.isArray(e))return e}function X3(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 W3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X3(Object(n),!0).forEach(function(r){Mae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mae(e,t,n){return t=Pae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pae(e){var t=Rae(e,"string");return Vu(t)=="symbol"?t:t+""}function Rae(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)}var Z3=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},Dae=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},zae={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},dN=function(t){var n=W3(W3({},zae),t),r=k.useRef(),i=k.useState(-1),l=Oae(i,2),c=l[0],d=l[1];k.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,A=n.isAnimationActive,O=n.isUpdateAnimationActive;if(f!==+f||h!==+h||p!==+p||x!==+x||p===0||x===0)return null;var _=Le("recharts-rectangle",j);return O?V.createElement(sa,{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,M=T.x,R=T.y;return V.createElement(sa,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:S,isActive:A,easing:w},V.createElement("path",xm({},we(n,!0),{className:_,d:Z3(M,R,N,E,y),ref:r})))}):V.createElement("path",xm({},we(n,!0),{className:_,d:Z3(f,h,p,x,y)}))},Lae=["points","className","baseLinePoints","connectNulls"];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 $ae(e,t){if(e==null)return{};var n=Bae(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 Bae(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 Q3(e){return Vae(e)||Uae(e)||qae(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 qae(e,t){if(e){if(typeof e=="string")return Wj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wj(e,t)}}function Uae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vae(e){if(Array.isArray(e))return Wj(e)}function Wj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var J3=function(t){return t&&t.x===+t.x&&t.y===+t.y},Hae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){J3(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),J3(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},uu=function(t,n){var r=Hae(t);n&&(r=[r.reduce(function(l,c){return[].concat(Q3(l),Q3(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},Fae=function(t,n,r){var i=uu(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(uu(n.reverse(),r).slice(1))},Gae=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,l=t.connectNulls,c=$ae(t,Lae);if(!n||!n.length)return null;var d=Le("recharts-polygon",r);if(i&&i.length){var f=c.stroke&&c.stroke!=="none",h=Fae(n,i,l);return V.createElement("g",{className:d},V.createElement("path",zo({},we(c,!0),{fill:h.slice(-1)==="Z"?c.fill:"none",stroke:"none",d:h})),f?V.createElement("path",zo({},we(c,!0),{fill:"none",d:uu(n,l)})):null,f?V.createElement("path",zo({},we(c,!0),{fill:"none",d:uu(i,l)})):null)}var p=uu(n,l);return V.createElement("path",zo({},we(c,!0),{fill:p.slice(-1)==="Z"?c.fill:"none",className:d,d:p}))};function Zj(){return Zj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zj.apply(this,arguments)}var xp=function(t){var n=t.cx,r=t.cy,i=t.r,l=t.className,c=Le("recharts-dot",l);return n===+n&&r===+r&&i===+i?k.createElement("circle",Zj({},we(t,!1),Lh(t),{className:c,cx:n,cy:r,r:i})):null};function Hu(e){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}var Kae=["x","y","top","left","width","height","className"];function Qj(){return Qj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qj.apply(this,arguments)}function e4(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 Yae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e4(Object(n),!0).forEach(function(r){Xae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xae(e,t,n){return t=Wae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wae(e){var t=Zae(e,"string");return Hu(t)=="symbol"?t:t+""}function Zae(e,t){if(Hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qae(e,t){if(e==null)return{};var n=Jae(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 Jae(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 eie=function(t,n,r,i,l,c){return"M".concat(t,",").concat(l,"v").concat(i,"M").concat(c,",").concat(n,"h").concat(r)},tie=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=Qae(t,Kae),v=Yae({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:V.createElement("path",Qj({},we(v,!0),{className:Le("recharts-cross",w),d:eie(r,l,x,j,d,h)}))},G0,t4;function nie(){if(t4)return G0;t4=1;var e=dp(),t=Dz(),n=la();function r(i,l){return i&&i.length?e(i,n(l,2),t):void 0}return G0=r,G0}var rie=nie();const aie=it(rie);var K0,n4;function iie(){if(n4)return K0;n4=1;var e=dp(),t=la(),n=zz();function r(i,l){return i&&i.length?e(i,t(l,2),n):void 0}return K0=r,K0}var sie=iie();const oie=it(sie);var lie=["cx","cy","angle","ticks","axisLine"],cie=["ticks","tick","angle","tickFormatter","stroke"];function cl(e){"@babel/helpers - typeof";return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cl(e)}function du(){return du=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},du.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 ls(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){yp(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 a4(e,t){if(e==null)return{};var n=uie(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 uie(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 die(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,wL(r.key),r)}}function fie(e,t,n){return t&&i4(e.prototype,t),n&&i4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hie(e,t,n){return t=ym(t),mie(e,jL()?Reflect.construct(t,n||[],ym(e).constructor):t.apply(e,n))}function mie(e,t){if(t&&(cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pie(e)}function pie(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 ym(e){return ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ym(e)}function xie(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 yp(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=yie(e,"string");return cl(t)=="symbol"?t:t+""}function yie(e,t){if(cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gp=(function(e){function t(){return die(this,t),hie(this,t,arguments)}return xie(t,e),fie(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=aie(d,function(p){return p.coordinate||0}),h=oie(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=a4(r,lie),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=ls(ls(ls({},we(h,!1)),{},{fill:"none"},we(f,!1)),{},{x1:x.x,y1:x.y,x2:y.x,y2:y.y});return V.createElement("line",du({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=a4(i,cie),x=this.getTickTextAnchor(),y=we(p,!1),j=we(c,!1),w=l.map(function(S,v){var A=r.getTickValueCoord(S),O=ls(ls(ls(ls({textAnchor:x,transform:"rotate(".concat(90-d,", ").concat(A.x,", ").concat(A.y,")")},y),{},{stroke:"none",fill:h},j),{},{index:v},A),{},{payload:S});return V.createElement(Ze,du({className:Le("recharts-polar-radius-axis-tick",uL(c)),key:"tick-".concat(S.coordinate)},ks(r.props,S,v)),t.renderTickItem(c,O,f?f(S.value,v):S.value))});return V.createElement(Ze,{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:V.createElement(Ze,{className:Le("recharts-polar-radius-axis",this.props.className)},l&&this.renderAxisLine(),c&&this.renderTicks(),tn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,l){var c;return V.isValidElement(r)?c=V.cloneElement(r,i):ke(r)?c=r(i):c=V.createElement(Cs,du({},i,{className:"recharts-polar-radius-axis-tick-value"}),l),c}}])})(k.PureComponent);yp(gp,"displayName","PolarRadiusAxis");yp(gp,"axisType","radiusAxis");yp(gp,"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 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 ps(){return ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ps.apply(this,arguments)}function s4(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?s4(Object(n),!0).forEach(function(r){vp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o4(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 vie(e,t,n){return t&&o4(e.prototype,t),n&&o4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bie(e,t,n){return t=gm(t),jie(e,SL()?Reflect.construct(t,n||[],gm(e).constructor):t.apply(e,n))}function jie(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 wie(e)}function wie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SL=function(){return!!e})()}function gm(e){return gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gm(e)}function Sie(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 vp(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=Nie(e,"string");return ul(t)=="symbol"?t:t+""}function Nie(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(t==="string"?String:Number)(e)}var Aie=Math.PI/180,l4=1e-5,bp=(function(e){function t(){return gie(this,t),bie(this,t,arguments)}return Sie(t,e),vie(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*Aie),c;return l>l4?c=i==="outer"?"start":"end":l<-l4?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=cs(cs({},we(this.props,!1)),{},{fill:"none"},we(d,!1));if(f==="circle")return V.createElement(xp,ps({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 V.createElement(Gae,ps({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=we(this.props,!1),x=we(c,!1),y=cs(cs({},p),{},{fill:"none"},we(d,!1)),j=l.map(function(w,S){var v=r.getTickLineCoord(w),A=r.getTickTextAnchor(w),O=cs(cs(cs({textAnchor:A},p),{},{stroke:"none",fill:h},x),{},{index:S,payload:w,x:v.x2,y:v.y2});return V.createElement(Ze,ps({className:Le("recharts-polar-angle-axis-tick",uL(c)),key:"tick-".concat(w.coordinate)},ks(r.props,w,S)),d&&V.createElement("line",ps({className:"recharts-polar-angle-axis-tick-line"},y,v)),c&&t.renderTickItem(c,O,f?f(w.value,S):w.value))});return V.createElement(Ze,{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:V.createElement(Ze,{className:Le("recharts-polar-angle-axis",this.props.className)},c&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,l){var c;return V.isValidElement(r)?c=V.cloneElement(r,i):ke(r)?c=r(i):c=V.createElement(Cs,ps({},i,{className:"recharts-polar-angle-axis-tick-value"}),l),c}}])})(k.PureComponent);vp(bp,"displayName","PolarAngleAxis");vp(bp,"axisType","angleAxis");vp(bp,"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 Y0,c4;function _ie(){if(c4)return Y0;c4=1;var e=D6(),t=e(Object.getPrototypeOf,Object);return Y0=t,Y0}var X0,u4;function Oie(){if(u4)return X0;u4=1;var e=Fa(),t=_ie(),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 X0=h,X0}var Tie=Oie();const Eie=it(Tie);var W0,d4;function kie(){if(d4)return W0;d4=1;var e=Fa(),t=Ga(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return W0=r,W0}var Cie=kie();const Mie=it(Cie);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 vm(){return vm=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},vm.apply(this,arguments)}function Pie(e,t){return Lie(e)||zie(e,t)||Die(e,t)||Rie()}function Rie(){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 Die(e,t){if(e){if(typeof e=="string")return f4(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 f4(e,t)}}function f4(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 zie(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 Lie(e){if(Array.isArray(e))return e}function h4(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 m4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h4(Object(n),!0).forEach(function(r){$ie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ie(e,t,n){return t=Bie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bie(e){var t=Iie(e,"string");return Fu(t)=="symbol"?t:t+""}function Iie(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)}var p4=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},qie={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Uie=function(t){var n=m4(m4({},qie),t),r=k.useRef(),i=k.useState(-1),l=Pie(i,2),c=l[0],d=l[1];k.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&d(_)}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,A=n.isUpdateAnimationActive;if(f!==+f||h!==+h||p!==+p||x!==+x||y!==+y||p===0&&x===0||y===0)return null;var O=Le("recharts-trapezoid",j);return A?V.createElement(sa,{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:A},function(_){var T=_.upperWidth,N=_.lowerWidth,E=_.height,M=_.x,R=_.y;return V.createElement(sa,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:S,easing:w},V.createElement("path",vm({},we(n,!0),{className:O,d:p4(M,R,T,N,E),ref:r})))}):V.createElement("g",null,V.createElement("path",vm({},we(n,!0),{className:O,d:p4(f,h,p,x,y)})))},Vie=["option","shapeType","propTransformer","activeClassName","isActive"];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 Hie(e,t){if(e==null)return{};var n=Fie(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 Fie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function 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 bm(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){Gie(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 Gie(e,t,n){return t=Kie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kie(e){var t=Yie(e,"string");return Gu(t)=="symbol"?t:t+""}function Yie(e,t){if(Gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xie(e,t){return bm(bm({},t),e)}function Wie(e,t){return e==="symbols"}function y4(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return V.createElement(dN,n);case"trapezoid":return V.createElement(Uie,n);case"sector":return V.createElement(hL,n);case"symbols":if(Wie(t))return V.createElement(kS,n);break;default:return null}}function Zie(e){return k.isValidElement(e)?e.props:e}function AL(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Xie:r,l=e.activeClassName,c=l===void 0?"recharts-active-shape":l,d=e.isActive,f=Hie(e,Vie),h;if(k.isValidElement(t))h=k.cloneElement(t,bm(bm({},f),Zie(t)));else if(ke(t))h=t(f);else if(Eie(t)&&!Mie(t)){var p=i(t,f);h=V.createElement(y4,{shapeType:n,elementProps:p})}else{var x=f;h=V.createElement(y4,{shapeType:n,elementProps:x})}return d?V.createElement(Ze,{className:c},h):h}function jp(e,t){return t!=null&&"trapezoids"in e.props}function wp(e,t){return t!=null&&"sectors"in e.props}function Ku(e,t){return t!=null&&"points"in e.props}function Qie(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 Jie(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function ese(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function tse(e,t){var n;return jp(e,t)?n=Qie:wp(e,t)?n=Jie:Ku(e,t)&&(n=ese),n}function nse(e,t){var n;return jp(e,t)?n="trapezoids":wp(e,t)?n="sectors":Ku(e,t)&&(n="points"),n}function rse(e,t){if(jp(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(wp(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 Ku(e,t)?t.payload:{}}function ase(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=nse(n,t),l=rse(n,t),c=r.filter(function(f,h){var p=hd(l,f),x=n.props[i].filter(function(w){var S=tse(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 vh;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 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 g4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g4(Object(n),!0).forEach(function(r){yr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ise(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v4(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,OL(r.key),r)}}function sse(e,t,n){return t&&v4(e.prototype,t),n&&v4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ose(e,t,n){return t=jm(t),lse(e,_L()?Reflect.construct(t,n||[],jm(e).constructor):t.apply(e,n))}function lse(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 cse(e)}function cse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_L=function(){return!!e})()}function jm(e){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jm(e)}function use(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tw(e,t)}function tw(e,t){return tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tw(e,t)}function yr(e,t,n){return t=OL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OL(e){var t=dse(e,"string");return dl(t)=="symbol"?t:t+""}function dse(e,t){if(dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ya=(function(e){function t(n){var r;return ise(this,t),r=ose(this,t,[n]),yr(r,"pieRef",null),yr(r,"sectorRefs",[]),yr(r,"id",Ll("recharts-pie-")),yr(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ke(i)&&i()}),yr(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ke(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return use(t,e),sse(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=we(this.props,!1),x=we(c,!1),y=we(d,!1),j=c&&c.offsetRadius||20,w=r.map(function(S,v){var A=(S.startAngle+S.endAngle)/2,O=yt(S.cx,S.cy,S.outerRadius+j,A),_=mt(mt(mt(mt({},p),S),{},{stroke:"none"},x),{},{index:v,textAnchor:t.getTextAnchor(O.x,S.cx)},O),T=mt(mt(mt(mt({},p),S),{},{fill:"none",stroke:S.fill},y),{},{index:v,points:[yt(S.cx,S.cy,S.outerRadius,A),O]}),N=f;return De(f)&&De(h)?N="value":De(f)&&(N=h),V.createElement(Ze,{key:"label-".concat(S.startAngle,"-").concat(S.endAngle,"-").concat(S.midAngle,"-").concat(v)},d&&t.renderLabelLineItem(d,T,"line"),t.renderLabelItem(c,_,Yt(S,N)))});return V.createElement(Ze,{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=mt(mt({},h),{},{stroke:d?h.fill:h.stroke,tabIndex:-1});return V.createElement(Ze,Lo({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},ks(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)}),V.createElement(AL,Lo({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 V.createElement(sa,{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=[],A=l&&l[0],O=A.startAngle;return l.forEach(function(_,T){var N=y&&y[T],E=T>0?Jn(_,"paddingAngle",0):0;if(N){var M=Wn(N.endAngle-N.startAngle,_.endAngle-_.startAngle),R=mt(mt({},_),{},{startAngle:O+E,endAngle:O+M(S)+E});v.push(R),O=R.endAngle}else{var B=_.endAngle,z=_.startAngle,D=Wn(0,B-z),L=D(S),$=mt(mt({},_),{},{startAngle:O+E,endAngle:O+L+E});v.push($),O=$.endAngle}}),V.createElement(Ze,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||!hd(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=Le("recharts-pie",d);return V.createElement(Ze,{tabIndex:this.props.rootTabIndex,className:S,ref:function(A){r.pieRef=A}},this.renderSectors(),f&&this.renderLabels(c),tn.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(V.isValidElement(r))return V.cloneElement(r,i);if(ke(r))return r(i);var c=Le("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return V.createElement(dm,Lo({},i,{key:l,type:"linear",className:c}))}},{key:"renderLabelItem",value:function(r,i,l){if(V.isValidElement(r))return V.cloneElement(r,i);var c=l;if(ke(r)&&(c=r(i),V.isValidElement(c)))return c;var d=Le("recharts-pie-label-text",typeof r!="boolean"&&!ke(r)?r.className:"");return V.createElement(Cs,Lo({},i,{alignmentBaseline:"middle",className:d}),c)}}])})(k.PureComponent);vh=Ya;yr(Ya,"displayName","Pie");yr(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:!$s.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});yr(Ya,"parseDeltaAngle",function(e,t){var n=wn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});yr(Ya,"getRealPieData",function(e){var t=e.data,n=e.children,r=we(e,!1),i=er(n,ap);return t&&t.length?t.map(function(l,c){return mt(mt(mt({payload:l},r),l),i&&i[c]&&i[c].props)}):i&&i.length?i.map(function(l){return mt(mt({},r),l.props)}):[]});yr(Ya,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,l=t.height,c=cL(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}});yr(Ya,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?mt(mt({},t.type.defaultProps),t.props):t.props,i=vh.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=vh.parseCoordinateOfPie(r,n),S=vh.parseDeltaAngle(c,d),v=Math.abs(S),A=h;De(h)&&De(x)?(Ur(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),A="value"):De(h)&&(Ur(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),A=x);var O=i.filter(function(R){return Yt(R,A,0)!==0}).length,_=(v>=360?O:O-1)*f,T=v-O*j-_,N=i.reduce(function(R,B){var z=Yt(B,A,0);return R+(he(z)?z:0)},0),E;if(N>0){var M;E=i.map(function(R,B){var z=Yt(R,A,0),D=Yt(R,p,B),L=(he(z)?z:0)/N,$;B?$=M.endAngle+wn(S)*f*(z!==0?1:0):$=c;var F=$+wn(S)*((z!==0?j:0)+L*T),H=($+F)/2,I=(w.innerRadius+w.outerRadius)/2,G=[{name:D,value:z,payload:R,dataKey:A,type:y}],Z=yt(w.cx,w.cy,I,H);return M=mt(mt(mt({percent:L,cornerRadius:l,name:D,tooltipPayload:G,midAngle:H,middleRadius:I,tooltipPosition:Z},R),w),{},{value:Yt(R,A),startAngle:$,endAngle:F,payload:R,paddingAngle:wn(S)*f}),M})}return mt(mt({},w),{},{sectors:E,data:i})});var Z0,b4;function fse(){if(b4)return Z0;b4=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 Z0=n,Z0}var Q0,j4;function TL(){if(j4)return Q0;j4=1;var e=Z6(),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 Q0=r,Q0}var J0,w4;function hse(){if(w4)return J0;w4=1;var e=fse(),t=rp(),n=TL();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 J0=r,J0}var e1,S4;function mse(){if(S4)return e1;S4=1;var e=hse(),t=e();return e1=t,e1}var pse=mse();const wm=it(pse);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 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 A4(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){EL(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 EL(e,t,n){return t=xse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xse(e){var t=yse(e,"string");return Yu(t)=="symbol"?t:t+""}function yse(e,t){if(Yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gse=["Webkit","Moz","O","ms"],vse=function(t,n){var r=t.replace(/(\w)/,function(l){return l.toUpperCase()}),i=gse.reduce(function(l,c){return A4(A4({},l),{},EL({},c+r,n))},{});return i[t]=n,i};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 Sm(){return Sm=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},Sm.apply(this,arguments)}function _4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function t1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_4(Object(n),!0).forEach(function(r){Yn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O4(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,CL(r.key),r)}}function jse(e,t,n){return t&&O4(e.prototype,t),n&&O4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wse(e,t,n){return t=Nm(t),Sse(e,kL()?Reflect.construct(t,n||[],Nm(e).constructor):t.apply(e,n))}function Sse(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 Nse(e)}function Nse(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 Nm(e){return Nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nm(e)}function Ase(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 Yn(e,t,n){return t=CL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CL(e){var t=_se(e,"string");return fl(t)=="symbol"?t:t+""}function _se(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 Ose=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=ou().domain(wm(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}},T4=function(t){return t.changedTouches&&!!t.changedTouches.length},hl=(function(e){function t(n){var r;return bse(this,t),r=wse(this,t,[n]),Yn(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Yn(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Yn(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()}),Yn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Yn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Yn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Yn(r,"handleSlideDragStart",function(i){var l=T4(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 Ase(t,e),jse(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 ke(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=T4(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,A={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)),A[c]=h+O;var _=this.getIndex(A),T=_.startIndex,N=_.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(Yn(Yn({},c,h+O),"brushMoveStartX",r.pageX),function(){w&&E()&&w(_)})}},{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(Yn({},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 V.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=k.Children.only(h);return x?V.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,A=Math.max(r,this.props.x),O=t1(t1({},we(this.props,!1)),{},{x:A,y:h,width:p,height:x}),_=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 V.createElement(Ze,{tabIndex:0,role:"slider","aria-label":_,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(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 V.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 V.createElement(Ze,{className:"recharts-brush-texts"},V.createElement(Cs,Sm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(x,y)-j,y:c+d/2},w),this.getTextOfTick(i)),V.createElement(Cs,Sm({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,A=y.isTravellerMoving,O=y.isTravellerFocused;if(!i||!i.length||!he(d)||!he(f)||!he(h)||!he(p)||h<=0||p<=0)return null;var _=Le("recharts-brush",l),T=V.Children.count(c)===1,N=vse("userSelect","none");return V.createElement(Ze,{className:_,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||A||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 V.createElement(V.Fragment,null,V.createElement("rect",{x:i,y:l,width:c,height:d,fill:f,stroke:"none"}),V.createElement("line",{x1:i+1,y1:h,x2:i+c-1,y2:h,fill:"none",stroke:"#fff"}),V.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 V.isValidElement(r)?l=V.cloneElement(r,i):ke(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 t1({prevData:l,prevTravellerWidth:f,prevUpdateId:h,prevX:d,prevWidth:c},l&&l.length?Ose({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}}])})(k.PureComponent);Yn(hl,"displayName","Brush");Yn(hl,"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 n1,E4;function Tse(){if(E4)return n1;E4=1;var e=LS();function t(n,r){var i;return e(n,function(l,c,d){return i=r(l,c,d),!i}),!!i}return n1=t,n1}var r1,k4;function Ese(){if(k4)return r1;k4=1;var e=T6(),t=la(),n=Tse(),r=Ln(),i=rp();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 r1=l,r1}var kse=Ese();const Cse=it(kse);var na=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},a1,C4;function Mse(){if(C4)return a1;C4=1;var e=G6();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return a1=t,a1}var i1,M4;function Pse(){if(M4)return i1;M4=1;var e=Mse(),t=H6(),n=la();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 i1=r,i1}var Rse=Pse();const Dse=it(Rse);var s1,P4;function zse(){if(P4)return s1;P4=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 s1=e,s1}var o1,R4;function Lse(){if(R4)return o1;R4=1;var e=LS();function t(n,r){var i=!0;return e(n,function(l,c,d){return i=!!r(l,c,d),i}),i}return o1=t,o1}var l1,D4;function $se(){if(D4)return l1;D4=1;var e=zse(),t=Lse(),n=la(),r=Ln(),i=rp();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 l1=l,l1}var Bse=$se();const ML=it(Bse);var Ise=["x","y"];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 rw(){return rw=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},rw.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 Zc(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){qse(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 qse(e,t,n){return t=Use(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Use(e){var t=Vse(e,"string");return Xu(t)=="symbol"?t:t+""}function Vse(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 Hse(e,t){if(e==null)return{};var n=Fse(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 Fse(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 Gse(e,t){var n=e.x,r=e.y,i=Hse(e,Ise),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 Zc(Zc(Zc(Zc(Zc({},t),i),c?{x:c}:{}),f?{y:f}:{}),{},{height:p,width:y,name:t.name,radius:t.radius})}function L4(e){return V.createElement(AL,rw({shapeType:"rectangle",propTransformer:Gse,activeClassName:"recharts-active-bar"},e))}var Kse=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)||hK(r);return l?t(r,i):(l||Ps(),n)}},Yse=["value","background"],PL;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 Xse(e,t){if(e==null)return{};var n=Wse(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 Wse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Am(){return Am=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},Am.apply(this,arguments)}function $4(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?$4(Object(n),!0).forEach(function(r){Oi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B4(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,DL(r.key),r)}}function Qse(e,t,n){return t&&B4(e.prototype,t),n&&B4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jse(e,t,n){return t=_m(t),eoe(e,RL()?Reflect.construct(t,n||[],_m(e).constructor):t.apply(e,n))}function eoe(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 toe(e)}function toe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RL=function(){return!!e})()}function _m(e){return _m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_m(e)}function noe(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&&aw(e,t)}function aw(e,t){return aw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},aw(e,t)}function Oi(e,t,n){return t=DL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DL(e){var t=roe(e,"string");return ml(t)=="symbol"?t:t+""}function roe(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 zi=(function(e){function t(){var n;Zse(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=Jse(this,t,[].concat(i)),Oi(n,"state",{isAnimationFinished:!1}),Oi(n,"id",Ll("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 noe(t,e),Qse(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=we(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 V.createElement(Ze,Am({className:"recharts-bar-rectangle"},ks(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)}),V.createElement(L4,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 V.createElement(sa,{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,A){var O=y&&y[A];if(O){var _=Wn(O.x,v.x),T=Wn(O.y,v.y),N=Wn(O.width,v.width),E=Wn(O.height,v.height);return qt(qt({},v),{},{x:_(w),y:T(w),width:N(w),height:E(w)})}if(c==="horizontal"){var M=Wn(0,v.height),R=M(w);return qt(qt({},v),{},{y:v.y+v.height-R,height:R})}var B=Wn(0,v.width),z=B(w);return qt(qt({},v),{},{width:z})});return V.createElement(Ze,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||!hd(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=we(this.props.background,!1);return l.map(function(h,p){h.value;var x=h.background,y=Xse(h,Yse);if(!x)return null;var j=qt(qt(qt(qt(qt({},y),{},{fill:"#eee"},x),f),ks(r.props,h,p)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:c,index:p,className:"recharts-bar-background-rectangle"});return V.createElement(L4,Am({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=er(p,md);if(!x)return null;var y=h==="vertical"?c[0].height/2:c[0].width/2,j=function(v,A){var O=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:O,errorVal:Yt(v,A)}},w={clipPath:r?"url(#clipPath-".concat(i,")"):null};return V.createElement(Ze,w,x.map(function(S){return V.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,A=Le("recharts-bar",c),O=d&&d.allowDataOverflow,_=f&&f.allowDataOverflow,T=O||_,N=De(S)?this.id:S;return V.createElement(Ze,{className:A},O||_?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(N)},V.createElement("rect",{x:O?h:h-x/2,y:_?p:p-y/2,width:O?x:x*2,height:_?y:y*2}))):null,V.createElement(Ze,{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}}])})(k.PureComponent);PL=zi;Oi(zi,"displayName","Bar");Oi(zi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!$s.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=Tte(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,A=v.dataKey,O=v.children,_=v.minPointSize,T=w==="horizontal"?c:l,N=h?T.scale.domain():null,E=Dte({numericAxis:T}),M=er(O,ap),R=x.map(function(B,z){var D,L,$,F,H,I;h?D=Ete(h[p+z],N):(D=Yt(B,A),Array.isArray(D)||(D=[E,D]));var G=Kse(_,PL.defaultProps.minPointSize)(D[1],z);if(w==="horizontal"){var Z,ie=[c.scale(D[0]),c.scale(D[1])],ce=ie[0],q=ie[1];L=h3({axis:l,ticks:d,bandSize:i,offset:j.offset,entry:B,index:z}),$=(Z=q??ce)!==null&&Z!==void 0?Z:void 0,F=j.size;var Y=ce-q;if(H=Number.isNaN(Y)?0:Y,I={x:L,y:c.y,width:F,height:c.height},Math.abs(G)>0&&Math.abs(H)<Math.abs(G)){var ae=wn(H||G)*(Math.abs(G)-Math.abs(H));$-=ae,H+=ae}}else{var fe=[l.scale(D[0]),l.scale(D[1])],ye=fe[0],Se=fe[1];if(L=ye,$=h3({axis:c,ticks:f,bandSize:i,offset:j.offset,entry:B,index:z}),F=Se-ye,H=j.size,I={x:l.x,y:$,width:l.width,height:H},Math.abs(G)>0&&Math.abs(F)<Math.abs(G)){var qe=wn(F||G)*(Math.abs(G)-Math.abs(F));F+=qe}}return qt(qt(qt({},B),{},{x:L,y:$,width:F,height:H,value:h?D:D[1],payload:B,background:I},M&&M[z]&&M[z].props),{},{tooltipPayload:[oL(n,B)],tooltipPosition:{x:L+F/2,y:$+H/2}})});return qt({data:R,layout:w},y)});function Wu(e){"@babel/helpers - typeof";return Wu=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},Wu(e)}function aoe(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,zL(r.key),r)}}function ioe(e,t,n){return t&&I4(e.prototype,t),n&&I4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),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 Dr(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){Sp(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 Sp(e,t,n){return t=zL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zL(e){var t=soe(e,"string");return Wu(t)=="symbol"?t:t+""}function soe(e,t){if(Wu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LL=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=!!Xn(h,zi);return p.reduce(function(j,w){var S=n[w],v=S.orientation,A=S.domain,O=S.padding,_=O===void 0?{}:O,T=S.mirror,N=S.reversed,E="".concat(v).concat(T?"Mirror":""),M,R,B,z,D;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var L=A[1]-A[0],$=1/0,F=S.categoricalDomain.sort(xK);if(F.forEach(function(fe,ye){ye>0&&($=Math.min((fe||0)-(F[ye-1]||0),$))}),Number.isFinite($)){var H=$/L,I=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(M=H*I/2),S.padding==="no-gap"){var G=Sn(t.barCategoryGap,H*I),Z=H*I/2;M=Z-G-(Z-G)/I*G}}}i==="xAxis"?R=[r.left+(_.left||0)+(M||0),r.left+r.width-(_.right||0)-(M||0)]:i==="yAxis"?R=f==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(M||0),r.top+r.height-(_.bottom||0)-(M||0)]:R=S.range,N&&(R=[R[1],R[0]]);var ie=rL(S,l,y),ce=ie.scale,q=ie.realScaleType;ce.domain(A).range(R),aL(ce);var Y=iL(ce,Dr(Dr({},S),{},{realScaleType:q}));i==="xAxis"?(D=v==="top"&&!T||v==="bottom"&&T,B=r.left,z=x[E]-D*S.height):i==="yAxis"&&(D=v==="left"&&!T||v==="right"&&T,B=x[E]-D*S.width,z=r.top);var ae=Dr(Dr(Dr({},S),Y),{},{realScaleType:q,x:B,y:z,scale:ce,width:i==="xAxis"?r.width:S.width,height:i==="yAxis"?r.height:S.height});return ae.bandSize=lm(ae,Y),!S.hide&&i==="xAxis"?x[E]+=(D?-1:1)*ae.height:S.hide||(x[E]+=(D?-1:1)*ae.width),Dr(Dr({},j),{},Sp({},w,ae))},{})},$L=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)}},ooe=function(t){var n=t.x1,r=t.y1,i=t.x2,l=t.y2;return $L({x:n,y:r},{x:i,y:l})},BL=(function(){function e(t){aoe(this,e),this.scale=t}return ioe(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)}}])})();Sp(BL,"EPS",1e-4);var fN=function(t){var n=Object.keys(t).reduce(function(r,i){return Dr(Dr({},r),{},Sp({},i,BL.create(t[i])))},{});return Dr(Dr({},n),{},{apply:function(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=l.bandAware,d=l.position;return Dse(i,function(f,h){return n[h].apply(f,{bandAware:c,position:d})})},isInRange:function(i){return ML(i,function(l,c){return n[c].isInRange(l)})}})};function loe(e){return(e%180+180)%180}var coe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=loe(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)},c1,U4;function uoe(){if(U4)return c1;U4=1;var e=la(),t=ld(),n=tp();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 c1=r,c1}var u1,V4;function doe(){if(V4)return u1;V4=1;var e=TL();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return u1=t,u1}var d1,H4;function foe(){if(H4)return d1;H4=1;var e=B6(),t=la(),n=doe(),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 d1=i,d1}var f1,F4;function hoe(){if(F4)return f1;F4=1;var e=uoe(),t=foe(),n=e(t);return f1=n,f1}var moe=hoe();const poe=it(moe);var xoe=t6();const yoe=it(xoe);var goe=yoe(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("")}),hN=k.createContext(void 0),mN=k.createContext(void 0),IL=k.createContext(void 0),qL=k.createContext({}),UL=k.createContext(void 0),VL=k.createContext(0),HL=k.createContext(0),G4=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=goe(l);return V.createElement(hN.Provider,{value:r},V.createElement(mN.Provider,{value:i},V.createElement(qL.Provider,{value:l},V.createElement(IL.Provider,{value:p},V.createElement(UL.Provider,{value:c},V.createElement(VL.Provider,{value:h},V.createElement(HL.Provider,{value:f},d)))))))},voe=function(){return k.useContext(UL)},FL=function(t){var n=k.useContext(hN);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},boe=function(){var t=k.useContext(hN);return Ai(t)},joe=function(){var t=k.useContext(mN),n=poe(t,function(r){return ML(r.domain,Number.isFinite)});return n||Ai(t)},GL=function(t){var n=k.useContext(mN);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},woe=function(){var t=k.useContext(IL);return t},Soe=function(){return k.useContext(qL)},pN=function(){return k.useContext(HL)},xN=function(){return k.useContext(VL)};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 Noe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Aoe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,YL(r.key),r)}}function _oe(e,t,n){return t&&Aoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ooe(e,t,n){return t=Om(t),Toe(e,KL()?Reflect.construct(t,n||[],Om(e).constructor):t.apply(e,n))}function Toe(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 Eoe(e)}function Eoe(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 Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Om(e)}function koe(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&&iw(e,t)}function iw(e,t){return iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iw(e,t)}function K4(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 Y4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K4(Object(n),!0).forEach(function(r){yN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yN(e,t,n){return t=YL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YL(e){var t=Coe(e,"string");return pl(t)=="symbol"?t:t+""}function Coe(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)}function Moe(e,t){return zoe(e)||Doe(e,t)||Roe(e,t)||Poe()}function Poe(){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 Roe(e,t){if(e){if(typeof e=="string")return X4(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 X4(e,t)}}function X4(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 Doe(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 zoe(e){if(Array.isArray(e))return e}function sw(){return sw=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},sw.apply(this,arguments)}var Loe=function(t,n){var r;return V.isValidElement(t)?r=V.cloneElement(t,n):ke(t)?r=t(n):r=V.createElement("line",sw({},n,{className:"recharts-reference-line-line"})),r},$oe=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(na(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 A=h.x,O=t.x.apply(A,{position:c});if(na(h,"discard")&&!t.x.isInRange(O))return null;var _=[{x:O,y:x+j},{x:O,y:x}];return d==="top"?_.reverse():_}if(i){var T=h.segment,N=T.map(function(E){return t.apply(E,{position:c})});return na(h,"discard")&&Cse(N,function(E){return!t.isInRange(E)})?null:N}return null};function Boe(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=voe(),p=FL(i),x=GL(l),y=woe();if(!h||!y)return null;Ur(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var j=fN({x:p.scale,y:x.scale}),w=Wt(t),S=Wt(n),v=r&&r.length===2,A=$oe(j,w,S,v,y,e.position,p.orientation,x.orientation,e);if(!A)return null;var O=Moe(A,2),_=O[0],T=_.x,N=_.y,E=O[1],M=E.x,R=E.y,B=na(e,"hidden")?"url(#".concat(h,")"):void 0,z=Y4(Y4({clipPath:B},we(e,!0)),{},{x1:T,y1:N,x2:M,y2:R});return V.createElement(Ze,{className:Le("recharts-reference-line",d)},Loe(c,z),tn.renderCallByParent(e,ooe({x1:T,y1:N,x2:M,y2:R})))}var gN=(function(e){function t(){return Noe(this,t),Ooe(this,t,arguments)}return koe(t,e),_oe(t,[{key:"render",value:function(){return V.createElement(Boe,this.props)}}])})(V.Component);yN(gN,"displayName","ReferenceLine");yN(gN,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});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 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 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){Np(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 Ioe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qoe(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 Uoe(e,t,n){return t&&qoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Voe(e,t,n){return t=Tm(t),Hoe(e,XL()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function Hoe(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 Foe(e)}function Foe(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 Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(e)}function Goe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 Np(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=Koe(e,"string");return xl(t)=="symbol"?t:t+""}function Koe(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)}var Yoe=function(t){var n=t.x,r=t.y,i=t.xAxis,l=t.yAxis,c=fN({x:i.scale,y:l.scale}),d=c.apply({x:n,y:r},{bandAware:!0});return na(t,"discard")&&!c.isInRange(d)?null:d},Ap=(function(e){function t(){return Ioe(this,t),Voe(this,t,arguments)}return Goe(t,e),Uoe(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=Wt(i),p=Wt(l);if(Ur(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!p)return null;var x=Yoe(this.props);if(!x)return null;var y=x.x,j=x.y,w=this.props,S=w.shape,v=w.className,A=na(this.props,"hidden")?"url(#".concat(f,")"):void 0,O=Z4(Z4({clipPath:A},we(this.props,!0)),{},{cx:y,cy:j});return V.createElement(Ze,{className:Le("recharts-reference-dot",v)},t.renderDot(S,O),tn.renderCallByParent(this.props,{x:y-c,y:j-c,width:2*c,height:2*c}))}}])})(V.Component);Np(Ap,"displayName","ReferenceDot");Np(Ap,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Np(Ap,"renderDot",function(e,t){var n;return V.isValidElement(e)?n=V.cloneElement(e,t):ke(e)?n=e(t):n=V.createElement(xp,ow({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function cw(){return cw=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},cw.apply(this,arguments)}function yl(e){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yl(e)}function 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 J4(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){_p(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 Xoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Woe(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 Zoe(e,t,n){return t&&Woe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qoe(e,t,n){return t=Em(t),Joe(e,ZL()?Reflect.construct(t,n||[],Em(e).constructor):t.apply(e,n))}function Joe(e,t){if(t&&(yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ele(e)}function ele(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZL=function(){return!!e})()}function Em(e){return Em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Em(e)}function tle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uw(e,t)}function uw(e,t){return uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},uw(e,t)}function _p(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=nle(e,"string");return yl(t)=="symbol"?t:t+""}function nle(e,t){if(yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rle=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=fN({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 na(l,"discard")&&(!y.isInRange(j)||!y.isInRange(w))?null:$L(j,w)},Op=(function(e){function t(){return Xoe(this,t),Qoe(this,t,arguments)}return tle(t,e),Zoe(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;Ur(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=Wt(i),y=Wt(l),j=Wt(c),w=Wt(d),S=this.props.shape;if(!x&&!y&&!j&&!w&&!S)return null;var v=rle(x,y,j,w,this.props);if(!v&&!S)return null;var A=na(this.props,"hidden")?"url(#".concat(p,")"):void 0;return V.createElement(Ze,{className:Le("recharts-reference-area",f)},t.renderRect(S,J4(J4({clipPath:A},we(this.props,!0)),v)),tn.renderCallByParent(this.props,v))}}])})(V.Component);_p(Op,"displayName","ReferenceArea");_p(Op,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});_p(Op,"renderRect",function(e,t){var n;return V.isValidElement(e)?n=V.cloneElement(e,t):ke(e)?n=e(t):n=V.createElement(dN,cw({},t,{className:"recharts-reference-area-rect"})),n});function JL(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 ale(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return coe(r,n)}function ile(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 km(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 sle(e,t){return JL(e,t+1)}function ole(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:JL(r,h)};var S=f,v,A=function(){return v===void 0&&(v=n(w,S)),v},O=w.coordinate,_=f===0||km(e,O,A,p,d);_||(f=0,p=c,h+=1),_&&(p=O+e*(A()/2+i),f+=h)},y;h<=l.length;)if(y=x(),y)return y.v;return[]}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 eR(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 xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eR(Object(n),!0).forEach(function(r){lle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lle(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=ule(e,"string");return Zu(t)=="symbol"?t:t+""}function ule(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)}function dle(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=xn(xn({},j),{},{tickCoord:v>0?j.coordinate-v*e:j.coordinate})}else l[y]=j=xn(xn({},j),{},{tickCoord:j.coordinate});var A=km(e,j.tickCoord,S,d,f);A&&(f=j.tickCoord-e*(S()/2+i),l[y]=xn(xn({},j),{},{isShow:!0}))},p=c-1;p>=0;p--)h(p);return l}function fle(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=xn(xn({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate});var j=km(e,p.tickCoord,function(){return x},f,h);j&&(h=p.tickCoord-e*(x/2+i),c[d-1]=xn(xn({},p),{},{isShow:!0}))}for(var w=l?d-1:d,S=function(O){var _=c[O],T,N=function(){return T===void 0&&(T=n(_,O)),T};if(O===0){var E=e*(_.coordinate-e*N()/2-f);c[O]=_=xn(xn({},_),{},{tickCoord:E<0?_.coordinate-E*e:_.coordinate})}else c[O]=_=xn(xn({},_),{},{tickCoord:_.coordinate});var M=km(e,_.tickCoord,N,f,h);M&&(f=_.tickCoord+e*(N()/2+i),c[O]=xn(xn({},_),{},{isShow:!0}))},v=0;v<w;v++)S(v);return c}function vN(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)||$s.isSsr)return sle(i,typeof f=="number"&&he(f)?f:0);var y=[],j=d==="top"||d==="bottom"?"width":"height",w=p&&j==="width"?su(p,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(_,T){var N=ke(h)?h(_.value,T):_.value;return j==="width"?ale(su(N,{fontSize:t,letterSpacing:n}),w,x):su(N,{fontSize:t,letterSpacing:n})[j]},v=i.length>=2?wn(i[1].coordinate-i[0].coordinate):1,A=ile(l,v,j);return f==="equidistantPreserveStart"?ole(v,A,S,i,c):(f==="preserveStart"||f==="preserveStartEnd"?y=fle(v,A,S,i,c,f==="preserveStartEnd"):y=dle(v,A,S,i,c),y.filter(function(O){return O.isShow}))}var hle=["viewBox"],mle=["viewBox"],ple=["ticks"];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 $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 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 Ft(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){bN(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 h1(e,t){if(e==null)return{};var n=xle(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 xle(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 yle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nR(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,t8(r.key),r)}}function gle(e,t,n){return t&&nR(e.prototype,t),n&&nR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vle(e,t,n){return t=Cm(t),ble(e,e8()?Reflect.construct(t,n||[],Cm(e).constructor):t.apply(e,n))}function ble(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 jle(e)}function jle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(e8=function(){return!!e})()}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cm(e)}function wle(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&&dw(e,t)}function dw(e,t){return dw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dw(e,t)}function bN(e,t,n){return t=t8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t8(e){var t=Sle(e,"string");return gl(t)=="symbol"?t:t+""}function Sle(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)}var Ul=(function(e){function t(n){var r;return yle(this,t),r=vle(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return wle(t,e),gle(t,[{key:"shouldComponentUpdate",value:function(r,i){var l=r.viewBox,c=h1(r,hle),d=this.props,f=d.viewBox,h=h1(d,mle);return!Ho(l,f)||!Ho(c,h)||!Ho(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,A,O,_=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-_*T,O=S-_*y,A=N;break;case"left":S=v=r.coordinate,w=l+ +!x*d,j=w-_*T,A=j-_*y,O=N;break;case"right":S=v=r.coordinate,w=l+ +x*d,j=w+_*T,A=j+_*y,O=N;break;default:j=w=r.coordinate,v=c+ +x*f,S=v+_*T,O=S+_*y,A=N;break}return{line:{x1:j,y1:S,x2:w,y2:v},tick:{x:A,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({},we(this.props,!1)),we(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 V.createElement("line",$o({},x,{className:Le("recharts-cartesian-axis-line",Jn(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=vN(Ft(Ft({},this.props),{},{ticks:r}),i,l),w=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),v=we(this.props,!1),A=we(p,!1),O=Ft(Ft({},v),{},{fill:"none"},we(f,!1)),_=j.map(function(T,N){var E=c.getTickLineCoord(T),M=E.line,R=E.tick,B=Ft(Ft(Ft(Ft({textAnchor:w,verticalAnchor:S},v),{},{stroke:"none",fill:h},A),R),{},{index:N,payload:T,visibleTicksCount:j.length,tickFormatter:x});return V.createElement(Ze,$o({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},ks(c.props,T,N)),f&&V.createElement("line",$o({},O,M,{className:Le("recharts-cartesian-axis-tick-line",Jn(f,"className"))})),p&&t.renderTickItem(p,B,"".concat(ke(x)?x(T.value,N):T.value).concat(y||"")))});return V.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{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=h1(x,ple),w=y;return ke(f)&&(w=y&&y.length>0?f(this.props):f(j)),c<=0||d<=0||!w||!w.length?null:V.createElement(Ze,{className:Le("recharts-cartesian-axis",h),ref:function(v){r.layerReference=v}},l&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),tn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,l){var c,d=Le(i.className,"recharts-cartesian-axis-tick-value");return V.isValidElement(r)?c=V.cloneElement(r,Ft(Ft({},i),{},{className:d})):ke(r)?c=r(Ft(Ft({},i),{},{className:d})):c=V.createElement(Cs,$o({},i,{className:"recharts-cartesian-axis-tick-value"}),l),c}}])})(k.Component);bN(Ul,"displayName","CartesianAxis");bN(Ul,"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 Nle=["x1","y1","x2","y2","key"],Ale=["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 rR(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?rR(Object(n),!0).forEach(function(r){_le(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _le(e,t,n){return t=Ole(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ole(e){var t=Tle(e,"string");return Rs(t)=="symbol"?t:t+""}function Tle(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 js(){return js=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},js.apply(this,arguments)}function aR(e,t){if(e==null)return{};var n=Ele(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 Ele(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 kle=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 V.createElement("rect",{x:i,y:l,ry:f,width:c,height:d,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function n8(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(ke(e))n=e(t);else{var r=t.x1,i=t.y1,l=t.x2,c=t.y2,d=t.key,f=aR(t,Nle),h=we(f,!1);h.offset;var p=aR(h,Ale);n=V.createElement("line",js({},p,{x1:r,y1:i,x2:l,y2:c,fill:"none",key:d}))}return n}function Cle(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=yn(yn({},e),{},{x1:t,y1:d,x2:t+n,y2:d,key:"line-".concat(f),index:f});return n8(i,h)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Mle(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=yn(yn({},e),{},{x1:d,y1:t,x2:d,y2:t+n,key:"line-".concat(f),index:f});return n8(i,h)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function Ple(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 V.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 V.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},x)}function Rle(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 V.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 V.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},x)}var Dle=function(t,n){var r=t.xAxis,i=t.width,l=t.height,c=t.offset;return nL(vN(yn(yn(yn({},Ul.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.left,c.left+c.width,n)},zle=function(t,n){var r=t.yAxis,i=t.width,l=t.height,c=t.offset;return nL(vN(yn(yn(yn({},Ul.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.top,c.top+c.height,n)},Eo={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function fw(e){var t,n,r,i,l,c,d=pN(),f=xN(),h=Soe(),p=yn(yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Eo.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Eo.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Eo.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Eo.horizontalFill,vertical:(l=e.vertical)!==null&&l!==void 0?l:Eo.vertical,verticalFill:(c=e.verticalFill)!==null&&c!==void 0?c:Eo.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,A=p.verticalValues,O=boe(),_=joe();if(!he(j)||j<=0||!he(w)||w<=0||!he(x)||x!==+x||!he(y)||y!==+y)return null;var T=p.verticalCoordinatesGenerator||Dle,N=p.horizontalCoordinatesGenerator||zle,E=p.horizontalPoints,M=p.verticalPoints;if((!E||!E.length)&&ke(N)){var R=v&&v.length,B=N({yAxis:_?yn(yn({},_),{},{ticks:R?v:_.ticks}):void 0,width:d,height:f,offset:h},R?!0:S);Ur(Array.isArray(B),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(B),"]")),Array.isArray(B)&&(E=B)}if((!M||!M.length)&&ke(T)){var z=A&&A.length,D=T({xAxis:O?yn(yn({},O),{},{ticks:z?A:O.ticks}):void 0,width:d,height:f,offset:h},z?!0:S);Ur(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(D),"]")),Array.isArray(D)&&(M=D)}return V.createElement("g",{className:"recharts-cartesian-grid"},V.createElement(kle,{fill:p.fill,fillOpacity:p.fillOpacity,x:p.x,y:p.y,width:p.width,height:p.height,ry:p.ry}),V.createElement(Cle,js({},p,{offset:h,horizontalPoints:E,xAxis:O,yAxis:_})),V.createElement(Mle,js({},p,{offset:h,verticalPoints:M,xAxis:O,yAxis:_})),V.createElement(Ple,js({},p,{horizontalPoints:E})),V.createElement(Rle,js({},p,{verticalPoints:M})))}fw.displayName="CartesianGrid";var Lle=["type","layout","connectNulls","ref"],$le=["key"];function vl(e){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function iR(e,t){if(e==null)return{};var n=Ble(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 Ble(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 fu(){return fu=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},fu.apply(this,arguments)}function sR(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 Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sR(Object(n),!0).forEach(function(r){zr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ko(e){return Vle(e)||Ule(e)||qle(e)||Ile()}function Ile(){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 qle(e,t){if(e){if(typeof e=="string")return hw(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 hw(e,t)}}function Ule(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vle(e){if(Array.isArray(e))return hw(e)}function hw(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 Hle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oR(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,a8(r.key),r)}}function Fle(e,t,n){return t&&oR(e.prototype,t),n&&oR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gle(e,t,n){return t=Mm(t),Kle(e,r8()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}function Kle(e,t){if(t&&(vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yle(e)}function Yle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r8=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mm(e)}function Xle(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&&mw(e,t)}function mw(e,t){return mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mw(e,t)}function zr(e,t,n){return t=a8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a8(e){var t=Wle(e,"string");return vl(t)=="symbol"?t:t+""}function Wle(e,t){if(vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pd=(function(e){function t(){var n;Hle(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=Gle(this,t,[].concat(i)),zr(n,"state",{isAnimationFinished:!0,totalLength:0}),zr(n,"generateSimpleStrokeDasharray",function(c,d){return"".concat(d,"px ").concat(c-d,"px")}),zr(n,"getStrokeDasharray",function(c,d,f){var h=f.reduce(function(A,O){return A+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(ko(f.slice(0,w)),[x-S]);break}var v=j.length%2===0?[0,y]:[y];return[].concat(ko(t.repeat(f,p)),ko(j),v).map(function(A){return"".concat(A,"px")}).join(", ")}),zr(n,"id",Ll("recharts-line-")),zr(n,"pathRef",function(c){n.mainCurve=c}),zr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),zr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Xle(t,e),Fle(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=er(p,md);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 V.createElement(Ze,j,x.map(function(w){return V.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=we(this.props,!1),y=we(f,!0),j=h.map(function(S,v){var A=Kn(Kn(Kn({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,A)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(l,")"):null};return V.createElement(Ze,fu({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=iR(d,Lle),y=Kn(Kn(Kn({},we(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 V.createElement(dm,fu({},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,A=this.state,O=A.prevPoints,_=A.totalLength;return V.createElement(sa,{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,M=d.map(function(L,$){var F=Math.floor($*E);if(O[F]){var H=O[F],I=Wn(H.x,L.x),G=Wn(H.y,L.y);return Kn(Kn({},L),{},{x:I(N),y:G(N)})}if(w){var Z=Wn(S*2,L.x),ie=Wn(v/2,L.y);return Kn(Kn({},L),{},{x:Z(N),y:ie(N)})}return Kn(Kn({},L),{},{x:L.x,y:L.y})});return l.renderCurveStatically(M,r,i)}var R=Wn(0,_),B=R(N),z;if(f){var D="".concat(f).split(/[,\s]+/gim).map(function(L){return parseFloat(L)});z=l.getStrokeDasharray(B,_,D)}else z=l.generateSimpleStrokeDasharray(_,B);return l.renderCurveStatically(d,r,i,{strokeDasharray:z})})}},{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||!hd(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 A=this.state.isAnimationFinished,O=d.length===1,_=Le("recharts-line",f),T=h&&h.allowDataOverflow,N=p&&p.allowDataOverflow,E=T||N,M=De(v)?this.id:v,R=(r=we(c,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},B=R.r,z=B===void 0?3:B,D=R.strokeWidth,L=D===void 0?2:D,$=AK(c)?c:{},F=$.clipDot,H=F===void 0?!0:F,I=z*2+L;return V.createElement(Ze,{className:_},T||N?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(M)},V.createElement("rect",{x:T?y:y-j/2,y:N?x:x-w/2,width:T?j:j*2,height:N?w:w*2})),!H&&V.createElement("clipPath",{id:"clipPath-dots-".concat(M)},V.createElement("rect",{x:y-I/2,y:x-I/2,width:j+I,height:w+I}))):null,!O&&this.renderCurve(E,M),this.renderErrorBar(E,M),(O||c)&&this.renderDots(E,H,M),(!S||A)&&$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(ko(r),[0]):r,c=[],d=0;d<i;++d)c=[].concat(ko(c),ko(l));return c}},{key:"renderDotItem",value:function(r,i){var l;if(V.isValidElement(r))l=V.cloneElement(r,i);else if(ke(r))l=r(i);else{var c=i.key,d=iR(i,$le),f=Le("recharts-line-dot",typeof r!="boolean"?r.className:"");l=V.createElement(xp,fu({key:c},d,{className:f}))}return l}}])})(k.PureComponent);zr(pd,"displayName","Line");zr(pd,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!$s.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});zr(pd,"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:f3({axis:n,ticks:i,bandSize:d,entry:y,index:j}),y:De(w)?null:r.scale(w),value:w,payload:y}:{x:De(w)?null:n.scale(w),y:f3({axis:r,ticks:l,bandSize:d,entry:y,index:j}),value:w,payload:y}});return Kn({points:x,layout:p},h)});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 Zle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qle(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,o8(r.key),r)}}function Jle(e,t,n){return t&&Qle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ece(e,t,n){return t=Pm(t),tce(e,i8()?Reflect.construct(t,n||[],Pm(e).constructor):t.apply(e,n))}function tce(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 nce(e)}function nce(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 Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pm(e)}function rce(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 s8(e,t,n){return t=o8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o8(e){var t=ace(e,"string");return bl(t)=="symbol"?t:t+""}function ace(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 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)}function ice(e){var t=e.xAxisId,n=pN(),r=xN(),i=FL(t);return i==null?null:k.createElement(Ul,xw({},i,{className:Le("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 jl=(function(e){function t(){return Zle(this,t),ece(this,t,arguments)}return rce(t,e),Jle(t,[{key:"render",value:function(){return k.createElement(ice,this.props)}}])})(k.Component);s8(jl,"displayName","XAxis");s8(jl,"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 wl(e){"@babel/helpers - typeof";return wl=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},wl(e)}function sce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oce(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,u8(r.key),r)}}function lce(e,t,n){return t&&oce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cce(e,t,n){return t=Rm(t),uce(e,l8()?Reflect.construct(t,n||[],Rm(e).constructor):t.apply(e,n))}function uce(e,t){if(t&&(wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dce(e)}function dce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l8=function(){return!!e})()}function Rm(e){return Rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rm(e)}function fce(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&&yw(e,t)}function yw(e,t){return yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yw(e,t)}function c8(e,t,n){return t=u8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u8(e){var t=hce(e,"string");return wl(t)=="symbol"?t:t+""}function hce(e,t){if(wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function gw(){return gw=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},gw.apply(this,arguments)}var mce=function(t){var n=t.yAxisId,r=pN(),i=xN(),l=GL(n);return l==null?null:k.createElement(Ul,gw({},l,{className:Le("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)}}))},Sl=(function(e){function t(){return sce(this,t),cce(this,t,arguments)}return fce(t,e),lce(t,[{key:"render",value:function(){return k.createElement(mce,this.props)}}])})(k.Component);c8(Sl,"displayName","YAxis");c8(Sl,"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 lR(e){return gce(e)||yce(e)||xce(e)||pce()}function pce(){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 xce(e,t){if(e){if(typeof e=="string")return vw(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 vw(e,t)}}function yce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gce(e){if(Array.isArray(e))return vw(e)}function vw(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 bw=function(t,n,r,i,l){var c=er(t,gN),d=er(t,Ap),f=[].concat(lR(c),lR(d)),h=er(t,Op),p="".concat(i,"Id"),x=i[0],y=n;if(f.length&&(y=f.reduce(function(S,v){if(v.props[p]===r&&na(v.props,"extendDomain")&&he(v.props[x])){var A=v.props[x];return[Math.min(S[0],A),Math.max(S[1],A)]}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&&na(v.props,"extendDomain")&&he(v.props[j])&&he(v.props[w])){var A=v.props[j],O=v.props[w];return[Math.min(S[0],A,O),Math.max(S[1],A,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},m1={exports:{}},cR;function vce(){return cR||(cR=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],A=arguments.length,O,_;if(v.fn){switch(v.once&&this.removeListener(h,v.fn,void 0,!0),A){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(_=1,O=new Array(A-1);_<A;_++)O[_-1]=arguments[_];v.fn.apply(v.context,O)}else{var T=v.length,N;for(_=0;_<T;_++)switch(v[_].once&&this.removeListener(h,v[_].fn,void 0,!0),A){case 1:v[_].fn.call(v[_].context);break;case 2:v[_].fn.call(v[_].context,p);break;case 3:v[_].fn.call(v[_].context,p,x);break;case 4:v[_].fn.call(v[_].context,p,x,y);break;default:if(!O)for(N=1,O=new Array(A-1);N<A;N++)O[N-1]=arguments[N];v[_].fn.apply(v[_].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=[],A=w.length;S<A;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})(m1)),m1.exports}var bce=vce();const jce=it(bce);var p1=new jce,x1="recharts.syncMouseEvents";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 wce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sce(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,d8(r.key),r)}}function Nce(e,t,n){return t&&Sce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y1(e,t,n){return t=d8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d8(e){var t=Ace(e,"string");return Qu(t)=="symbol"?t:t+""}function Ace(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 String(e)}var _ce=(function(){function e(){wce(this,e),y1(this,"activeIndex",0),y1(this,"coordinateList",[]),y1(this,"layout","horizontal")}return Nce(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 Oce(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 Tce(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 f8(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 Ece(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 f8(t);return[{x:r,y:i},{x:l,y:c}]}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 uR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ih(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uR(Object(n),!0).forEach(function(r){kce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kce(e,t,n){return t=Cce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cce(e){var t=Mce(e,"string");return Ju(t)=="symbol"?t:t+""}function Mce(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(t==="string"?String:Number)(e)}function Pce(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=dm;if(y==="ScatterChart")w=c,S=tie;else if(y==="BarChart")w=Tce(x,c,f,p),S=dN;else if(x==="radial"){var v=f8(c),A=v.cx,O=v.cy,_=v.radius,T=v.startAngle,N=v.endAngle;w={cx:A,cy:O,startAngle:T,endAngle:N,innerRadius:_,outerRadius:_},S=hL}else w={points:Ece(x,c,f)},S=dm;var E=ih(ih(ih(ih({stroke:"#ccc",pointerEvents:"none"},f),w),we(j,!1)),{},{payload:d,payloadIndex:h,className:Le("recharts-tooltip-cursor",j.className)});return k.isValidElement(j)?k.cloneElement(j,E):k.createElement(S,E)}var Rce=["item"],Dce=["children","className","width","height","style","compact","title","desc"];function Nl(e){"@babel/helpers - typeof";return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bo.apply(this,arguments)}function dR(e,t){return $ce(e)||Lce(e,t)||m8(e,t)||zce()}function zce(){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 Lce(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 $ce(e){if(Array.isArray(e))return e}function fR(e,t){if(e==null)return{};var n=Bce(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 Bce(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 Ice(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qce(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,p8(r.key),r)}}function Uce(e,t,n){return t&&qce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vce(e,t,n){return t=Dm(t),Hce(e,h8()?Reflect.construct(t,n||[],Dm(e).constructor):t.apply(e,n))}function Hce(e,t){if(t&&(Nl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fce(e)}function Fce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h8=function(){return!!e})()}function Dm(e){return Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dm(e)}function Gce(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&&jw(e,t)}function jw(e,t){return jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jw(e,t)}function Al(e){return Xce(e)||Yce(e)||m8(e)||Kce()}function Kce(){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 m8(e,t){if(e){if(typeof e=="string")return ww(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 ww(e,t)}}function Yce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xce(e){if(Array.isArray(e))return ww(e)}function ww(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hR(Object(n),!0).forEach(function(r){Ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ae(e,t,n){return t=p8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p8(e){var t=Wce(e,"string");return Nl(t)=="symbol"?t:t+""}function Wce(e,t){if(Nl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zce={xAxis:["bottom","top"],yAxis:["left","right"]},Qce={width:"100%",height:"100%"},x8={x:0,y:0};function sh(e){return e}var Jce=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},eue=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 x8},Tp=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(Al(d),Al(h)):d},[]);return c.length>0?c:t&&t.length&&he(i)&&he(l)?t.slice(i,l+1):[]};function y8(e){return e==="number"?[0,"auto"]:void 0}var Sw=function(t,n,r,i){var l=t.graphicalItems,c=t.tooltipAxis,d=Tp(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=zh(j,c.dataKey,i)}else y=x&&x[r]||d[r];return y?[].concat(Al(f),[oL(h,y)]):f},[])},mR=function(t,n,r,i){var l=i||{x:t.chartX,y:t.chartY},c=Jce(l,r),d=t.orderedTooltipTicks,f=t.tooltipAxis,h=t.tooltipTicks,p=wte(c,d,h,f);if(p>=0&&h){var x=h[p]&&h[p].value,y=Sw(t,n,p,x),j=eue(r,d,p,l);return{activeTooltipIndex:p,activeLabel:x,activePayload:y,activeCoordinate:j}}return null},tue=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=tL(p,l);return r.reduce(function(w,S){var v,A=S.type.defaultProps!==void 0?re(re({},S.type.defaultProps),S.props):S.props,O=A.type,_=A.dataKey,T=A.allowDataOverflow,N=A.allowDuplicatedCategory,E=A.scale,M=A.ticks,R=A.includeHidden,B=A[c];if(w[B])return w;var z=Tp(t.data,{graphicalItems:i.filter(function(Y){var ae,fe=c in Y.props?Y.props[c]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[c];return fe===B}),dataStartIndex:f,dataEndIndex:h}),D=z.length,L,$,F;Oce(A.domain,T,O)&&(L=zj(A.domain,null,T),j&&(O==="number"||E!=="auto")&&(F=lu(z,_,"category")));var H=y8(O);if(!L||L.length===0){var I,G=(I=A.domain)!==null&&I!==void 0?I:H;if(_){if(L=lu(z,_,O),O==="category"&&j){var Z=pK(L);N&&Z?($=L,L=wm(0,D)):N||(L=x3(G,L,S).reduce(function(Y,ae){return Y.indexOf(ae)>=0?Y:[].concat(Al(Y),[ae])},[]))}else if(O==="category")N?L=L.filter(function(Y){return Y!==""&&!De(Y)}):L=x3(G,L,S).reduce(function(Y,ae){return Y.indexOf(ae)>=0||ae===""||De(ae)?Y:[].concat(Al(Y),[ae])},[]);else if(O==="number"){var ie=Ote(z,i.filter(function(Y){var ae,fe,ye=c in Y.props?Y.props[c]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[c],Se="hide"in Y.props?Y.props.hide:(fe=Y.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return ye===B&&(R||!Se)}),_,l,p);ie&&(L=ie)}j&&(O==="number"||E!=="auto")&&(F=lu(z,_,"category"))}else j?L=wm(0,D):d&&d[B]&&d[B].hasStack&&O==="number"?L=y==="expand"?[0,1]:sL(d[B].stackGroups,f,h):L=eL(z,i.filter(function(Y){var ae=c in Y.props?Y.props[c]:Y.type.defaultProps[c],fe="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return ae===B&&(R||!fe)}),O,p,!0);if(O==="number")L=bw(x,L,B,l,M),G&&(L=zj(G,L,T));else if(O==="category"&&G){var ce=G,q=L.every(function(Y){return ce.indexOf(Y)>=0});q&&(L=ce)}}return re(re({},w),{},Ae({},B,re(re({},A),{},{axisType:l,domain:L,categoricalDomain:F,duplicateDomain:$,originalDomain:(v=A.domain)!==null&&v!==void 0?v:H,isCategorical:j,layout:p})))},{})},nue=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=Tp(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:h}),j=y.length,w=tL(p,l),S=-1;return r.reduce(function(v,A){var O=A.type.defaultProps!==void 0?re(re({},A.type.defaultProps),A.props):A.props,_=O[c],T=y8("number");if(!v[_]){S++;var N;return w?N=wm(0,j):d&&d[_]&&d[_].hasStack?(N=sL(d[_].stackGroups,f,h),N=bw(x,N,_,l)):(N=zj(T,eL(y,r.filter(function(E){var M,R,B=c in E.props?E.props[c]:(M=E.type.defaultProps)===null||M===void 0?void 0:M[c],z="hide"in E.props?E.props.hide:(R=E.type.defaultProps)===null||R===void 0?void 0:R.hide;return B===_&&!z}),"number",p),i.defaultProps.allowDataOverflow),N=bw(x,N,_,l)),re(re({},v),{},Ae({},_,re(re({axisType:l},i.defaultProps),{},{hide:!0,orientation:Jn(Zce,"".concat(l,".").concat(S%2),null),domain:N,originalDomain:T,isCategorical:w,layout:p})))}return v},{})},rue=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=er(p,l),j={};return y&&y.length?j=tue(t,{axes:y,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h}):c&&c.length&&(j=nue(t,{Axis:l,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h})),j},aue=function(t){var n=Ai(t),r=Ra(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:$S(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:lm(n,r)}},pR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Xn(n,hl),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}},iue=function(t){return!t||!t.length?!1:t.some(function(n){var r=za(n&&n.type);return r&&r.indexOf("Bar")>=0})},xR=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"}},sue=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=Xn(x,hl),w=Xn(x,Fo),S=Object.keys(f).reduce(function(N,E){var M=f[E],R=M.orientation;return!M.mirror&&!M.hide?re(re({},N),{},Ae({},R,N[R]+M.width)):N},{left:y.left||0,right:y.right||0}),v=Object.keys(c).reduce(function(N,E){var M=c[E],R=M.orientation;return!M.mirror&&!M.hide?re(re({},N),{},Ae({},R,Jn(N,"".concat(R))+M.height)):N},{top:y.top||0,bottom:y.bottom||0}),A=re(re({},v),S),O=A.bottom;j&&(A.bottom+=j.props.height||hl.defaultProps.height),w&&n&&(A=Ate(A,i,r,n));var _=h-A.left-A.right,T=p-A.top-A.bottom;return re(re({brushBottom:O},A),{},{width:Math.max(_,0),height:Math.max(T,0)})},oue=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},jN=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(A,O){var _=O.graphicalItems,T=O.stackGroups,N=O.offset,E=O.updateId,M=O.dataStartIndex,R=O.dataEndIndex,B=A.barSize,z=A.layout,D=A.barGap,L=A.barCategoryGap,$=A.maxBarSize,F=xR(z),H=F.numericAxisName,I=F.cateAxisName,G=iue(_),Z=[];return _.forEach(function(ie,ce){var q=Tp(A.data,{graphicalItems:[ie],dataStartIndex:M,dataEndIndex:R}),Y=ie.type.defaultProps!==void 0?re(re({},ie.type.defaultProps),ie.props):ie.props,ae=Y.dataKey,fe=Y.maxBarSize,ye=Y["".concat(H,"Id")],Se=Y["".concat(I,"Id")],qe={},et=f.reduce(function(Tr,ca){var Vl=O["".concat(ca.axisType,"Map")],mn=Y["".concat(ca.axisType,"Id")];Vl&&Vl[mn]||ca.axisType==="zAxis"||Ps();var xd=Vl[mn];return re(re({},Tr),{},Ae(Ae({},ca.axisType,xd),"".concat(ca.axisType,"Ticks"),Ra(xd)))},qe),de=et[I],Te=et["".concat(I,"Ticks")],Pe=T&&T[ye]&&T[ye].hasStack&&zte(ie,T[ye].stackGroups),ue=za(ie.type).indexOf("Bar")>=0,gt=lm(de,Te),$e=[],Tt=G&&Ste({barSize:B,stackGroups:T,totalSize:oue(et,I)});if(ue){var Et,hn,Or=De(fe)?$:fe,Fr=(Et=(hn=lm(de,Te,!0))!==null&&hn!==void 0?hn:Or)!==null&&Et!==void 0?Et:0;$e=Nte({barGap:D,barCategoryGap:L,bandSize:Fr!==gt?Fr:gt,sizeList:Tt[Se],maxBarSize:Or}),Fr!==gt&&($e=$e.map(function(Tr){return re(re({},Tr),{},{position:re(re({},Tr.position),{},{offset:Tr.position.offset-Fr/2})})}))}var Xa=ie&&ie.type&&ie.type.getComposedData;Xa&&Z.push({props:re(re({},Xa(re(re({},et),{},{displayedData:q,props:A,dataKey:ae,item:ie,bandSize:gt,barPosition:$e,offset:N,stackedData:Pe,layout:z,dataStartIndex:M,dataEndIndex:R}))),{},Ae(Ae(Ae({key:ie.key||"item-".concat(ce)},H,et[H]),I,et[I]),"animationId",E)),childIndex:TK(ie,A.children),item:ie})}),Z},j=function(A,O){var _=A.props,T=A.dataStartIndex,N=A.dataEndIndex,E=A.updateId;if(!kk({props:_}))return null;var M=_.children,R=_.layout,B=_.stackOffset,z=_.data,D=_.reverseStackOrder,L=xR(R),$=L.numericAxisName,F=L.cateAxisName,H=er(M,r),I=Rte(z,H,"".concat($,"Id"),"".concat(F,"Id"),B,D),G=f.reduce(function(Y,ae){var fe="".concat(ae.axisType,"Map");return re(re({},Y),{},Ae({},fe,rue(_,re(re({},ae),{},{graphicalItems:H,stackGroups:ae.axisType===$&&I,dataStartIndex:T,dataEndIndex:N}))))},{}),Z=sue(re(re({},G),{},{props:_,graphicalItems:H}),O==null?void 0:O.legendBBox);Object.keys(G).forEach(function(Y){G[Y]=p(_,G[Y],Z,Y.replace("Map",""),n)});var ie=G["".concat(F,"Map")],ce=aue(ie),q=y(_,re(re({},G),{},{dataStartIndex:T,dataEndIndex:N,updateId:E,graphicalItems:H,stackGroups:I,offset:Z}));return re(re({formattedGraphicalItems:q,graphicalItems:H,offset:Z,stackGroups:I},ce),G)},w=(function(v){function A(O){var _,T,N;return Ice(this,A),N=Vce(this,A,[O]),Ae(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ae(N,"accessibilityManager",new _ce),Ae(N,"handleLegendBBoxUpdate",function(E){if(E){var M=N.state,R=M.dataStartIndex,B=M.dataEndIndex,z=M.updateId;N.setState(re({legendBBox:E},j({props:N.props,dataStartIndex:R,dataEndIndex:B,updateId:z},re(re({},N.state),{},{legendBBox:E}))))}}),Ae(N,"handleReceiveSyncEvent",function(E,M,R){if(N.props.syncId===E){if(R===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(M)}}),Ae(N,"handleBrushChange",function(E){var M=E.startIndex,R=E.endIndex;if(M!==N.state.dataStartIndex||R!==N.state.dataEndIndex){var B=N.state.updateId;N.setState(function(){return re({dataStartIndex:M,dataEndIndex:R},j({props:N.props,dataStartIndex:M,dataEndIndex:R,updateId:B},N.state))}),N.triggerSyncEvent({dataStartIndex:M,dataEndIndex:R})}}),Ae(N,"handleMouseEnter",function(E){var M=N.getMouseInfo(E);if(M){var R=re(re({},M),{},{isTooltipActive:!0});N.setState(R),N.triggerSyncEvent(R);var B=N.props.onMouseEnter;ke(B)&&B(R,E)}}),Ae(N,"triggeredAfterMouseMove",function(E){var M=N.getMouseInfo(E),R=M?re(re({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(R),N.triggerSyncEvent(R);var B=N.props.onMouseMove;ke(B)&&B(R,E)}),Ae(N,"handleItemMouseEnter",function(E){N.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Ae(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),Ae(N,"handleMouseMove",function(E){E.persist(),N.throttleTriggeredAfterMouseMove(E)}),Ae(N,"handleMouseLeave",function(E){N.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};N.setState(M),N.triggerSyncEvent(M);var R=N.props.onMouseLeave;ke(R)&&R(M,E)}),Ae(N,"handleOuterEvent",function(E){var M=OK(E),R=Jn(N.props,"".concat(M));if(M&&ke(R)){var B,z;/.*touch.*/i.test(M)?z=N.getMouseInfo(E.changedTouches[0]):z=N.getMouseInfo(E),R((B=z)!==null&&B!==void 0?B:{},E)}}),Ae(N,"handleClick",function(E){var M=N.getMouseInfo(E);if(M){var R=re(re({},M),{},{isTooltipActive:!0});N.setState(R),N.triggerSyncEvent(R);var B=N.props.onClick;ke(B)&&B(R,E)}}),Ae(N,"handleMouseDown",function(E){var M=N.props.onMouseDown;if(ke(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ae(N,"handleMouseUp",function(E){var M=N.props.onMouseUp;if(ke(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ae(N,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Ae(N,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseDown(E.changedTouches[0])}),Ae(N,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseUp(E.changedTouches[0])}),Ae(N,"handleDoubleClick",function(E){var M=N.props.onDoubleClick;if(ke(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ae(N,"handleContextMenu",function(E){var M=N.props.onContextMenu;if(ke(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ae(N,"triggerSyncEvent",function(E){N.props.syncId!==void 0&&p1.emit(x1,N.props.syncId,E,N.eventEmitterSymbol)}),Ae(N,"applySyncEvent",function(E){var M=N.props,R=M.layout,B=M.syncMethod,z=N.state.updateId,D=E.dataStartIndex,L=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)N.setState(re({dataStartIndex:D,dataEndIndex:L},j({props:N.props,dataStartIndex:D,dataEndIndex:L,updateId:z},N.state)));else if(E.activeTooltipIndex!==void 0){var $=E.chartX,F=E.chartY,H=E.activeTooltipIndex,I=N.state,G=I.offset,Z=I.tooltipTicks;if(!G)return;if(typeof B=="function")H=B(Z,E);else if(B==="value"){H=-1;for(var ie=0;ie<Z.length;ie++)if(Z[ie].value===E.activeLabel){H=ie;break}}var ce=re(re({},G),{},{x:G.left,y:G.top}),q=Math.min($,ce.x+ce.width),Y=Math.min(F,ce.y+ce.height),ae=Z[H]&&Z[H].value,fe=Sw(N.state,N.props.data,H),ye=Z[H]?{x:R==="horizontal"?Z[H].coordinate:q,y:R==="horizontal"?Y:Z[H].coordinate}:x8;N.setState(re(re({},E),{},{activeLabel:ae,activeCoordinate:ye,activePayload:fe,activeTooltipIndex:H}))}else N.setState(E)}),Ae(N,"renderCursor",function(E){var M,R=N.state,B=R.isTooltipActive,z=R.activeCoordinate,D=R.activePayload,L=R.offset,$=R.activeTooltipIndex,F=R.tooltipAxisBandSize,H=N.getTooltipEventType(),I=(M=E.props.active)!==null&&M!==void 0?M:B,G=N.props.layout,Z=E.key||"_recharts-cursor";return V.createElement(Pce,{key:Z,activeCoordinate:z,activePayload:D,activeTooltipIndex:$,chartName:n,element:E,isActive:I,layout:G,offset:L,tooltipAxisBandSize:F,tooltipEventType:H})}),Ae(N,"renderPolarAxis",function(E,M,R){var B=Jn(E,"type.axisType"),z=Jn(N.state,"".concat(B,"Map")),D=E.type.defaultProps,L=D!==void 0?re(re({},D),E.props):E.props,$=z&&z[L["".concat(B,"Id")]];return k.cloneElement(E,re(re({},$),{},{className:Le(B,$.className),key:E.key||"".concat(M,"-").concat(R),ticks:Ra($,!0)}))}),Ae(N,"renderPolarGrid",function(E){var M=E.props,R=M.radialLines,B=M.polarAngles,z=M.polarRadius,D=N.state,L=D.radiusAxisMap,$=D.angleAxisMap,F=Ai(L),H=Ai($),I=H.cx,G=H.cy,Z=H.innerRadius,ie=H.outerRadius;return k.cloneElement(E,{polarAngles:Array.isArray(B)?B:Ra(H,!0).map(function(ce){return ce.coordinate}),polarRadius:Array.isArray(z)?z:Ra(F,!0).map(function(ce){return ce.coordinate}),cx:I,cy:G,innerRadius:Z,outerRadius:ie,key:E.key||"polar-grid",radialLines:R})}),Ae(N,"renderLegend",function(){var E=N.state.formattedGraphicalItems,M=N.props,R=M.children,B=M.width,z=M.height,D=N.props.margin||{},L=B-(D.left||0)-(D.right||0),$=Qz({children:R,formattedGraphicalItems:E,legendWidth:L,legendContent:h});if(!$)return null;var F=$.item,H=fR($,Rce);return k.cloneElement(F,re(re({},H),{},{chartWidth:B,chartHeight:z,margin:D,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),Ae(N,"renderTooltip",function(){var E,M=N.props,R=M.children,B=M.accessibilityLayer,z=Xn(R,xr);if(!z)return null;var D=N.state,L=D.isTooltipActive,$=D.activeCoordinate,F=D.activePayload,H=D.activeLabel,I=D.offset,G=(E=z.props.active)!==null&&E!==void 0?E:L;return k.cloneElement(z,{viewBox:re(re({},I),{},{x:I.left,y:I.top}),active:G,label:H,payload:G?F:[],coordinate:$,accessibilityLayer:B})}),Ae(N,"renderBrush",function(E){var M=N.props,R=M.margin,B=M.data,z=N.state,D=z.offset,L=z.dataStartIndex,$=z.dataEndIndex,F=z.updateId;return k.cloneElement(E,{key:E.key||"_recharts-brush",onChange:th(N.handleBrushChange,E.props.onChange),data:B,x:he(E.props.x)?E.props.x:D.left,y:he(E.props.y)?E.props.y:D.top+D.height+D.brushBottom-(R.bottom||0),width:he(E.props.width)?E.props.width:D.width,startIndex:L,endIndex:$,updateId:"brush-".concat(F)})}),Ae(N,"renderReferenceElement",function(E,M,R){if(!E)return null;var B=N,z=B.clipPathId,D=N.state,L=D.xAxisMap,$=D.yAxisMap,F=D.offset,H=E.type.defaultProps||{},I=E.props,G=I.xAxisId,Z=G===void 0?H.xAxisId:G,ie=I.yAxisId,ce=ie===void 0?H.yAxisId:ie;return k.cloneElement(E,{key:E.key||"".concat(M,"-").concat(R),xAxis:L[Z],yAxis:$[ce],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:z})}),Ae(N,"renderActivePoints",function(E){var M=E.item,R=E.activePoint,B=E.basePoint,z=E.childIndex,D=E.isRange,L=[],$=M.props.key,F=M.item.type.defaultProps!==void 0?re(re({},M.item.type.defaultProps),M.item.props):M.item.props,H=F.activeDot,I=F.dataKey,G=re(re({index:z,dataKey:I,cx:R.x,cy:R.y,r:4,fill:uN(M.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},we(H,!1)),Lh(H));return L.push(A.renderActiveDot(H,G,"".concat($,"-activePoint-").concat(z))),B?L.push(A.renderActiveDot(H,re(re({},G),{},{cx:B.x,cy:B.y}),"".concat($,"-basePoint-").concat(z))):D&&L.push(null),L}),Ae(N,"renderGraphicChild",function(E,M,R){var B=N.filterFormatItem(E,M,R);if(!B)return null;var z=N.getTooltipEventType(),D=N.state,L=D.isTooltipActive,$=D.tooltipAxis,F=D.activeTooltipIndex,H=D.activeLabel,I=N.props.children,G=Xn(I,xr),Z=B.props,ie=Z.points,ce=Z.isRange,q=Z.baseLine,Y=B.item.type.defaultProps!==void 0?re(re({},B.item.type.defaultProps),B.item.props):B.item.props,ae=Y.activeDot,fe=Y.hide,ye=Y.activeBar,Se=Y.activeShape,qe=!!(!fe&&L&&G&&(ae||ye||Se)),et={};z!=="axis"&&G&&G.props.trigger==="click"?et={onClick:th(N.handleItemMouseEnter,E.props.onClick)}:z!=="axis"&&(et={onMouseLeave:th(N.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:th(N.handleItemMouseEnter,E.props.onMouseEnter)});var de=k.cloneElement(E,re(re({},B.props),et));function Te(ca){return typeof $.dataKey=="function"?$.dataKey(ca.payload):null}if(qe)if(F>=0){var Pe,ue;if($.dataKey&&!$.allowDuplicatedCategory){var gt=typeof $.dataKey=="function"?Te:"payload.".concat($.dataKey.toString());Pe=zh(ie,gt,H),ue=ce&&q&&zh(q,gt,H)}else Pe=ie==null?void 0:ie[F],ue=ce&&q&&q[F];if(Se||ye){var $e=E.props.activeIndex!==void 0?E.props.activeIndex:F;return[k.cloneElement(E,re(re(re({},B.props),et),{},{activeIndex:$e})),null,null]}if(!De(Pe))return[de].concat(Al(N.renderActivePoints({item:B,activePoint:Pe,basePoint:ue,childIndex:F,isRange:ce})))}else{var Tt,Et=(Tt=N.getItemByXY(N.state.activeCoordinate))!==null&&Tt!==void 0?Tt:{graphicalItem:de},hn=Et.graphicalItem,Or=hn.item,Fr=Or===void 0?E:Or,Xa=hn.childIndex,Tr=re(re(re({},B.props),et),{},{activeIndex:Xa});return[k.cloneElement(Fr,Tr),null,null]}return ce?[de,null,null]:[de,null]}),Ae(N,"renderCustomized",function(E,M,R){return k.cloneElement(E,re(re({key:"recharts-customized-".concat(R)},N.props),N.state))}),Ae(N,"renderMap",{CartesianGrid:{handler:sh,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:sh},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:sh},YAxis:{handler:sh},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((_=O.id)!==null&&_!==void 0?_:Ll("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=Q6(N.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),N.state={},N}return Gce(A,v),Uce(A,[{key:"componentDidMount",value:function(){var _,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_: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 _=this.props,T=_.children,N=_.data,E=_.height,M=_.layout,R=Xn(T,xr);if(R){var B=R.props.defaultIndex;if(!(typeof B!="number"||B<0||B>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[B]&&this.state.tooltipTicks[B].value,D=Sw(this.state,N,B,z),L=this.state.tooltipTicks[B].coordinate,$=(this.state.offset.top+E)/2,F=M==="horizontal",H=F?{x:L,y:$}:{y:L,x:$},I=this.state.formattedGraphicalItems.find(function(Z){var ie=Z.item;return ie.type.name==="Scatter"});I&&(H=re(re({},H),I.props.points[B].tooltipPosition),D=I.props.points[B].tooltipPayload);var G={activeTooltipIndex:B,isTooltipActive:!0,activeLabel:z,activePayload:D,activeCoordinate:H};this.setState(G),this.renderCursor(R),this.accessibilityManager.setIndex(B)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.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(_){rj([Xn(_.children,xr)],[Xn(this.props.children,xr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Xn(this.props.children,xr);if(_&&typeof _.props.shared=="boolean"){var T=_.props.shared?"axis":"item";return d.indexOf(T)>=0?T:l}return l}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var T=this.container,N=T.getBoundingClientRect(),E=mZ(N),M={chartX:Math.round(_.pageX-E.left),chartY:Math.round(_.pageY-E.top)},R=N.width/T.offsetWidth||1,B=this.inRange(M.chartX,M.chartY,R);if(!B)return null;var z=this.state,D=z.xAxisMap,L=z.yAxisMap,$=this.getTooltipEventType(),F=mR(this.state,this.props.data,this.props.layout,B);if($!=="axis"&&D&&L){var H=Ai(D).scale,I=Ai(L).scale,G=H&&H.invert?H.invert(M.chartX):null,Z=I&&I.invert?I.invert(M.chartY):null;return re(re({},M),{},{xValue:G,yValue:Z},F)}return F?re(re({},M),F):null}},{key:"inRange",value:function(_,T){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,M=_/N,R=T/N;if(E==="horizontal"||E==="vertical"){var B=this.state.offset,z=M>=B.left&&M<=B.left+B.width&&R>=B.top&&R<=B.top+B.height;return z?{x:M,y:R}:null}var D=this.state,L=D.angleAxisMap,$=D.radiusAxisMap;if(L&&$){var F=Ai(L);return v3({x:M,y:R},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,T=this.getTooltipEventType(),N=Xn(_,xr),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 M=Lh(this.props,this.handleOuterEvent);return re(re({},M),E)}},{key:"addListener",value:function(){p1.on(x1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){p1.removeListener(x1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,T,N){for(var E=this.state.formattedGraphicalItems,M=0,R=E.length;M<R;M++){var B=E[M];if(B.item===_||B.props.key===_.key||T===za(B.item.type)&&N===B.childIndex)return B}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,T=this.state.offset,N=T.left,E=T.top,M=T.height,R=T.width;return V.createElement("defs",null,V.createElement("clipPath",{id:_},V.createElement("rect",{x:N,y:E,height:M,width:R})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(T,N){var E=dR(N,2),M=E[0],R=E[1];return re(re({},T),{},Ae({},M,R.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(T,N){var E=dR(N,2),M=E[0],R=E[1];return re(re({},T),{},Ae({},M,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[_])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(_){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[_])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(_){var T=this.state,N=T.formattedGraphicalItems,E=T.activeItem;if(N&&N.length)for(var M=0,R=N.length;M<R;M++){var B=N[M],z=B.props,D=B.item,L=D.type.defaultProps!==void 0?re(re({},D.type.defaultProps),D.props):D.props,$=za(D.type);if($==="Bar"){var F=(z.data||[]).find(function(Z){return Dae(_,Z)});if(F)return{graphicalItem:B,payload:F}}else if($==="RadialBar"){var H=(z.data||[]).find(function(Z){return v3(_,Z)});if(H)return{graphicalItem:B,payload:H}}else if(jp(B,E)||wp(B,E)||Ku(B,E)){var I=ase({graphicalItem:B,activeTooltipItem:E,itemData:L.data}),G=L.activeIndex===void 0?I:L.activeIndex;return{graphicalItem:re(re({},B),{},{childIndex:G}),payload:Ku(B,E)?L.data[I]:B.props.data[I]}}}return null}},{key:"render",value:function(){var _=this;if(!kk(this))return null;var T=this.props,N=T.children,E=T.className,M=T.width,R=T.height,B=T.style,z=T.compact,D=T.title,L=T.desc,$=fR(T,Dce),F=we($,!1);if(z)return V.createElement(G4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement(ij,Bo({},F,{width:M,height:R,title:D,desc:L}),this.renderClipPath(),Mk(N,this.renderMap)));if(this.props.accessibilityLayer){var H,I;F.tabIndex=(H=this.props.tabIndex)!==null&&H!==void 0?H:0,F.role=(I=this.props.role)!==null&&I!==void 0?I:"application",F.onKeyDown=function(Z){_.accessibilityManager.keyboardEvent(Z)},F.onFocus=function(){_.accessibilityManager.focus()}}var G=this.parseEventsOfWrapper();return V.createElement(G4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement("div",Bo({className:Le("recharts-wrapper",E),style:re({position:"relative",cursor:"default",width:M,height:R},B)},G,{ref:function(ie){_.container=ie}}),V.createElement(ij,Bo({},F,{width:M,height:R,title:D,desc:L,style:Qce}),this.renderClipPath(),Mk(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(k.Component);Ae(w,"displayName",n),Ae(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)),Ae(w,"getDerivedStateFromProps",function(v,A){var O=v.dataKey,_=v.data,T=v.children,N=v.width,E=v.height,M=v.layout,R=v.stackOffset,B=v.margin,z=A.dataStartIndex,D=A.dataEndIndex;if(A.updateId===void 0){var L=pR(v);return re(re(re({},L),{},{updateId:0},j(re(re({props:v},L),{},{updateId:0}),A)),{},{prevDataKey:O,prevData:_,prevWidth:N,prevHeight:E,prevLayout:M,prevStackOffset:R,prevMargin:B,prevChildren:T})}if(O!==A.prevDataKey||_!==A.prevData||N!==A.prevWidth||E!==A.prevHeight||M!==A.prevLayout||R!==A.prevStackOffset||!Ho(B,A.prevMargin)){var $=pR(v),F={chartX:A.chartX,chartY:A.chartY,isTooltipActive:A.isTooltipActive},H=re(re({},mR(A,_,M)),{},{updateId:A.updateId+1}),I=re(re(re({},$),F),H);return re(re(re({},I),j(re({props:v},I),A)),{},{prevDataKey:O,prevData:_,prevWidth:N,prevHeight:E,prevLayout:M,prevStackOffset:R,prevMargin:B,prevChildren:T})}if(!rj(T,A.prevChildren)){var G,Z,ie,ce,q=Xn(T,hl),Y=q&&(G=(Z=q.props)===null||Z===void 0?void 0:Z.startIndex)!==null&&G!==void 0?G:z,ae=q&&(ie=(ce=q.props)===null||ce===void 0?void 0:ce.endIndex)!==null&&ie!==void 0?ie:D,fe=Y!==z||ae!==D,ye=!De(_),Se=ye&&!fe?A.updateId:A.updateId+1;return re(re({updateId:Se},j(re(re({props:v},A),{},{updateId:Se,dataStartIndex:Y,dataEndIndex:ae}),A)),{},{prevChildren:T,dataStartIndex:Y,dataEndIndex:ae})}return null}),Ae(w,"renderActiveDot",function(v,A,O){var _;return k.isValidElement(v)?_=k.cloneElement(v,A):ke(v)?_=v(A):_=V.createElement(xp,A),V.createElement(Ze,{className:"recharts-active-dot",key:O},_)});var S=k.forwardRef(function(A,O){return V.createElement(w,Bo({},A,{ref:O}))});return S.displayName=w.displayName,S},lue=jN({chartName:"LineChart",GraphicalChild:pd,axisComponents:[{axisType:"xAxis",AxisComp:jl},{axisType:"yAxis",AxisComp:Sl}],formatAxisMap:LL}),cue=jN({chartName:"BarChart",GraphicalChild:zi,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:jl},{axisType:"yAxis",AxisComp:Sl}],formatAxisMap:LL}),uue=jN({chartName:"PieChart",GraphicalChild:Ya,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:bp},{axisType:"radiusAxis",AxisComp:gp}],formatAxisMap:Gte,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const due=["Deals","Products","MRR","ARR"];function fue(){const[e,t]=k.useState("Deals"),[n,r]=k.useState(""),[i,l]=k.useState(!0),[c,d]=k.useState(""),[f,h]=k.useState([]),[p,x]=k.useState([]),[y,j]=k.useState([]),[w,S]=k.useState([]),[v,A]=k.useState(0);k.useEffect(()=>{async function N(){l(!0),d("");try{const[E,M,R,B]=await Promise.all([Hf.deals(),Hf.products(),Hf.mrr(),Hf.arr()]);h(E.deals||[]),x(M.products||[]),A(R.mrr||0),j([]);const D=B;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),_=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(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"})]}),s.jsx(Oe,{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(Me,{icon:s.jsx(_n,{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(fS,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee(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(aa,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee(_)}),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(iF,{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:due.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(zs,{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(Me,{variant:"secondary",size:"sm",icon:s.jsx(Pl,{size:14}),children:"Filter"})]})]}),e==="Deals"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(_e,{children:"Deal"}),s.jsx(_e,{children:"Company"}),s.jsx(_e,{align:"right",children:"Value"}),s.jsx(_e,{children:"Stage"}),s.jsx(_e,{align:"right",children:"Probability"}),s.jsx(_e,{children:"Owner"}),s.jsx(_e,{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:Ee(N.value)}),s.jsx(be,{children:s.jsx(je,{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(_e,{children:"Product"}),s.jsx(_e,{children:"SKU"}),s.jsx(_e,{align:"right",children:"Price"}),s.jsx(_e,{children:"Type"}),s.jsx(_e,{children:"Status"}),s.jsx(_e,{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:Ee(N.price)}),s.jsx(be,{children:s.jsx(je,{variant:N.recurring?"primary":"default",children:N.recurring?"Recurring":"One-time"})}),s.jsx(be,{children:s.jsx(je,{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(Ke,{title:"Monthly Recurring Revenue",subtitle:`Current MRR: ${Ee(v)}`}),y.length>0?s.jsx("div",{className:"h-[320px]",children:s.jsx(vj,{width:"100%",height:"100%",children:s.jsxs(cue,{data:y,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(fw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(jl,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(Sl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(xr,{content:({active:N,payload:E,label:M})=>!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:M}),E.map((R,B)=>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:Ee(Number(R.value))})]},B))]})}),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(Ke,{title:"Annual Recurring Revenue",subtitle:"ARR growth by quarter"}),w.length>0?s.jsx("div",{className:"h-[320px]",children:s.jsx(vj,{width:"100%",height:"100%",children:s.jsxs(lue,{data:w,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(fw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(jl,{dataKey:"quarter",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(Sl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(xr,{content:({active:N,payload:E,label:M})=>!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:M}),s.jsx("p",{className:"text-sm font-semibold text-text-primary",children:Ee(Number(E[0].value))})]})}),s.jsx(pd,{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 hue=["Balance","Income","MOMS","Accounts","Invoices","Cashflow"],yR=["#2563EB","#16A34A","#D97706","#DC2626","#9CA3AF"];function mue(){var R,B;const e=On(),[t,n]=k.useState(()=>{var z;return((z=e.state)==null?void 0:z.activeTab)||"Balance"}),[r,i]=k.useState(""),[l,c]=k.useState(!0),[d,f]=k.useState(""),[h,p]=k.useState(null),[x,y]=k.useState(null),[j,w]=k.useState(null),[S,v]=k.useState([]),[A,O]=k.useState([]),[_,T]=k.useState(null);k.useEffect(()=>{async function z(){var D,L;c(!0),f("");try{const[$,F,H,I,G,Z]=await Promise.all([fs.balance(),fs.income(),fs.moms(),fs.accounts(),fs.invoices(),fs.cashflow()]);p($.report||$),y(F.report||F),w(H.report||H),v(((D=I.report)==null?void 0:D.accounts)||I.accounts||[]),O(((L=G.report)==null?void 0:L.invoices)||G.invoices||[]),T(Z.report||Z)}catch($){f($ instanceof Error?$.message:"Failed to load finance data")}finally{c(!1)}}z()},[]);const N=S.filter(z=>z.name.toLowerCase().includes(r.toLowerCase())||z.id.toLowerCase().includes(r.toLowerCase())),E=A.filter(z=>z.customer.toLowerCase().includes(r.toLowerCase())||z.id.toLowerCase().includes(r.toLowerCase())),M=(x==null?void 0:x.expenses.map((z,D)=>({name:z.name||z.account,value:z.amount??z.balance??0,color:yR[D%yR.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(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"})]}),s.jsx(Oe,{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(Me,{icon:s.jsx(_n,{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(qo,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee((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(aa,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee((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(F5,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee((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:hue.map(z=>s.jsx("button",{onClick:()=>n(z),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${t===z?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:z},z))}),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(zs,{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:z=>i(z.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(Me,{variant:"secondary",size:"sm",icon:s.jsx(Pl,{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(Y1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee((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($H,{size:14,className:"text-danger"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee((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(Y1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee((h==null?void 0:h.total_equity)||0)})]})]}),s.jsxs(te,{children:[s.jsx(Ke,{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((z,D)=>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:z.name||z.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ee(z.amount??z.balance??0)})]},D)),(!(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((z,D)=>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:z.name||z.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ee(z.amount??z.balance??0)})]},D)),(!(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((z,D)=>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:z.name||z.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ee(z.amount??z.balance??0)})]},D)),(!(h!=null&&h.equity)||((B=h.equity)==null?void 0:B.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(Ke,{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:Ee((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:Ee((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:Ee((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((z,D)=>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:z.name||z.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ee(z.amount??z.balance??0)})]},D))]}),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((z,D)=>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:z.name||z.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Ee(z.amount??z.balance??0)})]},D))]})]})]}),s.jsxs(te,{children:[s.jsx(Ke,{title:"Expense Breakdown",subtitle:"By category"}),M.length>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-[220px]",children:s.jsx(vj,{width:"100%",height:"100%",children:s.jsxs(uue,{children:[s.jsx(Ya,{data:M,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:4,dataKey:"value",children:M.map((z,D)=>s.jsx(ap,{fill:z.color},`cell-${D}`))}),s.jsx(xr,{content:({active:z,payload:D})=>{if(!z||!(D!=null&&D.length))return null;const L=D[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:L.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:Ee(L.value)})]})}})]})})}),s.jsx("div",{className:"space-y-2 mt-2",children:M.map(z=>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:z.color}}),s.jsx("span",{className:"text-text-secondary",children:z.name})]}),s.jsx("span",{className:"font-medium text-text-primary",children:Ee(z.value)})]},z.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(Ke,{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:Ee((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:Ee((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:Ee((j==null?void 0:j.moms_att_betala)||0)})]})]})]}),t==="Accounts"&&s.jsxs(te,{children:[s.jsx(Ke,{title:"Chart of Accounts",subtitle:"General ledger accounts"}),s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(_e,{children:"Account"}),s.jsx(_e,{children:"Number"}),s.jsx(_e,{children:"Type"}),s.jsx(_e,{align:"right",children:"Balance"}),s.jsx(_e,{align:"right"})]})}),s.jsxs(Di,{children:[N.map(z=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:z.name})}),s.jsx(be,{children:s.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:z.id})}),s.jsx(be,{children:s.jsx(je,{variant:z.type==="asset"?"success":z.type==="equity"?"primary":"warning",children:z.type})}),s.jsx(be,{align:"right",children:Ee(z.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})})})]},z.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(Ke,{title:"Invoices",subtitle:"All invoices"}),s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(_e,{children:"Number"}),s.jsx(_e,{children:"Customer"}),s.jsx(_e,{align:"right",children:"Amount"}),s.jsx(_e,{children:"Status"}),s.jsx(_e,{children:"Due Date"}),s.jsx(_e,{align:"right"})]})}),s.jsxs(Di,{children:[E.map(z=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:z.id})}),s.jsx(be,{children:z.customer}),s.jsx(be,{align:"right",children:Ee(z.amount)}),s.jsx(be,{children:s.jsx(je,{variant:z.status==="paid"?"success":z.status==="overdue"?"danger":z.status==="sent"||z.status==="pending"?"primary":"default",children:z.status})}),s.jsx(be,{children:Nt(z.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})})})]},z.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(Ke,{title:"Cash Flow",subtitle:`Period: ${(_==null?void 0:_.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:Ee((_==null?void 0:_.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:Ee((_==null?void 0:_.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:Ee((_==null?void 0:_.net)||0)})]})]})]})]})}const pue=["Employees","Leaves"],xue={Sales:"primary",Engineering:"success",Finance:"warning",HR:"primary",Legal:"default"};function yue(){const[e,t]=k.useState("Employees"),[n,r]=k.useState(""),[i,l]=k.useState(!0),[c,d]=k.useState(""),[f,h]=k.useState([]),[p,x]=k.useState([]);k.useEffect(()=>{async function O(){l(!0),d("");try{const[_,T]=await Promise.all([bE.employees(),bE.leaves()]);h(_.employees||[]),x(T.leaves||[])}catch(_){d(_ instanceof Error?_.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())),A=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(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"})]}),s.jsx(Oe,{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(Me,{icon:s.jsx(_n,{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(qr,{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(Xt,{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(Zo,{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:pue.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(zs,{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(Me,{variant:"secondary",size:"sm",icon:s.jsx(Pl,{size:14}),children:"Filter"})]})]}),e==="Employees"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(_e,{children:"Employee"}),s.jsx(_e,{children:"Department"}),s.jsx(_e,{children:"Role"}),s.jsx(_e,{children:"Status"}),s.jsx(_e,{children:"Start Date"}),s.jsx(_e,{align:"right"})]})}),s.jsxs(Di,{children:[v.map(O=>{const _=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:_.split(" ").map(E=>E[0]).join("")}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-text-primary",children:_}),s.jsx("p",{className:"text-xs text-text-secondary",children:O.email})]})]})}),s.jsx(be,{children:s.jsx(je,{variant:xue[O.department]||"default",children:O.department})}),s.jsx(be,{children:T}),s.jsx(be,{children:s.jsx(je,{variant:O.status==="active"?"success":O.status==="on_leave"?"warning":"danger",children:O.status.replace("_"," ")})}),s.jsx(be,{children:Nt(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(_e,{children:"Employee"}),s.jsx(_e,{children:"Type"}),s.jsx(_e,{children:"Period"}),s.jsx(_e,{align:"right",children:"Days"}),s.jsx(_e,{children:"Status"}),s.jsx(_e,{align:"right"})]})}),s.jsxs(Di,{children:[A.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(_=>_[0]).join("")}),s.jsx("span",{className:"font-medium text-text-primary",children:O.employeeName})]})}),s.jsx(be,{children:s.jsx(je,{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:[Nt(O.startDate)," — ",Nt(O.endDate)]})}),s.jsx(be,{align:"right",children:s.jsx("span",{className:"font-medium",children:O.days})}),s.jsx(be,{children:s.jsx(je,{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)),A.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 g1={draft:{variant:"default",icon:Xt},pending_signature:{variant:"warning",icon:Xt},active:{variant:"success",icon:Dn},expired:{variant:"danger",icon:fn},terminated:{variant:"default",icon:fn},disputed:{variant:"danger",icon:fn}},gR={pending:"warning",partially_signed:"primary",signed:"success",rejected:"danger"};function gue(){var L;const[e,t]=k.useState("contracts"),[n,r]=k.useState(""),[i,l]=k.useState(!0),[c,d]=k.useState(""),[f,h]=k.useState([]),[p,x]=k.useState([]),[y,j]=k.useState(null),[w,S]=k.useState(!1),[v,A]=k.useState(!1),[O,_]=k.useState(!1),{token:T}=tr(),[N,E]=k.useState({template_type:"",title:"",counterparty:"",counterparty_org:"",counterparty_email:"",start_date:"",end_date:"",value:"",currency:"SEK",variables:{},terms:{}}),M=async()=>{l(!0),d("");try{const $={};T&&($.Authorization=`Bearer ${T}`);const[F,H]=await Promise.all([fetch("/api/v1/legal/contracts",{headers:$}),fetch("/api/v1/legal/templates",{headers:$})]),I=await F.json(),G=await H.json();h(I.contracts||[]),x(G.templates||[])}catch($){d($ instanceof Error?$.message:"Failed to load legal data")}finally{l(!1)}};k.useEffect(()=>{M()},[T]);const R=async($,F)=>{try{const H={"Content-Type":"application/json"};if(T&&(H.Authorization=`Bearer ${T}`),(await fetch(`/api/v1/legal/contracts/${$}/sign`,{method:"POST",headers:H,body:JSON.stringify({party:F})})).ok&&(M(),(y==null?void 0:y.id)===$)){const G=await fetch(`/api/v1/legal/contracts/${$}`,{headers:H}).then(Z=>Z.json());j(G)}}catch(H){console.error("Sign failed:",H)}},B=async()=>{if(!(!N.title||!N.counterparty||!N.template_type)){_(!0);try{const $={"Content-Type":"application/json"};T&&($.Authorization=`Bearer ${T}`);const F={...N,value:N.value?parseFloat(N.value):0},H=await fetch("/api/v1/legal/contracts",{method:"POST",headers:$,body:JSON.stringify(F)});if(!H.ok)throw new Error(`Failed: ${H.status}`);A(!1),E({template_type:"",title:"",counterparty:"",counterparty_org:"",counterparty_email:"",start_date:"",end_date:"",value:"",currency:"SEK",variables:{},terms:{}}),M()}catch($){d($ instanceof Error?$.message:"Failed to create")}finally{_(!1)}}},z=f.filter($=>($.title||$.name||"").toLowerCase().includes(n.toLowerCase())||$.counterparty.toLowerCase().includes(n.toLowerCase())||$.template_type.toLowerCase().includes(n.toLowerCase())),D=($,F)=>{if(!F)return $;let H=$;return Object.entries(F).forEach(([I,G])=>{H=H.replace(new RegExp(`\\{\\{${I}\\}\\}`,"g"),`<strong>${G}</strong>`),H=H.replace(new RegExp(`\\$\\{${I}\\}`,"g"),`<strong>${G}</strong>`)}),H=H.replace(/\{\{(\w+)\}\}/g,'<span class="text-warning bg-warning/10 px-1 rounded">{{$1}}</span>'),H};return i?s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-5",children:Array.from({length:4}).map(($,F)=>s.jsx(Oe,{className:"h-[80px]"},F))}),s.jsx(Oe,{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:"Legal"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Avtal, mallar och produktkopplingar"})]}),s.jsx(Me,{icon:s.jsx(_n,{size:16}),onClick:()=>A(!0),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(Sr,{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(Dn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter($=>$.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(Xt,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter($=>$.signature_status==="pending").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(fn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter($=>$.status==="expired"||$.status==="terminated").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Utgångna"})]})]})})]}),s.jsxs("div",{className:"relative",children:[s.jsx(zs,{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, motpart eller typ...",value:n,onChange:$=>r($.target.value),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]}),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:"Status"}),s.jsx("th",{className:"text-left text-xs font-medium text-text-secondary uppercase tracking-wider px-4 py-3",children:"Signering"}),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:[z.map($=>{const F=g1[$.status]||g1.draft,H=F.icon;return s.jsxs("tr",{className:"hover:bg-bg transition-colors cursor-pointer",onClick:()=>{j($),S(!0)},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(Sr,{size:14})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:$.title||$.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:$.template_type})]})]})}),s.jsxs("td",{className:"px-4 py-3",children:[s.jsx("p",{className:"text-sm text-text-primary",children:$.counterparty}),$.counterparty_org&&s.jsx("p",{className:"text-xs text-text-secondary",children:$.counterparty_org})]}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs(je,{variant:F.variant,className:"text-xs flex items-center gap-1",children:[s.jsx(H,{size:12}),$.status]})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(je,{variant:gR[$.signature_status||"pending"],className:"text-xs",children:$.signature_status||"pending"})}),s.jsx("td",{className:"px-4 py-3",children:$.value?s.jsxs("p",{className:"text-sm font-medium",children:[Ee($.value)," ",$.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:[$.start_date?Nt($.start_date):"—",$.end_date&&` → ${Nt($.end_date)}`]})}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsx(Io,{size:16,className:"text-text-tertiary inline"})})]},$.id)}),z.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"text-center text-text-secondary py-8",children:"Inga avtal hittades"})})]})]})})}),w&&y&&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-4xl max-h-[90vh] overflow-y-auto bg-surface rounded-2xl shadow-xl",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold",children:y.title||y.name}),s.jsxs("p",{className:"text-text-secondary",children:[y.counterparty," ",y.counterparty_org&&`• ${y.counterparty_org}`]})]}),s.jsx("button",{onClick:()=>S(!1),className:"p-2 hover:bg-bg rounded-lg",children:s.jsx(Nr,{size:18})})]}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx(je,{variant:((L=g1[y.status])==null?void 0:L.variant)||"default",children:y.status}),s.jsxs(je,{variant:gR[y.signature_status||"pending"],children:["Signering: ",y.signature_status||"pending"]}),y.value&&y.currency&&s.jsxs(je,{variant:"default",children:[s.jsx(fS,{size:12,className:"mr-1"}),Ee(y.value)," ",y.currency]})]}),y.signature_status!=="signed"&&s.jsxs("div",{className:"flex gap-3 p-4 bg-bg rounded-xl",children:[s.jsxs(Me,{variant:"secondary",onClick:()=>R(y.id,"tenant"),disabled:y.signature_status==="partially_signed",children:[s.jsx(lE,{size:16,className:"mr-2"}),"Signera som LandveX"]}),s.jsxs(Me,{variant:"secondary",onClick:()=>R(y.id,"counterparty"),children:[s.jsx(lE,{size:16,className:"mr-2"}),"Signera som ",y.counterparty]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(Ia,{size:14}),s.jsx("span",{className:"text-xs",children:"Motpart"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.counterparty})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(Zo,{size:14}),s.jsx("span",{className:"text-xs",children:"Startdatum"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.start_date?Nt(y.start_date):"—"})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(Zo,{size:14}),s.jsx("span",{className:"text-xs",children:"Slutdatum"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.end_date?Nt(y.end_date):"—"})]}),s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 text-text-secondary mb-1",children:[s.jsx(An,{size:14}),s.jsx("span",{className:"text-xs",children:"E-post"})]}),s.jsx("p",{className:"font-medium text-sm",children:y.counterparty_org||"—"})]})]}),y.variables&&Object.keys(y.variables).length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Avtalsvariabler"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(y.variables).map(([$,F])=>s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary uppercase",children:$.replace(/_/g," ")}),s.jsx("p",{className:"font-medium text-sm mt-0.5",children:F})]},$))})]}),y.sections&&y.sections.length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Avtalssektioner"}),s.jsx("div",{className:"space-y-3",children:y.sections.map(($,F)=>s.jsxs("div",{className:"p-4 bg-bg rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsxs("span",{className:"text-xs text-text-tertiary",children:[$.order,"."]}),s.jsx("p",{className:"font-medium text-sm",children:$.title}),$.required&&s.jsx(je,{variant:"danger",className:"text-xs",children:"Krävs"})]}),s.jsx("div",{className:"text-sm text-text-secondary",dangerouslySetInnerHTML:{__html:D($.content,y.variables||{})}}),$.variables&&$.variables.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:$.variables.map(H=>s.jsx("code",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded",children:"{{"+H+"}}"},H))})]},$.id||F))})]}),y.terms&&Object.keys(y.terms).length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Villkor"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(y.terms).map(([$,F])=>s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary uppercase",children:$.replace(/_/g," ")}),s.jsx("p",{className:"font-medium text-sm mt-0.5",children:String(F)})]},$))})]})]})]})}),v&&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 max-h-[90vh] overflow-y-auto",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:"Nytt avtal"}),s.jsx("button",{onClick:()=>A(!1),className:"p-2 hover:bg-bg rounded-lg",children:s.jsx(Nr,{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:"Mall"}),s.jsxs("select",{value:N.template_type,onChange:$=>E({...N,template_type:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"",children:"Välj mall..."}),p.map($=>s.jsx("option",{value:$.type,children:$.name},$.id))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Titel"}),s.jsx("input",{type:"text",value:N.title,onChange:$=>E({...N,title:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"t.ex. Anställningsavtal - CTO"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Motpart"}),s.jsx("input",{type:"text",value:N.counterparty,onChange:$=>E({...N,counterparty:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Företag eller person"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Organisation"}),s.jsx("input",{type:"text",value:N.counterparty_org,onChange:$=>E({...N,counterparty_org:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Org-namn"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Startdatum"}),s.jsx("input",{type:"date",value:N.start_date,onChange:$=>E({...N,start_date:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Slutdatum"}),s.jsx("input",{type:"date",value:N.end_date,onChange:$=>E({...N,end_date:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Värde"}),s.jsx("input",{type:"number",value:N.value,onChange:$=>E({...N,value:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"0"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Valuta"}),s.jsxs("select",{value:N.currency,onChange:$=>E({...N,currency:$.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"SEK",children:"SEK"}),s.jsx("option",{value:"EUR",children:"EUR"}),s.jsx("option",{value:"USD",children:"USD"}),s.jsx("option",{value:"NOK",children:"NOK"})]})]})]})]}),s.jsxs("div",{className:"flex gap-3 p-4 border-t border-border",children:[s.jsx(Me,{className:"flex-1",onClick:B,disabled:O||!N.title||!N.counterparty||!N.template_type,children:O?"Skapar...":"Skapa avtal"}),s.jsx(Me,{variant:"secondary",onClick:()=>A(!1),children:"Avbryt"})]})]})})]})}const vue=[{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:[]}],g8=[{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:{}}],bue=[{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}],Ep={instagram:z5,facebook:D5,linkedin:L5,newsletter:An,website:gn,google_business:W1,youtube:hF,tiktok:G5,email:An},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"},wN={planned:Xt,brief_created:Xt,in_production:Xt,generated:Dn,review_required:Ir,approved:Dn,scheduled:Xt,publishing:Q1,published:Dn,verified:Dn,failed:Ir,paused:Z1,cancelled:Ir};function jue(){const[e,t]=k.useState(new Date),[n,r]=k.useState("month"),[i,l]=k.useState(null),[c,d]=k.useState("all"),[f,h]=k.useState("all"),x=g8.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(M5,{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(Io,{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(_n,{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(Pl,{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(wue,{date:e,activities:x,onSelect:l}),n==="week"&&s.jsx(Sue,{date:e,activities:x,onSelect:l}),n==="day"&&s.jsx(Nue,{date:e,activities:x,onSelect:l}),n==="year"&&s.jsx(Aue,{year:e.getFullYear(),activities:x,onSelect:l}),n==="quarter"&&s.jsx(_ue,{date:e,activities:x,onSelect:l})]}),s.jsx(Qr,{children:i&&s.jsx(Oue,{activity:i,onClose:()=>l(null)})})]})}function wue({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=Ep[h.channel],x=wN[h.status];return s.jsxs(Ge.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 Sue({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=Ep[f.channel];return s.jsxs(Ge.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 Nue({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=Ep[d.channel],h=wN[d.status];return s.jsxs(Ge.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 Aue({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(Ge.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 _ue({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(Ge.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 Oue({activity:e,onClose:t}){const n=Ep[e.channel],r=wN[e.status];return s.jsx(Ge.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(Ge.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(gn,{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 Tue(){const[e,t]=k.useState("30d"),n=vue,r=g8,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(Ge.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(Uo,{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(Ge.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(Xt,{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(Ge.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(Dn,{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(Ge.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(Ir,{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(R5,{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(aF,{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(IH,{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(cF,{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(Ge.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(Zo,{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 Eue={campaign:sF,template:Sr,cta:_n,image_format:WH,video_format:G5,text_template:Sr};function kue(){const[e]=k.useState(bue),[t,n]=k.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(_n,{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=Eue[i.type]||C5;return s.jsxs(Ge.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(VH,{size:14})}),s.jsx("button",{className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(uF,{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 Cue(){const[e,t]=k.useState("control-tower"),n=[{id:"control-tower",label:"Control Tower",icon:mS},{id:"calendar",label:"Calendar",icon:Zo},{id:"battery",label:"Battery",icon:C5},{id:"settings",label:"Settings",icon:U5}];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(Qr,{mode:"wait",children:s.jsxs(Ge.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e==="calendar"&&s.jsx(jue,{}),e==="control-tower"&&s.jsx(Tue,{}),e==="battery"&&s.jsx(kue,{}),e==="settings"&&s.jsx(Mue,{})]},e)})})]})}function Mue(){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(Io,{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(Io,{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(Io,{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"})})]})]})]})]})]})}const Pue={urgent:"danger",high:"warning",medium:"default",low:"success"},Rue={open:"warning",in_progress:"primary",resolved:"success",closed:"default"};function Due(){const[e,t]=k.useState([]),[n,r]=k.useState(null),[i,l]=k.useState(!0),[c,d]=k.useState(""),[f,h]=k.useState(""),[p,x]=k.useState("all"),[y,j]=k.useState(!1),[w,S]=k.useState(!1),{token:v}=tr(),[A,O]=k.useState({subject:"",description:"",customer_name:"",customer_email:"",priority:"medium",category:"general"}),_=async()=>{l(!0),d("");try{const E=new URLSearchParams;p!=="all"&&E.append("status",p),f&&E.append("search",f);const M=await fetch(`/api/tickets?${E}`);if(!M.ok)throw new Error(`Failed to fetch: ${M.status}`);const R=await M.json();t(R);const B=await fetch("/api/tickets/stats");B.ok&&r(await B.json())}catch(E){d(E instanceof Error?E.message:"Failed to load tickets")}finally{l(!1)}};k.useEffect(()=>{_()},[p]);const T=async()=>{if(!(!A.subject||!A.description)){S(!0);try{const E=await fetch("/api/tickets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(!E.ok)throw new Error(`Failed: ${E.status}`);j(!1),O({subject:"",description:"",customer_name:"",customer_email:"",priority:"medium",category:"general"}),_()}catch(E){d(E instanceof Error?E.message:"Failed to create")}finally{S(!1)}}},N=async(E,M)=>{try{(await fetch(`/api/tickets/${E}/status`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:M})})).ok&&_()}catch(R){console.error("Failed to update status:",R)}};return i&&e.length===0?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Oe,{className:"h-12"}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:Array.from({length:4}).map((E,M)=>s.jsx(Oe,{className:"h-[80px]"},M))}),s.jsx(Oe,{className:"h-[400px]"})]}):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:"Support"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:"Hantera supportärenden och tickets"})]}),s.jsx(Me,{icon:s.jsx(_n,{size:16}),onClick:()=>j(!0),children:"Nytt ärende"})]}),n&&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/10 text-primary flex items-center justify-center",children:s.jsx(Ns,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:n.total}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Totalt"})]})]})}),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(Ir,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:n.open}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Öppna"})]})]})}),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(Xt,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:n.in_progress}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Pågående"})]})]})}),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(Dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:n.resolved}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Lösta"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(zs,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Sök ärenden...",value:f,onChange:E=>h(E.target.value),onKeyDown:E=>E.key==="Enter"&&_(),className:"w-full h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Pl,{size:16,className:"text-text-secondary"}),s.jsxs("select",{value:p,onChange:E=>x(E.target.value),className:"h-10 px-3 rounded-[14px] border bg-surface text-sm",children:[s.jsx("option",{value:"all",children:"Alla statusar"}),s.jsx("option",{value:"open",children:"Öppna"}),s.jsx("option",{value:"in_progress",children:"Pågående"}),s.jsx("option",{value:"resolved",children:"Lösta"}),s.jsx("option",{value:"closed",children:"Stängda"})]})]})]}),s.jsxs(te,{children:[s.jsx(Ke,{title:"Ärenden",subtitle:`${e.length} tickets`}),s.jsx("div",{className:"space-y-2",children:e.length===0?s.jsxs("div",{className:"text-center py-12 text-text-secondary",children:[s.jsx(Ns,{size:48,className:"mx-auto mb-4 text-text-tertiary"}),s.jsx("p",{children:"Inga ärenden hittades"})]}):e.map(E=>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 ${E.priority==="urgent"?"bg-danger/10 text-danger":E.priority==="high"?"bg-warning/10 text-warning":"bg-primary/10 text-primary"}`,children:s.jsx(Ns,{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:E.number}),s.jsx(je,{variant:Pue[E.priority],size:"sm",children:E.priority}),s.jsx(je,{variant:Rue[E.status],size:"sm",children:E.status})]}),s.jsx("p",{className:"text-sm text-text-primary mt-0.5",children:E.subject}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[E.customer_name," • ",E.category]})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs text-text-tertiary",children:new Date(E.created_at).toLocaleDateString("sv-SE")}),E.status==="open"&&s.jsx(Me,{variant:"secondary",size:"sm",onClick:()=>N(E.id,"in_progress"),children:"Starta"}),E.status==="in_progress"&&s.jsx(Me,{variant:"success",size:"sm",onClick:()=>N(E.id,"resolved"),children:"Lös"})]})]},E.id))})]}),y&&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:"Nytt supportärende"}),s.jsx("button",{onClick:()=>j(!1),className:"p-2 hover:bg-bg rounded-lg",children:s.jsx(Nr,{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:"Ämne"}),s.jsx("input",{type:"text",value:A.subject,onChange:E=>O({...A,subject:E.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Vad gäller ärendet?"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Beskrivning"}),s.jsx("textarea",{value:A.description,onChange:E=>O({...A,description:E.target.value}),className:"w-full h-24 px-3 py-2 rounded-lg border bg-bg text-sm resize-none",placeholder:"Beskriv problemet..."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Kundnamn"}),s.jsx("input",{type:"text",value:A.customer_name,onChange:E=>O({...A,customer_name:E.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"E-post"}),s.jsx("input",{type:"email",value:A.customer_email,onChange:E=>O({...A,customer_email:E.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Prioritet"}),s.jsxs("select",{value:A.priority,onChange:E=>O({...A,priority:E.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"low",children:"Låg"}),s.jsx("option",{value:"medium",children:"Medium"}),s.jsx("option",{value:"high",children:"Hög"}),s.jsx("option",{value:"urgent",children:"Akut"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Kategori"}),s.jsxs("select",{value:A.category,onChange:E=>O({...A,category:E.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"general",children:"Allmänt"}),s.jsx("option",{value:"technical",children:"Tekniskt"}),s.jsx("option",{value:"billing",children:"Fakturering"}),s.jsx("option",{value:"infrastructure",children:"Infrastruktur"})]})]})]})]}),s.jsxs("div",{className:"flex gap-3 p-4 border-t border-border",children:[s.jsx(Me,{className:"flex-1",onClick:T,disabled:w||!A.subject||!A.description,children:w?"Skapar...":"Skapa ärende"}),s.jsx(Me,{variant:"secondary",onClick:()=>j(!1),children:"Avbryt"})]})]})})]})}const zue={send_email:s.jsx(An,{size:12}),slack_message:s.jsx(gh,{size:12}),create_task:s.jsx(Sr,{size:12}),add_to_crm:s.jsx(dE,{size:12}),update_hr:s.jsx(dE,{size:12})},Lue={send_email:"Send Email",slack_message:"Slack Message",create_task:"Create Task",add_to_crm:"Add to CRM",update_hr:"Update HR"};function $ue(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 Bue(e){return Array.isArray(e)?e.map(t=>{if(typeof t=="object"&&t!==null){const n=t.type;return Lue[n]||n}return String(t)}):[]}function Iue(){const[e,t]=k.useState([]),[n,r]=k.useState(!0),[i,l]=k.useState(""),[c,d]=k.useState(!1),[f,h]=k.useState(!1),{token:p}=tr(),[x,y]=k.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 A={};p&&(A.Authorization=`Bearer ${p}`);const O=await fetch("/api/v1/automation/workflows",{headers:A});if(!O.ok)throw new Error(`Failed to fetch workflows: ${O.status}`);const _=await O.json();t(_.workflows||[])}catch(A){l(A instanceof Error?A.message:"Failed to load workflows")}finally{r(!1)}};k.useEffect(()=>{j()},[p]);const w=async()=>{if(!(!x.name||!x.description)){h(!0);try{const A={"Content-Type":"application/json"};p&&(A.Authorization=`Bearer ${p}`);const O=await fetch("/api/v1/automation/workflows",{method:"POST",headers:A,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(A){l(A instanceof Error?A.message:"Failed to create workflow")}finally{h(!1)}}},S=e.filter(A=>A.status==="active").length,v=e.reduce((A,O)=>A+(O.run_count||0),0);return n?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Oe,{className:"h-12"}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5",children:Array.from({length:4}).map((A,O)=>s.jsx(Oe,{className:"h-[80px]"},O))}),s.jsx(Oe,{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(Me,{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(Me,{icon:s.jsx(_n,{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(Uo,{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(Q1,{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(Z1,{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(Dn,{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(Ke,{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(Uo,{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(A=>{const O=Bue(A.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 ${A.status==="active"?"bg-success-light text-success":"bg-warning-light text-warning"}`,children:A.status==="active"?s.jsx(Q1,{size:18}):s.jsx(Z1,{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:A.name}),s.jsx(je,{variant:A.status==="active"?"success":"warning",size:"sm",children:A.status})]}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:A.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(YH,{size:12,className:"text-text-secondary/60"}),s.jsx("span",{className:"text-[11px] text-text-secondary",children:A.trigger_type})]}),O.length>0&&s.jsx("div",{className:"flex items-center gap-1",children:O.map((_,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:[zue[_]||s.jsx(Uo,{size:12}),_]},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:(A.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:$ue(A.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 ${A.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 ${A.status==="active"?"right-0.5 bg-success":"left-0.5 bg-warning"}`})})})]})]},A.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(Nr,{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:A=>y({...x,name:A.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:A=>y({...x,description:A.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:A=>y({...x,trigger_type:A.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:A=>y({...x,trigger_config:{cron:A.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(Me,{className:"flex-1",onClick:w,disabled:f||!x.name||!x.description,children:f?"Creating...":"Create Workflow"}),s.jsx(Me,{variant:"secondary",onClick:()=>d(!1),children:"Cancel"})]})]})})]})}function que(){const[e,t]=k.useState([]),[n,r]=k.useState(null),[i,l]=k.useState(!0),[c,d]=k.useState(""),[f,h]=k.useState(null);k.useEffect(()=>{p()},[]);async function p(){l(!0),d("");try{const w=await vE.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 vE.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(jr,{size:16,className:"text-success"});case"warning":return s.jsx(fn,{size:16,className:"text-warning"});case"critical":return s.jsx(Ph,{size:16,className:"text-danger"});case"maintenance":return s.jsx(Xt,{size:16,className:"text-text-secondary"});default:return s.jsx(zH,{size:16,className:"text-text-secondary"})}}if(i)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Oe,{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(Oe,{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(Dh,{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(fn,{size:48,className:"text-danger mx-auto mb-4"}),s.jsx("p",{className:"text-danger font-medium",children:c}),s.jsx(Me,{onClick:p,className:"mt-4",icon:s.jsx(Ei,{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(Me,{onClick:p,icon:s.jsx(Ei,{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(Dh,{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(jr,{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(fn,{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(Ph,{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(je,{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(je,{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(Me,{variant:"secondary",size:"sm",className:"w-full",icon:s.jsx(Ei,{size:14}),disabled:f===w.id,onClick:()=>x(w.id),children:f===w.id?"Restarting...":"Restart Engine"})})]})},w.id))})]})}function Uue(){var A,O;const[e,t]=k.useState("zoomers"),[n,r]=k.useState([]),[i,l]=k.useState([]),[c,d]=k.useState([]),[f,h]=k.useState(null),[p,x]=k.useState(!0),[y,j]=k.useState(""),w=[{key:"zoomers",label:"Zoomers",icon:qr},{key:"field-data",label:"Field Data",icon:yh},{key:"payouts",label:"Payouts",icon:qo},{key:"insights",label:"Insights",icon:rE}];k.useEffect(()=>{S()},[]);async function S(){x(!0),j("");try{const[_,T,N,E]=await Promise.all([Ff.zoomers(),Ff.fieldData(),Ff.payouts(),Ff.insights()]);r(_.zoomers||[]),l(T.fieldData||[]),d(N.payouts||[]),h(E.insights||null)}catch(_){const T=_ instanceof Error?_.message:"Failed to load data";T.includes("not configured"),j(T)}finally{x(!1)}}function v(_){switch(_){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(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[400px]"})]});if(y){const _=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:_?s.jsxs(s.Fragment,{children:[s.jsx(gn,{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(_=>s.jsxs("button",{onClick:()=>t(_.key),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap flex items-center gap-2 ${e===_.key?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:[s.jsx(_.icon,{size:16}),_.label]},_.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(qr,{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(jr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(_=>_.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(qo,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee(n.reduce((_,T)=>_+T.earnings,0))}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Earnings"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ke,{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(_=>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:_.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.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(W1,{size:14,className:"text-text-secondary"}),_.city,", ",_.country]})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(je,{variant:v(_.status),children:_.status})}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[_.completed_tasks,"/",_.total_tasks]}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[_.rating.toFixed(1)," ★"]}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm font-medium text-text-primary",children:Ee(_.earnings)})]},_.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(yh,{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(jr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.filter(_=>_.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(Xt,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:i.filter(_=>_.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(_=>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:_.type}),s.jsx("p",{className:"text-xs text-text-secondary",children:_.zoomer_name})]}),s.jsx(je,{variant:v(_.status),children:_.status})]}),s.jsxs("div",{className:"flex items-center gap-1 text-xs text-text-secondary",children:[s.jsx(W1,{size:14}),_.location.address,", ",_.location.city]}),_.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(rE,{size:14,className:"text-primary"}),s.jsxs("span",{className:"text-xs font-medium text-text-primary",children:["AI Analysis (",_.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:`${_.ai_result.confidence*100}%`}})}),s.jsxs("span",{className:"text-xs text-text-secondary",children:[(_.ai_result.confidence*100).toFixed(0),"%"]})]}),_.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:Nt(_.created_at)})]})},_.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(qo,{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(jr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(_=>_.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(aa,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Ee(c.reduce((_,T)=>_+T.amount,0))}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Amount"})]})]})})]}),s.jsxs(te,{children:[s.jsx(Ke,{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(_=>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:_.zoomer_name}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:_.period}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(je,{variant:v(_.status),children:_.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:_.method}),s.jsxs("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:[Ee(_.amount)," ",_.currency]}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm font-medium text-success",children:Ee(_.net_amount)})]},_.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(yh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:(A=f.total_observations)==null?void 0:A.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(qr,{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(gn,{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(gn,{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(Ke,{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((_,T)=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsx("span",{className:"text-text-secondary",children:_.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:`${_.score/10*100}%`}})}),s.jsx("span",{className:"text-text-primary",children:_.score})]})]},T))})]})]}),f.reality_gap_index&&s.jsxs(te,{children:[s.jsx(Ke,{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(Ke,{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(Ke,{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 Vue(){var T;const[e,t]=k.useState("entities"),[n,r]=k.useState([]),[i,l]=k.useState([]),[c,d]=k.useState([]),[f,h]=k.useState(null),[p,x]=k.useState(null),[y,j]=k.useState(!0),[w,S]=k.useState(""),v=[{key:"entities",label:"Entities",icon:Ia},{key:"ownership",label:"Ownership",icon:aa},{key:"documents",label:"Documents",icon:Sr},{key:"compliance",label:"Compliance",icon:Da}];k.useEffect(()=>{A()},[]);async function A(){j(!0),S("");try{const[N,E,M,R]=await Promise.all([Gf.entities(),Gf.documents(),Gf.compliance(),Gf.ownership()]);r(N.entities||[]),l(E.documents||[]),d(M.compliance_items||[]),h(M.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 _(N){switch(N){case"completed":return s.jsx(jr,{size:16,className:"text-success"});case"in_progress":return s.jsx(Xt,{size:16,className:"text-warning"});case"pending":return s.jsx(fn,{size:16,className:"text-danger"});default:return s.jsx(Ph,{size:16,className:"text-text-secondary"})}}return y?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{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(Ia,{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(gn,{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(qr,{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(je,{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:Nt(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(Da,{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(Ke,{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(Ke,{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(Sr,{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(je,{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:Nt(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(Da,{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(jr,{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(Xt,{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(fn,{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(Ke,{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:[_(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(je,{variant:O(N.status),children:N.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:Nt(N.due_date)}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.responsible})]},N.id))})]})})]})]})]})}function Hue(){const[e,t]=k.useState("iso"),[n,r]=k.useState([]),[i,l]=k.useState([]),[c,d]=k.useState([]),[f,h]=k.useState([]),[p,x]=k.useState([]),[y,j]=k.useState(!0),[w,S]=k.useState(""),v=[{key:"iso",label:"ISO Certifications",icon:aE},{key:"gdpr",label:"GDPR / Privacy",icon:$5},{key:"risks",label:"Risk Register",icon:fn},{key:"legal",label:"Legal Cases",icon:uE},{key:"policies",label:"Policies",icon:Mh}];k.useEffect(()=>{A()},[]);async function A(){j(!0),S("");try{const[T,N,E,M,R]=await Promise.all([Uc.iso(),Uc.gdpr(),Uc.risks(),Uc.legalCases(),Uc.policies()]);r(T.certifications||[]),l(N.records||[]),d(E.risks||[]),h(M.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 _(T){return T>=15?"text-danger":T>=10?"text-warning":"text-success"}return y?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{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(aE,{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(jr,{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(Xt,{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(fn,{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(je,{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?Nt(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?Nt(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(je,{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(je,{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(je,{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(fn,{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(aa,{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(jr,{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(Xt,{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(Ke,{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 ${_(T.score)}`,children:T.score})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(je,{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(uE,{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(fn,{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(aa,{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(je,{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: ",Nt(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(Ke,{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(Mh,{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(je,{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:Nt(T.review_date)})]},T.id))})]})})]})})]})}function Fue({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(Ei,{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(QH,{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(JH,{size:12}),"API kopplad"]})]})]})}function Gue({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(LH,{size:16}):s.jsx(Y1,{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(Sr,{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 Kue({accountId:e,accountName:t,onUpload:n}){const[r,i]=k.useState(!1),[l,c]=k.useState(null),d=k.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(Sr,{size:24,className:"text-red-600"}):s.jsx(Sr,{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(Nr,{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(J1,{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 us=[{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}],vR=[{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"}],Yue=[{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 Xue(){var E;const[e,t]=k.useState("banks"),[n,r]=k.useState([]),[i,l]=k.useState([]),[c,d]=k.useState(!0),[f,h]=k.useState(""),[p,x]=k.useState(null),[y,j]=k.useState(!1);k.useEffect(()=>{w()},[]);async function w(){d(!0),h("");try{const[M,R]=await Promise.all([oG.entries(),fs.accounts()]);r(M.entries||[]),l(R.accounts||[])}catch(M){h(M instanceof Error?M.message:"Failed to load data")}finally{d(!1)}}const S=M=>{alert(`Synkar konto ${M}... (API-koppling krävs)`)},v=M=>{alert(`Kopplar API för konto ${M}...`)},A=(M,R)=>{alert(`Laddar upp ${M.name} för konto ${R}...`)},O=M=>{alert(`Matchar transaktion ${M} med verifikat...`)};if(c)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{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 _=n.filter(M=>M.status==="posted").length;i.reduce((M,R)=>M+R.balance,0);const T=us.reduce((M,R)=>M+R.balance,0),N=[{id:"banks",label:"Bankkonton",icon:Ia},{id:"transactions",label:"Transaktioner",icon:BH},{id:"ledger",label:"Huvudbok",icon:Mh},{id:"accounts",label:"Konton",icon:jr}];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(Ia,{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:us.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(jr,{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:Ee(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(Mh,{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(jr,{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:_})]})]})})]}),s.jsx("div",{className:"border-b border-border",children:s.jsx("div",{className:"flex gap-1",children:N.map(M=>{const R=M.icon;return s.jsxs("button",{onClick:()=>t(M.id),className:`flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-t-lg transition-colors ${e===M.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}),M.label]},M.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(J1,{size:16}),"Ladda upp kontoutdrag"]})]}),y&&s.jsx(te,{className:"p-6",children:s.jsx(Kue,{accountId:p||us[0].id,accountName:((E=us.find(M=>M.id===(p||us[0].id)))==null?void 0:E.name)||"",onUpload:A})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:us.map(M=>s.jsx(Fue,{account:M,onSync:S,onConnect:v},M.id))}),s.jsxs(te,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(XH,{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:Yue.map(M=>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(J1,{size:14})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:M.fileName}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[M.periodStart," — ",M.periodEnd," • ",M.transactionCount," transaktioner"]})]})]}),s.jsx(je,{variant:M.status==="completed"?"default":"warning",children:M.status==="completed"?"Klart":"Bearbetar"})]},M.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:M=>x(M.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"}),us.map(M=>s.jsx("option",{value:M.id,children:M.name},M.id))]})})]}),s.jsx(Gue,{transactions:p?vR.filter(M=>M.accountId===p):vR,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(M=>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:M.entry_number}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-primary",children:M.description}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:Nt(M.entry_date)}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:M.period}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(je,{variant:M.status==="posted"?"default":"warning",children:M.status==="posted"?"Bokförd":"Utkast"})})]},M.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(M=>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:M.code}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-primary",children:M.name}),s.jsx("td",{className:"px-4 py-3 text-sm text-text-secondary",children:M.type}),s.jsx("td",{className:"px-4 py-3 text-sm text-right font-medium text-text-primary",children:Ee(M.balance)})]},M.code))})]})})})]})]})}function bR({isOpen:e,onClose:t,replyTo:n,onSent:r}){const[i,l]=k.useState(n?A(n.from):""),[c,d]=k.useState(n?`Re: ${n.subject.replace(/^Re: /i,"")}`:""),[f,h]=k.useState(n?`
---
${n.body.substring(0,500)}`:""),[p,x]=k.useState(!1),[y,j]=k.useState(!1),[w,S]=k.useState([]),v=k.useRef(null);if(!e)return null;function A(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"),M=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();M.ok?(l(""),d(""),h(""),S([]),r==null||r(),t()):alert(M.error||"Failed to send")}catch{alert("Failed to send email")}finally{x(!1)}}}async function _(){if(f.trim()){j(!0);try{const N=localStorage.getItem("amos_token"),M=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();M.ok&&M.improved&&h(M.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(Nr,{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(oE,{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(Me,{variant:"secondary",size:"sm",icon:s.jsx(oE,{size:16}),onClick:()=>{var N;return(N=v.current)==null?void 0:N.click()},children:"Bifoga"}),s.jsx(Me,{variant:"secondary",size:"sm",icon:y?s.jsx(Rh,{size:16,className:"animate-spin"}):s.jsx(V5,{size:16}),onClick:_,disabled:y||!f.trim(),children:"AI-hjälp"})]}),s.jsx(Me,{icon:p?s.jsx(Rh,{size:16,className:"animate-spin"}):s.jsx(gu,{size:16}),onClick:O,disabled:p||!i||!c||!f,children:p?"Skickar...":"Skicka"})]})]})})}function Wue(){const[e,t]=k.useState([]),[n,r]=k.useState(!0),[i,l]=k.useState(""),[c,d]=k.useState(null),[f,h]=k.useState(0),[p,x]=k.useState([]),[y,j]=k.useState("all"),[w,S]=k.useState(!1),[v,A]=k.useState(!1),[O,_]=k.useState(void 0),{token:T}=tr(),{user:N}=tr(),E=async()=>{try{if(!T)return;const D={Authorization:`Bearer ${T}`},L=await fetch("/api/v1/mail/mailboxes",{headers:D});if(L.ok){const $=await L.json();if($.ok&&$.mailboxes){const F=(N==null?void 0:N.email)||"",H=(N==null?void 0:N.role)||"";let I;F.includes("erik")||H==="ceo"?I=$.mailboxes.filter(G=>G.startsWith("erik@")||G==="info@landvex.com"||G==="invoice@landvex.com"||G==="hello@quixzoom.com"||G==="finance@quixzoom.com"||G==="cfo@aamos.systems"||G.startsWith("recovery@")||G.startsWith("social@")):F.includes("johan")||H==="cto"?I=$.mailboxes.filter(G=>G.startsWith("johan@")||G==="cto@aamos.systems"||G==="info@aamos.systems"||G==="dev@hypbit.com"||G.startsWith("recovery@")||G.startsWith("social@")):I=$.mailboxes,x(I)}}}catch(D){console.error("Failed to fetch mailboxes:",D)}},M=async()=>{r(!0),l("");try{if(!T){l("Please log in to access mail"),t([]),h(0);return}const D={Authorization:`Bearer ${T}`},[L,$]=await Promise.all([fetch("/api/v1/mail/inbox?limit=50",{headers:D}),fetch("/api/v1/mail/unread-count",{headers:D})]),F=await L.json();if(L.status===503){l(F.error||"Mail integration not configured"),t([]),h(0);return}if(!L.ok){if(L.status===401){l("Please log in to access mail"),t([]),h(0);return}throw new Error(F.error||"Failed to fetch inbox")}if(F.ok&&t(F.messages||[]),$.ok){const H=await $.json();H.ok&&h(H.count||0)}}catch(D){l(D instanceof Error?D.message:"Failed to load mail")}finally{r(!1)}};k.useEffect(()=>{E(),M()},[]);const R=async D=>{try{if(!T)return;const L={Authorization:`Bearer ${T}`};await fetch(`/api/v1/mail/message/${D}/read`,{method:"POST",headers:L}),t($=>$.map(F=>F.uid===D?{...F,read:!0}:F)),h($=>Math.max(0,$-1))}catch(L){console.error("Failed to mark as read:",L)}},B=D=>{d(D),D.read||R(D.uid)},z=y==="all"?e:e.filter(D=>D.to.some(L=>L.includes(y)));if(n)return s.jsxs("div",{className:"space-y-4",children:[s.jsx(Oe,{className:"h-12"}),Array.from({length:5}).map((D,L)=>s.jsx(Oe,{className:"h-20"},L))]});if(i){const D=i.includes("not configured")||i.includes("IMAP"),L=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:D?s.jsxs(s.Fragment,{children:[s.jsx(hg,{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."})]}):L?s.jsxs(s.Fragment,{children:[s.jsx(Uf,{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(Uf,{size:48,className:"mx-auto text-danger mb-4"}),s.jsx("p",{className:"text-danger mb-4",children:i}),s.jsxs("button",{onClick:M,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(Ei,{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(Me,{icon:s.jsx(oF,{size:16}),onClick:()=>{_(c),A(!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:Nt(c.date)})]}),!c.read&&s.jsx(je,{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(bR,{isOpen:v,onClose:()=>{A(!1),_(void 0)},replyTo:O?{uid:O.uid,subject:O.subject,from:O.from,body:O.body}:void 0,onSent:()=>{M()}})]}):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(Me,{icon:s.jsx(gu,{size:16}),onClick:()=>{_(void 0),A(!0)},className:"hidden sm:flex",children:"Nytt meddelande"}),s.jsx("button",{onClick:()=>{_(void 0),A(!0)},className:"sm:hidden p-3 bg-primary text-white rounded-xl hover:bg-primary-hover active:scale-95 transition-all","aria-label":"Nytt meddelande",children:s.jsx(gu,{size:20})})]}),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(An,{size:18,className:"text-text-secondary"}),s.jsx("span",{className:"font-medium",children:y==="all"?"All Mailboxes":y})]}),s.jsx(Fm,{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(Uf,{size:16}),s.jsx("span",{children:"All Mailboxes"}),s.jsx(je,{variant:"default",className:"ml-auto",children:e.length})]})}),p.map(D=>s.jsx("button",{onClick:()=>{j(D),S(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors ${y===D?"bg-accent/10 text-accent":""}`,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(An,{size:16}),s.jsx("span",{className:"text-sm",children:D})]})},D))]})]}),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(Uf,{size:18,className:"text-text-secondary"}),s.jsxs("span",{className:"text-sm text-text-secondary",children:[z.length," messages"]})]}),f>0&&s.jsxs(je,{variant:"primary",children:[f," unread"]})]}),s.jsx("button",{onClick:M,className:"p-2 hover:bg-surface rounded-lg transition-colors",title:"Refresh",children:s.jsx(Ei,{size:18,className:"text-text-secondary"})})]}),s.jsx("button",{onClick:()=>{_(void 0),A(!0)},className:"fixed bottom-6 right-6 z-50 w-14 h-14 bg-primary text-white rounded-full shadow-lg flex items-center justify-center hover:bg-primary-hover active:scale-95 transition-all lg:hidden","aria-label":"Nytt meddelande",children:s.jsx(_n,{size:24})}),s.jsx("div",{className:"space-y-2",children:z.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(hg,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("p",{className:"text-text-secondary",children:"No messages"})]}):z.map(D=>s.jsx("button",{onClick:()=>B(D),className:`w-full text-left p-4 rounded-lg border transition-colors hover:bg-surface-hover ${D.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:D.read?s.jsx(hg,{size:18,className:"text-text-tertiary"}):s.jsx(An,{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:[!D.read&&s.jsx(je,{variant:"primary",className:"shrink-0",children:"New"}),s.jsx("span",{className:`font-medium truncate ${D.read?"text-text-secondary":"text-text-primary"}`,children:D.from}),s.jsx("span",{className:"text-text-tertiary text-sm shrink-0",children:Nt(D.date)})]}),s.jsx("p",{className:`font-medium truncate ${D.read?"text-text-secondary":"text-text-primary"}`,children:D.subject}),s.jsx("p",{className:"text-sm text-text-tertiary truncate",children:D.preview}),D.attachments>0&&s.jsx("div",{className:"flex items-center gap-1 mt-1",children:s.jsxs("span",{className:"text-xs text-text-tertiary",children:[D.attachments," attachment",D.attachments>1?"s":""]})})]})]})},D.uid))}),s.jsx(bR,{isOpen:v,onClose:()=>{A(!1),_(void 0)},replyTo:O?{uid:O.uid,subject:O.subject,from:O.from,body:O.body}:void 0,onSent:()=>{M()}})]})}function Zue(){const[e,t]=k.useState({email:"erik@aamos.systems",password:"",server:"mail.aamos.systems",port:993,useTLS:!0}),[n,r]=k.useState(!1),[i,l]=k.useState(!1),[c,d]=k.useState("idle"),[f,h]=k.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(An,{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(qH,{size:20}):s.jsx(Ir,{size:20}),s.jsx("p",{children:f})]}),s.jsxs(te,{children:[s.jsx(Ke,{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(Dh,{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(Da,{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(Ke,{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(ZH,{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(Me,{onClick:x,disabled:i||!e.email||!e.password,variant:"secondary",className:"flex-1",children:i?"Testing...":"Test Connection"}),s.jsx(Me,{onClick:p,disabled:n||!e.email||!e.password,className:"flex-1",children:n?"Saving...":"Save Configuration"})]})]})}const jR={instagram:s.jsx(z5,{size:20}),twitter:s.jsx(fF,{size:20}),facebook:s.jsx(D5,{size:20}),linkedin:s.jsx(L5,{size:20}),tiktok:s.jsx(gn,{size:20})},wR={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 Que(){var j,w,S;const[e,t]=k.useState([]),[n,r]=k.useState([]),[i,l]=k.useState(null),[c,d]=k.useState(!0),[f,h]=k.useState(""),[p,x]=k.useState("accounts");k.useEffect(()=>{y()},[]);async function y(){d(!0),h("");try{const A=await(await fetch("/api/v1/social/accounts")).json();A.ok&&t(A.accounts||[]);const _=await(await fetch("/api/v1/social/stats")).json();_.ok&&l(_.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(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"}),s.jsx(Oe,{className:"h-[80px]"})]}),s.jsx(Oe,{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(Me,{icon:s.jsx(_n,{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(qr,{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(gh,{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(iE,{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(gn,{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(gn,{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(Me,{icon:s.jsx(_n,{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 ${wR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white`,children:jR[v.platform]||s.jsx(gn,{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(je,{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(Ei,{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(gh,{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 ${wR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white flex-shrink-0`,children:jR[v.platform]||s.jsx(gn,{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(iE,{size:14}),v.likes]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(gh,{size:14}),v.comments]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(xS,{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(Ei,{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 Jue(){const[e,t]=k.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]=k.useState(""),[i,l]=k.useState(!1),c=k.useRef(null),d=()=>{var p;(p=c.current)==null||p.scrollIntoView({behavior:"smooth"})};k.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(Qo,{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(Rh,{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(Me,{icon:i?s.jsx(Rh,{size:16,className:"animate-spin"}):s.jsx(gu,{size:16}),onClick:f,disabled:i||!n.trim(),children:"Skicka"})]})]})}const SR=[{id:"todo",label:"Att göra",icon:UH,color:"bg-gray-100"},{id:"in_progress",label:"Pågående",icon:Xt,color:"bg-blue-50"},{id:"review",label:"Granskning",icon:KH,color:"bg-yellow-50"},{id:"done",label:"Klart",icon:Dn,color:"bg-green-50"}],ede={low:"bg-gray-100 text-gray-700",medium:"bg-blue-100 text-blue-700",high:"bg-orange-100 text-orange-700",urgent:"bg-red-100 text-red-700"},tde={low:"Låg",medium:"Medium",high:"Hög",urgent:"Akut"};function nde(){const[e,t]=k.useState([]),[n,r]=k.useState(null),[i,l]=k.useState([]),[c,d]=k.useState(!0),[f,h]=k.useState(""),[p,x]=k.useState(!1),[y,j]=k.useState(!1),{token:w}=tr(),[S,v]=k.useState({title:"",description:"",priority:"medium",status:"todo",assignee:"",due_date:"",tags:""}),[A,O]=k.useState({name:"",description:""}),_=async()=>{d(!0);try{const D=await fetch("/api/projects");if(!D.ok)throw new Error("Failed to fetch projects");const L=await D.json();t(L),L.length>0&&!n&&(r(L[0]),T(L[0].id))}catch(D){h(D instanceof Error?D.message:"Failed to load")}finally{d(!1)}},T=async D=>{try{const L=await fetch(`/api/issues?project_id=${D}`);if(!L.ok)throw new Error("Failed to fetch tasks");const F=(await L.json()).map(H=>({id:H.id,title:H.summary||H.title||"Untitled",description:H.description||"",status:N(H.status),priority:E(H.priority),assignee:H.assignee,due_date:H.due_date,tags:H.tags||[],created_at:H.created_at}));l(F)}catch(L){console.error("Failed to fetch tasks:",L)}},N=D=>{switch(D){case"backlog":case"todo":return"todo";case"in_progress":return"in_progress";case"review":return"review";case"done":case"resolved":case"closed":return"done";default:return"todo"}},E=D=>{switch(D){case"low":return"low";case"medium":return"medium";case"high":return"high";case"urgent":case"critical":return"urgent";default:return"medium"}};k.useEffect(()=>{_()},[]);const M=async()=>{if(!(!S.title||!n))try{if(!(await fetch("/api/issues",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:S.title,description:S.description,priority:S.priority,issue_type:"task",project_id:n.id})})).ok)throw new Error("Failed to create");x(!1),v({title:"",description:"",priority:"medium",status:"todo",assignee:"",due_date:"",tags:""}),T(n.id)}catch(D){h(D instanceof Error?D.message:"Failed to create")}},R=async()=>{if(A.name)try{const D={id:`proj-${Date.now()}`,name:A.name,description:A.description,status:"active",progress:0,tasks:[],members:[],created_at:new Date().toISOString()};t([...e,D]),r(D),j(!1),O({name:"",description:""})}catch(D){h(D instanceof Error?D.message:"Failed to create")}},B=async(D,L)=>{try{(await fetch(`/api/issues/${D}/status`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:L})})).ok&&n&&T(n.id)}catch($){console.error("Failed to update:",$)}},z=D=>i.filter(L=>L.status===D);return c?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Oe,{className:"h-12"}),s.jsx("div",{className:"grid grid-cols-4 gap-4",children:Array.from({length:4}).map((D,L)=>s.jsx(Oe,{className:"h-[500px]"},L))})]}):s.jsxs("div",{className:"space-y-6",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:"Projekt"}),s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:n?n.name:"Välj ett projekt"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Me,{variant:"secondary",icon:s.jsx(_n,{size:16}),onClick:()=>j(!0),children:"Nytt projekt"}),s.jsx(Me,{icon:s.jsx(_n,{size:16}),onClick:()=>x(!0),disabled:!n,children:"Ny uppgift"})]})]}),e.length>0&&s.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:e.map(D=>s.jsx("button",{onClick:()=>{r(D),T(D.id)},className:`px-4 py-2 rounded-xl text-sm font-medium whitespace-nowrap transition-colors ${(n==null?void 0:n.id)===D.id?"bg-primary text-white":"bg-surface text-text-secondary hover:bg-bg"}`,children:D.name},D.id))}),n&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:SR.map(D=>{const L=z(D.id),$=D.icon;return s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-t-xl ${D.color}`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx($,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"font-medium text-sm",children:D.label})]}),s.jsx(je,{variant:"default",className:"text-xs",children:L.length})]}),s.jsxs("div",{className:"flex-1 bg-surface border border-t-0 rounded-b-xl p-2 space-y-2 min-h-[200px]",children:[L.map(F=>s.jsxs("div",{className:"p-3 bg-bg rounded-lg hover:shadow-md transition-shadow cursor-pointer group",onClick:()=>{},children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary flex-1",children:F.title}),s.jsx("button",{className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-surface rounded transition-opacity",children:s.jsx(qa,{size:14,className:"text-text-secondary"})})]}),F.description&&s.jsx("p",{className:"text-xs text-text-secondary mb-2 line-clamp-2",children:F.description}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(je,{variant:"default",className:`text-xs ${ede[F.priority]}`,children:tde[F.priority]}),F.assignee&&s.jsxs("div",{className:"flex items-center gap-1 text-text-tertiary",children:[s.jsx(Qo,{size:12}),s.jsx("span",{className:"text-xs",children:F.assignee})]})]}),F.due_date&&s.jsxs("div",{className:"flex items-center gap-1 mt-2 text-text-tertiary",children:[s.jsx(Zo,{size:12}),s.jsx("span",{className:"text-xs",children:new Date(F.due_date).toLocaleDateString("sv-SE")})]}),s.jsx("div",{className:"flex gap-1 mt-2 pt-2 border-t border-border",children:SR.filter(H=>H.id!==F.status).map(H=>s.jsx("button",{onClick:I=>{I.stopPropagation(),B(F.id,H.id)},className:"text-xs px-2 py-1 rounded bg-surface hover:bg-primary/10 text-text-secondary hover:text-primary transition-colors",children:H.label},H.id))})]},F.id)),L.length===0&&s.jsx("div",{className:"text-center py-8 text-text-tertiary text-sm",children:"Inga uppgifter"})]})]},D.id)})}),p&&n&&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:"Ny uppgift"}),s.jsx("button",{onClick:()=>x(!1),className:"p-2 hover:bg-bg rounded-lg",children:s.jsx(Nr,{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:"Titel"}),s.jsx("input",{type:"text",value:S.title,onChange:D=>v({...S,title:D.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Vad ska göras?"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Beskrivning"}),s.jsx("textarea",{value:S.description,onChange:D=>v({...S,description:D.target.value}),className:"w-full h-24 px-3 py-2 rounded-lg border bg-bg text-sm resize-none",placeholder:"Beskriv uppgiften..."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Prioritet"}),s.jsxs("select",{value:S.priority,onChange:D=>v({...S,priority:D.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",children:[s.jsx("option",{value:"low",children:"Låg"}),s.jsx("option",{value:"medium",children:"Medium"}),s.jsx("option",{value:"high",children:"Hög"}),s.jsx("option",{value:"urgent",children:"Akut"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Tilldelad"}),s.jsx("input",{type:"text",value:S.assignee,onChange:D=>v({...S,assignee:D.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Namn"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Förfallodatum"}),s.jsx("input",{type:"date",value:S.due_date,onChange:D=>v({...S,due_date:D.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm"})]})]}),s.jsxs("div",{className:"flex gap-3 p-4 border-t border-border",children:[s.jsx(Me,{className:"flex-1",onClick:M,disabled:!S.title,children:"Skapa uppgift"}),s.jsx(Me,{variant:"secondary",onClick:()=>x(!1),children:"Avbryt"})]})]})}),y&&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:"Nytt projekt"}),s.jsx("button",{onClick:()=>j(!1),className:"p-2 hover:bg-bg rounded-lg",children:s.jsx(Nr,{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:"Namn"}),s.jsx("input",{type:"text",value:A.name,onChange:D=>O({...A,name:D.target.value}),className:"w-full h-10 px-3 rounded-lg border bg-bg text-sm",placeholder:"Projektnamn"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-1",children:"Beskrivning"}),s.jsx("textarea",{value:A.description,onChange:D=>O({...A,description:D.target.value}),className:"w-full h-24 px-3 py-2 rounded-lg border bg-bg text-sm resize-none",placeholder:"Beskriv projektet..."})]})]}),s.jsxs("div",{className:"flex gap-3 p-4 border-t border-border",children:[s.jsx(Me,{className:"flex-1",onClick:R,disabled:!A.name,children:"Skapa projekt"}),s.jsx(Me,{variant:"secondary",onClick:()=>j(!1),children:"Avbryt"})]})]})})]})}function rde({children:e}){const{isAuthenticated:t}=tr();return t?s.jsx(s.Fragment,{children:e}):s.jsx(kw,{to:"/login",replace:!0})}function ade({children:e}){const{isAuthenticated:t}=tr();return t?s.jsx(kw,{to:"/",replace:!0}):s.jsx(s.Fragment,{children:e})}function ide(){return s.jsxs(XI,{children:[s.jsx(wt,{path:"/login",element:s.jsx(ade,{children:s.jsx(lG,{})})}),s.jsxs(wt,{element:s.jsx(rde,{children:s.jsx(aG,{})}),children:[s.jsx(wt,{path:"/",element:s.jsx(jG,{})}),s.jsx(wt,{path:"/dashboard",element:s.jsx(mG,{})}),s.jsx(wt,{path:"/crm",element:s.jsx(_G,{})}),s.jsx(wt,{path:"/sales",element:s.jsx(fue,{})}),s.jsx(wt,{path:"/finance",element:s.jsx(mue,{})}),s.jsx(wt,{path:"/hr",element:s.jsx(yue,{})}),s.jsx(wt,{path:"/legal",element:s.jsx(gue,{})}),s.jsx(wt,{path:"/marketing",element:s.jsx(Cue,{})}),s.jsx(wt,{path:"/support",element:s.jsx(Due,{})}),s.jsx(wt,{path:"/projects",element:s.jsx(nde,{})}),s.jsx(wt,{path:"/automation",element:s.jsx(Iue,{})}),s.jsx(wt,{path:"/amos",element:s.jsx(que,{})}),s.jsx(wt,{path:"/quixzoom",element:s.jsx(Uue,{})}),s.jsx(wt,{path:"/landvex",element:s.jsx(Vue,{})}),s.jsx(wt,{path:"/compliance",element:s.jsx(Hue,{})}),s.jsx(wt,{path:"/accounting",element:s.jsx(Xue,{})}),s.jsx(wt,{path:"/mail",element:s.jsx(Wue,{})}),s.jsx(wt,{path:"/mail/settings",element:s.jsx(Zue,{})}),s.jsx(wt,{path:"/social",element:s.jsx(Que,{})}),s.jsx(wt,{path:"/alva",element:s.jsx(Jue,{})}),s.jsx(wt,{path:"/profile",element:s.jsx(wG,{})})]}),s.jsx(wt,{path:"*",element:s.jsx(kw,{to:"/",replace:!0})})]})}"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()});KB.createRoot(document.getElementById("root")).render(s.jsx(k.StrictMode,{children:s.jsx(bq,{children:s.jsx(ide,{})})}));