78b57273e2
- 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
754 lines
1.1 MiB
Plaintext
754 lines
1.1 MiB
Plaintext
(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 Pf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function st(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vy={exports:{}},Mc={};/**
|
||
* @license React
|
||
* react-jsx-runtime.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var SO;function BB(){if(SO)return Mc;SO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:e,type:r,key:c,ref:i!==void 0?i:null,props:l}}return Mc.Fragment=t,Mc.jsx=n,Mc.jsxs=n,Mc}var NO;function IB(){return NO||(NO=1,Vy.exports=BB()),Vy.exports}var s=IB(),Hy={exports:{}},Me={};/**
|
||
* @license React
|
||
* react.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var AO;function qB(){if(AO)return Me;AO=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 D(q,Y){return B(q.type,Y,q.props)}function z(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function $(q){var Y={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(ae){return Y[ae]})}var L=/\/+/g;function K(q,Y){return typeof q=="object"&&q!==null&&q.key!=null?$(""+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 we=typeof q;(we==="undefined"||we==="boolean")&&(q=null);var Ie=!1;if(q===null)Ie=!0;else switch(we){case"bigint":case"string":case"number":Ie=!0;break;case"object":switch(q.$$typeof){case e:case t:Ie=!0;break;case p:return Ie=q._init,I(Ie(q._payload),Y,ae,fe,ye)}}if(Ie)return ye=ye(q),Ie=fe===""?"."+K(q,0):fe,N(ye)?(ae="",Ie!=null&&(ae=Ie.replace(L,"$&/")+"/"),I(ye,Y,ae,"",function(Oe){return Oe})):ye!=null&&(z(ye)&&(ye=D(ye,ae+(ye.key==null||q&&q.key===ye.key?"":(""+ye.key).replace(L,"$&/")+"/")+Ie)),Y.push(ye)),1;Ie=0;var et=fe===""?".":fe+":";if(N(q))for(var de=0;de<q.length;de++)fe=q[de],we=et+K(fe,de),Ie+=I(fe,Y,ae,we,ye);else if(de=j(q),typeof de=="function")for(q=de.call(q),de=0;!(fe=q.next()).done;)fe=fe.value,we=et+K(fe,de++),Ie+=I(fe,Y,ae,we,ye);else if(we==="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 Ie}function F(q,Y,ae){if(q==null)return q;var fe=[],ye=0;return I(q,fe,"","",function(we){return Y.call(ae,we,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:F,forEach:function(q,Y,ae){F(q,function(){Y.apply(this,arguments)},ae)},count:function(q){var Y=0;return F(q,function(){Y++}),Y},toArray:function(q){return F(q,function(Y){return Y})||[]},only:function(q){if(!z(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return Me.Activity=x,Me.Children=ce,Me.Component=A,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=_,Me.StrictMode=r,Me.Suspense=f,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Me.__COMPILER_RUNTIME={__proto__:null,c:function(q){return M.H.useMemoCache(q)}},Me.cache=function(q){return function(){return q.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.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(we in Y.key!==void 0&&(ye=""+Y.key),Y)!R.call(Y,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&Y.ref===void 0||(fe[we]=Y[we]);var we=arguments.length-2;if(we===1)fe.children=ae;else if(1<we){for(var Ie=Array(we),et=0;et<we;et++)Ie[et]=arguments[et+2];fe.children=Ie}return B(q.type,ye,fe)},Me.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},Me.createElement=function(q,Y,ae){var fe,ye={},we=null;if(Y!=null)for(fe in Y.key!==void 0&&(we=""+Y.key),Y)R.call(Y,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(ye[fe]=Y[fe]);var Ie=arguments.length-2;if(Ie===1)ye.children=ae;else if(1<Ie){for(var et=Array(Ie),de=0;de<Ie;de++)et[de]=arguments[de+2];ye.children=et}if(q&&q.defaultProps)for(fe in Ie=q.defaultProps,Ie)ye[fe]===void 0&&(ye[fe]=Ie[fe]);return B(q,we,ye)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(q){return{$$typeof:d,render:q}},Me.isValidElement=z,Me.lazy=function(q){return{$$typeof:p,_payload:{_status:-1,_result:q},_init:Z}},Me.memo=function(q,Y){return{$$typeof:h,type:q,compare:Y===void 0?null:Y}},Me.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(we){ie(we)}finally{Y!==null&&ae.types!==null&&(Y.types=ae.types),M.T=Y}},Me.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Me.use=function(q){return M.H.use(q)},Me.useActionState=function(q,Y,ae){return M.H.useActionState(q,Y,ae)},Me.useCallback=function(q,Y){return M.H.useCallback(q,Y)},Me.useContext=function(q){return M.H.useContext(q)},Me.useDebugValue=function(){},Me.useDeferredValue=function(q,Y){return M.H.useDeferredValue(q,Y)},Me.useEffect=function(q,Y){return M.H.useEffect(q,Y)},Me.useEffectEvent=function(q){return M.H.useEffectEvent(q)},Me.useId=function(){return M.H.useId()},Me.useImperativeHandle=function(q,Y,ae){return M.H.useImperativeHandle(q,Y,ae)},Me.useInsertionEffect=function(q,Y){return M.H.useInsertionEffect(q,Y)},Me.useLayoutEffect=function(q,Y){return M.H.useLayoutEffect(q,Y)},Me.useMemo=function(q,Y){return M.H.useMemo(q,Y)},Me.useOptimistic=function(q,Y){return M.H.useOptimistic(q,Y)},Me.useReducer=function(q,Y,ae){return M.H.useReducer(q,Y,ae)},Me.useRef=function(q){return M.H.useRef(q)},Me.useState=function(q){return M.H.useState(q)},Me.useSyncExternalStore=function(q,Y,ae){return M.H.useSyncExternalStore(q,Y,ae)},Me.useTransition=function(){return M.H.useTransition()},Me.version="19.2.7",Me}var _O;function Aw(){return _O||(_O=1,Hy.exports=qB()),Hy.exports}var k=Aw();const V=st(k);var Fy={exports:{}},Pc={},Gy={exports:{}},Ky={};/**
|
||
* @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 OO;function UB(){return OO||(OO=1,(function(e){function t(I,F){var Z=I.length;I.push(F);e:for(;0<Z;){var ie=Z-1>>>1,ce=I[ie];if(0<i(ce,F))I[ie]=F,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 F=I[0],Z=I.pop();if(Z!==F){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 F}function i(I,F){var Z=I.sortIndex-F.sortIndex;return Z!==0?Z:I.id-F.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 F=n(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=I)r(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function N(I){if(S=!1,T(I),!w)if(n(f)!==null)w=!0,E||(E=!0,$());else{var F=n(h);F!==null&&H(N,F.startTime-I)}}var E=!1,M=-1,R=5,B=-1;function D(){return v?!0:!(e.unstable_now()-B<R)}function z(){if(v=!1,E){var I=e.unstable_now();B=I;var F=!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&&D());){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),F=!0;break t}x===n(f)&&r(f),T(I)}else r(f);x=n(f)}if(x!==null)F=!0;else{var q=n(h);q!==null&&H(N,q.startTime-I),F=!1}}break e}finally{x=null,y=Z,j=!1}F=void 0}}finally{F?$():E=!1}}}var $;if(typeof _=="function")$=function(){_(z)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,K=L.port2;L.port1.onmessage=z,$=function(){K.postMessage(null)}}else $=function(){A(z,0)};function H(I,F){M=A(function(){I(e.unstable_now())},F)}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 F=3;break;default:F=y}var Z=y;y=F;try{return I()}finally{y=Z}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(I,F){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var Z=y;y=I;try{return F()}finally{y=Z}},e.unstable_scheduleCallback=function(I,F,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:F,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,$()))),I},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(I){var F=y;return function(){var Z=y;y=F;try{return I.apply(this,arguments)}finally{y=Z}}}})(Ky)),Ky}var TO;function VB(){return TO||(TO=1,Gy.exports=UB()),Gy.exports}var Yy={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 EO;function HB(){if(EO)return pn;EO=1;var e=Aw();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 CO;function FB(){if(CO)return Yy.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(),Yy.exports=HB(),Yy.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 GB(){if(kO)return Pc;kO=1;var e=VB(),t=Aw(),n=FB();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"),D=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function $(a){return a===null||typeof a!="object"?null:(a=z&&a[z]||a["@@iterator"],typeof a=="function"?a:null)}var L=Symbol.for("react.client.reference");function K(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===L?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:K(a.type)||"Memo";case R:o=a._payload,a=a._init;try{return K(a(o))}catch{}}return null}var H=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=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),we=q(null),Ie=q(null);function et(a,o){switch(ae(we,o),ae(ye,a),ae(fe,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?G_(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=G_(o),a=K_(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(we)}function Oe(a){a.memoizedState!==null&&ae(Ie,a);var o=fe.current,u=K_(o,a.type);o!==u&&(ae(ye,a),ae(fe,u))}function ke(a){ye.current===a&&(Y(fe),Y(ye)),Ie.current===a&&(Y(Ie),Tc._currentValue=Z)}var ue,gt;function Le(a){if(ue===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",gt=-1<u.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+ue+a+gt}var 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:"")?Le(u):""}function hn(a,o){switch(a.tag){case 26:case 27:case 5:return Le(a.type);case 16:return Le("Lazy");case 13:return a.child!==o&&o!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Et(a.type,!1);case 11:return Et(a.type.render,!1);case 1:return Et(a.type,!0);case 31:return Le("Activity");default:return""}}function Nr(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 Vr=Object.prototype.hasOwnProperty,Xa=e.unstable_scheduleCallback,Ar=e.unstable_cancelCallback,la=e.unstable_shouldYield,Bl=e.unstable_requestPaint,mn=e.unstable_now,md=e.unstable_getCurrentPriorityLevel,N2=e.unstable_ImmediatePriority,A2=e.unstable_UserBlockingPriority,pd=e.unstable_NormalPriority,b8=e.unstable_LowPriority,_2=e.unstable_IdlePriority,j8=e.log,w8=e.unstable_setDisableYieldValue,Il=null,zn=null;function Wa(a){if(typeof j8=="function"&&w8(a),zn&&typeof zn.setStrictMode=="function")try{zn.setStrictMode(Il,a)}catch{}}var Ln=Math.clz32?Math.clz32:A8,S8=Math.log,N8=Math.LN2;function A8(a){return a>>>=0,a===0?32:31-(S8(a)/N8|0)|0}var xd=256,yd=262144,gd=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 vd(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 ql(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function _8(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 O2(){var a=gd;return gd<<=1,(gd&62914560)===0&&(gd=4194304),a}function kp(a){for(var o=[],u=0;31>u;u++)o.push(a);return o}function Ul(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function O8(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-Ln(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&&T2(a,m,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(C&~o))}function T2(a,o,u){a.pendingLanes|=o,a.suspendedLanes&=~o;var m=31-Ln(o);a.entangledLanes|=o,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function E2(a,o){var u=a.entangledLanes|=o;for(a=a.entanglements;u;){var m=31-Ln(u),g=1<<m;g&o|a[m]&o&&(a[m]|=o),u&=~g}}function C2(a,o){var u=o&-o;return u=(u&42)!==0?1:Mp(u),(u&(a.suspendedLanes|o))!==0?0:u}function Mp(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 Pp(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function k2(){var a=F.p;return a!==0?a:(a=window.event,a===void 0?32:xO(a.type))}function M2(a,o){var u=F.p;try{return F.p=a,o()}finally{F.p=u}}var Za=Math.random().toString(36).slice(2),nn="__reactFiber$"+Za,On="__reactProps$"+Za,qs="__reactContainer$"+Za,Rp="__reactEvents$"+Za,T8="__reactListeners$"+Za,E8="__reactHandles$"+Za,P2="__reactResources$"+Za,Vl="__reactMarker$"+Za;function Dp(a){delete a[nn],delete a[On],delete a[Rp],delete a[T8],delete a[E8]}function Us(a){var o=a[nn];if(o)return o;for(var u=a.parentNode;u;){if(o=u[qs]||u[nn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(a=eO(a);a!==null;){if(u=a[nn])return u;a=eO(a)}return o}a=u,u=a.parentNode}return null}function Vs(a){if(a=a[nn]||a[qs]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function Hl(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(r(33))}function Hs(a){var o=a[P2];return o||(o=a[P2]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Zt(a){a[Vl]=!0}var R2=new Set,D2={};function Vi(a,o){Fs(a,o),Fs(a+"Capture",o)}function Fs(a,o){for(D2[a]=o,a=0;a<o.length;a++)R2.add(o[a])}var C8=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]*$"),z2={},L2={};function k8(a){return Vr.call(L2,a)?!0:Vr.call(z2,a)?!1:C8.test(a)?L2[a]=!0:(z2[a]=!0,!1)}function bd(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 jd(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 ca(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 er(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function $2(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function M8(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 zp(a){if(!a._valueTracker){var o=$2(a)?"checked":"value";a._valueTracker=M8(a,o,""+a[o])}}function B2(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var u=o.getValue(),m="";return a&&(m=$2(a)?a.checked?"true":"false":a.value),a=m,a!==u?(o.setValue(a),!0):!1}function wd(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 P8=/[\n"\\]/g;function tr(a){return a.replace(P8,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Lp(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=""+er(o)):a.value!==""+er(o)&&(a.value=""+er(o)):C!=="submit"&&C!=="reset"||a.removeAttribute("value"),o!=null?$p(a,C,er(o)):u!=null?$p(a,C,er(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=""+er(P):a.removeAttribute("name")}function I2(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)){zp(a);return}u=u!=null?""+er(u):"",o=o!=null?""+er(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),zp(a)}function $p(a,o,u){o==="number"&&wd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Gs(a,o,u,m){if(a=a.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=o.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&m&&(a[u].defaultSelected=!0)}else{for(u=""+er(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 q2(a,o,u){if(o!=null&&(o=""+er(o),o!==a.value&&(a.value=o),u==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=u!=null?""+er(u):""}function U2(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=er(o),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),zp(a)}function Ks(a,o){if(o){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=o;return}}a.textContent=o}var R8=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 V2(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||R8.has(o)?o==="float"?a.cssFloat=u:a[o]=(""+u).trim():a[o]=u+"px"}function H2(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&&V2(a,g,m)}else for(var b in o)o.hasOwnProperty(b)&&V2(a,b,o[b])}function Bp(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 D8=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"]]),z8=/^[\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 Sd(a){return z8.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ua(){}var Ip=null;function qp(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ys=null,Xs=null;function F2(a){var o=Vs(a);if(o&&(a=o.stateNode)){var u=a[On]||null;e:switch(a=o.stateNode,o.type){case"input":if(Lp(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="'+tr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var m=u[o];if(m!==a&&m.form===a.form){var g=m[On]||null;if(!g)throw Error(r(90));Lp(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&&B2(m)}break e;case"textarea":q2(a,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Gs(a,!!u.multiple,o,!1)}}}var Up=!1;function G2(a,o,u){if(Up)return a(o,u);Up=!0;try{var m=a(o);return m}finally{if(Up=!1,(Ys!==null||Xs!==null)&&(df(),Ys&&(o=Ys,a=Xs,Xs=Ys=null,F2(o),a)))for(o=0;o<a.length;o++)F2(a[o])}}function Fl(a,o){var u=a.stateNode;if(u===null)return null;var m=u[On]||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 da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vp=!1;if(da)try{var Gl={};Object.defineProperty(Gl,"passive",{get:function(){Vp=!0}}),window.addEventListener("test",Gl,Gl),window.removeEventListener("test",Gl,Gl)}catch{Vp=!1}var Qa=null,Hp=null,Nd=null;function K2(){if(Nd)return Nd;var a,o=Hp,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 Nd=g.slice(a,1<m?1-m:void 0)}function Ad(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 _d(){return!0}function Y2(){return!1}function Tn(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)?_d:Y2,this.isPropagationStopped=Y2,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=_d)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=_d)},persist:function(){},isPersistent:_d}),o}var Hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Od=Tn(Hi),Kl=x({},Hi,{view:0,detail:0}),L8=Tn(Kl),Fp,Gp,Yl,Td=x({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yp,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!==Yl&&(Yl&&a.type==="mousemove"?(Fp=a.screenX-Yl.screenX,Gp=a.screenY-Yl.screenY):Gp=Fp=0,Yl=a),Fp)},movementY:function(a){return"movementY"in a?a.movementY:Gp}}),X2=Tn(Td),$8=x({},Td,{dataTransfer:0}),B8=Tn($8),I8=x({},Kl,{relatedTarget:0}),Kp=Tn(I8),q8=x({},Hi,{animationName:0,elapsedTime:0,pseudoElement:0}),U8=Tn(q8),V8=x({},Hi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),H8=Tn(V8),F8=x({},Hi,{data:0}),W2=Tn(F8),G8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K8={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"},Y8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X8(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=Y8[a])?!!o[a]:!1}function Yp(){return X8}var W8=x({},Kl,{key:function(a){if(a.key){var o=G8[a.key]||a.key;if(o!=="Unidentified")return o}return a.type==="keypress"?(a=Ad(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?K8[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yp,charCode:function(a){return a.type==="keypress"?Ad(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Ad(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Z8=Tn(W8),Q8=x({},Td,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Z2=Tn(Q8),J8=x({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yp}),e$=Tn(J8),t$=x({},Hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),n$=Tn(t$),r$=x({},Td,{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}),a$=Tn(r$),i$=x({},Hi,{newState:0,oldState:0}),s$=Tn(i$),o$=[9,13,27,32],Xp=da&&"CompositionEvent"in window,Xl=null;da&&"documentMode"in document&&(Xl=document.documentMode);var l$=da&&"TextEvent"in window&&!Xl,Q2=da&&(!Xp||Xl&&8<Xl&&11>=Xl),J2=" ",eN=!1;function tN(a,o){switch(a){case"keyup":return o$.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nN(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ws=!1;function c$(a,o){switch(a){case"compositionend":return nN(o);case"keypress":return o.which!==32?null:(eN=!0,J2);case"textInput":return a=o.data,a===J2&&eN?null:a;default:return null}}function u$(a,o){if(Ws)return a==="compositionend"||!Xp&&tN(a,o)?(a=K2(),Nd=Hp=Qa=null,Ws=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Q2&&o.locale!=="ko"?null:o.data;default:return null}}var d$={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 rN(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!d$[a.type]:o==="textarea"}function aN(a,o,u,m){Ys?Xs?Xs.push(m):Xs=[m]:Ys=m,o=gf(o,"onChange"),0<o.length&&(u=new Od("onChange","change",null,u,m),a.push({event:u,listeners:o}))}var Wl=null,Zl=null;function f$(a){I_(a,0)}function Ed(a){var o=Hl(a);if(B2(o))return a}function iN(a,o){if(a==="change")return o}var sN=!1;if(da){var Wp;if(da){var Zp="oninput"in document;if(!Zp){var oN=document.createElement("div");oN.setAttribute("oninput","return;"),Zp=typeof oN.oninput=="function"}Wp=Zp}else Wp=!1;sN=Wp&&(!document.documentMode||9<document.documentMode)}function lN(){Wl&&(Wl.detachEvent("onpropertychange",cN),Zl=Wl=null)}function cN(a){if(a.propertyName==="value"&&Ed(Zl)){var o=[];aN(o,Zl,a,qp(a)),G2(f$,o)}}function h$(a,o,u){a==="focusin"?(lN(),Wl=o,Zl=u,Wl.attachEvent("onpropertychange",cN)):a==="focusout"&&lN()}function m$(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Ed(Zl)}function p$(a,o){if(a==="click")return Ed(o)}function x$(a,o){if(a==="input"||a==="change")return Ed(o)}function y$(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var $n=typeof Object.is=="function"?Object.is:y$;function Ql(a,o){if($n(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(!Vr.call(o,g)||!$n(a[g],o[g]))return!1}return!0}function uN(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function dN(a,o){var u=uN(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=uN(u)}}function fN(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?fN(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function hN(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=wd(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=wd(a.document)}return o}function Qp(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 g$=da&&"documentMode"in document&&11>=document.documentMode,Zs=null,Jp=null,Jl=null,ex=!1;function mN(a,o,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;ex||Zs==null||Zs!==wd(m)||(m=Zs,"selectionStart"in m&&Qp(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}),Jl&&Ql(Jl,m)||(Jl=m,m=gf(Jp,"onSelect"),0<m.length&&(o=new Od("onSelect","select",null,o,u),a.push({event:o,listeners:m}),o.target=Zs)))}function Fi(a,o){var u={};return u[a.toLowerCase()]=o.toLowerCase(),u["Webkit"+a]="webkit"+o,u["Moz"+a]="moz"+o,u}var Qs={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")},tx={},pN={};da&&(pN=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Gi(a){if(tx[a])return tx[a];if(!Qs[a])return a;var o=Qs[a],u;for(u in o)if(o.hasOwnProperty(u)&&u in pN)return tx[a]=o[u];return a}var xN=Gi("animationend"),yN=Gi("animationiteration"),gN=Gi("animationstart"),v$=Gi("transitionrun"),b$=Gi("transitionstart"),j$=Gi("transitioncancel"),vN=Gi("transitionend"),bN=new Map,nx="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(" ");nx.push("scrollEnd");function _r(a,o){bN.set(a,o),Vi(o,[a])}var Cd=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)},nr=[],Js=0,rx=0;function kd(){for(var a=Js,o=rx=Js=0;o<a;){var u=nr[o];nr[o++]=null;var m=nr[o];nr[o++]=null;var g=nr[o];nr[o++]=null;var b=nr[o];if(nr[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&&jN(u,g,b)}}function Md(a,o,u,m){nr[Js++]=a,nr[Js++]=o,nr[Js++]=u,nr[Js++]=m,rx|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function ax(a,o,u,m){return Md(a,o,u,m),Pd(a)}function Ki(a,o){return Md(a,null,null,o),Pd(a)}function jN(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-Ln(u),a=b.hiddenUpdates,m=a[g],m===null?a[g]=[o]:m.push(o),o.lane=u|536870912),b):null}function Pd(a){if(50<jc)throw jc=0,hy=null,Error(r(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var eo={};function w$(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 Bn(a,o,u,m){return new w$(a,o,u,m)}function ix(a){return a=a.prototype,!(!a||!a.isReactComponent)}function fa(a,o){var u=a.alternate;return u===null?(u=Bn(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 wN(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 Rd(a,o,u,m,g,b){var C=0;if(m=a,typeof a=="function")ix(a)&&(C=1);else if(typeof a=="string")C=OB(a,u,fe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case B:return a=Bn(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=Bn(12,u,o,g|2),a.elementType=A,a.lanes=b,a;case N:return a=Bn(13,u,o,g),a.elementType=N,a.lanes=b,a;case E:return a=Bn(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=Bn(C,u,o,g),o.elementType=a,o.type=m,o.lanes=b,o}function Yi(a,o,u,m){return a=Bn(7,a,m,o),a.lanes=u,a}function sx(a,o,u){return a=Bn(6,a,null,o),a.lanes=u,a}function SN(a){var o=Bn(18,null,null,0);return o.stateNode=a,o}function ox(a,o,u){return o=Bn(4,a.children!==null?a.children:[],a.key,o),o.lanes=u,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var NN=new WeakMap;function rr(a,o){if(typeof a=="object"&&a!==null){var u=NN.get(a);return u!==void 0?u:(o={value:a,source:o,stack:Nr(o)},NN.set(a,o),o)}return{value:a,source:o,stack:Nr(o)}}var to=[],no=0,Dd=null,ec=0,ar=[],ir=0,Ja=null,Hr=1,Fr="";function ha(a,o){to[no++]=ec,to[no++]=Dd,Dd=a,ec=o}function AN(a,o,u){ar[ir++]=Hr,ar[ir++]=Fr,ar[ir++]=Ja,Ja=a;var m=Hr;a=Fr;var g=32-Ln(m)-1;m&=~(1<<g),u+=1;var b=32-Ln(o)+g;if(30<b){var C=g-g%5;b=(m&(1<<C)-1).toString(32),m>>=C,g-=C,Hr=1<<32-Ln(o)+g|u<<g|m,Fr=b+a}else Hr=1<<b|u<<g|m,Fr=a}function lx(a){a.return!==null&&(ha(a,1),AN(a,1,0))}function cx(a){for(;a===Dd;)Dd=to[--no],to[no]=null,ec=to[--no],to[no]=null;for(;a===Ja;)Ja=ar[--ir],ar[ir]=null,Fr=ar[--ir],ar[ir]=null,Hr=ar[--ir],ar[ir]=null}function _N(a,o){ar[ir++]=Hr,ar[ir++]=Fr,ar[ir++]=Ja,Hr=o.id,Fr=o.overflow,Ja=a}var rn=null,vt=null,Ge=!1,ei=null,sr=!1,ux=Error(r(519));function ti(a){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tc(rr(o,a)),ux}function ON(a){var o=a.stateNode,u=a.type,m=a.memoizedProps;switch(o[nn]=a,o[On]=m,u){case"dialog":Ue("cancel",o),Ue("close",o);break;case"iframe":case"object":case"embed":Ue("load",o);break;case"video":case"audio":for(u=0;u<Sc.length;u++)Ue(Sc[u],o);break;case"source":Ue("error",o);break;case"img":case"image":case"link":Ue("error",o),Ue("load",o);break;case"details":Ue("toggle",o);break;case"input":Ue("invalid",o),I2(o,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Ue("invalid",o);break;case"textarea":Ue("invalid",o),U2(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||H_(o.textContent,u)?(m.popover!=null&&(Ue("beforetoggle",o),Ue("toggle",o)),m.onScroll!=null&&Ue("scroll",o),m.onScrollEnd!=null&&Ue("scrollend",o),m.onClick!=null&&(o.onclick=ua),o=!0):o=!1,o||ti(a,!0)}function TN(a){for(rn=a.return;rn;)switch(rn.tag){case 5:case 31:case 13:sr=!1;return;case 27:case 3:sr=!0;return;default:rn=rn.return}}function ro(a){if(a!==rn)return!1;if(!Ge)return TN(a),Ge=!0,!1;var o=a.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Ty(a.type,a.memoizedProps)),u=!u),u&&vt&&ti(a),TN(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=J_(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=J_(a)}else o===27?(o=vt,pi(a.type)?(a=Py,Py=null,vt=a):vt=o):vt=rn?lr(a.stateNode.nextSibling):null;return!0}function Xi(){vt=rn=null,Ge=!1}function dx(){var a=ei;return a!==null&&(Mn===null?Mn=a:Mn.push.apply(Mn,a),ei=null),a}function tc(a){ei===null?ei=[a]:ei.push(a)}var fx=q(null),Wi=null,ma=null;function ni(a,o,u){ae(fx,o._currentValue),o._currentValue=u}function pa(a){a._currentValue=fx.current,Y(fx)}function hx(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 mx(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),hx(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),hx(C,u,a),C=null}else C=g.child;if(C!==null)C.return=g;else for(C=g;C!==null;){if(C===a){C=null;break}if(g=C.sibling,g!==null){g.return=C.return,C=g;break}C=C.return}g=C}}function ao(a,o,u,m){a=null;for(var g=o,b=!1;g!==null;){if(!b){if((g.flags&524288)!==0)b=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var C=g.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var P=g.type;$n(g.pendingProps.value,C.value)||(a!==null?a.push(P):a=[P])}}else if(g===Ie.current){if(C=g.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(Tc):a=[Tc])}g=g.return}a!==null&&mx(o,a,u,m),o.flags|=262144}function zd(a){for(a=a.firstContext;a!==null;){if(!$n(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Zi(a){Wi=a,ma=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function an(a){return EN(Wi,a)}function Ld(a,o){return Wi===null&&Zi(a),EN(a,o)}function EN(a,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},ma===null){if(a===null)throw Error(r(308));ma=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else ma=ma.next=o;return u}var S$=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()})}},N$=e.unstable_scheduleCallback,A$=e.unstable_NormalPriority,Lt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function px(){return{controller:new S$,data:new Map,refCount:0}}function nc(a){a.refCount--,a.refCount===0&&N$(A$,function(){a.controller.abort()})}var rc=null,xx=0,io=0,so=null;function _$(a,o){if(rc===null){var u=rc=[];xx=0,io=vy(),so={status:"pending",value:void 0,then:function(m){u.push(m)}}}return xx++,o.then(CN,CN),o}function CN(){if(--xx===0&&rc!==null){so!==null&&(so.status="fulfilled");var a=rc;rc=null,io=0,so=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function O$(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 kN=I.S;I.S=function(a,o){m_=mn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&_$(a,o),kN!==null&&kN(a,o)};var Qi=q(null);function yx(){var a=Qi.current;return a!==null?a:dt.pooledCache}function $d(a,o){o===null?ae(Qi,Qi.current):ae(Qi,o.pool)}function MN(){var a=yx();return a===null?null:{parent:Lt._currentValue,pool:a}}var oo=Error(r(460)),gx=Error(r(474)),Bd=Error(r(542)),Id={then:function(){}};function PN(a){return a=a.status,a==="fulfilled"||a==="rejected"}function RN(a,o,u){switch(u=a[u],u===void 0?a.push(o):u!==o&&(o.then(ua,ua),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,zN(a),a;default:if(typeof o.status=="string")o.then(ua,ua);else{if(a=dt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=o,a.status="pending",a.then(function(m){if(o.status==="pending"){var g=o;g.status="fulfilled",g.value=m}},function(m){if(o.status==="pending"){var g=o;g.status="rejected",g.reason=m}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,zN(a),a}throw es=o,oo}}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,oo):u}}var es=null;function DN(){if(es===null)throw Error(r(459));var a=es;return es=null,a}function zN(a){if(a===oo||a===Bd)throw Error(r(483))}var lo=null,ac=0;function qd(a){var o=ac;return ac+=1,lo===null&&(lo=[]),RN(lo,a,o)}function ic(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function Ud(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 LN(a){function o(X,G){if(a){var W=X.deletions;W===null?(X.deletions=[G],X.flags|=16):W.push(G)}}function u(X,G){if(!a)return null;for(;G!==null;)o(X,G),G=G.sibling;return null}function m(X){for(var G=new Map;X!==null;)X.key!==null?G.set(X.key,X):G.set(X.index,X),X=X.sibling;return G}function g(X,G){return X=fa(X,G),X.index=0,X.sibling=null,X}function b(X,G,W){return X.index=W,a?(W=X.alternate,W!==null?(W=W.index,W<G?(X.flags|=67108866,G):W):(X.flags|=67108866,G)):(X.flags|=1048576,G)}function C(X){return a&&X.alternate===null&&(X.flags|=67108866),X}function P(X,G,W,se){return G===null||G.tag!==6?(G=sx(W,X.mode,se),G.return=X,G):(G=g(G,W),G.return=X,G)}function U(X,G,W,se){var ve=W.type;return ve===S?ne(X,G,W.props.children,se,W.key):G!==null&&(G.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&Ji(ve)===G.type)?(G=g(G,W.props),ic(G,W),G.return=X,G):(G=Rd(W.type,W.key,W.props,null,X.mode,se),ic(G,W),G.return=X,G)}function Q(X,G,W,se){return G===null||G.tag!==4||G.stateNode.containerInfo!==W.containerInfo||G.stateNode.implementation!==W.implementation?(G=ox(W,X.mode,se),G.return=X,G):(G=g(G,W.children||[]),G.return=X,G)}function ne(X,G,W,se,ve){return G===null||G.tag!==7?(G=Yi(W,X.mode,se,ve),G.return=X,G):(G=g(G,W),G.return=X,G)}function oe(X,G,W){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=sx(""+G,X.mode,W),G.return=X,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case j:return W=Rd(G.type,G.key,G.props,null,X.mode,W),ic(W,G),W.return=X,W;case w:return G=ox(G,X.mode,W),G.return=X,G;case R:return G=Ji(G),oe(X,G,W)}if(H(G)||$(G))return G=Yi(G,X.mode,W,null),G.return=X,G;if(typeof G.then=="function")return oe(X,qd(G),W);if(G.$$typeof===_)return oe(X,Ld(X,G),W);Ud(X,G)}return null}function J(X,G,W,se){var ve=G!==null?G.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return ve!==null?null:P(X,G,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case j:return W.key===ve?U(X,G,W,se):null;case w:return W.key===ve?Q(X,G,W,se):null;case R:return W=Ji(W),J(X,G,W,se)}if(H(W)||$(W))return ve!==null?null:ne(X,G,W,se,null);if(typeof W.then=="function")return J(X,G,qd(W),se);if(W.$$typeof===_)return J(X,G,Ld(X,W),se);Ud(X,W)}return null}function ee(X,G,W,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return X=X.get(W)||null,P(G,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(G,X,se,ve);case w:return X=X.get(se.key===null?W:se.key)||null,Q(G,X,se,ve);case R:return se=Ji(se),ee(X,G,W,se,ve)}if(H(se)||$(se))return X=X.get(W)||null,ne(G,X,se,ve,null);if(typeof se.then=="function")return ee(X,G,W,qd(se),ve);if(se.$$typeof===_)return ee(X,G,W,Ld(G,se),ve);Ud(G,se)}return null}function pe(X,G,W,se){for(var ve=null,Xe=null,ge=G,$e=G=0,He=null;ge!==null&&$e<W.length;$e++){ge.index>$e?(He=ge,ge=null):He=ge.sibling;var We=J(X,ge,W[$e],se);if(We===null){ge===null&&(ge=He);break}a&&ge&&We.alternate===null&&o(X,ge),G=b(We,G,$e),Xe===null?ve=We:Xe.sibling=We,Xe=We,ge=He}if($e===W.length)return u(X,ge),Ge&&ha(X,$e),ve;if(ge===null){for(;$e<W.length;$e++)ge=oe(X,W[$e],se),ge!==null&&(G=b(ge,G,$e),Xe===null?ve=ge:Xe.sibling=ge,Xe=ge);return Ge&&ha(X,$e),ve}for(ge=m(ge);$e<W.length;$e++)He=ee(ge,X,$e,W[$e],se),He!==null&&(a&&He.alternate!==null&&ge.delete(He.key===null?$e:He.key),G=b(He,G,$e),Xe===null?ve=He:Xe.sibling=He,Xe=He);return a&&ge.forEach(function(bi){return o(X,bi)}),Ge&&ha(X,$e),ve}function Se(X,G,W,se){if(W==null)throw Error(r(151));for(var ve=null,Xe=null,ge=G,$e=G=0,He=null,We=W.next();ge!==null&&!We.done;$e++,We=W.next()){ge.index>$e?(He=ge,ge=null):He=ge.sibling;var bi=J(X,ge,We.value,se);if(bi===null){ge===null&&(ge=He);break}a&&ge&&bi.alternate===null&&o(X,ge),G=b(bi,G,$e),Xe===null?ve=bi:Xe.sibling=bi,Xe=bi,ge=He}if(We.done)return u(X,ge),Ge&&ha(X,$e),ve;if(ge===null){for(;!We.done;$e++,We=W.next())We=oe(X,We.value,se),We!==null&&(G=b(We,G,$e),Xe===null?ve=We:Xe.sibling=We,Xe=We);return Ge&&ha(X,$e),ve}for(ge=m(ge);!We.done;$e++,We=W.next())We=ee(ge,X,$e,We.value,se),We!==null&&(a&&We.alternate!==null&&ge.delete(We.key===null?$e:We.key),G=b(We,G,$e),Xe===null?ve=We:Xe.sibling=We,Xe=We);return a&&ge.forEach(function($B){return o(X,$B)}),Ge&&ha(X,$e),ve}function ct(X,G,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;G!==null;){if(G.key===ve){if(ve=W.type,ve===S){if(G.tag===7){u(X,G.sibling),se=g(G,W.props.children),se.return=X,X=se;break e}}else if(G.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&Ji(ve)===G.type){u(X,G.sibling),se=g(G,W.props),ic(se,W),se.return=X,X=se;break e}u(X,G);break}else o(X,G);G=G.sibling}W.type===S?(se=Yi(W.props.children,X.mode,se,W.key),se.return=X,X=se):(se=Rd(W.type,W.key,W.props,null,X.mode,se),ic(se,W),se.return=X,X=se)}return C(X);case w:e:{for(ve=W.key;G!==null;){if(G.key===ve)if(G.tag===4&&G.stateNode.containerInfo===W.containerInfo&&G.stateNode.implementation===W.implementation){u(X,G.sibling),se=g(G,W.children||[]),se.return=X,X=se;break e}else{u(X,G);break}else o(X,G);G=G.sibling}se=ox(W,X.mode,se),se.return=X,X=se}return C(X);case R:return W=Ji(W),ct(X,G,W,se)}if(H(W))return pe(X,G,W,se);if($(W)){if(ve=$(W),typeof ve!="function")throw Error(r(150));return W=ve.call(W),Se(X,G,W,se)}if(typeof W.then=="function")return ct(X,G,qd(W),se);if(W.$$typeof===_)return ct(X,G,Ld(X,W),se);Ud(X,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,G!==null&&G.tag===6?(u(X,G.sibling),se=g(G,W),se.return=X,X=se):(u(X,G),se=sx(W,X.mode,se),se.return=X,X=se),C(X)):u(X,G)}return function(X,G,W,se){try{ac=0;var ve=ct(X,G,W,se);return lo=null,ve}catch(ge){if(ge===oo||ge===Bd)throw ge;var Xe=Bn(29,ge,null,X.mode);return Xe.lanes=se,Xe.return=X,Xe}finally{}}}var ts=LN(!0),$N=LN(!1),ri=!1;function vx(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bx(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=Pd(a),jN(a,null,u),o}return Md(a,m,o,u),Pd(a)}function sc(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,E2(a,u)}}function jx(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 wx=!1;function oc(){if(wx){var a=so;if(a!==null)throw a}}function lc(a,o,u,m){wx=!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?(Ve&J)===J:(m&J)===J){J!==0&&J===io&&(wx=!0),ne!==null&&(ne=ne.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var pe=a,Se=P;J=o;var ct=u;switch(Se.tag){case 1:if(pe=Se.payload,typeof pe=="function"){oe=pe.call(ct,oe,J);break e}oe=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Se.payload,J=typeof pe=="function"?pe.call(ct,oe,J):pe,J==null)break e;oe=x({},oe,J);break e;case 2:ri=!0}}J=P.callback,J!==null&&(a.flags|=64,ee&&(a.flags|=8192),ee=g.callbacks,ee===null?g.callbacks=[J]:ee.push(J))}else ee={lane:J,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ne===null?(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 BN(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function IN(a,o){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)BN(u[a],o)}var co=q(null),Vd=q(0);function qN(a,o){a=Na,ae(Vd,a),ae(co,o),Na=a|o.baseLanes}function Sx(){ae(Vd,Na),ae(co,co.current)}function Nx(){Na=Vd.current,Y(co),Y(Vd)}var In=q(null),or=null;function si(a){var o=a.alternate;ae(Dt,Dt.current&1),ae(In,a),or===null&&(o===null||co.current!==null||o.memoizedState!==null)&&(or=a)}function Ax(a){ae(Dt,Dt.current),ae(In,a),or===null&&(or=a)}function UN(a){a.tag===22?(ae(Dt,Dt.current),ae(In,a),or===null&&(or=a)):oi()}function oi(){ae(Dt,Dt.current),ae(In,In.current)}function qn(a){Y(In),or===a&&(or=null),Y(Dt)}var Dt=q(0);function Hd(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)||My(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 xa=0,De=null,ot=null,$t=null,Fd=!1,uo=!1,ns=!1,Gd=0,cc=0,fo=null,T$=0;function Ct(){throw Error(r(321))}function _x(a,o){if(o===null)return!1;for(var u=0;u<o.length&&u<a.length;u++)if(!$n(a[u],o[u]))return!1;return!0}function Ox(a,o,u,m,g,b){return xa=b,De=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=a===null||a.memoizedState===null?AA:Ux,ns=!1,b=u(m,g),ns=!1,uo&&(b=HN(o,u,m,g)),VN(a),b}function VN(a){I.H=fc;var o=ot!==null&&ot.next!==null;if(xa=0,$t=ot=De=null,Fd=!1,cc=0,fo=null,o)throw Error(r(300));a===null||Bt||(a=a.dependencies,a!==null&&zd(a)&&(Bt=!0))}function HN(a,o,u,m){De=a;var g=0;do{if(uo&&(fo=null),cc=0,uo=!1,25<=g)throw Error(r(301));if(g+=1,$t=ot=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}I.H=_A,b=o(u,m)}while(uo);return b}function E$(){var a=I.H,o=a.useState()[0];return o=typeof o.then=="function"?uc(o):o,a=a.useState()[0],(ot!==null?ot.memoizedState:null)!==a&&(De.flags|=1024),o}function Tx(){var a=Gd!==0;return Gd=0,a}function Ex(a,o,u){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~u}function Cx(a){if(Fd){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}Fd=!1}xa=0,$t=ot=De=null,uo=!1,cc=Gd=0,fo=null}function vn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?De.memoizedState=$t=a:$t=$t.next=a,$t}function zt(){if(ot===null){var a=De.alternate;a=a!==null?a.memoizedState:null}else a=ot.next;var o=$t===null?De.memoizedState:$t.next;if(o!==null)$t=o,ot=a;else{if(a===null)throw De.alternate===null?Error(r(467)):Error(r(310));ot=a,a={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},$t===null?De.memoizedState=$t=a:$t=$t.next=a}return $t}function Kd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function uc(a){var o=cc;return cc+=1,fo===null&&(fo=[]),a=RN(fo,a,o),o=De,($t===null?o.memoizedState:$t.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?AA:Ux),a}function Yd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return uc(a);if(a.$$typeof===_)return an(a)}throw Error(r(438,String(a)))}function kx(a){var o=null,u=De.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var m=De.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(o={data:m.data.map(function(g){return g.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Kd(),De.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(a),m=0;m<a;m++)u[m]=D;return o.index++,u}function ya(a,o){return typeof o=="function"?o(a):o}function Xd(a){var o=zt();return Mx(o,ot,a)}function Mx(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?(Ve&oe)===oe:(xa&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===io&&(ne=!0);else if((xa&J)===J){Q=Q.next,J===io&&(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,De.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,De.lanes|=oe,ui|=oe;Q=Q.next}while(Q!==null&&Q!==o);if(U===null?C=b:U.next=P,!$n(b,a.memoizedState)&&(Bt=!0,ne&&(u=so,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 Px(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);$n(b,o.memoizedState)||(Bt=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),u.lastRenderedState=b}return[b,m]}function FN(a,o,u){var m=De,g=zt(),b=Ge;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=o();var C=!$n((ot||g).memoizedState,u);if(C&&(g.memoizedState=u,Bt=!0),g=g.queue,zx(YN.bind(null,m,g,a),[a]),g.getSnapshot!==o||C||$t!==null&&$t.memoizedState.tag&1){if(m.flags|=2048,ho(9,{destroy:void 0},KN.bind(null,m,g,u,o),null),dt===null)throw Error(r(349));b||(xa&127)!==0||GN(m,o,u)}return u}function GN(a,o,u){a.flags|=16384,a={getSnapshot:o,value:u},o=De.updateQueue,o===null?(o=Kd(),De.updateQueue=o,o.stores=[a]):(u=o.stores,u===null?o.stores=[a]:u.push(a))}function KN(a,o,u,m){o.value=u,o.getSnapshot=m,XN(o)&&WN(a)}function YN(a,o,u){return u(function(){XN(o)&&WN(a)})}function XN(a){var o=a.getSnapshot;a=a.value;try{var u=o();return!$n(a,u)}catch{return!0}}function WN(a){var o=Ki(a,2);o!==null&&Pn(o,a,2)}function Rx(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:ya,lastRenderedState:a},o}function ZN(a,o,u,m){return a.baseState=u,Mx(a,ot,typeof m=="function"?m:ya)}function C$(a,o,u,m,g){if(Qd(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,QN(o,b)):(b.next=u.next,o.pending=u.next=b)}}function QN(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),JN(a,o,P)}catch(Q){Dx(a,o,Q)}finally{b!==null&&C.types!==null&&(b.types=C.types),I.T=b}}else try{b=u(g,m),JN(a,o,b)}catch(Q){Dx(a,o,Q)}}function JN(a,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){eA(a,o,m)},function(m){return Dx(a,o,m)}):eA(a,o,u)}function eA(a,o,u){o.status="fulfilled",o.value=u,tA(o),a.state=u,o=a.pending,o!==null&&(u=o.next,u===o?a.pending=null:(u=u.next,o.next=u,QN(a,u)))}function Dx(a,o,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do o.status="rejected",o.reason=u,tA(o),o=o.next;while(o!==m)}a.action=null}function tA(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function nA(a,o){return o}function rA(a,o){if(Ge){var u=dt.formState;if(u!==null){e:{var m=De;if(Ge){if(vt){t:{for(var g=vt,b=sr;g.nodeType!==8;){if(!b){g=null;break t}if(g=lr(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){vt=lr(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:nA,lastRenderedState:o},u.queue=m,u=wA.bind(null,De,m),m.dispatch=u,m=Rx(!1),b=qx.bind(null,De,!1,m.queue),m=vn(),g={state:o,dispatch:null,action:a,pending:null},m.queue=g,u=C$.bind(null,De,g,b,u),g.dispatch=u,m.memoizedState=a,[o,u,!1]}function aA(a){var o=zt();return iA(o,ot,a)}function iA(a,o,u){if(o=Mx(a,o,nA)[0],a=Xd(ya)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var m=uc(o)}catch(C){throw C===oo?Bd:C}else m=o;o=zt();var g=o.queue,b=g.dispatch;return u!==o.memoizedState&&(De.flags|=2048,ho(9,{destroy:void 0},k$.bind(null,g,u),null)),[m,b,a]}function k$(a,o){a.action=o}function sA(a){var o=zt(),u=ot;if(u!==null)return iA(o,u,a);zt(),o=o.memoizedState,u=zt();var m=u.queue.dispatch;return u.memoizedState=a,[o,m,!1]}function ho(a,o,u,m){return a={tag:a,create:u,deps:m,inst:o,next:null},o=De.updateQueue,o===null&&(o=Kd(),De.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,o.lastEffect=a),a}function oA(){return zt().memoizedState}function Wd(a,o,u,m){var g=vn();De.flags|=a,g.memoizedState=ho(1|o,{destroy:void 0},u,m===void 0?null:m)}function Zd(a,o,u,m){var g=zt();m=m===void 0?null:m;var b=g.memoizedState.inst;ot!==null&&m!==null&&_x(m,ot.memoizedState.deps)?g.memoizedState=ho(o,b,u,m):(De.flags|=a,g.memoizedState=ho(1|o,b,u,m))}function lA(a,o){Wd(8390656,8,a,o)}function zx(a,o){Zd(2048,8,a,o)}function M$(a){De.flags|=4;var o=De.updateQueue;if(o===null)o=Kd(),De.updateQueue=o,o.events=[a];else{var u=o.events;u===null?o.events=[a]:u.push(a)}}function cA(a){var o=zt().memoizedState;return M$({ref:o,nextImpl:a}),function(){if((Je&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function uA(a,o){return Zd(4,2,a,o)}function dA(a,o){return Zd(4,4,a,o)}function fA(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 hA(a,o,u){u=u!=null?u.concat([a]):null,Zd(4,4,fA.bind(null,o,a),u)}function Lx(){}function mA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;return o!==null&&_x(o,m[1])?m[0]:(u.memoizedState=[a,o],a)}function pA(a,o){var u=zt();o=o===void 0?null:o;var m=u.memoizedState;if(o!==null&&_x(o,m[1]))return m[0];if(m=a(),ns){Wa(!0);try{a()}finally{Wa(!1)}}return u.memoizedState=[m,o],m}function $x(a,o,u){return u===void 0||(xa&1073741824)!==0&&(Ve&261930)===0?a.memoizedState=o:(a.memoizedState=u,a=x_(),De.lanes|=a,ui|=a,u)}function xA(a,o,u,m){return $n(u,o)?u:co.current!==null?(a=$x(a,u,m),$n(a,o)||(Bt=!0),a):(xa&42)===0||(xa&1073741824)!==0&&(Ve&261930)===0?(Bt=!0,a.memoizedState=u):(a=x_(),De.lanes|=a,ui|=a,o)}function yA(a,o,u,m,g){var b=F.p;F.p=b!==0&&8>b?b:8;var C=I.T,P={};I.T=P,qx(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=O$(U,m);dc(a,o,ne,Hn(a))}else dc(a,o,m,Hn(a))}catch(oe){dc(a,o,{then:function(){},status:"rejected",reason:oe},Hn())}finally{F.p=b,C!==null&&P.types!==null&&(C.types=P.types),I.T=C}}function P$(){}function Bx(a,o,u,m){if(a.tag!==5)throw Error(r(476));var g=gA(a).queue;yA(a,g,o,Z,u===null?P$:function(){return vA(a),u(m)})}function gA(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:ya,lastRenderedState:Z},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ya,lastRenderedState:u},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function vA(a){var o=gA(a);o.next===null&&(o=a.alternate.memoizedState),dc(a,o.next.queue,{},Hn())}function Ix(){return an(Tc)}function bA(){return zt().memoizedState}function jA(){return zt().memoizedState}function R$(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var u=Hn();a=ai(u);var m=ii(o,a,u);m!==null&&(Pn(m,o,u),sc(m,o,u)),o={cache:px()},a.payload=o;return}o=o.return}}function D$(a,o,u){var m=Hn();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Qd(a)?SA(o,u):(u=ax(a,o,u,m),u!==null&&(Pn(u,a,m),NA(u,o,m)))}function wA(a,o,u){var m=Hn();dc(a,o,u,m)}function dc(a,o,u,m){var g={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Qd(a))SA(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,$n(P,C))return Md(a,o,g,0),dt===null&&kd(),!1}catch{}finally{}if(u=ax(a,o,g,m),u!==null)return Pn(u,a,m),NA(u,o,m),!0}return!1}function qx(a,o,u,m){if(m={lane:2,revertLane:vy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Qd(a)){if(o)throw Error(r(479))}else o=ax(a,u,m,2),o!==null&&Pn(o,a,2)}function Qd(a){var o=a.alternate;return a===De||o!==null&&o===De}function SA(a,o){uo=Fd=!0;var u=a.pending;u===null?o.next=o:(o.next=u.next,u.next=o),a.pending=o}function NA(a,o,u){if((u&4194048)!==0){var m=o.lanes;m&=a.pendingLanes,u|=m,o.lanes=u,E2(a,u)}}var fc={readContext:an,use:Yd,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};fc.useEffectEvent=Ct;var AA={readContext:an,use:Yd,useCallback:function(a,o){return vn().memoizedState=[a,o===void 0?null:o],a},useContext:an,useEffect:lA,useImperativeHandle:function(a,o,u){u=u!=null?u.concat([a]):null,Wd(4194308,4,fA.bind(null,o,a),u)},useLayoutEffect:function(a,o){return Wd(4194308,4,a,o)},useInsertionEffect:function(a,o){Wd(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=D$.bind(null,De,a),[m.memoizedState,a]},useRef:function(a){var o=vn();return a={current:a},o.memoizedState=a},useState:function(a){a=Rx(a);var o=a.queue,u=wA.bind(null,De,o);return o.dispatch=u,[a.memoizedState,u]},useDebugValue:Lx,useDeferredValue:function(a,o){var u=vn();return $x(u,a,o)},useTransition:function(){var a=Rx(!1);return a=yA.bind(null,De,a.queue,!0,!1),vn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,u){var m=De,g=vn();if(Ge){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),dt===null)throw Error(r(349));(Ve&127)!==0||GN(m,o,u)}g.memoizedState=u;var b={value:u,getSnapshot:o};return g.queue=b,lA(YN.bind(null,m,b,a),[a]),m.flags|=2048,ho(9,{destroy:void 0},KN.bind(null,m,b,u,o),null),u},useId:function(){var a=vn(),o=dt.identifierPrefix;if(Ge){var u=Fr,m=Hr;u=(m&~(1<<32-Ln(m)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Gd++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=T$++,o="_"+o+"r_"+u.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:Ix,useFormState:rA,useActionState:rA,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=qx.bind(null,De,!0,u),u.dispatch=o,[a,o]},useMemoCache:kx,useCacheRefresh:function(){return vn().memoizedState=R$.bind(null,De)},useEffectEvent:function(a){var o=vn(),u={impl:a};return o.memoizedState=u,function(){if((Je&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Ux={readContext:an,use:Yd,useCallback:mA,useContext:an,useEffect:zx,useImperativeHandle:hA,useInsertionEffect:uA,useLayoutEffect:dA,useMemo:pA,useReducer:Xd,useRef:oA,useState:function(){return Xd(ya)},useDebugValue:Lx,useDeferredValue:function(a,o){var u=zt();return xA(u,ot.memoizedState,a,o)},useTransition:function(){var a=Xd(ya)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:uc(a),o]},useSyncExternalStore:FN,useId:bA,useHostTransitionStatus:Ix,useFormState:aA,useActionState:aA,useOptimistic:function(a,o){var u=zt();return ZN(u,ot,a,o)},useMemoCache:kx,useCacheRefresh:jA};Ux.useEffectEvent=cA;var _A={readContext:an,use:Yd,useCallback:mA,useContext:an,useEffect:zx,useImperativeHandle:hA,useInsertionEffect:uA,useLayoutEffect:dA,useMemo:pA,useReducer:Px,useRef:oA,useState:function(){return Px(ya)},useDebugValue:Lx,useDeferredValue:function(a,o){var u=zt();return ot===null?$x(u,a,o):xA(u,ot.memoizedState,a,o)},useTransition:function(){var a=Px(ya)[0],o=zt().memoizedState;return[typeof a=="boolean"?a:uc(a),o]},useSyncExternalStore:FN,useId:bA,useHostTransitionStatus:Ix,useFormState:sA,useActionState:sA,useOptimistic:function(a,o){var u=zt();return ot!==null?ZN(u,ot,a,o):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:kx,useCacheRefresh:jA};_A.useEffectEvent=cA;function Vx(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 Hx={enqueueSetState:function(a,o,u){a=a._reactInternals;var m=Hn(),g=ai(m);g.payload=o,u!=null&&(g.callback=u),o=ii(a,g,m),o!==null&&(Pn(o,a,m),sc(o,a,m))},enqueueReplaceState:function(a,o,u){a=a._reactInternals;var m=Hn(),g=ai(m);g.tag=1,g.payload=o,u!=null&&(g.callback=u),o=ii(a,g,m),o!==null&&(Pn(o,a,m),sc(o,a,m))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var u=Hn(),m=ai(u);m.tag=2,o!=null&&(m.callback=o),o=ii(a,m,u),o!==null&&(Pn(o,a,u),sc(o,a,u))}};function OA(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?!Ql(u,m)||!Ql(g,b):!0}function TA(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&&Hx.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 EA(a){Cd(a)}function CA(a){console.error(a)}function kA(a){Cd(a)}function Jd(a,o){try{var u=a.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(m){setTimeout(function(){throw m})}}function MA(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 Fx(a,o,u){return u=ai(u),u.tag=3,u.payload={element:null},u.callback=function(){Jd(a,o)},u}function PA(a){return a=ai(a),a.tag=3,a}function RA(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(){MA(o,u,m)}}var C=u.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(a.callback=function(){MA(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 z$(a,o,u,m,g){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(o=u.alternate,o!==null&&ao(o,u,g,!0),u=In.current,u!==null){switch(u.tag){case 31:case 13:return or===null?ff():u.alternate===null&&kt===0&&(kt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,m===Id?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([m]):o.add(m),xy(a,m,g)),!1;case 22:return u.flags|=65536,m===Id?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)),xy(a,m,g)),!1}throw Error(r(435,u.tag))}return xy(a,m,g),ff(),!1}if(Ge)return o=In.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=g,m!==ux&&(a=Error(r(422),{cause:m}),tc(rr(a,u)))):(m!==ux&&(o=Error(r(423),{cause:m}),tc(rr(o,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,m=rr(m,u),g=Fx(a.stateNode,m,g),jx(a,g),kt!==4&&(kt=2)),!1;var b=Error(r(520),{cause:m});if(b=rr(b,u),bc===null?bc=[b]:bc.push(b),kt!==4&&(kt=2),o===null)return!0;m=rr(m,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=Fx(u.stateNode,m,a),jx(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=PA(g),RA(g,a,u,m),jx(u,g),!1}u=u.return}while(u!==null);return!1}var Gx=Error(r(461)),Bt=!1;function sn(a,o,u,m){o.child=a===null?$N(o,null,u,m):ts(o,a.child,u,m)}function DA(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=Ox(a,o,u,C,b,g),P=Tx(),a!==null&&!Bt?(Ex(a,o,g),ga(a,o,g)):(Ge&&P&&lx(o),o.flags|=1,sn(a,o,m,g),o.child)}function zA(a,o,u,m,g){if(a===null){var b=u.type;return typeof b=="function"&&!ix(b)&&b.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=b,LA(a,o,b,m,g)):(a=Rd(u.type,null,m,o,o.mode,g),a.ref=o.ref,a.return=o,o.child=a)}if(b=a.child,!ey(a,g)){var C=b.memoizedProps;if(u=u.compare,u=u!==null?u:Ql,u(C,m)&&a.ref===o.ref)return ga(a,o,g)}return o.flags|=1,a=fa(b,m),a.ref=o.ref,a.return=o,o.child=a}function LA(a,o,u,m,g){if(a!==null){var b=a.memoizedProps;if(Ql(b,m)&&a.ref===o.ref)if(Bt=!1,o.pendingProps=m=b,ey(a,g))(a.flags&131072)!==0&&(Bt=!0);else return o.lanes=a.lanes,ga(a,o,g)}return Kx(a,o,u,m,g)}function $A(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 BA(a,o,b,u,m)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&$d(o,b!==null?b.cachePool:null),b!==null?qN(o,b):Sx(),UN(o);else return m=o.lanes=536870912,BA(a,o,b!==null?b.baseLanes|u:u,u,m)}else b!==null?($d(o,b.cachePool),qN(o,b),oi(),o.memoizedState=null):(a!==null&&$d(o,null),Sx(),oi());return sn(a,o,g,u),o.child}function hc(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function BA(a,o,u,m,g){var b=yx();return b=b===null?null:{parent:Lt._currentValue,pool:b},o.memoizedState={baseLanes:u,cachePool:b},a!==null&&$d(o,null),Sx(),UN(o),a!==null&&ao(a,o,m,!0),o.childLanes=g,null}function ef(a,o){return o=nf({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function IA(a,o,u){return ts(o,a.child,null,u),a=ef(o,o.pendingProps),a.flags|=2,qn(o),o.memoizedState=null,a}function L$(a,o,u){var m=o.pendingProps,g=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(Ge){if(m.mode==="hidden")return a=ef(o,m),o.lanes=536870912,hc(null,a);if(Ax(o),(a=vt)?(a=Q_(a,sr),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ja!==null?{id:Hr,overflow:Fr}:null,retryLane:536870912,hydrationErrors:null},u=SN(a),u.return=o,o.child=u,rn=o,vt=null)):a=null,a===null)throw ti(o);return o.lanes=536870912,null}return ef(o,m)}var b=a.memoizedState;if(b!==null){var C=b.dehydrated;if(Ax(o),g)if(o.flags&256)o.flags&=-257,o=IA(a,o,u);else if(o.memoizedState!==null)o.child=a.child,o.flags|=128,o=null;else throw Error(r(558));else if(Bt||ao(a,o,u,!1),g=(u&a.childLanes)!==0,Bt||g){if(m=dt,m!==null&&(C=C2(m,u),C!==0&&C!==b.retryLane))throw b.retryLane=C,Ki(a,C),Pn(m,a,C),Gx;ff(),o=IA(a,o,u)}else a=b.treeContext,vt=lr(C.nextSibling),rn=o,Ge=!0,ei=null,sr=!1,a!==null&&_N(o,a),o=ef(o,m),o.flags|=4096;return o}return a=fa(a.child,{mode:m.mode,children:m.children}),a.ref=o.ref,o.child=a,a.return=o,a}function tf(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 Kx(a,o,u,m,g){return Zi(o),u=Ox(a,o,u,m,void 0,g),m=Tx(),a!==null&&!Bt?(Ex(a,o,g),ga(a,o,g)):(Ge&&m&&lx(o),o.flags|=1,sn(a,o,u,g),o.child)}function qA(a,o,u,m,g,b){return Zi(o),o.updateQueue=null,u=HN(o,m,u,g),VN(a),m=Tx(),a!==null&&!Bt?(Ex(a,o,b),ga(a,o,b)):(Ge&&m&&lx(o),o.flags|=1,sn(a,o,u,b),o.child)}function UA(a,o,u,m,g){if(Zi(o),o.stateNode===null){var b=eo,C=u.contextType;typeof C=="object"&&C!==null&&(b=an(C)),b=new u(m,b),o.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Hx,o.stateNode=b,b._reactInternals=o,b=o.stateNode,b.props=m,b.state=o.memoizedState,b.refs={},vx(o),C=u.contextType,b.context=typeof C=="object"&&C!==null?an(C):eo,b.state=o.memoizedState,C=u.getDerivedStateFromProps,typeof C=="function"&&(Vx(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&&Hx.enqueueReplaceState(b,b.state,null),lc(o,m,b,g),oc(),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=eo,typeof ne=="object"&&ne!==null&&(C=an(ne));var oe=u.getDerivedStateFromProps;ne=typeof oe=="function"||typeof b.getSnapshotBeforeUpdate=="function",P=o.pendingProps!==P,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P||Q!==C)&&TA(o,b,m,C),ri=!1;var J=o.memoizedState;b.state=J,lc(o,m,b,g),oc(),Q=o.memoizedState,P||J!==Q||ri?(typeof oe=="function"&&(Vx(o,u,oe,m),Q=o.memoizedState),(U=ri||OA(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,bx(a,o),C=o.memoizedProps,ne=rs(u,C),b.props=ne,oe=o.pendingProps,J=b.context,Q=u.contextType,U=eo,typeof Q=="object"&&Q!==null&&(U=an(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)&&TA(o,b,m,U),ri=!1,J=o.memoizedState,b.state=J,lc(o,m,b,g),oc();var ee=o.memoizedState;C!==oe||J!==ee||ri||a!==null&&a.dependencies!==null&&zd(a.dependencies)?(typeof P=="function"&&(Vx(o,u,P,m),ee=o.memoizedState),(ne=ri||OA(o,u,ne,m,J,ee,U)||a!==null&&a.dependencies!==null&&zd(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,tf(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)):sn(a,o,u,g),o.memoizedState=b.state,a=o.child):a=ga(a,o,g),a}function VA(a,o,u,m){return Xi(),o.flags|=256,sn(a,o,u,m),o.child}var Yx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xx(a){return{baseLanes:a,cachePool:MN()}}function Wx(a,o,u){return a=a!==null?a.childLanes&~u:0,o&&(a|=Vn),a}function HA(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(Ge){if(g?si(o):oi(),(a=vt)?(a=Q_(a,sr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ja!==null?{id:Hr,overflow:Fr}:null,retryLane:536870912,hydrationErrors:null},u=SN(a),u.return=o,o.child=u,rn=o,vt=null)):a=null,a===null)throw ti(o);return My(a)?o.lanes=32:o.lanes=536870912,null}var P=m.children;return m=m.fallback,g?(oi(),g=o.mode,P=nf({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=Xx(u),m.childLanes=Wx(a,C,u),o.memoizedState=Yx,hc(null,m)):(si(o),Zx(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=Qx(a,o,u)):o.memoizedState!==null?(oi(),o.child=a.child,o.flags|=128,o=null):(oi(),P=m.fallback,g=o.mode,m=nf({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=Xx(u),m.childLanes=Wx(a,C,u),o.memoizedState=Yx,o=hc(null,m));else if(si(o),My(P)){if(C=P.nextSibling&&P.nextSibling.dataset,C)var Q=C.dgst;C=Q,m=Error(r(419)),m.stack="",m.digest=C,tc({value:m,source:null,stack:null}),o=Qx(a,o,u)}else if(Bt||ao(a,o,u,!1),C=(u&a.childLanes)!==0,Bt||C){if(C=dt,C!==null&&(m=C2(C,u),m!==0&&m!==U.retryLane))throw U.retryLane=m,Ki(a,m),Pn(C,a,m),Gx;ky(P)||ff(),o=Qx(a,o,u)}else ky(P)?(o.flags|=192,o.child=a.child,o=null):(a=U.treeContext,vt=lr(P.nextSibling),rn=o,Ge=!0,ei=null,sr=!1,a!==null&&_N(o,a),o=Zx(o,m.children),o.flags|=4096);return o}return g?(oi(),P=m.fallback,g=o.mode,U=a.child,Q=U.sibling,m=fa(U,{mode:"hidden",children:m.children}),m.subtreeFlags=U.subtreeFlags&65011712,Q!==null?P=fa(Q,P):(P=Yi(P,g,u,null),P.flags|=2),P.return=o,m.return=o,m.sibling=P,o.child=m,hc(null,m),m=o.child,P=a.child.memoizedState,P===null?P=Xx(u):(g=P.cachePool,g!==null?(U=Lt._currentValue,g=g.parent!==U?{parent:U,pool:U}:g):g=MN(),P={baseLanes:P.baseLanes|u,cachePool:g}),m.memoizedState=P,m.childLanes=Wx(a,C,u),o.memoizedState=Yx,hc(a.child,m)):(si(o),u=a.child,a=u.sibling,u=fa(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 Zx(a,o){return o=nf({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function nf(a,o){return a=Bn(22,a,null,o),a.lanes=0,a}function Qx(a,o,u){return ts(o,a.child,null,u),a=Zx(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function FA(a,o,u){a.lanes|=o;var m=a.alternate;m!==null&&(m.lanes|=o),hx(a.return,o,u)}function Jx(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 GA(a,o,u){var m=o.pendingProps,g=m.revealOrder,b=m.tail;m=m.children;var C=Dt.current,P=(C&2)!==0;if(P?(C=C&1|2,o.flags|=128):C&=1,ae(Dt,C),sn(a,o,m,u),m=Ge?ec:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&FA(a,u,o);else if(a.tag===19)FA(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&&Hd(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),Jx(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&&Hd(a)===null){o.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}Jx(o,!0,u,null,b,m);break;case"together":Jx(o,!1,null,null,void 0,m);break;default:o.memoizedState=null}return o.child}function ga(a,o,u){if(a!==null&&(o.dependencies=a.dependencies),ui|=o.lanes,(u&o.childLanes)===0)if(a!==null){if(ao(a,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(a!==null&&o.child!==a.child)throw Error(r(153));if(o.child!==null){for(a=o.child,u=fa(a,a.pendingProps),o.child=u,u.return=o;a.sibling!==null;)a=a.sibling,u=u.sibling=fa(a,a.pendingProps),u.return=o;u.sibling=null}return o.child}function ey(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&zd(a)))}function $$(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:Oe(o);break;case 4:et(o,o.stateNode.containerInfo);break;case 10:ni(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Ax(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?HA(a,o,u):(si(o),a=ga(a,o,u),a!==null?a.sibling:null);si(o);break;case 19:var g=(a.flags&128)!==0;if(m=(u&o.childLanes)!==0,m||(ao(a,o,u,!1),m=(u&o.childLanes)!==0),g){if(m)return GA(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,$A(a,o,u,o.pendingProps);case 24:ni(o,Lt,a.memoizedState.cache)}return ga(a,o,u)}function KA(a,o,u){if(a!==null)if(a.memoizedProps!==o.pendingProps)Bt=!0;else{if(!ey(a,u)&&(o.flags&128)===0)return Bt=!1,$$(a,o,u);Bt=(a.flags&131072)!==0}else Bt=!1,Ge&&(o.flags&1048576)!==0&&AN(o,ec,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")ix(a)?(m=rs(a,m),o.tag=1,o=UA(null,o,a,m,u)):(o.tag=0,o=Kx(null,o,a,m,u));else{if(a!=null){var g=a.$$typeof;if(g===T){o.tag=11,o=DA(null,o,a,m,u);break e}else if(g===M){o.tag=14,o=zA(null,o,a,m,u);break e}}throw o=K(a)||a,Error(r(306,o,""))}}return o;case 0:return Kx(a,o,o.type,o.pendingProps,u);case 1:return m=o.type,g=rs(m,o.pendingProps),UA(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,bx(a,o),lc(o,m,null,u);var C=o.memoizedState;if(m=C.cache,ni(o,Lt,m),m!==b.cache&&mx(o,[Lt],u,!0),oc(),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=VA(a,o,m,u);break e}else if(m!==g){g=rr(Error(r(424)),o),tc(g),o=VA(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=lr(a.firstChild),rn=o,Ge=!0,ei=null,sr=!0,u=$N(o,null,m,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Xi(),m===g){o=ga(a,o,u);break e}sn(a,o,m,u)}o=o.child}return o;case 26:return tf(a,o),a===null?(u=aO(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ge||(u=o.type,a=o.pendingProps,m=vf(we.current).createElement(u),m[nn]=o,m[On]=a,on(m,u,a),Zt(m),o.stateNode=m):o.memoizedState=aO(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return Oe(o),a===null&&Ge&&(m=o.stateNode=tO(o.type,o.pendingProps,we.current),rn=o,sr=!0,g=vt,pi(o.type)?(Py=g,vt=lr(m.firstChild)):vt=g),sn(a,o,o.pendingProps.children,u),tf(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&Ge&&((g=m=vt)&&(m=mB(m,o.type,o.pendingProps,sr),m!==null?(o.stateNode=m,rn=o,vt=lr(m.firstChild),sr=!1,g=!0):g=!1),g||ti(o)),Oe(o),g=o.type,b=o.pendingProps,C=a!==null?a.memoizedProps:null,m=b.children,Ty(g,b)?m=null:C!==null&&Ty(g,C)&&(o.flags|=32),o.memoizedState!==null&&(g=Ox(a,o,E$,null,null,u),Tc._currentValue=g),tf(a,o),sn(a,o,m,u),o.child;case 6:return a===null&&Ge&&((a=u=vt)&&(u=pB(u,o.pendingProps,sr),u!==null?(o.stateNode=u,rn=o,vt=null,a=!0):a=!1),a||ti(o)),null;case 13:return HA(a,o,u);case 4:return et(o,o.stateNode.containerInfo),m=o.pendingProps,a===null?o.child=ts(o,null,m,u):sn(a,o,m,u),o.child;case 11:return DA(a,o,o.type,o.pendingProps,u);case 7:return sn(a,o,o.pendingProps,u),o.child;case 8:return sn(a,o,o.pendingProps.children,u),o.child;case 12:return sn(a,o,o.pendingProps.children,u),o.child;case 10:return m=o.pendingProps,ni(o,o.type,m.value),sn(a,o,m.children,u),o.child;case 9:return g=o.type._context,m=o.pendingProps.children,Zi(o),g=an(g),m=m(g),o.flags|=1,sn(a,o,m,u),o.child;case 14:return zA(a,o,o.type,o.pendingProps,u);case 15:return LA(a,o,o.type,o.pendingProps,u);case 19:return GA(a,o,u);case 31:return L$(a,o,u);case 22:return $A(a,o,u,o.pendingProps);case 24:return Zi(o),m=an(Lt),a===null?(g=yx(),g===null&&(g=dt,b=px(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),o.memoizedState={parent:m,cache:g},vx(o),ni(o,Lt,g)):((a.lanes&u)!==0&&(bx(a,o),lc(o,null,null,u),oc()),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&&mx(o,[Lt],u,!0))),sn(a,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function va(a){a.flags|=4}function ty(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(b_())a.flags|=8192;else throw es=Id,gx}else a.flags&=-16777217}function YA(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!cO(o))if(b_())a.flags|=8192;else throw es=Id,gx}function rf(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?O2():536870912,a.lanes|=o,yo|=o)}function mc(a,o){if(!Ge)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 B$(a,o,u){var m=o.pendingProps;switch(cx(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),pa(Lt),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(ro(o)?va(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,dx())),bt(o),null;case 26:var g=o.type,b=o.memoizedState;return a===null?(va(o),b!==null?(bt(o),YA(o,b)):(bt(o),ty(o,g,null,m,u))):b?b!==a.memoizedState?(va(o),bt(o),YA(o,b)):(bt(o),o.flags&=-16777217):(a=a.memoizedProps,a!==m&&va(o),bt(o),ty(o,g,a,m,u)),null;case 27:if(ke(o),u=we.current,g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&va(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}a=fe.current,ro(o)?ON(o):(a=tO(g,m,u),o.stateNode=a,va(o))}return bt(o),null;case 5:if(ke(o),g=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==m&&va(o);else{if(!m){if(o.stateNode===null)throw Error(r(166));return bt(o),null}if(b=fe.current,ro(o))ON(o);else{var C=vf(we.current);switch(b){case 1:b=C.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:b=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":b=C.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":b=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":b=C.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof m.is=="string"?C.createElement("select",{is:m.is}):C.createElement("select"),m.multiple?b.multiple=!0:m.size&&(b.size=m.size);break;default:b=typeof m.is=="string"?C.createElement(g,{is:m.is}):C.createElement(g)}}b[nn]=o,b[On]=m;e:for(C=o.child;C!==null;){if(C.tag===5||C.tag===6)b.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===o)break e;for(;C.sibling===null;){if(C.return===null||C.return===o)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}o.stateNode=b;e:switch(on(b,g,m),g){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&va(o)}}return bt(o),ty(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,u),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==m&&va(o);else{if(typeof m!="string"&&o.stateNode===null)throw Error(r(166));if(a=we.current,ro(o)){if(a=o.stateNode,u=o.memoizedProps,m=null,g=rn,g!==null)switch(g.tag){case 27:case 5:m=g.memoizedProps}a[nn]=o,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||H_(a.nodeValue,u)),a||ti(o,!0)}else a=vf(a).createTextNode(m),a[nn]=o,o.stateNode=a}return bt(o),null;case 31:if(u=o.memoizedState,a===null||a.memoizedState!==null){if(m=ro(o),u!==null){if(a===null){if(!m)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[nn]=o}else Xi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),a=!1}else u=dx(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return o.flags&256?(qn(o),o):(qn(o),null);if((o.flags&128)!==0)throw Error(r(558))}return bt(o),null;case 13:if(m=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=ro(o),m!==null&&m.dehydrated!==null){if(a===null){if(!g)throw Error(r(318));if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[nn]=o}else Xi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),g=!1}else g=dx(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return o.flags&256?(qn(o),o):(qn(o),null)}return qn(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),rf(o,o.updateQueue),bt(o),null);case 4:return de(),a===null&&Sy(o.stateNode.containerInfo),bt(o),null;case 10:return pa(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)mc(m,!1);else{if(kt!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(b=Hd(a),b!==null){for(o.flags|=128,mc(m,!1),a=b.updateQueue,o.updateQueue=a,rf(o,a),o.subtreeFlags=0,a=u,u=o.child;u!==null;)wN(u,a),u=u.sibling;return ae(Dt,Dt.current&1|2),Ge&&ha(o,m.treeForkCount),o.child}a=a.sibling}m.tail!==null&&mn()>cf&&(o.flags|=128,g=!0,mc(m,!1),o.lanes=4194304)}else{if(!g)if(a=Hd(b),a!==null){if(o.flags|=128,g=!0,a=a.updateQueue,o.updateQueue=a,rf(o,a),mc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!Ge)return bt(o),null}else 2*mn()-m.renderingStartTime>cf&&u!==536870912&&(o.flags|=128,g=!0,mc(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),Ge&&ha(o,m.treeForkCount),a):(bt(o),null);case 22:case 23:return qn(o),Nx(),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&&rf(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),pa(Lt),bt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function I$(a,o){switch(cx(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return pa(Lt),de(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return ke(o),null;case 31:if(o.memoizedState!==null){if(qn(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(qn(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 pa(o.type),null;case 22:case 23:return qn(o),Nx(),a!==null&&Y(Qi),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return pa(Lt),null;case 25:return null;default:return null}}function XA(a,o){switch(cx(o),o.tag){case 3:pa(Lt),de();break;case 26:case 27:case 5:ke(o);break;case 4:de();break;case 31:o.memoizedState!==null&&qn(o);break;case 13:qn(o);break;case 19:Y(Dt);break;case 10:pa(o.type);break;case 22:case 23:qn(o),Nx(),a!==null&&Y(Qi);break;case 24:pa(Lt)}}function pc(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 WA(a){var o=a.updateQueue;if(o!==null){var u=a.stateNode;try{IN(o,u)}catch(m){at(a,a.return,m)}}}function ZA(a,o,u){u.props=rs(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){at(a,o,m)}}function xc(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 Gr(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 QA(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 ny(a,o,u){try{var m=a.stateNode;lB(m,a.type,u,o),m[On]=o}catch(g){at(a,a.return,g)}}function JA(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&pi(a.type)||a.tag===4}function ry(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||JA(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 ay(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=ua));else if(m!==4&&(m===27&&pi(a.type)&&(u=a.stateNode,o=null),a=a.child,a!==null))for(ay(a,o,u),a=a.sibling;a!==null;)ay(a,o,u),a=a.sibling}function af(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(af(a,o,u),a=a.sibling;a!==null;)af(a,o,u),a=a.sibling}function e_(a){var o=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,g=o.attributes;g.length;)o.removeAttributeNode(g[0]);on(o,m,u),o[nn]=a,o[On]=u}catch(b){at(a,a.return,b)}}var ba=!1,It=!1,iy=!1,t_=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function q$(a,o){if(a=a.containerInfo,_y=_f,a=hN(a),Qp(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(Oy={focusedElem:a,selectionRange:u},_f=!1,Qt=o;Qt!==null;)if(o=Qt,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,Qt=a;else for(;Qt!==null;){switch(o=Qt,b=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=o,g=b.memoizedProps,b=b.memoizedState,m=u.stateNode;try{var pe=rs(u.type,g);a=m.getSnapshotBeforeUpdate(pe,b),m.__reactInternalSnapshotBeforeUpdate=a}catch(Se){at(u,u.return,Se)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,u=a.nodeType,u===9)Cy(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Cy(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=o.sibling,a!==null){a.return=o.return,Qt=a;break}Qt=o.return}}function n_(a,o,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:wa(a,u),m&4&&pc(5,u);break;case 1:if(wa(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&&WA(u),m&512&&xc(u,u.return);break;case 3:if(wa(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{IN(a,o)}catch(C){at(u,u.return,C)}}break;case 27:o===null&&m&4&&e_(u);case 26:case 5:wa(a,u),o===null&&m&4&&QA(u),m&512&&xc(u,u.return);break;case 12:wa(a,u);break;case 31:wa(a,u),m&4&&i_(a,u);break;case 13:wa(a,u),m&4&&s_(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=W$.bind(null,u),xB(a,u))));break;case 22:if(m=u.memoizedState!==null||ba,!m){o=o!==null&&o.memoizedState!==null||It,g=ba;var b=It;ba=m,(It=o)&&!b?Sa(a,u,(u.subtreeFlags&8772)!==0):wa(a,u),ba=g,It=b}break;case 30:break;default:wa(a,u)}}function r_(a){var o=a.alternate;o!==null&&(a.alternate=null,r_(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&Dp(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,En=!1;function ja(a,o,u){for(u=u.child;u!==null;)a_(a,o,u),u=u.sibling}function a_(a,o,u){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(Il,u)}catch{}switch(u.tag){case 26:It||Gr(u,o),ja(a,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:It||Gr(u,o);var m=At,g=En;pi(u.type)&&(At=u.stateNode,En=!1),ja(a,o,u),Ac(u.stateNode),At=m,En=g;break;case 5:It||Gr(u,o);case 6:if(m=At,g=En,At=null,ja(a,o,u),At=m,En=g,At!==null)if(En)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&&(En?(a=At,W_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Ao(a)):W_(At,u.stateNode));break;case 4:m=At,g=En,At=u.stateNode.containerInfo,En=!0,ja(a,o,u),At=m,En=g;break;case 0:case 11:case 14:case 15:li(2,u,o),It||li(4,u,o),ja(a,o,u);break;case 1:It||(Gr(u,o),m=u.stateNode,typeof m.componentWillUnmount=="function"&&ZA(u,o,m)),ja(a,o,u);break;case 21:ja(a,o,u);break;case 22:It=(m=It)||u.memoizedState!==null,ja(a,o,u),It=m;break;default:ja(a,o,u)}}function i_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Ao(a)}catch(u){at(o,o.return,u)}}}function s_(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ao(a)}catch(u){at(o,o.return,u)}}function U$(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new t_),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new t_),o;default:throw Error(r(435,a.tag))}}function sf(a,o){var u=U$(a);o.forEach(function(m){if(!u.has(m)){u.add(m);var g=Z$.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,En=!1;break e}break;case 5:At=P.stateNode,En=!1;break e;case 3:case 4:At=P.stateNode.containerInfo,En=!0;break e}P=P.return}if(At===null)throw Error(r(160));a_(b,C,g),At=null,En=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)o_(o,a),o=o.sibling}var Or=null;function o_(a,o){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Cn(o,a),kn(a),m&4&&(li(3,a,a.return),pc(3,a),li(5,a,a.return));break;case 1:Cn(o,a),kn(a),m&512&&(It||u===null||Gr(u,u.return)),m&64&&ba&&(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=Or;if(Cn(o,a),kn(a),m&512&&(It||u===null||Gr(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[Vl]||b[nn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(m),g.head.insertBefore(b,g.querySelector("head > title"))),on(b,m,u),b[nn]=a,Zt(b),m=b;break e;case"link":var C=oO("link","href",g).get(m+(u.href||""));if(C){for(var P=0;P<C.length;P++)if(b=C[P],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){C.splice(P,1);break t}}b=g.createElement(m),on(b,m,u),g.head.appendChild(b);break;case"meta":if(C=oO("meta","content",g).get(m+(u.content||""))){for(P=0;P<C.length;P++)if(b=C[P],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){C.splice(P,1);break t}}b=g.createElement(m),on(b,m,u),g.head.appendChild(b);break;default:throw Error(r(468,m))}b[nn]=a,Zt(b),m=b}a.stateNode=m}else lO(g,a.type,a.stateNode);else a.stateNode=sO(g,m,a.memoizedProps);else b!==m?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,m===null?lO(g,a.type,a.stateNode):sO(g,m,a.memoizedProps)):m===null&&a.stateNode!==null&&ny(a,a.memoizedProps,u.memoizedProps)}break;case 27:Cn(o,a),kn(a),m&512&&(It||u===null||Gr(u,u.return)),u!==null&&m&4&&ny(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Cn(o,a),kn(a),m&512&&(It||u===null||Gr(u,u.return)),a.flags&32){g=a.stateNode;try{Ks(g,"")}catch(pe){at(a,a.return,pe)}}m&4&&a.stateNode!=null&&(g=a.memoizedProps,ny(a,g,u!==null?u.memoizedProps:g)),m&1024&&(iy=!0);break;case 6:if(Cn(o,a),kn(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(wf=null,g=Or,Or=bf(o.containerInfo),Cn(o,a),Or=g,kn(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Ao(o.containerInfo)}catch(pe){at(a,a.return,pe)}iy&&(iy=!1,l_(a));break;case 4:m=Or,Or=bf(a.stateNode.containerInfo),Cn(o,a),kn(a),Or=m;break;case 12:Cn(o,a),kn(a);break;case 31:Cn(o,a),kn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,sf(a,m)));break;case 13:Cn(o,a),kn(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(lf=mn()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,sf(a,m)));break;case 22:g=a.memoizedState!==null;var U=u!==null&&u.memoizedState!==null,Q=ba,ne=It;if(ba=Q||g,It=ne||U,Cn(o,a),It=ne,ba=Q,kn(a),m&8192)e:for(o=a.stateNode,o._visibility=g?o._visibility&-2:o._visibility|1,g&&(u===null||U||ba||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?Z_(ee,!0):Z_(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,sf(a,u))));break;case 19:Cn(o,a),kn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,sf(a,m)));break;case 30:break;case 21:break;default:Cn(o,a),kn(a)}}function kn(a){var o=a.flags;if(o&2){try{for(var u,m=a.return;m!==null;){if(JA(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,b=ry(a);af(a,b,g);break;case 5:var C=u.stateNode;u.flags&32&&(Ks(C,""),u.flags&=-33);var P=ry(a);af(a,P,C);break;case 3:case 4:var U=u.stateNode.containerInfo,Q=ry(a);ay(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 l_(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;l_(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function wa(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)n_(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:Gr(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&ZA(o,o.return,u),as(o);break;case 27:Ac(o.stateNode);case 26:case 5:Gr(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 Sa(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:Sa(g,b,u),pc(4,b);break;case 1:if(Sa(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++)BN(U[g],P)}catch(Q){at(m,m.return,Q)}}u&&C&64&&WA(b),xc(b,b.return);break;case 27:e_(b);case 26:case 5:Sa(g,b,u),u&&m===null&&C&4&&QA(b),xc(b,b.return);break;case 12:Sa(g,b,u);break;case 31:Sa(g,b,u),u&&C&4&&i_(g,b);break;case 13:Sa(g,b,u),u&&C&4&&s_(g,b);break;case 22:b.memoizedState===null&&Sa(g,b,u),xc(b,b.return);break;case 30:break;default:Sa(g,b,u)}o=o.sibling}}function sy(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&&nc(u))}function oy(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&nc(a))}function Tr(a,o,u,m){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)c_(a,o,u,m),o=o.sibling}function c_(a,o,u,m){var g=o.flags;switch(o.tag){case 0:case 11:case 15:Tr(a,o,u,m),g&2048&&pc(9,o);break;case 1:Tr(a,o,u,m);break;case 3:Tr(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&&nc(a)));break;case 12:if(g&2048){Tr(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 Tr(a,o,u,m);break;case 31:Tr(a,o,u,m);break;case 13:Tr(a,o,u,m);break;case 23:break;case 22:b=o.stateNode,C=o.alternate,o.memoizedState!==null?b._visibility&2?Tr(a,o,u,m):yc(a,o):b._visibility&2?Tr(a,o,u,m):(b._visibility|=2,mo(a,o,u,m,(o.subtreeFlags&10256)!==0||!1)),g&2048&&sy(C,o);break;case 24:Tr(a,o,u,m),g&2048&&oy(o.alternate,o);break;default:Tr(a,o,u,m)}}function mo(a,o,u,m,g){for(g=g&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var b=a,C=o,P=u,U=m,Q=C.flags;switch(C.tag){case 0:case 11:case 15:mo(b,C,P,U,g),pc(8,C);break;case 23:break;case 22:var ne=C.stateNode;C.memoizedState!==null?ne._visibility&2?mo(b,C,P,U,g):yc(b,C):(ne._visibility|=2,mo(b,C,P,U,g)),g&&Q&2048&&sy(C.alternate,C);break;case 24:mo(b,C,P,U,g),g&&Q&2048&&oy(C.alternate,C);break;default:mo(b,C,P,U,g)}o=o.sibling}}function yc(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:yc(u,m),g&2048&&sy(m.alternate,m);break;case 24:yc(u,m),g&2048&&oy(m.alternate,m);break;default:yc(u,m)}o=o.sibling}}var gc=8192;function po(a,o,u){if(a.subtreeFlags&gc)for(a=a.child;a!==null;)u_(a,o,u),a=a.sibling}function u_(a,o,u){switch(a.tag){case 26:po(a,o,u),a.flags&gc&&a.memoizedState!==null&&TB(u,Or,a.memoizedState,a.memoizedProps);break;case 5:po(a,o,u);break;case 3:case 4:var m=Or;Or=bf(a.stateNode.containerInfo),po(a,o,u),Or=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=gc,gc=16777216,po(a,o,u),gc=m):po(a,o,u));break;default:po(a,o,u)}}function d_(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 vc(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Qt=m,h_(m,a)}d_(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)f_(a),a=a.sibling}function f_(a){switch(a.tag){case 0:case 11:case 15:vc(a),a.flags&2048&&li(9,a,a.return);break;case 3:vc(a);break;case 12:vc(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,of(a)):vc(a);break;default:vc(a)}}function of(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Qt=m,h_(m,a)}d_(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:li(8,o,o.return),of(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,of(o));break;default:of(o)}a=a.sibling}}function h_(a,o){for(;Qt!==null;){var u=Qt;switch(u.tag){case 0:case 11:case 15:li(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:nc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Qt=m;else e:for(u=a;Qt!==null;){m=Qt;var g=m.sibling,b=m.return;if(r_(m),m===u){Qt=null;break e}if(g!==null){g.return=b,Qt=g;break e}Qt=b}}}var V$={getCacheForType:function(a){var o=an(Lt),u=o.data.get(a);return u===void 0&&(u=a(),o.data.set(a,u)),u},cacheSignal:function(){return an(Lt).controller.signal}},H$=typeof WeakMap=="function"?WeakMap:Map,Je=0,dt=null,qe=null,Ve=0,rt=0,Un=null,ci=!1,xo=!1,ly=!1,Na=0,kt=0,ui=0,is=0,cy=0,Vn=0,yo=0,bc=null,Mn=null,uy=!1,lf=0,m_=0,cf=1/0,uf=null,di=null,Ht=0,fi=null,go=null,Aa=0,dy=0,fy=null,p_=null,jc=0,hy=null;function Hn(){return(Je&2)!==0&&Ve!==0?Ve&-Ve:I.T!==null?vy():k2()}function x_(){if(Vn===0)if((Ve&536870912)===0||Ge){var a=yd;yd<<=1,(yd&3932160)===0&&(yd=262144),Vn=a}else Vn=536870912;return a=In.current,a!==null&&(a.flags|=32),Vn}function Pn(a,o,u){(a===dt&&(rt===2||rt===9)||a.cancelPendingCommit!==null)&&(vo(a,0),hi(a,Ve,Vn,!1)),Ul(a,u),((Je&2)===0||a!==dt)&&(a===dt&&((Je&2)===0&&(is|=u),kt===4&&hi(a,Ve,Vn,!1)),Kr(a))}function y_(a,o,u){if((Je&6)!==0)throw Error(r(327));var m=!u&&(o&127)===0&&(o&a.expiredLanes)===0||ql(a,o),g=m?K$(a,o):py(a,o,!0),b=m;do{if(g===0){xo&&!m&&hi(a,o,0,!1);break}else{if(u=a.current.alternate,b&&!F$(u)){g=py(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=bc;var U=P.current.memoizedState.isDehydrated;if(U&&(vo(P,C).flags|=256),C=py(P,C,!1),C!==2){if(ly&&!U){P.errorRecoveryDisabledLanes|=b,is|=b,g=4;break e}b=Mn,Mn=g,b!==null&&(Mn===null?Mn=b:Mn.push.apply(Mn,b))}g=C}if(b=!1,g!==2)continue}}if(g===1){vo(a,0),hi(a,o,0,!0);break}e:{switch(m=a,b=g,b){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:hi(m,o,Vn,!ci);break e;case 2:Mn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(g=lf+300-mn(),10<g)){if(hi(m,o,Vn,!ci),vd(m,0,!0)!==0)break e;Aa=o,m.timeoutHandle=Y_(g_.bind(null,m,u,Mn,uf,uy,o,Vn,is,yo,ci,b,"Throttled",-0,0),g);break e}g_(m,u,Mn,uf,uy,o,Vn,is,yo,ci,b,null,-0,0)}}break}while(!0);Kr(a)}function g_(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:ua},u_(o,b,oe);var pe=(b&62914560)===b?lf-mn():(b&4194048)===b?m_-mn():0;if(pe=EB(oe,pe),pe!==null){Aa=b,a.cancelPendingCommit=pe(__.bind(null,a,o,b,u,m,g,C,P,U,ne,oe,null,J,ee)),hi(a,b,C,!Q);return}}__(a,o,b,u,m,g,C,P,U)}function F$(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(!$n(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&=~cy,o&=~is,a.suspendedLanes|=o,a.pingedLanes&=~o,m&&(a.warmLanes|=o),m=a.expirationTimes;for(var g=o;0<g;){var b=31-Ln(g),C=1<<b;m[b]=-1,g&=~C}u!==0&&T2(a,u,o)}function df(){return(Je&6)===0?(wc(0),!1):!0}function my(){if(qe!==null){if(rt===0)var a=qe.return;else a=qe,ma=Wi=null,Cx(a),lo=null,ac=0,a=qe;for(;a!==null;)XA(a.alternate,a),a=a.return;qe=null}}function vo(a,o){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,dB(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Aa=0,my(),dt=a,qe=u=fa(a.current,null),Ve=o,rt=0,Un=null,ci=!1,xo=ql(a,o),ly=!1,yo=Vn=cy=is=ui=kt=0,Mn=bc=null,uy=!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-Ln(m),b=1<<g;o|=a[g],m&=~b}return Na=o,kd(),u}function v_(a,o){De=null,I.H=fc,o===oo||o===Bd?(o=DN(),rt=3):o===gx?(o=DN(),rt=4):rt=o===Gx?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Un=o,qe===null&&(kt=1,Jd(a,rr(o,a.current)))}function b_(){var a=In.current;return a===null?!0:(Ve&4194048)===Ve?or===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?a===or:!1}function j_(){var a=I.H;return I.H=fc,a===null?fc:a}function w_(){var a=I.A;return I.A=V$,a}function ff(){kt=4,ci||(Ve&4194048)!==Ve&&In.current!==null||(xo=!0),(ui&134217727)===0&&(is&134217727)===0||dt===null||hi(dt,Ve,Vn,!1)}function py(a,o,u){var m=Je;Je|=2;var g=j_(),b=w_();(dt!==a||Ve!==o)&&(uf=null,vo(a,o)),o=!1;var C=kt;e:do try{if(rt!==0&&qe!==null){var P=qe,U=Un;switch(rt){case 8:my(),C=6;break e;case 3:case 2:case 9:case 6:In.current===null&&(o=!0);var Q=rt;if(rt=0,Un=null,bo(a,P,U,Q),u&&xo){C=0;break e}break;default:Q=rt,rt=0,Un=null,bo(a,P,U,Q)}}G$(),C=kt;break}catch(ne){v_(a,ne)}while(!0);return o&&a.shellSuspendCounter++,ma=Wi=null,Je=m,I.H=g,I.A=b,qe===null&&(dt=null,Ve=0,kd()),C}function G$(){for(;qe!==null;)S_(qe)}function K$(a,o){var u=Je;Je|=2;var m=j_(),g=w_();dt!==a||Ve!==o?(uf=null,cf=mn()+500,vo(a,o)):xo=ql(a,o);e:do try{if(rt!==0&&qe!==null){o=qe;var b=Un;t:switch(rt){case 1:rt=0,Un=null,bo(a,o,b,1);break;case 2:case 9:if(PN(b)){rt=0,Un=null,N_(o);break}o=function(){rt!==2&&rt!==9||dt!==a||(rt=7),Kr(a)},b.then(o,o);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:PN(b)?(rt=0,Un=null,N_(o)):(rt=0,Un=null,bo(a,o,b,7));break;case 5:var C=null;switch(qe.tag){case 26:C=qe.memoizedState;case 5:case 27:var P=qe;if(C?cO(C):P.stateNode.complete){rt=0,Un=null;var U=P.sibling;if(U!==null)qe=U;else{var Q=P.return;Q!==null?(qe=Q,hf(Q)):qe=null}break t}}rt=0,Un=null,bo(a,o,b,5);break;case 6:rt=0,Un=null,bo(a,o,b,6);break;case 8:my(),kt=6;break e;default:throw Error(r(462))}}Y$();break}catch(ne){v_(a,ne)}while(!0);return ma=Wi=null,I.H=m,I.A=g,Je=u,qe!==null?0:(dt=null,Ve=0,kd(),kt)}function Y$(){for(;qe!==null&&!la();)S_(qe)}function S_(a){var o=KA(a.alternate,a,Na);a.memoizedProps=a.pendingProps,o===null?hf(a):qe=o}function N_(a){var o=a,u=o.alternate;switch(o.tag){case 15:case 0:o=qA(u,o,o.pendingProps,o.type,void 0,Ve);break;case 11:o=qA(u,o,o.pendingProps,o.type.render,o.ref,Ve);break;case 5:Cx(o);default:XA(u,o),o=qe=wN(o,Na),o=KA(u,o,Na)}a.memoizedProps=a.pendingProps,o===null?hf(a):qe=o}function bo(a,o,u,m){ma=Wi=null,Cx(o),lo=null,ac=0;var g=o.return;try{if(z$(a,g,o,u,Ve)){kt=1,Jd(a,rr(u,a.current)),qe=null;return}}catch(b){if(g!==null)throw qe=g,b;kt=1,Jd(a,rr(u,a.current)),qe=null;return}o.flags&32768?(Ge||m===1?a=!0:xo||(Ve&536870912)!==0?a=!1:(ci=a=!0,(m===2||m===9||m===3||m===6)&&(m=In.current,m!==null&&m.tag===13&&(m.flags|=16384))),A_(o,a)):hf(o)}function hf(a){var o=a;do{if((o.flags&32768)!==0){A_(o,ci);return}a=o.return;var u=B$(o.alternate,o,Na);if(u!==null){qe=u;return}if(o=o.sibling,o!==null){qe=o;return}qe=o=a}while(o!==null);kt===0&&(kt=5)}function A_(a,o){do{var u=I$(a.alternate,a);if(u!==null){u.flags&=32767,qe=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(a=a.sibling,a!==null)){qe=a;return}qe=a=u}while(a!==null);kt=6,qe=null}function __(a,o,u,m,g,b,C,P,U){a.cancelPendingCommit=null;do mf();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|=rx,O8(a,u,b,C,P,U),a===dt&&(qe=dt=null,Ve=0),go=o,fi=a,Aa=u,dy=b,fy=g,p_=m,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Q$(pd,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=F.p,F.p=2,C=Je,Je|=4;try{q$(a,o,u)}finally{Je=C,F.p=g,I.T=m}}Ht=1,O_(),T_(),E_()}}function O_(){if(Ht===1){Ht=0;var a=fi,o=go,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=I.T,I.T=null;var m=F.p;F.p=2;var g=Je;Je|=4;try{o_(o,a);var b=Oy,C=hN(a.containerInfo),P=b.focusedElem,U=b.selectionRange;if(C!==P&&P&&P.ownerDocument&&fN(P.ownerDocument.documentElement,P)){if(U!==null&&Qp(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,Se=Math.min(U.start,pe),ct=U.end===void 0?Se:Math.min(U.end,pe);!ee.extend&&Se>ct&&(C=ct,ct=Se,Se=C);var X=dN(P,Se),G=dN(P,ct);if(X&&G&&(ee.rangeCount!==1||ee.anchorNode!==X.node||ee.anchorOffset!==X.offset||ee.focusNode!==G.node||ee.focusOffset!==G.offset)){var W=oe.createRange();W.setStart(X.node,X.offset),ee.removeAllRanges(),Se>ct?(ee.addRange(W),ee.extend(G.node,G.offset)):(W.setEnd(G.node,G.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}}_f=!!_y,Oy=_y=null}finally{Je=g,F.p=m,I.T=u}}a.current=o,Ht=2}}function T_(){if(Ht===2){Ht=0;var a=fi,o=go,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=I.T,I.T=null;var m=F.p;F.p=2;var g=Je;Je|=4;try{n_(a,o.alternate,o)}finally{Je=g,F.p=m,I.T=u}}Ht=3}}function E_(){if(Ht===4||Ht===3){Ht=0,Bl();var a=fi,o=go,u=Aa,m=p_;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Ht=5:(Ht=0,go=fi=null,C_(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(di=null),Pp(u),o=o.stateNode,zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(Il,o,void 0,(o.current.flags&128)===128)}catch{}if(m!==null){o=I.T,g=F.p,F.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,F.p=g}}(Aa&3)!==0&&mf(),Kr(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===hy?jc++:(jc=0,hy=a):jc=0,wc(0)}}function C_(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,nc(o)))}function mf(){return O_(),T_(),E_(),k_()}function k_(){if(Ht!==5)return!1;var a=fi,o=dy;dy=0;var u=Pp(Aa),m=I.T,g=F.p;try{F.p=32>u?32:u,I.T=null,u=fy,fy=null;var b=fi,C=Aa;if(Ht=0,go=fi=null,Aa=0,(Je&6)!==0)throw Error(r(331));var P=Je;if(Je|=4,f_(b.current),c_(b,b.current,C,u),Je=P,wc(0,!1),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(Il,b)}catch{}return!0}finally{F.p=g,I.T=m,C_(a,o)}}function M_(a,o,u){o=rr(u,o),o=Fx(a.stateNode,o,2),a=ii(a,o,2),a!==null&&(Ul(a,2),Kr(a))}function at(a,o,u){if(a.tag===3)M_(a,a,u);else for(;o!==null;){if(o.tag===3){M_(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=rr(u,a),u=PA(2),m=ii(o,u,2),m!==null&&(RA(u,m,o,a),Ul(m,2),Kr(m));break}}o=o.return}}function xy(a,o,u){var m=a.pingCache;if(m===null){m=a.pingCache=new H$;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)||(ly=!0,g.add(u),a=X$.bind(null,a,o,u),o.then(a,a))}function X$(a,o,u){var m=a.pingCache;m!==null&&m.delete(o),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,dt===a&&(Ve&u)===u&&(kt===4||kt===3&&(Ve&62914560)===Ve&&300>mn()-lf?(Je&2)===0&&vo(a,0):cy|=u,yo===Ve&&(yo=0)),Kr(a)}function P_(a,o){o===0&&(o=O2()),a=Ki(a,o),a!==null&&(Ul(a,o),Kr(a))}function W$(a){var o=a.memoizedState,u=0;o!==null&&(u=o.retryLane),P_(a,u)}function Z$(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),P_(a,u)}function Q$(a,o){return Xa(a,o)}var pf=null,jo=null,yy=!1,xf=!1,gy=!1,mi=0;function Kr(a){a!==jo&&a.next===null&&(jo===null?pf=jo=a:jo=jo.next=a),xf=!0,yy||(yy=!0,eB())}function wc(a,o){if(!gy&&xf){gy=!0;do for(var u=!1,m=pf;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-Ln(42|a)+1)-1,b&=g&~(C&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,L_(m,b))}else b=Ve,b=vd(m,m===dt?b:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(b&3)===0||ql(m,b)||(u=!0,L_(m,b));m=m.next}while(u);gy=!1}}function J$(){R_()}function R_(){xf=yy=!1;var a=0;mi!==0&&uB()&&(a=mi);for(var o=mn(),u=null,m=pf;m!==null;){var g=m.next,b=D_(m,o);b===0?(m.next=null,u===null?pf=g:u.next=g,g===null&&(jo=u)):(u=m,(a!==0||(b&3)!==0)&&(xf=!0)),m=g}Ht!==0&&Ht!==5||wc(a),mi!==0&&(mi=0)}function D_(a,o){for(var u=a.suspendedLanes,m=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var C=31-Ln(b),P=1<<C,U=g[C];U===-1?((P&u)===0||(P&m)!==0)&&(g[C]=_8(P,o)):U<=o&&(a.expiredLanes|=P),b&=~P}if(o=dt,u=Ve,u=vd(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&&Ar(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||ql(a,u)){if(o=u&-u,o===a.callbackPriority)return o;switch(m!==null&&Ar(m),Pp(u)){case 2:case 8:u=A2;break;case 32:u=pd;break;case 268435456:u=_2;break;default:u=pd}return m=z_.bind(null,a),u=Xa(u,m),a.callbackPriority=o,a.callbackNode=u,o}return m!==null&&m!==null&&Ar(m),a.callbackPriority=2,a.callbackNode=null,2}function z_(a,o){if(Ht!==0&&Ht!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(mf()&&a.callbackNode!==u)return null;var m=Ve;return m=vd(a,a===dt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(y_(a,m,o),D_(a,mn()),a.callbackNode!=null&&a.callbackNode===u?z_.bind(null,a):null)}function L_(a,o){if(mf())return null;y_(a,o,!0)}function eB(){fB(function(){(Je&6)!==0?Xa(N2,J$):R_()})}function vy(){if(mi===0){var a=io;a===0&&(a=xd,xd<<=1,(xd&261888)===0&&(xd=256)),mi=a}return mi}function $_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Sd(""+a)}function B_(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 tB(a,o,u,m,g){if(o==="submit"&&u&&u.stateNode===g){var b=$_((g[On]||null).action),C=m.submitter;C&&(o=(o=C[On]||null)?$_(o.formAction):C.getAttribute("formAction"),o!==null&&(b=o,C=null));var P=new Od("action","action",null,m,g);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(mi!==0){var U=C?B_(g,C):new FormData(g);Bx(u,{pending:!0,data:U,method:g.method,action:b},null,U)}}else typeof b=="function"&&(P.preventDefault(),U=C?B_(g,C):new FormData(g),Bx(u,{pending:!0,data:U,method:g.method,action:b},b,U))},currentTarget:g}]})}}for(var by=0;by<nx.length;by++){var jy=nx[by],nB=jy.toLowerCase(),rB=jy[0].toUpperCase()+jy.slice(1);_r(nB,"on"+rB)}_r(xN,"onAnimationEnd"),_r(yN,"onAnimationIteration"),_r(gN,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(v$,"onTransitionRun"),_r(b$,"onTransitionStart"),_r(j$,"onTransitionCancel"),_r(vN,"onTransitionEnd"),Fs("onMouseEnter",["mouseout","mouseover"]),Fs("onMouseLeave",["mouseout","mouseover"]),Fs("onPointerEnter",["pointerout","pointerover"]),Fs("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 Sc="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(" "),aB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sc));function I_(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){Cd(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){Cd(ne)}g.currentTarget=null,b=U}}}}function Ue(a,o){var u=o[Rp];u===void 0&&(u=o[Rp]=new Set);var m=a+"__bubble";u.has(m)||(q_(o,a,2,!1),u.add(m))}function wy(a,o,u){var m=0;o&&(m|=4),q_(u,a,m,o)}var yf="_reactListening"+Math.random().toString(36).slice(2);function Sy(a){if(!a[yf]){a[yf]=!0,R2.forEach(function(u){u!=="selectionchange"&&(aB.has(u)||wy(u,!1,a),wy(u,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[yf]||(o[yf]=!0,wy("selectionchange",!1,o))}}function q_(a,o,u,m){switch(xO(o)){case 2:var g=MB;break;case 8:g=PB;break;default:g=$y}u=g.bind(null,o,u,a),g=void 0,!Vp||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 Ny(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=Us(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}G2(function(){var Q=b,ne=qp(u),oe=[];e:{var J=bN.get(a);if(J!==void 0){var ee=Od,pe=a;switch(a){case"keypress":if(Ad(u)===0)break e;case"keydown":case"keyup":ee=Z8;break;case"focusin":pe="focus",ee=Kp;break;case"focusout":pe="blur",ee=Kp;break;case"beforeblur":case"afterblur":ee=Kp;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=X2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=B8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=e$;break;case xN:case yN:case gN:ee=U8;break;case vN:ee=n$;break;case"scroll":case"scrollend":ee=L8;break;case"wheel":ee=a$;break;case"copy":case"cut":case"paste":ee=H8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Z2;break;case"toggle":case"beforetoggle":ee=s$}var Se=(o&4)!==0,ct=!Se&&(a==="scroll"||a==="scrollend"),X=Se?J!==null?J+"Capture":null:J;Se=[];for(var G=Q,W;G!==null;){var se=G;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||X===null||(se=Fl(G,X),se!=null&&Se.push(Nc(G,se,W))),ct)break;G=G.return}0<Se.length&&(J=new ee(J,pe,null,u,ne),oe.push({event:J,listeners:Se}))}}if((o&7)===0){e:{if(J=a==="mouseover"||a==="pointerover",ee=a==="mouseout"||a==="pointerout",J&&u!==Ip&&(pe=u.relatedTarget||u.fromElement)&&(Us(pe)||pe[qs]))break e;if((ee||J)&&(J=ne.window===ne?ne:(J=ne.ownerDocument)?J.defaultView||J.parentWindow:window,ee?(pe=u.relatedTarget||u.toElement,ee=Q,pe=pe?Us(pe):null,pe!==null&&(ct=l(pe),Se=pe.tag,pe!==ct||Se!==5&&Se!==27&&Se!==6)&&(pe=null)):(ee=null,pe=Q),ee!==pe)){if(Se=X2,se="onMouseLeave",X="onMouseEnter",G="mouse",(a==="pointerout"||a==="pointerover")&&(Se=Z2,se="onPointerLeave",X="onPointerEnter",G="pointer"),ct=ee==null?J:Hl(ee),W=pe==null?J:Hl(pe),J=new Se(se,G+"leave",ee,u,ne),J.target=ct,J.relatedTarget=W,se=null,Us(ne)===Q&&(Se=new Se(X,G+"enter",pe,u,ne),Se.target=W,Se.relatedTarget=ct,se=Se),ct=se,ee&&pe)t:{for(Se=iB,X=ee,G=pe,W=0,se=X;se;se=Se(se))W++;se=0;for(var ve=G;ve;ve=Se(ve))se++;for(;0<W-se;)X=Se(X),W--;for(;0<se-W;)G=Se(G),se--;for(;W--;){if(X===G||G!==null&&X===G.alternate){Se=X;break t}X=Se(X),G=Se(G)}Se=null}else Se=null;ee!==null&&U_(oe,J,ee,Se,!1),pe!==null&&ct!==null&&U_(oe,ct,pe,Se,!0)}}e:{if(J=Q?Hl(Q):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var Xe=iN;else if(rN(J))if(sN)Xe=x$;else{Xe=m$;var ge=h$}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&Bp(Q.elementType)&&(Xe=iN):Xe=p$;if(Xe&&(Xe=Xe(a,Q))){aN(oe,Xe,u,ne);break e}ge&&ge(a,J,Q),a==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&$p(J,"number",J.value)}switch(ge=Q?Hl(Q):window,a){case"focusin":(rN(ge)||ge.contentEditable==="true")&&(Zs=ge,Jp=Q,Jl=null);break;case"focusout":Jl=Jp=Zs=null;break;case"mousedown":ex=!0;break;case"contextmenu":case"mouseup":case"dragend":ex=!1,mN(oe,u,ne);break;case"selectionchange":if(g$)break;case"keydown":case"keyup":mN(oe,u,ne)}var $e;if(Xp)e:{switch(a){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Ws?tN(a,u)&&(He="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(He="onCompositionStart");He&&(Q2&&u.locale!=="ko"&&(Ws||He!=="onCompositionStart"?He==="onCompositionEnd"&&Ws&&($e=K2()):(Qa=ne,Hp="value"in Qa?Qa.value:Qa.textContent,Ws=!0)),ge=gf(Q,He),0<ge.length&&(He=new W2(He,a,null,u,ne),oe.push({event:He,listeners:ge}),$e?He.data=$e:($e=nN(u),$e!==null&&(He.data=$e)))),($e=l$?c$(a,u):u$(a,u))&&(He=gf(Q,"onBeforeInput"),0<He.length&&(ge=new W2("onBeforeInput","beforeinput",null,u,ne),oe.push({event:ge,listeners:He}),ge.data=$e)),tB(oe,a,Q,u,ne)}I_(oe,o)})}function Nc(a,o,u){return{instance:a,listener:o,currentTarget:u}}function gf(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=Fl(a,u),g!=null&&m.unshift(Nc(a,g,b)),g=Fl(a,o),g!=null&&m.push(Nc(a,g,b))),a.tag===3)return m;a=a.return}return[]}function iB(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function U_(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=Fl(u,b),Q!=null&&C.unshift(Nc(u,Q,U))):g||(Q=Fl(u,b),Q!=null&&C.push(Nc(u,Q,U)))),u=u.return}C.length!==0&&a.push({event:o,listeners:C})}var sB=/\r\n?/g,oB=/\u0000|\uFFFD/g;function V_(a){return(typeof a=="string"?a:""+a).replace(sB,`
|
||
`).replace(oB,"")}function H_(a,o){return o=V_(o),V_(a)===o}function lt(a,o,u,m,g,b){switch(u){case"children":typeof m=="string"?o==="body"||o==="textarea"&&m===""||Ks(a,m):(typeof m=="number"||typeof m=="bigint")&&o!=="body"&&Ks(a,""+m);break;case"className":jd(a,"class",m);break;case"tabIndex":jd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":jd(a,u,m);break;case"style":H2(a,m,b);break;case"data":if(o!=="object"){jd(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=Sd(""+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"&<(a,o,"name",g.name,g,null),lt(a,o,"formEncType",g.formEncType,g,null),lt(a,o,"formMethod",g.formMethod,g,null),lt(a,o,"formTarget",g.formTarget,g,null)):(lt(a,o,"encType",g.encType,g,null),lt(a,o,"method",g.method,g,null),lt(a,o,"target",g.target,g,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Sd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ua);break;case"onScroll":m!=null&&Ue("scroll",a);break;case"onScrollEnd":m!=null&&Ue("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=Sd(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Ue("beforetoggle",a),Ue("toggle",a),bd(a,"popover",m);break;case"xlinkActuate":ca(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ca(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ca(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ca(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ca(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ca(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ca(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ca(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ca(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":bd(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=D8.get(u)||u,bd(a,u,m))}}function Ay(a,o,u,m,g,b){switch(u){case"style":H2(a,m,b);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Ks(a,m):(typeof m=="number"||typeof m=="bigint")&&Ks(a,""+m);break;case"onScroll":m!=null&&Ue("scroll",a);break;case"onScrollEnd":m!=null&&Ue("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ua);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!D2.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[On]||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,""):bd(a,u,m)}}}function on(a,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",a),Ue("load",a);var m=!1,g=!1,b;for(b in u)if(u.hasOwnProperty(b)){var C=u[b];if(C!=null)switch(b){case"src":m=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,b,C,u,null)}}g&<(a,o,"srcSet",u.srcSet,u,null),m&<(a,o,"src",u.src,u,null);return;case"input":Ue("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:lt(a,o,m,ne,u,null)}}I2(a,b,P,U,Q,C,g,!1);return;case"select":Ue("invalid",a),m=C=b=null;for(g in u)if(u.hasOwnProperty(g)&&(P=u[g],P!=null))switch(g){case"value":b=P;break;case"defaultValue":C=P;break;case"multiple":m=P;default:lt(a,o,g,P,u,null)}o=b,u=C,a.multiple=!!m,o!=null?Gs(a,!!m,o,!1):u!=null&&Gs(a,!!m,u,!0);return;case"textarea":Ue("invalid",a),b=g=m=null;for(C in u)if(u.hasOwnProperty(C)&&(P=u[C],P!=null))switch(C){case"value":m=P;break;case"defaultValue":g=P;break;case"children":b=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:lt(a,o,C,P,u,null)}U2(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:lt(a,o,U,m,u,null)}return;case"dialog":Ue("beforetoggle",a),Ue("toggle",a),Ue("cancel",a),Ue("close",a);break;case"iframe":case"object":Ue("load",a);break;case"video":case"audio":for(m=0;m<Sc.length;m++)Ue(Sc[m],a);break;case"image":Ue("error",a),Ue("load",a);break;case"details":Ue("toggle",a);break;case"embed":case"source":case"link":Ue("error",a),Ue("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in u)if(u.hasOwnProperty(Q)&&(m=u[Q],m!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,Q,m,u,null)}return;default:if(Bp(o)){for(ne in u)u.hasOwnProperty(ne)&&(m=u[ne],m!==void 0&&Ay(a,o,ne,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&<(a,o,P,m,u,null))}function lB(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)||lt(a,o,ee,null,m,oe)}}for(var J in m){var ee=m[J];if(oe=u[J],m.hasOwnProperty(J)&&(ee!=null||oe!=null))switch(J){case"type":b=ee;break;case"name":g=ee;break;case"checked":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&<(a,o,J,ee,m,oe)}}Lp(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)||lt(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&<(a,o,g,b,m,U)}o=P,u=C,m=ee,J!=null?Gs(a,!!u,J,!1):!!m!=!!u&&(o!=null?Gs(a,!!u,o,!0):Gs(a,!!u,u?[]:"",!1));return;case"textarea":ee=J=null;for(P in u)if(g=u[P],u.hasOwnProperty(P)&&g!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:lt(a,o,P,null,m,g)}for(C in m)if(g=m[C],b=u[C],m.hasOwnProperty(C)&&(g!=null||b!=null))switch(C){case"value":J=g;break;case"defaultValue":ee=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==b&<(a,o,C,g,m,b)}q2(a,J,ee);return;case"option":for(var pe in u)if(J=u[pe],u.hasOwnProperty(pe)&&J!=null&&!m.hasOwnProperty(pe))switch(pe){case"selected":a.selected=!1;break;default:lt(a,o,pe,null,m,J)}for(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:lt(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 Se in u)J=u[Se],u.hasOwnProperty(Se)&&J!=null&&!m.hasOwnProperty(Se)&<(a,o,Se,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:lt(a,o,Q,J,m,ee)}return;default:if(Bp(o)){for(var ct in u)J=u[ct],u.hasOwnProperty(ct)&&J!==void 0&&!m.hasOwnProperty(ct)&&Ay(a,o,ct,void 0,m,J);for(ne in m)J=m[ne],ee=u[ne],!m.hasOwnProperty(ne)||J===ee||J===void 0&&ee===void 0||Ay(a,o,ne,J,m,ee);return}}for(var X in u)J=u[X],u.hasOwnProperty(X)&&J!=null&&!m.hasOwnProperty(X)&<(a,o,X,null,m,J);for(oe in m)J=m[oe],ee=u[oe],!m.hasOwnProperty(oe)||J===ee||J==null&&ee==null||lt(a,o,oe,J,m,ee)}function F_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cB(){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&&F_(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&&F_(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 _y=null,Oy=null;function vf(a){return a.nodeType===9?a:a.ownerDocument}function G_(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function K_(a,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 Ty(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 Ey=null;function uB(){var a=window.event;return a&&a.type==="popstate"?a===Ey?!1:(Ey=a,!0):(Ey=null,!1)}var Y_=typeof setTimeout=="function"?setTimeout:void 0,dB=typeof clearTimeout=="function"?clearTimeout:void 0,X_=typeof Promise=="function"?Promise:void 0,fB=typeof queueMicrotask=="function"?queueMicrotask:typeof X_<"u"?function(a){return X_.resolve(null).then(a).catch(hB)}:Y_;function hB(a){setTimeout(function(){throw a})}function pi(a){return a==="head"}function W_(a,o){var u=o,m=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(g),Ao(o);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Ac(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Ac(u);for(var b=u.firstChild;b;){var C=b.nextSibling,P=b.nodeName;b[Vl]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=C}}else u==="body"&&Ac(a.ownerDocument.body);u=g}while(u);Ao(o)}function Z_(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 Cy(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":Cy(u),Dp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function mB(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[Vl])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=lr(a.nextSibling),a===null)break}return null}function pB(a,o,u){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=lr(a.nextSibling),a===null))return null;return a}function Q_(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=lr(a.nextSibling),a===null))return null;return a}function ky(a){return a.data==="$?"||a.data==="$~"}function My(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function xB(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 lr(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 Py=null;function J_(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(o===0)return lr(a.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}a=a.nextSibling}return null}function eO(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 tO(a,o,u){switch(o=vf(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 Ac(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);Dp(a)}var cr=new Map,nO=new Set;function bf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var _a=F.d;F.d={f:yB,r:gB,D:vB,C:bB,L:jB,m:wB,X:NB,S:SB,M:AB};function yB(){var a=_a.f(),o=df();return a||o}function gB(a){var o=Vs(a);o!==null&&o.tag===5&&o.type==="form"?vA(o):_a.r(a)}var wo=typeof document>"u"?null:document;function rO(a,o,u){var m=wo;if(m&&typeof o=="string"&&o){var g=tr(o);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),nO.has(g)||(nO.add(g),a={rel:a,crossOrigin:u,href:o},m.querySelector(g)===null&&(o=m.createElement("link"),on(o,"link",a),Zt(o),m.head.appendChild(o)))}}function vB(a){_a.D(a),rO("dns-prefetch",a,null)}function bB(a,o){_a.C(a,o),rO("preconnect",a,o)}function jB(a,o,u){_a.L(a,o,u);var m=wo;if(m&&a&&o){var g='link[rel="preload"][as="'+tr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+tr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+tr(u.imageSizes)+'"]')):g+='[href="'+tr(a)+'"]';var b=g;switch(o){case"style":b=So(a);break;case"script":b=No(a)}cr.has(b)||(a=x({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:a,as:o},u),cr.set(b,a),m.querySelector(g)!==null||o==="style"&&m.querySelector(_c(b))||o==="script"&&m.querySelector(Oc(b))||(o=m.createElement("link"),on(o,"link",a),Zt(o),m.head.appendChild(o)))}}function wB(a,o){_a.m(a,o);var u=wo;if(u&&a){var m=o&&typeof o.as=="string"?o.as:"script",g='link[rel="modulepreload"][as="'+tr(m)+'"][href="'+tr(a)+'"]',b=g;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=No(a)}if(!cr.has(b)&&(a=x({rel:"modulepreload",href:a},o),cr.set(b,a),u.querySelector(g)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Oc(b)))return}m=u.createElement("link"),on(m,"link",a),Zt(m),u.head.appendChild(m)}}}function SB(a,o,u){_a.S(a,o,u);var m=wo;if(m&&a){var g=Hs(m).hoistableStyles,b=So(a);o=o||"default";var C=g.get(b);if(!C){var P={loading:0,preload:null};if(C=m.querySelector(_c(b)))P.loading=5;else{a=x({rel:"stylesheet",href:a,"data-precedence":o},u),(u=cr.get(b))&&Ry(a,u);var U=C=m.createElement("link");Zt(U),on(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,jf(C,o,m)}C={type:"stylesheet",instance:C,count:1,state:P},g.set(b,C)}}}function NB(a,o){_a.X(a,o);var u=wo;if(u&&a){var m=Hs(u).hoistableScripts,g=No(a),b=m.get(g);b||(b=u.querySelector(Oc(g)),b||(a=x({src:a,async:!0},o),(o=cr.get(g))&&Dy(a,o),b=u.createElement("script"),Zt(b),on(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function AB(a,o){_a.M(a,o);var u=wo;if(u&&a){var m=Hs(u).hoistableScripts,g=No(a),b=m.get(g);b||(b=u.querySelector(Oc(g)),b||(a=x({src:a,async:!0,type:"module"},o),(o=cr.get(g))&&Dy(a,o),b=u.createElement("script"),Zt(b),on(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function aO(a,o,u,m){var g=(g=we.current)?bf(g):null;if(!g)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=So(u.href),u=Hs(g).hoistableStyles,m=u.get(o),m||(m={type:"style",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=So(u.href);var b=Hs(g).hoistableStyles,C=b.get(a);if(C||(g=g.ownerDocument||g,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,C),(b=g.querySelector(_c(a)))&&!b._p&&(C.instance=b,C.state.loading=5),cr.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},cr.set(a,u),b||_B(g,a,u,C.state))),o&&m===null)throw Error(r(528,""));return C}if(o&&m!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=No(u),u=Hs(g).hoistableScripts,m=u.get(o),m||(m={type:"script",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function So(a){return'href="'+tr(a)+'"'}function _c(a){return'link[rel="stylesheet"]['+a+"]"}function iO(a){return x({},a,{"data-precedence":a.precedence,precedence:null})}function _B(a,o,u,m){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?m.loading=1:(o=a.createElement("link"),m.preload=o,o.addEventListener("load",function(){return m.loading|=1}),o.addEventListener("error",function(){return m.loading|=2}),on(o,"link",u),Zt(o),a.head.appendChild(o))}function No(a){return'[src="'+tr(a)+'"]'}function Oc(a){return"script[async]"+a}function sO(a,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var m=a.querySelector('style[data-href~="'+tr(u.href)+'"]');if(m)return o.instance=m,Zt(m),m;var g=x({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Zt(m),on(m,"style",g),jf(m,u.precedence,a),o.instance=m;case"stylesheet":g=So(u.href);var b=a.querySelector(_c(g));if(b)return o.state.loading|=4,o.instance=b,Zt(b),b;m=iO(u),(g=cr.get(g))&&Ry(m,g),b=(a.ownerDocument||a).createElement("link"),Zt(b);var C=b;return C._p=new Promise(function(P,U){C.onload=P,C.onerror=U}),on(b,"link",m),o.state.loading|=4,jf(b,u.precedence,a),o.instance=b;case"script":return b=No(u.src),(g=a.querySelector(Oc(b)))?(o.instance=g,Zt(g),g):(m=u,(g=cr.get(b))&&(m=x({},u),Dy(m,g)),a=a.ownerDocument||a,g=a.createElement("script"),Zt(g),on(g,"link",m),a.head.appendChild(g),o.instance=g);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(m=o.instance,o.state.loading|=4,jf(m,u.precedence,a));return o.instance}function jf(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 Ry(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function Dy(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var wf=null;function oO(a,o,u){if(wf===null){var m=new Map,g=wf=new Map;g.set(u,m)}else g=wf,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[Vl]||b[nn]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var C=b.getAttribute(o)||"";C=a+C;var P=m.get(C);P?P.push(b):m.set(C,[b])}}return m}function lO(a,o,u){a=a.ownerDocument||a,a.head.insertBefore(u,o==="title"?a.querySelector("head > title"):null)}function OB(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 cO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function TB(a,o,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=So(m.href),b=o.querySelector(_c(g));if(b){o=b._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=Sf.bind(a),o.then(a,a)),u.state.loading|=4,u.instance=b,Zt(b);return}b=o.ownerDocument||o,m=iO(m),(g=cr.get(g))&&Ry(m,g),b=b.createElement("link"),Zt(b);var C=b;C._p=new Promise(function(P,U){C.onload=P,C.onerror=U}),on(b,"link",m),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Sf.bind(a),o.addEventListener("load",u),o.addEventListener("error",u))}}var zy=0;function EB(a,o){return a.stylesheets&&a.count===0&&Af(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Af(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+o);0<a.imgBytes&&zy===0&&(zy=62500*cB());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Af(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>zy?50:800)+o);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(g)}}:null}function Sf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Af(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Nf=null;function Af(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Nf=new Map,o.forEach(CB,a),Nf=null,Sf.call(a))}function CB(a,o){if(!(o.state.loading&4)){var u=Nf.get(a);if(u)var m=u.get(null);else{u=new Map,Nf.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=Sf.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 Tc={$$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 uO(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=Bn(3,null,null,o),a.current=b,b.stateNode=a,o=px(),o.refCount++,a.pooledCache=o,o.refCount++,b.memoizedState={element:m,isDehydrated:u,cache:o},vx(b),a}function dO(a){return a?(a=eo,a):eo}function fO(a,o,u,m,g,b){g=dO(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&&(Pn(u,a,o),sc(u,a,o))}function hO(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<o?u:o}}function Ly(a,o){hO(a,o),(a=a.alternate)&&hO(a,o)}function mO(a){if(a.tag===13||a.tag===31){var o=Ki(a,67108864);o!==null&&Pn(o,a,67108864),Ly(a,67108864)}}function pO(a){if(a.tag===13||a.tag===31){var o=Hn();o=Mp(o);var u=Ki(a,o);u!==null&&Pn(u,a,o),Ly(a,o)}}var _f=!0;function MB(a,o,u,m){var g=I.T;I.T=null;var b=F.p;try{F.p=2,$y(a,o,u,m)}finally{F.p=b,I.T=g}}function PB(a,o,u,m){var g=I.T;I.T=null;var b=F.p;try{F.p=8,$y(a,o,u,m)}finally{F.p=b,I.T=g}}function $y(a,o,u,m){if(_f){var g=By(m);if(g===null)Ny(a,o,m,Of,u),yO(a,m);else if(DB(g,a,o,u,m))m.stopPropagation();else if(yO(a,m),o&4&&-1<RB.indexOf(a)){for(;g!==null;){var b=Vs(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var C=Ui(b.pendingLanes);if(C!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;C;){var U=1<<31-Ln(C);P.entanglements[1]|=U,C&=~U}Kr(b),(Je&6)===0&&(cf=mn()+500,wc(0))}}break;case 31:case 13:P=Ki(b,2),P!==null&&Pn(P,b,2),df(),Ly(b,2)}if(b=By(m),b===null&&Ny(a,o,m,Of,u),b===g)break;g=b}g!==null&&m.stopPropagation()}else Ny(a,o,m,null,u)}}function By(a){return a=qp(a),Iy(a)}var Of=null;function Iy(a){if(Of=null,a=Us(a),a!==null){var o=l(a);if(o===null)a=null;else{var u=o.tag;if(u===13){if(a=c(o),a!==null)return a;a=null}else if(u===31){if(a=d(o),a!==null)return a;a=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return Of=a,null}function xO(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(md()){case N2:return 2;case A2:return 8;case pd:case b8:return 32;case _2:return 268435456;default:return 32}default:return 32}}var qy=!1,xi=null,yi=null,gi=null,Ec=new Map,Cc=new Map,vi=[],RB="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 yO(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":Ec.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cc.delete(o.pointerId)}}function kc(a,o,u,m,g,b){return a===null||a.nativeEvent!==b?(a={blockedOn:o,domEventName:u,eventSystemFlags:m,nativeEvent:b,targetContainers:[g]},o!==null&&(o=Vs(o),o!==null&&mO(o)),a):(a.eventSystemFlags|=m,o=a.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),a)}function DB(a,o,u,m,g){switch(o){case"focusin":return xi=kc(xi,a,o,u,m,g),!0;case"dragenter":return yi=kc(yi,a,o,u,m,g),!0;case"mouseover":return gi=kc(gi,a,o,u,m,g),!0;case"pointerover":var b=g.pointerId;return Ec.set(b,kc(Ec.get(b)||null,a,o,u,m,g)),!0;case"gotpointercapture":return b=g.pointerId,Cc.set(b,kc(Cc.get(b)||null,a,o,u,m,g)),!0}return!1}function gO(a){var o=Us(a.target);if(o!==null){var u=l(o);if(u!==null){if(o=u.tag,o===13){if(o=c(u),o!==null){a.blockedOn=o,M2(a.priority,function(){pO(u)});return}}else if(o===31){if(o=d(u),o!==null){a.blockedOn=o,M2(a.priority,function(){pO(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 Tf(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var u=By(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);Ip=m,u.target.dispatchEvent(m),Ip=null}else return o=Vs(u),o!==null&&mO(o),a.blockedOn=u,!1;o.shift()}return!0}function vO(a,o,u){Tf(a)&&u.delete(o)}function zB(){qy=!1,xi!==null&&Tf(xi)&&(xi=null),yi!==null&&Tf(yi)&&(yi=null),gi!==null&&Tf(gi)&&(gi=null),Ec.forEach(vO),Cc.forEach(vO)}function Ef(a,o){a.blockedOn===o&&(a.blockedOn=null,qy||(qy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,zB)))}var Cf=null;function bO(a){Cf!==a&&(Cf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cf===a&&(Cf=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(Iy(m||u)===null)continue;break}var b=Vs(u);b!==null&&(a.splice(o,3),o-=3,Bx(b,{pending:!0,data:g,method:u.method,action:m},m,g))}}))}function Ao(a){function o(U){return Ef(U,a)}xi!==null&&Ef(xi,a),yi!==null&&Ef(yi,a),gi!==null&&Ef(gi,a),Ec.forEach(o),Cc.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);)gO(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[On]||null;if(typeof b=="function")C||bO(u);else if(C){var P=null;if(b&&b.hasAttribute("formAction")){if(g=b,C=b[On]||null)P=C.formAction;else if(Iy(g)!==null)continue}else P=C.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),bO(u)}}}function jO(){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 Uy(a){this._internalRoot=a}kf.prototype.render=Uy.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,m=Hn();fO(u,m,a,o,null,null)},kf.prototype.unmount=Uy.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;fO(a.current,2,null,a,null,null),df(),o[qs]=null}};function kf(a){this._internalRoot=a}kf.prototype.unstable_scheduleHydration=function(a){if(a){var o=k2();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&&gO(a)}};var wO=t.version;if(wO!=="19.2.7")throw Error(r(527,wO,"19.2.7"));F.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 LB={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mf.isDisabled&&Mf.supportsFiber)try{Il=Mf.inject(LB),zn=Mf}catch{}}return Pc.createRoot=function(a,o){if(!i(a))throw Error(r(299));var u=!1,m="",g=EA,b=CA,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=uO(a,1,!1,null,null,u,m,null,g,b,C,jO),a[qs]=o.current,Sy(a),new Uy(o)},Pc.hydrateRoot=function(a,o,u){if(!i(a))throw Error(r(299));var m=!1,g="",b=EA,C=CA,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=uO(a,1,!0,o,u??null,m,g,U,b,C,P,jO),o.context=dO(null),u=o.current,m=Hn(),m=Mp(m),g=ai(m),g.callback=null,ii(u,g,m),u=m,o.current.lanes=u,Ul(o,u),Kr(o),a[qs]=o.current,Sy(a),new kf(o)},Pc.version="19.2.7",Pc}var MO;function KB(){if(MO)return Fy.exports;MO=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(),Fy.exports=GB(),Fy.exports}var YB=KB();/**
|
||
* 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 _w=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,NR=/^[\\/]{2}/;function XB(e,t){return t+e.replace(/\\/g,"/")}var PO="popstate";function RO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function WB(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 b1("",{pathname:c,search:d,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",l?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:cu(i)}return QB(t,n,null,e)}function Ot(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ZB(){return Math.random().toString(36).substring(2,10)}function DO(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 b1(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Sl(t):t,state:n,key:t&&t.key||r||ZB(),mask:i}}function cu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Sl(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 QB(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=RO(v)?v:b1(S.location,v,A);h=p()+1;let _=DO(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=RO(v)?v:b1(S.location,v,A);h=p();let _=DO(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 JB(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(PO,x),f=v,()=>{i.removeEventListener(PO,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 JB(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:cu(t);return i=i.replace(/ $/,"%20"),!n&&NR.test(i)&&(i=r+i),new URL(i,r)}function AR(e,t,n="/"){return eI(e,t,n,!1)}function eI(e,t,n,r,i){let l=typeof t=="string"?Sl(t):t,c=Ba(l.pathname||"/",n);if(c==null)return null;let d=tI(e),f=null,h=fI(c);for(let p=0;f==null&&p<d.length;++p)f=dI(d[p],h,r);return f}function tI(e){let t=_R(e);return nI(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=Dr([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:cI(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 nI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:uI(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var rI=/^:[\w-]+$/,aI=3,iI=2,sI=1,oI=10,lI=-2,zO=e=>e==="*";function cI(e,t){let n=e.split("/"),r=n.length;return n.some(zO)&&(r+=lI),t&&(r+=iI),n.filter(i=>!zO(i)).reduce((i,l)=>i+(rI.test(l)?aI:l===""?sI:oI),r)}function uI(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 dI(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):vh(x,p),j=f.route;if(!y&&h&&n&&!r[r.length-1].route.index&&(y=vh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!y)return null;Object.assign(i,y.params),c.push({params:i,pathname:Dr([l,y.pathname]),pathnameBase:pI(Dr([l,y.pathnameBase])),route:j}),y.pathnameBase!=="/"&&(l=Dr([l,y.pathnameBase]))}return c}function vh(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){br(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 fI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!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 hI(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Sl(e):e,l;return n?(n=CR(n),n.startsWith("/")?l=LO(n.substring(1),"/"):l=LO(n,t)):l=t,{pathname:l,search:xI(r),hash:yI(i)}}function LO(e,t){let n=bh(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Xy(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 mI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ow(e){let t=mI(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=Sl(e):(i={...e},Ot(!i.pathname||!i.pathname.includes("?"),Xy("?","pathname","search",i)),Ot(!i.pathname||!i.pathname.includes("#"),Xy("#","pathname","hash",i)),Ot(!i.search||!i.search.includes("#"),Xy("#","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=hI(i,d),h=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}var CR=e=>e.replace(/[\\/]{2,}/g,"/"),Dr=e=>CR(e.join("/")),bh=e=>e.replace(/\/+$/,""),pI=e=>bh(e).replace(/^\/*/,"/"),xI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,gI=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 vI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bI(e){let t=e.map(n=>n.route.path).filter(Boolean);return Dr(t)||"/"}var kR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function MR(e,t){let n=e;if(typeof n!="string"||!_w.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(kR)try{let l=new URL(window.location.href),c=NR.test(n)?new URL(XB(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{br(!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 jI=["GET",...PR];new Set(jI);var wI=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function SI(e){try{return wI.includes(new URL(e).protocol)}catch{return!1}}var Nl=k.createContext(null);Nl.displayName="DataRouter";var Lm=k.createContext(null);Lm.displayName="DataRouterState";var RR=k.createContext(!1);function NI(){return k.useContext(RR)}var DR=k.createContext({isTransitioning:!1});DR.displayName="ViewTransition";var AI=k.createContext(new Map);AI.displayName="Fetchers";var _I=k.createContext(null);_I.displayName="Await";var Jn=k.createContext(null);Jn.displayName="Navigation";var Zu=k.createContext(null);Zu.displayName="Location";var qr=k.createContext({outlet:null,matches:[],isDataRoute:!1});qr.displayName="Route";var Tw=k.createContext(null);Tw.displayName="RouteError";var zR="REACT_ROUTER_ERROR",OI="REDIRECT",TI="ROUTE_ERROR_RESPONSE";function EI(e){if(e.startsWith(`${zR}:${OI}:{`))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 CI(e){if(e.startsWith(`${zR}:${TI}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new gI(t.status,t.statusText,t.data)}catch{}}function kI(e,{relative:t}={}){Ot(Al(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=k.useContext(Jn),{hash:i,pathname:l,search:c}=Qu(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:Dr([n,l])),r.createHref({pathname:d,search:c,hash:i})}function Al(){return k.useContext(Zu)!=null}function _n(){return Ot(Al(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Zu).location}var LR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $R(e){k.useContext(Jn).static||k.useLayoutEffect(e)}function Ds(){let{isDataRoute:e}=k.useContext(qr);return e?GI():MI()}function MI(){Ot(Al(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(Nl),{basename:t,navigator:n}=k.useContext(Jn),{matches:r}=k.useContext(qr),{pathname:i}=_n(),l=JSON.stringify(Ow(r)),c=k.useRef(!1);return $R(()=>{c.current=!0}),k.useCallback((f,h={})=>{if(br(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:Dr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,l,i,e])}var PI=k.createContext(null);function RI(e){let t=k.useContext(qr).outlet;return k.useMemo(()=>t&&k.createElement(PI.Provider,{value:e},t),[t,e])}function Qu(e,{relative:t}={}){let{matches:n}=k.useContext(qr),{pathname:r}=_n(),i=JSON.stringify(Ow(n));return k.useMemo(()=>zm(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function DI(e,t){return BR(e,t)}function BR(e,t,n){var v;Ot(Al(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=k.useContext(Jn),{matches:i}=k.useContext(qr),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=_n(),x;if(t){let A=typeof t=="string"?Sl(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});br(h||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),br(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=II(w&&w.map(A=>Object.assign({},A,{params:Object.assign({},c,A.params),pathname:Dr([f,r.encodeLocation?r.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?f:Dr([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(Zu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},S):S}function zI(){let e=FI(),t=vI(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 LI=k.createElement(zI,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=CI(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(qr.Provider,{value:this.props.routeContext},k.createElement(Tw.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement($I,{error:e},t):t}};IR.contextType=RR;var Wy=new WeakMap;function $I({children:e,error:t}){let{basename:n}=k.useContext(Jn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=EI(t.digest);if(r){let i=Wy.get(t);if(i)throw i;let l=MR(r.location,n),c=l.absoluteURL||l.to;if(SI(c))throw new Error("Invalid redirect location");if(kR&&!Wy.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 Wy.set(t,d),d}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c}`})}}return e}function BI({routeContext:e,match:t,children:n}){let r=k.useContext(Nl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(qr.Provider,{value:e},n)}function II(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:bI(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||LI,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(BI,{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 Ew(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qI(e){let t=k.useContext(Nl);return Ot(t,Ew(e)),t}function UI(e){let t=k.useContext(Lm);return Ot(t,Ew(e)),t}function VI(e){let t=k.useContext(qr);return Ot(t,Ew(e)),t}function Cw(e){let t=VI(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 HI(){return Cw("useRouteId")}function FI(){var r;let e=k.useContext(Tw),t=UI("useRouteError"),n=Cw("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function GI(){let{router:e}=qI("useNavigate"),t=Cw("useNavigate"),n=k.useRef(!1);return $R(()=>{n.current=!0}),k.useCallback(async(i,l={})=>{br(n.current,LR),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var $O={};function qR(e,t,n){!t&&!$O[e]&&($O[e]=!0,br(!1,n))}k.memo(KI);function KI({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(Al(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=k.useContext(Jn);br(!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(qr),{pathname:c}=_n(),d=Ds(),f=zm(e,Ow(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 YI(e){return RI(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 XI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:l=!1,useTransitions:c}){Ot(!Al(),"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=Sl(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 br(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(Jn.Provider,{value:f},k.createElement(Zu.Provider,{children:t,value:S}))}function WI({children:e,location:t}){return DI(j1(e),t)}function j1(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,j1(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=j1(r.props.children,l)),n.push(c)}),n}var sh="get",oh="application/x-www-form-urlencoded";function $m(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ZI(e){return $m(e)&&e.tagName.toLowerCase()==="button"}function QI(e){return $m(e)&&e.tagName.toLowerCase()==="form"}function JI(e){return $m(e)&&e.tagName.toLowerCase()==="input"}function eq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tq(e,t){return e.button===0&&(!t||t==="_self")&&!eq(e)}function w1(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 nq(e,t){let n=w1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}var Rf=null;function rq(){if(Rf===null)try{new FormData(document.createElement("form"),0),Rf=!1}catch{Rf=!0}return Rf}var aq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zy(e){return e!=null&&!aq.has(e)?(br(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oh}"`),null):e}function iq(e,t){let n,r,i,l,c;if(QI(e)){let d=e.getAttribute("action");r=d?Ba(d,t):null,n=e.getAttribute("method")||sh,i=Zy(e.getAttribute("enctype"))||oh,l=new FormData(e)}else if(ZI(e)||JI(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")||sh,i=Zy(e.getAttribute("formenctype"))||Zy(d.getAttribute("enctype"))||oh,l=new FormData(d,e),!rq()){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=sh,r=null,i=oh,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 Mw(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=`${bh(t)}/_root.${r}`:i.pathname=`${bh(i.pathname)}.${r}`,i}async function sq(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 oq(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 lq(e,t,n){let r=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await sq(l,n);return c.links?c.links():[]}return[]}));return fq(r.flat(1).filter(oq).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function BO(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 cq(e,t,{includeHydrateFallback:n}={}){return uq(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 uq(e){return[...new Set(e)]}function dq(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function fq(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let l=JSON.stringify(dq(i));return n.has(l)||(n.add(l),r.push({key:l,link:i})),r},[])}function Pw(){let e=k.useContext(Nl);return Mw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function hq(){let e=k.useContext(Lm);return Mw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Rw=k.createContext(void 0);Rw.displayName="FrameworkContext";function Bm(){let e=k.useContext(Rw);return Mw(e,"You must render this element inside a <HydratedRouter> element"),e}function mq(e,t){let n=k.useContext(Rw),[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:Rc(d,j),onBlur:Rc(f,w),onMouseEnter:Rc(h,j),onMouseLeave:Rc(p,w),onTouchStart:Rc(x,j)}]:[!1,y,{}]}function Rc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pq({page:e,...t}){let n=NI(),{nonce:r}=Bm(),{router:i}=Pw(),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(yq,{page:e,matches:l,...t}):k.createElement(gq,{page:e,matches:l,...t})):null}function xq(e){let{manifest:t,routeModules:n}=Bm(),[r,i]=k.useState([]);return k.useEffect(()=>{let l=!1;return lq(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),r}function yq({page:e,matches:t,...n}){let r=_n(),{future:i}=Bm(),{basename:l}=Pw(),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 gq({page:e,matches:t,...n}){let r=_n(),{future:i,manifest:l,routeModules:c}=Bm(),{basename:d}=Pw(),{loaderData:f,matches:h}=hq(),p=k.useMemo(()=>BO(e,t,h,l,r,"data"),[e,t,h,l,r]),x=k.useMemo(()=>BO(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(()=>cq(x,l),[x,l]),w=xq(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 vq(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var bq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bq&&(window.__reactRouterVersion="7.18.1")}catch{}function jq({basename:e,children:t,useTransitions:n,window:r}){let i=k.useRef();i.current==null&&(i.current=WB({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(XI,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:n})}var Os=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(Jn),_=typeof p=="string"&&_w.test(p),T=MR(p,v);p=T.to;let N=kI(p,{relative:i}),E=_n(),M=null;if(d){let H=zm(d,[],E.mask?E.mask.pathname:"/",!0);v!=="/"&&(H.pathname=H.pathname==="/"?v:Dr([v,H.pathname])),M=A.createHref(H)}let[R,B,D]=mq(r,w),z=Nq(p,{replace:c,mask:d,state:f,target:h,preventScrollReset:x,relative:i,viewTransition:y,defaultShouldRevalidate:j,useTransitions:O});function $(H){t&&t(H),H.defaultPrevented||z(H)}let L=!(T.isExternal||l),K=k.createElement("a",{...w,...D,href:(L?M:void 0)||T.absoluteURL||N,onClick:L?$:t,ref:vq(S,B),target:h,"data-discover":!_&&n==="render"?"true":void 0});return R&&!_?k.createElement(k.Fragment,null,K,k.createElement(pq,{page:N})):K});Os.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=Qu(c,{relative:h.relative}),y=_n(),j=k.useContext(Lm),{navigator:w,basename:S}=k.useContext(Jn),v=j!=null&&Cq(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 D=typeof l=="function"?l(M):l;return k.createElement(Os,{...h,"aria-current":R,className:B,ref:p,style:D,to:c,viewTransition:d},typeof f=="function"?f(M):f)});VR.displayName="NavLink";var wq=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:l,method:c=sh,action:d,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:y,...j},w)=>{let{useTransitions:S}=k.useContext(Jn),v=Tq(),A=Eq(d,{relative:h}),O=c.toLowerCase()==="get"?"get":"post",_=typeof d=="string"&&_w.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})});wq.displayName="Form";function Sq(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(Nl);return Ot(t,Sq(e)),t}function Nq(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let p=Ds(),x=_n(),y=Qu(e,{relative:c});return k.useCallback(j=>{if(tq(j,t)){j.preventDefault();let w=n!==void 0?n:cu(x)===cu(y),S=()=>p(e,{replace:w,mask:r,state:i,preventScrollReset:l,relative:c,viewTransition:d,defaultShouldRevalidate:f});h?k.startTransition(()=>S()):S()}},[x,p,y,n,r,i,t,e,l,c,d,f,h])}function Aq(e){br(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(w1(e)),n=k.useRef(!1),r=_n(),i=k.useMemo(()=>nq(r.search,n.current?null:t.current),[r.search]),l=Ds(),c=k.useCallback((d,f)=>{const h=w1(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,l("?"+h,f)},[l,i]);return[i,c]}var _q=0,Oq=()=>`__${String(++_q)}__`;function Tq(){let{router:e}=HR("useSubmit"),{basename:t}=k.useContext(Jn),n=HI(),r=e.fetch,i=e.navigate;return k.useCallback(async(l,c={})=>{let{action:d,method:f,encType:h,formData:p,body:x}=iq(l,t);if(c.navigate===!1){let y=c.fetcherKey||Oq();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 Eq(e,{relative:t}={}){let{basename:n}=k.useContext(Jn),r=k.useContext(qr);Ot(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),l={...Qu(e||".",{relative:t})},c=_n();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:Dr([n,l.pathname])),cu(l)}function Cq(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=Qu(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 vh(i.pathname,c)!=null||vh(i.pathname,l)!=null}const IO=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?IO(e):IO),Mq=e=>e;function Pq(e,t=Mq){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 qO=e=>{const t=kq(e),n=r=>Pq(t,r);return Object.assign(n,t),n},FR=(e=>e?qO(e):qO);function Rq(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 S1=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return S1(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return S1(r)(n)}}}},Dq=(e,t)=>(n,r,i)=>{let l={storage:Rq(()=>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 S1(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},zq=Dq,Br=FR()(zq(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})})),Dw=k.createContext({});function zw(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const Lq=typeof window<"u",Lw=Lq?k.useLayoutEffect:k.useEffect,Im=k.createContext(null);function $w(e,t){e.indexOf(t)===-1&&e.push(t)}function jh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const na=(e,t,n)=>n>t?t:n<e?e:n;let Bw=()=>{};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 gr=e=>e,Ju=(...e)=>e.reduce((t,n)=>r=>n(t(r))),uu=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Iw{constructor(){this.subscriptions=[]}add(t){return $w(this.subscriptions,t),()=>jh(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 Wn=e=>e*1e3,pr=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,$q=1e-7,Bq=12;function Iq(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)>$q&&++d<Bq);return c}function ed(e,t,n,r){if(e===t&&n===r)return gr;const i=l=>Iq(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=ed(.33,1.53,.69,.99),qw=JR(eD),tD=QR(qw),nD=e=>e>=1?1:(e*=2)<1?.5*qw(e):.5*(2-Math.pow(2,-10*(e-1))),Uw=e=>1-Math.sin(Math.acos(e)),rD=JR(Uw),aD=QR(Uw),qq=ed(.42,0,1,1),Uq=ed(0,0,.58,1),iD=ed(.42,0,.58,1),Vq=e=>Array.isArray(e)&&typeof e[0]!="number",sD=e=>Array.isArray(e)&&typeof e[0]=="number",Hq={linear:gr,easeIn:qq,easeInOut:iD,easeOut:Uq,circIn:Uw,circInOut:aD,circOut:rD,backIn:qw,backInOut:tD,backOut:eD,anticipate:nD},Fq=e=>typeof e=="string",UO=e=>{if(sD(e)){Bw(e.length===4);const[t,n,r,i]=e;return ed(t,n,r,i)}else if(Fq(e))return Hq[e];return e},Df=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Gq(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 Kq=40;function oD(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Df.reduce((_,T)=>(_[T]=Gq(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,Kq),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:Df.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<Df.length;T++)c[Df[T]].cancel(_)},state:i,steps:c}}const{schedule:ht,cancel:ki,state:cn,steps:Qy}=oD(typeof requestAnimationFrame<"u"?requestAnimationFrame:gr,!0);let lh;function Yq(){lh=void 0}const bn={now:()=>(lh===void 0&&bn.set(cn.isProcessing||Ci.useManualTiming?cn.timestamp:performance.now()),lh),set:e=>{lh=e,queueMicrotask(Yq)}},lD=e=>t=>typeof t=="string"&&t.startsWith(e),cD=lD("--"),Xq=lD("var(--"),Vw=e=>Xq(e)?Wq.test(e.split("/*")[0].trim()):!1,Wq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function VO(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const _l={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},du={..._l,transform:e=>na(0,1,e)},zf={..._l,default:1},Qc=e=>Math.round(e*1e5)/1e5,Hw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Zq(e){return e==null}const Qq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fw=(e,t)=>n=>!!(typeof n=="string"&&Qq.test(n)&&n.startsWith(e)||t&&!Zq(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(Hw);return{[e]:parseFloat(i),[t]:parseFloat(l),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},Jq=e=>na(0,255,e),Jy={..._l,transform:e=>Math.round(Jq(e))},xs={test:Fw("rgb","red"),parse:uD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jy.transform(e)+", "+Jy.transform(t)+", "+Jy.transform(n)+", "+Qc(du.transform(r))+")"};function e7(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 N1={test:Fw("#"),parse:e7,transform:xs.transform},td=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ea=td("deg"),Qr=td("%"),xe=td("px"),t7=td("vh"),n7=td("vw"),HO={...Qr,parse:e=>Qr.parse(e)/100,transform:e=>Qr.transform(e*100)},ko={test:Fw("hsl","hue"),parse:uD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qr.transform(Qc(t))+", "+Qr.transform(Qc(n))+", "+Qc(du.transform(r))+")"},Ut={test:e=>xs.test(e)||N1.test(e)||ko.test(e),parse:e=>xs.test(e)?xs.parse(e):ko.test(e)?ko.parse(e):N1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xs.transform(e):ko.transform(e),getAnimatableNone:e=>{const t=Ut.parse(e);return t.alpha=0,Ut.transform(t)}},r7=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function a7(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Hw))==null?void 0:t.length)||0)+(((n=e.match(r7))==null?void 0:n.length)||0)>0}const dD="number",fD="color",i7="var",s7="var(",FO="${}",o7=/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 Ko(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let l=0;const d=t.replace(o7,f=>(Ut.test(f)?(r.color.push(l),i.push(fD),n.push(Ut.parse(f))):f.startsWith(s7)?(r.var.push(l),i.push(i7),n.push(f)):(r.number.push(l),i.push(dD),n.push(parseFloat(f))),++l,FO)).split(FO);return{values:n,split:d,indexes:r,types:i}}function l7(e){return Ko(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+=Qc(r[l]):c===fD?i+=Ut.transform(r[l]):i+=r[l]}return i}}function c7(e){return hD(Ko(e))}const u7=e=>typeof e=="number"?0:Ut.test(e)?Ut.getAnimatableNone(e):e,d7=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:u7(e);function f7(e){const t=Ko(e);return hD(t)(t.values.map((r,i)=>d7(r,t.split[i])))}const zr={test:a7,parse:l7,createTransformer:c7,getAnimatableNone:f7};function eg(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 h7({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=eg(f,d,e+1/3),l=eg(f,d,e),c=eg(f,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:r}}function wh(e,t){return n=>n>0?t:e}const ft=(e,t,n)=>e+(t-e)*n,tg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},m7=[N1,xs,ko],p7=e=>m7.find(t=>t.test(e));function GO(e){const t=p7(e);if(!t)return!1;let n=t.parse(e);return t===ko&&(n=h7(n)),n}const KO=(e,t)=>{const n=GO(e),r=GO(t);if(!n||!r)return wh(e,t);const i={...n};return l=>(i.red=tg(n.red,r.red,l),i.green=tg(n.green,r.green,l),i.blue=tg(n.blue,r.blue,l),i.alpha=ft(n.alpha,r.alpha,l),xs.transform(i))},A1=new Set(["none","hidden"]);function x7(e,t){return A1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function y7(e,t){return n=>ft(e,t,n)}function Gw(e){return typeof e=="number"?y7:typeof e=="string"?Vw(e)?wh:Ut.test(e)?KO:b7:Array.isArray(e)?mD:typeof e=="object"?Ut.test(e)?KO:g7:wh}function mD(e,t){const n=[...e],r=n.length,i=e.map((l,c)=>Gw(l)(l,t[c]));return l=>{for(let c=0;c<r;c++)n[c]=i[c](l);return n}}function g7(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Gw(e[i])(e[i],t[i]));return i=>{for(const l in r)n[l]=r[l](i);return n}}function v7(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 b7=(e,t)=>{const n=zr.createTransformer(t),r=Ko(e),i=Ko(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?A1.has(e)&&!i.values.length||A1.has(t)&&!r.values.length?x7(e,t):Ju(mD(v7(r,i),i.values),n):wh(e,t)};function pD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ft(e,t,n):Gw(e)(e,t)}const j7=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>ki(t),now:()=>cn.isProcessing?cn.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)})`},Sh=2e4;function Kw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Sh;)t+=n,r=e.next(t);return t>=Sh?1/0:t}function w7(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Kw(r),Sh);return{type:"keyframes",ease:l=>r.next(i*l).value/t,duration:pr(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 _1(e,t){return e*Math.sqrt(1-t*t)}const S7=12;function N7(e,t,n){let r=n;for(let i=1;i<S7;i++)r=r-e(r)/t(r);return r}const ng=.001;function A7({duration:e=Mt.duration,bounce:t=Mt.bounce,velocity:n=Mt.velocity,mass:r=Mt.mass}){let i,l,c=1-t;c=na(Mt.minDamping,Mt.maxDamping,c),e=na(Mt.minDuration,Mt.maxDuration,pr(e)),c<1?(i=h=>{const p=h*c,x=p*e,y=p-n,j=_1(h,c),w=Math.exp(-x);return ng-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=_1(Math.pow(h,2),c);return(-i(h)+ng>0?-1:1)*((y-j)*w)/S}):(i=h=>{const p=Math.exp(-h*e),x=(h-n)*e+1;return-ng+p*x},l=h=>{const p=Math.exp(-h*e),x=(n-h)*(e*e);return p*x});const d=5/e,f=N7(i,l,d);if(e=Wn(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 _7=["duration","bounce"],O7=["stiffness","damping","mass"];function YO(e,t){return t.some(n=>e[n]!==void 0)}function T7(e){let t={velocity:Mt.velocity,stiffness:Mt.stiffness,damping:Mt.damping,mass:Mt.mass,isResolvedFromDuration:!1,...e};if(!YO(e,O7)&&YO(e,_7))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,l=2*na(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Mt.mass,stiffness:i,damping:l}}else{const n=A7({...e,velocity:0});t={...t,...n,mass:Mt.mass},t.isResolvedFromDuration=!0}return t}function Nh(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}=T7({...n,velocity:-pr(n.velocity||0)}),w=y||0,S=h/(2*Math.sqrt(f*p)),v=c-l,A=pr(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=_1(A,S),E=(w+S*A*v)/N,_=D=>{const z=Math.exp(-S*A*D);return c-z*(E*Math.sin(N*D)+v*Math.cos(N*D))},M=S*A*E+v*N,R=S*A*v-E*N,T=D=>Math.exp(-S*A*D)*(M*Math.sin(N*D)+R*Math.cos(N*D));else if(S===1){_=z=>c-Math.exp(-A*z)*(v+(w+A*v)*z);const D=w+A*v;T=z=>Math.exp(-A*z)*(A*D*z-w)}else{const D=A*Math.sqrt(S*S-1);_=K=>{const H=Math.exp(-S*A*K),I=Math.min(D*K,300);return c-H*((w+S*A*v)*Math.sinh(I)+D*v*Math.cosh(I))/D};const z=(w+S*A*v)/D,$=S*A*z-v*D,L=S*A*v-z*D;T=K=>{const H=Math.exp(-S*A*K),I=Math.min(D*K,300);return H*($*Math.sinh(I)+L*Math.cosh(I))}}const B={calculatedDuration:j&&x||null,velocity:D=>Wn(T(D)),next:D=>{if(!j&&S<1){const $=Math.exp(-S*A*D),L=Math.sin(N*D),K=Math.cos(N*D),H=c-$*(E*L+v*K),I=Wn($*(M*L+R*K));return d.done=Math.abs(I)<=r&&Math.abs(c-H)<=i,d.value=d.done?c:H,d}const z=_(D);if(j)d.done=D>=x;else{const $=Wn(T(D));d.done=Math.abs($)<=r&&Math.abs(c-z)<=i}return d.value=d.done?c:z,d},toString:()=>{const D=Math.min(Kw(B),Sh),z=xD($=>B.next(D*$).value,D,30);return D+"ms "+z},toTransition:()=>{}};return B}Nh.applyToOptions=e=>{const t=w7(e,100,Nh);return e.ease=t.ease,e.duration=Wn(t.duration),e.type="keyframes",e};const E7=5;function yD(e,t,n){const r=Math.max(t-E7,0);return WR(n-e(r),t-r)}function O1({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),D=_(R);y.done=Math.abs(B)<=h,y.value=y.done?A:D};let N,E;const M=R=>{j(y.value)&&(N=R,E=Nh({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 C7(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]||gr:t;d=Ju(f,d)}r.push(d)}return r}function k7(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const l=e.length;if(Bw(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=C7(t,r,i),f=d.length,h=p=>{if(c&&p<e[0])return t[0];let x=0;if(f>1)for(;x<e.length-2&&!(p<e[x+1]);x++);const y=uu(e[x],e[x+1],p);return d[x](y)};return n?p=>h(na(e[0],e[l-1],p)):h}function M7(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=uu(0,t,r);e.push(ft(n,1,i))}}function P7(e){const t=[0];return M7(t,e.length-1),t}function R7(e,t){return e.map(n=>n*t)}function D7(e,t){return e.map(()=>t||iD).splice(0,e.length-1)}function Jc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Vq(r)?r.map(UO):UO(r),l={done:!1,value:t[0]},c=R7(n&&n.length===t.length?n:P7(t),e),d=k7(c,t,{ease:Array.isArray(i)?i:D7(t,i)});return{calculatedDuration:e,next:f=>(l.value=d(f),l.done=f>=e,l)}}const z7=e=>e!==null;function qm(e,{repeat:t,repeatType:n="loop"},r,i=1){const l=e.filter(z7),d=i<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!d||r===void 0?l[d]:r}const L7={decay:O1,inertia:O1,tween:Jc,keyframes:Jc,spring:Nh};function gD(e){typeof e.type=="string"&&(e.type=L7[e.type])}class Yw{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 $7=e=>e/100;class Ah extends Yw{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=Jc,repeat:r=0,repeatDelay:i=0,repeatType:l,velocity:c=0}=t;let{keyframes:d}=t;const f=n||Jc;f!==Jc&&typeof d[0]!="number"&&(this.mixKeyframes=Ju($7,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=Kw(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),D=R%1;!D&&R>=1&&(D=1),D===1&&B--,B=Math.min(B,x+1),!!(B%2)&&(y==="reverse"?(D=1-D,j&&(D-=j/d)):y==="mirror"&&(T=c)),_=na(0,1,D)*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!==O1&&(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 pr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pr(t)}get time(){return pr(this.currentTime)}set time(t){t=Wn(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=pr(this.currentTime))}play(){var i,l;if(this.isStopped)return;const{driver:t=j7,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 B7(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ys=e=>e*180/Math.PI,T1=e=>{const t=ys(Math.atan2(e[1],e[0]));return E1(t)},I7={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:T1,rotateZ:T1,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},E1=e=>(e=e%360,e<0&&(e+=360),e),XO=T1,WO=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ZO=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),q7={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:WO,scaleY:ZO,scale:e=>(WO(e)+ZO(e))/2,rotateX:e=>E1(ys(Math.atan2(e[6],e[5]))),rotateY:e=>E1(ys(Math.atan2(-e[2],e[0]))),rotateZ:XO,rotate:XO,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 C1(e){return e.includes("scale")?1:0}function k1(e,t){if(!e||e==="none")return C1(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=q7,i=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=I7,i=d}if(!i)return C1(t);const l=r[t],c=i[1].split(",").map(V7);return typeof l=="function"?l(c):c[l]}const U7=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return k1(n,t)};function V7(e){return parseFloat(e.trim())}const Ol=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tl=new Set([...Ol,"pathRotation"]),QO=e=>e===_l||e===xe,H7=new Set(["x","y","z"]),F7=Ol.filter(e=>!H7.has(e));function G7(e){const t=[];return F7.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 M1=!1,P1=!1,R1=!1;function vD(){if(P1){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=G7(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)})}P1=!1,M1=!1,ws.forEach(e=>e.complete(R1)),ws.clear()}function bD(){ws.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(P1=!0)})}function K7(){R1=!0,bD(),vD(),R1=!1}class Xw{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),M1||(M1=!0,ht.read(bD),ht.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])}B7(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 Y7=e=>e.startsWith("--");function jD(e,t,n){Y7(t)?e.style.setProperty(t,n):e.style[t]=n}const X7={};function wD(e,t){const n=XR(e);return()=>X7[t]??n()}const W7=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"),Yc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,JO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yc([0,.65,.55,1]),circOut:Yc([.55,0,1,.45]),backIn:Yc([.31,.01,.66,-.59]),backOut:Yc([.33,1.53,.69,.99])};function ND(e,t){if(e)return typeof e=="function"?SD()?xD(e,t):"ease-out":sD(e)?Yc(e):Array.isArray(e)?e.map(n=>ND(n,t)||JO.easeOut):JO[e]}function Z7(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 Q7({type:e,...t}){return AD(e)&&SD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class _D extends Yw{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,Bw(typeof t.type!="string");const h=Q7(t);this.animation=Z7(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 pr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pr(t)}get time(){return pr(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wn(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&&W7()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),gr):i(this)}}const OD={anticipate:nD,backInOut:tD,circInOut:aD};function J7(e){return e in OD}function e9(e){typeof e.ease=="string"&&J7(e.ease)&&(e.ease=OD[e.ease])}const rg=10;class t9 extends _D{constructor(t){e9(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 Ah({...c,autoplay:!1}),f=Math.max(rg,bn.now()-this.startTime),h=na(0,rg,f-rg),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 eT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zr.test(e)||e==="0")&&!e.startsWith("url("));function n9(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 r9(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=eT(i,t),d=eT(l,t);return!c||!d?!1:n9(e)||(n==="spring"||AD(n))&&r}function D1(e){e.duration=0,e.type="keyframes"}const TD=new Set(["opacity","clipPath","filter","transform"]),a9=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function i9(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&a9.test(e[t]))return!0;return!1}const s9=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),o9=XR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function l9(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 o9()&&n&&(TD.has(n)||s9.has(n)&&i9(d))&&(n!=="transform"||!p)&&!h&&!r&&i!=="mirror"&&l!==0&&c!=="inertia"}const c9=40;class u9 extends Yw{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)||Xw;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;r9(t,l,c,d)||(x=!1,(Ci.instantAnimations||!f)&&(p==null||p(qm(t,r,n))),t[0]=t[t.length-1],D1(r),r.repeat=0);const j={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>c9?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=x&&!h&&l9(j),S=(O=(A=j.motionValue)==null?void 0:A.owner)==null?void 0:O.current;let v;if(w)try{v=new t9({...j,element:S})}catch{v=new Ah(j)}else v=new Ah(j);v.finished.then(()=>{this.notifyFinished()}).catch(gr),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(),K7()),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 tT=30,d9=e=>!isNaN(parseFloat(e));class f9{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=d9(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 Iw);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>tT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,tT);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 Yo(e,t){return new f9(e,t)}function CD(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ww(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?CD(n,e):n}const h9={type:"spring",stiffness:500,damping:25,restSpeed:10},m9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),p9={type:"keyframes",duration:.8},x9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},y9=(e,{keyframes:t})=>t.length>2?p9:Tl.has(e)?e.startsWith("scale")?m9(t[1]):h9:x9,g9=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function v9(e){for(const t in e)if(!g9.has(t))return!0;return!1}const Zw=(e,t,n,r={},i,l)=>c=>{const d=Ww(r,e)||{},f=d.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Wn(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};v9(d)||Object.assign(p,y9(e,p)),p.duration&&(p.duration=Wn(p.duration)),p.repeatDelay&&(p.repeatDelay=Wn(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let x=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(D1(p),p.delay===0&&(x=!0)),(Ci.instantAnimations||Ci.skipAnimations||i!=null&&i.shouldSkipAnimations||d.skipAnimations)&&(x=!0,D1(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){ht.update(()=>{p.onUpdate(y),p.onComplete()});return}}return d.isSync?new Ah(p):new u9(p)},b9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function j9(e){const t=b9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function kD(e,t,n=1){const[r,i]=j9(e);if(!r)return;const l=window.getComputedStyle(t).getPropertyValue(r);if(l){const c=l.trim();return GR(c)?parseFloat(c):c}return Vw(i)?kD(i,t,n+1):i}function nT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qw(e,t,n,r){if(typeof t=="function"){const[i,l]=nT(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]=nT(r);t=t(n!==void 0?n:e.custom,i,l)}return t}function Ss(e,t,n){const r=e.getProps();return Qw(r,t,n!==void 0?n:r.custom,e)}const MD=new Set(["width","height","top","left","right","bottom",...Ol]),z1=e=>Array.isArray(e);function w9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yo(n))}function S9(e){return z1(e)?e[e.length-1]||0:e}function N9(e,t){const n=Ss(e,t);let{transitionEnd:r={},transition:i={},...l}=n||{};l={...l,...r};for(const c in l){const d=S9(l[c]);w9(e,c,d)}}const un=e=>!!(e&&e.getVelocity);function A9(e){return!!(un(e)&&e.add)}function L1(e,t){const n=e.getValue("willChange");if(A9(n))return n.add(t);if(!n&&Ci.WillChange){const r=new Ci.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Jw(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const _9="framerAppearId",PD="data-"+Jw(_9);function RD(e){return e.props[PD]}function O9({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?CD(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&&O9(y,w))continue;const A={delay:n,...Ww(l||{},w)};p&&(A.skipAnimations=!0);const O=S.get();if(O!==void 0&&!S.isAnimating()&&!Array.isArray(v)&&v===O&&!A.velocity){ht.update(()=>S.set(v));continue}let _=!1;if(window.MotionHandoffAnimation){const E=RD(e);if(E){const M=window.MotionHandoffAnimation(E,w,ht);M!==null&&(A.startTime=M,_=!0)}}L1(e,w);const T=h??e.shouldReduceMotion;S.start(Zw(w,S,v,T&&MD.has(w)?{type:!1}:A,e,_));const N=S.animation;N&&x.push(N)}if(c){const w=()=>ht.update(()=>{c&&N9(e,c)});x.length?Promise.all(x).then(w):w()}return x}function $1(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 T9(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 T9(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($1(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 E9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(l=>$1(e,l,n));r=Promise.all(i)}else if(typeof t=="string")r=$1(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 C9={test:e=>e==="auto",parse:e=>e},zD=e=>t=>t.test(e),LD=[_l,xe,Qr,Ea,n7,t7,C9],rT=e=>LD.find(zD(e));function k9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||YR(e):!0}const M9=new Set(["brightness","contrast","saturate","opacity"]);function P9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Hw)||[];if(!r)return e;const i=n.replace(r,"");let l=M9.has(t)?1:0;return r!==n&&(l*=100),t+"("+l+i+")"}const R9=/\b([a-z-]*)\(.*?\)/gu,B1={...zr,getAnimatableNone:e=>{const t=e.match(R9);return t?t.map(P9).join(" "):e}},I1={...zr,getAnimatableNone:e=>{const t=zr.parse(e);return zr.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},aT={..._l,transform:Math.round},D9={rotate:Ea,pathRotation:Ea,rotateX:Ea,rotateY:Ea,rotateZ:Ea,scale:zf,scaleX:zf,scaleY:zf,scaleZ:zf,skew:Ea,skewX:Ea,skewY:Ea,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:du,originX:HO,originY:HO,originZ:xe},_h={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,...D9,zIndex:aT,fillOpacity:du,strokeOpacity:du,numOctaves:aT},z9={..._h,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:B1,WebkitFilter:B1,mask:I1,WebkitMask:I1},$D=e=>z9[e],L9=new Set([B1,I1]);function BD(e,t){let n=$D(e);return L9.has(n)||(n=zr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $9=new Set(["auto","none","0"]);function B9(e,t,n){let r=0,i;for(;r<e.length&&!i;){const l=e[r];typeof l=="string"&&!$9.has(l)&&Ko(l).values.length&&(i=e[r]),r++}if(i&&n)for(const l of t)e[l]=BD(n,i)}class I9 extends Xw{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(),Vw(x))){const y=kD(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=rT(i),d=rT(l),f=VO(i),h=VO(l);if(f!==h&&_i[r]){this.needsMeasurement=!0;return}if(c!==d)if(QO(c)&&QO(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&&B9(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 eS=["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 q1=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ch(e){return KR(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:tS}=oD(queueMicrotask,!1),kr={x:!1,y:!1};function qD(){return kr.x||kr.y}function q9(e){return e==="x"||e==="y"?kr[e]?null:(kr[e]=!0,()=>{kr[e]=!1}):kr.x||kr.y?null:(kr.x=kr.y=!0,()=>{kr.x=kr.y=!1})}function UD(e,t){const n=ID(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function U9(e){return!(e.pointerType==="touch"||qD())}function V9(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(!U9(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,nS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,H9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function F9(e){return H9.has(e.tagName)||e.isContentEditable===!0}const G9=new Set(["INPUT","SELECT","TEXTAREA"]);function K9(e){return G9.has(e.tagName)||e.isContentEditable===!0}const uh=new WeakSet;function iT(e){return t=>{t.key==="Enter"&&e(t)}}function ag(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Y9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=iT(()=>{if(uh.has(n))return;ag(n,"down");const i=iT(()=>{ag(n,"up")}),l=()=>ag(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 sT(e){return nS(e)&&!qD()}const oT=new WeakSet;function X9(e,t,n={}){const[r,i,l]=UD(e,n),c=d=>{const f=d.currentTarget;if(!sT(d)||oT.has(d))return;uh.add(f),n.stopPropagation&&oT.add(d);const h=t(f,d),p={...i,capture:!0},x=(w,S)=>{window.removeEventListener("pointerup",y,p),window.removeEventListener("pointercancel",j,p),uh.has(f)&&uh.delete(f),sT(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),ch(d)&&(d.addEventListener("focus",h=>Y9(h,i)),!F9(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}function rS(e){return KR(e)&&"ownerSVGElement"in e}const dh=new WeakMap;let Si;const HD=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:rS(r)&&"getBBox"in r?r.getBBox()[t]:r[n],W9=HD("inline","width","offsetWidth"),Z9=HD("block","height","offsetHeight");function Q9({target:e,borderBoxSize:t}){var n;(n=dh.get(e))==null||n.forEach(r=>{r(e,{get width(){return W9(e,t)},get height(){return Z9(e,t)}})})}function J9(e){e.forEach(Q9)}function eU(){typeof ResizeObserver>"u"||(Si=new ResizeObserver(J9))}function tU(e,t){Si||eU();const n=ID(e);return n.forEach(r=>{let i=dh.get(r);i||(i=new Set,dh.set(r,i)),i.add(t),Si==null||Si.observe(r)}),()=>{n.forEach(r=>{const i=dh.get(r);i==null||i.delete(t),i!=null&&i.size||Si==null||Si.unobserve(r)})}}const fh=new Set;let Mo;function nU(){Mo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};fh.forEach(t=>t(e))},window.addEventListener("resize",Mo)}function rU(e){return fh.add(e),Mo||nU(),()=>{fh.delete(e),!fh.size&&typeof Mo=="function"&&(window.removeEventListener("resize",Mo),Mo=void 0)}}function lT(e,t){return typeof e=="function"?rU(e):tU(e,t)}function aU(e){return rS(e)&&e.tagName==="svg"}const iU=[...LD,Ut,zr],sU=e=>iU.find(zD(e)),cT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:cT(),y:cT()}),uT=()=>({min:0,max:0}),Kt=()=>({x:uT(),y:uT()}),oU=new WeakMap;function Um(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function fu(e){return typeof e=="string"||Array.isArray(e)}const aS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],iS=["initial",...aS];function Vm(e){return Um(e.animate)||iS.some(t=>fu(e[t]))}function FD(e){return!!(Vm(e)||e.variants)}function lU(e,t,n){for(const r in t){const i=t[r],l=n[r];if(un(i))e.addValue(r,i);else if(un(l))e.addValue(r,Yo(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,Yo(c!==void 0?c:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const U1={current:null},GD={current:!1},cU=typeof window<"u";function uU(){if(GD.current=!0,!!cU)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>U1.current=e.matches;e.addEventListener("change",t),t()}else U1.current=!1}const dT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Oh={};function KD(e){Oh=e}function dU(){return Oh}class fU{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=Xw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const j=bn.now();this.renderScheduledAt<j&&(this.renderScheduledAt=j,ht.render(this.render,!1,!0))};const{latestValues:h,renderState:p}=d;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=p,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=l,this.options=f,this.blockInitialAnimation=!!c,this.isControllingVariants=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&&un(w)&&w.set(h[j])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,oU.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||uU(),this.shouldReduceMotion=U1.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(),ki(this.notifyUpdate),ki(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:Wn(p)}),y=c(x);this.valueSubscriptions.set(t,()=>{y(),x.cancel()});return}const r=Tl.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),l&&l()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Oh){const n=Oh[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<dT.length;r++){const i=dT[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=lU(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=Yo(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):!sU(r)&&zr.test(n)&&(r=BD(t,n)),this.setBaseTarget(t,un(r)?r.get():r)),un(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var l;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=Qw(this.props,n,(l=this.presenceContext)==null?void 0:l.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!un(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){tS.render(this.render)}}class YD extends fU{constructor(){super(...arguments),this.KeyframeResolver=I9}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class 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 hU({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mU(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 ig(e){return e===void 0||e===1}function V1({scale:e,scaleX:t,scaleY:n}){return!ig(e)||!ig(t)||!ig(n)}function ds(e){return V1(e)||WD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function WD(e){return fT(e.x)||fT(e.y)}function fT(e){return e&&e!=="0%"}function Th(e,t,n){const r=e-n,i=t*r;return n+i}function hT(e,t,n,r,i){return i!==void 0&&(e=Th(e,i,r)),Th(e,n,r)+t}function H1(e,t=0,n=1,r,i){e.min=hT(e.min,t,n,r,i),e.max=hT(e.max,t,n,r,i)}function ZD(e,{x:t,y:n}){H1(e.x,t.translate,t.scale,t.originPoint),H1(e.y,n.translate,n.scale,n.originPoint)}const mT=.999999999999,pT=1.0000000000001;function pU(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&&(Xr(e.x,-l.scroll.offset.x),Xr(e.y,-l.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,ZD(e,c)),r&&ds(l.latestValues)&&hh(e,l.latestValues,(d=l.layout)==null?void 0:d.layoutBox))}t.x<pT&&t.x>mT&&(t.x=1),t.y<pT&&t.y>mT&&(t.y=1)}function Xr(e,t){e.min+=t,e.max+=t}function xT(e,t,n,r,i=.5){const l=ft(e.min,e.max,i);H1(e,t,n,l,r)}function yT(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function hh(e,t,n){const r=n??e;xT(e.x,yT(t.x,r.x),t.scaleX,t.scale,t.originX),xT(e.y,yT(t.y,r.y),t.scaleY,t.scale,t.originY)}function QD(e,t){return XD(mU(e.getBoundingClientRect(),t))}function xU(e,t,n){const r=QD(e,n),{scroll:i}=t;return i&&(Xr(r.x,i.offset.x),Xr(r.y,i.offset.y)),r}const yU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gU=Ol.length;function vU(e,t,n){let r="",i=!0;for(let c=0;c<gU;c++){const d=Ol[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=q1(f,_h[d]);if(!h){i=!1;const x=yU[d]||d;r+=`${x}(${p}) `}n&&(t[d]=p)}}const l=e.pathRotation;return l&&(i=!1,r+=`rotate(${q1(l,_h.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function sS(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(Tl.has(f)){c=!0;continue}else if(cD(f)){i[f]=h;continue}else{const p=q1(h,_h[f]);f.startsWith("origin")?(d=!0,l[f]=p):r[f]=p}}if(t.transform||(c||n?r.transform=vU(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 gT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Dc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=gT(e,t.target.x),r=gT(e,t.target.y);return`${n}% ${r}%`}},bU={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=zr.parse(e);if(i.length>5)return r;const l=zr.createTransformer(e),c=typeof i[0]!="number"?1:0,d=n.x.scale*t.x,f=n.y.scale*t.y;i[0+c]/=d,i[1+c]/=f;const h=ft(d,f,.5);return typeof i[2+c]=="number"&&(i[2+c]/=h),typeof i[3+c]=="number"&&(i[3+c]/=h),l(i)}},F1={borderRadius:{...Dc,applyTo:[...eS]},borderTopLeftRadius:Dc,borderTopRightRadius:Dc,borderBottomLeftRadius:Dc,borderBottomRightRadius:Dc,boxShadow:bU};function e5(e,{layout:t,layoutId:n}){return Tl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!F1[e]||e==="opacity")}function oS(e,t,n){var c;const r=e.style,i=t==null?void 0:t.style,l={};if(!r)return l;for(const d in r)(un(r[d])||i&&un(i[d])||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 jU(e){return window.getComputedStyle(e)}class wU extends YD{constructor(){super(...arguments),this.type="html",this.renderInstance=JD}readValueFromInstance(t,n){var r;if(Tl.has(n))return(r=this.projection)!=null&&r.isProjecting?C1(n):U7(t,n);{const i=jU(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){sS(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return oS(t,n,r)}}const SU={offset:"stroke-dashoffset",array:"stroke-dasharray"},NU={offset:"strokeDashoffset",array:"strokeDasharray"};function AU(e,t,n=1,r=0,i=!0){e.pathLength=1;const l=i?SU:NU;e[l.offset]=`${-r}`,e[l.array]=`${t} ${n}`}const _U=["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(sS(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 _U)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&&AU(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 OU(e,t,n,r){JD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(n5.has(i)?i:Jw(i),t.attrs[i])}function a5(e,t,n){const r=oS(e,t,n);for(const i in e)if(un(e[i])||un(t[i])){const l=Ol.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[l]=e[i]}return r}class TU extends YD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Tl.has(n)){const r=$D(n);return r&&r.default||0}return n=n5.has(n)?n:Jw(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){OU(t,n,r,i)}mount(t){this.isSVGTag=r5(t.tagName),super.mount(t)}}const EU=iS.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<EU;n++){const r=iS[n],i=e.props[r];(fu(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 CU=[...aS].reverse(),kU=aS.length;function MU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>E9(e,n,r)))}function PU(e){let t=MU(e),n=vT(),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=CU[A],_=n[O],T=p[O]!==void 0?p[O]:x[O],N=fu(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=RU(_.prevProp,T);let B=R||O===h&&_.isActive&&!M&&N||A>S&&N,D=!1;const z=Array.isArray(T)?T:[T];let $=z.reduce(l(O),{});E===!1&&($={});const{prevResolvedValues:L={}}=_,K={...L,...$},H=Z=>{B=!0,j.has(Z)&&(D=!0,j.delete(Z)),_.needsAnimating[Z]=!0;const ie=e.getValue(Z);ie&&(ie.liveStyle=!1)};for(const Z in K){const ie=$[Z],ce=L[Z];if(w.hasOwnProperty(Z))continue;let q=!1;z1(ie)&&z1(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=$,_.isActive&&(w={...w,...$}),(r||i)&&e.blockInitialAnimation&&(B=!1);const I=M&&R;B&&(!I||D)&&y.push(...z.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=vT(),i=!0}}}function RU(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 vT(){return{animate:ss(!0),whileInView:ss(),whileHover:ss(),whileTap:ss(),whileDrag:ss(),whileFocus:ss(),exit:ss()}}function G1(e,t){e.min=t.min,e.max=t.max}function Er(e,t){G1(e.x,t.x),G1(e.y,t.y)}function bT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const o5=1e-4,DU=1-o5,zU=1+o5,l5=.01,LU=0-l5,$U=0+l5;function jn(e){return e.max-e.min}function BU(e,t,n){return Math.abs(e-t)<=n}function jT(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=jn(n)/jn(t),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=DU&&e.scale<=zU||isNaN(e.scale))&&(e.scale=1),(e.translate>=LU&&e.translate<=$U||isNaN(e.translate))&&(e.translate=0)}function eu(e,t,n,r){jT(e.x,t.x,n.x,r?r.originX:void 0),jT(e.y,t.y,n.y,r?r.originY:void 0)}function wT(e,t,n,r=0){const i=r?ft(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+jn(t)}function IU(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=0){const i=r?ft(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+jn(t)}function Eh(e,t,n,r){ST(e.x,t.x,n.x,r==null?void 0:r.x),ST(e.y,t.y,n.y,r==null?void 0:r.y)}function NT(e,t,n,r,i){return e-=t,e=Th(e,1/n,r),i!==void 0&&(e=Th(e,1/i,r)),e}function qU(e,t=0,n=1,r=.5,i,l=e,c=e){if(Qr.test(t)&&(t=parseFloat(t),t=ft(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=ft(l.min,l.max,r);e===l&&(d-=t),e.min=NT(e.min,t,n,d,i),e.max=NT(e.max,t,n,d,i)}function AT(e,t,[n,r,i],l,c){qU(e,t[n],t[r],t[i],t.scale,l,c)}const UU=["x","scaleX","originX"],VU=["y","scaleY","originY"];function _T(e,t,n,r){AT(e.x,t,UU,n?n.x:void 0,r?r.x:void 0),AT(e.y,t,VU,n?n.y:void 0,r?r.y:void 0)}function OT(e){return e.translate===0&&e.scale===1}function c5(e){return OT(e.x)&&OT(e.y)}function TT(e,t){return e.min===t.min&&e.max===t.max}function HU(e,t){return TT(e.x,t.x)&&TT(e.y,t.y)}function ET(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function u5(e,t){return ET(e.x,t.x)&&ET(e.y,t.y)}function CT(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 Yr(e){return[e("x"),e("y")]}function FU(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 GU=eS.length,MT=e=>typeof e=="string"?parseFloat(e):e,PT=e=>typeof e=="number"||xe.test(e);function KU(e,t,n,r,i,l){i?(e.opacity=ft(0,n.opacity??1,YU(r)),e.opacityExit=ft(t.opacity??1,0,XU(r))):l&&(e.opacity=ft(t.opacity??1,n.opacity??1,r));for(let c=0;c<GU;c++){const d=eS[c];let f=RT(t,d),h=RT(n,d);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||PT(f)===PT(h)?(e[d]=Math.max(ft(MT(f),MT(h),r),0),(Qr.test(h)||Qr.test(f))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function RT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const YU=d5(0,.5,rD),XU=d5(.5,.95,gr);function d5(e,t,n){return r=>r<e?0:r>t?1:n(uu(e,t,r))}function WU(e,t,n){const r=un(e)?e:Yo(e);return r.start(Zw("",r,t,n)),r.animation}function hu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const ZU=(e,t)=>e.depth-t.depth;class QU{constructor(){this.children=[],this.isDirty=!1}add(t){$w(this.children,t),this.isDirty=!0}remove(t){jh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ZU),this.isDirty=!1,this.children.forEach(t)}}function JU(e,t){const n=bn.now(),r=({timestamp:i})=>{const l=i-n;l>=t&&(ki(r),e(l-t))};return ht.setup(r,!0),()=>ki(r)}function mh(e){return un(e)?e.get():e}class eV{constructor(){this.members=[]}add(t){$w(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&&(jh(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(jh(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 ph={hasAnimatedSinceResize:!0,hasEverUpdated:!1},sg=["","X","Y","Z"],tV=1e3;let nV=0;function og(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",ht,!(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=nV++,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(iV),this.nodes.forEach(dV),this.nodes.forEach(fV),this.nodes.forEach(sV)},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 QU)}addEventListener(c,d){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Iw),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=rS(c)&&!aU(c),this.instance=c;const{layoutId:d,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||d)&&(this.isLayoutDirty=!0),e){let p,x=0;const y=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{x=window.innerWidth}),e(c,()=>{const j=window.innerWidth;j!==x&&(x=j,this.root.updateBlockedByResize=!0,p&&p(),p=JU(y,250),ph.hasAnimatedSinceResize&&(ph.hasAnimatedSinceResize=!1,this.nodes.forEach(LT)))})}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()||yV,{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 _={...Ww(w,"layout"),onPlay:S,onComplete:v};(h.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(p,O,_.path)}else x||LT(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(),ki(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(hV),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(lV),this.nodes.forEach(DT);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zT);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cV),this.nodes.forEach(uV),this.nodes.forEach(rV),this.nodes.forEach(aV)):this.nodes.forEach(zT),this.clearAllSnapshots();const d=bn.now();cn.delta=na(0,1e3/60,d-cn.timestamp),cn.timestamp=d,cn.isProcessing=!0,Qy.update.process(cn),Qy.preRender.process(cn),Qy.render.process(cn),cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(oV),this.sharedNodes.forEach(mV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jn(this.snapshot.measuredBox.x)&&!jn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Kt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(d=!1),d&&this.instance){const f=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!i)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!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)),gV(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(vV))){const{scroll:p}=this.root;p&&(Xr(d.x,p.offset.x),Xr(d.y,p.offset.y))}return d}removeElementScroll(c){var f;const d=Kt();if(Er(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&&Er(d,c),Xr(d.x,x.offset.x),Xr(d.y,x.offset.y))}return d}applyTransform(c,d=!1,f){var p,x;const h=f||Kt();Er(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&&(Xr(h.x,-j.scroll.offset.x),Xr(h.y,-j.scroll.offset.y)),ds(j.latestValues)&&hh(h,j.latestValues,(p=j.layout)==null?void 0:p.layoutBox)}return ds(this.latestValues)&&hh(h,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),h}removeTransform(c){var f;const d=Kt();Er(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&&(V1(p.latestValues)&&p.updateSnapshot(),x=Kt(),Er(x,p.measurePageBox())),_T(d,p.latestValues,(f=p.snapshot)==null?void 0:f.layoutBox,x)}return ds(this.latestValues)&&_T(d,this.latestValues),d}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var j;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(c||f&&this.isSharedProjectionDirty||this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:x}=this.options;if(!this.layout||!(p||x))return;this.resolvedRelativeTargetAt=cn.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Kt(),this.targetWithTransforms=Kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),IU(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Er(this.target,this.layout.layoutBox),ZD(this.target,this.targetDelta)):Er(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||V1(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(),Eh(this.relativeTargetOrigin,d,f,this.options.layoutAnchor||void 0),Er(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const c=this.getLead(),d=!!this.resumingFrom||this!==c;let f=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===cn.timestamp&&(f=!1),f)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;Er(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,y=this.treeScale.y;pU(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():(bT(this.prevProjectionDelta.x,this.projectionDelta.x),bT(this.prevProjectionDelta.y,this.projectionDelta.y)),eu(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=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(c,d=!1,f){const h=this.snapshot,p=h?h.latestValues:{},x={...this.latestValues},y=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const j=Kt(),w=h?h.source:void 0,S=this.layout?this.layout.source:void 0,v=w!==S,A=this.getStack(),O=!A||A.members.length<=1,_=!!(v&&!O&&this.options.crossfade===!0&&!this.path.some(xV));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=ft(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=ft(c.y.scale,1,M),y.y.origin=c.y.origin,y.y.originPoint=c.y.originPoint):($T(y.x,c.x,M),$T(y.y,c.y,M)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Eh(j,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),pV(this.relativeTarget,this.relativeTargetOrigin,j,M),T&&HU(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Kt()),Er(T,this.relativeTarget)),v&&(this.animationValues=x,KU(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&&(ki(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{ph.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Yo(0)),this.motionValue.jump(0,!1),this.currentAnimation=WU(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(tV),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}Er(d,f),hh(d,p),eu(this.projectionDeltaWithTransform,this.layoutCorrected,d,p)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new eV),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&&og("z",c,h,this.animationValues);for(let p=0;p<sg.length;p++)og(`rotate${sg[p]}`,c,h,this.animationValues),og(`skew${sg[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=mh(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=mh(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=FU(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 F1){if(p[w]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:A}=F1[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?mh(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(DT),this.root.sharedNodes.clear()}}}function rV(e){e.updateLayout()}function aV(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")Yr(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";G1(c?t.measuredBox[x]:t.layoutBox[x],r[x])}else m5(l,t.layoutBox,r)&&Yr(x=>{const y=c?t.measuredBox[x]:t.layoutBox[x],j=jn(r[x]);y.max=y.min+j,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[x].max=e.relativeTarget[x].min+j)});const d=Po();eu(d,r,t.layoutBox);const f=Po();c?eu(f,e.applyTransform(i,!0),t.measuredBox):eu(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();Eh(S,t.layoutBox,y.layoutBox,w);const v=Kt();Eh(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 iV(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 sV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oV(e){e.clearSnapshot()}function DT(e){e.clearMeasurements()}function lV(e){e.isLayoutDirty=!0,e.updateLayout()}function zT(e){e.isLayoutDirty=!1}function cV(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function uV(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function LT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dV(e){e.resolveTargetDelta()}function fV(e){e.calcProjection()}function hV(e){e.resetSkewAndRotation()}function mV(e){e.removeLeadSnapshot()}function $T(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function BT(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function pV(e,t,n,r){BT(e.x,t.x,n.x,r),BT(e.y,t.y,n.y,r)}function xV(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yV={duration:.45,ease:[.4,0,.1,1]},IT=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),qT=IT("applewebkit/")&&!IT("chrome/")?Math.round:gr;function UT(e){e.min=qT(e.min),e.max=qT(e.max)}function gV(e){UT(e.x),UT(e.y)}function m5(e,t,n){return e==="position"||e==="preserve-aspect"&&!BU(CT(t),CT(n),.2)}function vV(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const bV=h5({attachResizeListener:(e,t)=>hu(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),lg={current:void 0},p5=h5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lg.current){const e=new bV({});e.mount(window),e.setOptions({layoutScroll:!0}),lg.current=e}return lg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),lS=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function VT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jV(...e){return t=>{let n=!1;const r=e.map(i=>{const l=VT(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():VT(e[i],null)}}}}function wV(...e){return k.useCallback(jV(...e),e)}class SV extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ch(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=ch(r)&&r.offsetWidth||0,l=ch(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 NV({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(lS),p=((y=e.props)==null?void 0:y.ref)??(e==null?void 0:e.ref),x=wV(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(SV,{isPresent:t,childRef:d,sizeRef:f,pop:l,children:l===!1?e:k.cloneElement(e,{ref:x})})}const AV=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:l,mode:c,anchorX:d,anchorY:f,root:h})=>{const p=zw(_V),x=k.useId(),y=k.useRef(n),j=k.useRef(r);Lw(()=>{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(NV,{pop:c==="popLayout",isPresent:n,anchorX:d,anchorY:f,root:h,children:e}),s.jsx(Im.Provider,{value:S,children:e})};function _V(){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 Lf=e=>e.key||"";function HT(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const Wr=({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(()=>HT(e),[e]),j=c&&!p?[]:y.map(Lf),w=k.useRef(!0),S=k.useRef(y),v=zw(()=>new Map),A=k.useRef(new Set),[O,_]=k.useState(y),[T,N]=k.useState(y);Lw(()=>{w.current=!1,S.current=y;for(let R=0;R<T.length;R++){const B=Lf(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 D=T[B],z=Lf(D);j.includes(z)||(R.splice(B,0,D),E.push(D))}return l==="wait"&&E.length&&(R=E),N(HT(R)),_(y),null}const{forceRender:M}=k.useContext(Dw);return s.jsx(s.Fragment,{children:T.map(R=>{const B=Lf(R),D=c&&!p?!1:y===T||j.includes(B),z=()=>{if(A.current.has(B))return;if(v.has(B))A.current.add(B),v.set(B,!0);else return;let $=!0;v.forEach(L=>{L||($=!1)}),$&&(M==null||M(),N(S.current),c&&(x==null||x()),r&&r())};return s.jsx(AV,{isPresent:D,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:l,root:h,onExitComplete:D?void 0:z,anchorX:d,anchorY:f,children:R},B)})})},y5=k.createContext({strict:!1}),FT={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 GT=!1;function OV(){if(GT)return;const e={};for(const t in FT)e[t]={isEnabled:n=>FT[t].some(r=>!!n[r])};KD(e),GT=!0}function g5(){return OV(),dU()}function TV(e){const t=g5();for(const n in e)t[n]={...t[n],...e[n]};KD(t)}const EV=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")||EV.has(e)}let v5=e=>!Ch(e);function CV(e){typeof e=="function"&&(v5=t=>t.startsWith("on")?!Ch(t):e(t))}try{CV(require("@emotion/is-prop-valid").default)}catch{}function kV(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||un(e[i])||(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 MV(e,t){if(Vm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fu(n)?n:void 0,animate:fu(r)?r:void 0}}return e.inherit!==!1?t:{}}function PV(e){const{initial:t,animate:n}=MV(e,k.useContext(Hm));return k.useMemo(()=>({initial:t,animate:n}),[KT(t),KT(n)])}function KT(e){return Array.isArray(e)?e.join(" "):e}const cS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function b5(e,t,n){for(const r in t)!un(t[r])&&!e5(r,n)&&(e[r]=t[r])}function RV({transformTemplate:e},t){return k.useMemo(()=>{const n=cS();return sS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DV(e,t){const n=e.style||{},r={};return b5(r,n,e),Object.assign(r,RV(e,t)),r}function zV(e,t){const n={},r=DV(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=()=>({...cS(),attrs:{}});function LV(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 $V=["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 uS(e){return typeof e!="string"||e.includes("-")?!1:!!($V.indexOf(e)>-1||/[A-Z]/u.test(e))}function BV(e,t,n,{latestValues:r},i,l=!1,c){const f=(c??uS(e)?LV:zV)(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(()=>un(x)?x.get():x,[x]);return k.createElement(e,{...p,children:y})}function IV({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:qV(n,r,i,e),renderState:t()}}function qV(e,t,n,r){const i={},l=r(e,{});for(const y in l)i[y]=mh(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=Qw(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=()=>IV(e,t,r,i);return n?l():zw(l)},UV=w5({scrapeMotionValuesFromProps:oS,createRenderState:cS}),VV=w5({scrapeMotionValuesFromProps:a5,createRenderState:j5}),HV=Symbol.for("motionComponentSymbol");function FV(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 GV(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(lS),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")&&KV(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 Lw(()=>{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 KV(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 cg(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&TV(r);const l=n?n==="svg":uS(e),c=l?VV:UV;function d(h,p){let x;const y={...k.useContext(lS),...h,layoutId:YV(h)},{isStatic:j}=y,w=PV(h),S=c(h,j);if(!j&&typeof window<"u"){XV();const v=WV(y);x=v.MeasureLayout,w.visualElement=GV(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,BV(e,h,FV(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[HV]=e,f}function YV({layoutId:e}){const t=k.useContext(Dw).id;return t&&e!==void 0?t+"-"+e:e}function XV(e,t){k.useContext(y5).strict}function WV(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 ZV(e,t){if(typeof Proxy>"u")return cg;const n=new Map,r=(l,c)=>cg(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,cg(c,void 0,e,t)),n.get(c))})}const QV=(e,t)=>t.isSVG??uS(e)?new TU(t):new wU(t,{allowProjection:e!==k.Fragment});class JV extends Li{constructor(t){super(t),t.animationState||(t.animationState=PU(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 eH=0;class tH extends Li{constructor(){super(...arguments),this.id=eH++,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 nH={animation:{Feature:JV},exit:{Feature:tH}};function nd(e){return{point:{x:e.pageX,y:e.pageY}}}const rH=e=>t=>nS(t)&&e(t,nd(t));function tu(e,t,n,r){return hu(e,t,rH(n),r)}const A5=({current:e})=>e?e.ownerDocument.defaultView:null,YT=(e,t)=>Math.abs(e-t);function aH(e,t){const n=YT(e.x,t.x),r=YT(e.y,t.y);return Math.sqrt(n**2+r**2)}const XT=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=$f(this.lastRawMoveEventInfo,this.transformPagePoint));const w=ug(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,v=aH(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!v)return;const{point:A}=w,{timestamp:O}=cn;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=$f(S,this.transformPagePoint),ht.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 _=ug(w.type==="pointercancel"?this.lastMoveEventInfo:$f(S,this.transformPagePoint),this.history);this.startEvent&&v&&v(w,_),A&&A(w,_)},!nS(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=i||window;const f=nd(t),h=$f(f,this.transformPagePoint),{point:p}=h,{timestamp:x}=cn;this.history=[{...p,timestamp:x}];const{onSessionStart:y}=n;y&&y(t,ug(h,this.history));const j={passive:!0,capture:!0};this.removeListeners=Ju(tu(this.contextWindow,"pointermove",this.handlePointerMove,j),tu(this.contextWindow,"pointerup",this.handlePointerUp,j),tu(this.contextWindow,"pointercancel",this.handlePointerUp,j)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(XT.has(r.overflowX)||XT.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:i.x-n.x,y:i.y-n.y};l.x===0&&l.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,i),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ki(this.updatePoint)}}function $f(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ug({point:e},t){return{point:e,delta:WT(e,O5(t)),offset:WT(e,iH(t)),velocity:sH(t,.1)}}function iH(e){return e[0]}function O5(e){return e[e.length-1]}function sH(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>Wn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Wn(t)*2&&(r=e[1]);const l=pr(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 oH(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function ZT(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 lH(e,{top:t,left:n,bottom:r,right:i}){return{x:ZT(e.x,n,i),y:ZT(e.y,t,r)}}function QT(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 cH(e,t){return{x:QT(e.x,t.x),y:QT(e.y,t.y)}}function uH(e,t){let n=.5;const r=jn(e),i=jn(t);return i>r?n=uu(t.min,t.max-r,e.min):r>i&&(n=uu(e.min,e.max-i,t.min)),na(0,1,n)}function dH(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 K1=.35;function fH(e=K1){return e===!1?e=0:e===!0&&(e=K1),{x:JT(e,"left","right"),y:JT(e,"top","bottom")}}function JT(e,t,n){return{min:eE(e,t),max:eE(e,n)}}function eE(e,t){return typeof e=="number"?e:e[t]||0}const hH=new WeakMap;class mH{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(nd(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=q9(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),Yr(A=>{let O=this.getAxisMotionValue(A).get()||0;if(Qr.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&&ht.update(()=>S(x,y),!1,!0),L1(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=xH(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&&ht.update(()=>v(x,y),!1,!0)},f=(x,y)=>{this.latestPointerEvent=x,this.latestPanInfo=y,this.stop(x,y),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new _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&&ht.postRender(()=>d(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Bf(t,i,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=oH(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=lH(r.layoutBox,t):this.constraints=!1,this.elastic=fH(n),i!==this.constraints&&!Co(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Yr(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=dH(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=xU(r,i.root,this.visualElement.getTransformPagePoint());let c=cH(i.layout.layoutBox,l);if(n){const d=n(hU(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=Yr(p=>{if(!Bf(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 L1(this.visualElement,t),r.start(Zw(t,r,0,n,this.visualElement,!1))}stopAnimation(){Yr(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){Yr(n=>{const{drag:r}=this.getProps();if(!Bf(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,l=this.getAxisMotionValue(n);if(i&&i.layout){const{min:c,max:d}=i.layout.layoutBox[n],f=l.get()||0;l.set(t[n]-ft(c,d,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Co(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Yr(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const f=d.get();i[c]=uH({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(),Yr(c=>{if(!Bf(c,t,null))return;const d=this.getAxisMotionValue(c),{min:f,max:h}=this.constraints[c];d.set(ft(f,h,i[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;hH.set(this.visualElement,this);const t=this.visualElement.current,n=tu(t,"pointerdown",h=>{const{drag:p,dragListener:x=!0}=this.getProps(),y=h.target,j=y!==t&&K9(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=pH(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",i);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),ht.read(i);const d=hu(window,"resize",()=>this.scalePositionWithinConstraints()),f=l.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(Yr(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=K1,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function tE(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function pH(e,t,n){const r=lT(e,tE(n)),i=lT(t,tE(n));return()=>{r(),i()}}function Bf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class yH extends Li{constructor(t){super(t),this.removeGroupControls=gr,this.removeListeners=gr,this.controls=new mH(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gr}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 dg=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class gH extends Li{constructor(){super(...arguments),this.removePointerDownListener=gr}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:dg(t),onStart:dg(n),onMove:dg(r),onEnd:(l,c)=>{delete this.session,i&&ht.postRender(()=>i(l,c))}}}mount(){this.removePointerDownListener=tu(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 fg=!1;class vH 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),fg&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ph.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}),fg=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||ht.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),tS.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;fg=!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(Dw);return s.jsx(vH,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(S5),isPresent:t,safeToRemove:n})}const bH={pan:{Feature:gH},drag:{Feature:yH,ProjectionNode:p5,MeasureLayout:T5}};function nE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,l=r[i];l&&ht.postRender(()=>l(t,nd(t)))}class jH extends Li{mount(){const{current:t}=this.node;t&&(this.unmount=V9(t,(n,r)=>(nE(this.node,r,"Start"),i=>nE(this.node,i,"End"))))}unmount(){}}class wH 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=Ju(hu(this.node.current,"focus",()=>this.onFocus()),hu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function rE(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),l=r[i];l&&ht.postRender(()=>l(t,nd(t)))}class SH extends Li{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=X9(t,(i,l)=>(rE(this.node,l,"Start"),(c,{success:d})=>rE(this.node,c,d?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Y1=new WeakMap,hg=new WeakMap,NH=e=>{const t=Y1.get(e.target);t&&t(e)},AH=e=>{e.forEach(NH)};function _H({root:e,...t}){const n=e||document;hg.has(n)||hg.set(n,{});const r=hg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(AH,{root:e,...t})),r[i]}function OH(e,t,n){const r=_H(t);return Y1.set(e,n),r.observe(e),()=>{Y1.delete(e),r.unobserve(e)}}const TH={some:0,all:1};class EH 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:TH[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=OH(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(CH(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function CH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kH={inView:{Feature:EH},tap:{Feature:SH},focus:{Feature:wH},hover:{Feature:jH}},MH={layout:{ProjectionNode:p5,MeasureLayout:T5}},PH={...nH,...kH,...bH,...MH},Fe=ZV(PH,QV),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 RH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),C5=(...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 DH={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 zH=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,...DH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:C5("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(zH,{ref:l,iconNode:t,className:C5(`lucide-${RH(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const LH=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 $H=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 BH=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 IH=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 dS=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 X1=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 k5=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 W1=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 kh=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 aE=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 Xo=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 mu=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 xh=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 qH=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 UH=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 Bo=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 Jr=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 vr=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 xr=le("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Mh=le("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dn=le("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 fS=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 hS=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 Mi=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 iE=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 jr=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 rd=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 mS=le("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const KH=le("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 Ph=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 sE=le("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const YH=le("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const XH=le("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const If=le("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const z5=le("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const WH=le("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oE=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 pS=le("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ZH=le("Link2Off",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const QH=le("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const L5=le("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 xS=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 mg=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 Z1=le("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const JH=le("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 eF=le("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const yh=le("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tF=le("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nF=le("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 rF=le("MousePointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 aF=le("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iF=le("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lE=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 Q1=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 cE=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 uE=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 J1=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 Ir=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 Ra=le("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sF=le("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oF=le("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dE=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 El=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 Gm=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 yS=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 lF=le("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 cF=le("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 uF=le("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const 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 ra=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 dF=le("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ej=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 fE=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 pu=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 Lr=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 Io=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 qa=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fF=le("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qo=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 ze(){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 gS="-",hF=e=>{const t=pF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const d=c.split(gS);return d[0]===""&&d.length!==1&&d.shift(),Y5(d,t)||mF(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(gS);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},hE=/^\[(.+)\]$/,mF=e=>{if(hE.test(e)){const t=hE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pF=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return yF(Object.entries(e.classGroups),n).forEach(([l,c])=>{tj(c,r,l,t)}),r},tj=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:mE(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(xF(i)){tj(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{tj(c,mE(t,l),n,r)})})},mE=(e,t)=>{let n=e;return t.split(gS).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xF=e=>e.isThemeGetter,yF=(e,t)=>t?e.map(([n,r])=>{const i=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,i]}):e,gF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=r.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},X5="!",vF=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],l=t.length,c=d=>{const f=[];let h=0,p=0,x;for(let v=0;v<d.length;v++){let 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},bF=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},jF=e=>({cache:gF(e.cacheSize),parseClassName:vF(e),...hF(e)}),wF=/\s+/,SF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,l=[],c=e.trim().split(wF);let d="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:p,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:j}=n(h);let w=!!j,S=r(w?y.substring(0,j):y);if(!S){if(!w){d=h+(d.length>0?" "+d:d);continue}if(S=r(y),!S){d=h+(d.length>0?" "+d:d);continue}w=!1}const v=bF(p).join(":"),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 NF(){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 AF(e,...t){let n,r,i,l=c;function c(f){const h=t.reduce((p,x)=>x(p),e());return n=jF(h),r=n.cache.get,i=n.cache.set,l=d,d(f)}function d(f){const h=r(f);if(h)return h;const p=SF(f,n);return i(f,p),p}return function(){return l(NF.apply(null,arguments))}}const jt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Z5=/^\[(?:([a-z-]+):)?(.+)\]$/i,_F=/^\d+\/\d+$/,OF=new Set(["px","full","screen"]),TF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,CF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oa=e=>Uo(e)||OF.has(e)||_F.test(e),ji=e=>Cl(e,"length",IF),Uo=e=>!!e&&!Number.isNaN(Number(e)),pg=e=>Cl(e,"number",Uo),zc=e=>!!e&&Number.isInteger(Number(e)),PF=e=>e.endsWith("%")&&Uo(e.slice(0,-1)),Be=e=>Z5.test(e),wi=e=>TF.test(e),RF=new Set(["length","size","percentage"]),DF=e=>Cl(e,RF,Q5),zF=e=>Cl(e,"position",Q5),LF=new Set(["image","url"]),$F=e=>Cl(e,LF,UF),BF=e=>Cl(e,"",qF),Lc=()=>!0,Cl=(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},IF=e=>EF.test(e)&&!CF.test(e),Q5=()=>!1,qF=e=>kF.test(e),UF=e=>MF.test(e),VF=()=>{const e=jt("colors"),t=jt("spacing"),n=jt("blur"),r=jt("brightness"),i=jt("borderColor"),l=jt("borderRadius"),c=jt("borderSpacing"),d=jt("borderWidth"),f=jt("contrast"),h=jt("grayscale"),p=jt("hueRotate"),x=jt("invert"),y=jt("gap"),j=jt("gradientColorStops"),w=jt("gradientColorStopPositions"),S=jt("inset"),v=jt("margin"),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"],D=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",Be,t],$=()=>[Be,t],L=()=>["",Oa,ji],K=()=>["auto",Uo,Be],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],F=()=>["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",Be],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Uo,Be];return{cacheSize:500,separator:":",theme:{colors:[Lc],spacing:[Oa,ji],blur:["none","",wi,Be],brightness:q(),borderColor:[e],borderRadius:["none","","full",wi,Be],borderSpacing:$(),borderWidth:L(),contrast:q(),grayscale:ie(),hueRotate:q(),invert:ie(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[PF,ji],inset:z(),margin:z(),opacity:q(),padding:$(),saturate:q(),scale:q(),sepia:ie(),skew:q(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[wi]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),Be]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],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",zc,Be]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:ie()}],shrink:[{shrink:ie()}],order:[{order:["first","last","none",zc,Be]}],"grid-cols":[{"grid-cols":[Lc]}],"col-start-end":[{col:["auto",{span:["full",zc,Be]},Be]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[Lc]}],"row-start-end":[{row:["auto",{span:[zc,Be]},Be]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...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",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[wi]},wi]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wi,ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pg]}],"font-family":[{font:[Lc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Be]}],"line-clamp":[{"line-clamp":["none",Uo,pg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Oa,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[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",Oa,ji]}],"underline-offset":[{"underline-offset":["auto",Oa,Be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),zF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",DF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$F]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[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":[Oa,Be]}],"outline-w":[{outline:[Oa,ji]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[Oa,ji]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wi,BF]}],"shadow-color":[{shadow:[Lc]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",wi,Be]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[x]}],saturate:[{saturate:[_]}],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",Be]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[zc,Be]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Oa,ji,pg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},HF=AF(VF);function it(...e){return HF(ze(e))}function Te(e,t="SEK"){return e==null||isNaN(e)?"-":new Intl.NumberFormat("sv-SE",{style:"currency",currency:t,maximumFractionDigits:0}).format(e)}function pE(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 FF(e){const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),i=Math.floor(r/6e4),l=Math.floor(r/36e5),c=Math.floor(r/864e5);return i<1?"Just now":i<60?`${i}m ago`:l<24?`${l}h ago`:c<7?`${c}d ago`:Nt(e)}function GF(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}const KF=[{label:"Översikt",items:[{path:"/",label:"Briefing",icon:q5},{path:"/dashboard",label:"Dashboard",icon:pS},{path:"/mail",label:"Mail",icon:An}]},{label:"Produkter",items:[{path:"/alva",label:"Alva",icon:Ti},{path:"/amos",label:"AMOS",icon:fS},{path:"/quixzoom",label:"quiXzoom",icon:gn},{path:"/landvex",label:"Landvex",icon:P5}]},{label:"Verksamhet",items:[{path:"/crm",label:"CRM",icon:Lr},{path:"/sales",label:"Sales",icon:ra},{path:"/marketing",label:"Marketing",icon:B5},{path:"/social",label:"Social",icon:yS},{path:"/finance",label:"Finance",icon:Io},{path:"/accounting",label:"Accounting",icon:Xo},{path:"/hr",label:"HR",icon:Xo},{path:"/legal",label:"Legal",icon:jr},{path:"/compliance",label:"Compliance",icon:Da},{path:"/support",label:"Support",icon:Ph},{path:"/projects",label:"Projects",icon:mS},{path:"/automation",label:"Automation",icon:qo}]}];function YF(){const{sidebarOpen:e,toggleSidebar:t}=E5(),{logout:n,isAuthenticated:r}=Br(),i=_n(),[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(Wr,{children:e&&s.jsx(Fe.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(Fe.aside,{initial:!1,animate:{width:e?240:72},transition:{duration:.2,ease:"easeOut"},className:it("fixed left-0 top-0 h-full bg-sidebar z-50 flex flex-col","border-r border-border/60",e?"px-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(Wr,{children:e&&s.jsx(Fe.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(Bo,{size:14})})]}),s.jsx("nav",{className:"flex-1 py-2 overflow-y-auto space-y-1",children:KF.map(h=>s.jsxs("div",{children:[s.jsx("button",{onClick:()=>d(h.label),className:it("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:it("transition-transform",!l[h.label]&&"-rotate-90")})]}):s.jsx("div",{className:"w-1 h-1 rounded-full bg-text-tertiary"})}),s.jsx(Wr,{initial:!1,children:(l[h.label]||!e)&&s.jsx(Fe.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:it("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(Fe.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(Wr,{children:e&&s.jsx(Fe.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:it("text-sm font-medium whitespace-nowrap",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:it("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(xS,{size:17,strokeWidth:1.5}),s.jsx(Wr,{children:e&&s.jsx(Fe.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:"text-sm font-medium whitespace-nowrap",children:"Logga ut"})})]})})]})]})}function XF(){const[e,t]=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:it("w-10 h-10 rounded-xl flex items-center justify-center transition-colors",e?"bg-primary/20 text-primary":"bg-bg text-text-secondary hover:text-text-primary"),"aria-label":"Toggle dark mode",children:e?s.jsx(I5,{size:18}):s.jsx(H5,{size:18})})}const WF=[{id:"landvex",name:"Landvex AB",org:"559141-7042"},{id:"landvex-inc",name:"Landvex Inc.",org:"83-4567891"},{id:"quixzoom",name:"quiXzoom Inc",org:"-"}],xE=[{id:"1",title:"Nytt avtal tecknat",description:"Acme Corp har signerat enterprise-avtalet",time:new Date(Date.now()-1e3*60*15).toISOString(),read:!1},{id:"2",title:"Faktura förfallen",description:"Faktura #INV-2024-0042 är 3 dagar försenad",time:new Date(Date.now()-1e3*60*60*2).toISOString(),read:!1},{id:"3",title:"Semester beviljad",description:"Din semesteransökan har godkänts av HR",time:new Date(Date.now()-1e3*60*60*5).toISOString(),read:!0}];function ZF(){const{user:e,logout:t}=Br(),n=Ds(),[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=xE.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(El,{size:15}),s.jsx("span",{className:"ml-2 text-sm",children:"Search..."}),s.jsx("kbd",{className:"ml-6 px-1.5 py-0.5 text-[10px] font-medium bg-surface rounded border border-border",children:"⌘K"})]}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(XF,{})}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>{i(!r),c(!1)},className:"relative w-9 h-9 flex items-center justify-center rounded-xl hover:bg-bg text-text-secondary transition-colors",children:[s.jsx(W1,{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(Wr,{children:r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),s.jsxs(Fe.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:xE.map(j=>s.jsx("div",{onClick:()=>{i(!1),j.title.includes("avtal")?n("/sales"):j.title.includes("faktura")?n("/finance",{state:{activeTab:"Invoices"}}):j.title.includes("semester")||j.title.includes("HR")?n("/hr"):j.title.includes("deal")?n("/sales"):n("/dashboard")},className:it("px-4 py-3 hover:bg-bg/60 transition-colors cursor-pointer",!j.read&&"bg-primary-light/30"),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:it("w-2 h-2 rounded-full mt-1.5 shrink-0",j.read?"bg-transparent":"bg-primary")}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:j.title}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:j.description}),s.jsx("p",{className:"text-[11px] text-text-secondary/60 mt-1",children:FF(j.time)})]})]})},j.id))})]})]})})]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>{c(!l),i(!1)},className:"flex items-center gap-2 pl-1 pr-2 h-9 rounded-xl hover:bg-bg transition-colors",children:[s.jsx("div",{className:"w-7 h-7 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-semibold",children:e?GF(e.name):"?"}),s.jsx(Fm,{size:14,className:"text-text-secondary"})]}),s.jsx(Wr,{children:l&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),s.jsxs(Fe.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(pu,{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(xS,{size:15}),"Sign out"]})})]})]})]})})]})]}),s.jsx(Wr,{children:d&&s.jsxs(s.Fragment,{children:[s.jsx(Fe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 z-50",onClick:()=>f(!1)}),s.jsxs(Fe.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(qa,{size:20})})]}),s.jsx("div",{className:"p-2",children:WF.map(j=>s.jsxs("button",{onClick:()=>{p(j.id),f(!1),window.location.reload()},className:`w-full flex items-center gap-3 p-3 rounded-lg transition-colors ${h===j.id?"bg-accent/10 border border-accent/20":"hover:bg-surface-hover"}`,children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(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 QF=[{label:"Översikt",items:[{path:"/",label:"Briefing",icon:q5},{path:"/dashboard",label:"Dashboard",icon:pS},{path:"/mail",label:"Mail",icon:An}]},{label:"Produkter",items:[{path:"/alva",label:"Alva",icon:Ti},{path:"/amos",label:"AMOS",icon:fS},{path:"/quixzoom",label:"quiXzoom",icon:gn},{path:"/landvex",label:"Landvex",icon:P5}]},{label:"Verksamhet",items:[{path:"/crm",label:"CRM",icon:Lr},{path:"/sales",label:"Sales",icon:ra},{path:"/marketing",label:"Marketing",icon:B5},{path:"/social",label:"Social",icon:yS},{path:"/finance",label:"Finance",icon:Io},{path:"/accounting",label:"Accounting",icon:Xo},{path:"/hr",label:"HR",icon:Xo},{path:"/legal",label:"Legal",icon:jr},{path:"/compliance",label:"Compliance",icon:Da},{path:"/support",label:"Support",icon:Ph},{path:"/projects",label:"Projects",icon:mS},{path:"/automation",label:"Automation",icon:qo}]}];function JF(){const[e,t]=k.useState(!1),[n,r]=k.useState({Översikt:!0,Produkter:!0,Verksamhet:!0}),i=_n(),{logout:l,isAuthenticated:c}=Br(),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(Os,{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(qa,{size:24}):s.jsx(eF,{size:24})})]}),e&&s.jsxs("div",{className:"fixed inset-0 z-[100] bg-bg lg:hidden flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-subtle bg-bg shrink-0",children:[s.jsx("span",{className:"text-lg font-bold text-text-primary",children:"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(qa,{size:24})})]}),s.jsxs("div",{className:"p-4 space-y-2 overflow-y-auto flex-1",children:[QF.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:it("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(Os,{to:p.path,onClick:()=>t(!1),className:it("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(xS,{size:20}),"Logga ut"]})]})]})]})}const J5={light:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(10)},medium:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(20)},heavy:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([30,50,30])},success:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([10,30,10])},error:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate([50,30,50])},swipe:()=>{typeof navigator<"u"&&navigator.vibrate&&navigator.vibrate(15)}};function eG({children:e,onSwipeLeft:t,onSwipeRight:n,className:r}){const i=k.useRef(null),l=k.useRef(null),[c,d]=k.useState(!1),f=50,h=k.useCallback(y=>{l.current=null,i.current={x:y.targetTouches[0].clientX,y:y.targetTouches[0].clientY},d(!0)},[]),p=k.useCallback(y=>{l.current={x:y.targetTouches[0].clientX,y:y.targetTouches[0].clientY}},[]),x=k.useCallback(()=>{if(d(!1),!i.current||!l.current)return;const y=i.current.x-l.current.x,j=i.current.y-l.current.y;Math.abs(y)>Math.abs(j)&&Math.abs(y)>f&&(J5.swipe(),y>0?t==null||t():n==null||n()),i.current=null,l.current=null},[t,n]);return s.jsx("div",{className:it("touch-pan-y",c&&"select-none",r),onTouchStart:h,onTouchMove:p,onTouchEnd:x,children:e})}function tG({onRefresh:e,children:t,className:n}){const[r,i]=k.useState(!1),[l,c]=k.useState(0),[d,f]=k.useState(!1),h=k.useRef(0),p=k.useRef(null),x=100,y=80,j=k.useCallback(v=>{p.current&&p.current.scrollTop===0&&(h.current=v.targetTouches[0].clientY,i(!0))},[]),w=k.useCallback(v=>{if(!r)return;const O=v.targetTouches[0].clientY-h.current;if(O>0){const _=1+O/x*.5,T=Math.min(O/_,x);c(T)}},[r]),S=k.useCallback(async()=>{if(r){if(l>=y&&!d){f(!0);try{await e()}finally{f(!1)}}i(!1),c(0)}},[r,l,d,e]);return s.jsxs("div",{ref:p,className:it("relative overflow-y-auto",n),onTouchStart:j,onTouchMove:w,onTouchEnd:S,children:[s.jsx("div",{className:"absolute top-0 left-0 right-0 flex items-center justify-center transition-transform",style:{transform:`translateY(${l-60}px)`,opacity:r?1:0},children:s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx(Ra,{size:24,className:it("text-primary transition-transform",d&&"animate-spin",!d&&l>=y&&"rotate-180")}),s.jsx("span",{className:"text-xs text-text-secondary",children:d?"Refreshing...":l>=y?"Release to refresh":"Pull to refresh"})]})}),s.jsx("div",{style:{transform:r?`translateY(${l}px)`:"translateY(0)",transition:r?"none":"transform 0.3s ease-out"},children:t})]})}function nG({children:e}){const t=Ds(),n=k.useRef(0),r=k.useRef(0),i=k.useRef(null),l=k.useCallback(c=>{const d=Date.now();d-n.current<300?(r.current+=1,r.current===2&&(J5.medium(),t("/dashboard"),r.current=0)):r.current=1,n.current=d,i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=0},500)},[t]);return s.jsx("div",{onTouchEnd:l,children:e})}const yE={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 rG(e){return yE[e]||yE.dashboard}function aG({rum:e,isOpen:t,onToggle:n}){const r=rG(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=gE(r,c.trim());l(_=>[..._,{id:`assistant-${Date.now()}`,roll:"assistant",innehall:O,tid:new Date().toISOString()}])}}catch{const O=gE(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(Fe.div,{initial:{opacity:0,x:100},animate:{opacity:1,x:0},exit:{opacity:0,x:100},className:`fixed right-0 top-0 h-full bg-surface border-l border-border z-50 flex flex-col shadow-xl ${p?"w-[500px]":"w-[380px]"}`,children:[s.jsxs("div",{className:"h-14 border-b border-border flex items-center justify-between px-4 bg-primary/5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:s.jsx(Ti,{size:18,className:"text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-sm",children:r.titel}),s.jsx("p",{className:"text-xs text-text-secondary",children:"AI Assistant"})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>x(!p),className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:p?s.jsx(tF,{size:16}):s.jsx(JH,{size:16})}),s.jsx("button",{onClick:n,className:"p-2 hover:bg-bg rounded-lg text-text-secondary",children:s.jsx(qa,{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(pu,{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(Gm,{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(Fe.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 gE(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 qf=["/","/dashboard","/crm","/finance","/amos","/quixzoom","/landvex","/compliance","/accounting"];function iG(){const{sidebarOpen:e}=E5(),t=_n(),n=Ds(),[r,i]=k.useState(!1),l=()=>t.pathname.replace("/","")||"dashboard";k.useEffect(()=>{const p=()=>i(x=>!x);return window.addEventListener("toggle-agent",p),()=>window.removeEventListener("toggle-agent",p)},[]);const c=qf.indexOf(t.pathname),d=()=>{c<qf.length-1&&n(qf[c+1])},f=()=>{c>0&&n(qf[c-1])},h=async()=>{window.location.reload()};return s.jsxs("div",{className:"min-h-screen bg-bg",children:[s.jsx("div",{className:"hidden lg:block",children:s.jsx(YF,{})}),s.jsx("div",{className:"lg:hidden",children:s.jsx(JF,{})}),s.jsxs("div",{className:it("transition-all duration-200 ease-out",e?"lg:ml-[240px]":"lg:ml-[72px]",r&&"lg:mr-[380px]"),children:[s.jsx(ZF,{}),s.jsx("main",{className:"p-4 lg:p-10",children:s.jsx(nG,{children:s.jsx(eG,{onSwipeLeft:d,onSwipeRight:f,children:s.jsx(tG,{onRefresh:h,children:s.jsx(YI,{})})})})})]}),s.jsx(aG,{rum:l(),isOpen:r,onToggle:()=>i(!r)})]})}const Ns=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:it("w-full h-11 rounded-[14px] border bg-surface text-text-primary text-sm","placeholder:text-text-secondary/50","focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30","transition-all duration-150",n?"pl-10 pr-4":"px-4",t&&"border-danger focus:ring-danger/20 focus:border-danger/30",r),...i})]}),t&&s.jsx("p",{className:"mt-1.5 text-xs text-danger",children:t})]}));Ns.displayName="Input";function Ye({children:e,variant:t="primary",size:n="md",loading:r=!1,icon:i,className:l,disabled:c,...d}){const f={primary:"bg-primary text-white hover:bg-primary-hover shadow-sm",secondary:"bg-surface text-text-primary border border-border hover:bg-white",ghost:"bg-transparent text-text-secondary hover:bg-primary-light hover:text-primary",danger:"bg-danger text-white hover:opacity-90"},h={sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-sm"};return s.jsxs("button",{className:it("inline-flex items-center justify-center gap-2 rounded-[14px] font-medium transition-colors duration-150","focus:outline-none focus:ring-2 focus:ring-primary/20","disabled:opacity-50 disabled:cursor-not-allowed","active:scale-[0.98]",f[t],h[n],l),disabled:c||r,...d,children:[r?s.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):i,e]})}const sG="/api/v1";function oG(){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 Uf(e,t,n){const r=`${sG}${t}`,i={"Content-Type":"application/json"},l=oG();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=>Uf("GET",e),post:(e,t)=>Uf("POST",e,t),put:(e,t)=>Uf("PUT",e,t),delete:e=>Uf("DELETE",e)},vE={login:(e,t)=>Ce.post("/auth/login",{email:e,password:t}),me:()=>Ce.get("/auth/me")},xg={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}`)},Vf={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")},bE={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`)},Hf={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")},Ff={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")},$c={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")},jE={employees:()=>Ce.get("/hr/employees"),leaves:()=>Ce.get("/hr/leaves"),createEmployee:e=>Ce.post("/hr/employees",e),createLeave:e=>Ce.post("/hr/leaves",e)},lG={entries:()=>Ce.get("/journal/entries"),entry:e=>Ce.get(`/journal/entries/${e}`)};function cG(){const e=Ds(),{login:t}=Br(),[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 vE.login(n,i);if(!S.ok){h("Invalid credentials");return}localStorage.setItem("amos_token",S.token);const v=await vE.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(Fe.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(Ns,{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(Ns,{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(Fe.p,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"text-sm text-danger",children:f}),s.jsx(Ye,{type:"submit",size:"lg",loading:p,className:"w-full",children:"Sign in"})]})]})})}function uG(){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(Fe.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(Ph,{size:16,className:"text-blue-600"})}),s.jsx("h3",{className:"font-semibold",children:"Support Tickets"})]}),s.jsxs(Os,{to:"/support",className:"text-sm text-blue-600 hover:text-blue-700 flex items-center gap-1",children:["View all ",s.jsx(dS,{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(Jr,{size:14,className:"text-orange-600"}),s.jsx("span",{className:"text-xs text-orange-600 font-medium",children:"Open"})]}),s.jsx("div",{className:"text-2xl font-bold text-orange-700",children:e.open})]}),s.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(dn,{size:14,className:"text-blue-600"}),s.jsx("span",{className:"text-xs text-blue-600 font-medium",children:"In Progress"})]}),s.jsx("div",{className:"text-2xl font-bold text-blue-700",children:e.in_progress})]}),s.jsxs("div",{className:"bg-green-50 rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(xr,{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(Ph,{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 dG(){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(Fe.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(mS,{size:16,className:"text-purple-600"})}),s.jsx("h3",{className:"font-semibold",children:"Projects"})]}),s.jsxs(Os,{to:"/projects",className:"text-sm text-purple-600 hover:text-purple-700 flex items-center gap-1",children:["View all ",s.jsx(dS,{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(ra,{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(xr,{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(Jr,{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 fG(){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(Fe.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(xr,{size:14,className:"text-green-500"}):l.status==="down"?s.jsx(Mh,{size:14,className:"text-red-500"}):s.jsx(Jr,{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 hG(){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(Fe.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(Os,{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 mG(){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(Fe.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 pG(){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(uG,{}),s.jsx(dG,{}),s.jsx(fG,{}),s.jsx(hG,{}),s.jsx(mG,{}),s.jsxs(Fe.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 xG={getRealBriefing:()=>Ce.get("/briefing/real")};function _e({children:e,variant:t="default",size:n="sm",className:r}){const i={default:"bg-bg text-text-secondary",success:"bg-success-light text-success",warning:"bg-warning-light text-warning",danger:"bg-danger-light text-danger",primary:"bg-primary-light text-primary"},l={sm:"px-2 py-0.5 text-[11px]",md:"px-2.5 py-1 text-xs"};return s.jsx("span",{className:it("inline-flex items-center rounded-full font-medium",i[t],l[n],r),children:e})}function Gf({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(ra,{size:14,className:"text-success"}),i==="down"&&s.jsx(F5,{size:14,className:"text-danger"}),i==="neutral"&&s.jsx(Jr,{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 yG({alert:e}){const t={info:{icon:s.jsx(Jr,{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"}},n=t[e.level]||t.info;return s.jsx("div",{className:`p-3 rounded-lg border ${n.color}`,children:s.jsxs("div",{className:"flex items-start gap-2",children:[n.icon,s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium",children:e.title}),s.jsx("p",{className:"text-xs opacity-80 mt-0.5",children:e.description})]}),s.jsx(_e,{variant:"default",className:"text-xs",children:e.source})]})})}function gG({action:e}){const t={10:"bg-danger text-white",9:"bg-danger/80 text-white",8:"bg-warning text-white",7:"bg-warning/80 text-white",6:"bg-primary text-white",5:"bg-primary/80 text-white"};return s.jsx("div",{className:"p-3 rounded-lg border border-border bg-surface hover:bg-surface-hover transition-colors cursor-pointer group",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium shrink-0 ${t[e.priority]||"bg-text-secondary text-white"}`,children:e.priority}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:e.title}),s.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:e.description}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsxs("span",{className:"text-xs text-text-tertiary flex items-center gap-1",children:[s.jsx(dn,{size:12}),e.time_estimate]}),s.jsx("span",{className:"text-xs text-text-tertiary",children:e.impact})]})]}),s.jsx(dS,{size:16,className:"text-text-tertiary group-hover:text-primary transition-colors shrink-0"})]})})}function vG({task:e}){const t={critical:"danger",high:"warning",medium:"default",low:"success"};return s.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-surface-hover transition-colors",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-warning shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm truncate",children:e.title}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[s.jsx(_e,{variant:t[e.priority],className:"text-xs",children:e.priority}),s.jsx("span",{className:"text-xs text-text-tertiary",children:e.category})]})]}),s.jsxs("span",{className:"text-xs text-text-tertiary shrink-0",children:[e.days_open,"d"]})]})}function bG({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(Xo,{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:Te(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(Fe.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},onClick:i,className:it("bg-surface rounded-[20px] card-shadow",l[r],(n||i)&&"transition-shadow duration-200 hover:shadow-hover cursor-pointer",t),children:e})}function Ke({title:e,subtitle:t,action:n,className:r}){return s.jsxs("div",{className:it("flex items-start justify-between mb-6",r),children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-semibold text-text-primary",children:e}),t&&s.jsx("p",{className:"text-sm text-text-secondary mt-0.5",children:t})]}),n&&s.jsx("div",{children:n})]})}function Re({className:e}){return s.jsx("div",{className:it("animate-pulse rounded-[14px] bg-text-secondary/8",e)})}function jG(){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 xG.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(Re,{className:"h-[120px]"},S))}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsx(Re,{className:"h-[400px] lg:col-span-2"}),s.jsx(Re,{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(Gf,{title:"Cash Position",value:Te(c.cash_position),subtitle:"Eget kapital",icon:s.jsx(hS,{size:20}),trend:c.profit_margin>0?"up":"down",trendValue:`${pE(c.profit_margin)}% marginal`,variant:c.cash_position>1e6?"success":c.cash_position>5e5?"warning":"danger"}),s.jsx(Gf,{title:"Pipeline",value:Te(c.total_pipeline),subtitle:`${c.active_deals} aktiva deals`,icon:s.jsx(Xo,{size:20}),trend:"up",trendValue:"+12% vs förra månaden"}),s.jsx(Gf,{title:"Team",value:`${h.active_now}/${h.total_members}`,subtitle:`${h.on_leave} på leave`,icon:s.jsx(Lr,{size:20}),trend:h.on_leave>0?"neutral":"up",trendValue:h.on_leave>0?`${h.on_leave} borta idag`:"Alla närvarande"}),s.jsx(Gf,{title:"Mina Tasks",value:d.length,subtitle:`${d.filter(w=>w.priority==="critical").length} kritiska`,icon:s.jsx(uF,{size:20}),variant:d.filter(w=>w.priority==="critical").length>0?"danger":d.filter(w=>w.priority==="high").length>0?"warning":"success"})]}),x.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(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(yG,{alert:w},S))})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[y.length>0&&s.jsxs(te,{children:[s.jsx(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(gG,{action:w},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(xr,{size:48,className:"mx-auto mb-2 text-success"}),s.jsx("p",{children:"Alla uppgifter är klara!"})]}):d.map(w=>s.jsx(vG,{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(bG,{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(_e,{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:Te(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:Te(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:Te(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:[pE(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:Te(w.amount)})]},S))]})]})]})]})]})]})}function wG(){return s.jsx(jG,{})}function SG(){const{user:e}=Br(),[t]=Aq(),[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(Re,{className:"h-[200px]"}),s.jsx(Re,{className:"h-[400px]"})]});if(!n)return null;const x=[{id:"general",label:"Allmänt",icon:pu},{id:"security",label:"Säkerhet",icon:Da},{id:"notifications",label:"Notifikationer",icon:W1},{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(Ye,{onClick:p,disabled:c,icon:c?void 0:s.jsx(oF,{size:16}),children:c?"Sparar...":"Spara ändringar"})]}),s.jsxs(te,{className:"relative overflow-hidden",children:[s.jsx("div",{className:"h-32 bg-gradient-to-r from-primary to-primary-hover"}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"relative -mt-16 mb-4",children:s.jsxs("div",{className:"w-32 h-32 rounded-2xl bg-surface border-4 border-bg flex items-center justify-center text-4xl font-bold text-primary relative",children:[n.avatar?s.jsx("img",{src:n.avatar,alt:n.name,className:"w-full h-full rounded-2xl object-cover"}):n.name.split(" ").map(y=>y[0]).join(""),s.jsx("button",{className:"absolute bottom-0 right-0 w-8 h-8 bg-primary text-white rounded-full flex items-center justify-center hover:bg-primary-hover transition-colors",children:s.jsx(xh,{size:14})})]})}),s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold",children:n.name}),s.jsx("p",{className:"text-text-secondary",children:n.email}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(_e,{variant:"primary",children:n.role}),s.jsx(_e,{variant:"default",children:n.department})]})]}),s.jsxs("div",{className:"text-right text-sm text-text-secondary",children:[s.jsxs("p",{children:["Senaste inloggning: ",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(pu,{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(uE,{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(_e,{variant:"default",children:"Aktiv"})]}),s.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Roll"}),s.jsx("p",{className:"text-xs text-text-secondary",children:n.role})]}),s.jsx(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(oE,{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(Ye,{variant:"secondary",className:"w-full",children:[s.jsx(oE,{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(_e,{variant:n.twoFactorEnabled?"success":"default",children:n.twoFactorEnabled?"Aktiv":"Inaktiv"})]}),!n.twoFactorEnabled&&s.jsxs(Ye,{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:W1},{key:"sms",label:"SMS-notifikationer",description:"Få viktiga uppdateringar via SMS",icon:uE}].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:nF}].map(y=>s.jsxs("button",{onClick:()=>r({...n,theme:y.id}),className:`p-3 rounded-xl border text-center transition-colors ${n.theme===y.id?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/30"}`,children:[s.jsx(y.icon,{size:20,className:"mx-auto mb-1"}),s.jsx("span",{className:"text-xs",children:y.label})]},y.id))})]})})]}),s.jsxs(te,{children:[s.jsx(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:it("w-full",t),children:e})})}function Ri({children:e,className:t}){return s.jsx("thead",{className:it("border-b border-border",t),children:e})}function Di({children:e,className:t}){return s.jsx("tbody",{className:t,children:e})}function Rt({children:e,className:t}){return s.jsx("tr",{className:it("border-b border-border/50 transition-colors hover:bg-bg/50",t),children:e})}function Ae({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return s.jsx("th",{colSpan:r,className:it("py-3 px-4 text-xs font-medium text-text-secondary uppercase tracking-wider",i[n],t),children:e})}function be({children:e,className:t,align:n="left",colSpan:r}){const i={left:"text-left",center:"text-center",right:"text-right"};return s.jsx("td",{colSpan:r,className:it("py-3.5 px-4 text-sm text-text-primary",i[n],t),children:e})}function wE({icon:e,title:t,description:n,action:r,className:i}){return s.jsxs("div",{className:it("flex flex-col items-center justify-center py-16 text-center",i),children:[e&&s.jsx("div",{className:"mb-4 text-text-secondary/40",children:e}),s.jsx("h3",{className:"text-sm font-medium text-text-primary",children:t}),n&&s.jsx("p",{className:"mt-1 text-sm text-text-secondary max-w-sm",children:n}),r&&s.jsx("div",{className:"mt-4",children:r})]})}function NG({children:e,className:t,onClick:n}){return s.jsx("div",{onClick:n,className:it("bg-surface rounded-2xl p-4 card-shadow border border-border/40",n&&"active:scale-[0.98] transition-transform cursor-pointer",t),children:e})}function AG({children:e,variant:t="default",className:n}){const r={default:"bg-bg text-text-secondary",success:"bg-success-light text-success",warning:"bg-warning-light text-warning",danger:"bg-danger-light text-danger",info:"bg-primary-light text-primary"};return s.jsx("span",{className:it("text-xs font-medium px-2.5 py-1 rounded-full",r[t],n),children:e})}const _G=["Customers","Leads","Pipeline"];function OG(){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([xg.customers(),xg.leads(),xg.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(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{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(Ye,{icon:s.jsx(Ir,{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(Lr,{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:_G.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(El,{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(Ye,{variant:"secondary",size:"sm",icon:s.jsx(rd,{size:14}),children:"Filter"})]})]}),e==="Customers"&&s.jsxs(te,{children:[s.jsx("div",{className:"hidden md:block",children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Customer"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Phone"}),s.jsx(Ae,{children:"Created"}),s.jsx(Ae,{align:"right"})]})}),s.jsx(Di,{children:v.map(_=>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(_e,{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(Mi,{size:16})})})]},_.id))})]})}),s.jsx("div",{className:"md:hidden p-4 space-y-3",children:v.map(_=>s.jsx(NG,{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(AG,{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(wE,{icon:s.jsx(Lr,{size:32}),title:"No customers found",description:"Try adjusting your search or filters"})]}),e==="Leads"&&s.jsxs(te,{children:[s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Lead"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{children:"Source"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Created"}),s.jsx(Ae,{align:"right"})]})}),s.jsx(Di,{children: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(_e,{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(Mi,{size:16})})})]},_.id))})]}),A.length===0&&s.jsx(wE,{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(_e,{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 yg,SE;function Dn(){if(SE)return yg;SE=1;var e=Array.isArray;return yg=e,yg}var gg,NE;function e6(){if(NE)return gg;NE=1;var e=typeof Pf=="object"&&Pf&&Pf.Object===Object&&Pf;return gg=e,gg}var vg,AE;function sa(){if(AE)return vg;AE=1;var e=e6(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return vg=n,vg}var bg,_E;function ad(){if(_E)return bg;_E=1;var e=sa(),t=e.Symbol;return bg=t,bg}var jg,OE;function TG(){if(OE)return jg;OE=1;var e=ad(),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 jg=l,jg}var wg,TE;function EG(){if(TE)return wg;TE=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return wg=n,wg}var Sg,EE;function Fa(){if(EE)return Sg;EE=1;var e=ad(),t=TG(),n=EG(),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 Sg=c,Sg}var Ng,CE;function Ga(){if(CE)return Ng;CE=1;function e(t){return t!=null&&typeof t=="object"}return Ng=e,Ng}var Ag,kE;function kl(){if(kE)return Ag;kE=1;var e=Fa(),t=Ga(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Ag=r,Ag}var _g,ME;function vS(){if(ME)return _g;ME=1;var e=Dn(),t=kl(),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 _g=i,_g}var Og,PE;function $i(){if(PE)return Og;PE=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Og=e,Og}var Tg,RE;function bS(){if(RE)return Tg;RE=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 Tg=c,Tg}var Eg,DE;function CG(){if(DE)return Eg;DE=1;var e=sa(),t=e["__core-js_shared__"];return Eg=t,Eg}var Cg,zE;function kG(){if(zE)return Cg;zE=1;var e=CG(),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 Cg=n,Cg}var kg,LE;function t6(){if(LE)return kg;LE=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 Mg,$E;function MG(){if($E)return Mg;$E=1;var e=bS(),t=kG(),n=$i(),r=t6(),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 Mg=x,Mg}var Pg,BE;function PG(){if(BE)return Pg;BE=1;function e(t,n){return t==null?void 0:t[n]}return Pg=e,Pg}var Rg,IE;function zs(){if(IE)return Rg;IE=1;var e=MG(),t=PG();function n(r,i){var l=t(r,i);return e(l)?l:void 0}return Rg=n,Rg}var Dg,qE;function Km(){if(qE)return Dg;qE=1;var e=zs(),t=e(Object,"create");return Dg=t,Dg}var zg,UE;function RG(){if(UE)return zg;UE=1;var e=Km();function t(){this.__data__=e?e(null):{},this.size=0}return zg=t,zg}var Lg,VE;function DG(){if(VE)return Lg;VE=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Lg=e,Lg}var $g,HE;function zG(){if(HE)return $g;HE=1;var e=Km(),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 $g=i,$g}var Bg,FE;function LG(){if(FE)return Bg;FE=1;var e=Km(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var l=this.__data__;return e?l[i]!==void 0:n.call(l,i)}return Bg=r,Bg}var Ig,GE;function $G(){if(GE)return Ig;GE=1;var e=Km(),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 Ig=n,Ig}var qg,KE;function BG(){if(KE)return qg;KE=1;var e=RG(),t=DG(),n=zG(),r=LG(),i=$G();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,qg=l,qg}var Ug,YE;function IG(){if(YE)return Ug;YE=1;function e(){this.__data__=[],this.size=0}return Ug=e,Ug}var Vg,XE;function jS(){if(XE)return Vg;XE=1;function e(t,n){return t===n||t!==t&&n!==n}return Vg=e,Vg}var Hg,WE;function Ym(){if(WE)return Hg;WE=1;var e=jS();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Hg=t,Hg}var Fg,ZE;function qG(){if(ZE)return Fg;ZE=1;var e=Ym(),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 Fg=r,Fg}var Gg,QE;function UG(){if(QE)return Gg;QE=1;var e=Ym();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Gg=t,Gg}var Kg,JE;function VG(){if(JE)return Kg;JE=1;var e=Ym();function t(n){return e(this.__data__,n)>-1}return Kg=t,Kg}var Yg,eC;function HG(){if(eC)return Yg;eC=1;var e=Ym();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 Yg=t,Yg}var Xg,tC;function Xm(){if(tC)return Xg;tC=1;var e=IG(),t=qG(),n=UG(),r=VG(),i=HG();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,Xg=l,Xg}var Wg,nC;function wS(){if(nC)return Wg;nC=1;var e=zs(),t=sa(),n=e(t,"Map");return Wg=n,Wg}var Zg,rC;function FG(){if(rC)return Zg;rC=1;var e=BG(),t=Xm(),n=wS();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Zg=r,Zg}var Qg,aC;function GG(){if(aC)return Qg;aC=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Qg=e,Qg}var Jg,iC;function Wm(){if(iC)return Jg;iC=1;var e=GG();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Jg=t,Jg}var ev,sC;function KG(){if(sC)return ev;sC=1;var e=Wm();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return ev=t,ev}var tv,oC;function YG(){if(oC)return tv;oC=1;var e=Wm();function t(n){return e(this,n).get(n)}return tv=t,tv}var nv,lC;function XG(){if(lC)return nv;lC=1;var e=Wm();function t(n){return e(this,n).has(n)}return nv=t,nv}var rv,cC;function WG(){if(cC)return rv;cC=1;var e=Wm();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 rv=t,rv}var av,uC;function SS(){if(uC)return av;uC=1;var e=FG(),t=KG(),n=YG(),r=XG(),i=WG();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,av=l,av}var iv,dC;function n6(){if(dC)return iv;dC=1;var e=SS(),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,iv=n,iv}var sv,fC;function ZG(){if(fC)return sv;fC=1;var e=n6(),t=500;function n(r){var i=e(r,function(c){return l.size===t&&l.clear(),c}),l=i.cache;return i}return sv=n,sv}var ov,hC;function QG(){if(hC)return ov;hC=1;var e=ZG(),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 ov=r,ov}var lv,mC;function NS(){if(mC)return lv;mC=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 lv=e,lv}var cv,pC;function JG(){if(pC)return cv;pC=1;var e=ad(),t=NS(),n=Dn(),r=kl(),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 cv=c,cv}var uv,xC;function r6(){if(xC)return uv;xC=1;var e=JG();function t(n){return n==null?"":e(n)}return uv=t,uv}var dv,yC;function a6(){if(yC)return dv;yC=1;var e=Dn(),t=vS(),n=QG(),r=r6();function i(l,c){return e(l)?l:t(l,c)?[l]:n(r(l))}return dv=i,dv}var fv,gC;function Zm(){if(gC)return fv;gC=1;var e=kl();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return fv=t,fv}var hv,vC;function AS(){if(vC)return hv;vC=1;var e=a6(),t=Zm();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 hv=n,hv}var mv,bC;function i6(){if(bC)return mv;bC=1;var e=AS();function t(n,r,i){var l=n==null?void 0:e(n,r);return l===void 0?i:l}return mv=t,mv}var eK=i6();const Zn=st(eK);var pv,jC;function tK(){if(jC)return pv;jC=1;function e(t){return t==null}return pv=e,pv}var nK=tK();const Pe=st(nK);var xv,wC;function rK(){if(wC)return xv;wC=1;var e=Fa(),t=Dn(),n=Ga(),r="[object String]";function i(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==r}return xv=i,xv}var aK=rK();const Ts=st(aK);var iK=bS();const Ee=st(iK);var sK=$i();const Ml=st(sK);var yv={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 SC;function oK(){if(SC)return tt;SC=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 NC;function lK(){return NC||(NC=1,yv.exports=oK()),yv.exports}var cK=lK(),gv,AC;function s6(){if(AC)return gv;AC=1;var e=Fa(),t=Ga(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return gv=r,gv}var vv,_C;function uK(){if(_C)return vv;_C=1;var e=s6();function t(n){return e(n)&&n!=+n}return vv=t,vv}var dK=uK();const id=st(dK);var fK=s6();const hK=st(fK);var wn=function(t){return t===0?0:t>0?1:-1},gs=function(t){return Ts(t)&&t.indexOf("%")===t.length-1},he=function(t){return hK(t)&&!id(t)},mK=function(t){return Pe(t)},Xt=function(t){return he(t)||Ts(t)},pK=0,Pl=function(t){var n=++pK;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)&&!Ts(t))return r;var l;if(gs(t)){var c=t.indexOf("%");l=n*parseFloat(t.slice(0,c))/100}else l=+t;return id(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},xK=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},Yn=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):Zn(r,t))===n})}var yK=function(t,n){return he(t)&&he(n)?t-n:Ts(t)&&Ts(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Vo(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 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 gK=["viewBox","children"],vK=["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"],OC=["points","pathLength"],bv={svg:gK,polygon:OC,polyline:OC},_S=["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),!Ml(r))return null;var i={};return Object.keys(r).forEach(function(l){_S.includes(l)&&(i[l]=n||function(c){return r[l](r,c)})}),i},bK=function(t,n,r){return function(i){return t(n,r,i),null}},Es=function(t,n,r){if(!Ml(t)||nj(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(l){var c=t[l];_S.includes(l)&&typeof c=="function"&&(i||(i={}),i[l]=bK(c,n,r))}),i},jK=["children"],wK=["children"];function TC(e,t){if(e==null)return{};var n=SK(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 SK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rj(e){"@babel/helpers - typeof";return rj=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},rj(e)}var EC={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":""},CC=null,jv=null,OS=function e(t){if(t===CC&&Array.isArray(jv))return jv;var n=[];return k.Children.forEach(t,function(r){Pe(r)||(cK.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),jv=n,CC=t,n};function Qn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return za(i)}):r=[za(t)],OS(e).forEach(function(i){var l=Zn(i,"type.displayName")||Zn(i,"type.name");r.indexOf(l)!==-1&&n.push(i)}),n}function Kn(e,t){var n=Qn(e,t);return n&&n[0]}var kC=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)},NK=["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"],AK=function(t){return t&&t.type&&Ts(t.type)&&NK.indexOf(t.type)>=0},_K=function(t){return t&&rj(t)==="object"&&"clipDot"in t},OK=function(t,n,r,i){var l,c=(l=bv==null?void 0:bv[i])!==null&&l!==void 0?l:[];return n.startsWith("data-")||!Ee(t)&&(i&&c.includes(n)||vK.includes(n))||r&&_S.includes(n)},je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(k.isValidElement(t)&&(i=t.props),!Ml(i))return null;var l={};return Object.keys(i).forEach(function(c){var d;OK((d=i)===null||d===void 0?void 0:d[c],c,n,r)&&(l[c]=i[c])}),l},aj=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 MC(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(!MC(l,c))return!1}return!0},MC=function(t,n){if(Pe(t)&&Pe(n))return!0;if(!Pe(t)&&!Pe(n)){var r=t.props||{},i=r.children,l=TC(r,jK),c=n.props||{},d=c.children,f=TC(c,wK);return i&&d?Vo(l,f)&&aj(i,d):!i&&!d?Vo(l,f):!1}return!1},PC=function(t,n){var r=[],i={};return OS(t).forEach(function(l,c){if(AK(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},TK=function(t){var n=t&&t.type;return n&&EC[n]?EC[n]:null},EK=function(t,n){return OS(n).indexOf(t)},CK=["children","width","height","viewBox","className","style","title","desc"];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 kK(e,t){if(e==null)return{};var n=MK(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 MK(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 sj(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,CK),p=i||{width:n,height:r,x:0,y:0},x=ze("recharts-surface",l);return V.createElement("svg",ij({},je(h,!0,"svg"),{className:x,width:n,height:r,style:c,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),V.createElement("title",null,d),V.createElement("desc",null,f),t)}var PK=["children","className"];function oj(){return oj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oj.apply(this,arguments)}function RK(e,t){if(e==null)return{};var n=DK(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 DK(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=RK(e,PK),l=ze("recharts-layer",r);return V.createElement("g",oj({className:l},je(i,!0),{ref:t}),n)}),$r=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]},wv,RC;function zK(){if(RC)return wv;RC=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 wv=e,wv}var Sv,DC;function LK(){if(DC)return Sv;DC=1;var e=zK();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 Sv=t,Sv}var Nv,zC;function o6(){if(zC)return Nv;zC=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 Nv=f,Nv}var Av,LC;function $K(){if(LC)return Av;LC=1;function e(t){return t.split("")}return Av=e,Av}var _v,$C;function BK(){if($C)return _v;$C=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 _v=T,_v}var Ov,BC;function IK(){if(BC)return Ov;BC=1;var e=$K(),t=o6(),n=BK();function r(i){return t(i)?n(i):e(i)}return Ov=r,Ov}var Tv,IC;function qK(){if(IC)return Tv;IC=1;var e=LK(),t=o6(),n=IK(),r=r6();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 Tv=i,Tv}var Ev,qC;function UK(){if(qC)return Ev;qC=1;var e=qK(),t=e("toUpperCase");return Ev=t,Ev}var VK=UK();const Qm=st(VK);function xt(e){return function(){return e}}const l6=Math.cos,$h=Math.sin,Ur=Math.sqrt,Bh=Math.PI,Jm=2*Bh,lj=Math.PI,cj=2*lj,hs=1e-6,HK=cj-hs;function c6(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function FK(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return c6;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 GK{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?c6:FK(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((lj-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%cj+cj),y>HK?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>=lj)},${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 TS(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 GK(t)}function ES(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function u6(e){this._context=e}u6.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 ep(e){return new u6(e)}function d6(e){return e[0]}function f6(e){return e[1]}function h6(e,t){var n=xt(!0),r=null,i=ep,l=null,c=TS(d);e=typeof e=="function"?e:e===void 0?d6:xt(e),t=typeof t=="function"?t:t===void 0?f6:xt(t);function d(f){var h,p=(f=ES(f)).length,x,y=!1,j;for(r==null&&(l=i(j=c())),h=0;h<=p;++h)!(h<p&&n(x=f[h],h,f))===y&&((y=!y)?l.lineStart():l.lineEnd()),y&&l.point(+e(x,h,f),+t(x,h,f));if(j)return l=null,j+""||null}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:xt(+f),d):e},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:xt(+f),d):t},d.defined=function(f){return arguments.length?(n=typeof f=="function"?f:xt(!!f),d):n},d.curve=function(f){return arguments.length?(i=f,r!=null&&(l=i(r)),d):i},d.context=function(f){return arguments.length?(f==null?r=l=null:l=i(r=f),d):r},d}function Kf(e,t,n){var r=null,i=xt(!0),l=null,c=ep,d=null,f=TS(h);e=typeof e=="function"?e:e===void 0?d6:xt(+e),t=typeof t=="function"?t:xt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?f6:xt(+n);function h(x){var y,j,w,S=(x=ES(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 h6().defined(i).curve(c).context(l)}return h.x=function(x){return arguments.length?(e=typeof x=="function"?x:xt(+x),r=null,h):e},h.x0=function(x){return arguments.length?(e=typeof x=="function"?x:xt(+x),h):e},h.x1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:xt(+x),h):r},h.y=function(x){return arguments.length?(t=typeof x=="function"?x:xt(+x),n=null,h):t},h.y0=function(x){return arguments.length?(t=typeof x=="function"?x:xt(+x),h):t},h.y1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:xt(+x),h):n},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(n)},h.lineX1=function(){return p().x(r).y(t)},h.defined=function(x){return arguments.length?(i=typeof x=="function"?x:xt(!!x),h):i},h.curve=function(x){return arguments.length?(c=x,l!=null&&(d=c(l)),h):c},h.context=function(x){return arguments.length?(x==null?l=d=null:d=c(l=x),h):l},h}class m6{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 KK(e){return new m6(e,!0)}function YK(e){return new m6(e,!1)}const CS={draw(e,t){const n=Ur(t/Bh);e.moveTo(n,0),e.arc(0,0,n,0,Jm)}},XK={draw(e,t){const n=Ur(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()}},p6=Ur(1/3),WK=p6*2,ZK={draw(e,t){const n=Ur(t/WK),r=n*p6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},QK={draw(e,t){const n=Ur(t),r=-n/2;e.rect(r,r,n,n)}},JK=.8908130915292852,x6=$h(Bh/10)/$h(7*Bh/10),eY=$h(Jm/10)*x6,tY=-l6(Jm/10)*x6,nY={draw(e,t){const n=Ur(t*JK),r=eY*n,i=tY*n;e.moveTo(0,-n),e.lineTo(r,i);for(let l=1;l<5;++l){const c=Jm*l/5,d=l6(c),f=$h(c);e.lineTo(f*n,-d*n),e.lineTo(d*r-f*i,f*r+d*i)}e.closePath()}},Cv=Ur(3),rY={draw(e,t){const n=-Ur(t/(Cv*3));e.moveTo(0,n*2),e.lineTo(-Cv*n,-n),e.lineTo(Cv*n,-n),e.closePath()}},ur=-.5,dr=Ur(3)/2,uj=1/Ur(12),aY=(uj/2+1)*3,iY={draw(e,t){const n=Ur(t/aY),r=n/2,i=n*uj,l=r,c=n*uj+n,d=-l,f=c;e.moveTo(r,i),e.lineTo(l,c),e.lineTo(d,f),e.lineTo(ur*r-dr*i,dr*r+ur*i),e.lineTo(ur*l-dr*c,dr*l+ur*c),e.lineTo(ur*d-dr*f,dr*d+ur*f),e.lineTo(ur*r+dr*i,ur*i-dr*r),e.lineTo(ur*l+dr*c,ur*c-dr*l),e.lineTo(ur*d+dr*f,ur*f-dr*d),e.closePath()}};function sY(e,t){let n=null,r=TS(i);e=typeof e=="function"?e:xt(e||CS),t=typeof t=="function"?t:xt(t===void 0?64:+t);function i(){let l;if(n||(n=l=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),l)return n=null,l+""||null}return i.type=function(l){return arguments.length?(e=typeof l=="function"?l:xt(l),i):e},i.size=function(l){return arguments.length?(t=typeof l=="function"?l:xt(+l),i):t},i.context=function(l){return arguments.length?(n=l??null,i):n},i}function 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 y6(e){this._context=e}y6.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 oY(e){return new y6(e)}function g6(e){this._context=e}g6.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 lY(e){return new g6(e)}function v6(e){this._context=e}v6.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 cY(e){return new v6(e)}function b6(e){this._context=e}b6.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 uY(e){return new b6(e)}function UC(e){return e<0?-1:1}function VC(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(UC(l)+UC(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(d))||0}function HC(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,HC(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,HC(this,n=VC(this,e,t)),n);break;default:kv(this,this._t0,n=VC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function j6(e){this._context=new w6(e)}(j6.prototype=Object.create(Uh.prototype)).point=function(e,t){Uh.prototype.point.call(this,t,e)};function w6(e){this._context=e}w6.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 dY(e){return new Uh(e)}function fY(e){return new j6(e)}function S6(e){this._context=e}S6.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=FC(e),i=FC(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 FC(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 hY(e){return new S6(e)}function tp(e,t){this._context=e,this._t=t}tp.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 mY(e){return new tp(e,.5)}function pY(e){return new tp(e,0)}function xY(e){return new tp(e,1)}function Wo(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 dj(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function yY(e,t){return e[t]}function gY(e){const t=[];return t.key=e,t}function vY(){var e=xt([]),t=dj,n=Wo,r=yY;function i(l){var c=Array.from(e.apply(this,arguments),gY),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=ES(t(c));d<f;++d)c[p[d]].index=d;return n(c,p),c}return i.keys=function(l){return arguments.length?(e=typeof l=="function"?l:xt(Array.from(l)),i):e},i.value=function(l){return arguments.length?(r=typeof l=="function"?l:xt(+l),i):r},i.order=function(l){return arguments.length?(t=l==null?dj:typeof l=="function"?l:xt(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(n=l??Wo,i):n},i}function bY(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}Wo(e,t)}}function jY(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}Wo(e,t)}}function wY(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,Wo(e,t)}}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)}var SY=["type","size","sizeType"];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 GC(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 KC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GC(Object(n),!0).forEach(function(r){NY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NY(e,t,n){return t=AY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AY(e){var t=_Y(e,"string");return xu(t)=="symbol"?t:t+""}function _Y(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 OY(e,t){if(e==null)return{};var n=TY(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 TY(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 N6={symbolCircle:CS,symbolCross:XK,symbolDiamond:ZK,symbolSquare:QK,symbolStar:nY,symbolTriangle:rY,symbolWye:iY},EY=Math.PI/180,CY=function(t){var n="symbol".concat(Qm(t));return N6[n]||CS},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*EY;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}},MY=function(t,n){N6["symbol".concat(Qm(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=OY(t,SY),h=KC(KC({},f),{},{type:r,size:l,sizeType:d}),p=function(){var v=CY(r),A=sY().type(v).size(kY(l,d,r));return A()},x=h.className,y=h.cx,j=h.cy,w=je(h,!0);return y===+y&&j===+j&&l===+l?V.createElement("path",fj({},w,{className:ze("recharts-symbols",x),transform:"translate(".concat(y,", ").concat(j,")"),d:p()})):null};kS.registerSymbol=MY;function Zo(e){"@babel/helpers - typeof";return Zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(e)}function hj(){return hj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hj.apply(this,arguments)}function YC(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 PY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YC(Object(n),!0).forEach(function(r){yu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DY(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,_6(r.key),r)}}function zY(e,t,n){return t&&DY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LY(e,t,n){return t=Vh(t),$Y(e,A6()?Reflect.construct(t,n||[],Vh(e).constructor):t.apply(e,n))}function $Y(e,t){if(t&&(Zo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BY(e)}function BY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A6=function(){return!!e})()}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vh(e)}function IY(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 yu(e,t,n){return t=_6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _6(e){var t=qY(e,"string");return Zo(t)=="symbol"?t:t+""}function qY(e,t){if(Zo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fr=32,MS=(function(e){function t(){return RY(this,t),LY(this,t,arguments)}return IY(t,e),zY(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,l=fr/2,c=fr/6,d=fr/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:fr,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(fr,"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(fr/8,"h").concat(fr,"v").concat(fr*3/4,"h").concat(-fr,"z"),className:"recharts-legend-icon"});if(V.isValidElement(r.legendIcon)){var h=PY({},r);return delete h.legendIcon,V.cloneElement(r.legendIcon,h)}return V.createElement(kS,{fill:f,cx:l,cy:l,size:fr,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:fr,height:fr},x={display:d==="horizontal"?"inline-block":"block",marginRight:10},y={display:"inline-block",verticalAlign:"middle",marginRight:4};return l.map(function(j,w){var S=j.formatter||f,v=ze(yu(yu({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",j.inactive));if(j.type==="none")return null;var A=Ee(j.value)?null:j.value;$r(!Ee(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",hj({className:v,style:x,key:"legend-item-".concat(w)},Es(r.props,j,w)),V.createElement(sj,{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);yu(MS,"displayName","Legend");yu(MS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Mv,XC;function UY(){if(XC)return Mv;XC=1;var e=Xm();function t(){this.__data__=new e,this.size=0}return Mv=t,Mv}var Pv,WC;function VY(){if(WC)return Pv;WC=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Pv=e,Pv}var Rv,ZC;function HY(){if(ZC)return Rv;ZC=1;function e(t){return this.__data__.get(t)}return Rv=e,Rv}var Dv,QC;function FY(){if(QC)return Dv;QC=1;function e(t){return this.__data__.has(t)}return Dv=e,Dv}var zv,JC;function GY(){if(JC)return zv;JC=1;var e=Xm(),t=wS(),n=SS(),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 zv=i,zv}var Lv,ek;function O6(){if(ek)return Lv;ek=1;var e=Xm(),t=UY(),n=VY(),r=HY(),i=FY(),l=GY();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,Lv=c,Lv}var $v,tk;function KY(){if(tk)return $v;tk=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return $v=t,$v}var Bv,nk;function YY(){if(nk)return Bv;nk=1;function e(t){return this.__data__.has(t)}return Bv=e,Bv}var Iv,rk;function T6(){if(rk)return Iv;rk=1;var e=SS(),t=KY(),n=YY();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,Iv=r,Iv}var qv,ak;function E6(){if(ak)return qv;ak=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 qv=e,qv}var Uv,ik;function C6(){if(ik)return Uv;ik=1;function e(t,n){return t.has(n)}return Uv=e,Uv}var Vv,sk;function k6(){if(sk)return Vv;sk=1;var e=T6(),t=E6(),n=C6(),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 Vv=l,Vv}var Hv,ok;function XY(){if(ok)return Hv;ok=1;var e=sa(),t=e.Uint8Array;return Hv=t,Hv}var Fv,lk;function WY(){if(lk)return Fv;lk=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,l){r[++n]=[l,i]}),r}return Fv=e,Fv}var Gv,ck;function PS(){if(ck)return Gv;ck=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Gv=e,Gv}var Kv,uk;function ZY(){if(uk)return Kv;uk=1;var e=ad(),t=XY(),n=jS(),r=k6(),i=WY(),l=PS(),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,D,z,$){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||!z(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 L=i;case w:var K=B&c;if(L||(L=l),E.size!=M.size&&!K)return!1;var H=$.get(E);if(H)return H==M;B|=d,$.set(E,M);var I=r(L(E),L(M),B,D,z,$);return $.delete(E),I;case v:if(T)return T.call(E)==T.call(M)}return!1}return Kv=N,Kv}var Yv,dk;function M6(){if(dk)return Yv;dk=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 Yv=e,Yv}var Xv,fk;function QY(){if(fk)return Xv;fk=1;var e=M6(),t=Dn();function n(r,i,l){var c=i(r);return t(r)?c:e(c,l(r))}return Xv=n,Xv}var Wv,hk;function JY(){if(hk)return Wv;hk=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 Wv=e,Wv}var Zv,mk;function eX(){if(mk)return Zv;mk=1;function e(){return[]}return Zv=e,Zv}var Qv,pk;function tX(){if(pk)return Qv;pk=1;var e=JY(),t=eX(),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 Qv=l,Qv}var Jv,xk;function nX(){if(xk)return Jv;xk=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Jv=e,Jv}var eb,yk;function rX(){if(yk)return eb;yk=1;var e=Fa(),t=Ga(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return eb=r,eb}var tb,gk;function RS(){if(gk)return tb;gk=1;var e=rX(),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 tb=l,tb}var Xc={exports:{}},nb,vk;function aX(){if(vk)return nb;vk=1;function e(){return!1}return nb=e,nb}Xc.exports;var bk;function P6(){return bk||(bk=1,(function(e,t){var n=sa(),r=aX(),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})(Xc,Xc.exports)),Xc.exports}var rb,jk;function DS(){if(jk)return rb;jk=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 rb=n,rb}var ab,wk;function zS(){if(wk)return ab;wk=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return ab=t,ab}var ib,Sk;function iX(){if(Sk)return ib;Sk=1;var e=Fa(),t=zS(),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]",D="[object Uint32Array]",z={};z[O]=z[_]=z[T]=z[N]=z[E]=z[M]=z[R]=z[B]=z[D]=!0,z[r]=z[i]=z[v]=z[l]=z[A]=z[c]=z[d]=z[f]=z[h]=z[p]=z[x]=z[y]=z[j]=z[w]=z[S]=!1;function $(L){return n(L)&&t(L.length)&&!!z[e(L)]}return ib=$,ib}var sb,Nk;function R6(){if(Nk)return sb;Nk=1;function e(t){return function(n){return t(n)}}return sb=e,sb}var Wc={exports:{}};Wc.exports;var Ak;function sX(){return Ak||(Ak=1,(function(e,t){var n=e6(),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})(Wc,Wc.exports)),Wc.exports}var ob,_k;function D6(){if(_k)return ob;_k=1;var e=iX(),t=R6(),n=sX(),r=n&&n.isTypedArray,i=r?t(r):e;return ob=i,ob}var lb,Ok;function oX(){if(Ok)return lb;Ok=1;var e=nX(),t=RS(),n=Dn(),r=P6(),i=DS(),l=D6(),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 lb=f,lb}var cb,Tk;function lX(){if(Tk)return cb;Tk=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return cb=t,cb}var ub,Ek;function z6(){if(Ek)return ub;Ek=1;function e(t,n){return function(r){return t(n(r))}}return ub=e,ub}var db,Ck;function cX(){if(Ck)return db;Ck=1;var e=z6(),t=e(Object.keys,Object);return db=t,db}var fb,kk;function uX(){if(kk)return fb;kk=1;var e=lX(),t=cX(),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 fb=i,fb}var hb,Mk;function sd(){if(Mk)return hb;Mk=1;var e=bS(),t=zS();function n(r){return r!=null&&t(r.length)&&!e(r)}return hb=n,hb}var mb,Pk;function np(){if(Pk)return mb;Pk=1;var e=oX(),t=uX(),n=sd();function r(i){return n(i)?e(i):t(i)}return mb=r,mb}var pb,Rk;function dX(){if(Rk)return pb;Rk=1;var e=QY(),t=tX(),n=np();function r(i){return e(i,n,t)}return pb=r,pb}var xb,Dk;function fX(){if(Dk)return xb;Dk=1;var e=dX(),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,D=c.constructor;B!=D&&"constructor"in l&&"constructor"in c&&!(typeof B=="function"&&B instanceof B&&typeof D=="function"&&D instanceof D)&&(T=!1)}return p.delete(l),p.delete(c),T}return xb=i,xb}var yb,zk;function hX(){if(zk)return yb;zk=1;var e=zs(),t=sa(),n=e(t,"DataView");return yb=n,yb}var gb,Lk;function mX(){if(Lk)return gb;Lk=1;var e=zs(),t=sa(),n=e(t,"Promise");return gb=n,gb}var vb,$k;function L6(){if($k)return vb;$k=1;var e=zs(),t=sa(),n=e(t,"Set");return vb=n,vb}var bb,Bk;function pX(){if(Bk)return bb;Bk=1;var e=zs(),t=sa(),n=e(t,"WeakMap");return bb=n,bb}var jb,Ik;function xX(){if(Ik)return jb;Ik=1;var e=hX(),t=wS(),n=mX(),r=L6(),i=pX(),l=Fa(),c=t6(),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}),jb=O,jb}var wb,qk;function yX(){if(qk)return wb;qk=1;var e=O6(),t=k6(),n=ZY(),r=fX(),i=xX(),l=Dn(),c=P6(),d=D6(),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,D=R==x,z=M==R;if(z&&c(S)){if(!c(v))return!1;N=!0,B=!1}if(z&&!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 $=B&&j.call(S,"__wrapped__"),L=D&&j.call(v,"__wrapped__");if($||L){var K=$?S.value():S,H=L?v.value():v;return T||(T=new e),_(K,H,A,O,T)}}return z?(T||(T=new e),r(S,v,A,O,_,T)):!1}return wb=w,wb}var Sb,Uk;function LS(){if(Uk)return Sb;Uk=1;var e=yX(),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 Sb=n,Sb}var Nb,Vk;function gX(){if(Vk)return Nb;Vk=1;var e=O6(),t=LS(),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 Nb=i,Nb}var Ab,Hk;function $6(){if(Hk)return Ab;Hk=1;var e=$i();function t(n){return n===n&&!e(n)}return Ab=t,Ab}var _b,Fk;function vX(){if(Fk)return _b;Fk=1;var e=$6(),t=np();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 _b=n,_b}var Ob,Gk;function B6(){if(Gk)return Ob;Gk=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ob=e,Ob}var Tb,Kk;function bX(){if(Kk)return Tb;Kk=1;var e=gX(),t=vX(),n=B6();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 Tb=r,Tb}var Eb,Yk;function jX(){if(Yk)return Eb;Yk=1;function e(t,n){return t!=null&&n in Object(t)}return Eb=e,Eb}var Cb,Xk;function wX(){if(Xk)return Cb;Xk=1;var e=a6(),t=RS(),n=Dn(),r=DS(),i=zS(),l=Zm();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 Cb=c,Cb}var kb,Wk;function SX(){if(Wk)return kb;Wk=1;var e=jX(),t=wX();function n(r,i){return r!=null&&t(r,i,e)}return kb=n,kb}var Mb,Zk;function NX(){if(Zk)return Mb;Zk=1;var e=LS(),t=i6(),n=SX(),r=vS(),i=$6(),l=B6(),c=Zm(),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 Mb=h,Mb}var Pb,Qk;function Rl(){if(Qk)return Pb;Qk=1;function e(t){return t}return Pb=e,Pb}var Rb,Jk;function AX(){if(Jk)return Rb;Jk=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Rb=e,Rb}var Db,eM;function _X(){if(eM)return Db;eM=1;var e=AS();function t(n){return function(r){return e(r,n)}}return Db=t,Db}var zb,tM;function OX(){if(tM)return zb;tM=1;var e=AX(),t=_X(),n=vS(),r=Zm();function i(l){return n(l)?e(r(l)):t(l)}return zb=i,zb}var Lb,nM;function oa(){if(nM)return Lb;nM=1;var e=bX(),t=NX(),n=Rl(),r=Dn(),i=OX();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 Lb=l,Lb}var $b,rM;function I6(){if(rM)return $b;rM=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 $b=e,$b}var Bb,aM;function TX(){if(aM)return Bb;aM=1;function e(t){return t!==t}return Bb=e,Bb}var Ib,iM;function EX(){if(iM)return Ib;iM=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 Ib=e,Ib}var qb,sM;function CX(){if(sM)return qb;sM=1;var e=I6(),t=TX(),n=EX();function r(i,l,c){return l===l?n(i,l,c):e(i,t,c)}return qb=r,qb}var Ub,oM;function kX(){if(oM)return Ub;oM=1;var e=CX();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return Ub=t,Ub}var Vb,lM;function MX(){if(lM)return Vb;lM=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 Vb=e,Vb}var Hb,cM;function PX(){if(cM)return Hb;cM=1;function e(){}return Hb=e,Hb}var Fb,uM;function RX(){if(uM)return Fb;uM=1;var e=L6(),t=PX(),n=PS(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(l){return new e(l)}:t;return Fb=i,Fb}var Gb,dM;function DX(){if(dM)return Gb;dM=1;var e=T6(),t=kX(),n=MX(),r=C6(),i=RX(),l=PS(),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 Gb=d,Gb}var Kb,fM;function zX(){if(fM)return Kb;fM=1;var e=oa(),t=DX();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Kb=n,Kb}var LX=zX();const hM=st(LX);function q6(e,t,n){return t===!0?hM(e,n):Ee(t)?hM(e,t):e}function Qo(e){"@babel/helpers - typeof";return Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(e)}var $X=["ref"];function mM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mM(Object(n),!0).forEach(function(r){rp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V6(r.key),r)}}function IX(e,t,n){return t&&pM(e.prototype,t),n&&pM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qX(e,t,n){return t=Hh(t),UX(e,U6()?Reflect.construct(t,n||[],Hh(e).constructor):t.apply(e,n))}function UX(e,t){if(t&&(Qo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VX(e)}function VX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U6=function(){return!!e})()}function Hh(e){return Hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hh(e)}function HX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pj(e,t)}function pj(e,t){return pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pj(e,t)}function rp(e,t,n){return t=V6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V6(e){var t=FX(e,"string");return Qo(t)=="symbol"?t:t+""}function FX(e,t){if(Qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function GX(e,t){if(e==null)return{};var n=KX(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 KX(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 YX(e){return e.value}function XX(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var n=GX(t,$X);return V.createElement(MS,n)}var xM=1,Ho=(function(e){function t(){var n;BX(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=qX(this,t,[].concat(i)),rp(n,"lastBoundingBox",{width:-1,height:-1}),n}return HX(t,e),IX(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>xM||Math.abs(i.height-this.lastBoundingBox.height)>xM)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ta({},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 Ta(Ta({},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=Ta(Ta({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}},XX(l,Ta(Ta({},this.props),{},{payload:q6(p,h,YX)})))}}],[{key:"getWithHeight",value:function(r,i){var l=Ta(Ta({},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);rp(Ho,"displayName","Legend");rp(Ho,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Yb,yM;function WX(){if(yM)return Yb;yM=1;var e=ad(),t=RS(),n=Dn(),r=e?e.isConcatSpreadable:void 0;function i(l){return n(l)||t(l)||!!(r&&l&&l[r])}return Yb=i,Yb}var Xb,gM;function H6(){if(gM)return Xb;gM=1;var e=M6(),t=WX();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 Xb=n,Xb}var Wb,vM;function ZX(){if(vM)return Wb;vM=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 Wb=e,Wb}var Zb,bM;function QX(){if(bM)return Zb;bM=1;var e=ZX(),t=e();return Zb=t,Zb}var Qb,jM;function F6(){if(jM)return Qb;jM=1;var e=QX(),t=np();function n(r,i){return r&&e(r,i,t)}return Qb=n,Qb}var Jb,wM;function JX(){if(wM)return Jb;wM=1;var e=sd();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 Jb=t,Jb}var e0,SM;function $S(){if(SM)return e0;SM=1;var e=F6(),t=JX(),n=t(e);return e0=n,e0}var t0,NM;function G6(){if(NM)return t0;NM=1;var e=$S(),t=sd();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 t0=n,t0}var n0,AM;function eW(){if(AM)return n0;AM=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return n0=e,n0}var r0,_M;function tW(){if(_M)return r0;_M=1;var e=kl();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 r0=t,r0}var a0,OM;function nW(){if(OM)return a0;OM=1;var e=tW();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 a0=t,a0}var i0,TM;function rW(){if(TM)return i0;TM=1;var e=NS(),t=AS(),n=oa(),r=G6(),i=eW(),l=R6(),c=nW(),d=Rl(),f=Dn();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 i0=h,i0}var s0,EM;function aW(){if(EM)return s0;EM=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 s0=e,s0}var o0,CM;function iW(){if(CM)return o0;CM=1;var e=aW(),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 o0=n,o0}var l0,kM;function sW(){if(kM)return l0;kM=1;function e(t){return function(){return t}}return l0=e,l0}var c0,MM;function K6(){if(MM)return c0;MM=1;var e=zs(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return c0=t,c0}var u0,PM;function oW(){if(PM)return u0;PM=1;var e=sW(),t=K6(),n=Rl(),r=t?function(i,l){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(l),writable:!0})}:n;return u0=r,u0}var d0,RM;function lW(){if(RM)return d0;RM=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 d0=r,d0}var f0,DM;function cW(){if(DM)return f0;DM=1;var e=oW(),t=lW(),n=t(e);return f0=n,f0}var h0,zM;function uW(){if(zM)return h0;zM=1;var e=Rl(),t=iW(),n=cW();function r(i,l){return n(t(i,l,e),i+"")}return h0=r,h0}var m0,LM;function ap(){if(LM)return m0;LM=1;var e=jS(),t=sd(),n=DS(),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 m0=i,m0}var p0,$M;function dW(){if($M)return p0;$M=1;var e=H6(),t=rW(),n=uW(),r=ap(),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 p0=i,p0}var fW=dW();const BS=st(fW);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 xj(){return xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xj.apply(this,arguments)}function hW(e,t){return yW(e)||xW(e,t)||pW(e,t)||mW()}function mW(){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 pW(e,t){if(e){if(typeof e=="string")return BM(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 BM(e,t)}}function BM(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 xW(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 yW(e){if(Array.isArray(e))return e}function IM(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 x0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IM(Object(n),!0).forEach(function(r){gW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gW(e,t,n){return t=vW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vW(e){var t=bW(e,"string");return gu(t)=="symbol"?t:t+""}function bW(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 jW(e){return Array.isArray(e)&&Xt(e[0])&&Xt(e[1])?e.join(" ~ "):e}var wW=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 $={padding:0,margin:0},L=(y?BS(p,y):p).map(function(K,H){if(K.type==="none")return null;var I=x0({display:"block",paddingTop:4,paddingBottom:4,color:K.color||"#000"},d),F=K.formatter||x||jW,Z=K.value,ie=K.name,ce=Z,q=ie;if(F&&ce!=null&&q!=null){var Y=F(Z,ie,K,H,p);if(Array.isArray(Y)){var ae=hW(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},Xt(q)?V.createElement("span",{className:"recharts-tooltip-item-name"},q):null,Xt(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"},K.unit||""))});return V.createElement("ul",{className:"recharts-tooltip-item-list",style:$},L)}return null},T=x0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},l),N=x0({margin:0},h),E=!Pe(S),M=E?S:"",R=ze("recharts-default-tooltip",j),B=ze("recharts-tooltip-label",w);E&&v&&p!==void 0&&p!==null&&(M=v(S,p));var D=O?{role:"status","aria-live":"assertive"}:{};return V.createElement("div",xj({className:R,style:T},D),V.createElement("p",{className:B,style:N},V.isValidElement(M)?M:"".concat(M)),_())};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 Yf(e,t,n){return t=SW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SW(e){var t=NW(e,"string");return vu(t)=="symbol"?t:t+""}function NW(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 Bc="recharts-tooltip-wrapper",AW={visibility:"hidden"};function _W(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ze(Bc,Yf(Yf(Yf(Yf({},"".concat(Bc,"-right"),he(n)&&t&&he(t.x)&&n>=t.x),"".concat(Bc,"-left"),he(n)&&t&&he(t.x)&&n<t.x),"".concat(Bc,"-bottom"),he(r)&&t&&he(t.y)&&r>=t.y),"".concat(Bc,"-top"),he(r)&&t&&he(t.y)&&r<t.y))}function qM(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 OW(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 TW(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=qM({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),x=qM({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),h=OW({translateX:p,translateY:x,useTranslate3d:d})):h=AW,{cssProperties:h,cssClasses:_W({translateX:p,translateY:x,coordinate:n})}}function Jo(e){"@babel/helpers - typeof";return Jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jo(e)}function UM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UM(Object(n),!0).forEach(function(r){gj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CW(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,X6(r.key),r)}}function kW(e,t,n){return t&&CW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MW(e,t,n){return t=Fh(t),PW(e,Y6()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function PW(e,t){if(t&&(Jo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return RW(e)}function RW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Y6=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function DW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yj(e,t)}function yj(e,t){return yj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yj(e,t)}function gj(e,t,n){return t=X6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X6(e){var t=zW(e,"string");return Jo(t)=="symbol"?t:t+""}function zW(e,t){if(Jo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var HM=1,LW=(function(e){function t(){var n;EW(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=MW(this,t,[].concat(i)),gj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),gj(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 DW(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)>HM||Math.abs(r.height-this.state.lastBoundingBox.height)>HM)&&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,_=TW({allowEscapeViewBox:c,coordinate:p,offsetTopLeft:j,position:w,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:A}),T=_.cssClasses,N=_.cssProperties,E=VM(VM({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),$W=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ls={isSsr:$W()};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 FM(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 GM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FM(Object(n),!0).forEach(function(r){IS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IW(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,Z6(r.key),r)}}function qW(e,t,n){return t&&IW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function UW(e,t,n){return t=Gh(t),VW(e,W6()?Reflect.construct(t,n||[],Gh(e).constructor):t.apply(e,n))}function VW(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 HW(e)}function HW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W6=function(){return!!e})()}function Gh(e){return Gh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gh(e)}function FW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vj(e,t)}function vj(e,t){return vj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vj(e,t)}function IS(e,t,n){return t=Z6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z6(e){var t=GW(e,"string");return el(t)=="symbol"?t:t+""}function GW(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)}function KW(e){return e.dataKey}function YW(e,t){return V.isValidElement(e)?V.cloneElement(e,t):typeof e=="function"?V.createElement(e,t):V.createElement(wW,t)}var hr=(function(e){function t(){return BW(this,t),UW(this,t,arguments)}return FW(t,e),qW(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=q6(w.filter(function(M){return M.value!=null&&(M.hide!==!0||r.props.includeHidden)}),S,KW));var E=N.length>0;return V.createElement(LW,{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},YW(h,GM(GM({},this.props),{},{payload:N})))}}])})(k.PureComponent);IS(hr,"displayName","Tooltip");IS(hr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ls.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var y0,KM;function XW(){if(KM)return y0;KM=1;var e=sa(),t=function(){return e.Date.now()};return y0=t,y0}var g0,YM;function WW(){if(YM)return g0;YM=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return g0=t,g0}var v0,XM;function ZW(){if(XM)return v0;XM=1;var e=WW(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return v0=n,v0}var b0,WM;function Q6(){if(WM)return b0;WM=1;var e=ZW(),t=$i(),n=kl(),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 b0=f,b0}var j0,ZM;function QW(){if(ZM)return j0;ZM=1;var e=$i(),t=XW(),n=Q6(),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(L){var K=p,H=x;return p=x=void 0,v=L,j=d.apply(H,K),j}function N(L){return v=L,w=setTimeout(R,f),A?T(L):j}function E(L){var K=L-S,H=L-v,I=f-K;return O?l(I,y-H):I}function M(L){var K=L-S,H=L-v;return S===void 0||K>=f||K<0||O&&H>=y}function R(){var L=t();if(M(L))return B(L);w=setTimeout(R,E(L))}function B(L){return w=void 0,_&&p?T(L):(p=x=void 0,j)}function D(){w!==void 0&&clearTimeout(w),v=0,p=S=x=w=void 0}function z(){return w===void 0?j:B(t())}function $(){var L=t(),K=M(L);if(p=arguments,x=this,S=L,K){if(w===void 0)return N(S);if(O)return clearTimeout(w),w=setTimeout(R,f),T(S)}return w===void 0&&(w=setTimeout(R,f)),j}return $.cancel=D,$.flush=z,$}return j0=c,j0}var w0,QM;function JW(){if(QM)return w0;QM=1;var e=QW(),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 w0=r,w0}var eZ=JW();const J6=st(eZ);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 JM(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 Xf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JM(Object(n),!0).forEach(function(r){tZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tZ(e,t,n){return t=nZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nZ(e){var t=rZ(e,"string");return bu(t)=="symbol"?t:t+""}function rZ(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)}function aZ(e,t){return lZ(e)||oZ(e,t)||sZ(e,t)||iZ()}function iZ(){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 sZ(e,t){if(e){if(typeof e=="string")return eP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eP(e,t)}}function eP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oZ(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 lZ(e){if(Array.isArray(e))return e}var bj=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=aZ(M,2),B=R[0],D=R[1],z=k.useCallback(function(L,K){D(function(H){var I=Math.round(L),F=Math.round(K);return H.containerWidth===I&&H.containerHeight===F?H:{containerWidth:I,containerHeight:F}})},[]);k.useEffect(function(){var L=function(ie){var ce,q=ie[0].contentRect,Y=q.width,ae=q.height;z(Y,ae),(ce=E.current)===null||ce===void 0||ce.call(E,Y,ae)};S>0&&(L=J6(L,S,{trailing:!0,leading:!1}));var K=new ResizeObserver(L),H=N.current.getBoundingClientRect(),I=H.width,F=H.height;return z(I,F),K.observe(N.current),function(){K.disconnect()}},[z,S]);var $=k.useMemo(function(){var L=B.containerWidth,K=B.containerHeight;if(L<0||K<0)return null;$r(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),$r(!n||n>0,"The aspect(%s) must be greater than zero.",n);var H=gs(c)?L:c,I=gs(f)?K:f;n&&n>0&&(H?I=H/n:I&&(H=I*n),y&&I>y&&(I=y)),$r(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 F=!Array.isArray(j)&&za(j.type).endsWith("Chart");return V.Children.map(j,function(Z){return V.isValidElement(Z)?k.cloneElement(Z,Xf({width:H,height:I},F?{style:Xf({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:ze("recharts-responsive-container",A),style:Xf(Xf({},T),{},{width:c,height:f,minWidth:p,minHeight:x,maxHeight:y}),ref:N},$)}),ip=function(t){return null};ip.displayName="Cell";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 tP(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 jj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tP(Object(n),!0).forEach(function(r){cZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cZ(e,t,n){return t=uZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uZ(e){var t=dZ(e,"string");return ju(t)=="symbol"?t:t+""}function dZ(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)}var _o={widthCache:{},cacheCount:0},fZ=2e3,hZ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nP="recharts_measurement_span";function mZ(e){var t=jj({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var nu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ls.isSsr)return{width:0,height:0};var r=mZ(n),i=JSON.stringify({text:t,copyStyle:r});if(_o.widthCache[i])return _o.widthCache[i];try{var l=document.getElementById(nP);l||(l=document.createElement("span"),l.setAttribute("id",nP),l.setAttribute("aria-hidden","true"),document.body.appendChild(l));var c=jj(jj({},hZ),r);Object.assign(l.style,c),l.textContent="".concat(t);var d=l.getBoundingClientRect(),f={width:d.width,height:d.height};return _o.widthCache[i]=f,++_o.cacheCount>fZ&&(_o.cacheCount=0,_o.widthCache={}),f}catch{return{width:0,height:0}}},pZ=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 Kh(e,t){return vZ(e)||gZ(e,t)||yZ(e,t)||xZ()}function xZ(){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 yZ(e,t){if(e){if(typeof e=="string")return rP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rP(e,t)}}function rP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gZ(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 vZ(e){if(Array.isArray(e))return e}function bZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aP(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,wZ(r.key),r)}}function jZ(e,t,n){return t&&aP(e.prototype,t),n&&aP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wZ(e){var t=SZ(e,"string");return wu(t)=="symbol"?t:t+""}function SZ(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 String(e)}var iP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,NZ=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,AZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,ez={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},_Z=Object.keys(ez),Ro="NaN";function OZ(e,t){return e*ez[t]}var Wf=(function(){function e(t,n){bZ(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!NZ.test(n)&&(this.num=NaN,this.unit=""),_Z.includes(n)&&(this.num=OZ(t,n),this.unit="px")}return jZ(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=AZ.exec(n))!==null&&r!==void 0?r:[],l=Kh(i,3),c=l[1],d=l[2];return new e(parseFloat(c),d??"")}}])})();function tz(e){if(e.includes(Ro))return Ro;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=iP.exec(t))!==null&&n!==void 0?n:[],i=Kh(r,4),l=i[1],c=i[2],d=i[3],f=Wf.parse(l??""),h=Wf.parse(d??""),p=c==="*"?f.multiply(h):f.divide(h);if(p.isNaN())return Ro;t=t.replace(iP,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var x,y=(x=sP.exec(t))!==null&&x!==void 0?x:[],j=Kh(y,4),w=j[1],S=j[2],v=j[3],A=Wf.parse(w??""),O=Wf.parse(v??""),_=S==="+"?A.add(O):A.subtract(O);if(_.isNaN())return Ro;t=t.replace(sP,_.toString())}return t}var oP=/\(([^()]*)\)/;function TZ(e){for(var t=e;t.includes("(");){var n=oP.exec(t),r=Kh(n,2),i=r[1];t=t.replace(oP,tz(i))}return t}function EZ(e){var t=e.replace(/\s+/g,"");return t=TZ(t),t=tz(t),t}function CZ(e){try{return EZ(e)}catch{return Ro}}function S0(e){var t=CZ(e.slice(5,-1));return t===Ro?"":t}var kZ=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],MZ=["dx","dy","angle","className","breakAll"];function wj(){return wj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wj.apply(this,arguments)}function lP(e,t){if(e==null)return{};var n=PZ(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 PZ(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 cP(e,t){return LZ(e)||zZ(e,t)||DZ(e,t)||RZ()}function RZ(){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 DZ(e,t){if(e){if(typeof e=="string")return uP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(e,t)}}function uP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zZ(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 LZ(e){if(Array.isArray(e))return e}var nz=/[ \f\n\r\t\v\u2028\u2029]+/,rz=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var l=[];Pe(n)||(r?l=n.toString().split(""):l=n.toString().split(nz));var c=l.map(function(f){return{word:f,width:nu(f,i).width}}),d=r?0:nu(" ",i).width;return{wordsWithComputedWidth:c,spaceWidth:d}}catch{return null}},$Z=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,F){var Z=F.word,ie=F.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,F){return I.width>F.width?I:F})};if(!p)return j;for(var S="…",v=function(H){var I=x.slice(0,H),F=rz({breakAll:h,style:f,children:I+S}).wordsWithComputedWidth,Z=y(F),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=cP(M,2),B=R[0],D=R[1],z=v(N),$=cP(z,1),L=$[0];if(!B&&!L&&(A=N+1),B&&L&&(O=N-1),!B&&L){T=D;break}_++}return T||j},dP=function(t){var n=Pe(t)?[]:t.toString().split(nz);return[{words:n}]},BZ=function(t){var n=t.width,r=t.scaleToFit,i=t.children,l=t.style,c=t.breakAll,d=t.maxLines;if((n||r)&&!Ls.isSsr){var f,h,p=rz({breakAll:c,children:i,style:l});if(p){var x=p.wordsWithComputedWidth,y=p.spaceWidth;f=x,h=y}else return dP(i);return $Z({breakAll:c,children:i,maxLines:d,style:l},f,h,n,r)}return dP(i)},fP="#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?fP:v,O=lP(t,kZ),_=k.useMemo(function(){return BZ({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=lP(O,MZ);if(!Xt(r)||!Xt(l))return null;var D=r+(he(T)?T:0),z=l+(he(N)?N:0),$;switch(S){case"start":$=S0("calc(".concat(h,")"));break;case"middle":$=S0("calc(".concat((_.length-1)/2," * -").concat(d," + (").concat(h," / 2))"));break;default:$=S0("calc(".concat(_.length-1," * -").concat(d,")"));break}var L=[];if(x){var K=_[0].width,H=O.width;L.push("scale(".concat((he(H)?H/K:1)/K,")"))}return E&&L.push("rotate(".concat(E,", ").concat(D,", ").concat(z,")")),L.length&&(B.transform=L.join(" ")),V.createElement("text",wj({},je(B,!0),{x:D,y:z,className:ze("recharts-text",M),textAnchor:j,fill:A.includes("url")?fP:A}),_.map(function(I,F){var Z=I.words.join(R?"":" ");return V.createElement("tspan",{x:D,dy:F===0?$:d,key:"".concat(Z,"-").concat(F)},Z)}))};function Ei(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function IZ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function qS(e){let t,n,r;e.length!==2?(t=Ei,n=(d,f)=>Ei(e(d),f),r=(d,f)=>e(d)-f):(t=e===Ei||e===IZ?e:qZ,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 qZ(){return 0}function az(e){return e===null?NaN:+e}function*UZ(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const VZ=qS(Ei),od=VZ.right;qS(az).center;class hP extends Map{constructor(t,n=GZ){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(mP(this,t))}has(t){return super.has(mP(this,t))}set(t,n){return super.set(HZ(this,t),n)}delete(t){return super.delete(FZ(this,t))}}function mP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function HZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function FZ({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function GZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function KZ(e=Ei){if(e===Ei)return iz;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 iz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const YZ=Math.sqrt(50),XZ=Math.sqrt(10),WZ=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>=YZ?10:l>=XZ?5:l>=WZ?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 Sj(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 Nj(e,t,n){return t=+t,e=+e,n=+n,Yh(e,t,n)[2]}function Aj(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Nj(t,e,n):Nj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}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 xP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function sz(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?iz:KZ(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));sz(e,t,j,w,i)}const l=e[t];let c=n,d=r;for(Ic(e,n,t),i(e[r],l)>0&&Ic(e,n,r);c<d;){for(Ic(e,c,d),++c,--d;i(e[c],l)<0;)++c;for(;i(e[d],l)>0;)--d}i(e[n],l)===0?Ic(e,n,d):(++d,Ic(e,d,r)),d<=t&&(n=d+1),t<=d&&(r=d-1)}return e}function Ic(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ZZ(e,t,n){if(e=Float64Array.from(UZ(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return xP(e);if(t>=1)return pP(e);var r,i=(r-1)*t,l=Math.floor(i),c=pP(sz(e,l).subarray(0,l+1)),d=xP(e.subarray(l+1));return c+(d-c)*(i-l)}}function QZ(e,t,n=az){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,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 JZ(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 Sr(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 _j=Symbol("implicit");function US(){var e=new hP,t=[],n=[],r=_j;function i(l){let c=e.get(l);if(c===void 0){if(r!==_j)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 hP;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 US(t,n).unknown(r)},Sr.apply(i,arguments),i}function Su(){var e=US().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=JZ(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 Su(t(),[r,i]).round(d).paddingInner(f).paddingOuter(h).align(p)},Sr.apply(x(),arguments)}function oz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return oz(t())},e}function ru(){return oz(Su.apply(null,arguments).paddingInner(1))}function VS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ld(){}var Nu=.7,Xh=1/Nu,Fo="\\s*([+-]?\\d+)\\s*",Au="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ea="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",eQ=/^#([0-9a-f]{3,8})$/,tQ=new RegExp(`^rgb\\(${Fo},${Fo},${Fo}\\)$`),nQ=new RegExp(`^rgb\\(${ea},${ea},${ea}\\)$`),rQ=new RegExp(`^rgba\\(${Fo},${Fo},${Fo},${Au}\\)$`),aQ=new RegExp(`^rgba\\(${ea},${ea},${ea},${Au}\\)$`),iQ=new RegExp(`^hsl\\(${Au},${ea},${ea}\\)$`),sQ=new RegExp(`^hsla\\(${Au},${ea},${ea},${Au}\\)$`),yP={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};VS(ld,_u,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gP,formatHex:gP,formatHex8:oQ,formatHsl:lQ,formatRgb:vP,toString:vP});function gP(){return this.rgb().formatHex()}function oQ(){return this.rgb().formatHex8()}function lQ(){return cz(this).formatHsl()}function vP(){return this.rgb().formatRgb()}function _u(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=eQ.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?bP(t):n===3?new Rn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zf(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=tQ.exec(e))?new Rn(t[1],t[2],t[3],1):(t=nQ.exec(e))?new Rn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=rQ.exec(e))?Zf(t[1],t[2],t[3],t[4]):(t=aQ.exec(e))?Zf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=iQ.exec(e))?SP(t[1],t[2]/100,t[3]/100,1):(t=sQ.exec(e))?SP(t[1],t[2]/100,t[3]/100,t[4]):yP.hasOwnProperty(e)?bP(yP[e]):e==="transparent"?new Rn(NaN,NaN,NaN,0):null}function bP(e){return new Rn(e>>16&255,e>>8&255,e&255,1)}function Zf(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rn(e,t,n,r)}function cQ(e){return e instanceof ld||(e=_u(e)),e?(e=e.rgb(),new Rn(e.r,e.g,e.b,e.opacity)):new Rn}function Oj(e,t,n,r){return arguments.length===1?cQ(e):new Rn(e,t,n,r??1)}function Rn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}VS(Rn,Oj,lz(ld,{brighter(e){return e=e==null?Xh:Math.pow(Xh,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Nu:Math.pow(Nu,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn(As(this.r),As(this.g),As(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:jP,formatHex:jP,formatHex8:uQ,formatRgb:wP,toString:wP}));function jP(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}`}function uQ(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}${vs((isNaN(this.opacity)?1:this.opacity)*255)}`}function wP(){const e=Wh(this.opacity);return`${e===1?"rgb(":"rgba("}${As(this.r)}, ${As(this.g)}, ${As(this.b)}${e===1?")":`, ${e})`}`}function Wh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function As(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vs(e){return e=As(e),(e<16?"0":"")+e.toString(16)}function SP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rr(e,t,n,r)}function cz(e){if(e instanceof Rr)return new Rr(e.h,e.s,e.l,e.opacity);if(e instanceof ld||(e=_u(e)),!e)return new Rr;if(e instanceof Rr)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 Rr(c,d,f,e.opacity)}function dQ(e,t,n,r){return arguments.length===1?cz(e):new Rr(e,t,n,r??1)}function Rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}VS(Rr,dQ,lz(ld,{brighter(e){return e=e==null?Xh:Math.pow(Xh,e),new Rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Nu:Math.pow(Nu,e),new Rr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Rn(N0(e>=240?e-240:e+120,i,r),N0(e,i,r),N0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Rr(NP(this.h),Qf(this.s),Qf(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("}${NP(this.h)}, ${Qf(this.s)*100}%, ${Qf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function NP(e){return e=(e||0)%360,e<0?e+360:e}function Qf(e){return Math.max(0,Math.min(1,e||0))}function N0(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 HS=e=>()=>e;function fQ(e,t){return function(n){return e+n*t}}function hQ(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 mQ(e){return(e=+e)==1?uz:function(t,n){return n-t?hQ(t,n,e):HS(isNaN(t)?n:t)}}function uz(e,t){var n=t-e;return n?fQ(e,n):HS(isNaN(e)?t:e)}const AP=(function e(t){var n=mQ(t);function r(i,l){var c=n((i=Oj(i)).r,(l=Oj(l)).r),d=n(i.g,l.g),f=n(i.b,l.b),h=uz(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 pQ(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 xQ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yQ(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]=Dl(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 gQ(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 vQ(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]=Dl(e[i],t[i]):r[i]=t[i];return function(l){for(i in n)r[i]=n[i](l);return r}}var Tj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,A0=new RegExp(Tj.source,"g");function bQ(e){return function(){return e}}function jQ(e){return function(t){return e(t)+""}}function wQ(e,t){var n=Tj.lastIndex=A0.lastIndex=0,r,i,l,c=-1,d=[],f=[];for(e=e+"",t=t+"";(r=Tj.exec(e))&&(i=A0.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=A0.lastIndex;return n<t.length&&(l=t.slice(n),d[c]?d[c]+=l:d[++c]=l),d.length<2?f[0]?jQ(f[0].x):bQ(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 Dl(e,t){var n=typeof t,r;return t==null||n==="boolean"?HS(t):(n==="number"?Zh:n==="string"?(r=_u(t))?(t=r,AP):wQ:t instanceof _u?AP:t instanceof Date?gQ:xQ(t)?pQ:Array.isArray(t)?yQ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?vQ:Zh)(e,t)}function FS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function SQ(e,t){t===void 0&&(t=e,e=Dl);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 NQ(e){return function(){return e}}function Qh(e){return+e}var _P=[0,1];function Nn(e){return e}function Ej(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:NQ(isNaN(t)?NaN:.5)}function AQ(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function _Q(e,t,n){var r=e[0],i=e[1],l=t[0],c=t[1];return i<r?(r=Ej(i,r),l=n(c,l)):(r=Ej(r,i),l=n(l,c)),function(d){return l(r(d))}}function OQ(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]=Ej(e[c],e[c+1]),l[c]=n(t[c],t[c+1]);return function(d){var f=od(e,d,1,r)-1;return l[f](i[f](d))}}function cd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function sp(){var e=_P,t=_P,n=Dl,r,i,l,c=Nn,d,f,h;function p(){var y=Math.min(e.length,t.length);return c!==Nn&&(c=AQ(e[0],e[y-1])),d=y>2?OQ:_Q,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=FS,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 GS(){return sp()(Nn,Nn)}function TQ(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 tl(e){return e=Jh(Math.abs(e)),e?e[1]:NaN}function EQ(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 CQ(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var kQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ou(e){if(!(t=kQ.exec(e)))throw new Error("invalid format: "+e);var t;return new KS({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]})}Ou.prototype=KS.prototype;function KS(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+""}KS.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 MQ(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 PQ(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 OP(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 TP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:TQ,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)=>OP(e*100,t),r:OP,s:PQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function EP(e){return e}var CP=Array.prototype.map,kP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function RQ(e){var t=e.grouping===void 0||e.thousands===void 0?EP:EQ(CP.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?EP:CQ(CP.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=Ou(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"):TP[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=TP[E],D=/[defgprs%]/.test(E);T=T===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function z($){var L=M,K=R,H,I,F;if(E==="c")K=B($)+K,$="";else{$=+$;var Z=$<0||1/$<0;if($=isNaN($)?f:B(Math.abs($),T),N&&($=MQ($)),Z&&+$==0&&S!=="+"&&(Z=!1),L=(Z?S==="("?S:d:S==="-"||S==="("?"":S)+L,K=(E==="s"&&!isNaN($)&&em!==void 0?kP[8+em/3]:"")+K+(Z&&S==="("?")":""),D){for(H=-1,I=$.length;++H<I;)if(F=$.charCodeAt(H),48>F||F>57){K=(F===46?i+$.slice(H+1):$.slice(H))+K,$=$.slice(0,H);break}}}_&&!A&&($=t($,1/0));var ie=L.length+$.length+K.length,ce=ie<O?new Array(O-ie+1).join(j):"";switch(_&&A&&($=t(ce+$,ce.length?O-K.length:1/0),ce=""),w){case"<":$=L+$+K+ce;break;case"=":$=L+ce+$+K;break;case"^":$=ce.slice(0,ie=ce.length>>1)+L+$+K+ce.slice(ie);break;default:$=ce+L+$+K;break}return l($)}return z.toString=function(){return x+""},z}function p(x,y){var j=Math.max(-8,Math.min(8,Math.floor(tl(y)/3)))*3,w=Math.pow(10,-j),S=h((x=Ou(x),x.type="f",x),{suffix:kP[8+j/3]});return function(v){return S(w*v)}}return{format:h,formatPrefix:p}}var Jf,YS,dz;DQ({thousands:",",grouping:[3],currency:["$",""]});function DQ(e){return Jf=RQ(e),YS=Jf.format,dz=Jf.formatPrefix,Jf}function zQ(e){return Math.max(0,-tl(Math.abs(e)))}function LQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(tl(t)/3)))*3-tl(Math.abs(e)))}function $Q(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,tl(t)-tl(e))+1}function fz(e,t,n,r){var i=Aj(e,t,n),l;switch(r=Ou(r??",f"),r.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(l=LQ(i,c))&&(r.precision=l),dz(r,c)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(l=$Q(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=l-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(l=zQ(i))&&(r.precision=l-(r.type==="%")*2);break}}return YS(r)}function Bi(e){var t=e.domain;return e.ticks=function(n){var r=t();return Sj(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return fz(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=Nj(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=GS();return e.copy=function(){return cd(e,tm())},Sr.apply(e,arguments),Bi(e)}function hz(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 hz(e).unknown(t)},e=arguments.length?Array.from(e,Qh):[0,1],Bi(n)}function mz(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 MP(e){return Math.log(e)}function PP(e){return Math.exp(e)}function BQ(e){return-Math.log(-e)}function IQ(e){return-Math.exp(-e)}function qQ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function UQ(e){return e===10?qQ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function VQ(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 RP(e){return(t,n)=>-e(-t,n)}function XS(e){const t=e(MP,PP),n=t.domain;let r=10,i,l;function c(){return i=VQ(r),l=UQ(r),n()[0]<0?(i=RP(i),l=RP(l),e(BQ,IQ)):e(MP,PP),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=Sj(h,p,v))}else A=Sj(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=Ou(f)).precision==null&&(f.trim=!0),f=YS(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(mz(n(),{floor:d=>l(Math.floor(i(d))),ceil:d=>l(Math.ceil(i(d)))})),t}function pz(){const e=XS(sp()).domain([1,10]);return e.copy=()=>cd(e,pz()).base(e.base()),Sr.apply(e,arguments),e}function DP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function zP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function WS(e){var t=1,n=e(DP(t),zP(t));return n.constant=function(r){return arguments.length?e(DP(t=+r),zP(t)):t},Bi(n)}function xz(){var e=WS(sp());return e.copy=function(){return cd(e,xz()).constant(e.constant())},Sr.apply(e,arguments)}function LP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function HQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function FQ(e){return e<0?-e*e:e*e}function ZS(e){var t=e(Nn,Nn),n=1;function r(){return n===1?e(Nn,Nn):n===.5?e(HQ,FQ):e(LP(n),LP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Bi(t)}function QS(){var e=ZS(sp());return e.copy=function(){return cd(e,QS()).exponent(e.exponent())},Sr.apply(e,arguments),e}function GQ(){return QS.apply(null,arguments).exponent(.5)}function $P(e){return Math.sign(e)*e*e}function KQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function yz(){var e=GS(),t=[0,1],n=!1,r;function i(l){var c=KQ(e(l));return isNaN(c)?r:n?Math.round(c):c}return i.invert=function(l){return e.invert($P(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($P)),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 yz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Sr.apply(i,arguments),Bi(i)}function gz(){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]=QZ(e,c/d);return l}function l(c){return c==null||isNaN(c=+c)?r:t[od(n,c)]}return l.invertExtent=function(c){var d=t.indexOf(c);return d<0?[NaN,NaN]:[d>0?n[d-1]:e[0],d<n.length?n[d]:e[e.length-1]]},l.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let d of c)d!=null&&!isNaN(d=+d)&&e.push(d);return e.sort(Ei),i()},l.range=function(c){return arguments.length?(t=Array.from(c),i()):t.slice()},l.unknown=function(c){return arguments.length?(r=c,l):r},l.quantiles=function(){return n.slice()},l.copy=function(){return gz().domain(e).range(t).unknown(r)},Sr.apply(l,arguments)}function vz(){var e=0,t=1,n=1,r=[.5],i=[0,1],l;function c(f){return f!=null&&f<=f?i[od(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 vz().domain([e,t]).range(i).unknown(l)},Sr.apply(Bi(c),arguments)}function bz(){var e=[.5],t=[0,1],n,r=1;function i(l){return l!=null&&l<=l?t[od(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 bz().domain(e).range(t).unknown(n)},Sr.apply(i,arguments)}const _0=new Date,O0=new Date;function Wt(e,t,n,r){function i(l){return e(l=arguments.length===0?new Date:new Date(+l)),l}return i.floor=l=>(e(l=new Date(+l)),l),i.ceil=l=>(e(l=new Date(l-1)),t(l,1),e(l),l),i.round=l=>{const c=i(l),d=i.ceil(l);return l-c<d-l?c:d},i.offset=(l,c)=>(t(l=new Date(+l),c==null?1:Math.floor(c)),l),i.range=(l,c,d)=>{const f=[];if(l=i.ceil(l),d=d==null?1:Math.floor(d),!(l<c)||!(d>0))return f;let h;do f.push(h=new Date(+l)),t(l,d),e(l);while(h<l&&l<c);return f},i.filter=l=>Wt(c=>{if(c>=c)for(;e(c),!l(c);)c.setTime(c-1)},(c,d)=>{if(c>=c)if(d<0)for(;++d<=0;)for(;t(c,-1),!l(c););else for(;--d>=0;)for(;t(c,1),!l(c););}),n&&(i.count=(l,c)=>(_0.setTime(+l),O0.setTime(+c),e(_0),e(O0),Math.floor(n(_0,O0))),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=Wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):nm);nm.range;const ka=1e3,yr=ka*60,Ma=yr*60,Ua=Ma*24,JS=Ua*7,BP=Ua*30,T0=Ua*365,bs=Wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ka)},(e,t)=>(t-e)/ka,e=>e.getUTCSeconds());bs.range;const e2=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ka)},(e,t)=>{e.setTime(+e+t*yr)},(e,t)=>(t-e)/yr,e=>e.getMinutes());e2.range;const t2=Wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yr)},(e,t)=>(t-e)/yr,e=>e.getUTCMinutes());t2.range;const n2=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ka-e.getMinutes()*yr)},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getHours());n2.range;const r2=Wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCHours());r2.range;const ud=Wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yr)/Ua,e=>e.getDate()-1);ud.range;const op=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>e.getUTCDate()-1);op.range;const jz=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>Math.floor(e/Ua));jz.range;function $s(e){return Wt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*yr)/JS)}const lp=$s(0),rm=$s(1),YQ=$s(2),XQ=$s(3),nl=$s(4),WQ=$s(5),ZQ=$s(6);lp.range;rm.range;YQ.range;XQ.range;nl.range;WQ.range;ZQ.range;function Bs(e){return Wt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/JS)}const cp=Bs(0),am=Bs(1),QQ=Bs(2),JQ=Bs(3),rl=Bs(4),eJ=Bs(5),tJ=Bs(6);cp.range;am.range;QQ.range;JQ.range;rl.range;eJ.range;tJ.range;const a2=Wt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());a2.range;const i2=Wt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());i2.range;const Va=Wt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Va.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Va.range;const Ha=Wt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ha.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ha.range;function wz(e,t,n,r,i,l){const c=[[bs,1,ka],[bs,5,5*ka],[bs,15,15*ka],[bs,30,30*ka],[l,1,yr],[l,5,5*yr],[l,15,15*yr],[l,30,30*yr],[i,1,Ma],[i,3,3*Ma],[i,6,6*Ma],[i,12,12*Ma],[r,1,Ua],[r,2,2*Ua],[n,1,JS],[t,1,BP],[t,3,3*BP],[e,1,T0]];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=qS(([,,v])=>v).right(c,y);if(j===c.length)return e.every(Aj(h/T0,p/T0,x));if(j===0)return nm.every(Math.max(Aj(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[nJ,rJ]=wz(Ha,i2,cp,jz,r2,t2),[aJ,iJ]=wz(Va,a2,lp,ud,n2,e2);function E0(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 C0(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 qc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function sJ(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=Uc(i),p=Vc(i),x=Uc(l),y=Vc(l),j=Uc(c),w=Vc(c),S=Uc(d),v=Vc(d),A=Uc(f),O=Vc(f),_={a:F,A:Z,b:ie,B:ce,c:null,d:FP,e:FP,f:EJ,g:BJ,G:qJ,H:_J,I:OJ,j:TJ,L:Sz,m:CJ,M:kJ,p:q,q:Y,Q:YP,s:XP,S:MJ,u:PJ,U:RJ,V:DJ,w:zJ,W:LJ,x:null,X:null,y:$J,Y:IJ,Z:UJ,"%":KP},T={a:ae,A:fe,b:ye,B:we,c:null,d:GP,e:GP,f:GJ,g:nee,G:aee,H:VJ,I:HJ,j:FJ,L:Az,m:KJ,M:YJ,p:Ie,q:et,Q:YP,s:XP,S:XJ,u:WJ,U:ZJ,V:QJ,w:JJ,W:eee,x:null,X:null,y:tee,Y:ree,Z:iee,"%":KP},N={a:D,A:z,b:$,B:L,c:K,d:VP,e:VP,f:wJ,g:UP,G:qP,H:HP,I:HP,j:gJ,L:jJ,m:yJ,M:vJ,p:B,q:xJ,Q:NJ,s:AJ,S:bJ,u:dJ,U:fJ,V:hJ,w:uJ,W:mJ,x:H,X:I,y:UP,Y:qP,Z:pJ,"%":SJ};_.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,Oe){return function(ke){var ue=[],gt=-1,Le=0,Tt=de.length,Et,hn,Nr;for(ke instanceof Date||(ke=new Date(+ke));++gt<Tt;)de.charCodeAt(gt)===37&&(ue.push(de.slice(Le,gt)),(hn=IP[Et=de.charAt(++gt)])!=null?Et=de.charAt(++gt):hn=Et==="e"?" ":"0",(Nr=Oe[Et])&&(Et=Nr(ke,hn)),ue.push(Et),Le=gt+1);return ue.push(de.slice(Le,gt)),ue.join("")}}function M(de,Oe){return function(ke){var ue=qc(1900,void 0,1),gt=R(ue,de,ke+="",0),Le,Tt;if(gt!=ke.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(Oe&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(Le=C0(qc(ue.y,0,1)),Tt=Le.getUTCDay(),Le=Tt>4||Tt===0?am.ceil(Le):am(Le),Le=op.offset(Le,(ue.V-1)*7),ue.y=Le.getUTCFullYear(),ue.m=Le.getUTCMonth(),ue.d=Le.getUTCDate()+(ue.w+6)%7):(Le=E0(qc(ue.y,0,1)),Tt=Le.getDay(),Le=Tt>4||Tt===0?rm.ceil(Le):rm(Le),Le=ud.offset(Le,(ue.V-1)*7),ue.y=Le.getFullYear(),ue.m=Le.getMonth(),ue.d=Le.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),Tt="Z"in ue?C0(qc(ue.y,0,1)).getUTCDay():E0(qc(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,C0(ue)):E0(ue)}}function R(de,Oe,ke,ue){for(var gt=0,Le=Oe.length,Tt=ke.length,Et,hn;gt<Le;){if(ue>=Tt)return-1;if(Et=Oe.charCodeAt(gt++),Et===37){if(Et=Oe.charAt(gt++),hn=N[Et in IP?Oe.charAt(gt++):Et],!hn||(ue=hn(de,ke,ue))<0)return-1}else if(Et!=ke.charCodeAt(ue++))return-1}return ue}function B(de,Oe,ke){var ue=h.exec(Oe.slice(ke));return ue?(de.p=p.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function D(de,Oe,ke){var ue=j.exec(Oe.slice(ke));return ue?(de.w=w.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function z(de,Oe,ke){var ue=x.exec(Oe.slice(ke));return ue?(de.w=y.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function $(de,Oe,ke){var ue=A.exec(Oe.slice(ke));return ue?(de.m=O.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function L(de,Oe,ke){var ue=S.exec(Oe.slice(ke));return ue?(de.m=v.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function K(de,Oe,ke){return R(de,t,Oe,ke)}function H(de,Oe,ke){return R(de,n,Oe,ke)}function I(de,Oe,ke){return R(de,r,Oe,ke)}function F(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 we(de){return d[de.getUTCMonth()]}function Ie(de){return i[+(de.getUTCHours()>=12)]}function et(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var Oe=E(de+="",_);return Oe.toString=function(){return de},Oe},parse:function(de){var Oe=M(de+="",!1);return Oe.toString=function(){return de},Oe},utcFormat:function(de){var Oe=E(de+="",T);return Oe.toString=function(){return de},Oe},utcParse:function(de){var Oe=M(de+="",!0);return Oe.toString=function(){return de},Oe}}}var IP={"-":"",_:" ",0:"0"},tn=/^\s*\d+/,oJ=/^%/,lJ=/[\\^$*+?|[\]().{}]/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 cJ(e){return e.replace(lJ,"\\$&")}function Uc(e){return new RegExp("^(?:"+e.map(cJ).join("|")+")","i")}function Vc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function uJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function dJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function fJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function hJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function mJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qP(e,t,n){var r=tn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function UP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function pJ(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 xJ(e,t,n){var r=tn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function yJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function VP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function gJ(e,t,n){var r=tn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function HP(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function vJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function bJ(e,t,n){var r=tn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function jJ(e,t,n){var r=tn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function wJ(e,t,n){var r=tn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function SJ(e,t,n){var r=oJ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function NJ(e,t,n){var r=tn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function AJ(e,t,n){var r=tn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function FP(e,t){return Qe(e.getDate(),t,2)}function _J(e,t){return Qe(e.getHours(),t,2)}function OJ(e,t){return Qe(e.getHours()%12||12,t,2)}function TJ(e,t){return Qe(1+ud.count(Va(e),e),t,3)}function Sz(e,t){return Qe(e.getMilliseconds(),t,3)}function EJ(e,t){return Sz(e,t)+"000"}function CJ(e,t){return Qe(e.getMonth()+1,t,2)}function kJ(e,t){return Qe(e.getMinutes(),t,2)}function MJ(e,t){return Qe(e.getSeconds(),t,2)}function PJ(e){var t=e.getDay();return t===0?7:t}function RJ(e,t){return Qe(lp.count(Va(e)-1,e),t,2)}function Nz(e){var t=e.getDay();return t>=4||t===0?nl(e):nl.ceil(e)}function DJ(e,t){return e=Nz(e),Qe(nl.count(Va(e),e)+(Va(e).getDay()===4),t,2)}function zJ(e){return e.getDay()}function LJ(e,t){return Qe(rm.count(Va(e)-1,e),t,2)}function $J(e,t){return Qe(e.getFullYear()%100,t,2)}function BJ(e,t){return e=Nz(e),Qe(e.getFullYear()%100,t,2)}function IJ(e,t){return Qe(e.getFullYear()%1e4,t,4)}function qJ(e,t){var n=e.getDay();return e=n>=4||n===0?nl(e):nl.ceil(e),Qe(e.getFullYear()%1e4,t,4)}function UJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qe(t/60|0,"0",2)+Qe(t%60,"0",2)}function GP(e,t){return Qe(e.getUTCDate(),t,2)}function VJ(e,t){return Qe(e.getUTCHours(),t,2)}function HJ(e,t){return Qe(e.getUTCHours()%12||12,t,2)}function FJ(e,t){return Qe(1+op.count(Ha(e),e),t,3)}function Az(e,t){return Qe(e.getUTCMilliseconds(),t,3)}function GJ(e,t){return Az(e,t)+"000"}function KJ(e,t){return Qe(e.getUTCMonth()+1,t,2)}function YJ(e,t){return Qe(e.getUTCMinutes(),t,2)}function XJ(e,t){return Qe(e.getUTCSeconds(),t,2)}function WJ(e){var t=e.getUTCDay();return t===0?7:t}function ZJ(e,t){return Qe(cp.count(Ha(e)-1,e),t,2)}function _z(e){var t=e.getUTCDay();return t>=4||t===0?rl(e):rl.ceil(e)}function QJ(e,t){return e=_z(e),Qe(rl.count(Ha(e),e)+(Ha(e).getUTCDay()===4),t,2)}function JJ(e){return e.getUTCDay()}function eee(e,t){return Qe(am.count(Ha(e)-1,e),t,2)}function tee(e,t){return Qe(e.getUTCFullYear()%100,t,2)}function nee(e,t){return e=_z(e),Qe(e.getUTCFullYear()%100,t,2)}function ree(e,t){return Qe(e.getUTCFullYear()%1e4,t,4)}function aee(e,t){var n=e.getUTCDay();return e=n>=4||n===0?rl(e):rl.ceil(e),Qe(e.getUTCFullYear()%1e4,t,4)}function iee(){return"+0000"}function KP(){return"%"}function YP(e){return+e}function XP(e){return Math.floor(+e/1e3)}var Oo,Oz,Tz;see({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 see(e){return Oo=sJ(e),Oz=Oo.format,Oo.parse,Tz=Oo.utcFormat,Oo.utcParse,Oo}function oee(e){return new Date(e)}function lee(e){return e instanceof Date?+e:+new Date(+e)}function s2(e,t,n,r,i,l,c,d,f,h){var p=GS(),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,lee)):y().map(oee)},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(mz(M,E)):p},p.copy=function(){return cd(p,s2(e,t,n,r,i,l,c,d,f,h))},p}function cee(){return Sr.apply(s2(aJ,iJ,Va,a2,lp,ud,n2,e2,bs,Oz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uee(){return Sr.apply(s2(nJ,rJ,Ha,i2,cp,op,r2,t2,bs,Tz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function up(){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(Dl),h.rangeRound=p(FS),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 Ez(){var e=Bi(up()(Nn));return e.copy=function(){return Ii(e,Ez())},Ka.apply(e,arguments)}function Cz(){var e=XS(up()).domain([1,10]);return e.copy=function(){return Ii(e,Cz()).base(e.base())},Ka.apply(e,arguments)}function kz(){var e=WS(up());return e.copy=function(){return Ii(e,kz()).constant(e.constant())},Ka.apply(e,arguments)}function o2(){var e=ZS(up());return e.copy=function(){return Ii(e,o2()).exponent(e.exponent())},Ka.apply(e,arguments)}function dee(){return o2.apply(null,arguments).exponent(.5)}function Mz(){var e=[],t=Nn;function n(r){if(r!=null&&!isNaN(r=+r))return t((od(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ei),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,l)=>ZZ(e,l/r))},n.copy=function(){return Mz(t).domain(e)},Ka.apply(n,arguments)}function dp(){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=SQ(S,[A,O,_]),j):[h(0),h(.5),h(1)]}}return j.range=w(Dl),j.rangeRound=w(FS),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 Pz(){var e=Bi(dp()(Nn));return e.copy=function(){return Ii(e,Pz())},Ka.apply(e,arguments)}function Rz(){var e=XS(dp()).domain([.1,1,10]);return e.copy=function(){return Ii(e,Rz()).base(e.base())},Ka.apply(e,arguments)}function Dz(){var e=WS(dp());return e.copy=function(){return Ii(e,Dz()).constant(e.constant())},Ka.apply(e,arguments)}function l2(){var e=ZS(dp());return e.copy=function(){return Ii(e,l2()).exponent(e.exponent())},Ka.apply(e,arguments)}function fee(){return l2.apply(null,arguments).exponent(.5)}const WP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Su,scaleDiverging:Pz,scaleDivergingLog:Rz,scaleDivergingPow:l2,scaleDivergingSqrt:fee,scaleDivergingSymlog:Dz,scaleIdentity:hz,scaleImplicit:_j,scaleLinear:tm,scaleLog:pz,scaleOrdinal:US,scalePoint:ru,scalePow:QS,scaleQuantile:gz,scaleQuantize:vz,scaleRadial:yz,scaleSequential:Ez,scaleSequentialLog:Cz,scaleSequentialPow:o2,scaleSequentialQuantile:Mz,scaleSequentialSqrt:dee,scaleSequentialSymlog:kz,scaleSqrt:GQ,scaleSymlog:xz,scaleThreshold:bz,scaleTime:cee,scaleUtc:uee,tickFormat:fz},Symbol.toStringTag,{value:"Module"}));var k0,ZP;function fp(){if(ZP)return k0;ZP=1;var e=kl();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 M0,QP;function zz(){if(QP)return M0;QP=1;function e(t,n){return t>n}return M0=e,M0}var P0,JP;function hee(){if(JP)return P0;JP=1;var e=fp(),t=zz(),n=Rl();function r(i){return i&&i.length?e(i,n,t):void 0}return P0=r,P0}var mee=hee();const hp=st(mee);var R0,e3;function Lz(){if(e3)return R0;e3=1;function e(t,n){return t<n}return R0=e,R0}var D0,t3;function pee(){if(t3)return D0;t3=1;var e=fp(),t=Lz(),n=Rl();function r(i){return i&&i.length?e(i,n,t):void 0}return D0=r,D0}var xee=pee();const mp=st(xee);var z0,n3;function yee(){if(n3)return z0;n3=1;var e=NS(),t=oa(),n=G6(),r=Dn();function i(l,c){var d=r(l)?e:n;return d(l,t(c,3))}return z0=i,z0}var L0,r3;function gee(){if(r3)return L0;r3=1;var e=H6(),t=yee();function n(r,i){return e(t(r,i),1)}return L0=n,L0}var vee=gee();const bee=st(vee);var $0,a3;function jee(){if(a3)return $0;a3=1;var e=LS();function t(n,r){return e(n,r)}return $0=t,$0}var wee=jee();const dd=st(wee);var zl=1e9,See={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},u2,_t=!0,wr="[DecimalError] ",_s=wr+"Invalid argument: ",c2=wr+"Exponent out of range: ",Ll=Math.floor,ms=Math.pow,Nee=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Xn,Jt=1e7,St=7,$z=9007199254740991,im=Ll($z/St),me={};me.absoluteValue=me.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};me.comparedTo=me.cmp=function(e){var t,n,r,i,l=this;if(e=new l.constructor(e),l.s!==e.s)return l.s||-e.s;if(l.e!==e.e)return l.e>e.e^l.s<0?1:-1;for(r=l.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(l.d[t]!==e.d[t])return l.d[t]>e.d[t]^l.s<0?1:-1;return r===i?0:r>i^l.s<0?1:-1};me.decimalPlaces=me.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*St;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};me.dividedBy=me.div=function(e){return La(this,new this.constructor(e))};me.dividedToIntegerBy=me.idiv=function(e){var t=this,n=t.constructor;return mt(La(t,new n(e),0,1),n.precision)};me.equals=me.eq=function(e){return!this.cmp(e)};me.exponent=function(){return Vt(this)};me.greaterThan=me.gt=function(e){return this.cmp(e)>0};me.greaterThanOrEqualTo=me.gte=function(e){return this.cmp(e)>=0};me.isInteger=me.isint=function(){return this.e>this.d.length-2};me.isNegative=me.isneg=function(){return this.s<0};me.isPositive=me.ispos=function(){return this.s>0};me.isZero=function(){return this.s===0};me.lessThan=me.lt=function(e){return this.cmp(e)<0};me.lessThanOrEqualTo=me.lte=function(e){return this.cmp(e)<1};me.logarithm=me.log=function(e){var t,n=this,r=n.constructor,i=r.precision,l=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Xn))throw Error(wr+"NaN");if(n.s<1)throw Error(wr+(n.s?"NaN":"-Infinity"));return n.eq(Xn)?new r(0):(_t=!1,t=La(Tu(n,l),Tu(e,l),l),_t=!0,mt(t,i))};me.minus=me.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?qz(t,e):Bz(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(wr+"NaN");return n.s?(_t=!1,t=La(n,e,0,1).times(e),_t=!0,n.minus(t)):mt(new r(n),i)};me.naturalExponential=me.exp=function(){return Iz(this)};me.naturalLogarithm=me.ln=function(){return Tu(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?Bz(t,e):qz(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(_s+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(wr+"NaN")}for(e=Vt(d),_t=!1,i=Math.sqrt(+d),i==0||i==1/0?(t=Zr(d.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ll((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),Zr(l.d).slice(0,c)===(t=Zr(r.d)).slice(0,c)){if(t=t.slice(c-3,c+1),i==c&&t=="4999"){if(mt(l,n+1,0),l.times(l).eq(d)){r=l;break}}else if(t!="9999")break;c+=4}return _t=!0,mt(r,n)};me.times=me.mul=function(e){var t,n,r,i,l,c,d,f,h,p=this,x=p.constructor,y=p.d,j=(e=new x(e)).d;if(!p.s||!e.s)return new x(0);for(e.s*=p.s,n=p.e+e.e,f=y.length,h=j.length,f<h&&(l=y,y=j,j=l,c=f,f=h,h=c),l=[],c=f+h,r=c;r--;)l.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)d=l[i]+j[r]*y[i-r-1]+t,l[i--]=d%Jt|0,t=d/Jt|0;l[i]=(l[i]+t)%Jt|0}for(;!l[--c];)l.pop();return t?++n:l.shift(),e.d=l,e.e=n,_t?mt(e,x.precision):e};me.toDecimalPlaces=me.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(aa(e,0,zl),t===void 0?t=r.rounding:aa(t,0,8),mt(n,e+Vt(n)+1,t))};me.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ks(r,!0):(aa(e,0,zl),t===void 0?t=i.rounding:aa(t,0,8),r=mt(new i(r),e+1,t),n=ks(r,!0,e+1)),n};me.toFixed=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?ks(i):(aa(e,0,zl),t===void 0?t=l.rounding:aa(t,0,8),r=mt(new l(i),e+Vt(i)+1,t),n=ks(r.abs(),!1,e+Vt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};me.toInteger=me.toint=function(){var e=this,t=e.constructor;return mt(new t(e),Vt(e)+1,t.rounding)};me.toNumber=function(){return+this};me.toPower=me.pow=function(e){var t,n,r,i,l,c,d=this,f=d.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Xn);if(d=new f(d),!d.s){if(e.s<1)throw Error(wr+"Infinity");return d}if(d.eq(Xn))return d;if(r=f.precision,e.eq(Xn))return mt(d,r);if(t=e.e,n=e.d.length-1,c=t>=n,l=d.s,c){if((n=p<0?-p:p)<=$z){for(i=new f(Xn),t=Math.ceil(r/St+4),_t=!1;n%2&&(i=i.times(d),s3(i.d,t)),n=Ll(n/2),n!==0;)d=d.times(d),s3(d.d,t);return _t=!0,e.s<0?new f(Xn).div(i):mt(i,r)}}else if(l<0)throw Error(wr+"NaN");return l=l<0&&e.d[Math.max(t,n)]&1?-1:1,d.s=1,_t=!1,i=e.times(Tu(d,r+h)),_t=!0,i=Iz(i),i.s=l,i};me.toPrecision=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?(n=Vt(i),r=ks(i,n<=l.toExpNeg||n>=l.toExpPos)):(aa(e,1,zl),t===void 0?t=l.rounding:aa(t,0,8),i=mt(new l(i),e,t),n=Vt(i),r=ks(i,e<=n||n<=l.toExpNeg,e)),r};me.toSignificantDigits=me.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(aa(e,1,zl),t===void 0?t=r.rounding:aa(t,0,8)),mt(new r(n),e,t)};me.toString=me.valueOf=me.val=me.toJSON=me[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Vt(e),n=e.constructor;return ks(e,t<=n.toExpNeg||t>=n.toExpPos)};function Bz(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?mt(t,x):t;if(f=e.d,h=t.d,c=e.e,i=t.e,f=f.slice(),l=c-i,l){for(l<0?(r=f,l=-l,d=h.length):(r=h,i=c,d=f.length),c=Math.ceil(x/St),d=c>d?c+1:d+1,l>d&&(l=d,r.length=1),r.reverse();l--;)r.push(0);r.reverse()}for(d=f.length,l=h.length,d-l<0&&(l=d,r=h,h=f,f=r),n=0;l;)n=(f[--l]=f[l]+h[l]+n)/Jt|0,f[l]%=Jt;for(n&&(f.unshift(n),++i),d=f.length;f[--d]==0;)f.pop();return t.d=f,t.e=i,_t?mt(t,x):t}function aa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(_s+e)}function Zr(e){var t,n,r,i=e.length-1,l="",c=e[0];if(i>0){for(l+=c,t=1;t<i;t++)r=e[t]+"",n=St-r.length,n&&(l+=Ni(n)),l+=r;c=e[t],r=c+"",n=St-r.length,n&&(l+=Ni(n))}else if(c===0)return"0";for(;c%10===0;)c/=10;return l+c}var La=(function(){function e(r,i){var l,c=0,d=r.length;for(r=r.slice();d--;)l=r[d]*i+c,r[d]=l%Jt|0,c=l/Jt|0;return c&&r.unshift(c),r}function t(r,i,l,c){var d,f;if(l!=c)f=l>c?1:-1;else for(d=f=0;d<l;d++)if(r[d]!=i[d]){f=r[d]>i[d]?1:-1;break}return f}function n(r,i,l){for(var c=0;l--;)r[l]-=c,c=r[l]<i[l]?1:0,r[l]=c*Jt+r[l]-i[l];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,l,c){var d,f,h,p,x,y,j,w,S,v,A,O,_,T,N,E,M,R,B=r.constructor,D=r.s==i.s?1:-1,z=r.d,$=i.d;if(!r.s)return new B(r);if(!i.s)throw Error(wr+"Division by zero");for(f=r.e-i.e,M=$.length,N=z.length,j=new B(D),w=j.d=[],h=0;$[h]==(z[h]||0);)++h;if($[h]>(z[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,$=$[0],O++;(h<N||p)&&O--;h++)_=p*Jt+(z[h]||0),w[h]=_/$|0,p=_%$|0;else{for(p=Jt/($[0]+1)|0,p>1&&($=e($,p),z=e(z,p),M=$.length,N=z.length),T=M,S=z.slice(0,M),v=S.length;v<M;)S[v++]=0;R=$.slice(),R.unshift(0),E=$[0],$[1]>=Jt/2&&++E;do p=0,d=t($,S,M,v),d<0?(A=S[0],M!=v&&(A=A*Jt+(S[1]||0)),p=A/E|0,p>1?(p>=Jt&&(p=Jt-1),x=e($,p),y=x.length,v=S.length,d=t(x,S,y,v),d==1&&(p--,n(x,M<y?R:$,y))):(p==0&&(d=p=1),x=$.slice()),y=x.length,y<v&&x.unshift(0),n(S,x,v),d==-1&&(v=S.length,d=t($,S,M,v),d<1&&(p++,n(S,M<v?R:$,v))),v=S.length):d===0&&(p++,S=[0]),w[h++]=p,d&&S[0]?S[v++]=z[T]||0:(S=[z[T]],v=1);while((T++<N||S[0]!==void 0)&&O--)}return w[0]||w.shift(),j.e=f,mt(j,c?l+Vt(j)+1:l)}})();function Iz(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(c2+Vt(e));if(!e.s)return new p(Xn);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(Xn),p.precision=d;;){if(i=mt(i.times(e),d),n=n.times(++f),c=l.plus(La(i,n,d)),Zr(c.d).slice(0,d)===Zr(l.d).slice(0,d)){for(;h--;)l=mt(l.times(l),d);return p.precision=x,t==null?(_t=!0,mt(l,x)):l}l=c}}function Vt(e){for(var t=e.e*St,n=e.d[0];n>=10;n/=10)t++;return t}function B0(e,t,n){if(t>e.LN10.sd())throw _t=!0,n&&(e.precision=n),Error(wr+"LN10 precision limit exceeded");return mt(new e(e.LN10),t)}function Ni(e){for(var t="";e--;)t+="0";return t}function Tu(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(wr+(j.s?"NaN":"-Infinity"));if(j.eq(Xn))return new S(0);if(t==null?(_t=!1,h=v):h=t,j.eq(10))return t==null&&(_t=!0),B0(S,h);if(h+=y,S.precision=h,n=Zr(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=Zr(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=B0(S,h+2,v).times(l+""),j=Tu(new S(r+"."+n.slice(1)),h-y).plus(f),S.precision=v,t==null?(_t=!0,mt(j,v)):j;for(d=c=j=La(j.minus(Xn),j.plus(Xn),h),p=mt(j.times(j),h),i=3;;){if(c=mt(c.times(p),h),f=d.plus(La(c,new S(i),h)),Zr(f.d).slice(0,h)===Zr(d.d).slice(0,h))return d=d.times(2),l!==0&&(d=d.plus(B0(S,h+2,v).times(l+""))),d=La(d,new S(x),h),S.precision=v,t==null?(_t=!0,mt(d,v)):d;d=f,i+=2}}function i3(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=Ll(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(c2+n)}else e.s=0,e.e=0,e.d=[0];return e}function mt(e,t,n){var r,i,l,c,d,f,h,p,x=e.d;for(c=1,l=x[0];l>=10;l/=10)c++;if(r=t-c,r<0)r+=St,i=t,h=x[p=0];else{if(p=Math.ceil((r+1)/St),l=x.length,p>=l)return e;for(h=l=x[p],c=1;l>=10;l/=10)c++;r%=St,i=r-St+c}if(n!==void 0&&(l=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=Ll(-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)==Jt&&(x[0]=1,++e.e);break}else{if(x[p]+=l,x[p]!=Jt)break;x[p--]=0,l=1}for(r=x.length;x[--r]===0;)x.pop();if(_t&&(e.e>im||e.e<-im))throw Error(c2+Vt(e));return e}function qz(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?mt(t,j):t;if(f=e.d,x=t.d,r=t.e,h=e.e,f=f.slice(),c=h-r,c){for(p=c<0,p?(n=f,c=-c,d=x.length):(n=x,r=h,d=f.length),i=Math.max(Math.ceil(j/St),d)+2,c>i&&(c=i,n.length=1),n.reverse(),i=c;i--;)n.push(0);n.reverse()}else{for(i=f.length,d=x.length,p=i<d,p&&(d=i),i=0;i<d;i++)if(f[i]!=x[i]){p=f[i]<x[i];break}c=0}for(p&&(n=f,f=x,x=n,t.s=-t.s),d=f.length,i=x.length-d;i>0;--i)f[d++]=0;for(i=x.length;i>c;){if(f[--i]<x[i]){for(l=i;l&&f[--l]===0;)f[l]=Jt-1;--f[l],f[i]+=Jt}f[i]-=x[i]}for(;f[--d]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,_t?mt(t,j):t):new y(0)}function ks(e,t,n){var r,i=Vt(e),l=Zr(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 s3(e,t){if(e.length>t)return e.length=t,!0}function Uz(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(_s+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 i3(c,l.toString())}else if(typeof l!="string")throw Error(_s+l);if(l.charCodeAt(0)===45?(l=l.slice(1),c.s=-1):c.s=1,Nee.test(l))i3(c,l);else throw Error(_s+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=Uz,i.config=i.set=Aee,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 Aee(e){if(!e||typeof e!="object")throw Error(wr+"Object expected");var t,n,r,i=["precision",1,zl,"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(Ll(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(_s+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(_s+n+": "+r);return this}var u2=Uz(See);Xn=new u2(1);const ut=u2;function _ee(e){return Cee(e)||Eee(e)||Tee(e)||Oee()}function Oee(){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 Tee(e,t){if(e){if(typeof e=="string")return Cj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cj(e,t)}}function Eee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Cee(e){if(Array.isArray(e))return Cj(e)}function Cj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kee=function(t){return t},Vz={},Hz=function(t){return t===Vz},o3=function(t){return function n(){return arguments.length===0||arguments.length===1&&Hz(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Mee=function e(t,n){return t===1?n:o3(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!==Vz}).length;return c>=t?n.apply(void 0,i):e(t-c,o3(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 Hz(x)?f.shift():x});return n.apply(void 0,_ee(p).concat(f))}))})},pp=function(t){return Mee(t.length,t)},kj=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},Pee=pp(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Ree=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))}},Mj=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Fz=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 Dee(e){var t;return e===0?t=1:t=Math.floor(new ut(e).abs().log(10).toNumber())+1,t}function zee(e,t,n){for(var r=new ut(e),i=0,l=[];r.lt(t)&&i<1e5;)l.push(r.toNumber()),r=r.add(n),i++;return l}var Lee=pp(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),$ee=pp(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Bee=pp(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const xp={rangeStep:zee,getDigitCount:Dee,interpolateNumber:Lee,uninterpolateNumber:$ee,uninterpolateTruncation:Bee};function Pj(e){return Uee(e)||qee(e)||Gz(e)||Iee()}function Iee(){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 qee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Uee(e){if(Array.isArray(e))return Rj(e)}function Eu(e,t){return Fee(e)||Hee(e,t)||Gz(e,t)||Vee()}function Vee(){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 Gz(e,t){if(e){if(typeof e=="string")return Rj(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 Rj(e,t)}}function Rj(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 Hee(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 Fee(e){if(Array.isArray(e))return e}function Kz(e){var t=Eu(e,2),n=t[0],r=t[1],i=n,l=r;return n>r&&(i=r,l=n),[i,l]}function Yz(e,t,n){if(e.lte(0))return new ut(0);var r=xp.getDigitCount(e.toNumber()),i=new ut(10).pow(r),l=e.div(i),c=r!==1?.05:.1,d=new ut(Math.ceil(l.div(c).toNumber())).add(n).mul(c),f=d.mul(i);return t?f:new ut(Math.ceil(f))}function Gee(e,t,n){var r=1,i=new ut(e);if(!i.isint()&&n){var l=Math.abs(e);l<1?(r=new ut(10).pow(xp.getDigitCount(e)-1),i=new ut(Math.floor(i.div(r).toNumber())).mul(r)):l>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):n||(i=new ut(Math.floor(e)));var c=Math.floor((t-1)/2),d=Ree(Pee(function(f){return i.add(new ut(f-c).mul(r)).toNumber()}),kj);return d(0,t)}function Xz(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new ut(0),tickMin:new ut(0),tickMax:new ut(0)};var l=Yz(new ut(t).sub(e).div(n-1),r,i),c;e<=0&&t>=0?c=new ut(0):(c=new ut(e).add(t).div(2),c=c.sub(new ut(c).mod(l)));var d=Math.ceil(c.sub(e).div(l).toNumber()),f=Math.ceil(new ut(t).sub(c).div(l).toNumber()),h=d+f+1;return h>n?Xz(e,t,n,r,i+1):(h<n&&(f=t>0?f+(n-h):f,d=t>0?d:d+(n-h)),{step:l,tickMin:c.sub(new ut(d).mul(l)),tickMax:c.add(new ut(f).mul(l))})}function Kee(e){var t=Eu(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=Kz([n,r]),f=Eu(d,2),h=f[0],p=f[1];if(h===-1/0||p===1/0){var x=p===1/0?[h].concat(Pj(kj(0,i-1).map(function(){return 1/0}))):[].concat(Pj(kj(0,i-1).map(function(){return-1/0})),[p]);return n>r?Mj(x):x}if(h===p)return Gee(h,i,l);var y=Xz(h,p,c,l),j=y.step,w=y.tickMin,S=y.tickMax,v=xp.rangeStep(w,S.add(new ut(.1).mul(j)),j);return n>r?Mj(v):v}function Yee(e,t){var n=Eu(e,2),r=n[0],i=n[1],l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Kz([r,i]),d=Eu(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=Yz(new ut(h).sub(f).div(p-1),l,0),y=[].concat(Pj(xp.rangeStep(new ut(f),new ut(h).sub(new ut(.99).mul(x)),x)),[h]);return r>i?Mj(y):y}var Xee=Fz(Kee),Wee=Fz(Yee),Zee="Invariant failed";function Ms(e,t){throw new Error(Zee)}var Qee=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function al(e){"@babel/helpers - typeof";return al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(e)}function 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 Jee(e,t){return rte(e)||nte(e,t)||tte(e,t)||ete()}function ete(){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 tte(e,t){if(e){if(typeof e=="string")return l3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l3(e,t)}}function l3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nte(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 rte(e){if(Array.isArray(e))return e}function ate(e,t){if(e==null)return{};var n=ite(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 ite(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 ste(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ote(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,Qz(r.key),r)}}function lte(e,t,n){return t&&ote(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cte(e,t,n){return t=om(t),ute(e,Wz()?Reflect.construct(t,n||[],om(e).constructor):t.apply(e,n))}function ute(e,t){if(t&&(al(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dte(e)}function dte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wz=function(){return!!e})()}function om(e){return om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},om(e)}function fte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dj(e,t)}function Dj(e,t){return Dj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Dj(e,t)}function Zz(e,t,n){return t=Qz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qz(e){var t=hte(e,"string");return al(t)=="symbol"?t:t+""}function hte(e,t){if(al(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(al(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fd=(function(e){function t(){return ste(this,t),cte(this,t,arguments)}return fte(t,e),lte(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=ate(r,Qee),j=je(y,!1);this.props.direction==="x"&&p.type!=="number"&&Ms();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=Jee(T,2);E=R[0],M=R[1]}else E=M=T;if(l==="vertical"){var B=p.scale,D=O+i,z=D+c,$=D-c,L=B(_-E),K=B(_+M);N.push({x1:K,y1:z,x2:K,y2:$}),N.push({x1:L,y1:D,x2:K,y2:D}),N.push({x1:L,y1:z,x2:L,y2:$})}else if(l==="horizontal"){var H=x.scale,I=A+i,F=I-c,Z=I+c,ie=H(_-E),ce=H(_+M);N.push({x1:F,y1:ce,x2:Z,y2:ce}),N.push({x1:I,y1:ie,x2:I,y2:ce}),N.push({x1:F,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);Zz(fd,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Zz(fd,"displayName","ErrorBar");function Cu(e){"@babel/helpers - typeof";return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cu(e)}function c3(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?c3(Object(n),!0).forEach(function(r){mte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mte(e,t,n){return t=pte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pte(e){var t=xte(e,"string");return Cu(t)=="symbol"?t:t+""}function xte(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jz=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,l=t.legendContent,c=Kn(n,Ho);if(!c)return null;var d=Ho.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:d2(x),value:S||w,payload:j}}),os(os(os({},f),Ho.getWithHeight(c,i)),{},{payload:h,item:c})};function ku(e){"@babel/helpers - typeof";return ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ku(e)}function u3(e){return bte(e)||vte(e)||gte(e)||yte()}function yte(){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 gte(e,t){if(e){if(typeof e=="string")return zj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zj(e,t)}}function vte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bte(e){if(Array.isArray(e))return zj(e)}function zj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d3(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?d3(Object(n),!0).forEach(function(r){Go(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Go(e,t,n){return t=jte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jte(e){var t=wte(e,"string");return ku(t)=="symbol"?t:t+""}function wte(e,t){if(ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yt(e,t,n){return Pe(e)||Pe(t)?n:Xt(t)?Zn(e,t,n):Ee(t)?t(e):n}function au(e,t,n,r){var i=bee(e,function(d){return Yt(d,t)});if(n==="number"){var l=i.filter(function(d){return he(d)||parseFloat(d)});return l.length?[mp(l),hp(l)]:[1/0,-1/0]}var c=r?i.filter(function(d){return!Pe(d)}):i;return c.map(function(d){return Xt(d)||d instanceof Date?d:""})}var Ste=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},d2=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},Nte=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=Pe(T)?n:T;c[N].push({item:A[0],stackList:A.slice(1),barSize:Pe(E)?void 0:Sn(E,r,0)})}}return c},Ate=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(u3(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(u3(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},_te=function(t,n,r,i){var l=r.children,c=r.width,d=r.margin,f=c-(d.left||0)-(d.right||0),h=Jz({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),{},Go({},j,t[j]+(x||0)));if((S==="horizontal"||S==="vertical"&&j==="center")&&w!=="middle"&&he(t[w]))return Pt(Pt({},t),{},Go({},w,t[w]+(y||0)))}return t},Ote=function(t,n,r){return Pe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},eL=function(t,n,r,i,l){var c=n.props.children,d=Qn(c,fd).filter(function(h){return Ote(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(Pe(x))return h;var y=Array.isArray(x)?[mp(x),hp(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},Tte=function(t,n,r,i,l){var c=n.map(function(d){return eL(t,d,r,l,i)}).filter(function(d){return!Pe(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},tL=function(t,n,r,i,l){var c=n.map(function(f){var h=f.props.dataKey;return r==="number"&&h&&eL(t,f,h,i)||au(t,h,r,l)});if(r==="number")return c.reduce(function(f,h){return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);var d={};return c.reduce(function(f,h){for(var p=0,x=h.length;p<x;p++)d[h[p]]||(d[h[p]]=!0,f.push(h[p]));return f},[])},nL=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},rL=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},Pa=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!id(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}})},I0=new WeakMap,eh=function(t,n){if(typeof n!="function")return t;I0.has(t)||I0.set(t,new WeakMap);var r=I0.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},aL=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:Su(),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:ru(),realScaleType:"point"}:l==="category"?{scale:Su(),realScaleType:"band"}:{scale:tm(),realScaleType:"linear"};if(Ts(i)){var f="scale".concat(Qm(i));return{scale:(WP[f]||ru)(),realScaleType:WP[f]?f:"point"}}return Ee(i)?{scale:i}:{scale:ru(),realScaleType:"point"}},f3=1e-4,iL=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])-f3,c=Math.max(i[0],i[1])+f3,d=t(n[0]),f=t(n[r-1]);(d<l||d>c||f<l||f>c)&&t.domain([n[0],n[r-1]])}},Ete=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},Cte=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=id(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])}},Mte=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=id(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)}},Pte={sign:kte,expand:bY,none:Wo,silhouette:jY,wiggle:wY,positive:Mte},Rte=function(t,n,r){var i=n.map(function(d){return d.props.dataKey}),l=Pte[r],c=vY().keys(i).value(function(d,f){return+Yt(d,f,0)}).order(dj).offset(l);return c(t)},Dte=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(Xt(S)){var _=O.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(y),O.hasStack=!0,O.stackGroups[S]=_}else O.stackGroups[Pl("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[y]};return Pt(Pt({},x),{},Go({},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),{},Go({},v,{numericAxisId:r,cateAxisId:i,items:A.items,stackedData:Rte(t,A.items,l)}))},w)}return Pt(Pt({},x),{},Go({},y,j))},p)},sL=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=Xee(h,l,d);return t.domain([mp(p),hp(p)]),{niceTicks:p}}if(l&&i==="number"){var x=t.domain(),y=Wee(x,l,d);return{niceTicks:y}}return null};function h3(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&&!Pe(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,Pe(c)?t.dataKey:c);return Pe(f)?null:t.scale(f)}var m3=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 Pe(f)?null:n.scale(f)-l/2+i},zte=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]},Lte=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,l=i.stackId;if(Xt(l)){var c=n[l];if(c){var d=c.items.indexOf(t);return d>=0?c.stackedData[d]:null}}return null},$te=function(t){return t.reduce(function(n,r){return[mp(r.concat([n[0]]).filter(he)),hp(r.concat([n[1]]).filter(he))]},[1/0,-1/0])},oL=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=$te(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})},p3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,x3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Lj=function(t,n,r){if(Ee(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(p3.test(t[0])){var l=+p3.exec(t[0])[1];i[0]=n[0]-l}else Ee(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(x3.test(t[1])){var c=+x3.exec(t[1])[1];i[1]=n[1]+c}else Ee(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=BS(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},y3=function(t,n,r){return!t||!t.length||dd(t,Zn(r,"type.defaultProps.domain"))?n:t},lL=function(t,n){var r=t.type.defaultProps?Pt(Pt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,l=r.name,c=r.unit,d=r.formatter,f=r.tooltipType,h=r.chartType,p=r.hide;return Pt(Pt({},je(t,!1)),{},{dataKey:i,unit:c,formatter:d,name:l||i,color:d2(t),value:Yt(n,i),type:f,payload:n,chartType:h,hide:p})};function Mu(e){"@babel/helpers - typeof";return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(e)}function 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 Ca(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){cL(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 cL(e,t,n){return t=Bte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bte(e){var t=Ite(e,"string");return Mu(t)=="symbol"?t:t+""}function Ite(e,t){if(Mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qte(e,t){return Fte(e)||Hte(e,t)||Vte(e,t)||Ute()}function Ute(){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 Vte(e,t){if(e){if(typeof e=="string")return v3(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 v3(e,t)}}function v3(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 Hte(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 Fte(e){if(Array.isArray(e))return e}var cm=Math.PI/180,Gte=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}},uL=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},Kte=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=uL(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(Pe(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=qte(E,2);f=M[0],h=M[1]}var R=aL(O,l),B=R.realScaleType,D=R.scale;D.domain(_).range(N),iL(D);var z=sL(D,Ca(Ca({},O),{},{realScaleType:B})),$=Ca(Ca(Ca({},O),z),{},{range:N,radius:w,realScaleType:B,scale:D,cx:p,cy:x,innerRadius:j,outerRadius:w,startAngle:f,endAngle:h});return Ca(Ca({},v),{},cL({},A,$))},{})},Yte=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))},Xte=function(t,n){var r=t.x,i=t.y,l=n.cx,c=n.cy,d=Yte({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:Gte(h),angleInRadian:h}},Wte=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}},Zte=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},b3=function(t,n){var r=t.x,i=t.y,l=Xte({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=Wte(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:Zte(j,n)}):null},dL=function(t){return!k.isValidElement(t)&&!Ee(t)&&typeof t!="boolean"?t.className:""};function Pu(e){"@babel/helpers - typeof";return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(e)}var Qte=["offset"];function Jte(e){return rne(e)||nne(e)||tne(e)||ene()}function ene(){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 tne(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 rne(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 ane(e,t){if(e==null)return{};var n=ine(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 ine(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 j3(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?j3(Object(n),!0).forEach(function(r){sne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sne(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=lne(e,"string");return Pu(t)=="symbol"?t:t+""}function lne(e,t){if(Pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ru(){return Ru=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},Ru.apply(this,arguments)}var cne=function(t){var n=t.value,r=t.formatter,i=Pe(t.children)?n:t.children;return Ee(r)?r(i):i},une=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},dne=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=une(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=Pe(t.id)?Pl("recharts-radial-line-"):t.id;return V.createElement("text",Ru({},r,{dominantBaseline:"central",className:ze("recharts-radial-bar-label",d)}),V.createElement("defs",null,V.createElement("path",{id:R,d:M})),V.createElement("textPath",{xlinkHref:"#".concat(R)},n))},fne=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"}},hne=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):Ml(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)},mne=function(t){return"cx"in t&&he(t.cx)};function en(e){var t=e.offset,n=t===void 0?5:t,r=ane(e,Qte),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||Pe(d)&&Pe(f)&&!k.isValidElement(h)&&!Ee(h))return null;if(k.isValidElement(h))return k.cloneElement(h,i);var j;if(Ee(h)){if(j=k.createElement(h,i),k.isValidElement(j))return j}else j=cne(i);var w=mne(l),S=je(i,!0);if(w&&(c==="insideStart"||c==="insideEnd"||c==="end"))return dne(i,j,S);var v=w?fne(i):hne(i);return V.createElement(Cs,Ru({className:ze("recharts-label",x)},S,v,{breakAll:y}),j)}en.displayName="Label";var fL=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:{}},pne=function(t,n){return t?t===!0?V.createElement(en,{key:"label-implicit",viewBox:n}):Xt(t)?V.createElement(en,{key:"label-implicit",viewBox:n,value:t}):k.isValidElement(t)?t.type===en?k.cloneElement(t,{key:"label-implicit",viewBox:n}):V.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Ee(t)?V.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Ml(t)?V.createElement(en,Ru({viewBox:n},t,{key:"label-implicit"})):null:null},xne=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=fL(t),c=Qn(i,en).map(function(f,h){return k.cloneElement(f,{viewBox:n||l,key:"label-".concat(h)})});if(!r)return c;var d=pne(t.label,n||l);return[d].concat(Jte(c))};en.parseViewBox=fL;en.renderCallByParent=xne;var q0,w3;function yne(){if(w3)return q0;w3=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return q0=e,q0}var gne=yne();const vne=st(gne);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)}var bne=["valueAccessor"],jne=["data","dataKey","clockWise","id","textBreakAll"];function wne(e){return _ne(e)||Ane(e)||Nne(e)||Sne()}function Sne(){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 Nne(e,t){if(e){if(typeof e=="string")return Bj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bj(e,t)}}function Ane(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _ne(e){if(Array.isArray(e))return Bj(e)}function Bj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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 S3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function N3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S3(Object(n),!0).forEach(function(r){One(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function One(e,t,n){return t=Tne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tne(e){var t=Ene(e,"string");return Du(t)=="symbol"?t:t+""}function Ene(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 A3(e,t){if(e==null)return{};var n=Cne(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 Cne(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)?vne(t.value):t.value};function $a(e){var t=e.valueAccessor,n=t===void 0?kne:t,r=A3(e,bne),i=r.data,l=r.dataKey,c=r.clockWise,d=r.id,f=r.textBreakAll,h=A3(r,jne);return!i||!i.length?null:V.createElement(Ze,{className:"recharts-label-list"},i.map(function(p,x){var y=Pe(l)?n(p,x):Yt(p&&p.payload,l),j=Pe(d)?{}:{id:"".concat(d,"-").concat(x)};return V.createElement(en,um({},je(p,!0),h,j,{parentViewBox:p.parentViewBox,value:y,textBreakAll:f,viewBox:en.parseViewBox(Pe(c)?p:N3(N3({},p),{},{clockWise:c})),key:"label-".concat(x),index:x}))}))}$a.displayName="LabelList";function Mne(e,t){return e?e===!0?V.createElement($a,{key:"labelList-implicit",data:t}):V.isValidElement(e)||Ee(e)?V.createElement($a,{key:"labelList-implicit",data:t,content:e}):Ml(e)?V.createElement($a,um({data:t},e,{key:"labelList-implicit"})):null:null}function Pne(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=Qn(r,$a).map(function(c,d){return k.cloneElement(c,{data:t,key:"labelList-".concat(d)})});if(!n)return i;var l=Mne(e.label,t);return[l].concat(wne(i))}$a.renderCallByParent=Pne;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 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 _3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_3(Object(n),!0).forEach(function(r){Rne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rne(e,t,n){return t=Dne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dne(e){var t=zne(e,"string");return zu(t)=="symbol"?t:t+""}function zne(e,t){if(zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lne=function(t,n){var r=wn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},th=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}},hL=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,l=t.outerRadius,c=t.startAngle,d=t.endAngle,f=Lne(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},$ne=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=th({cx:n,cy:r,radius:l,angle:h,sign:x,cornerRadius:c,cornerIsExternal:f}),j=y.circleTangency,w=y.lineTangency,S=y.theta,v=th({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
|
||
`):hL({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=th({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,D=th({cx:n,cy:r,radius:i,angle:p,sign:-x,isExternal:!0,cornerRadius:c,cornerIsExternal:f}),z=D.circleTangency,$=D.lineTangency,L=D.theta,K=f?Math.abs(h-p):Math.abs(h-p)-B-L;if(K<0&&c===0)return"".concat(N,"L").concat(n,",").concat(r,"Z");N+="L".concat($.x,",").concat($.y,`
|
||
A`).concat(c,",").concat(c,",0,0,").concat(+(x<0),",").concat(z.x,",").concat(z.y,`
|
||
A`).concat(i,",").concat(i,",0,").concat(+(K>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},Bne={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},mL=function(t){var n=O3(O3({},Bne),t),r=n.cx,i=n.cy,l=n.innerRadius,c=n.outerRadius,d=n.cornerRadius,f=n.forceCornerRadius,h=n.cornerIsExternal,p=n.startAngle,x=n.endAngle,y=n.className;if(c<l||p===x)return null;var j=ze("recharts-sector",y),w=c-l,S=Sn(d,w,0,!0),v;return S>0&&Math.abs(p-x)<360?v=$ne({cx:r,cy:i,innerRadius:l,outerRadius:c,cornerRadius:Math.min(S,w/2),forceCornerRadius:f,cornerIsExternal:h,startAngle:p,endAngle:x}):v=hL({cx:r,cy:i,innerRadius:l,outerRadius:c,startAngle:p,endAngle:x}),V.createElement("path",Ij({},je(n,!0),{className:j,d:v,role:"img"}))};function Lu(e){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function 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 T3(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 E3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T3(Object(n),!0).forEach(function(r){Ine(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ine(e,t,n){return t=qne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qne(e){var t=Une(e,"string");return Lu(t)=="symbol"?t:t+""}function Une(e,t){if(Lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C3={curveBasisClosed:lY,curveBasisOpen:cY,curveBasis:oY,curveBumpX:KK,curveBumpY:YK,curveLinearClosed:uY,curveLinear:ep,curveMonotoneX:dY,curveMonotoneY:fY,curveNatural:hY,curveStep:mY,curveStepAfter:xY,curveStepBefore:pY},nh=function(t){return t.x===+t.x&&t.y===+t.y},Hc=function(t){return t.x},Fc=function(t){return t.y},Vne=function(t,n){if(Ee(t))return t;var r="curve".concat(Qm(t));return(r==="curveMonotone"||r==="curveBump")&&n?C3["".concat(r).concat(n==="vertical"?"Y":"X")]:C3[r]||ep},Hne=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=Vne(r,d),x=h?l.filter(function(S){return nh(S)}):l,y;if(Array.isArray(c)){var j=h?c.filter(function(S){return nh(S)}):c,w=x.map(function(S,v){return E3(E3({},S),{},{base:j[v]})});return d==="vertical"?y=Kf().y(Fc).x1(Hc).x0(function(S){return S.base.x}):y=Kf().x(Hc).y1(Fc).y0(function(S){return S.base.y}),y.defined(nh).curve(p),y(w)}return d==="vertical"&&he(c)?y=Kf().y(Fc).x1(Hc).x0(c):he(c)?y=Kf().x(Hc).y1(Fc).y0(c):y=h6().x(Hc).y(Fc),y.defined(nh).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?Hne(t):i;return k.createElement("path",qj({},je(t,!1),Lh(t),{className:ze("recharts-curve",n),d:c,ref:l}))},U0={exports:{}},V0,k3;function Fne(){if(k3)return V0;k3=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return V0=e,V0}var H0,M3;function Gne(){if(M3)return H0;M3=1;var e=Fne();function t(){}function n(){}return n.resetWarningCache=t,H0=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},H0}var P3;function Kne(){return P3||(P3=1,U0.exports=Gne()()),U0.exports}var Yne=Kne();const nt=st(Yne),{getOwnPropertyNames:Xne,getOwnPropertySymbols:Wne}=Object,{hasOwnProperty:Zne}=Object.prototype;function F0(e,t){return function(r,i,l){return e(r,i,l)&&t(r,i,l)}}function rh(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 Qne(e){return e!=null?e[Symbol.toStringTag]:void 0}function R3(e){return Xne(e).concat(Wne(e))}const Jne=Object.hasOwn||((e,t)=>Zne.call(e,t));function Is(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const ere="__v",tre="__o",nre="_owner",{getOwnPropertyDescriptor:D3,keys:z3}=Object;function rre(e,t){return e.byteLength===t.byteLength&&fm(new Uint8Array(e),new Uint8Array(t))}function are(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 ire(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 sre(e,t){return Is(e.getTime(),t.getTime())}function ore(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function lre(e,t){return e===t}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.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 cre=Is;function ure(e,t,n){const r=z3(e);let i=r.length;if(z3(t).length!==i)return!1;for(;i-- >0;)if(!pL(e,t,n,r[i]))return!1;return!0}function Gc(e,t,n){const r=R3(e);let i=r.length;if(R3(t).length!==i)return!1;let l,c,d;for(;i-- >0;)if(l=r[i],!pL(e,t,n,l)||(c=D3(e,l),d=D3(t,l),(c||d)&&(!c||!d||c.configurable!==d.configurable||c.enumerable!==d.enumerable||c.writable!==d.writable)))return!1;return!0}function dre(e,t){return Is(e.valueOf(),t.valueOf())}function fre(e,t){return e.source===t.source&&e.flags===t.flags}function $3(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 hre(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 pL(e,t,n,r){return(r===nre||r===tre||r===ere)&&(e.$$typeof||t.$$typeof)?!0:Jne(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const mre="[object ArrayBuffer]",pre="[object Arguments]",xre="[object Boolean]",yre="[object DataView]",gre="[object Date]",vre="[object Error]",bre="[object Map]",jre="[object Number]",wre="[object Object]",Sre="[object RegExp]",Nre="[object Set]",Are="[object String]",_re={"[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},Ore="[object URL]",Tre=Object.prototype.toString;function Ere({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=Tre.call(v);if(N===gre)return r(v,A,O);if(N===Sre)return p(v,A,O);if(N===bre)return c(v,A,O);if(N===Nre)return x(v,A,O);if(N===wre)return typeof v.then!="function"&&typeof A.then!="function"&&f(v,A,O);if(N===Ore)return j(v,A,O);if(N===vre)return i(v,A,O);if(N===pre)return f(v,A,O);if(_re[N])return y(v,A,O);if(N===mre)return e(v,A,O);if(N===yre)return n(v,A,O);if(N===xre||N===jre||N===Are)return h(v,A,O);if(w){let E=w[N];if(!E){const M=Qne(v);M&&(E=w[M])}if(E)return E(v,A,O)}return!1}}function Cre({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:rre,areArraysEqual:n?Gc:are,areDataViewsEqual:ire,areDatesEqual:sre,areErrorsEqual:ore,areFunctionsEqual:lre,areMapsEqual:n?F0(L3,Gc):L3,areNumbersEqual:cre,areObjectsEqual:n?Gc:ure,arePrimitiveWrappersEqual:dre,areRegExpsEqual:fre,areSetsEqual:n?F0($3,Gc):$3,areTypedArraysEqual:n?F0(fm,Gc):fm,areUrlsEqual:hre,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=rh(r.areArraysEqual),l=rh(r.areMapsEqual),c=rh(r.areObjectsEqual),d=rh(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 Mre({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 Pre=qi();qi({strict:!0});qi({circular:!0});qi({circular:!0,strict:!0});qi({createInternalComparator:()=>Is});qi({strict:!0,createInternalComparator:()=>Is});qi({circular:!0,createInternalComparator:()=>Is});qi({circular:!0,createInternalComparator:()=>Is,strict:!0});function qi(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,l=Cre(e),c=Ere(l),d=n?n(c):kre(c);return Mre({circular:t,comparator:c,createState:r,equals:d,strict:i})}function Rre(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function B3(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):Rre(i)};requestAnimationFrame(r)}function Uj(e){"@babel/helpers - typeof";return Uj=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},Uj(e)}function Dre(e){return Bre(e)||$re(e)||Lre(e)||zre()}function zre(){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 Lre(e,t){if(e){if(typeof e=="string")return I3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I3(e,t)}}function I3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $re(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bre(e){if(Array.isArray(e))return e}function Ire(){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=Dre(c),f=d[0],h=d.slice(1);if(typeof f=="number"){B3(i.bind(null,h),f);return}i(f),B3(i.bind(null,h));return}Uj(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 $u(e){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}function q3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function U3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q3(Object(n),!0).forEach(function(r){xL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xL(e,t,n){return t=qre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qre(e){var t=Ure(e,"string");return $u(t)==="symbol"?t:String(t)}function Ure(e,t){if($u(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($u(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vre=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(l){return i.includes(l)})})},Hre=function(t){return t},Fre=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},iu=function(t,n){return Object.keys(n).reduce(function(r,i){return U3(U3({},r),{},xL({},i,t(i,n[i])))},{})},V3=function(t,n,r){return t.map(function(i){return"".concat(Fre(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Gre(e,t){return Xre(e)||Yre(e,t)||yL(e,t)||Kre()}function Kre(){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 Yre(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 Xre(e){if(Array.isArray(e))return e}function Wre(e){return Jre(e)||Qre(e)||yL(e)||Zre()}function Zre(){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 yL(e,t){if(e){if(typeof e=="string")return Vj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vj(e,t)}}function Qre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jre(e){if(Array.isArray(e))return Vj(e)}function Vj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hm=1e-4,gL=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},vL=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},H3=function(t,n){return function(r){var i=gL(t,n);return vL(i,r)}},eae=function(t,n){return function(r){var i=gL(t,n),l=[].concat(Wre(i.map(function(c,d){return c*d}).slice(1)),[0]);return vL(l,r)}},F3=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=Gre(h,4);i=p[0],l=p[1],c=p[2],d=p[3]}}}var x=H3(i,c),y=H3(l,d),j=eae(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},tae=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},nae=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 F3(i);case"spring":return tae();default:if(i.split("(")[0]==="cubic-bezier")return F3(i)}return typeof i=="function"?i:null};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 G3(e){return iae(e)||aae(e)||bL(e)||rae()}function rae(){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 aae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iae(e){if(Array.isArray(e))return Fj(e)}function K3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ln(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){Hj(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 Hj(e,t,n){return t=sae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sae(e){var t=oae(e,"string");return Bu(t)==="symbol"?t:String(t)}function oae(e,t){if(Bu(e)!=="object"||e===null)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)}function lae(e,t){return dae(e)||uae(e,t)||bL(e,t)||cae()}function cae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bL(e,t){if(e){if(typeof e=="string")return Fj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fj(e,t)}}function Fj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uae(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 dae(e){if(Array.isArray(e))return e}var mm=function(t,n,r){return t+(n-t)*r},Gj=function(t){var n=t.from,r=t.to;return n!==r},fae=function e(t,n,r){var i=iu(function(l,c){if(Gj(c)){var d=t(c.from,c.to,c.velocity),f=lae(d,2),h=f[0],p=f[1];return ln(ln({},c),{},{from:h,velocity:p})}return c},n);return r<1?iu(function(l,c){return Gj(c)?ln(ln({},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 hae=(function(e,t,n,r,i){var l=Vre(e,t),c=l.reduce(function(v,A){return ln(ln({},v),{},Hj({},A,[e[A],t[A]]))},{}),d=l.reduce(function(v,A){return ln(ln({},v),{},Hj({},A,{from:e[A],velocity:0,to:t[A]}))},{}),f=-1,h,p,x=function(){return null},y=function(){return iu(function(A,O){return O.from},d)},j=function(){return!Object.values(d).filter(Gj).length},w=function(A){h||(h=A);var O=A-h,_=O/n.dt;d=fae(n,d,_),i(ln(ln(ln({},e),t),y())),h=A,j()||(f=requestAnimationFrame(x))},S=function(A){p||(p=A);var O=(A-p)/r,_=iu(function(N,E){return mm.apply(void 0,G3(E).concat([n(O)]))},c);if(i(ln(ln(ln({},e),t),_)),O<1)f=requestAnimationFrame(x);else{var T=iu(function(N,E){return mm.apply(void 0,G3(E).concat([n(1)]))},c);i(ln(ln(ln({},e),t),T))}};return x=n.isStepper?w:S,function(){return requestAnimationFrame(x),function(){cancelAnimationFrame(f)}}});function il(e){"@babel/helpers - typeof";return il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},il(e)}var mae=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function pae(e,t){if(e==null)return{};var n=xae(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 xae(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 G0(e){return bae(e)||vae(e)||gae(e)||yae()}function yae(){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 gae(e,t){if(e){if(typeof e=="string")return Kj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kj(e,t)}}function vae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bae(e){if(Array.isArray(e))return Kj(e)}function Kj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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 Cr(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){Zc(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 Zc(e,t,n){return t=jL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wae(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,jL(r.key),r)}}function Sae(e,t,n){return t&&wae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jL(e){var t=Nae(e,"string");return il(t)==="symbol"?t:String(t)}function Nae(e,t){if(il(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(il(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aae(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yj(e,t)}function Yj(e,t){return Yj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yj(e,t)}function _ae(e){var t=Oae();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 Xj(this,i)}}function Xj(e,t){if(t&&(il(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wj(e)}function Wj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oae(){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 ia=(function(e){Aae(n,e);var t=_ae(n);function n(r,i){var l;jae(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(Wj(l)),l.changeStyle=l.changeStyle.bind(Wj(l)),!d||j<=0)return l.state={style:{}},typeof y=="function"&&(l.state={style:p}),Xj(l);if(x&&x.length)l.state={style:x[0].style};else if(h){if(typeof y=="function")return l.state={style:h},Xj(l);l.state={style:f?Zc({},f,h):h}}else l.state={style:{}};return l}return Sae(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?Zc({},f,p):p};this.state&&y&&(f&&y[f]!==p||!f&&y!==p)&&this.setState(j);return}if(!(Pre(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?Zc({},f,S):S};(f&&y[f]!==S||!f&&y!==S)&&this.setState(v)}this.runAnimation(Cr(Cr({},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=hae(c,d,nae(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(G0(S),[l.runJSAnimation.bind(l,{from:R.style,to:N,duration:O,easing:T}),O]);var D=V3(B,O,T),z=Cr(Cr(Cr({},R.style),N),{},{transition:D});return[].concat(G0(S),[z,O,M]).filter(Hre)};return this.manager.start([f].concat(G0(c.reduce(j,[p,Math.max(y,d)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Ire());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?Zc({},d,f):f,v=V3(Object.keys(S),c,h);w.start([p,l,Cr(Cr({},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=pae(i,mae),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,Cr(Cr({},f),{},{style:Cr(Cr({},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);ia.displayName="Animate";ia.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ia.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 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 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 Tae(e,t){return Mae(e)||kae(e,t)||Cae(e,t)||Eae()}function Eae(){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 Cae(e,t){if(e){if(typeof e=="string")return X3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X3(e,t)}}function X3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function 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 Mae(e){if(Array.isArray(e))return e}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 Z3(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){Pae(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 Pae(e,t,n){return t=Rae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rae(e){var t=Dae(e,"string");return Iu(t)=="symbol"?t:t+""}function Dae(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 Q3=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},zae=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},Lae={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},f2=function(t){var n=Z3(Z3({},Lae),t),r=k.useRef(),i=k.useState(-1),l=Tae(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 _=ze("recharts-rectangle",j);return O?V.createElement(ia,{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(ia,{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({},je(n,!0),{className:_,d:Q3(M,R,N,E,y),ref:r})))}):V.createElement("path",xm({},je(n,!0),{className:_,d:Q3(f,h,p,x,y)}))},$ae=["points","className","baseLinePoints","connectNulls"];function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Do.apply(this,arguments)}function Bae(e,t){if(e==null)return{};var n=Iae(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 Iae(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 J3(e){return Hae(e)||Vae(e)||Uae(e)||qae()}function qae(){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 Uae(e,t){if(e){if(typeof e=="string")return Zj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zj(e,t)}}function Vae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hae(e){if(Array.isArray(e))return Zj(e)}function Zj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var e4=function(t){return t&&t.x===+t.x&&t.y===+t.y},Fae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){e4(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),e4(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},su=function(t,n){var r=Fae(t);n&&(r=[r.reduce(function(l,c){return[].concat(J3(l),J3(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},Gae=function(t,n,r){var i=su(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(su(n.reverse(),r).slice(1))},Kae=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,l=t.connectNulls,c=Bae(t,$ae);if(!n||!n.length)return null;var d=ze("recharts-polygon",r);if(i&&i.length){var f=c.stroke&&c.stroke!=="none",h=Gae(n,i,l);return V.createElement("g",{className:d},V.createElement("path",Do({},je(c,!0),{fill:h.slice(-1)==="Z"?c.fill:"none",stroke:"none",d:h})),f?V.createElement("path",Do({},je(c,!0),{fill:"none",d:su(n,l)})):null,f?V.createElement("path",Do({},je(c,!0),{fill:"none",d:su(i,l)})):null)}var p=su(n,l);return V.createElement("path",Do({},je(c,!0),{fill:p.slice(-1)==="Z"?c.fill:"none",className:d,d:p}))};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)}var yp=function(t){var n=t.cx,r=t.cy,i=t.r,l=t.className,c=ze("recharts-dot",l);return n===+n&&r===+r&&i===+i?k.createElement("circle",Qj({},je(t,!1),Lh(t),{className:c,cx:n,cy:r,r:i})):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)}var Yae=["x","y","top","left","width","height","className"];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 t4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t4(Object(n),!0).forEach(function(r){Wae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wae(e,t,n){return t=Zae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zae(e){var t=Qae(e,"string");return qu(t)=="symbol"?t:t+""}function Qae(e,t){if(qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jae(e,t){if(e==null)return{};var n=eie(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 eie(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 tie=function(t,n,r,i,l,c){return"M".concat(t,",").concat(l,"v").concat(i,"M").concat(c,",").concat(n,"h").concat(r)},nie=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=Jae(t,Yae),v=Xae({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",Jj({},je(v,!0),{className:ze("recharts-cross",w),d:tie(r,l,x,j,d,h)}))},K0,n4;function rie(){if(n4)return K0;n4=1;var e=fp(),t=zz(),n=oa();function r(i,l){return i&&i.length?e(i,n(l,2),t):void 0}return K0=r,K0}var aie=rie();const iie=st(aie);var Y0,r4;function sie(){if(r4)return Y0;r4=1;var e=fp(),t=oa(),n=Lz();function r(i,l){return i&&i.length?e(i,t(l,2),n):void 0}return Y0=r,Y0}var oie=sie();const lie=st(oie);var cie=["cx","cy","angle","ticks","axisLine"],uie=["ticks","tick","angle","tickFormatter","stroke"];function sl(e){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ou.apply(this,arguments)}function a4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ls(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a4(Object(n),!0).forEach(function(r){gp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i4(e,t){if(e==null)return{};var n=die(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 die(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s4(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,SL(r.key),r)}}function hie(e,t,n){return t&&s4(e.prototype,t),n&&s4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mie(e,t,n){return t=ym(t),pie(e,wL()?Reflect.construct(t,n||[],ym(e).constructor):t.apply(e,n))}function pie(e,t){if(t&&(sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xie(e)}function xie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wL=function(){return!!e})()}function ym(e){return ym=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ym(e)}function yie(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 gp(e,t,n){return t=SL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SL(e){var t=gie(e,"string");return sl(t)=="symbol"?t:t+""}function gie(e,t){if(sl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vp=(function(e){function t(){return fie(this,t),mie(this,t,arguments)}return yie(t,e),hie(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=iie(d,function(p){return p.coordinate||0}),h=lie(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=i4(r,cie),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({},je(h,!1)),{},{fill:"none"},je(f,!1)),{},{x1:x.x,y1:x.y,x2:y.x,y2:y.y});return V.createElement("line",ou({className:"recharts-polar-radius-axis-line"},j))}},{key:"renderTicks",value:function(){var r=this,i=this.props,l=i.ticks,c=i.tick,d=i.angle,f=i.tickFormatter,h=i.stroke,p=i4(i,uie),x=this.getTickTextAnchor(),y=je(p,!1),j=je(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,ou({className:ze("recharts-polar-radius-axis-tick",dL(c)),key:"tick-".concat(S.coordinate)},Es(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:ze("recharts-polar-radius-axis",this.props.className)},l&&this.renderAxisLine(),c&&this.renderTicks(),en.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,l){var c;return V.isValidElement(r)?c=V.cloneElement(r,i):Ee(r)?c=r(i):c=V.createElement(Cs,ou({},i,{className:"recharts-polar-radius-axis-tick-value"}),l),c}}])})(k.PureComponent);gp(vp,"displayName","PolarRadiusAxis");gp(vp,"axisType","radiusAxis");gp(vp,"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 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 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 o4(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?o4(Object(n),!0).forEach(function(r){bp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,AL(r.key),r)}}function bie(e,t,n){return t&&l4(e.prototype,t),n&&l4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jie(e,t,n){return t=gm(t),wie(e,NL()?Reflect.construct(t,n||[],gm(e).constructor):t.apply(e,n))}function wie(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 Sie(e)}function Sie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NL=function(){return!!e})()}function gm(e){return gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gm(e)}function Nie(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 bp(e,t,n){return t=AL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AL(e){var t=Aie(e,"string");return ol(t)=="symbol"?t:t+""}function Aie(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(t==="string"?String:Number)(e)}var _ie=Math.PI/180,c4=1e-5,jp=(function(e){function t(){return vie(this,t),jie(this,t,arguments)}return Nie(t,e),bie(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*_ie),c;return l>c4?c=i==="outer"?"start":"end":l<-c4?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({},je(this.props,!1)),{},{fill:"none"},je(d,!1));if(f==="circle")return V.createElement(yp,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(Kae,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=je(this.props,!1),x=je(c,!1),y=cs(cs({},p),{},{fill:"none"},je(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:ze("recharts-polar-angle-axis-tick",dL(c)),key:"tick-".concat(w.coordinate)},Es(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:ze("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):Ee(r)?c=r(i):c=V.createElement(Cs,ps({},i,{className:"recharts-polar-angle-axis-tick-value"}),l),c}}])})(k.PureComponent);bp(jp,"displayName","PolarAngleAxis");bp(jp,"axisType","angleAxis");bp(jp,"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 X0,u4;function Oie(){if(u4)return X0;u4=1;var e=z6(),t=e(Object.getPrototypeOf,Object);return X0=t,X0}var W0,d4;function Tie(){if(d4)return W0;d4=1;var e=Fa(),t=Oie(),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 W0=h,W0}var Eie=Tie();const Cie=st(Eie);var Z0,f4;function kie(){if(f4)return Z0;f4=1;var e=Fa(),t=Ga(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return Z0=r,Z0}var Mie=kie();const Pie=st(Mie);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 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 Rie(e,t){return $ie(e)||Lie(e,t)||zie(e,t)||Die()}function Die(){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 zie(e,t){if(e){if(typeof e=="string")return h4(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 h4(e,t)}}function h4(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 Lie(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 $ie(e){if(Array.isArray(e))return e}function m4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m4(Object(n),!0).forEach(function(r){Bie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bie(e,t,n){return t=Iie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iie(e){var t=qie(e,"string");return Uu(t)=="symbol"?t:t+""}function qie(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x4=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},Uie={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Vie=function(t){var n=p4(p4({},Uie),t),r=k.useRef(),i=k.useState(-1),l=Rie(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=ze("recharts-trapezoid",j);return A?V.createElement(ia,{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(ia,{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({},je(n,!0),{className:O,d:x4(M,R,T,N,E),ref:r})))}):V.createElement("g",null,V.createElement("path",vm({},je(n,!0),{className:O,d:x4(f,h,p,x,y)})))},Hie=["option","shapeType","propTransformer","activeClassName","isActive"];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 Fie(e,t){if(e==null)return{};var n=Gie(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 Gie(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 y4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y4(Object(n),!0).forEach(function(r){Kie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kie(e,t,n){return t=Yie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yie(e){var t=Xie(e,"string");return Vu(t)=="symbol"?t:t+""}function Xie(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 Wie(e,t){return bm(bm({},t),e)}function Zie(e,t){return e==="symbols"}function g4(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return V.createElement(f2,n);case"trapezoid":return V.createElement(Vie,n);case"sector":return V.createElement(mL,n);case"symbols":if(Zie(t))return V.createElement(kS,n);break;default:return null}}function Qie(e){return k.isValidElement(e)?e.props:e}function _L(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Wie:r,l=e.activeClassName,c=l===void 0?"recharts-active-shape":l,d=e.isActive,f=Fie(e,Hie),h;if(k.isValidElement(t))h=k.cloneElement(t,bm(bm({},f),Qie(t)));else if(Ee(t))h=t(f);else if(Cie(t)&&!Pie(t)){var p=i(t,f);h=V.createElement(g4,{shapeType:n,elementProps:p})}else{var x=f;h=V.createElement(g4,{shapeType:n,elementProps:x})}return d?V.createElement(Ze,{className:c},h):h}function wp(e,t){return t!=null&&"trapezoids"in e.props}function Sp(e,t){return t!=null&&"sectors"in e.props}function Hu(e,t){return t!=null&&"points"in e.props}function Jie(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 ese(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function tse(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function nse(e,t){var n;return wp(e,t)?n=Jie:Sp(e,t)?n=ese:Hu(e,t)&&(n=tse),n}function rse(e,t){var n;return wp(e,t)?n="trapezoids":Sp(e,t)?n="sectors":Hu(e,t)&&(n="points"),n}function ase(e,t){if(wp(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(Sp(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 Hu(e,t)?t.payload:{}}function ise(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=rse(n,t),l=ase(n,t),c=r.filter(function(f,h){var p=dd(l,f),x=n.props[i].filter(function(w){var S=nse(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 gh;function ll(e){"@babel/helpers - typeof";return ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ll(e)}function 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 v4(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?v4(Object(n),!0).forEach(function(r){mr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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,TL(r.key),r)}}function ose(e,t,n){return t&&b4(e.prototype,t),n&&b4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lse(e,t,n){return t=jm(t),cse(e,OL()?Reflect.construct(t,n||[],jm(e).constructor):t.apply(e,n))}function cse(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 use(e)}function use(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OL=function(){return!!e})()}function jm(e){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jm(e)}function dse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 mr(e,t,n){return t=TL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TL(e){var t=fse(e,"string");return ll(t)=="symbol"?t:t+""}function fse(e,t){if(ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ya=(function(e){function t(n){var r;return sse(this,t),r=lse(this,t,[n]),mr(r,"pieRef",null),mr(r,"sectorRefs",[]),mr(r,"id",Pl("recharts-pie-")),mr(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Ee(i)&&i()}),mr(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Ee(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return dse(t,e),ose(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.label,d=l.labelLine,f=l.dataKey,h=l.valueKey,p=je(this.props,!1),x=je(c,!1),y=je(d,!1),j=c&&c.offsetRadius||20,w=r.map(function(S,v){var A=(S.startAngle+S.endAngle)/2,O=yt(S.cx,S.cy,S.outerRadius+j,A),_=pt(pt(pt(pt({},p),S),{},{stroke:"none"},x),{},{index:v,textAnchor:t.getTextAnchor(O.x,S.cx)},O),T=pt(pt(pt(pt({},p),S),{},{fill:"none",stroke:S.fill},y),{},{index:v,points:[yt(S.cx,S.cy,S.outerRadius,A),O]}),N=f;return Pe(f)&&Pe(h)?N="value":Pe(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=pt(pt({},h),{},{stroke:d?h.fill:h.stroke,tabIndex:-1});return V.createElement(Ze,zo({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Es(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(_L,zo({option:j,isActive:x,shapeType:"sector"},w)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,l=i.sectors,c=i.isAnimationActive,d=i.animationBegin,f=i.animationDuration,h=i.animationEasing,p=i.animationId,x=this.state,y=x.prevSectors,j=x.prevIsAnimationActive;return V.createElement(ia,{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?Zn(_,"paddingAngle",0):0;if(N){var M=Yn(N.endAngle-N.startAngle,_.endAngle-_.startAngle),R=pt(pt({},_),{},{startAngle:O+E,endAngle:O+M(S)+E});v.push(R),O=R.endAngle}else{var B=_.endAngle,D=_.startAngle,z=Yn(0,B-D),$=z(S),L=pt(pt({},_),{},{startAngle:O+E,endAngle:O+$+E});v.push(L),O=L.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||!dd(c,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,l=i.hide,c=i.sectors,d=i.className,f=i.label,h=i.cx,p=i.cy,x=i.innerRadius,y=i.outerRadius,j=i.isAnimationActive,w=this.state.isAnimationFinished;if(l||!c||!c.length||!he(h)||!he(p)||!he(x)||!he(y))return null;var S=ze("recharts-pie",d);return V.createElement(Ze,{tabIndex:this.props.rootTabIndex,className:S,ref:function(A){r.pieRef=A}},this.renderSectors(),f&&this.renderLabels(c),en.renderCallByParent(this.props,null,!1),(!j||w)&&$a.renderCallByParent(this.props,c,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,l){if(V.isValidElement(r))return V.cloneElement(r,i);if(Ee(r))return r(i);var c=ze("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return V.createElement(dm,zo({},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(Ee(r)&&(c=r(i),V.isValidElement(c)))return c;var d=ze("recharts-pie-label-text",typeof r!="boolean"&&!Ee(r)?r.className:"");return V.createElement(Cs,zo({},i,{alignmentBaseline:"middle",className:d}),c)}}])})(k.PureComponent);gh=Ya;mr(Ya,"displayName","Pie");mr(Ya,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ls.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});mr(Ya,"parseDeltaAngle",function(e,t){var n=wn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});mr(Ya,"getRealPieData",function(e){var t=e.data,n=e.children,r=je(e,!1),i=Qn(n,ip);return t&&t.length?t.map(function(l,c){return pt(pt(pt({payload:l},r),l),i&&i[c]&&i[c].props)}):i&&i.length?i.map(function(l){return pt(pt({},r),l.props)}):[]});mr(Ya,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,l=t.height,c=uL(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}});mr(Ya,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?pt(pt({},t.type.defaultProps),t.props):t.props,i=gh.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=gh.parseCoordinateOfPie(r,n),S=gh.parseDeltaAngle(c,d),v=Math.abs(S),A=h;Pe(h)&&Pe(x)?($r(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),A="value"):Pe(h)&&($r(!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 D=Yt(B,A,0);return R+(he(D)?D:0)},0),E;if(N>0){var M;E=i.map(function(R,B){var D=Yt(R,A,0),z=Yt(R,p,B),$=(he(D)?D:0)/N,L;B?L=M.endAngle+wn(S)*f*(D!==0?1:0):L=c;var K=L+wn(S)*((D!==0?j:0)+$*T),H=(L+K)/2,I=(w.innerRadius+w.outerRadius)/2,F=[{name:z,value:D,payload:R,dataKey:A,type:y}],Z=yt(w.cx,w.cy,I,H);return M=pt(pt(pt({percent:$,cornerRadius:l,name:z,tooltipPayload:F,midAngle:H,middleRadius:I,tooltipPosition:Z},R),w),{},{value:Yt(R,A),startAngle:L,endAngle:K,payload:R,paddingAngle:wn(S)*f}),M})}return pt(pt({},w),{},{sectors:E,data:i})});var Q0,j4;function hse(){if(j4)return Q0;j4=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 Q0=n,Q0}var J0,w4;function EL(){if(w4)return J0;w4=1;var e=Q6(),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 J0=r,J0}var e1,S4;function mse(){if(S4)return e1;S4=1;var e=hse(),t=ap(),n=EL();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 e1=r,e1}var t1,N4;function pse(){if(N4)return t1;N4=1;var e=mse(),t=e();return t1=t,t1}var xse=pse();const wm=st(xse);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 A4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A4(Object(n),!0).forEach(function(r){CL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CL(e,t,n){return t=yse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yse(e){var t=gse(e,"string");return Fu(t)=="symbol"?t:t+""}function gse(e,t){if(Fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vse=["Webkit","Moz","O","ms"],bse=function(t,n){var r=t.replace(/(\w)/,function(l){return l.toUpperCase()}),i=vse.reduce(function(l,c){return _4(_4({},l),{},CL({},c+r,n))},{});return i[t]=n,i};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 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 O4(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 n1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O4(Object(n),!0).forEach(function(r){Gn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T4(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,ML(r.key),r)}}function wse(e,t,n){return t&&T4(e.prototype,t),n&&T4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sse(e,t,n){return t=Nm(t),Nse(e,kL()?Reflect.construct(t,n||[],Nm(e).constructor):t.apply(e,n))}function Nse(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 Ase(e)}function Ase(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 _se(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rw(e,t)}function rw(e,t){return rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rw(e,t)}function Gn(e,t,n){return t=ML(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ML(e){var t=Ose(e,"string");return cl(t)=="symbol"?t:t+""}function Ose(e,t){if(cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Tse=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,l=t.x,c=t.width,d=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,h=ru().domain(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}},E4=function(t){return t.changedTouches&&!!t.changedTouches.length},ul=(function(e){function t(n){var r;return jse(this,t),r=Sse(this,t,[n]),Gn(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Gn(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Gn(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()}),Gn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Gn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Gn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Gn(r,"handleSlideDragStart",function(i){var l=E4(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 _se(t,e),wse(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 Ee(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=E4(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(Gn(Gn({},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(Gn({},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=n1(n1({},je(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 _=ze("recharts-brush",l),T=V.Children.count(c)===1,N=bse("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):Ee(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 n1({prevData:l,prevTravellerWidth:f,prevUpdateId:h,prevX:d,prevWidth:c},l&&l.length?Tse({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);Gn(ul,"displayName","Brush");Gn(ul,"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 r1,C4;function Ese(){if(C4)return r1;C4=1;var e=$S();function t(n,r){var i;return e(n,function(l,c,d){return i=r(l,c,d),!i}),!!i}return r1=t,r1}var a1,k4;function Cse(){if(k4)return a1;k4=1;var e=E6(),t=oa(),n=Ese(),r=Dn(),i=ap();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 a1=l,a1}var kse=Cse();const Mse=st(kse);var ta=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},i1,M4;function Pse(){if(M4)return i1;M4=1;var e=K6();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return i1=t,i1}var s1,P4;function Rse(){if(P4)return s1;P4=1;var e=Pse(),t=F6(),n=oa();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 s1=r,s1}var Dse=Rse();const zse=st(Dse);var o1,R4;function Lse(){if(R4)return o1;R4=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 o1=e,o1}var l1,D4;function $se(){if(D4)return l1;D4=1;var e=$S();function t(n,r){var i=!0;return e(n,function(l,c,d){return i=!!r(l,c,d),i}),i}return l1=t,l1}var c1,z4;function Bse(){if(z4)return c1;z4=1;var e=Lse(),t=$se(),n=oa(),r=Dn(),i=ap();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 c1=l,c1}var Ise=Bse();const PL=st(Ise);var qse=["x","y"];function Gu(e){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}function aw(){return aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aw.apply(this,arguments)}function L4(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 Kc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L4(Object(n),!0).forEach(function(r){Use(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Use(e,t,n){return t=Vse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vse(e){var t=Hse(e,"string");return Gu(t)=="symbol"?t:t+""}function Hse(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 Fse(e,t){if(e==null)return{};var n=Gse(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 Gse(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 Kse(e,t){var n=e.x,r=e.y,i=Fse(e,qse),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 Kc(Kc(Kc(Kc(Kc({},t),i),c?{x:c}:{}),f?{y:f}:{}),{},{height:p,width:y,name:t.name,radius:t.radius})}function $4(e){return V.createElement(_L,aw({shapeType:"rectangle",propTransformer:Kse,activeClassName:"recharts-active-bar"},e))}var Yse=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)||mK(r);return l?t(r,i):(l||Ms(),n)}},Xse=["value","background"],RL;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 Wse(e,t){if(e==null)return{};var n=Zse(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 Zse(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 B4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B4(Object(n),!0).forEach(function(r){Oi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qse(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 Jse(e,t,n){return t&&I4(e.prototype,t),n&&I4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function eoe(e,t,n){return t=_m(t),toe(e,DL()?Reflect.construct(t,n||[],_m(e).constructor):t.apply(e,n))}function toe(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 noe(e)}function noe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DL=function(){return!!e})()}function _m(e){return _m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_m(e)}function roe(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 Oi(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=aoe(e,"string");return dl(t)=="symbol"?t:t+""}function aoe(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 zi=(function(e){function t(){var n;Qse(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=eoe(this,t,[].concat(i)),Oi(n,"state",{isAnimationFinished:!1}),Oi(n,"id",Pl("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 roe(t,e),Jse(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,l=this.props,c=l.shape,d=l.dataKey,f=l.activeIndex,h=l.activeBar,p=je(this.props,!1);return r&&r.map(function(x,y){var j=y===f,w=j?h:c,S=qt(qt(qt({},p),x),{},{isActive:j,option:w,index:y,dataKey:d,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return V.createElement(Ze,Am({className:"recharts-bar-rectangle"},Es(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($4,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(ia,{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 _=Yn(O.x,v.x),T=Yn(O.y,v.y),N=Yn(O.width,v.width),E=Yn(O.height,v.height);return qt(qt({},v),{},{x:_(w),y:T(w),width:N(w),height:E(w)})}if(c==="horizontal"){var M=Yn(0,v.height),R=M(w);return qt(qt({},v),{},{y:v.y+v.height-R,height:R})}var B=Yn(0,v.width),D=B(w);return qt(qt({},v),{},{width:D})});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||!dd(c,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,l=i.data,c=i.dataKey,d=i.activeIndex,f=je(this.props.background,!1);return l.map(function(h,p){h.value;var x=h.background,y=Wse(h,Xse);if(!x)return null;var j=qt(qt(qt(qt(qt({},y),{},{fill:"#eee"},x),f),Es(r.props,h,p)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:c,index:p,className:"recharts-bar-background-rectangle"});return V.createElement($4,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=Qn(p,fd);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=ze("recharts-bar",c),O=d&&d.allowDataOverflow,_=f&&f.allowDataOverflow,T=O||_,N=Pe(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);RL=zi;Oi(zi,"displayName","Bar");Oi(zi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ls.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Oi(zi,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,l=e.xAxis,c=e.yAxis,d=e.xAxisTicks,f=e.yAxisTicks,h=e.stackedData,p=e.dataStartIndex,x=e.displayedData,y=e.offset,j=Ete(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=zte({numericAxis:T}),M=Qn(O,ip),R=x.map(function(B,D){var z,$,L,K,H,I;h?z=Cte(h[p+D],N):(z=Yt(B,A),Array.isArray(z)||(z=[E,z]));var F=Yse(_,RL.defaultProps.minPointSize)(z[1],D);if(w==="horizontal"){var Z,ie=[c.scale(z[0]),c.scale(z[1])],ce=ie[0],q=ie[1];$=m3({axis:l,ticks:d,bandSize:i,offset:j.offset,entry:B,index:D}),L=(Z=q??ce)!==null&&Z!==void 0?Z:void 0,K=j.size;var Y=ce-q;if(H=Number.isNaN(Y)?0:Y,I={x:$,y:c.y,width:K,height:c.height},Math.abs(F)>0&&Math.abs(H)<Math.abs(F)){var ae=wn(H||F)*(Math.abs(F)-Math.abs(H));L-=ae,H+=ae}}else{var fe=[l.scale(z[0]),l.scale(z[1])],ye=fe[0],we=fe[1];if($=ye,L=m3({axis:c,ticks:f,bandSize:i,offset:j.offset,entry:B,index:D}),K=we-ye,H=j.size,I={x:l.x,y:L,width:l.width,height:H},Math.abs(F)>0&&Math.abs(K)<Math.abs(F)){var Ie=wn(K||F)*(Math.abs(F)-Math.abs(K));K+=Ie}}return qt(qt(qt({},B),{},{x:$,y:L,width:K,height:H,value:h?z:z[1],payload:B,background:I},M&&M[D]&&M[D].props),{},{tooltipPayload:[lL(n,B)],tooltipPosition:{x:$+K/2,y:L+H/2}})});return qt({data:R,layout:w},y)});function Ku(e){"@babel/helpers - typeof";return Ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}function ioe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LL(r.key),r)}}function soe(e,t,n){return t&&q4(e.prototype,t),n&&q4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function U4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U4(Object(n),!0).forEach(function(r){Np(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Np(e,t,n){return t=LL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LL(e){var t=ooe(e,"string");return Ku(t)=="symbol"?t:t+""}function ooe(e,t){if(Ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $L=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=!!Kn(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,D,z;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var $=A[1]-A[0],L=1/0,K=S.categoricalDomain.sort(yK);if(K.forEach(function(fe,ye){ye>0&&(L=Math.min((fe||0)-(K[ye-1]||0),L))}),Number.isFinite(L)){var H=L/$,I=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(M=H*I/2),S.padding==="no-gap"){var F=Sn(t.barCategoryGap,H*I),Z=H*I/2;M=Z-F-(Z-F)/I*F}}}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=aL(S,l,y),ce=ie.scale,q=ie.realScaleType;ce.domain(A).range(R),iL(ce);var Y=sL(ce,Mr(Mr({},S),{},{realScaleType:q}));i==="xAxis"?(z=v==="top"&&!T||v==="bottom"&&T,B=r.left,D=x[E]-z*S.height):i==="yAxis"&&(z=v==="left"&&!T||v==="right"&&T,B=x[E]-z*S.width,D=r.top);var ae=Mr(Mr(Mr({},S),Y),{},{realScaleType:q,x:B,y:D,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]+=(z?-1:1)*ae.height:S.hide||(x[E]+=(z?-1:1)*ae.width),Mr(Mr({},j),{},Np({},w,ae))},{})},BL=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)}},loe=function(t){var n=t.x1,r=t.y1,i=t.x2,l=t.y2;return BL({x:n,y:r},{x:i,y:l})},IL=(function(){function e(t){ioe(this,e),this.scale=t}return soe(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)}}])})();Np(IL,"EPS",1e-4);var h2=function(t){var n=Object.keys(t).reduce(function(r,i){return Mr(Mr({},r),{},Np({},i,IL.create(t[i])))},{});return Mr(Mr({},n),{},{apply:function(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=l.bandAware,d=l.position;return zse(i,function(f,h){return n[h].apply(f,{bandAware:c,position:d})})},isInRange:function(i){return PL(i,function(l,c){return n[c].isInRange(l)})}})};function coe(e){return(e%180+180)%180}var uoe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=coe(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)},u1,V4;function doe(){if(V4)return u1;V4=1;var e=oa(),t=sd(),n=np();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 u1=r,u1}var d1,H4;function foe(){if(H4)return d1;H4=1;var e=EL();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return d1=t,d1}var f1,F4;function hoe(){if(F4)return f1;F4=1;var e=I6(),t=oa(),n=foe(),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 f1=i,f1}var h1,G4;function moe(){if(G4)return h1;G4=1;var e=doe(),t=hoe(),n=e(t);return h1=n,h1}var poe=moe();const xoe=st(poe);var yoe=n6();const goe=st(yoe);var voe=goe(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("")}),m2=k.createContext(void 0),p2=k.createContext(void 0),qL=k.createContext(void 0),UL=k.createContext({}),VL=k.createContext(void 0),HL=k.createContext(0),FL=k.createContext(0),K4=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=voe(l);return V.createElement(m2.Provider,{value:r},V.createElement(p2.Provider,{value:i},V.createElement(UL.Provider,{value:l},V.createElement(qL.Provider,{value:p},V.createElement(VL.Provider,{value:c},V.createElement(HL.Provider,{value:h},V.createElement(FL.Provider,{value:f},d)))))))},boe=function(){return k.useContext(VL)},GL=function(t){var n=k.useContext(m2);n==null&&Ms();var r=n[t];return r==null&&Ms(),r},joe=function(){var t=k.useContext(m2);return Ai(t)},woe=function(){var t=k.useContext(p2),n=xoe(t,function(r){return PL(r.domain,Number.isFinite)});return n||Ai(t)},KL=function(t){var n=k.useContext(p2);n==null&&Ms();var r=n[t];return r==null&&Ms(),r},Soe=function(){var t=k.useContext(qL);return t},Noe=function(){return k.useContext(UL)},x2=function(){return k.useContext(FL)},y2=function(){return k.useContext(HL)};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 Aoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _oe(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,XL(r.key),r)}}function Ooe(e,t,n){return t&&_oe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Toe(e,t,n){return t=Om(t),Eoe(e,YL()?Reflect.construct(t,n||[],Om(e).constructor):t.apply(e,n))}function Eoe(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 Coe(e)}function Coe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YL=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&&sw(e,t)}function sw(e,t){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sw(e,t)}function Y4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y4(Object(n),!0).forEach(function(r){g2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g2(e,t,n){return t=XL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XL(e){var t=Moe(e,"string");return fl(t)=="symbol"?t:t+""}function Moe(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)}function Poe(e,t){return Loe(e)||zoe(e,t)||Doe(e,t)||Roe()}function Roe(){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 Doe(e,t){if(e){if(typeof e=="string")return W4(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 W4(e,t)}}function W4(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 zoe(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 Loe(e){if(Array.isArray(e))return e}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)}var $oe=function(t,n){var r;return V.isValidElement(t)?r=V.cloneElement(t,n):Ee(t)?r=t(n):r=V.createElement("line",ow({},n,{className:"recharts-reference-line-line"})),r},Boe=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(ta(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(ta(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 ta(h,"discard")&&Mse(N,function(E){return!t.isInRange(E)})?null:N}return null};function Ioe(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=boe(),p=GL(i),x=KL(l),y=Soe();if(!h||!y)return null;$r(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var j=h2({x:p.scale,y:x.scale}),w=Xt(t),S=Xt(n),v=r&&r.length===2,A=Boe(j,w,S,v,y,e.position,p.orientation,x.orientation,e);if(!A)return null;var O=Poe(A,2),_=O[0],T=_.x,N=_.y,E=O[1],M=E.x,R=E.y,B=ta(e,"hidden")?"url(#".concat(h,")"):void 0,D=X4(X4({clipPath:B},je(e,!0)),{},{x1:T,y1:N,x2:M,y2:R});return V.createElement(Ze,{className:ze("recharts-reference-line",d)},$oe(c,D),en.renderCallByParent(e,loe({x1:T,y1:N,x2:M,y2:R})))}var v2=(function(e){function t(){return Aoe(this,t),Toe(this,t,arguments)}return koe(t,e),Ooe(t,[{key:"render",value:function(){return V.createElement(Ioe,this.props)}}])})(V.Component);g2(v2,"displayName","ReferenceLine");g2(v2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function lw(){return lw=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},lw.apply(this,arguments)}function hl(e){"@babel/helpers - typeof";return hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hl(e)}function 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 Q4(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){Ap(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 qoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uoe(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 Voe(e,t,n){return t&&Uoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hoe(e,t,n){return t=Tm(t),Foe(e,WL()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function Foe(e,t){if(t&&(hl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Goe(e)}function Goe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WL=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(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&&cw(e,t)}function cw(e,t){return cw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cw(e,t)}function Ap(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=Yoe(e,"string");return hl(t)=="symbol"?t:t+""}function Yoe(e,t){if(hl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xoe=function(t){var n=t.x,r=t.y,i=t.xAxis,l=t.yAxis,c=h2({x:i.scale,y:l.scale}),d=c.apply({x:n,y:r},{bandAware:!0});return ta(t,"discard")&&!c.isInRange(d)?null:d},_p=(function(e){function t(){return qoe(this,t),Hoe(this,t,arguments)}return Koe(t,e),Voe(t,[{key:"render",value:function(){var r=this.props,i=r.x,l=r.y,c=r.r,d=r.alwaysShow,f=r.clipPathId,h=Xt(i),p=Xt(l);if($r(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!p)return null;var x=Xoe(this.props);if(!x)return null;var y=x.x,j=x.y,w=this.props,S=w.shape,v=w.className,A=ta(this.props,"hidden")?"url(#".concat(f,")"):void 0,O=Q4(Q4({clipPath:A},je(this.props,!0)),{},{cx:y,cy:j});return V.createElement(Ze,{className:ze("recharts-reference-dot",v)},t.renderDot(S,O),en.renderCallByParent(this.props,{x:y-c,y:j-c,width:2*c,height:2*c}))}}])})(V.Component);Ap(_p,"displayName","ReferenceDot");Ap(_p,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Ap(_p,"renderDot",function(e,t){var n;return V.isValidElement(e)?n=V.cloneElement(e,t):Ee(e)?n=e(t):n=V.createElement(yp,lw({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function uw(){return uw=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},uw.apply(this,arguments)}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 J4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J4(Object(n),!0).forEach(function(r){Op(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Woe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zoe(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,JL(r.key),r)}}function Qoe(e,t,n){return t&&Zoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Joe(e,t,n){return t=Em(t),ele(e,QL()?Reflect.construct(t,n||[],Em(e).constructor):t.apply(e,n))}function ele(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 tle(e)}function tle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QL=function(){return!!e})()}function Em(e){return Em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Em(e)}function nle(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 Op(e,t,n){return t=JL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JL(e){var t=rle(e,"string");return ml(t)=="symbol"?t:t+""}function rle(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 ale=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=h2({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 ta(l,"discard")&&(!y.isInRange(j)||!y.isInRange(w))?null:BL(j,w)},Tp=(function(e){function t(){return Woe(this,t),Joe(this,t,arguments)}return nle(t,e),Qoe(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;$r(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=Xt(i),y=Xt(l),j=Xt(c),w=Xt(d),S=this.props.shape;if(!x&&!y&&!j&&!w&&!S)return null;var v=ale(x,y,j,w,this.props);if(!v&&!S)return null;var A=ta(this.props,"hidden")?"url(#".concat(p,")"):void 0;return V.createElement(Ze,{className:ze("recharts-reference-area",f)},t.renderRect(S,eR(eR({clipPath:A},je(this.props,!0)),v)),en.renderCallByParent(this.props,v))}}])})(V.Component);Op(Tp,"displayName","ReferenceArea");Op(Tp,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Op(Tp,"renderRect",function(e,t){var n;return V.isValidElement(e)?n=V.cloneElement(e,t):Ee(e)?n=e(t):n=V.createElement(f2,uw({},t,{className:"recharts-reference-area-rect"})),n});function e8(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 ile(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return uoe(r,n)}function sle(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 Cm(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 ole(e,t){return e8(e,t+1)}function lle(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:e8(r,h)};var S=f,v,A=function(){return v===void 0&&(v=n(w,S)),v},O=w.coordinate,_=f===0||Cm(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 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 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 xn(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){cle(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 cle(e,t,n){return t=ule(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ule(e){var t=dle(e,"string");return Yu(t)=="symbol"?t:t+""}function dle(e,t){if(Yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fle(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=Cm(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 hle(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=Cm(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=Cm(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 b2(e,t,n){var r=e.tick,i=e.ticks,l=e.viewBox,c=e.minTickGap,d=e.orientation,f=e.interval,h=e.tickFormatter,p=e.unit,x=e.angle;if(!i||!i.length||!r)return[];if(he(f)||Ls.isSsr)return ole(i,typeof f=="number"&&he(f)?f:0);var y=[],j=d==="top"||d==="bottom"?"width":"height",w=p&&j==="width"?nu(p,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(_,T){var N=Ee(h)?h(_.value,T):_.value;return j==="width"?ile(nu(N,{fontSize:t,letterSpacing:n}),w,x):nu(N,{fontSize:t,letterSpacing:n})[j]},v=i.length>=2?wn(i[1].coordinate-i[0].coordinate):1,A=sle(l,v,j);return f==="equidistantPreserveStart"?lle(v,A,S,i,c):(f==="preserveStart"||f==="preserveStartEnd"?y=hle(v,A,S,i,c,f==="preserveStartEnd"):y=fle(v,A,S,i,c),y.filter(function(O){return O.isShow}))}var mle=["viewBox"],ple=["viewBox"],xle=["ticks"];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 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 nR(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?nR(Object(n),!0).forEach(function(r){j2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m1(e,t){if(e==null)return{};var n=yle(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 yle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rR(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,n8(r.key),r)}}function vle(e,t,n){return t&&rR(e.prototype,t),n&&rR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ble(e,t,n){return t=km(t),jle(e,t8()?Reflect.construct(t,n||[],km(e).constructor):t.apply(e,n))}function jle(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 wle(e)}function wle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t8=function(){return!!e})()}function km(e){return km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},km(e)}function Sle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fw(e,t)}function fw(e,t){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fw(e,t)}function j2(e,t,n){return t=n8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n8(e){var t=Nle(e,"string");return pl(t)=="symbol"?t:t+""}function Nle(e,t){if(pl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $l=(function(e){function t(n){var r;return gle(this,t),r=ble(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Sle(t,e),vle(t,[{key:"shouldComponentUpdate",value:function(r,i){var l=r.viewBox,c=m1(r,mle),d=this.props,f=d.viewBox,h=m1(d,ple);return!Vo(l,f)||!Vo(c,h)||!Vo(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({},je(this.props,!1)),je(p,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var y=+(f==="top"&&!h||f==="bottom"&&h);x=Ft(Ft({},x),{},{x1:i,y1:l+y*d,x2:i+c,y2:l+y*d})}else{var j=+(f==="left"&&!h||f==="right"&&h);x=Ft(Ft({},x),{},{x1:i+j*c,y1:l,x2:i+j*c,y2:l+d})}return V.createElement("line",Lo({},x,{className:ze("recharts-cartesian-axis-line",Zn(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=b2(Ft(Ft({},this.props),{},{ticks:r}),i,l),w=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),v=je(this.props,!1),A=je(p,!1),O=Ft(Ft({},v),{},{fill:"none"},je(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,Lo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},Es(c.props,T,N)),f&&V.createElement("line",Lo({},O,M,{className:ze("recharts-cartesian-axis-tick-line",Zn(f,"className"))})),p&&t.renderTickItem(p,B,"".concat(Ee(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=m1(x,xle),w=y;return Ee(f)&&(w=y&&y.length>0?f(this.props):f(j)),c<=0||d<=0||!w||!w.length?null:V.createElement(Ze,{className:ze("recharts-cartesian-axis",h),ref:function(v){r.layerReference=v}},l&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),en.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,l){var c,d=ze(i.className,"recharts-cartesian-axis-tick-value");return V.isValidElement(r)?c=V.cloneElement(r,Ft(Ft({},i),{},{className:d})):Ee(r)?c=r(Ft(Ft({},i),{},{className:d})):c=V.createElement(Cs,Lo({},i,{className:"recharts-cartesian-axis-tick-value"}),l),c}}])})(k.Component);j2($l,"displayName","CartesianAxis");j2($l,"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 Ale=["x1","y1","x2","y2","key"],_le=["offset"];function Ps(e){"@babel/helpers - typeof";return Ps=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},Ps(e)}function aR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aR(Object(n),!0).forEach(function(r){Ole(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ole(e,t,n){return t=Tle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tle(e){var t=Ele(e,"string");return Ps(t)=="symbol"?t:t+""}function Ele(e,t){if(Ps(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ps(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 iR(e,t){if(e==null)return{};var n=Cle(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 Cle(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 r8(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ee(e))n=e(t);else{var r=t.x1,i=t.y1,l=t.x2,c=t.y2,d=t.key,f=iR(t,Ale),h=je(f,!1);h.offset;var p=iR(h,_le);n=V.createElement("line",js({},p,{x1:r,y1:i,x2:l,y2:c,fill:"none",key:d}))}return n}function Mle(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 r8(i,h)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Ple(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 r8(i,h)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function Rle(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 Dle(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 zle=function(t,n){var r=t.xAxis,i=t.width,l=t.height,c=t.offset;return rL(b2(yn(yn(yn({},$l.defaultProps),r),{},{ticks:Pa(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.left,c.left+c.width,n)},Lle=function(t,n){var r=t.yAxis,i=t.width,l=t.height,c=t.offset;return rL(b2(yn(yn(yn({},$l.defaultProps),r),{},{ticks:Pa(r,!0),viewBox:{x:0,y:0,width:i,height:l}})),c.top,c.top+c.height,n)},To={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function hw(e){var t,n,r,i,l,c,d=x2(),f=y2(),h=Noe(),p=yn(yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:To.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:To.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:To.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:To.horizontalFill,vertical:(l=e.vertical)!==null&&l!==void 0?l:To.vertical,verticalFill:(c=e.verticalFill)!==null&&c!==void 0?c:To.verticalFill,x:he(e.x)?e.x:h.left,y:he(e.y)?e.y:h.top,width:he(e.width)?e.width:h.width,height:he(e.height)?e.height:h.height}),x=p.x,y=p.y,j=p.width,w=p.height,S=p.syncWithTicks,v=p.horizontalValues,A=p.verticalValues,O=joe(),_=woe();if(!he(j)||j<=0||!he(w)||w<=0||!he(x)||x!==+x||!he(y)||y!==+y)return null;var T=p.verticalCoordinatesGenerator||zle,N=p.horizontalCoordinatesGenerator||Lle,E=p.horizontalPoints,M=p.verticalPoints;if((!E||!E.length)&&Ee(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);$r(Array.isArray(B),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ps(B),"]")),Array.isArray(B)&&(E=B)}if((!M||!M.length)&&Ee(T)){var D=A&&A.length,z=T({xAxis:O?yn(yn({},O),{},{ticks:D?A:O.ticks}):void 0,width:d,height:f,offset:h},D?!0:S);$r(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ps(z),"]")),Array.isArray(z)&&(M=z)}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(Mle,js({},p,{offset:h,horizontalPoints:E,xAxis:O,yAxis:_})),V.createElement(Ple,js({},p,{offset:h,verticalPoints:M,xAxis:O,yAxis:_})),V.createElement(Rle,js({},p,{horizontalPoints:E})),V.createElement(Dle,js({},p,{verticalPoints:M})))}hw.displayName="CartesianGrid";var $le=["type","layout","connectNulls","ref"],Ble=["key"];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 sR(e,t){if(e==null)return{};var n=Ile(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 Ile(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lu(){return lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lu.apply(this,arguments)}function oR(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 Fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(n),!0).forEach(function(r){Pr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eo(e){return Hle(e)||Vle(e)||Ule(e)||qle()}function qle(){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 Ule(e,t){if(e){if(typeof e=="string")return mw(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 mw(e,t)}}function Vle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hle(e){if(Array.isArray(e))return mw(e)}function mw(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 Fle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lR(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,i8(r.key),r)}}function Gle(e,t,n){return t&&lR(e.prototype,t),n&&lR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kle(e,t,n){return t=Mm(t),Yle(e,a8()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}function Yle(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 Xle(e)}function Xle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a8=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mm(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&&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 Pr(e,t,n){return t=i8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i8(e){var t=Zle(e,"string");return xl(t)=="symbol"?t:t+""}function Zle(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 hd=(function(e){function t(){var n;Fle(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=Kle(this,t,[].concat(i)),Pr(n,"state",{isAnimationFinished:!0,totalLength:0}),Pr(n,"generateSimpleStrokeDasharray",function(c,d){return"".concat(d,"px ").concat(c-d,"px")}),Pr(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(Eo(f.slice(0,w)),[x-S]);break}var v=j.length%2===0?[0,y]:[y];return[].concat(Eo(t.repeat(f,p)),Eo(j),v).map(function(A){return"".concat(A,"px")}).join(", ")}),Pr(n,"id",Pl("recharts-line-")),Pr(n,"pathRef",function(c){n.mainCurve=c}),Pr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Pr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Wle(t,e),Gle(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=Qn(p,fd);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=je(this.props,!1),y=je(f,!0),j=h.map(function(S,v){var A=Fn(Fn(Fn({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,lu({className:"recharts-line-dots",key:"dots"},w),j)}},{key:"renderCurveStatically",value:function(r,i,l,c){var d=this.props,f=d.type,h=d.layout,p=d.connectNulls;d.ref;var x=sR(d,$le),y=Fn(Fn(Fn({},je(x,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(l,")"):null,points:r},c),{},{type:f,layout:h,connectNulls:p});return V.createElement(dm,lu({},y,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var l=this,c=this.props,d=c.points,f=c.strokeDasharray,h=c.isAnimationActive,p=c.animationBegin,x=c.animationDuration,y=c.animationEasing,j=c.animationId,w=c.animateNewValues,S=c.width,v=c.height,A=this.state,O=A.prevPoints,_=A.totalLength;return V.createElement(ia,{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 K=Math.floor(L*E);if(O[K]){var H=O[K],I=Yn(H.x,$.x),F=Yn(H.y,$.y);return Fn(Fn({},$),{},{x:I(N),y:F(N)})}if(w){var Z=Yn(S*2,$.x),ie=Yn(v/2,$.y);return Fn(Fn({},$),{},{x:Z(N),y:ie(N)})}return Fn(Fn({},$),{},{x:$.x,y:$.y})});return l.renderCurveStatically(M,r,i)}var R=Yn(0,_),B=R(N),D;if(f){var z="".concat(f).split(/[,\s]+/gim).map(function($){return parseFloat($)});D=l.getStrokeDasharray(B,_,z)}else D=l.generateSimpleStrokeDasharray(_,B);return l.renderCurveStatically(d,r,i,{strokeDasharray:D})})}},{key:"renderCurve",value:function(r,i){var l=this.props,c=l.points,d=l.isAnimationActive,f=this.state,h=f.prevPoints,p=f.totalLength;return d&&c&&c.length&&(!h&&p>0||!dd(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,_=ze("recharts-line",f),T=h&&h.allowDataOverflow,N=p&&p.allowDataOverflow,E=T||N,M=Pe(v)?this.id:v,R=(r=je(c,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},B=R.r,D=B===void 0?3:B,z=R.strokeWidth,$=z===void 0?2:z,L=_K(c)?c:{},K=L.clipDot,H=K===void 0?!0:K,I=D*2+$;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(Eo(r),[0]):r,c=[],d=0;d<i;++d)c=[].concat(Eo(c),Eo(l));return c}},{key:"renderDotItem",value:function(r,i){var l;if(V.isValidElement(r))l=V.cloneElement(r,i);else if(Ee(r))l=r(i);else{var c=i.key,d=sR(i,Ble),f=ze("recharts-line-dot",typeof r!="boolean"?r.className:"");l=V.createElement(yp,lu({key:c},d,{className:f}))}return l}}])})(k.PureComponent);Pr(hd,"displayName","Line");Pr(hd,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ls.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Pr(hd,"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:h3({axis:n,ticks:i,bandSize:d,entry:y,index:j}),y:Pe(w)?null:r.scale(w),value:w,payload:y}:{x:Pe(w)?null:n.scale(w),y:h3({axis:r,ticks:l,bandSize:d,entry:y,index:j}),value:w,payload:y}});return Fn({points:x,layout:p},h)});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 Qle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jle(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,l8(r.key),r)}}function ece(e,t,n){return t&&Jle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tce(e,t,n){return t=Pm(t),nce(e,s8()?Reflect.construct(t,n||[],Pm(e).constructor):t.apply(e,n))}function nce(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 rce(e)}function rce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s8=function(){return!!e})()}function Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pm(e)}function ace(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&&xw(e,t)}function xw(e,t){return xw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xw(e,t)}function o8(e,t,n){return t=l8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l8(e){var t=ice(e,"string");return yl(t)=="symbol"?t:t+""}function ice(e,t){if(yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function yw(){return yw=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},yw.apply(this,arguments)}function sce(e){var t=e.xAxisId,n=x2(),r=y2(),i=GL(t);return i==null?null:k.createElement($l,yw({},i,{className:ze("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(c){return Pa(c,!0)}}))}var gl=(function(e){function t(){return Qle(this,t),tce(this,t,arguments)}return ace(t,e),ece(t,[{key:"render",value:function(){return k.createElement(sce,this.props)}}])})(k.Component);o8(gl,"displayName","XAxis");o8(gl,"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 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 oce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lce(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 cce(e,t,n){return t&&lce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uce(e,t,n){return t=Rm(t),dce(e,c8()?Reflect.construct(t,n||[],Rm(e).constructor):t.apply(e,n))}function dce(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 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 c8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c8=function(){return!!e})()}function Rm(e){return Rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rm(e)}function hce(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&&gw(e,t)}function gw(e,t){return gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gw(e,t)}function u8(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=mce(e,"string");return vl(t)=="symbol"?t:t+""}function mce(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)}function vw(){return vw=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},vw.apply(this,arguments)}var pce=function(t){var n=t.yAxisId,r=x2(),i=y2(),l=KL(n);return l==null?null:k.createElement($l,vw({},l,{className:ze("recharts-".concat(l.axisType," ").concat(l.axisType),l.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(d){return Pa(d,!0)}}))},bl=(function(e){function t(){return oce(this,t),uce(this,t,arguments)}return hce(t,e),cce(t,[{key:"render",value:function(){return k.createElement(pce,this.props)}}])})(k.Component);u8(bl,"displayName","YAxis");u8(bl,"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 cR(e){return vce(e)||gce(e)||yce(e)||xce()}function xce(){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 yce(e,t){if(e){if(typeof e=="string")return bw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bw(e,t)}}function gce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vce(e){if(Array.isArray(e))return bw(e)}function bw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jw=function(t,n,r,i,l){var c=Qn(t,v2),d=Qn(t,_p),f=[].concat(cR(c),cR(d)),h=Qn(t,Tp),p="".concat(i,"Id"),x=i[0],y=n;if(f.length&&(y=f.reduce(function(S,v){if(v.props[p]===r&&ta(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&&ta(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},p1={exports:{}},uR;function bce(){return uR||(uR=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})(p1)),p1.exports}var jce=bce();const wce=st(jce);var x1=new wce,y1="recharts.syncMouseEvents";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 Sce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f8(r.key),r)}}function Ace(e,t,n){return t&&Nce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g1(e,t,n){return t=f8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f8(e){var t=_ce(e,"string");return Xu(t)=="symbol"?t:t+""}function _ce(e,t){if(Xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Oce=(function(){function e(){Sce(this,e),g1(this,"activeIndex",0),g1(this,"coordinateList",[]),g1(this,"layout","horizontal")}return Ace(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 Tce(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 Ece(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 h8(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 Cce(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 h8(t);return[{x:r,y:i},{x:l,y:c}]}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 dR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ah(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dR(Object(n),!0).forEach(function(r){kce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kce(e,t,n){return t=Mce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mce(e){var t=Pce(e,"string");return Wu(t)=="symbol"?t:t+""}function Pce(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)}function Rce(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=nie;else if(y==="BarChart")w=Ece(x,c,f,p),S=f2;else if(x==="radial"){var v=h8(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=mL}else w={points:Cce(x,c,f)},S=dm;var E=ah(ah(ah(ah({stroke:"#ccc",pointerEvents:"none"},f),w),je(j,!1)),{},{payload:d,payloadIndex:h,className:ze("recharts-tooltip-cursor",j.className)});return k.isValidElement(j)?k.cloneElement(j,E):k.createElement(S,E)}var Dce=["item"],zce=["children","className","width","height","style","compact","title","desc"];function jl(e){"@babel/helpers - typeof";return jl=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},jl(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 fR(e,t){return Bce(e)||$ce(e,t)||p8(e,t)||Lce()}function Lce(){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 $ce(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 Bce(e){if(Array.isArray(e))return e}function hR(e,t){if(e==null)return{};var n=Ice(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 Ice(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 qce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x8(r.key),r)}}function Vce(e,t,n){return t&&Uce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hce(e,t,n){return t=Dm(t),Fce(e,m8()?Reflect.construct(t,n||[],Dm(e).constructor):t.apply(e,n))}function Fce(e,t){if(t&&(jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gce(e)}function Gce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m8=function(){return!!e})()}function Dm(e){return Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dm(e)}function Kce(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&&ww(e,t)}function ww(e,t){return ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ww(e,t)}function wl(e){return Wce(e)||Xce(e)||p8(e)||Yce()}function Yce(){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 p8(e,t){if(e){if(typeof e=="string")return Sw(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 Sw(e,t)}}function Xce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wce(e){if(Array.isArray(e))return Sw(e)}function Sw(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 mR(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?mR(Object(n),!0).forEach(function(r){Ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(e,t,n){return t=x8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x8(e){var t=Zce(e,"string");return jl(t)=="symbol"?t:t+""}function Zce(e,t){if(jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qce={xAxis:["bottom","top"],yAxis:["left","right"]},Jce={width:"100%",height:"100%"},y8={x:0,y:0};function ih(e){return e}var eue=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},tue=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 y8},Ep=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(wl(d),wl(h)):d},[]);return c.length>0?c:t&&t.length&&he(i)&&he(l)?t.slice(i,l+1):[]};function g8(e){return e==="number"?[0,"auto"]:void 0}var Nw=function(t,n,r,i){var l=t.graphicalItems,c=t.tooltipAxis,d=Ep(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(wl(f),[lL(h,y)]):f},[])},pR=function(t,n,r,i){var l=i||{x:t.chartX,y:t.chartY},c=eue(l,r),d=t.orderedTooltipTicks,f=t.tooltipAxis,h=t.tooltipTicks,p=Ste(c,d,h,f);if(p>=0&&h){var x=h[p]&&h[p].value,y=Nw(t,n,p,x),j=tue(r,d,p,l);return{activeTooltipIndex:p,activeLabel:x,activePayload:y,activeCoordinate:j}}return null},nue=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=nL(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 D=Ep(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}),z=D.length,$,L,K;Tce(A.domain,T,O)&&($=Lj(A.domain,null,T),j&&(O==="number"||E!=="auto")&&(K=au(D,_,"category")));var H=g8(O);if(!$||$.length===0){var I,F=(I=A.domain)!==null&&I!==void 0?I:H;if(_){if($=au(D,_,O),O==="category"&&j){var Z=xK($);N&&Z?(L=$,$=wm(0,z)):N||($=y3(F,$,S).reduce(function(Y,ae){return Y.indexOf(ae)>=0?Y:[].concat(wl(Y),[ae])},[]))}else if(O==="category")N?$=$.filter(function(Y){return Y!==""&&!Pe(Y)}):$=y3(F,$,S).reduce(function(Y,ae){return Y.indexOf(ae)>=0||ae===""||Pe(ae)?Y:[].concat(wl(Y),[ae])},[]);else if(O==="number"){var ie=Tte(D,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],we="hide"in Y.props?Y.props.hide:(fe=Y.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return ye===B&&(R||!we)}),_,l,p);ie&&($=ie)}j&&(O==="number"||E!=="auto")&&(K=au(D,_,"category"))}else j?$=wm(0,z):d&&d[B]&&d[B].hasStack&&O==="number"?$=y==="expand"?[0,1]:oL(d[B].stackGroups,f,h):$=tL(D,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")$=jw(x,$,B,l,M),F&&($=Lj(F,$,T));else if(O==="category"&&F){var ce=F,q=$.every(function(Y){return ce.indexOf(Y)>=0});q&&($=ce)}}return re(re({},w),{},Ne({},B,re(re({},A),{},{axisType:l,domain:$,categoricalDomain:K,duplicateDomain:L,originalDomain:(v=A.domain)!==null&&v!==void 0?v:H,isCategorical:j,layout:p})))},{})},rue=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=Ep(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:h}),j=y.length,w=nL(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=g8("number");if(!v[_]){S++;var N;return w?N=wm(0,j):d&&d[_]&&d[_].hasStack?(N=oL(d[_].stackGroups,f,h),N=jw(x,N,_,l)):(N=Lj(T,tL(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],D="hide"in E.props?E.props.hide:(R=E.type.defaultProps)===null||R===void 0?void 0:R.hide;return B===_&&!D}),"number",p),i.defaultProps.allowDataOverflow),N=jw(x,N,_,l)),re(re({},v),{},Ne({},_,re(re({axisType:l},i.defaultProps),{},{hide:!0,orientation:Zn(Qce,"".concat(l,".").concat(S%2),null),domain:N,originalDomain:T,isCategorical:w,layout:p})))}return v},{})},aue=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=Qn(p,l),j={};return y&&y.length?j=nue(t,{axes:y,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h}):c&&c.length&&(j=rue(t,{Axis:l,graphicalItems:c,axisType:i,axisIdKey:x,stackGroups:d,dataStartIndex:f,dataEndIndex:h})),j},iue=function(t){var n=Ai(t),r=Pa(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:BS(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:lm(n,r)}},xR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Kn(n,ul),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}},sue=function(t){return!t||!t.length?!1:t.some(function(n){var r=za(n&&n.type);return r&&r.indexOf("Bar")>=0})},yR=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"}},oue=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=Kn(x,ul),w=Kn(x,Ho),S=Object.keys(f).reduce(function(N,E){var M=f[E],R=M.orientation;return!M.mirror&&!M.hide?re(re({},N),{},Ne({},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),{},Ne({},R,Zn(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||ul.defaultProps.height),w&&n&&(A=_te(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)})},lue=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},w2=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,D=A.layout,z=A.barGap,$=A.barCategoryGap,L=A.maxBarSize,K=yR(D),H=K.numericAxisName,I=K.cateAxisName,F=sue(_),Z=[];return _.forEach(function(ie,ce){var q=Ep(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")],we=Y["".concat(I,"Id")],Ie={},et=f.reduce(function(Ar,la){var Bl=O["".concat(la.axisType,"Map")],mn=Y["".concat(la.axisType,"Id")];Bl&&Bl[mn]||la.axisType==="zAxis"||Ms();var md=Bl[mn];return re(re({},Ar),{},Ne(Ne({},la.axisType,md),"".concat(la.axisType,"Ticks"),Pa(md)))},Ie),de=et[I],Oe=et["".concat(I,"Ticks")],ke=T&&T[ye]&&T[ye].hasStack&&Lte(ie,T[ye].stackGroups),ue=za(ie.type).indexOf("Bar")>=0,gt=lm(de,Oe),Le=[],Tt=F&&Nte({barSize:B,stackGroups:T,totalSize:lue(et,I)});if(ue){var Et,hn,Nr=Pe(fe)?L:fe,Vr=(Et=(hn=lm(de,Oe,!0))!==null&&hn!==void 0?hn:Nr)!==null&&Et!==void 0?Et:0;Le=Ate({barGap:z,barCategoryGap:$,bandSize:Vr!==gt?Vr:gt,sizeList:Tt[we],maxBarSize:Nr}),Vr!==gt&&(Le=Le.map(function(Ar){return re(re({},Ar),{},{position:re(re({},Ar.position),{},{offset:Ar.position.offset-Vr/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:Le,offset:N,stackedData:ke,layout:D,dataStartIndex:M,dataEndIndex:R}))),{},Ne(Ne(Ne({key:ie.key||"item-".concat(ce)},H,et[H]),I,et[I]),"animationId",E)),childIndex:EK(ie,A.children),item:ie})}),Z},j=function(A,O){var _=A.props,T=A.dataStartIndex,N=A.dataEndIndex,E=A.updateId;if(!kC({props:_}))return null;var M=_.children,R=_.layout,B=_.stackOffset,D=_.data,z=_.reverseStackOrder,$=yR(R),L=$.numericAxisName,K=$.cateAxisName,H=Qn(M,r),I=Dte(D,H,"".concat(L,"Id"),"".concat(K,"Id"),B,z),F=f.reduce(function(Y,ae){var fe="".concat(ae.axisType,"Map");return re(re({},Y),{},Ne({},fe,aue(_,re(re({},ae),{},{graphicalItems:H,stackGroups:ae.axisType===L&&I,dataStartIndex:T,dataEndIndex:N}))))},{}),Z=oue(re(re({},F),{},{props:_,graphicalItems:H}),O==null?void 0:O.legendBBox);Object.keys(F).forEach(function(Y){F[Y]=p(_,F[Y],Z,Y.replace("Map",""),n)});var ie=F["".concat(K,"Map")],ce=iue(ie),q=y(_,re(re({},F),{},{dataStartIndex:T,dataEndIndex:N,updateId:E,graphicalItems:H,stackGroups:I,offset:Z}));return re(re({formattedGraphicalItems:q,graphicalItems:H,offset:Z,stackGroups:I},ce),F)},w=(function(v){function A(O){var _,T,N;return qce(this,A),N=Hce(this,A,[O]),Ne(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(N,"accessibilityManager",new Oce),Ne(N,"handleLegendBBoxUpdate",function(E){if(E){var M=N.state,R=M.dataStartIndex,B=M.dataEndIndex,D=M.updateId;N.setState(re({legendBBox:E},j({props:N.props,dataStartIndex:R,dataEndIndex:B,updateId:D},re(re({},N.state),{},{legendBBox:E}))))}}),Ne(N,"handleReceiveSyncEvent",function(E,M,R){if(N.props.syncId===E){if(R===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(M)}}),Ne(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})}}),Ne(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;Ee(B)&&B(R,E)}}),Ne(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;Ee(B)&&B(R,E)}),Ne(N,"handleItemMouseEnter",function(E){N.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Ne(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),Ne(N,"handleMouseMove",function(E){E.persist(),N.throttleTriggeredAfterMouseMove(E)}),Ne(N,"handleMouseLeave",function(E){N.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};N.setState(M),N.triggerSyncEvent(M);var R=N.props.onMouseLeave;Ee(R)&&R(M,E)}),Ne(N,"handleOuterEvent",function(E){var M=TK(E),R=Zn(N.props,"".concat(M));if(M&&Ee(R)){var B,D;/.*touch.*/i.test(M)?D=N.getMouseInfo(E.changedTouches[0]):D=N.getMouseInfo(E),R((B=D)!==null&&B!==void 0?B:{},E)}}),Ne(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;Ee(B)&&B(R,E)}}),Ne(N,"handleMouseDown",function(E){var M=N.props.onMouseDown;if(Ee(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ne(N,"handleMouseUp",function(E){var M=N.props.onMouseUp;if(Ee(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ne(N,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Ne(N,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseDown(E.changedTouches[0])}),Ne(N,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&N.handleMouseUp(E.changedTouches[0])}),Ne(N,"handleDoubleClick",function(E){var M=N.props.onDoubleClick;if(Ee(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ne(N,"handleContextMenu",function(E){var M=N.props.onContextMenu;if(Ee(M)){var R=N.getMouseInfo(E);M(R,E)}}),Ne(N,"triggerSyncEvent",function(E){N.props.syncId!==void 0&&x1.emit(y1,N.props.syncId,E,N.eventEmitterSymbol)}),Ne(N,"applySyncEvent",function(E){var M=N.props,R=M.layout,B=M.syncMethod,D=N.state.updateId,z=E.dataStartIndex,$=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)N.setState(re({dataStartIndex:z,dataEndIndex:$},j({props:N.props,dataStartIndex:z,dataEndIndex:$,updateId:D},N.state)));else if(E.activeTooltipIndex!==void 0){var L=E.chartX,K=E.chartY,H=E.activeTooltipIndex,I=N.state,F=I.offset,Z=I.tooltipTicks;if(!F)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({},F),{},{x:F.left,y:F.top}),q=Math.min(L,ce.x+ce.width),Y=Math.min(K,ce.y+ce.height),ae=Z[H]&&Z[H].value,fe=Nw(N.state,N.props.data,H),ye=Z[H]?{x:R==="horizontal"?Z[H].coordinate:q,y:R==="horizontal"?Y:Z[H].coordinate}:y8;N.setState(re(re({},E),{},{activeLabel:ae,activeCoordinate:ye,activePayload:fe,activeTooltipIndex:H}))}else N.setState(E)}),Ne(N,"renderCursor",function(E){var M,R=N.state,B=R.isTooltipActive,D=R.activeCoordinate,z=R.activePayload,$=R.offset,L=R.activeTooltipIndex,K=R.tooltipAxisBandSize,H=N.getTooltipEventType(),I=(M=E.props.active)!==null&&M!==void 0?M:B,F=N.props.layout,Z=E.key||"_recharts-cursor";return V.createElement(Rce,{key:Z,activeCoordinate:D,activePayload:z,activeTooltipIndex:L,chartName:n,element:E,isActive:I,layout:F,offset:$,tooltipAxisBandSize:K,tooltipEventType:H})}),Ne(N,"renderPolarAxis",function(E,M,R){var B=Zn(E,"type.axisType"),D=Zn(N.state,"".concat(B,"Map")),z=E.type.defaultProps,$=z!==void 0?re(re({},z),E.props):E.props,L=D&&D[$["".concat(B,"Id")]];return k.cloneElement(E,re(re({},L),{},{className:ze(B,L.className),key:E.key||"".concat(M,"-").concat(R),ticks:Pa(L,!0)}))}),Ne(N,"renderPolarGrid",function(E){var M=E.props,R=M.radialLines,B=M.polarAngles,D=M.polarRadius,z=N.state,$=z.radiusAxisMap,L=z.angleAxisMap,K=Ai($),H=Ai(L),I=H.cx,F=H.cy,Z=H.innerRadius,ie=H.outerRadius;return k.cloneElement(E,{polarAngles:Array.isArray(B)?B:Pa(H,!0).map(function(ce){return ce.coordinate}),polarRadius:Array.isArray(D)?D:Pa(K,!0).map(function(ce){return ce.coordinate}),cx:I,cy:F,innerRadius:Z,outerRadius:ie,key:E.key||"polar-grid",radialLines:R})}),Ne(N,"renderLegend",function(){var E=N.state.formattedGraphicalItems,M=N.props,R=M.children,B=M.width,D=M.height,z=N.props.margin||{},$=B-(z.left||0)-(z.right||0),L=Jz({children:R,formattedGraphicalItems:E,legendWidth:$,legendContent:h});if(!L)return null;var K=L.item,H=hR(L,Dce);return k.cloneElement(K,re(re({},H),{},{chartWidth:B,chartHeight:D,margin:z,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),Ne(N,"renderTooltip",function(){var E,M=N.props,R=M.children,B=M.accessibilityLayer,D=Kn(R,hr);if(!D)return null;var z=N.state,$=z.isTooltipActive,L=z.activeCoordinate,K=z.activePayload,H=z.activeLabel,I=z.offset,F=(E=D.props.active)!==null&&E!==void 0?E:$;return k.cloneElement(D,{viewBox:re(re({},I),{},{x:I.left,y:I.top}),active:F,label:H,payload:F?K:[],coordinate:L,accessibilityLayer:B})}),Ne(N,"renderBrush",function(E){var M=N.props,R=M.margin,B=M.data,D=N.state,z=D.offset,$=D.dataStartIndex,L=D.dataEndIndex,K=D.updateId;return k.cloneElement(E,{key:E.key||"_recharts-brush",onChange:eh(N.handleBrushChange,E.props.onChange),data:B,x:he(E.props.x)?E.props.x:z.left,y:he(E.props.y)?E.props.y:z.top+z.height+z.brushBottom-(R.bottom||0),width:he(E.props.width)?E.props.width:z.width,startIndex:$,endIndex:L,updateId:"brush-".concat(K)})}),Ne(N,"renderReferenceElement",function(E,M,R){if(!E)return null;var B=N,D=B.clipPathId,z=N.state,$=z.xAxisMap,L=z.yAxisMap,K=z.offset,H=E.type.defaultProps||{},I=E.props,F=I.xAxisId,Z=F===void 0?H.xAxisId:F,ie=I.yAxisId,ce=ie===void 0?H.yAxisId:ie;return k.cloneElement(E,{key:E.key||"".concat(M,"-").concat(R),xAxis:$[Z],yAxis:L[ce],viewBox:{x:K.left,y:K.top,width:K.width,height:K.height},clipPathId:D})}),Ne(N,"renderActivePoints",function(E){var M=E.item,R=E.activePoint,B=E.basePoint,D=E.childIndex,z=E.isRange,$=[],L=M.props.key,K=M.item.type.defaultProps!==void 0?re(re({},M.item.type.defaultProps),M.item.props):M.item.props,H=K.activeDot,I=K.dataKey,F=re(re({index:D,dataKey:I,cx:R.x,cy:R.y,r:4,fill:d2(M.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},je(H,!1)),Lh(H));return $.push(A.renderActiveDot(H,F,"".concat(L,"-activePoint-").concat(D))),B?$.push(A.renderActiveDot(H,re(re({},F),{},{cx:B.x,cy:B.y}),"".concat(L,"-basePoint-").concat(D))):z&&$.push(null),$}),Ne(N,"renderGraphicChild",function(E,M,R){var B=N.filterFormatItem(E,M,R);if(!B)return null;var D=N.getTooltipEventType(),z=N.state,$=z.isTooltipActive,L=z.tooltipAxis,K=z.activeTooltipIndex,H=z.activeLabel,I=N.props.children,F=Kn(I,hr),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,we=Y.activeShape,Ie=!!(!fe&&$&&F&&(ae||ye||we)),et={};D!=="axis"&&F&&F.props.trigger==="click"?et={onClick:eh(N.handleItemMouseEnter,E.props.onClick)}:D!=="axis"&&(et={onMouseLeave:eh(N.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:eh(N.handleItemMouseEnter,E.props.onMouseEnter)});var de=k.cloneElement(E,re(re({},B.props),et));function Oe(la){return typeof L.dataKey=="function"?L.dataKey(la.payload):null}if(Ie)if(K>=0){var ke,ue;if(L.dataKey&&!L.allowDuplicatedCategory){var gt=typeof L.dataKey=="function"?Oe:"payload.".concat(L.dataKey.toString());ke=zh(ie,gt,H),ue=ce&&q&&zh(q,gt,H)}else ke=ie==null?void 0:ie[K],ue=ce&&q&&q[K];if(we||ye){var Le=E.props.activeIndex!==void 0?E.props.activeIndex:K;return[k.cloneElement(E,re(re(re({},B.props),et),{},{activeIndex:Le})),null,null]}if(!Pe(ke))return[de].concat(wl(N.renderActivePoints({item:B,activePoint:ke,basePoint:ue,childIndex:K,isRange:ce})))}else{var Tt,Et=(Tt=N.getItemByXY(N.state.activeCoordinate))!==null&&Tt!==void 0?Tt:{graphicalItem:de},hn=Et.graphicalItem,Nr=hn.item,Vr=Nr===void 0?E:Nr,Xa=hn.childIndex,Ar=re(re(re({},B.props),et),{},{activeIndex:Xa});return[k.cloneElement(Vr,Ar),null,null]}return ce?[de,null,null]:[de,null]}),Ne(N,"renderCustomized",function(E,M,R){return k.cloneElement(E,re(re({key:"recharts-customized-".concat(R)},N.props),N.state))}),Ne(N,"renderMap",{CartesianGrid:{handler:ih,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:ih},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:ih},YAxis:{handler:ih},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?_:Pl("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=J6(N.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),N.state={},N}return Kce(A,v),Vce(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=Kn(T,hr);if(R){var B=R.props.defaultIndex;if(!(typeof B!="number"||B<0||B>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[B]&&this.state.tooltipTicks[B].value,z=Nw(this.state,N,B,D),$=this.state.tooltipTicks[B].coordinate,L=(this.state.offset.top+E)/2,K=M==="horizontal",H=K?{x:$,y:L}:{y:$,x:L},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),z=I.props.points[B].tooltipPayload);var F={activeTooltipIndex:B,isTooltipActive:!0,activeLabel:D,activePayload:z,activeCoordinate:H};this.setState(F),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(_){aj([Kn(_.children,hr)],[Kn(this.props.children,hr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Kn(this.props.children,hr);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=pZ(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 D=this.state,z=D.xAxisMap,$=D.yAxisMap,L=this.getTooltipEventType(),K=pR(this.state,this.props.data,this.props.layout,B);if(L!=="axis"&&z&&$){var H=Ai(z).scale,I=Ai($).scale,F=H&&H.invert?H.invert(M.chartX):null,Z=I&&I.invert?I.invert(M.chartY):null;return re(re({},M),{},{xValue:F,yValue:Z},K)}return K?re(re({},M),K):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,D=M>=B.left&&M<=B.left+B.width&&R>=B.top&&R<=B.top+B.height;return D?{x:M,y:R}:null}var z=this.state,$=z.angleAxisMap,L=z.radiusAxisMap;if($&&L){var K=Ai($);return b3({x:M,y:R},K)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,T=this.getTooltipEventType(),N=Kn(_,hr),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(){x1.on(y1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){x1.removeListener(y1,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=fR(N,2),M=E[0],R=E[1];return re(re({},T),{},Ne({},M,R.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(T,N){var E=fR(N,2),M=E[0],R=E[1];return re(re({},T),{},Ne({},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],D=B.props,z=B.item,$=z.type.defaultProps!==void 0?re(re({},z.type.defaultProps),z.props):z.props,L=za(z.type);if(L==="Bar"){var K=(D.data||[]).find(function(Z){return zae(_,Z)});if(K)return{graphicalItem:B,payload:K}}else if(L==="RadialBar"){var H=(D.data||[]).find(function(Z){return b3(_,Z)});if(H)return{graphicalItem:B,payload:H}}else if(wp(B,E)||Sp(B,E)||Hu(B,E)){var I=ise({graphicalItem:B,activeTooltipItem:E,itemData:$.data}),F=$.activeIndex===void 0?I:$.activeIndex;return{graphicalItem:re(re({},B),{},{childIndex:F}),payload:Hu(B,E)?$.data[I]:B.props.data[I]}}}return null}},{key:"render",value:function(){var _=this;if(!kC(this))return null;var T=this.props,N=T.children,E=T.className,M=T.width,R=T.height,B=T.style,D=T.compact,z=T.title,$=T.desc,L=hR(T,zce),K=je(L,!1);if(D)return V.createElement(K4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement(sj,$o({},K,{width:M,height:R,title:z,desc:$}),this.renderClipPath(),PC(N,this.renderMap)));if(this.props.accessibilityLayer){var H,I;K.tabIndex=(H=this.props.tabIndex)!==null&&H!==void 0?H:0,K.role=(I=this.props.role)!==null&&I!==void 0?I:"application",K.onKeyDown=function(Z){_.accessibilityManager.keyboardEvent(Z)},K.onFocus=function(){_.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return V.createElement(K4,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},V.createElement("div",$o({className:ze("recharts-wrapper",E),style:re({position:"relative",cursor:"default",width:M,height:R},B)},F,{ref:function(ie){_.container=ie}}),V.createElement(sj,$o({},K,{width:M,height:R,title:z,desc:$,style:Jce}),this.renderClipPath(),PC(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(k.Component);Ne(w,"displayName",n),Ne(w,"defaultProps",re({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},x)),Ne(w,"getDerivedStateFromProps",function(v,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,D=A.dataStartIndex,z=A.dataEndIndex;if(A.updateId===void 0){var $=xR(v);return re(re(re({},$),{},{updateId:0},j(re(re({props:v},$),{},{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||!Vo(B,A.prevMargin)){var L=xR(v),K={chartX:A.chartX,chartY:A.chartY,isTooltipActive:A.isTooltipActive},H=re(re({},pR(A,_,M)),{},{updateId:A.updateId+1}),I=re(re(re({},L),K),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(!aj(T,A.prevChildren)){var F,Z,ie,ce,q=Kn(T,ul),Y=q&&(F=(Z=q.props)===null||Z===void 0?void 0:Z.startIndex)!==null&&F!==void 0?F:D,ae=q&&(ie=(ce=q.props)===null||ce===void 0?void 0:ce.endIndex)!==null&&ie!==void 0?ie:z,fe=Y!==D||ae!==z,ye=!Pe(_),we=ye&&!fe?A.updateId:A.updateId+1;return re(re({updateId:we},j(re(re({props:v},A),{},{updateId:we,dataStartIndex:Y,dataEndIndex:ae}),A)),{},{prevChildren:T,dataStartIndex:Y,dataEndIndex:ae})}return null}),Ne(w,"renderActiveDot",function(v,A,O){var _;return k.isValidElement(v)?_=k.cloneElement(v,A):Ee(v)?_=v(A):_=V.createElement(yp,A),V.createElement(Ze,{className:"recharts-active-dot",key:O},_)});var S=k.forwardRef(function(A,O){return V.createElement(w,$o({},A,{ref:O}))});return S.displayName=w.displayName,S},cue=w2({chartName:"LineChart",GraphicalChild:hd,axisComponents:[{axisType:"xAxis",AxisComp:gl},{axisType:"yAxis",AxisComp:bl}],formatAxisMap:$L}),uue=w2({chartName:"BarChart",GraphicalChild:zi,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:gl},{axisType:"yAxis",AxisComp:bl}],formatAxisMap:$L}),due=w2({chartName:"PieChart",GraphicalChild:Ya,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:jp},{axisType:"radiusAxis",AxisComp:vp}],formatAxisMap:Kte,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const fue=["Deals","Products","MRR","ARR"];function hue(){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([Vf.deals(),Vf.products(),Vf.mrr(),Vf.arr()]);h(E.deals||[]),x(M.products||[]),A(R.mrr||0),j([]);const z=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(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{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(Ye,{icon:s.jsx(Ir,{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(hS,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(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(ra,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(_)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Closed Won"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(aF,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:T}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Products"})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex items-center gap-1 bg-bg rounded-xl p-1",children:fue.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(El,{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(Ye,{variant:"secondary",size:"sm",icon:s.jsx(rd,{size:14}),children:"Filter"})]})]}),e==="Deals"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Deal"}),s.jsx(Ae,{children:"Company"}),s.jsx(Ae,{align:"right",children:"Value"}),s.jsx(Ae,{children:"Stage"}),s.jsx(Ae,{align:"right",children:"Probability"}),s.jsx(Ae,{children:"Owner"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[f.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:7,className:"text-center text-text-secondary py-8",children:"No deals found"})}),f.map(N=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:N.name})}),s.jsx(be,{children:N.company}),s.jsx(be,{align:"right",children:Te(N.value)}),s.jsx(be,{children:s.jsx(_e,{variant:N.stage==="Closed Won"?"success":N.stage==="Negotiation"?"primary":"default",children:N.stage})}),s.jsxs(be,{align:"right",children:[N.probability,"%"]}),s.jsx(be,{children:N.owner}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Mi,{size:16})})})]},N.id))]})]})}),e==="Products"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Product"}),s.jsx(Ae,{children:"SKU"}),s.jsx(Ae,{align:"right",children:"Price"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[p.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No products found"})}),p.map(N=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:N.name})}),s.jsx(be,{children:s.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:N.sku})}),s.jsx(be,{align:"right",children:Te(N.price)}),s.jsx(be,{children:s.jsx(_e,{variant:N.recurring?"primary":"default",children:N.recurring?"Recurring":"One-time"})}),s.jsx(be,{children:s.jsx(_e,{variant:N.active?"success":"danger",children:N.active?"Active":"Inactive"})}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Mi,{size:16})})})]},N.id))]})]})}),e==="MRR"&&s.jsxs(te,{children:[s.jsx(Ke,{title:"Monthly Recurring Revenue",subtitle:`Current MRR: ${Te(v)}`}),y.length>0?s.jsx("div",{className:"h-[320px]",children:s.jsx(bj,{width:"100%",height:"100%",children:s.jsxs(uue,{data:y,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(hw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(gl,{dataKey:"month",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(bl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(hr,{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:Te(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(bj,{width:"100%",height:"100%",children:s.jsxs(cue,{data:w,margin:{top:5,right:5,left:-10,bottom:0},children:[s.jsx(hw,{strokeDasharray:"3 3",stroke:"rgba(0,0,0,0.04)",vertical:!1}),s.jsx(gl,{dataKey:"quarter",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},dy:8}),s.jsx(bl,{axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9CA3AF"},tickFormatter:N=>`${(N/1e3).toFixed(0)}k`,dx:-5}),s.jsx(hr,{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:Te(Number(E[0].value))})]})}),s.jsx(hd,{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 mue=["Balance","Income","MOMS","Accounts","Invoices","Cashflow"],gR=["#2563EB","#16A34A","#D97706","#DC2626","#9CA3AF"];function pue(){var R,B;const e=_n(),[t,n]=k.useState(()=>{var D;return((D=e.state)==null?void 0:D.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 D(){var z,$;c(!0),f("");try{const[L,K,H,I,F,Z]=await Promise.all([fs.balance(),fs.income(),fs.moms(),fs.accounts(),fs.invoices(),fs.cashflow()]);p(L.report||L),y(K.report||K),w(H.report||H),v(((z=I.report)==null?void 0:z.accounts)||I.accounts||[]),O((($=F.report)==null?void 0:$.invoices)||F.invoices||[]),T(Z.report||Z)}catch(L){f(L instanceof Error?L.message:"Failed to load finance data")}finally{c(!1)}}D()},[]);const N=S.filter(D=>D.name.toLowerCase().includes(r.toLowerCase())||D.id.toLowerCase().includes(r.toLowerCase())),E=A.filter(D=>D.customer.toLowerCase().includes(r.toLowerCase())||D.id.toLowerCase().includes(r.toLowerCase())),M=(x==null?void 0:x.expenses.map((D,z)=>({name:D.name||D.account,value:D.amount??D.balance??0,color:gR[z%gR.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(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{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(Ye,{icon:s.jsx(Ir,{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(Io,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((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(ra,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((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:Te((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:mue.map(D=>s.jsx("button",{onClick:()=>n(D),className:`px-4 py-2 text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${t===D?"bg-surface text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:D},D))}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[s.jsx(El,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"}),s.jsx("input",{type:"text",placeholder:"Search...",value:r,onChange:D=>i(D.target.value),className:"w-full sm:w-64 h-10 pl-9 pr-4 rounded-[14px] border bg-surface text-sm text-text-primary placeholder:text-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/30"})]}),s.jsx(Ye,{variant:"secondary",size:"sm",icon:s.jsx(rd,{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(X1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((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(BH,{size:14,className:"text-danger"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((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(X1,{size:14,className:"text-success"})]}),s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te((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((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.assets)||h.assets.length===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No asset accounts"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Liabilities"}),s.jsxs("div",{className:"space-y-2",children:[h==null?void 0:h.liabilities.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z)),(!(h!=null&&h.liabilities)||h.liabilities.length===0)&&s.jsx("p",{className:"text-text-secondary text-sm",children:"No liability accounts"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary mb-3",children:"Equity"}),s.jsxs("div",{className:"space-y-2",children:[(R=h==null?void 0:h.equity)==null?void 0:R.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("div",{children:s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account})}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z)),(!(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:Te((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:Te((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:Te((x==null?void 0:x.net_income)||0)})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Revenue Accounts"}),x==null?void 0:x.revenue.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z))]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-sm font-semibold text-text-primary",children:"Expense Accounts"}),x==null?void 0:x.expenses.map((D,z)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/40 last:border-0",children:[s.jsx("p",{className:"text-sm text-text-primary",children:D.name||D.account}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:Te(D.amount??D.balance??0)})]},z))]})]})]}),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(bj,{width:"100%",height:"100%",children:s.jsxs(due,{children:[s.jsx(Ya,{data:M,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:4,dataKey:"value",children:M.map((D,z)=>s.jsx(ip,{fill:D.color},`cell-${z}`))}),s.jsx(hr,{content:({active:D,payload:z})=>{if(!D||!(z!=null&&z.length))return null;const $=z[0].payload;return s.jsxs("div",{className:"bg-surface rounded-xl dropdown-shadow border border-border/60 px-3 py-2",children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:$.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:Te($.value)})]})}})]})})}),s.jsx("div",{className:"space-y-2 mt-2",children:M.map(D=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:D.color}}),s.jsx("span",{className:"text-text-secondary",children:D.name})]}),s.jsx("span",{className:"font-medium text-text-primary",children:Te(D.value)})]},D.name))})]}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-text-secondary",children:"No expense data"})]})]})}),t==="MOMS"&&s.jsxs(te,{children:[s.jsx(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:Te((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:Te((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:Te((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(Ae,{children:"Account"}),s.jsx(Ae,{children:"Number"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{align:"right",children:"Balance"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[N.map(D=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:D.name})}),s.jsx(be,{children:s.jsx("code",{className:"text-xs bg-bg px-2 py-0.5 rounded-md",children:D.id})}),s.jsx(be,{children:s.jsx(_e,{variant:D.type==="asset"?"success":D.type==="equity"?"primary":"warning",children:D.type})}),s.jsx(be,{align:"right",children:Te(D.balance)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Mi,{size:16})})})]},D.id)),N.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:5,className:"text-center text-text-secondary py-8",children:"No accounts found"})})]})]})]}),t==="Invoices"&&s.jsxs(te,{children:[s.jsx(Ke,{title:"Invoices",subtitle:"All invoices"}),s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Number"}),s.jsx(Ae,{children:"Customer"}),s.jsx(Ae,{align:"right",children:"Amount"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Due Date"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[E.map(D=>s.jsxs(Rt,{children:[s.jsx(be,{children:s.jsx("span",{className:"font-medium",children:D.id})}),s.jsx(be,{children:D.customer}),s.jsx(be,{align:"right",children:Te(D.amount)}),s.jsx(be,{children:s.jsx(_e,{variant:D.status==="paid"?"success":D.status==="overdue"?"danger":D.status==="sent"||D.status==="pending"?"primary":"default",children:D.status})}),s.jsx(be,{children:Nt(D.due_date)}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Mi,{size:16})})})]},D.id)),E.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No invoices found"})})]})]})]}),t==="Cashflow"&&s.jsxs(te,{children:[s.jsx(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:Te((_==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:Te((_==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:Te((_==null?void 0:_.net)||0)})]})]})]})]})}const xue=["Employees","Leaves"],yue={Sales:"primary",Engineering:"success",Finance:"warning",HR:"primary",Legal:"default"};function gue(){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([jE.employees(),jE.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(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{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(Ye,{icon:s.jsx(Ir,{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(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:y}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active Employees"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:j}),s.jsx("p",{className:"text-xs text-text-secondary",children:"On Leave"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-success-light flex items-center justify-center text-success",children:s.jsx(mu,{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:xue.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(El,{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(Ye,{variant:"secondary",size:"sm",icon:s.jsx(rd,{size:14}),children:"Filter"})]})]}),e==="Employees"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Employee"}),s.jsx(Ae,{children:"Department"}),s.jsx(Ae,{children:"Role"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Start Date"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[v.map(O=>{const _=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(_e,{variant:yue[O.department]||"default",children:O.department})}),s.jsx(be,{children:T}),s.jsx(be,{children:s.jsx(_e,{variant:O.status==="active"?"success":O.status==="on_leave"?"warning":"danger",children:O.status.replace("_"," ")})}),s.jsx(be,{children: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(Mi,{size:16})})})]},O.id)}),v.length===0&&s.jsx(Rt,{children:s.jsx(be,{colSpan:6,className:"text-center text-text-secondary py-8",children:"No employees found"})})]})]})}),e==="Leaves"&&s.jsx(te,{children:s.jsxs(Pi,{children:[s.jsx(Ri,{children:s.jsxs(Rt,{children:[s.jsx(Ae,{children:"Employee"}),s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{children:"Period"}),s.jsx(Ae,{align:"right",children:"Days"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{align:"right"})]})}),s.jsxs(Di,{children:[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(_e,{variant:O.type==="vacation"?"primary":O.type==="sick"?"warning":"default",children:O.type})}),s.jsx(be,{children:s.jsxs("span",{className:"text-sm text-text-primary",children:[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(_e,{variant:O.status==="approved"?"success":O.status==="pending"?"warning":"danger",children:O.status})}),s.jsx(be,{align:"right",children:s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Mi,{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 v1={draft:{variant:"default",icon:dn},pending_signature:{variant:"warning",icon:dn},active:{variant:"success",icon:xr},expired:{variant:"danger",icon:fn},terminated:{variant:"default",icon:fn},disputed:{variant:"danger",icon:fn}},vR={pending:"warning",partially_signed:"primary",signed:"success",rejected:"danger"};function vue(){var $;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}=Br(),[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 L={};T&&(L.Authorization=`Bearer ${T}`);const[K,H]=await Promise.all([fetch("/api/v1/legal/contracts",{headers:L}),fetch("/api/v1/legal/templates",{headers:L})]),I=await K.json(),F=await H.json();h(I.contracts||[]),x(F.templates||[])}catch(L){d(L instanceof Error?L.message:"Failed to load legal data")}finally{l(!1)}};k.useEffect(()=>{M()},[T]);const R=async(L,K)=>{try{const H={"Content-Type":"application/json"};if(T&&(H.Authorization=`Bearer ${T}`),(await fetch(`/api/v1/legal/contracts/${L}/sign`,{method:"POST",headers:H,body:JSON.stringify({party:K})})).ok&&(M(),(y==null?void 0:y.id)===L)){const F=await fetch(`/api/v1/legal/contracts/${L}`,{headers:H}).then(Z=>Z.json());j(F)}}catch(H){console.error("Sign failed:",H)}},B=async()=>{if(!(!N.title||!N.counterparty||!N.template_type)){_(!0);try{const L={"Content-Type":"application/json"};T&&(L.Authorization=`Bearer ${T}`);const K={...N,value:N.value?parseFloat(N.value):0},H=await fetch("/api/v1/legal/contracts",{method:"POST",headers:L,body:JSON.stringify(K)});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(L){d(L instanceof Error?L.message:"Failed to create")}finally{_(!1)}}},D=f.filter(L=>(L.title||L.name||"").toLowerCase().includes(n.toLowerCase())||L.counterparty.toLowerCase().includes(n.toLowerCase())||L.template_type.toLowerCase().includes(n.toLowerCase())),z=(L,K)=>{if(!K)return L;let H=L;return Object.entries(K).forEach(([I,F])=>{H=H.replace(new RegExp(`\\{\\{${I}\\}\\}`,"g"),`<strong>${F}</strong>`),H=H.replace(new RegExp(`\\$\\{${I}\\}`,"g"),`<strong>${F}</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((L,K)=>s.jsx(Re,{className:"h-[80px]"},K))}),s.jsx(Re,{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(Ye,{icon:s.jsx(Ir,{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(jr,{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(xr,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(L=>L.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Aktiva"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning/10 text-warning flex items-center justify-center",children:s.jsx(dn,{size:20})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold",children:f.filter(L=>L.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(L=>L.status==="expired"||L.status==="terminated").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Utgångna"})]})]})})]}),s.jsxs("div",{className:"relative",children:[s.jsx(El,{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:L=>r(L.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:[D.map(L=>{const K=v1[L.status]||v1.draft,H=K.icon;return s.jsxs("tr",{className:"hover:bg-bg transition-colors cursor-pointer",onClick:()=>{j(L),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(jr,{size:14})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-text-primary",children:L.title||L.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:L.template_type})]})]})}),s.jsxs("td",{className:"px-4 py-3",children:[s.jsx("p",{className:"text-sm text-text-primary",children:L.counterparty}),L.counterparty_org&&s.jsx("p",{className:"text-xs text-text-secondary",children:L.counterparty_org})]}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs(_e,{variant:K.variant,className:"text-xs flex items-center gap-1",children:[s.jsx(H,{size:12}),L.status]})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(_e,{variant:vR[L.signature_status||"pending"],className:"text-xs",children:L.signature_status||"pending"})}),s.jsx("td",{className:"px-4 py-3",children:L.value?s.jsxs("p",{className:"text-sm font-medium",children:[Te(L.value)," ",L.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:[L.start_date?Nt(L.start_date):"—",L.end_date&&` → ${Nt(L.end_date)}`]})}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsx(Bo,{size:16,className:"text-text-tertiary inline"})})]},L.id)}),D.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(qa,{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(_e,{variant:(($=v1[y.status])==null?void 0:$.variant)||"default",children:y.status}),s.jsxs(_e,{variant:vR[y.signature_status||"pending"],children:["Signering: ",y.signature_status||"pending"]}),y.value&&y.currency&&s.jsxs(_e,{variant:"default",children:[s.jsx(hS,{size:12,className:"mr-1"}),Te(y.value)," ",y.currency]})]}),y.signature_status!=="signed"&&s.jsxs("div",{className:"flex gap-3 p-4 bg-bg rounded-xl",children:[s.jsxs(Ye,{variant:"secondary",onClick:()=>R(y.id,"tenant"),disabled:y.signature_status==="partially_signed",children:[s.jsx(cE,{size:16,className:"mr-2"}),"Signera som LandveX"]}),s.jsxs(Ye,{variant:"secondary",onClick:()=>R(y.id,"counterparty"),children:[s.jsx(cE,{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(mu,{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(mu,{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(([L,K])=>s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary uppercase",children:L.replace(/_/g," ")}),s.jsx("p",{className:"font-medium text-sm mt-0.5",children:K})]},L))})]}),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((L,K)=>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:[L.order,"."]}),s.jsx("p",{className:"font-medium text-sm",children:L.title}),L.required&&s.jsx(_e,{variant:"danger",className:"text-xs",children:"Krävs"})]}),s.jsx("div",{className:"text-sm text-text-secondary",dangerouslySetInnerHTML:{__html:z(L.content,y.variables||{})}}),L.variables&&L.variables.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:L.variables.map(H=>s.jsx("code",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded",children:"{{"+H+"}}"},H))})]},L.id||K))})]}),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(([L,K])=>s.jsxs("div",{className:"p-3 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary uppercase",children:L.replace(/_/g," ")}),s.jsx("p",{className:"font-medium text-sm mt-0.5",children:String(K)})]},L))})]})]})]})}),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(qa,{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:L=>E({...N,template_type:L.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(L=>s.jsx("option",{value:L.type,children:L.name},L.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:L=>E({...N,title:L.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:L=>E({...N,counterparty:L.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:L=>E({...N,counterparty_org:L.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:L=>E({...N,start_date:L.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:L=>E({...N,end_date:L.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:L=>E({...N,value:L.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:L=>E({...N,currency:L.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(Ye,{className:"flex-1",onClick:B,disabled:O||!N.title||!N.counterparty||!N.template_type,children:O?"Skapar...":"Skapa avtal"}),s.jsx(Ye,{variant:"secondary",onClick:()=>A(!1),children:"Avbryt"})]})]})})]})}const bue=[{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:[]}],v8=[{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:{}}],jue=[{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}],Cp={instagram:z5,facebook:D5,linkedin:L5,newsletter:An,website:gn,google_business:Z1,youtube:fF,tiktok:G5,email:An},Rs={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"},S2={planned:dn,brief_created:dn,in_production:dn,generated:xr,review_required:Jr,approved:xr,scheduled:dn,publishing:J1,published:xr,verified:xr,failed:Jr,paused:Q1,cancelled:Jr};function wue(){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=v8.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(Bo,{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(Ir,{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(rd,{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(Sue,{date:e,activities:x,onSelect:l}),n==="week"&&s.jsx(Nue,{date:e,activities:x,onSelect:l}),n==="day"&&s.jsx(Aue,{date:e,activities:x,onSelect:l}),n==="year"&&s.jsx(_ue,{year:e.getFullYear(),activities:x,onSelect:l}),n==="quarter"&&s.jsx(Oue,{date:e,activities:x,onSelect:l})]}),s.jsx(Wr,{children:i&&s.jsx(Tue,{activity:i,onClose:()=>l(null)})})]})}function Sue({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=Cp[h.channel],x=S2[h.status];return s.jsxs(Fe.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 ${Rs[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 Nue({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=Cp[f.channel];return s.jsxs(Fe.button,{whileHover:{scale:1.02},onClick:()=>n(f),className:`w-full text-left p-2 rounded-lg text-xs ${Rs[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 Aue({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=Cp[d.channel],h=S2[d.status];return s.jsxs(Fe.button,{whileHover:{scale:1.01},onClick:()=>n(d),className:`w-full text-left p-3 rounded-lg ${Rs[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 _ue({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(Fe.button,{whileHover:{scale:1.02},onClick:()=>n(d),className:`w-full text-left px-2 py-1.5 rounded text-xs ${Rs[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 Oue({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(Fe.button,{whileHover:{scale:1.02},onClick:()=>n(f),className:`w-full text-left p-2 rounded text-xs ${Rs[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 Tue({activity:e,onClose:t}){const n=Cp[e.channel],r=S2[e.status];return s.jsx(Fe.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(Fe.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 ${Rs[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 ${Rs[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 Eue(){const[e,t]=k.useState("30d"),n=bue,r=v8,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(Fe.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(qo,{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(Fe.div,{whileHover:{scale:1.02},className:"bg-white border rounded-xl p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-yellow-100 rounded-lg flex items-center justify-center",children:s.jsx(dn,{size:20,className:"text-yellow-600"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold",children:i.inProduction}),s.jsx("div",{className:"text-sm text-gray-500",children:"In Production"})]})]})}),s.jsx(Fe.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(xr,{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(Fe.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(Jr,{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(rF,{size:16,className:"text-green-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Engagement"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalEngagement})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(qH,{size:16,className:"text-purple-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Clicks"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalClicks})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(lF,{size:16,className:"text-orange-600"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Conversions"})]}),s.jsx("div",{className:"text-2xl font-bold",children:i.totalConversions})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Active Campaigns"}),s.jsx("div",{className:"space-y-4",children:n.filter(c=>c.status==="active").map(c=>{var d;return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"font-medium",children:c.name}),s.jsx("span",{className:"px-2 py-1 bg-green-100 text-green-700 text-xs rounded-full",children:"Active"})]}),s.jsx("p",{className:"text-sm text-gray-500 mb-3",children:c.description}),s.jsx("div",{className:"space-y-2",children:(d=c.goals)==null?void 0:d.map((f,h)=>{var p;return s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:f.metric}),s.jsxs("span",{children:[(p=f.current)==null?void 0:p.toLocaleString()," / ",f.target.toLocaleString()]})]}),s.jsx("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden",children:s.jsx(Fe.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(mu,{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 Cue={campaign:iF,template:jr,cta:Ir,image_format:XH,video_format:G5,text_template:jr};function kue(){const[e]=k.useState(jue),[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(Ir,{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=Cue[i.type]||k5;return s.jsxs(Fe.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(cF,{size:14})})]})]}),s.jsx("div",{className:"bg-gray-50 rounded-lg p-3 mb-3",children:s.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(i.content,null,2)})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex gap-1",children:i.tags.map(c=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 text-xs rounded",children:c},c))}),s.jsxs("span",{className:"text-xs text-gray-500",children:["Used ",i.usageCount," times"]})]})]},i.id)})})]})}function Mue(){const[e,t]=k.useState("control-tower"),n=[{id:"control-tower",label:"Control Tower",icon:pS},{id:"calendar",label:"Calendar",icon:mu},{id:"battery",label:"Battery",icon:k5},{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(Wr,{mode:"wait",children:s.jsxs(Fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e==="calendar"&&s.jsx(wue,{}),e==="control-tower"&&s.jsx(Eue,{}),e==="battery"&&s.jsx(kue,{}),e==="settings"&&s.jsx(Pue,{})]},e)})})]})}function Pue(){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(Bo,{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(Bo,{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(Bo,{size:16,className:"text-gray-400"})]})]})]}),s.jsxs("div",{className:"bg-white border rounded-xl p-6",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Automation"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-publish approved content"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Publish when approved and scheduled"})]}),s.jsx("div",{className:"w-12 h-6 bg-blue-600 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute right-0.5 top-0.5"})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-generate reports"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Weekly performance reports"})]}),s.jsx("div",{className:"w-12 h-6 bg-blue-600 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute right-0.5 top-0.5"})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Auto-reschedule failed posts"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Retry failed publications"})]}),s.jsx("div",{className:"w-12 h-6 bg-gray-300 rounded-full relative",children:s.jsx("div",{className:"w-5 h-5 bg-white rounded-full absolute left-0.5 top-0.5"})})]})]})]})]})]})}function Rue(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Support"}),s.jsx(te,{className:"p-6",children:s.jsx("p",{className:"text-gray-500",children:"Support tickets coming soon..."})})]})}const Due={send_email:s.jsx(An,{size:12}),slack_message:s.jsx(yh,{size:12}),create_task:s.jsx(jr,{size:12}),add_to_crm:s.jsx(fE,{size:12}),update_hr:s.jsx(fE,{size:12})},zue={send_email:"Send Email",slack_message:"Slack Message",create_task:"Create Task",add_to_crm:"Add to CRM",update_hr:"Update HR"};function Lue(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 $ue(e){return Array.isArray(e)?e.map(t=>{if(typeof t=="object"&&t!==null){const n=t.type;return zue[n]||n}return String(t)}):[]}function Bue(){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}=Br(),[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(Re,{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(Re,{className:"h-[80px]"},O))}),s.jsx(Re,{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(Ye,{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(Ye,{icon:s.jsx(Ir,{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(qo,{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(J1,{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(Q1,{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(xr,{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(qo,{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=$ue(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(J1,{size:18}):s.jsx(Q1,{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(_e,{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(KH,{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:[Due[_]||s.jsx(qo,{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:Lue(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(qa,{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(Ye,{className:"flex-1",onClick:w,disabled:f||!x.name||!x.description,children:f?"Creating...":"Create Workflow"}),s.jsx(Ye,{variant:"secondary",onClick:()=>d(!1),children:"Cancel"})]})]})})]})}function Iue(){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 bE.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 bE.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(vr,{size:16,className:"text-success"});case"warning":return s.jsx(fn,{size:16,className:"text-warning"});case"critical":return s.jsx(Mh,{size:16,className:"text-danger"});case"maintenance":return s.jsx(dn,{size:16,className:"text-text-secondary"});default:return s.jsx(LH,{size:16,className:"text-text-secondary"})}}if(i)return s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{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(Re,{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(Ye,{onClick:p,className:"mt-4",icon:s.jsx(Ra,{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(Ye,{onClick:p,icon:s.jsx(Ra,{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(vr,{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(Mh,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.critical+n.maintenance}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Critical/Maintenance"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:e.map(w=>s.jsx(te,{className:"relative",children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j(w.health),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:w.name}),s.jsx("p",{className:"text-xs text-text-secondary",children:w.version})]})]}),s.jsx(_e,{variant:y(w.health),children:w.health})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Requests (24h)"}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:w.requests_24h.toLocaleString()})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Latency"}),s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[w.latency_ms.toFixed(1)," ms"]})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Error Rate"}),s.jsxs("p",{className:"text-sm font-medium text-text-primary",children:[(w.error_rate*100).toFixed(1),"%"]})]}),s.jsxs("div",{className:"p-2 bg-bg rounded-lg",children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Uptime"}),s.jsx("p",{className:"text-sm font-medium text-text-primary",children:w.uptime})]})]}),w.models&&w.models.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-xs font-medium text-text-secondary uppercase",children:"Models"}),w.models.map(S=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fS,{size:14,className:"text-text-secondary"}),s.jsx("span",{className:"text-text-primary",children:S.name})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-text-secondary",children:[(S.accuracy*100).toFixed(0),"%"]}),s.jsx(_e,{variant:S.status==="active"?"success":"warning",size:"sm",children:S.status})]})]},S.id))]}),s.jsx("div",{className:"pt-2 border-t border-border/40",children:s.jsx(Ye,{variant:"secondary",size:"sm",className:"w-full",icon:s.jsx(Ra,{size:14}),disabled:f===w.id,onClick:()=>x(w.id),children:f===w.id?"Restarting...":"Restart Engine"})})]})},w.id))})]})}function que(){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:Lr},{key:"field-data",label:"Field Data",icon:xh},{key:"payouts",label:"Payouts",icon:Io},{key:"insights",label:"Insights",icon:aE}];k.useEffect(()=>{S()},[]);async function S(){x(!0),j("");try{const[_,T,N,E]=await Promise.all([Hf.zoomers(),Hf.fieldData(),Hf.payouts(),Hf.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(Re,{className:"h-[80px]"}),s.jsx(Re,{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(Lr,{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(vr,{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(Io,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(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(Z1,{size:14,className:"text-text-secondary"}),_.city,", ",_.country]})}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{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:Te(_.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(xh,{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(vr,{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(dn,{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(_e,{variant:v(_.status),children:_.status})]}),s.jsxs("div",{className:"flex items-center gap-1 text-xs text-text-secondary",children:[s.jsx(Z1,{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(aE,{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(Io,{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(vr,{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(ra,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:Te(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(_e,{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:[Te(_.amount)," ",_.currency]}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm font-medium text-success",children:Te(_.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(xh,{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(Lr,{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 Uue(){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:ra},{key:"documents",label:"Documents",icon:jr},{key:"compliance",label:"Compliance",icon:Da}];k.useEffect(()=>{A()},[]);async function A(){j(!0),S("");try{const[N,E,M,R]=await Promise.all([Ff.entities(),Ff.documents(),Ff.compliance(),Ff.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(vr,{size:16,className:"text-success"});case"in_progress":return s.jsx(dn,{size:16,className:"text-warning"});case"pending":return s.jsx(fn,{size:16,className:"text-danger"});default:return s.jsx(Mh,{size:16,className:"text-text-secondary"})}}return y?s.jsxs("div",{className:"space-y-8",children:[s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{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(Lr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.reduce((N,E)=>N+E.employees,0)}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Employees"})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:n.map(N=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-semibold text-text-primary",children:N.name}),s.jsxs("p",{className:"text-xs text-text-secondary",children:[N.org_number," • ",N.city,", ",N.country]})]}),s.jsx(_e,{variant:O(N.status),children:N.status})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Type"}),s.jsx("p",{className:"text-text-primary",children:N.type})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"CEO"}),s.jsx("p",{className:"text-text-primary",children:N.ceo})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Founded"}),s.jsx("p",{className:"text-text-primary",children: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(jr,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:N.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:N.type}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(N.status),children:N.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:((E=N.signed_by)==null?void 0:E.join(", "))||"-"}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm text-text-secondary",children: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(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.completed}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Completed"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:f.in_progress}),s.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(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(_e,{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 Vue(){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:iE},{key:"gdpr",label:"GDPR / Privacy",icon:$5},{key:"risks",label:"Risk Register",icon:fn},{key:"legal",label:"Legal Cases",icon:dE},{key:"policies",label:"Policies",icon:kh}];k.useEffect(()=>{A()},[]);async function A(){j(!0),S("");try{const[T,N,E,M,R]=await Promise.all([$c.iso(),$c.gdpr(),$c.risks(),$c.legalCases(),$c.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(Re,{className:"h-[80px]"}),s.jsx(Re,{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(iE,{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(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(T=>T.status==="active").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Active"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:n.filter(T=>T.status==="in_progress").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"In Progress"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-danger-light flex items-center justify-center text-danger",children:s.jsx(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(_e,{variant:O(T.status),children:T.status})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Issuer"}),s.jsx("p",{className:"text-text-primary",children:T.issuer})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Auditor"}),s.jsx("p",{className:"text-text-primary",children:T.auditor})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Issued"}),s.jsx("p",{className:"text-text-primary",children:T.issued_at?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(_e,{variant:T.impact_assessment?"success":"warning",children:T.impact_assessment?"DPIA Done":"No DPIA"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Legal Basis"}),s.jsx("p",{className:"text-text-primary",children:T.legal_basis})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary",children:"Retention"}),s.jsx("p",{className:"text-text-primary",children:T.retention})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary mb-2",children:"Data Types"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:T.data_types.map((N,E)=>s.jsx(_e,{variant:"default",size:"sm",children:N},E))})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-text-secondary mb-2",children:"Processors"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:T.processors.map((N,E)=>s.jsx(_e,{variant:"default",size:"sm",children:N},E))})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:T.dpa_exists?"text-success":"text-danger",children:["DPA: ",T.dpa_exists?"✓":"✗"]}),s.jsxs("span",{className:T.cross_border?"text-warning":"text-text-secondary",children:["Cross-border: ",T.cross_border?"Yes":"No"]})]})]})},T.id))}),e==="risks"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(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(ra,{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(vr,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="mitigated").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Mitigated"})]})]})}),s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-warning-light flex items-center justify-center text-warning",children:s.jsx(dn,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-semibold text-text-primary",children:c.filter(T=>T.status==="monitored").length}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Monitored"})]})]})})]}),s.jsxs(te,{children:[s.jsx(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(_e,{variant:O(T.status),children:T.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:T.owner})]},T.id))})]})})]})]}),e==="legal"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-5",children:[s.jsx(te,{padding:"md",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary-light flex items-center justify-center text-primary",children:s.jsx(dE,{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(ra,{size:18})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-2xl font-semibold text-text-primary",children:[f.reduce((T,N)=>T+N.value,0).toLocaleString()," SEK"]}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Total Exposure"})]})]})})]}),s.jsx("div",{className:"space-y-4",children:f.map(T=>s.jsx(te,{children:s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:T.title}),s.jsx("p",{className:"text-xs text-text-secondary",children:T.opposing_party})]}),s.jsx(_e,{variant:O(T.status),children:T.status})]}),s.jsx("p",{className:"text-sm text-text-secondary",children:T.description}),s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs("span",{className:"text-text-secondary",children:["Type: ",T.type]}),s.jsxs("span",{className:"text-text-secondary",children:["Lawyer: ",T.lawyer]}),s.jsxs("span",{className:"text-text-secondary",children:["Opened: ",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(kh,{size:16,className:"text-text-secondary"}),s.jsx("span",{className:"text-sm text-text-primary",children:T.title})]})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.category}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-primary",children:T.version}),s.jsx("td",{className:"py-3.5 px-4",children:s.jsx(_e,{variant:O(T.status),children:T.status})}),s.jsx("td",{className:"py-3.5 px-4 text-sm text-text-secondary",children:T.approved_by||"Not approved"}),s.jsx("td",{className:"py-3.5 px-4 text-right text-sm text-text-primary",children:Nt(T.review_date)})]},T.id))})]})})]})})]})}function Hue({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(Ra,{size:16})}):s.jsx("button",{onClick:()=>n(e.id),className:"p-2 rounded-lg bg-white hover:bg-gray-50 text-gray-400 hover:text-blue-600 transition-colors",title:"Koppla API",children:s.jsx(ZH,{size:16})})})]}),s.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200/60",children:[s.jsxs("div",{className:"flex items-baseline justify-between",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Saldo"}),s.jsx("span",{className:"text-2xl font-bold text-gray-900",children:e.balance.toLocaleString("sv-SE",{style:"currency",currency:e.currency})})]}),e.lastSync&&s.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["Senast synkad: ",new Date(e.lastSync).toLocaleString("sv-SE")]}),e.apiConnected&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-green-600 mt-2",children:[s.jsx(QH,{size:12}),"API kopplad"]})]})]})}function Fue({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($H,{size:16}):s.jsx(X1,{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(jr,{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 Gue({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(jr,{size:24,className:"text-red-600"}):s.jsx(jr,{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(qa,{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(ej,{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}],bR=[{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"}],Kue=[{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 Yue(){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([lG.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(Re,{className:"h-[80px]"}),s.jsx(Re,{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:IH},{id:"ledger",label:"Huvudbok",icon:kh},{id:"accounts",label:"Konton",icon:vr}];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(vr,{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:Te(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(kh,{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(vr,{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(ej,{size:16}),"Ladda upp kontoutdrag"]})]}),y&&s.jsx(te,{className:"p-6",children:s.jsx(Gue,{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(Hue,{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(YH,{size:18,className:"text-text-secondary"}),s.jsx("h3",{className:"font-semibold text-text-primary",children:"Importerade kontoutdrag"})]}),s.jsx("div",{className:"space-y-2",children:Kue.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(ej,{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(_e,{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(Fue,{transactions:p?bR.filter(M=>M.accountId===p):bR,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(_e,{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:Te(M.balance)})]},M.code))})]})})})]})]})}function jR({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(qa,{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(lE,{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(Ye,{variant:"secondary",size:"sm",icon:s.jsx(lE,{size:16}),onClick:()=>{var N;return(N=v.current)==null?void 0:N.click()},children:"Bifoga"}),s.jsx(Ye,{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(Ye,{icon:p?s.jsx(Rh,{size:16,className:"animate-spin"}):s.jsx(Gm,{size:16}),onClick:O,disabled:p||!i||!c||!f,children:p?"Skickar...":"Skicka"})]})]})})}function Xue(){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}=Br(),{user:N}=Br(),E=async()=>{try{if(!T)return;const z={Authorization:`Bearer ${T}`},$=await fetch("/api/v1/mail/mailboxes",{headers:z});if($.ok){const L=await $.json();if(L.ok&&L.mailboxes){const K=(N==null?void 0:N.email)||"",H=(N==null?void 0:N.role)||"";let I;K.includes("erik")||H==="ceo"?I=L.mailboxes.filter(F=>F.startsWith("erik@")||F==="info@landvex.com"||F==="invoice@landvex.com"||F==="hello@quixzoom.com"||F==="finance@quixzoom.com"||F==="cfo@aamos.systems"||F.startsWith("recovery@")||F.startsWith("social@")):K.includes("johan")||H==="cto"?I=L.mailboxes.filter(F=>F.startsWith("johan@")||F==="cto@aamos.systems"||F==="info@aamos.systems"||F==="dev@hypbit.com"||F.startsWith("recovery@")||F.startsWith("social@")):I=L.mailboxes,x(I)}}}catch(z){console.error("Failed to fetch mailboxes:",z)}},M=async()=>{r(!0),l("");try{if(!T){l("Please log in to access mail"),t([]),h(0);return}const z={Authorization:`Bearer ${T}`},[$,L]=await Promise.all([fetch("/api/v1/mail/inbox?limit=50",{headers:z}),fetch("/api/v1/mail/unread-count",{headers:z})]),K=await $.json();if($.status===503){l(K.error||"Mail integration not configured"),t([]),h(0);return}if(!$.ok){if($.status===401){l("Please log in to access mail"),t([]),h(0);return}throw new Error(K.error||"Failed to fetch inbox")}if(K.ok&&t(K.messages||[]),L.ok){const H=await L.json();H.ok&&h(H.count||0)}}catch(z){l(z instanceof Error?z.message:"Failed to load mail")}finally{r(!1)}};k.useEffect(()=>{E(),M()},[]);const R=async z=>{try{if(!T)return;const $={Authorization:`Bearer ${T}`};await fetch(`/api/v1/mail/message/${z}/read`,{method:"POST",headers:$}),t(L=>L.map(K=>K.uid===z?{...K,read:!0}:K)),h(L=>Math.max(0,L-1))}catch($){console.error("Failed to mark as read:",$)}},B=z=>{d(z),z.read||R(z.uid)},D=y==="all"?e:e.filter(z=>z.to.some($=>$.includes(y)));if(n)return s.jsxs("div",{className:"space-y-4",children:[s.jsx(Re,{className:"h-12"}),Array.from({length:5}).map((z,$)=>s.jsx(Re,{className:"h-20"},$))]});if(i){const z=i.includes("not configured")||i.includes("IMAP"),$=i.includes("log in")||i.includes("authorization")||i.includes("missing authorization");return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-center max-w-md px-4",children:z?s.jsxs(s.Fragment,{children:[s.jsx(mg,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-text-primary mb-2",children:"Mail not configured"}),s.jsx("p",{className:"text-text-secondary mb-4",children:i}),s.jsx("p",{className:"text-sm text-text-tertiary",children:"Contact your administrator to set up IMAP integration."})]}):$?s.jsxs(s.Fragment,{children:[s.jsx(If,{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(If,{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(Ra,{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(Ye,{icon:s.jsx(sF,{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(_e,{variant:"primary",children:"New"})]}),s.jsx("div",{className:"border-t border-border-subtle pt-4",children:s.jsx("p",{className:"text-text-primary whitespace-pre-wrap",children:c.body})})]})}),s.jsx(jR,{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(Ye,{icon:s.jsx(Gm,{size:16}),onClick:()=>{_(void 0),A(!0)},children:"Nytt meddelande"})]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>S(!w),className:"w-full flex items-center justify-between p-3 bg-surface rounded-lg border border-border hover:border-border-hover transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(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(If,{size:16}),s.jsx("span",{children:"All Mailboxes"}),s.jsx(_e,{variant:"default",className:"ml-auto",children:e.length})]})}),p.map(z=>s.jsx("button",{onClick:()=>{j(z),S(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors ${y===z?"bg-accent/10 text-accent":""}`,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(An,{size:16}),s.jsx("span",{className:"text-sm",children:z})]})},z))]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(If,{size:18,className:"text-text-secondary"}),s.jsxs("span",{className:"text-sm text-text-secondary",children:[D.length," messages"]})]}),f>0&&s.jsxs(_e,{variant:"primary",children:[f," unread"]})]}),s.jsx("button",{onClick:M,className:"p-2 hover:bg-surface rounded-lg transition-colors",title:"Refresh",children:s.jsx(Ra,{size:18,className:"text-text-secondary"})})]}),s.jsx("div",{className:"space-y-2",children:D.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(mg,{size:48,className:"mx-auto text-text-tertiary mb-4"}),s.jsx("p",{className:"text-text-secondary",children:"No messages"})]}):D.map(z=>s.jsx("button",{onClick:()=>B(z),className:`w-full text-left p-4 rounded-lg border transition-colors hover:bg-surface-hover ${z.read?"bg-surface border-border-subtle":"bg-surface border-border hover:border-border-hover"}`,children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-1",children:z.read?s.jsx(mg,{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:[!z.read&&s.jsx(_e,{variant:"primary",className:"shrink-0",children:"New"}),s.jsx("span",{className:`font-medium truncate ${z.read?"text-text-secondary":"text-text-primary"}`,children:z.from}),s.jsx("span",{className:"text-text-tertiary text-sm shrink-0",children:Nt(z.date)})]}),s.jsx("p",{className:`font-medium truncate ${z.read?"text-text-secondary":"text-text-primary"}`,children:z.subject}),s.jsx("p",{className:"text-sm text-text-tertiary truncate",children:z.preview}),z.attachments>0&&s.jsx("div",{className:"flex items-center gap-1 mt-1",children:s.jsxs("span",{className:"text-xs text-text-tertiary",children:[z.attachments," attachment",z.attachments>1?"s":""]})})]})]})},z.uid))}),s.jsx(jR,{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 Wue(){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(UH,{size:20}):s.jsx(Jr,{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(Ns,{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(Ns,{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(Ns,{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(WH,{size:24,className:"text-warning shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-text-secondary mb-3",children:"If you've forgotten your mail password, you can reset it through the Mailu admin panel or contact your system administrator."}),s.jsx("a",{href:"https://mail.aamos.systems/admin",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm",children:"Open Mailu Admin →"})]})]})})]}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx(Ye,{onClick:x,disabled:i||!e.email||!e.password,variant:"secondary",className:"flex-1",children:i?"Testing...":"Test Connection"}),s.jsx(Ye,{onClick:p,disabled:n||!e.email||!e.password,className:"flex-1",children:n?"Saving...":"Save Configuration"})]})]})}const wR={instagram:s.jsx(z5,{size:20}),twitter:s.jsx(dF,{size:20}),facebook:s.jsx(D5,{size:20}),linkedin:s.jsx(L5,{size:20}),tiktok:s.jsx(gn,{size:20})},SR={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 Zue(){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(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"}),s.jsx(Re,{className:"h-[80px]"})]}),s.jsx(Re,{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(Ye,{icon:s.jsx(Ir,{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(Lr,{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(yh,{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(sE,{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(Ye,{icon:s.jsx(Ir,{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 ${SR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white`,children:wR[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(_e,{variant:v.is_connected?"success":"default",children:v.is_connected?"Connected":"Disconnected"})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.followers.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Followers"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.following.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Following"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-lg font-semibold text-text-primary",children:v.posts.toLocaleString()}),s.jsx("p",{className:"text-xs text-text-secondary",children:"Posts"})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs text-text-tertiary",children:["Last synced: ",v.last_synced?new Date(v.last_synced).toLocaleDateString():"Never"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",onClick:()=>window.open(v.profile_url,"_blank"),children:s.jsx(HH,{size:16})}),s.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg hover:bg-bg text-text-secondary",children:s.jsx(Ra,{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(yh,{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 ${SR[v.platform]||"bg-gray-500"} flex items-center justify-center text-white flex-shrink-0`,children:wR[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(sE,{size:14}),v.likes]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(yh,{size:14}),v.comments]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(yS,{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(Ra,{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 Que(){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(pu,{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(Ns,{value:n,onChange:p=>r(p.target.value),onKeyDown:p=>p.key==="Enter"&&f(),placeholder:"Skriv ett meddelande...",className:"flex-1"}),s.jsx(Ye,{icon:i?s.jsx(Rh,{size:16,className:"animate-spin"}):s.jsx(Gm,{size:16}),onClick:f,disabled:i||!n.trim(),children:"Skicka"})]})]})}function Jue(){return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Projects"}),s.jsx(te,{className:"p-6",children:s.jsx("p",{className:"text-gray-500",children:"Project management coming soon..."})})]})}function ede({children:e}){const{isAuthenticated:t}=Br();return t?s.jsx(s.Fragment,{children:e}):s.jsx(kw,{to:"/login",replace:!0})}function tde({children:e}){const{isAuthenticated:t}=Br();return t?s.jsx(kw,{to:"/",replace:!0}):s.jsx(s.Fragment,{children:e})}function nde(){return s.jsxs(WI,{children:[s.jsx(wt,{path:"/login",element:s.jsx(tde,{children:s.jsx(cG,{})})}),s.jsxs(wt,{element:s.jsx(ede,{children:s.jsx(iG,{})}),children:[s.jsx(wt,{path:"/",element:s.jsx(wG,{})}),s.jsx(wt,{path:"/dashboard",element:s.jsx(pG,{})}),s.jsx(wt,{path:"/crm",element:s.jsx(OG,{})}),s.jsx(wt,{path:"/sales",element:s.jsx(hue,{})}),s.jsx(wt,{path:"/finance",element:s.jsx(pue,{})}),s.jsx(wt,{path:"/hr",element:s.jsx(gue,{})}),s.jsx(wt,{path:"/legal",element:s.jsx(vue,{})}),s.jsx(wt,{path:"/marketing",element:s.jsx(Mue,{})}),s.jsx(wt,{path:"/support",element:s.jsx(Rue,{})}),s.jsx(wt,{path:"/projects",element:s.jsx(Jue,{})}),s.jsx(wt,{path:"/automation",element:s.jsx(Bue,{})}),s.jsx(wt,{path:"/amos",element:s.jsx(Iue,{})}),s.jsx(wt,{path:"/quixzoom",element:s.jsx(que,{})}),s.jsx(wt,{path:"/landvex",element:s.jsx(Uue,{})}),s.jsx(wt,{path:"/compliance",element:s.jsx(Vue,{})}),s.jsx(wt,{path:"/accounting",element:s.jsx(Yue,{})}),s.jsx(wt,{path:"/mail",element:s.jsx(Xue,{})}),s.jsx(wt,{path:"/mail/settings",element:s.jsx(Wue,{})}),s.jsx(wt,{path:"/social",element:s.jsx(Zue,{})}),s.jsx(wt,{path:"/alva",element:s.jsx(Que,{})}),s.jsx(wt,{path:"/profile",element:s.jsx(SG,{})})]}),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()});YB.createRoot(document.getElementById("root")).render(s.jsx(k.StrictMode,{children:s.jsx(jq,{children:s.jsx(nde,{})})}));
|