var J2=e=>{throw TypeError(e)};var bv=(e,t,n)=>t.has(e)||J2("Cannot "+n);var D=(e,t,n)=>(bv(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?J2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),te=(e,t,n,r)=>(bv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Te=(e,t,n)=>(bv(e,t,"access private method"),n);var bh=(e,t,n,r)=>({set _(a){te(e,t,a,n)},get _(){return D(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Sh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mM={exports:{}},Fg={};/**
 * @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 GI=Symbol.for("react.transitional.element"),YI=Symbol.for("react.fragment");function gM(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:GI,type:e,key:r,ref:t!==void 0?t:null,props:n}}Fg.Fragment=YI;Fg.jsx=gM;Fg.jsxs=gM;mM.exports=Fg;var l=mM.exports,yM={exports:{}},Se={};/**
 * @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 LS=Symbol.for("react.transitional.element"),WI=Symbol.for("react.portal"),XI=Symbol.for("react.fragment"),QI=Symbol.for("react.strict_mode"),ZI=Symbol.for("react.profiler"),JI=Symbol.for("react.consumer"),ez=Symbol.for("react.context"),tz=Symbol.for("react.forward_ref"),nz=Symbol.for("react.suspense"),rz=Symbol.for("react.memo"),vM=Symbol.for("react.lazy"),az=Symbol.for("react.activity"),eA=Symbol.iterator;function iz(e){return e===null||typeof e!="object"?null:(e=eA&&e[eA]||e["@@iterator"],typeof e=="function"?e:null)}var xM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bM=Object.assign,SM={};function Lc(e,t,n){this.props=e,this.context=t,this.refs=SM,this.updater=n||xM}Lc.prototype.isReactComponent={};Lc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Lc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wM(){}wM.prototype=Lc.prototype;function IS(e,t,n){this.props=e,this.context=t,this.refs=SM,this.updater=n||xM}var zS=IS.prototype=new wM;zS.constructor=IS;bM(zS,Lc.prototype);zS.isPureReactComponent=!0;var tA=Array.isArray;function mb(){}var ot={H:null,A:null,T:null,S:null},jM=Object.prototype.hasOwnProperty;function BS(e,t,n){var r=n.ref;return{$$typeof:LS,type:e,key:t,ref:r!==void 0?r:null,props:n}}function sz(e,t){return BS(e.type,t,e.props)}function US(e){return typeof e=="object"&&e!==null&&e.$$typeof===LS}function oz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var nA=/\/+/g;function Sv(e,t){return typeof e=="object"&&e!==null&&e.key!=null?oz(""+e.key):t.toString(36)}function lz(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(mb,mb):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Xo(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case LS:case WI:s=!0;break;case vM:return s=e._init,Xo(s(e._payload),t,n,r,a)}}if(s)return a=a(e),s=r===""?"."+Sv(e,0):r,tA(a)?(n="",s!=null&&(n=s.replace(nA,"$&/")+"/"),Xo(a,t,n,"",function(u){return u})):a!=null&&(US(a)&&(a=sz(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(nA,"$&/")+"/")+s)),t.push(a)),1;s=0;var o=r===""?".":r+":";if(tA(e))for(var c=0;c<e.length;c++)r=e[c],i=o+Sv(r,c),s+=Xo(r,t,n,i,a);else if(c=iz(e),typeof c=="function")for(e=c.call(e),c=0;!(r=e.next()).done;)r=r.value,i=o+Sv(r,c++),s+=Xo(r,t,n,i,a);else if(i==="object"){if(typeof e.then=="function")return Xo(lz(e),t,n,r,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function wh(e,t,n){if(e==null)return e;var r=[],a=0;return Xo(e,r,"","",function(i){return t.call(n,i,a++)}),r}function cz(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var rA=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},uz={map:wh,forEach:function(e,t,n){wh(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return wh(e,function(){t++}),t},toArray:function(e){return wh(e,function(t){return t})||[]},only:function(e){if(!US(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Activity=az;Se.Children=uz;Se.Component=Lc;Se.Fragment=XI;Se.Profiler=ZI;Se.PureComponent=IS;Se.StrictMode=QI;Se.Suspense=nz;Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ot;Se.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ot.H.useMemoCache(e)}};Se.cache=function(e){return function(){return e.apply(null,arguments)}};Se.cacheSignal=function(){return null};Se.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=bM({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!jM.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var s=Array(i),o=0;o<i;o++)s[o]=arguments[o+2];r.children=s}return BS(e.type,a,r)};Se.createContext=function(e){return e={$$typeof:ez,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:JI,_context:e},e};Se.createElement=function(e,t,n){var r,a={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)jM.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(a[r]=t[r]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var o=Array(s),c=0;c<s;c++)o[c]=arguments[c+2];a.children=o}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)a[r]===void 0&&(a[r]=s[r]);return BS(e,i,a)};Se.createRef=function(){return{current:null}};Se.forwardRef=function(e){return{$$typeof:tz,render:e}};Se.isValidElement=US;Se.lazy=function(e){return{$$typeof:vM,_payload:{_status:-1,_result:e},_init:cz}};Se.memo=function(e,t){return{$$typeof:rz,type:e,compare:t===void 0?null:t}};Se.startTransition=function(e){var t=ot.T,n={};ot.T=n;try{var r=e(),a=ot.S;a!==null&&a(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(mb,rA)}catch(i){rA(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),ot.T=t}};Se.unstable_useCacheRefresh=function(){return ot.H.useCacheRefresh()};Se.use=function(e){return ot.H.use(e)};Se.useActionState=function(e,t,n){return ot.H.useActionState(e,t,n)};Se.useCallback=function(e,t){return ot.H.useCallback(e,t)};Se.useContext=function(e){return ot.H.useContext(e)};Se.useDebugValue=function(){};Se.useDeferredValue=function(e,t){return ot.H.useDeferredValue(e,t)};Se.useEffect=function(e,t){return ot.H.useEffect(e,t)};Se.useEffectEvent=function(e){return ot.H.useEffectEvent(e)};Se.useId=function(){return ot.H.useId()};Se.useImperativeHandle=function(e,t,n){return ot.H.useImperativeHandle(e,t,n)};Se.useInsertionEffect=function(e,t){return ot.H.useInsertionEffect(e,t)};Se.useLayoutEffect=function(e,t){return ot.H.useLayoutEffect(e,t)};Se.useMemo=function(e,t){return ot.H.useMemo(e,t)};Se.useOptimistic=function(e,t){return ot.H.useOptimistic(e,t)};Se.useReducer=function(e,t,n){return ot.H.useReducer(e,t,n)};Se.useRef=function(e){return ot.H.useRef(e)};Se.useState=function(e){return ot.H.useState(e)};Se.useSyncExternalStore=function(e,t,n){return ot.H.useSyncExternalStore(e,t,n)};Se.useTransition=function(){return ot.H.useTransition()};Se.version="19.2.7";yM.exports=Se;var j=yM.exports;const P=Fe(j);var AM={exports:{}},Vg={},OM={exports:{}},NM={};/**
 * @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.
 */(function(e){function t(M,L){var z=M.length;M.push(L);e:for(;0<z;){var V=z-1>>>1,K=M[V];if(0<a(K,L))M[V]=L,M[z]=K,z=V;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var L=M[0],z=M.pop();if(z!==L){M[0]=z;e:for(var V=0,K=M.length,U=K>>>1;V<U;){var G=2*(V+1)-1,ne=M[G],J=G+1,ve=M[J];if(0>a(ne,z))J<K&&0>a(ve,ne)?(M[V]=ve,M[J]=z,V=J):(M[V]=ne,M[G]=z,V=G);else if(J<K&&0>a(ve,z))M[V]=ve,M[J]=z,V=J;else break e}}return L}function a(M,L){var z=M.sortIndex-L.sortIndex;return z!==0?z:M.id-L.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var c=[],u=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function w(M){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=M)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function S(M){if(m=!1,w(M),!g)if(n(c)!==null)g=!0,A||(A=!0,C());else{var L=n(u);L!==null&&k(S,L.startTime-M)}}var A=!1,O=-1,N=5,E=-1;function T(){return v?!0:!(e.unstable_now()-E<N)}function _(){if(v=!1,A){var M=e.unstable_now();E=M;var L=!0;try{e:{g=!1,m&&(m=!1,x(O),O=-1),p=!0;var z=h;try{t:{for(w(M),f=n(c);f!==null&&!(f.expirationTime>M&&T());){var V=f.callback;if(typeof V=="function"){f.callback=null,h=f.priorityLevel;var K=V(f.expirationTime<=M);if(M=e.unstable_now(),typeof K=="function"){f.callback=K,w(M),L=!0;break t}f===n(c)&&r(c),w(M)}else r(c);f=n(c)}if(f!==null)L=!0;else{var U=n(u);U!==null&&k(S,U.startTime-M),L=!1}}break e}finally{f=null,h=z,p=!1}L=void 0}}finally{L?C():A=!1}}}var C;if(typeof b=="function")C=function(){b(_)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,R=$.port2;$.port1.onmessage=_,C=function(){R.postMessage(null)}}else C=function(){y(_,0)};function k(M,L){O=y(function(){M(e.unstable_now())},L)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var L=3;break;default:L=h}var z=h;h=L;try{return M()}finally{h=z}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(M,L){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var z=h;h=M;try{return L()}finally{h=z}},e.unstable_scheduleCallback=function(M,L,z){var V=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?V+z:V):z=V,M){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=z+K,M={id:d++,callback:L,priorityLevel:M,startTime:z,expirationTime:K,sortIndex:-1},z>V?(M.sortIndex=z,t(u,M),n(c)===null&&M===n(u)&&(m?(x(O),O=-1):m=!0,k(S,z-V))):(M.sortIndex=K,t(c,M),g||p||(g=!0,A||(A=!0,C()))),M},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(M){var L=h;return function(){var z=h;h=L;try{return M.apply(this,arguments)}finally{h=z}}}})(NM);OM.exports=NM;var dz=OM.exports,EM={exports:{}},Sn={};/**
 * @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 fz=j;function TM(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function mi(){}var mn={d:{f:mi,r:function(){throw Error(TM(522))},D:mi,C:mi,L:mi,m:mi,X:mi,S:mi,M:mi},p:0,findDOMNode:null},hz=Symbol.for("react.portal");function pz(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:hz,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Yu=fz.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Hg(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=mn;Sn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(TM(299));return pz(e,t,null,n)};Sn.flushSync=function(e){var t=Yu.T,n=mn.p;try{if(Yu.T=null,mn.p=2,e)return e()}finally{Yu.T=t,mn.p=n,mn.d.f()}};Sn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,mn.d.C(e,t))};Sn.prefetchDNS=function(e){typeof e=="string"&&mn.d.D(e)};Sn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Hg(n,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?mn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:i}):n==="script"&&mn.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Sn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Hg(t.as,t.crossOrigin);mn.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&mn.d.M(e)};Sn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Hg(n,t.crossOrigin);mn.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Sn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Hg(t.as,t.crossOrigin);mn.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else mn.d.m(e)};Sn.requestFormReset=function(e){mn.d.r(e)};Sn.unstable_batchedUpdates=function(e,t){return e(t)};Sn.useFormState=function(e,t,n){return Yu.H.useFormState(e,t,n)};Sn.useFormStatus=function(){return Yu.H.useHostTransitionStatus()};Sn.version="19.2.7";function CM(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(CM)}catch(e){console.error(e)}}CM(),EM.exports=Sn;var mz=EM.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 zt=dz,_M=j,gz=mz;function H(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function PM(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Lf(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function MM(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function kM(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function aA(e){if(Lf(e)!==e)throw Error(H(188))}function yz(e){var t=e.alternate;if(!t){if(t=Lf(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return aA(a),e;if(i===r)return aA(a),t;i=i.sibling}throw Error(H(188))}if(n.return!==r.return)n=a,r=i;else{for(var s=!1,o=a.child;o;){if(o===n){s=!0,n=a,r=i;break}if(o===r){s=!0,r=a,n=i;break}o=o.sibling}if(!s){for(o=i.child;o;){if(o===n){s=!0,n=i,r=a;break}if(o===r){s=!0,r=i,n=a;break}o=o.sibling}if(!s)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function RM(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=RM(e),t!==null)return t;e=e.sibling}return null}var lt=Object.assign,vz=Symbol.for("react.element"),jh=Symbol.for("react.transitional.element"),$u=Symbol.for("react.portal"),el=Symbol.for("react.fragment"),DM=Symbol.for("react.strict_mode"),gb=Symbol.for("react.profiler"),$M=Symbol.for("react.consumer"),$a=Symbol.for("react.context"),FS=Symbol.for("react.forward_ref"),yb=Symbol.for("react.suspense"),vb=Symbol.for("react.suspense_list"),VS=Symbol.for("react.memo"),bi=Symbol.for("react.lazy"),xb=Symbol.for("react.activity"),xz=Symbol.for("react.memo_cache_sentinel"),iA=Symbol.iterator;function fu(e){return e===null||typeof e!="object"?null:(e=iA&&e[iA]||e["@@iterator"],typeof e=="function"?e:null)}var bz=Symbol.for("react.client.reference");function bb(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===bz?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case el:return"Fragment";case gb:return"Profiler";case DM:return"StrictMode";case yb:return"Suspense";case vb:return"SuspenseList";case xb:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case $u:return"Portal";case $a:return e.displayName||"Context";case $M:return(e._context.displayName||"Context")+".Consumer";case FS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case VS:return t=e.displayName||null,t!==null?t:bb(e.type)||"Memo";case bi:t=e._payload,e=e._init;try{return bb(e(t))}catch{}}return null}var Lu=Array.isArray,me=_M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ie=gz.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Xs={pending:!1,data:null,method:null,action:null},Sb=[],tl=-1;function ga(e){return{current:e}}function Yt(e){0>tl||(e.current=Sb[tl],Sb[tl]=null,tl--)}function tt(e,t){tl++,Sb[tl]=e.current,e.current=t}var la=ga(null),jd=ga(null),Vi=ga(null),Fp=ga(null);function Vp(e,t){switch(tt(Vi,t),tt(jd,e),tt(la,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dO(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dO(t),e=nD(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Yt(la),tt(la,e)}function Gl(){Yt(la),Yt(jd),Yt(Vi)}function wb(e){e.memoizedState!==null&&tt(Fp,e);var t=la.current,n=nD(t,e.type);t!==n&&(tt(jd,e),tt(la,n))}function Hp(e){jd.current===e&&(Yt(la),Yt(jd)),Fp.current===e&&(Yt(Fp),Rd._currentValue=Xs)}var wv,sA;function ws(e){if(wv===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);wv=t&&t[1]||"",sA=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+wv+e+sA}var jv=!1;function Av(e,t){if(!e||jv)return"";jv=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(p){var h=p}Reflect.construct(e,[],f)}else{try{f.call()}catch(p){h=p}e.call(f.prototype)}}else{try{throw Error()}catch(p){h=p}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(p){if(p&&h&&typeof p.stack=="string")return[p.stack,h.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),s=i[0],o=i[1];if(s&&o){var c=s.split(`
`),u=o.split(`
`);for(a=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;if(r===c.length||a===u.length)for(r=c.length-1,a=u.length-1;1<=r&&0<=a&&c[r]!==u[a];)a--;for(;1<=r&&0<=a;r--,a--)if(c[r]!==u[a]){if(r!==1||a!==1)do if(r--,a--,0>a||c[r]!==u[a]){var d=`
`+c[r].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=r&&0<=a);break}}}finally{jv=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ws(n):""}function Sz(e,t){switch(e.tag){case 26:case 27:case 5:return ws(e.type);case 16:return ws("Lazy");case 13:return e.child!==t&&t!==null?ws("Suspense Fallback"):ws("Suspense");case 19:return ws("SuspenseList");case 0:case 15:return Av(e.type,!1);case 11:return Av(e.type.render,!1);case 1:return Av(e.type,!0);case 31:return ws("Activity");default:return""}}function oA(e){try{var t="",n=null;do t+=Sz(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
Error generating stack: `+r.message+`
`+r.stack}}var jb=Object.prototype.hasOwnProperty,HS=zt.unstable_scheduleCallback,Ov=zt.unstable_cancelCallback,wz=zt.unstable_shouldYield,jz=zt.unstable_requestPaint,Wn=zt.unstable_now,Az=zt.unstable_getCurrentPriorityLevel,LM=zt.unstable_ImmediatePriority,IM=zt.unstable_UserBlockingPriority,qp=zt.unstable_NormalPriority,Oz=zt.unstable_LowPriority,zM=zt.unstable_IdlePriority,Nz=zt.log,Ez=zt.unstable_setDisableYieldValue,If=null,Xn=null;function $i(e){if(typeof Nz=="function"&&Ez(e),Xn&&typeof Xn.setStrictMode=="function")try{Xn.setStrictMode(If,e)}catch{}}var Qn=Math.clz32?Math.clz32:_z,Tz=Math.log,Cz=Math.LN2;function _z(e){return e>>>=0,e===0?32:31-(Tz(e)/Cz|0)|0}var Ah=256,Oh=262144,Nh=4194304;function js(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qg(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=js(r):(s&=o,s!==0?a=js(s):n||(n=o&~e,n!==0&&(a=js(n))))):(o=r&~i,o!==0?a=js(o):s!==0?a=js(s):n||(n=r&~e,n!==0&&(a=js(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function zf(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pz(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 BM(){var e=Nh;return Nh<<=1,!(Nh&62914560)&&(Nh=4194304),e}function Nv(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bf(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Mz(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=s&~n;0<n;){var d=31-Qn(n),f=1<<d;o[d]=0,c[d]=-1;var h=u[d];if(h!==null)for(u[d]=null,d=0;d<h.length;d++){var p=h[d];p!==null&&(p.lane&=-536870913)}n&=~f}r!==0&&UM(e,r,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function UM(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function FM(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qn(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function VM(e,t){var n=t&-t;return n=n&42?1:qS(n),n&(e.suspendedLanes|t)?0:n}function qS(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function KS(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function HM(){var e=Ie.p;return e!==0?e:(e=window.event,e===void 0?32:hD(e.type))}function lA(e,t){var n=Ie.p;try{return Ie.p=e,t()}finally{Ie.p=n}}var os=Math.random().toString(36).slice(2),tn="__reactFiber$"+os,kn="__reactProps$"+os,Ic="__reactContainer$"+os,Ab="__reactEvents$"+os,kz="__reactListeners$"+os,Rz="__reactHandles$"+os,cA="__reactResources$"+os,Uf="__reactMarker$"+os;function GS(e){delete e[tn],delete e[kn],delete e[Ab],delete e[kz],delete e[Rz]}function nl(e){var t=e[tn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ic]||n[tn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gO(e);e!==null;){if(n=e[tn])return n;e=gO(e)}return t}e=n,n=e.parentNode}return null}function zc(e){if(e=e[tn]||e[Ic]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Iu(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(H(33))}function wl(e){var t=e[cA];return t||(t=e[cA]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Kt(e){e[Uf]=!0}var qM=new Set,KM={};function jo(e,t){Yl(e,t),Yl(e+"Capture",t)}function Yl(e,t){for(KM[e]=t,e=0;e<t.length;e++)qM.add(t[e])}var Dz=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]*$"),uA={},dA={};function $z(e){return jb.call(dA,e)?!0:jb.call(uA,e)?!1:Dz.test(e)?dA[e]=!0:(uA[e]=!0,!1)}function pp(e,t,n){if($z(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Eh(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function ja(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function fr(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function GM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lz(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ob(e){if(!e._valueTracker){var t=GM(e)?"checked":"value";e._valueTracker=Lz(e,t,""+e[t])}}function YM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=GM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Kp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Iz=/[\n"\\]/g;function mr(e){return e.replace(Iz,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Nb(e,t,n,r,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fr(t)):e.value!==""+fr(t)&&(e.value=""+fr(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Eb(e,s,fr(t)):n!=null?Eb(e,s,fr(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+fr(o):e.removeAttribute("name")}function WM(e,t,n,r,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Ob(e);return}n=n!=null?""+fr(n):"",t=t!=null?""+fr(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Ob(e)}function Eb(e,t,n){t==="number"&&Kp(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function jl(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fr(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function XM(e,t,n){if(t!=null&&(t=""+fr(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+fr(n):""}function QM(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(H(92));if(Lu(r)){if(1<r.length)throw Error(H(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=fr(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Ob(e)}function Wl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zz=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 fA(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||zz.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ZM(e,t,n){if(t!=null&&typeof t!="object")throw Error(H(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&fA(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&fA(e,i,t[i])}function YS(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Bz=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"]]),Uz=/^[\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 mp(e){return Uz.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function La(){}var Tb=null;function WS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rl=null,Al=null;function hA(e){var t=zc(e);if(t&&(e=t.stateNode)){var n=e[kn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Nb(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+mr(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[kn]||null;if(!a)throw Error(H(90));Nb(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&YM(r)}break e;case"textarea":XM(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&jl(e,!!n.multiple,t,!1)}}}var Ev=!1;function JM(e,t,n){if(Ev)return e(t,n);Ev=!0;try{var r=e(t);return r}finally{if(Ev=!1,(rl!==null||Al!==null)&&(ry(),rl&&(t=rl,e=Al,Al=rl=null,hA(t),e)))for(t=0;t<e.length;t++)hA(e[t])}}function Ad(e,t){var n=e.stateNode;if(n===null)return null;var r=n[kn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var Qa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cb=!1;if(Qa)try{var hu={};Object.defineProperty(hu,"passive",{get:function(){Cb=!0}}),window.addEventListener("test",hu,hu),window.removeEventListener("test",hu,hu)}catch{Cb=!1}var Li=null,XS=null,gp=null;function ek(){if(gp)return gp;var e,t=XS,n=t.length,r,a="value"in Li?Li.value:Li.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===a[i-r];r++);return gp=a.slice(e,1<r?1-r:void 0)}function yp(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Th(){return!0}function pA(){return!1}function Dn(e){function t(n,r,a,i,s){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Th:pA,this.isPropagationStopped=pA,this}return lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Th)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Th)},persist:function(){},isPersistent:Th}),t}var Ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kg=Dn(Ao),Ff=lt({},Ao,{view:0,detail:0}),Fz=Dn(Ff),Tv,Cv,pu,Gg=lt({},Ff,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:QS,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pu&&(pu&&e.type==="mousemove"?(Tv=e.screenX-pu.screenX,Cv=e.screenY-pu.screenY):Cv=Tv=0,pu=e),Tv)},movementY:function(e){return"movementY"in e?e.movementY:Cv}}),mA=Dn(Gg),Vz=lt({},Gg,{dataTransfer:0}),Hz=Dn(Vz),qz=lt({},Ff,{relatedTarget:0}),_v=Dn(qz),Kz=lt({},Ao,{animationName:0,elapsedTime:0,pseudoElement:0}),Gz=Dn(Kz),Yz=lt({},Ao,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wz=Dn(Yz),Xz=lt({},Ao,{data:0}),gA=Dn(Xz),Qz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zz={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"},Jz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e8(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jz[e])?!!t[e]:!1}function QS(){return e8}var t8=lt({},Ff,{key:function(e){if(e.key){var t=Qz[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zz[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:QS,charCode:function(e){return e.type==="keypress"?yp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),n8=Dn(t8),r8=lt({},Gg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yA=Dn(r8),a8=lt({},Ff,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:QS}),i8=Dn(a8),s8=lt({},Ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),o8=Dn(s8),l8=lt({},Gg,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),c8=Dn(l8),u8=lt({},Ao,{newState:0,oldState:0}),d8=Dn(u8),f8=[9,13,27,32],ZS=Qa&&"CompositionEvent"in window,Wu=null;Qa&&"documentMode"in document&&(Wu=document.documentMode);var h8=Qa&&"TextEvent"in window&&!Wu,tk=Qa&&(!ZS||Wu&&8<Wu&&11>=Wu),vA=" ",xA=!1;function nk(e,t){switch(e){case"keyup":return f8.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var al=!1;function p8(e,t){switch(e){case"compositionend":return rk(t);case"keypress":return t.which!==32?null:(xA=!0,vA);case"textInput":return e=t.data,e===vA&&xA?null:e;default:return null}}function m8(e,t){if(al)return e==="compositionend"||!ZS&&nk(e,t)?(e=ek(),gp=XS=Li=null,al=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return tk&&t.locale!=="ko"?null:t.data;default:return null}}var g8={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 bA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!g8[e.type]:t==="textarea"}function ak(e,t,n,r){rl?Al?Al.push(r):Al=[r]:rl=r,t=um(t,"onChange"),0<t.length&&(n=new Kg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xu=null,Od=null;function y8(e){JR(e,0)}function Yg(e){var t=Iu(e);if(YM(t))return e}function SA(e,t){if(e==="change")return t}var ik=!1;if(Qa){var Pv;if(Qa){var Mv="oninput"in document;if(!Mv){var wA=document.createElement("div");wA.setAttribute("oninput","return;"),Mv=typeof wA.oninput=="function"}Pv=Mv}else Pv=!1;ik=Pv&&(!document.documentMode||9<document.documentMode)}function jA(){Xu&&(Xu.detachEvent("onpropertychange",sk),Od=Xu=null)}function sk(e){if(e.propertyName==="value"&&Yg(Od)){var t=[];ak(t,Od,e,WS(e)),JM(y8,t)}}function v8(e,t,n){e==="focusin"?(jA(),Xu=t,Od=n,Xu.attachEvent("onpropertychange",sk)):e==="focusout"&&jA()}function x8(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yg(Od)}function b8(e,t){if(e==="click")return Yg(t)}function S8(e,t){if(e==="input"||e==="change")return Yg(t)}function w8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tr=typeof Object.is=="function"?Object.is:w8;function Nd(e,t){if(tr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!jb.call(t,a)||!tr(e[a],t[a]))return!1}return!0}function AA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function OA(e,t){var n=AA(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=AA(n)}}function ok(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ok(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lk(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kp(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kp(e.document)}return t}function JS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var j8=Qa&&"documentMode"in document&&11>=document.documentMode,il=null,_b=null,Qu=null,Pb=!1;function NA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pb||il==null||il!==Kp(r)||(r=il,"selectionStart"in r&&JS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qu&&Nd(Qu,r)||(Qu=r,r=um(_b,"onSelect"),0<r.length&&(t=new Kg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=il)))}function ys(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sl={animationend:ys("Animation","AnimationEnd"),animationiteration:ys("Animation","AnimationIteration"),animationstart:ys("Animation","AnimationStart"),transitionrun:ys("Transition","TransitionRun"),transitionstart:ys("Transition","TransitionStart"),transitioncancel:ys("Transition","TransitionCancel"),transitionend:ys("Transition","TransitionEnd")},kv={},ck={};Qa&&(ck=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function Oo(e){if(kv[e])return kv[e];if(!sl[e])return e;var t=sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ck)return kv[e]=t[n];return e}var uk=Oo("animationend"),dk=Oo("animationiteration"),fk=Oo("animationstart"),A8=Oo("transitionrun"),O8=Oo("transitionstart"),N8=Oo("transitioncancel"),hk=Oo("transitionend"),pk=new Map,Mb="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(" ");Mb.push("scrollEnd");function Hr(e,t){pk.set(e,t),jo(t,[e])}var Gp=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},dr=[],ol=0,ew=0;function Wg(){for(var e=ol,t=ew=ol=0;t<e;){var n=dr[t];dr[t++]=null;var r=dr[t];dr[t++]=null;var a=dr[t];dr[t++]=null;var i=dr[t];if(dr[t++]=null,r!==null&&a!==null){var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}i!==0&&mk(n,a,i)}}function Xg(e,t,n,r){dr[ol++]=e,dr[ol++]=t,dr[ol++]=n,dr[ol++]=r,ew|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function tw(e,t,n,r){return Xg(e,t,n,r),Yp(e)}function No(e,t){return Xg(e,null,null,t),Yp(e)}function mk(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Qn(n),e=i.hiddenUpdates,r=e[a],r===null?e[a]=[t]:r.push(t),t.lane=n|536870912),i):null}function Yp(e){if(50<sd)throw sd=0,Jb=null,Error(H(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ll={};function E8(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kn(e,t,n,r){return new E8(e,t,n,r)}function nw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Va(e,t){var n=e.alternate;return n===null?(n=Kn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function gk(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vp(e,t,n,r,a,i){var s=0;if(r=e,typeof e=="function")nw(e)&&(s=1);else if(typeof e=="string")s=MB(e,n,la.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case xb:return e=Kn(31,n,t,a),e.elementType=xb,e.lanes=i,e;case el:return Qs(n.children,a,i,t);case DM:s=8,a|=24;break;case gb:return e=Kn(12,n,t,a|2),e.elementType=gb,e.lanes=i,e;case yb:return e=Kn(13,n,t,a),e.elementType=yb,e.lanes=i,e;case vb:return e=Kn(19,n,t,a),e.elementType=vb,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $a:s=10;break e;case $M:s=9;break e;case FS:s=11;break e;case VS:s=14;break e;case bi:s=16,r=null;break e}s=29,n=Error(H(130,e===null?"null":typeof e,"")),r=null}return t=Kn(s,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function Qs(e,t,n,r){return e=Kn(7,e,r,t),e.lanes=n,e}function Rv(e,t,n){return e=Kn(6,e,null,t),e.lanes=n,e}function yk(e){var t=Kn(18,null,null,0);return t.stateNode=e,t}function Dv(e,t,n){return t=Kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var EA=new WeakMap;function gr(e,t){if(typeof e=="object"&&e!==null){var n=EA.get(e);return n!==void 0?n:(t={value:e,source:t,stack:oA(t)},EA.set(e,t),t)}return{value:e,source:t,stack:oA(t)}}var cl=[],ul=0,Wp=null,Ed=0,hr=[],pr=0,ns=null,ea=1,ta="";function Ma(e,t){cl[ul++]=Ed,cl[ul++]=Wp,Wp=e,Ed=t}function vk(e,t,n){hr[pr++]=ea,hr[pr++]=ta,hr[pr++]=ns,ns=e;var r=ea;e=ta;var a=32-Qn(r)-1;r&=~(1<<a),n+=1;var i=32-Qn(t)+a;if(30<i){var s=a-a%5;i=(r&(1<<s)-1).toString(32),r>>=s,a-=s,ea=1<<32-Qn(t)+a|n<<a|r,ta=i+e}else ea=1<<i|n<<a|r,ta=e}function rw(e){e.return!==null&&(Ma(e,1),vk(e,1,0))}function aw(e){for(;e===Wp;)Wp=cl[--ul],cl[ul]=null,Ed=cl[--ul],cl[ul]=null;for(;e===ns;)ns=hr[--pr],hr[pr]=null,ta=hr[--pr],hr[pr]=null,ea=hr[--pr],hr[pr]=null}function xk(e,t){hr[pr++]=ea,hr[pr++]=ta,hr[pr++]=ns,ea=t.id,ta=t.overflow,ns=e}var nn=null,st=null,Pe=!1,Hi=null,yr=!1,kb=Error(H(519));function rs(e){var t=Error(H(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Td(gr(t,e)),kb}function TA(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[tn]=e,t[kn]=r,n){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(n=0;n<Md.length;n++)je(Md[n],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),WM(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),QM(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||tD(t.textContent,n)?(r.popover!=null&&(je("beforetoggle",t),je("toggle",t)),r.onScroll!=null&&je("scroll",t),r.onScrollEnd!=null&&je("scrollend",t),r.onClick!=null&&(t.onclick=La),t=!0):t=!1,t||rs(e,!0)}function CA(e){for(nn=e.return;nn;)switch(nn.tag){case 5:case 31:case 13:yr=!1;return;case 27:case 3:yr=!0;return;default:nn=nn.return}}function Bo(e){if(e!==nn)return!1;if(!Pe)return CA(e),Pe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||a0(e.type,e.memoizedProps)),n=!n),n&&st&&rs(e),CA(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));st=mO(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));st=mO(e)}else t===27?(t=st,ls(e.type)?(e=l0,l0=null,st=e):st=t):st=nn?Sr(e.stateNode.nextSibling):null;return!0}function so(){st=nn=null,Pe=!1}function $v(){var e=Hi;return e!==null&&(Tn===null?Tn=e:Tn.push.apply(Tn,e),Hi=null),e}function Td(e){Hi===null?Hi=[e]:Hi.push(e)}var Rb=ga(null),Eo=null,Ia=null;function ji(e,t,n){tt(Rb,t._currentValue),t._currentValue=n}function Ha(e){e._currentValue=Rb.current,Yt(Rb)}function Db(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function $b(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var s=a.child;i=i.firstContext;e:for(;i!==null;){var o=i;i=a;for(var c=0;c<t.length;c++)if(o.context===t[c]){i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),Db(i.return,n,e),r||(s=null);break e}i=o.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(H(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),Db(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Bc(e,t,n,r){e=null;for(var a=t,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(H(387));if(s=s.memoizedProps,s!==null){var o=a.type;tr(a.pendingProps.value,s.value)||(e!==null?e.push(o):e=[o])}}else if(a===Fp.current){if(s=a.alternate,s===null)throw Error(H(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Rd):e=[Rd])}a=a.return}e!==null&&$b(t,e,n,r),t.flags|=262144}function Xp(e){for(e=e.firstContext;e!==null;){if(!tr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oo(e){Eo=e,Ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function an(e){return bk(Eo,e)}function Ch(e,t){return Eo===null&&oo(e),bk(e,t)}function bk(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ia===null){if(e===null)throw Error(H(308));Ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ia=Ia.next=t;return n}var T8=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},C8=zt.unstable_scheduleCallback,_8=zt.unstable_NormalPriority,_t={$$typeof:$a,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function iw(){return{controller:new T8,data:new Map,refCount:0}}function Vf(e){e.refCount--,e.refCount===0&&C8(_8,function(){e.controller.abort()})}var Zu=null,Lb=0,Xl=0,Ol=null;function P8(e,t){if(Zu===null){var n=Zu=[];Lb=0,Xl=_w(),Ol={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Lb++,t.then(_A,_A),t}function _A(){if(--Lb===0&&Zu!==null){Ol!==null&&(Ol.status="fulfilled");var e=Zu;Zu=null,Xl=0,Ol=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function M8(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(r.status="rejected",r.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),r}var PA=me.S;me.S=function(e,t){RR=Wn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&P8(e,t),PA!==null&&PA(e,t)};var Zs=ga(null);function sw(){var e=Zs.current;return e!==null?e:Qe.pooledCache}function xp(e,t){t===null?tt(Zs,Zs.current):tt(Zs,t.pool)}function Sk(){var e=sw();return e===null?null:{parent:_t._currentValue,pool:e}}var Uc=Error(H(460)),ow=Error(H(474)),Qg=Error(H(542)),Qp={then:function(){}};function MA(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wk(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(La,La),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,RA(e),e;default:if(typeof t.status=="string")t.then(La,La);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(H(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=r}},function(r){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,RA(e),e}throw Js=t,Uc}}function As(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Js=n,Uc):n}}var Js=null;function kA(){if(Js===null)throw Error(H(459));var e=Js;return Js=null,e}function RA(e){if(e===Uc||e===Qg)throw Error(H(483))}var Nl=null,Cd=0;function _h(e){var t=Cd;return Cd+=1,Nl===null&&(Nl=[]),wk(Nl,e,t)}function mu(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ph(e,t){throw t.$$typeof===vz?Error(H(525)):(e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jk(e){function t(y,x){if(e){var b=y.deletions;b===null?(y.deletions=[x],y.flags|=16):b.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function r(y){for(var x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function a(y,x){return y=Va(y,x),y.index=0,y.sibling=null,y}function i(y,x,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<x?(y.flags|=67108866,x):b):(y.flags|=67108866,x)):(y.flags|=1048576,x)}function s(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function o(y,x,b,w){return x===null||x.tag!==6?(x=Rv(b,y.mode,w),x.return=y,x):(x=a(x,b),x.return=y,x)}function c(y,x,b,w){var S=b.type;return S===el?d(y,x,b.props.children,w,b.key):x!==null&&(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===bi&&As(S)===x.type)?(x=a(x,b.props),mu(x,b),x.return=y,x):(x=vp(b.type,b.key,b.props,null,y.mode,w),mu(x,b),x.return=y,x)}function u(y,x,b,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=Dv(b,y.mode,w),x.return=y,x):(x=a(x,b.children||[]),x.return=y,x)}function d(y,x,b,w,S){return x===null||x.tag!==7?(x=Qs(b,y.mode,w,S),x.return=y,x):(x=a(x,b),x.return=y,x)}function f(y,x,b){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Rv(""+x,y.mode,b),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case jh:return b=vp(x.type,x.key,x.props,null,y.mode,b),mu(b,x),b.return=y,b;case $u:return x=Dv(x,y.mode,b),x.return=y,x;case bi:return x=As(x),f(y,x,b)}if(Lu(x)||fu(x))return x=Qs(x,y.mode,b,null),x.return=y,x;if(typeof x.then=="function")return f(y,_h(x),b);if(x.$$typeof===$a)return f(y,Ch(y,x),b);Ph(y,x)}return null}function h(y,x,b,w){var S=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return S!==null?null:o(y,x,""+b,w);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case jh:return b.key===S?c(y,x,b,w):null;case $u:return b.key===S?u(y,x,b,w):null;case bi:return b=As(b),h(y,x,b,w)}if(Lu(b)||fu(b))return S!==null?null:d(y,x,b,w,null);if(typeof b.then=="function")return h(y,x,_h(b),w);if(b.$$typeof===$a)return h(y,x,Ch(y,b),w);Ph(y,b)}return null}function p(y,x,b,w,S){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return y=y.get(b)||null,o(x,y,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case jh:return y=y.get(w.key===null?b:w.key)||null,c(x,y,w,S);case $u:return y=y.get(w.key===null?b:w.key)||null,u(x,y,w,S);case bi:return w=As(w),p(y,x,b,w,S)}if(Lu(w)||fu(w))return y=y.get(b)||null,d(x,y,w,S,null);if(typeof w.then=="function")return p(y,x,b,_h(w),S);if(w.$$typeof===$a)return p(y,x,b,Ch(x,w),S);Ph(x,w)}return null}function g(y,x,b,w){for(var S=null,A=null,O=x,N=x=0,E=null;O!==null&&N<b.length;N++){O.index>N?(E=O,O=null):E=O.sibling;var T=h(y,O,b[N],w);if(T===null){O===null&&(O=E);break}e&&O&&T.alternate===null&&t(y,O),x=i(T,x,N),A===null?S=T:A.sibling=T,A=T,O=E}if(N===b.length)return n(y,O),Pe&&Ma(y,N),S;if(O===null){for(;N<b.length;N++)O=f(y,b[N],w),O!==null&&(x=i(O,x,N),A===null?S=O:A.sibling=O,A=O);return Pe&&Ma(y,N),S}for(O=r(O);N<b.length;N++)E=p(O,y,N,b[N],w),E!==null&&(e&&E.alternate!==null&&O.delete(E.key===null?N:E.key),x=i(E,x,N),A===null?S=E:A.sibling=E,A=E);return e&&O.forEach(function(_){return t(y,_)}),Pe&&Ma(y,N),S}function m(y,x,b,w){if(b==null)throw Error(H(151));for(var S=null,A=null,O=x,N=x=0,E=null,T=b.next();O!==null&&!T.done;N++,T=b.next()){O.index>N?(E=O,O=null):E=O.sibling;var _=h(y,O,T.value,w);if(_===null){O===null&&(O=E);break}e&&O&&_.alternate===null&&t(y,O),x=i(_,x,N),A===null?S=_:A.sibling=_,A=_,O=E}if(T.done)return n(y,O),Pe&&Ma(y,N),S;if(O===null){for(;!T.done;N++,T=b.next())T=f(y,T.value,w),T!==null&&(x=i(T,x,N),A===null?S=T:A.sibling=T,A=T);return Pe&&Ma(y,N),S}for(O=r(O);!T.done;N++,T=b.next())T=p(O,y,N,T.value,w),T!==null&&(e&&T.alternate!==null&&O.delete(T.key===null?N:T.key),x=i(T,x,N),A===null?S=T:A.sibling=T,A=T);return e&&O.forEach(function(C){return t(y,C)}),Pe&&Ma(y,N),S}function v(y,x,b,w){if(typeof b=="object"&&b!==null&&b.type===el&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case jh:e:{for(var S=b.key;x!==null;){if(x.key===S){if(S=b.type,S===el){if(x.tag===7){n(y,x.sibling),w=a(x,b.props.children),w.return=y,y=w;break e}}else if(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===bi&&As(S)===x.type){n(y,x.sibling),w=a(x,b.props),mu(w,b),w.return=y,y=w;break e}n(y,x);break}else t(y,x);x=x.sibling}b.type===el?(w=Qs(b.props.children,y.mode,w,b.key),w.return=y,y=w):(w=vp(b.type,b.key,b.props,null,y.mode,w),mu(w,b),w.return=y,y=w)}return s(y);case $u:e:{for(S=b.key;x!==null;){if(x.key===S)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(y,x.sibling),w=a(x,b.children||[]),w.return=y,y=w;break e}else{n(y,x);break}else t(y,x);x=x.sibling}w=Dv(b,y.mode,w),w.return=y,y=w}return s(y);case bi:return b=As(b),v(y,x,b,w)}if(Lu(b))return g(y,x,b,w);if(fu(b)){if(S=fu(b),typeof S!="function")throw Error(H(150));return b=S.call(b),m(y,x,b,w)}if(typeof b.then=="function")return v(y,x,_h(b),w);if(b.$$typeof===$a)return v(y,x,Ch(y,b),w);Ph(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,x!==null&&x.tag===6?(n(y,x.sibling),w=a(x,b),w.return=y,y=w):(n(y,x),w=Rv(b,y.mode,w),w.return=y,y=w),s(y)):n(y,x)}return function(y,x,b,w){try{Cd=0;var S=v(y,x,b,w);return Nl=null,S}catch(O){if(O===Uc||O===Qg)throw O;var A=Kn(29,O,null,y.mode);return A.lanes=w,A.return=y,A}finally{}}}var lo=jk(!0),Ak=jk(!1),Si=!1;function lw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ib(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ki(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$e&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Yp(e),mk(e,null,n),t}return Xg(e,r,t,n),Yp(e)}function Ju(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,FM(e,n)}}function Lv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var zb=!1;function ed(){if(zb){var e=Ol;if(e!==null)throw e}}function td(e,t,n,r){zb=!1;var a=e.updateQueue;Si=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,u=c.next;c.next=null,s===null?i=u:s.next=u,s=c;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==s&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=c))}if(i!==null){var f=a.baseState;s=0,d=u=c=null,o=i;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(Ce&h)===h:(r&h)===h){h!==0&&h===Xl&&(zb=!0),d!==null&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var g=e,m=o;h=t;var v=n;switch(m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(v,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(v,f,h):g,h==null)break e;f=lt({},f,h);break e;case 2:Si=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,s|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);d===null&&(c=f),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=d,i===null&&(a.shared.lanes=0),is|=s,e.lanes=s,e.memoizedState=f}}function Ok(e,t){if(typeof e!="function")throw Error(H(191,e));e.call(t)}function Nk(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ok(n[e],t)}var Ql=ga(null),Zp=ga(0);function DA(e,t){e=ti,tt(Zp,e),tt(Ql,t),ti=e|t.baseLanes}function Bb(){tt(Zp,ti),tt(Ql,Ql.current)}function cw(){ti=Zp.current,Yt(Ql),Yt(Zp)}var nr=ga(null),br=null;function Ai(e){var t=e.alternate;tt(jt,jt.current&1),tt(nr,e),br===null&&(t===null||Ql.current!==null||t.memoizedState!==null)&&(br=e)}function Ub(e){tt(jt,jt.current),tt(nr,e),br===null&&(br=e)}function Ek(e){e.tag===22?(tt(jt,jt.current),tt(nr,e),br===null&&(br=e)):Oi()}function Oi(){tt(jt,jt.current),tt(nr,nr.current)}function qn(e){Yt(nr),br===e&&(br=null),Yt(jt)}var jt=ga(0);function Jp(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||s0(n)||o0(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Za=0,we=null,We=null,Tt=null,em=!1,El=!1,co=!1,tm=0,_d=0,Tl=null,k8=0;function yt(){throw Error(H(321))}function uw(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tr(e[n],t[n]))return!1;return!0}function dw(e,t,n,r,a,i){return Za=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,me.H=e===null||e.memoizedState===null?aR:ww,co=!1,i=n(r,a),co=!1,El&&(i=Ck(t,n,r,a)),Tk(e),i}function Tk(e){me.H=Pd;var t=We!==null&&We.next!==null;if(Za=0,Tt=We=we=null,em=!1,_d=0,Tl=null,t)throw Error(H(300));e===null||Mt||(e=e.dependencies,e!==null&&Xp(e)&&(Mt=!0))}function Ck(e,t,n,r){we=e;var a=0;do{if(El&&(Tl=null),_d=0,El=!1,25<=a)throw Error(H(301));if(a+=1,Tt=We=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}me.H=iR,i=t(n,r)}while(El);return i}function R8(){var e=me.H,t=e.useState()[0];return t=typeof t.then=="function"?Hf(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(we.flags|=1024),t}function fw(){var e=tm!==0;return tm=0,e}function hw(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function pw(e){if(em){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}em=!1}Za=0,Tt=We=we=null,El=!1,_d=tm=0,Tl=null}function pn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?we.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function Ot(){if(We===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=Tt===null?we.memoizedState:Tt.next;if(t!==null)Tt=t,We=e;else{if(e===null)throw we.alternate===null?Error(H(467)):Error(H(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Tt===null?we.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Zg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hf(e){var t=_d;return _d+=1,Tl===null&&(Tl=[]),e=wk(Tl,e,t),t=we,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,me.H=t===null||t.memoizedState===null?aR:ww),e}function Jg(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hf(e);if(e.$$typeof===$a)return an(e)}throw Error(H(438,String(e)))}function mw(e){var t=null,n=we.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=we.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Zg(),we.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=xz;return t.index++,n}function Ja(e,t){return typeof t=="function"?t(e):t}function bp(e){var t=Ot();return gw(t,We,e)}function gw(e,t,n){var r=e.queue;if(r===null)throw Error(H(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(i!==null){if(a!==null){var s=a.next;a.next=i.next,i.next=s}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var o=s=null,c=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(Ce&f)===f:(Za&f)===f){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Xl&&(d=!0);else if((Za&h)===h){u=u.next,h===Xl&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=f,s=i):c=c.next=f,we.lanes|=h,is|=h;f=u.action,co&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else h={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=h,s=i):c=c.next=h,we.lanes|=f,is|=f;u=u.next}while(u!==null&&u!==t);if(c===null?s=i:c.next=o,!tr(i,e.memoizedState)&&(Mt=!0,d&&(n=Ol,n!==null)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=c,r.lastRenderedState=i}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Iv(e){var t=Ot(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do i=e(i,s.action),s=s.next;while(s!==a);tr(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function _k(e,t,n){var r=we,a=Ot(),i=Pe;if(i){if(n===void 0)throw Error(H(407));n=n()}else n=t();var s=!tr((We||a).memoizedState,n);if(s&&(a.memoizedState=n,Mt=!0),a=a.queue,yw(kk.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||Tt!==null&&Tt.memoizedState.tag&1){if(r.flags|=2048,Zl(9,{destroy:void 0},Mk.bind(null,r,a,n,t),null),Qe===null)throw Error(H(349));i||Za&127||Pk(r,t,n)}return n}function Pk(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t=Zg(),we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mk(e,t,n,r){t.value=n,t.getSnapshot=r,Rk(t)&&Dk(e)}function kk(e,t,n){return n(function(){Rk(t)&&Dk(e)})}function Rk(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tr(e,n)}catch{return!0}}function Dk(e){var t=No(e,2);t!==null&&Pn(t,e,2)}function Fb(e){var t=pn();if(typeof e=="function"){var n=e;if(e=n(),co){$i(!0);try{n()}finally{$i(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:e},t}function $k(e,t,n,r){return e.baseState=n,gw(e,We,typeof r=="function"?r:Ja)}function D8(e,t,n,r,a){if(ty(e))throw Error(H(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};me.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,Lk(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Lk(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=me.T,s={};me.T=s;try{var o=n(a,r),c=me.S;c!==null&&c(s,o),$A(e,t,o)}catch(u){Vb(e,t,u)}finally{i!==null&&s.types!==null&&(i.types=s.types),me.T=i}}else try{i=n(a,r),$A(e,t,i)}catch(u){Vb(e,t,u)}}function $A(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){LA(e,t,r)},function(r){return Vb(e,t,r)}):LA(e,t,n)}function LA(e,t,n){t.status="fulfilled",t.value=n,Ik(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Lk(e,n)))}function Vb(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Ik(t),t=t.next;while(t!==r)}e.action=null}function Ik(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zk(e,t){return t}function IA(e,t){if(Pe){var n=Qe.formState;if(n!==null){e:{var r=we;if(Pe){if(st){t:{for(var a=st,i=yr;a.nodeType!==8;){if(!i){a=null;break t}if(a=Sr(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){st=Sr(a.nextSibling),r=a.data==="F!";break e}}rs(r)}r=!1}r&&(t=n[0])}}return n=pn(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zk,lastRenderedState:t},n.queue=r,n=tR.bind(null,we,r),r.dispatch=n,r=Fb(!1),i=Sw.bind(null,we,!1,r.queue),r=pn(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,n=D8.bind(null,we,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function zA(e){var t=Ot();return Bk(t,We,e)}function Bk(e,t,n){if(t=gw(e,t,zk)[0],e=bp(Ja)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Hf(t)}catch(s){throw s===Uc?Qg:s}else r=t;t=Ot();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(we.flags|=2048,Zl(9,{destroy:void 0},$8.bind(null,a,n),null)),[r,i,e]}function $8(e,t){e.action=t}function BA(e){var t=Ot(),n=We;if(n!==null)return Bk(t,n,e);Ot(),t=t.memoizedState,n=Ot();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Zl(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=we.updateQueue,t===null&&(t=Zg(),we.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Uk(){return Ot().memoizedState}function Sp(e,t,n,r){var a=pn();we.flags|=e,a.memoizedState=Zl(1|t,{destroy:void 0},n,r===void 0?null:r)}function ey(e,t,n,r){var a=Ot();r=r===void 0?null:r;var i=a.memoizedState.inst;We!==null&&r!==null&&uw(r,We.memoizedState.deps)?a.memoizedState=Zl(t,i,n,r):(we.flags|=e,a.memoizedState=Zl(1|t,i,n,r))}function UA(e,t){Sp(8390656,8,e,t)}function yw(e,t){ey(2048,8,e,t)}function L8(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Zg(),we.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Fk(e){var t=Ot().memoizedState;return L8({ref:t,nextImpl:e}),function(){if($e&2)throw Error(H(440));return t.impl.apply(void 0,arguments)}}function Vk(e,t){return ey(4,2,e,t)}function Hk(e,t){return ey(4,4,e,t)}function qk(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kk(e,t,n){n=n!=null?n.concat([e]):null,ey(4,4,qk.bind(null,t,e),n)}function vw(){}function Gk(e,t){var n=Ot();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&uw(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yk(e,t){var n=Ot();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&uw(t,r[1]))return r[0];if(r=e(),co){$i(!0);try{e()}finally{$i(!1)}}return n.memoizedState=[r,t],r}function xw(e,t,n){return n===void 0||Za&1073741824&&!(Ce&261930)?e.memoizedState=t:(e.memoizedState=n,e=$R(),we.lanes|=e,is|=e,n)}function Wk(e,t,n,r){return tr(n,t)?n:Ql.current!==null?(e=xw(e,n,r),tr(e,t)||(Mt=!0),e):!(Za&42)||Za&1073741824&&!(Ce&261930)?(Mt=!0,e.memoizedState=n):(e=$R(),we.lanes|=e,is|=e,t)}function Xk(e,t,n,r,a){var i=Ie.p;Ie.p=i!==0&&8>i?i:8;var s=me.T,o={};me.T=o,Sw(e,!1,t,n);try{var c=a(),u=me.S;if(u!==null&&u(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=M8(c,r);nd(e,t,d,Zn(e))}else nd(e,t,r,Zn(e))}catch(f){nd(e,t,{then:function(){},status:"rejected",reason:f},Zn())}finally{Ie.p=i,s!==null&&o.types!==null&&(s.types=o.types),me.T=s}}function I8(){}function Hb(e,t,n,r){if(e.tag!==5)throw Error(H(476));var a=Qk(e).queue;Xk(e,a,t,Xs,n===null?I8:function(){return Zk(e),n(r)})}function Qk(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Xs,baseState:Xs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:Xs},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zk(e){var t=Qk(e);t.next===null&&(t=e.alternate.memoizedState),nd(e,t.next.queue,{},Zn())}function bw(){return an(Rd)}function Jk(){return Ot().memoizedState}function eR(){return Ot().memoizedState}function z8(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Zn();e=qi(n);var r=Ki(t,e,n);r!==null&&(Pn(r,t,n),Ju(r,t,n)),t={cache:iw()},e.payload=t;return}t=t.return}}function B8(e,t,n){var r=Zn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ty(e)?nR(t,n):(n=tw(e,t,n,r),n!==null&&(Pn(n,e,r),rR(n,t,r)))}function tR(e,t,n){var r=Zn();nd(e,t,n,r)}function nd(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ty(e))nR(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,tr(o,s))return Xg(e,t,a,0),Qe===null&&Wg(),!1}catch{}finally{}if(n=tw(e,t,a,r),n!==null)return Pn(n,e,r),rR(n,t,r),!0}return!1}function Sw(e,t,n,r){if(r={lane:2,revertLane:_w(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ty(e)){if(t)throw Error(H(479))}else t=tw(e,n,r,2),t!==null&&Pn(t,e,2)}function ty(e){var t=e.alternate;return e===we||t!==null&&t===we}function nR(e,t){El=em=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rR(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,FM(e,n)}}var Pd={readContext:an,use:Jg,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};Pd.useEffectEvent=yt;var aR={readContext:an,use:Jg,useCallback:function(e,t){return pn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:UA,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Sp(4194308,4,qk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sp(4194308,4,e,t)},useInsertionEffect:function(e,t){Sp(4,2,e,t)},useMemo:function(e,t){var n=pn();t=t===void 0?null:t;var r=e();if(co){$i(!0);try{e()}finally{$i(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=pn();if(n!==void 0){var a=n(t);if(co){$i(!0);try{n(t)}finally{$i(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=B8.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=pn();return e={current:e},t.memoizedState=e},useState:function(e){e=Fb(e);var t=e.queue,n=tR.bind(null,we,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vw,useDeferredValue:function(e,t){var n=pn();return xw(n,e,t)},useTransition:function(){var e=Fb(!1);return e=Xk.bind(null,we,e.queue,!0,!1),pn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=we,a=pn();if(Pe){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Qe===null)throw Error(H(349));Ce&127||Pk(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,UA(kk.bind(null,r,i,e),[e]),r.flags|=2048,Zl(9,{destroy:void 0},Mk.bind(null,r,i,n,t),null),n},useId:function(){var e=pn(),t=Qe.identifierPrefix;if(Pe){var n=ta,r=ea;n=(r&~(1<<32-Qn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=tm++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=k8++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bw,useFormState:IA,useActionState:IA,useOptimistic:function(e){var t=pn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Sw.bind(null,we,!0,n),n.dispatch=t,[e,t]},useMemoCache:mw,useCacheRefresh:function(){return pn().memoizedState=z8.bind(null,we)},useEffectEvent:function(e){var t=pn(),n={impl:e};return t.memoizedState=n,function(){if($e&2)throw Error(H(440));return n.impl.apply(void 0,arguments)}}},ww={readContext:an,use:Jg,useCallback:Gk,useContext:an,useEffect:yw,useImperativeHandle:Kk,useInsertionEffect:Vk,useLayoutEffect:Hk,useMemo:Yk,useReducer:bp,useRef:Uk,useState:function(){return bp(Ja)},useDebugValue:vw,useDeferredValue:function(e,t){var n=Ot();return Wk(n,We.memoizedState,e,t)},useTransition:function(){var e=bp(Ja)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Hf(e),t]},useSyncExternalStore:_k,useId:Jk,useHostTransitionStatus:bw,useFormState:zA,useActionState:zA,useOptimistic:function(e,t){var n=Ot();return $k(n,We,e,t)},useMemoCache:mw,useCacheRefresh:eR};ww.useEffectEvent=Fk;var iR={readContext:an,use:Jg,useCallback:Gk,useContext:an,useEffect:yw,useImperativeHandle:Kk,useInsertionEffect:Vk,useLayoutEffect:Hk,useMemo:Yk,useReducer:Iv,useRef:Uk,useState:function(){return Iv(Ja)},useDebugValue:vw,useDeferredValue:function(e,t){var n=Ot();return We===null?xw(n,e,t):Wk(n,We.memoizedState,e,t)},useTransition:function(){var e=Iv(Ja)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Hf(e),t]},useSyncExternalStore:_k,useId:Jk,useHostTransitionStatus:bw,useFormState:BA,useActionState:BA,useOptimistic:function(e,t){var n=Ot();return We!==null?$k(n,We,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:mw,useCacheRefresh:eR};iR.useEffectEvent=Fk;function zv(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qb={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Zn(),a=qi(r);a.payload=t,n!=null&&(a.callback=n),t=Ki(e,a,r),t!==null&&(Pn(t,e,r),Ju(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Zn(),a=qi(r);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Ki(e,a,r),t!==null&&(Pn(t,e,r),Ju(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Zn(),r=qi(n);r.tag=2,t!=null&&(r.callback=t),t=Ki(e,r,n),t!==null&&(Pn(t,e,n),Ju(t,e,n))}};function FA(e,t,n,r,a,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Nd(n,r)||!Nd(a,i):!0}function VA(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qb.enqueueReplaceState(t,t.state,null)}function uo(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=lt({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function sR(e){Gp(e)}function oR(e){console.error(e)}function lR(e){Gp(e)}function nm(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function HA(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Kb(e,t,n){return n=qi(n),n.tag=3,n.payload={element:null},n.callback=function(){nm(e,t)},n}function cR(e){return e=qi(e),e.tag=3,e}function uR(e,t,n,r){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){HA(t,n,r)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){HA(t,n,r),typeof a!="function"&&(Gi===null?Gi=new Set([this]):Gi.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function U8(e,t,n,r,a){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Bc(t,n,a,!0),n=nr.current,n!==null){switch(n.tag){case 31:case 13:return br===null?om():n.alternate===null&&St===0&&(St=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Qp?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Xv(e,r,a)),!1;case 22:return n.flags|=65536,r===Qp?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Xv(e,r,a)),!1}throw Error(H(435,n.tag))}return Xv(e,r,a),om(),!1}if(Pe)return t=nr.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==kb&&(e=Error(H(422),{cause:r}),Td(gr(e,n)))):(r!==kb&&(t=Error(H(423),{cause:r}),Td(gr(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gr(r,n),a=Kb(e.stateNode,r,a),Lv(e,a),St!==4&&(St=2)),!1;var i=Error(H(520),{cause:r});if(i=gr(i,n),id===null?id=[i]:id.push(i),St!==4&&(St=2),t===null)return!0;r=gr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Kb(n.stateNode,r,e),Lv(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Gi===null||!Gi.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=cR(a),uR(a,e,n,r),Lv(n,a),!1}n=n.return}while(n!==null);return!1}var jw=Error(H(461)),Mt=!1;function Jt(e,t,n,r){t.child=e===null?Ak(t,null,n,r):lo(t,e.child,n,r)}function qA(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var s={};for(var o in r)o!=="ref"&&(s[o]=r[o])}else s=r;return oo(t),r=dw(e,t,n,s,i,a),o=fw(),e!==null&&!Mt?(hw(e,t,a),ei(e,t,a)):(Pe&&o&&rw(t),t.flags|=1,Jt(e,t,r,a),t.child)}function KA(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!nw(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,dR(e,t,i,r,a)):(e=vp(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Aw(e,a)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Nd,n(s,r)&&e.ref===t.ref)return ei(e,t,a)}return t.flags|=1,e=Va(i,r),e.ref=t.ref,e.return=t,t.child=e}function dR(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(Nd(i,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=i,Aw(e,a))e.flags&131072&&(Mt=!0);else return t.lanes=e.lanes,ei(e,t,a)}return Gb(e,t,n,r,a)}function fR(e,t,n,r){var a=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,a=0;r!==null;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~i}else r=0,t.child=null;return GA(e,t,i,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xp(t,i!==null?i.cachePool:null),i!==null?DA(t,i):Bb(),Ek(t);else return r=t.lanes=536870912,GA(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(xp(t,i.cachePool),DA(t,i),Oi(),t.memoizedState=null):(e!==null&&xp(t,null),Bb(),Oi());return Jt(e,t,a,n),t.child}function zu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function GA(e,t,n,r,a){var i=sw();return i=i===null?null:{parent:_t._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&xp(t,null),Bb(),Ek(t),e!==null&&Bc(e,t,r,!0),t.childLanes=a,null}function wp(e,t){return t=rm({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function YA(e,t,n){return lo(t,e.child,null,n),e=wp(t,t.pendingProps),e.flags|=2,qn(t),t.memoizedState=null,e}function F8(e,t,n){var r=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(r.mode==="hidden")return e=wp(t,r),t.lanes=536870912,zu(null,e);if(Ub(t),(e=st)?(e=aD(e,yr),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ns!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},n=yk(e),n.return=t,t.child=n,nn=t,st=null)):e=null,e===null)throw rs(t);return t.lanes=536870912,null}return wp(t,r)}var i=e.memoizedState;if(i!==null){var s=i.dehydrated;if(Ub(t),a)if(t.flags&256)t.flags&=-257,t=YA(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(H(558));else if(Mt||Bc(e,t,n,!1),a=(n&e.childLanes)!==0,Mt||a){if(r=Qe,r!==null&&(s=VM(r,n),s!==0&&s!==i.retryLane))throw i.retryLane=s,No(e,s),Pn(r,e,s),jw;om(),t=YA(e,t,n)}else e=i.treeContext,st=Sr(s.nextSibling),nn=t,Pe=!0,Hi=null,yr=!1,e!==null&&xk(t,e),t=wp(t,r),t.flags|=4096;return t}return e=Va(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function jp(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(H(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gb(e,t,n,r,a){return oo(t),n=dw(e,t,n,r,void 0,a),r=fw(),e!==null&&!Mt?(hw(e,t,a),ei(e,t,a)):(Pe&&r&&rw(t),t.flags|=1,Jt(e,t,n,a),t.child)}function WA(e,t,n,r,a,i){return oo(t),t.updateQueue=null,n=Ck(t,r,n,a),Tk(e),r=fw(),e!==null&&!Mt?(hw(e,t,i),ei(e,t,i)):(Pe&&r&&rw(t),t.flags|=1,Jt(e,t,n,i),t.child)}function XA(e,t,n,r,a){if(oo(t),t.stateNode===null){var i=ll,s=n.contextType;typeof s=="object"&&s!==null&&(i=an(s)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=qb,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},lw(t),s=n.contextType,i.context=typeof s=="object"&&s!==null?an(s):ll,i.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(zv(t,n,s,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&qb.enqueueReplaceState(i,i.state,null),td(t,r,i,a),ed(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var o=t.memoizedProps,c=uo(n,o);i.props=c;var u=i.context,d=n.contextType;s=ll,typeof d=="object"&&d!==null&&(s=an(d));var f=n.getDerivedStateFromProps;d=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||u!==s)&&VA(t,i,r,s),Si=!1;var h=t.memoizedState;i.state=h,td(t,r,i,a),ed(),u=t.memoizedState,o||h!==u||Si?(typeof f=="function"&&(zv(t,n,f,r),u=t.memoizedState),(c=Si||FA(t,n,c,r,h,u,s))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=s,r=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ib(e,t),s=t.memoizedProps,d=uo(n,s),i.props=d,f=t.pendingProps,h=i.context,u=n.contextType,c=ll,typeof u=="object"&&u!==null&&(c=an(u)),o=n.getDerivedStateFromProps,(u=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==f||h!==c)&&VA(t,i,r,c),Si=!1,h=t.memoizedState,i.state=h,td(t,r,i,a),ed();var p=t.memoizedState;s!==f||h!==p||Si||e!==null&&e.dependencies!==null&&Xp(e.dependencies)?(typeof o=="function"&&(zv(t,n,o,r),p=t.memoizedState),(d=Si||FA(t,n,d,r,h,p,c)||e!==null&&e.dependencies!==null&&Xp(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,p,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,p,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=c,r=d):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,jp(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=lo(t,e.child,null,a),t.child=lo(t,null,n,a)):Jt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=ei(e,t,a),e}function QA(e,t,n,r){return so(),t.flags|=256,Jt(e,t,n,r),t.child}var Bv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uv(e){return{baseLanes:e,cachePool:Sk()}}function Fv(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Yn),e}function hR(e,t,n){var r=t.pendingProps,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(jt.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(a?Ai(t):Oi(),(e=st)?(e=aD(e,yr),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ns!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},n=yk(e),n.return=t,t.child=n,nn=t,st=null)):e=null,e===null)throw rs(t);return o0(e)?t.lanes=32:t.lanes=536870912,null}var o=r.children;return r=r.fallback,a?(Oi(),a=t.mode,o=rm({mode:"hidden",children:o},a),r=Qs(r,a,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r=t.child,r.memoizedState=Uv(n),r.childLanes=Fv(e,s,n),t.memoizedState=Bv,zu(null,r)):(Ai(t),Yb(t,o))}var c=e.memoizedState;if(c!==null&&(o=c.dehydrated,o!==null)){if(i)t.flags&256?(Ai(t),t.flags&=-257,t=Vv(e,t,n)):t.memoizedState!==null?(Oi(),t.child=e.child,t.flags|=128,t=null):(Oi(),o=r.fallback,a=t.mode,r=rm({mode:"visible",children:r.children},a),o=Qs(o,a,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,lo(t,e.child,null,n),r=t.child,r.memoizedState=Uv(n),r.childLanes=Fv(e,s,n),t.memoizedState=Bv,t=zu(null,r));else if(Ai(t),o0(o)){if(s=o.nextSibling&&o.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(H(419)),r.stack="",r.digest=s,Td({value:r,source:null,stack:null}),t=Vv(e,t,n)}else if(Mt||Bc(e,t,n,!1),s=(n&e.childLanes)!==0,Mt||s){if(s=Qe,s!==null&&(r=VM(s,n),r!==0&&r!==c.retryLane))throw c.retryLane=r,No(e,r),Pn(s,e,r),jw;s0(o)||om(),t=Vv(e,t,n)}else s0(o)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,st=Sr(o.nextSibling),nn=t,Pe=!0,Hi=null,yr=!1,e!==null&&xk(t,e),t=Yb(t,r.children),t.flags|=4096);return t}return a?(Oi(),o=r.fallback,a=t.mode,c=e.child,u=c.sibling,r=Va(c,{mode:"hidden",children:r.children}),r.subtreeFlags=c.subtreeFlags&65011712,u!==null?o=Va(u,o):(o=Qs(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,zu(null,r),r=t.child,o=e.child.memoizedState,o===null?o=Uv(n):(a=o.cachePool,a!==null?(c=_t._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=Sk(),o={baseLanes:o.baseLanes|n,cachePool:a}),r.memoizedState=o,r.childLanes=Fv(e,s,n),t.memoizedState=Bv,zu(e.child,r)):(Ai(t),n=e.child,e=n.sibling,n=Va(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Yb(e,t){return t=rm({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rm(e,t){return e=Kn(22,e,null,t),e.lanes=0,e}function Vv(e,t,n){return lo(t,e.child,null,n),e=Yb(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZA(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Db(e.return,t,n)}function Hv(e,t,n,r,a,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=a,s.treeForkCount=i)}function pR(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;r=r.children;var s=jt.current,o=(s&2)!==0;if(o?(s=s&1|2,t.flags|=128):s&=1,tt(jt,s),Jt(e,t,r,n),r=Pe?Ed:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ZA(e,n,t);else if(e.tag===19)ZA(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Jp(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Hv(t,!1,a,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Jp(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Hv(t,!0,n,null,i,r);break;case"together":Hv(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ei(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),is|=t.lanes,!(n&t.childLanes))if(e!==null){if(Bc(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Va(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Va(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Aw(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Xp(e)))}function V8(e,t,n){switch(t.tag){case 3:Vp(t,t.stateNode.containerInfo),ji(t,_t,e.memoizedState.cache),so();break;case 27:case 5:wb(t);break;case 4:Vp(t,t.stateNode.containerInfo);break;case 10:ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ub(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Ai(t),t.flags|=128,null):n&t.child.childLanes?hR(e,t,n):(Ai(t),e=ei(e,t,n),e!==null?e.sibling:null);Ai(t);break;case 19:var a=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Bc(e,t,n,!1),r=(n&t.childLanes)!==0),a){if(r)return pR(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),tt(jt,jt.current),r)break;return null;case 22:return t.lanes=0,fR(e,t,n,t.pendingProps);case 24:ji(t,_t,e.memoizedState.cache)}return ei(e,t,n)}function mR(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Mt=!0;else{if(!Aw(e,n)&&!(t.flags&128))return Mt=!1,V8(e,t,n);Mt=!!(e.flags&131072)}else Mt=!1,Pe&&t.flags&1048576&&vk(t,Ed,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=As(t.elementType),t.type=e,typeof e=="function")nw(e)?(r=uo(e,r),t.tag=1,t=XA(null,t,e,r,n)):(t.tag=0,t=Gb(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===FS){t.tag=11,t=qA(null,t,e,r,n);break e}else if(a===VS){t.tag=14,t=KA(null,t,e,r,n);break e}}throw t=bb(e)||e,Error(H(306,t,""))}}return t;case 0:return Gb(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=uo(r,t.pendingProps),XA(e,t,r,a,n);case 3:e:{if(Vp(t,t.stateNode.containerInfo),e===null)throw Error(H(387));r=t.pendingProps;var i=t.memoizedState;a=i.element,Ib(e,t),td(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ji(t,_t,r),r!==i.cache&&$b(t,[_t],n,!0),ed(),r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=QA(e,t,r,n);break e}else if(r!==a){a=gr(Error(H(424)),t),Td(a),t=QA(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(st=Sr(e.firstChild),nn=t,Pe=!0,Hi=null,yr=!0,n=Ak(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(so(),r===a){t=ei(e,t,n);break e}Jt(e,t,r,n)}t=t.child}return t;case 26:return jp(e,t),e===null?(n=vO(t.type,null,t.pendingProps,null))?t.memoizedState=n:Pe||(n=t.type,e=t.pendingProps,r=dm(Vi.current).createElement(n),r[tn]=t,r[kn]=e,sn(r,n,e),Kt(r),t.stateNode=r):t.memoizedState=vO(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wb(t),e===null&&Pe&&(r=t.stateNode=iD(t.type,t.pendingProps,Vi.current),nn=t,yr=!0,a=st,ls(t.type)?(l0=a,st=Sr(r.firstChild)):st=a),Jt(e,t,t.pendingProps.children,n),jp(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((a=r=st)&&(r=xB(r,t.type,t.pendingProps,yr),r!==null?(t.stateNode=r,nn=t,st=Sr(r.firstChild),yr=!1,a=!0):a=!1),a||rs(t)),wb(t),a=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,r=i.children,a0(a,i)?r=null:s!==null&&a0(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=dw(e,t,R8,null,null,n),Rd._currentValue=a),jp(e,t),Jt(e,t,r,n),t.child;case 6:return e===null&&Pe&&((e=n=st)&&(n=bB(n,t.pendingProps,yr),n!==null?(t.stateNode=n,nn=t,st=null,e=!0):e=!1),e||rs(t)),null;case 13:return hR(e,t,n);case 4:return Vp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Jt(e,t,r,n),t.child;case 11:return qA(e,t,t.type,t.pendingProps,n);case 7:return Jt(e,t,t.pendingProps,n),t.child;case 8:return Jt(e,t,t.pendingProps.children,n),t.child;case 12:return Jt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ji(t,t.type,r.value),Jt(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,oo(t),a=an(a),r=r(a),t.flags|=1,Jt(e,t,r,n),t.child;case 14:return KA(e,t,t.type,t.pendingProps,n);case 15:return dR(e,t,t.type,t.pendingProps,n);case 19:return pR(e,t,n);case 31:return F8(e,t,n);case 22:return fR(e,t,n,t.pendingProps);case 24:return oo(t),r=an(_t),e===null?(a=sw(),a===null&&(a=Qe,i=iw(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},lw(t),ji(t,_t,a)):(e.lanes&n&&(Ib(e,t),td(t,null,null,n),ed()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ji(t,_t,r)):(r=i.cache,ji(t,_t,r),r!==a.cache&&$b(t,[_t],n,!0))),Jt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(H(156,t.tag))}function Aa(e){e.flags|=4}function qv(e,t,n,r,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(zR())e.flags|=8192;else throw Js=Qp,ow}else e.flags&=-16777217}function JA(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!lD(t))if(zR())e.flags|=8192;else throw Js=Qp,ow}function Mh(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?BM():536870912,e.lanes|=t,Jl|=t)}function gu(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&65011712,r|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function H8(e,t,n){var r=t.pendingProps;switch(aw(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ha(_t),Gl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bo(t)?Aa(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$v())),rt(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Aa(t),i!==null?(rt(t),JA(t,i)):(rt(t),qv(t,a,null,r,n))):i?i!==e.memoizedState?(Aa(t),rt(t),JA(t,i)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Aa(t),rt(t),qv(t,a,e,r,n)),null;case 27:if(Hp(t),n=Vi.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Aa(t);else{if(!r){if(t.stateNode===null)throw Error(H(166));return rt(t),null}e=la.current,Bo(t)?TA(t):(e=iD(a,r,n),t.stateNode=e,Aa(t))}return rt(t),null;case 5:if(Hp(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Aa(t);else{if(!r){if(t.stateNode===null)throw Error(H(166));return rt(t),null}if(i=la.current,Bo(t))TA(t);else{var s=dm(Vi.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=s.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?s.createElement(a,{is:r.is}):s.createElement(a)}}i[tn]=t,i[kn]=r;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(sn(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Aa(t)}}return rt(t),qv(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Aa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(e=Vi.current,Bo(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=nn,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[tn]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||tD(e.nodeValue,n)),e||rs(t,!0)}else e=dm(e).createTextNode(r),e[tn]=t,t.stateNode=e}return rt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bo(t),n!==null){if(e===null){if(!r)throw Error(H(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(557));e[tn]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else n=$v(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(qn(t),t):(qn(t),null);if(t.flags&128)throw Error(H(558))}return rt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(H(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(H(317));a[tn]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;rt(t),a=!1}else a=$v(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(qn(t),t):(qn(t),null)}return qn(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mh(t,t.updateQueue),rt(t),null);case 4:return Gl(),e===null&&Pw(t.stateNode.containerInfo),rt(t),null;case 10:return Ha(t.type),rt(t),null;case 19:if(Yt(jt),r=t.memoizedState,r===null)return rt(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)gu(r,!1);else{if(St!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Jp(e),i!==null){for(t.flags|=128,gu(r,!1),e=i.updateQueue,t.updateQueue=e,Mh(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)gk(n,e),n=n.sibling;return tt(jt,jt.current&1|2),Pe&&Ma(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Wn()>im&&(t.flags|=128,a=!0,gu(r,!1),t.lanes=4194304)}else{if(!a)if(e=Jp(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mh(t,e),gu(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Pe)return rt(t),null}else 2*Wn()-r.renderingStartTime>im&&n!==536870912&&(t.flags|=128,a=!0,gu(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Wn(),e.sibling=null,n=jt.current,tt(jt,a?n&1|2:n&1),Pe&&Ma(t,r.treeForkCount),e):(rt(t),null);case 22:case 23:return qn(t),cw(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),n=t.updateQueue,n!==null&&Mh(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Yt(Zs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ha(_t),rt(t),null;case 25:return null;case 30:return null}throw Error(H(156,t.tag))}function q8(e,t){switch(aw(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ha(_t),Gl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Hp(t),null;case 31:if(t.memoizedState!==null){if(qn(t),t.alternate===null)throw Error(H(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yt(jt),null;case 4:return Gl(),null;case 10:return Ha(t.type),null;case 22:case 23:return qn(t),cw(),e!==null&&Yt(Zs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ha(_t),null;case 25:return null;default:return null}}function gR(e,t){switch(aw(t),t.tag){case 3:Ha(_t),Gl();break;case 26:case 27:case 5:Hp(t);break;case 4:Gl();break;case 31:t.memoizedState!==null&&qn(t);break;case 13:qn(t);break;case 19:Yt(jt);break;case 10:Ha(t.type);break;case 22:case 23:qn(t),cw(),e!==null&&Yt(Zs);break;case 24:Ha(_t)}}function qf(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){He(t,t.return,o)}}function as(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var c=n,u=o;try{u()}catch(d){He(a,c,d)}}}r=r.next}while(r!==i)}}catch(d){He(t,t.return,d)}}function yR(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Nk(t,n)}catch(r){He(e,e.return,r)}}}function vR(e,t,n){n.props=uo(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){He(e,t,r)}}function rd(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){He(e,t,a)}}function na(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){He(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){He(e,t,a)}else n.current=null}function xR(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){He(e,e.return,a)}}function Kv(e,t,n){try{var r=e.stateNode;hB(r,e.type,n,t),r[kn]=t}catch(a){He(e,e.return,a)}}function bR(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ls(e.type)||e.tag===4}function Gv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ls(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=La));else if(r!==4&&(r===27&&ls(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Wb(e,t,n),e=e.sibling;e!==null;)Wb(e,t,n),e=e.sibling}function am(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ls(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(am(e,t,n),e=e.sibling;e!==null;)am(e,t,n),e=e.sibling}function SR(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);sn(t,r,n),t[tn]=e,t[kn]=n}catch(i){He(e,e.return,i)}}var Da=!1,Ct=!1,Yv=!1,eO=typeof WeakSet=="function"?WeakSet:Set,qt=null;function K8(e,t){if(e=e.containerInfo,n0=mm,e=lk(e),JS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,o=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||a!==0&&f.nodeType!==3||(o=s+a),f!==i||r!==0&&f.nodeType!==3||(c=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===a&&(o=s),h===i&&++d===r&&(c=s),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(r0={focusedElem:e,selectionRange:n},mm=!1,qt=t;qt!==null;)if(t=qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,qt=e;else for(;qt!==null;){switch(t=qt,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var g=uo(n.type,a);e=r.getSnapshotBeforeUpdate(g,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(m){He(n,n.return,m)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)i0(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":i0(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(H(163))}if(e=t.sibling,e!==null){e.return=t.return,qt=e;break}qt=t.return}}function wR(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Na(e,n),r&4&&qf(5,n);break;case 1:if(Na(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){He(n,n.return,s)}else{var a=uo(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){He(n,n.return,s)}}r&64&&yR(n),r&512&&rd(n,n.return);break;case 3:if(Na(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Nk(e,t)}catch(s){He(n,n.return,s)}}break;case 27:t===null&&r&4&&SR(n);case 26:case 5:Na(e,n),t===null&&r&4&&xR(n),r&512&&rd(n,n.return);break;case 12:Na(e,n);break;case 31:Na(e,n),r&4&&OR(e,n);break;case 13:Na(e,n),r&4&&NR(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=tB.bind(null,n),SB(e,n))));break;case 22:if(r=n.memoizedState!==null||Da,!r){t=t!==null&&t.memoizedState!==null||Ct,a=Da;var i=Ct;Da=r,(Ct=t)&&!i?Ca(e,n,(n.subtreeFlags&8772)!==0):Na(e,n),Da=a,Ct=i}break;case 30:break;default:Na(e,n)}}function jR(e){var t=e.alternate;t!==null&&(e.alternate=null,jR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&GS(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dt=null,En=!1;function Oa(e,t,n){for(n=n.child;n!==null;)AR(e,t,n),n=n.sibling}function AR(e,t,n){if(Xn&&typeof Xn.onCommitFiberUnmount=="function")try{Xn.onCommitFiberUnmount(If,n)}catch{}switch(n.tag){case 26:Ct||na(n,t),Oa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ct||na(n,t);var r=dt,a=En;ls(n.type)&&(dt=n.stateNode,En=!1),Oa(e,t,n),od(n.stateNode),dt=r,En=a;break;case 5:Ct||na(n,t);case 6:if(r=dt,a=En,dt=null,Oa(e,t,n),dt=r,En=a,dt!==null)if(En)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(n.stateNode)}catch(i){He(n,t,i)}else try{dt.removeChild(n.stateNode)}catch(i){He(n,t,i)}break;case 18:dt!==null&&(En?(e=dt,hO(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),rc(e)):hO(dt,n.stateNode));break;case 4:r=dt,a=En,dt=n.stateNode.containerInfo,En=!0,Oa(e,t,n),dt=r,En=a;break;case 0:case 11:case 14:case 15:as(2,n,t),Ct||as(4,n,t),Oa(e,t,n);break;case 1:Ct||(na(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&vR(n,t,r)),Oa(e,t,n);break;case 21:Oa(e,t,n);break;case 22:Ct=(r=Ct)||n.memoizedState!==null,Oa(e,t,n),Ct=r;break;default:Oa(e,t,n)}}function OR(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{rc(e)}catch(n){He(t,t.return,n)}}}function NR(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rc(e)}catch(n){He(t,t.return,n)}}function G8(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new eO),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new eO),t;default:throw Error(H(435,e.tag))}}function kh(e,t){var n=G8(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var a=nB.bind(null,e,r);r.then(a,a)}})}function jn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],i=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 27:if(ls(o.type)){dt=o.stateNode,En=!1;break e}break;case 5:dt=o.stateNode,En=!1;break e;case 3:case 4:dt=o.stateNode.containerInfo,En=!0;break e}o=o.return}if(dt===null)throw Error(H(160));AR(i,s,a),dt=null,En=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ER(t,e),t=t.sibling}var $r=null;function ER(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jn(t,e),An(e),r&4&&(as(3,e,e.return),qf(3,e),as(5,e,e.return));break;case 1:jn(t,e),An(e),r&512&&(Ct||n===null||na(n,n.return)),r&64&&Da&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=$r;if(jn(t,e),An(e),r&512&&(Ct||n===null||na(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":i=a.getElementsByTagName("title")[0],(!i||i[Uf]||i[tn]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),sn(i,r,n),i[tn]=e,Kt(i),r=i;break e;case"link":var s=bO("link","href",a).get(r+(n.href||""));if(s){for(var o=0;o<s.length;o++)if(i=s[o],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(o,1);break t}}i=a.createElement(r),sn(i,r,n),a.head.appendChild(i);break;case"meta":if(s=bO("meta","content",a).get(r+(n.content||""))){for(o=0;o<s.length;o++)if(i=s[o],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(o,1);break t}}i=a.createElement(r),sn(i,r,n),a.head.appendChild(i);break;default:throw Error(H(468,r))}i[tn]=e,Kt(i),r=i}e.stateNode=r}else SO(a,e.type,e.stateNode);else e.stateNode=xO(a,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?SO(a,e.type,e.stateNode):xO(a,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Kv(e,e.memoizedProps,n.memoizedProps)}break;case 27:jn(t,e),An(e),r&512&&(Ct||n===null||na(n,n.return)),n!==null&&r&4&&Kv(e,e.memoizedProps,n.memoizedProps);break;case 5:if(jn(t,e),An(e),r&512&&(Ct||n===null||na(n,n.return)),e.flags&32){a=e.stateNode;try{Wl(a,"")}catch(g){He(e,e.return,g)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Kv(e,a,n!==null?n.memoizedProps:a)),r&1024&&(Yv=!0);break;case 6:if(jn(t,e),An(e),r&4){if(e.stateNode===null)throw Error(H(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(g){He(e,e.return,g)}}break;case 3:if(Np=null,a=$r,$r=fm(t.containerInfo),jn(t,e),$r=a,An(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{rc(t.containerInfo)}catch(g){He(e,e.return,g)}Yv&&(Yv=!1,TR(e));break;case 4:r=$r,$r=fm(e.stateNode.containerInfo),jn(t,e),An(e),$r=r;break;case 12:jn(t,e),An(e);break;case 31:jn(t,e),An(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kh(e,r)));break;case 13:jn(t,e),An(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ny=Wn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kh(e,r)));break;case 22:a=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=Da,d=Ct;if(Da=u||a,Ct=d||c,jn(t,e),Ct=d,Da=u,An(e),r&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||c||Da||Ct||Os(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(i=c.stateNode,a)s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{o=c.stateNode;var f=c.memoizedProps.style,h=f!=null&&f.hasOwnProperty("display")?f.display:null;o.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(g){He(c,c.return,g)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(g){He(c,c.return,g)}}}else if(t.tag===18){if(n===null){c=t;try{var p=c.stateNode;a?pO(p,!0):pO(c.stateNode,!1)}catch(g){He(c,c.return,g)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,kh(e,n))));break;case 19:jn(t,e),An(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kh(e,r)));break;case 30:break;case 21:break;default:jn(t,e),An(e)}}function An(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(bR(r)){n=r;break}r=r.return}if(n==null)throw Error(H(160));switch(n.tag){case 27:var a=n.stateNode,i=Gv(e);am(e,i,a);break;case 5:var s=n.stateNode;n.flags&32&&(Wl(s,""),n.flags&=-33);var o=Gv(e);am(e,o,s);break;case 3:case 4:var c=n.stateNode.containerInfo,u=Gv(e);Wb(e,u,c);break;default:throw Error(H(161))}}catch(d){He(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function TR(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;TR(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wR(e,t.alternate,t),t=t.sibling}function Os(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:as(4,t,t.return),Os(t);break;case 1:na(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&vR(t,t.return,n),Os(t);break;case 27:od(t.stateNode);case 26:case 5:na(t,t.return),Os(t);break;case 22:t.memoizedState===null&&Os(t);break;case 30:Os(t);break;default:Os(t)}e=e.sibling}}function Ca(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,a=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:Ca(a,i,n),qf(4,i);break;case 1:if(Ca(a,i,n),r=i,a=r.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){He(r,r.return,u)}if(r=i,a=r.updateQueue,a!==null){var o=r.stateNode;try{var c=a.shared.hiddenCallbacks;if(c!==null)for(a.shared.hiddenCallbacks=null,a=0;a<c.length;a++)Ok(c[a],o)}catch(u){He(r,r.return,u)}}n&&s&64&&yR(i),rd(i,i.return);break;case 27:SR(i);case 26:case 5:Ca(a,i,n),n&&r===null&&s&4&&xR(i),rd(i,i.return);break;case 12:Ca(a,i,n);break;case 31:Ca(a,i,n),n&&s&4&&OR(a,i);break;case 13:Ca(a,i,n),n&&s&4&&NR(a,i);break;case 22:i.memoizedState===null&&Ca(a,i,n),rd(i,i.return);break;case 30:break;default:Ca(a,i,n)}t=t.sibling}}function Ow(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Vf(n))}function Nw(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vf(e))}function Mr(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)CR(e,t,n,r),t=t.sibling}function CR(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Mr(e,t,n,r),a&2048&&qf(9,t);break;case 1:Mr(e,t,n,r);break;case 3:Mr(e,t,n,r),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vf(e)));break;case 12:if(a&2048){Mr(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,o=i.onPostCommit;typeof o=="function"&&o(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){He(t,t.return,c)}}else Mr(e,t,n,r);break;case 31:Mr(e,t,n,r);break;case 13:Mr(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,t.memoizedState!==null?i._visibility&2?Mr(e,t,n,r):ad(e,t):i._visibility&2?Mr(e,t,n,r):(i._visibility|=2,Qo(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Ow(s,t);break;case 24:Mr(e,t,n,r),a&2048&&Nw(t.alternate,t);break;default:Mr(e,t,n,r)}}function Qo(e,t,n,r,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,s=t,o=n,c=r,u=s.flags;switch(s.tag){case 0:case 11:case 15:Qo(i,s,o,c,a),qf(8,s);break;case 23:break;case 22:var d=s.stateNode;s.memoizedState!==null?d._visibility&2?Qo(i,s,o,c,a):ad(i,s):(d._visibility|=2,Qo(i,s,o,c,a)),a&&u&2048&&Ow(s.alternate,s);break;case 24:Qo(i,s,o,c,a),a&&u&2048&&Nw(s.alternate,s);break;default:Qo(i,s,o,c,a)}t=t.sibling}}function ad(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:ad(n,r),a&2048&&Ow(r.alternate,r);break;case 24:ad(n,r),a&2048&&Nw(r.alternate,r);break;default:ad(n,r)}t=t.sibling}}var Bu=8192;function Uo(e,t,n){if(e.subtreeFlags&Bu)for(e=e.child;e!==null;)_R(e,t,n),e=e.sibling}function _R(e,t,n){switch(e.tag){case 26:Uo(e,t,n),e.flags&Bu&&e.memoizedState!==null&&kB(n,$r,e.memoizedState,e.memoizedProps);break;case 5:Uo(e,t,n);break;case 3:case 4:var r=$r;$r=fm(e.stateNode.containerInfo),Uo(e,t,n),$r=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bu,Bu=16777216,Uo(e,t,n),Bu=r):Uo(e,t,n));break;default:Uo(e,t,n)}}function PR(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function yu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];qt=r,kR(r,e)}PR(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)MR(e),e=e.sibling}function MR(e){switch(e.tag){case 0:case 11:case 15:yu(e),e.flags&2048&&as(9,e,e.return);break;case 3:yu(e);break;case 12:yu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ap(e)):yu(e);break;default:yu(e)}}function Ap(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];qt=r,kR(r,e)}PR(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:as(8,t,t.return),Ap(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ap(t));break;default:Ap(t)}e=e.sibling}}function kR(e,t){for(;qt!==null;){var n=qt;switch(n.tag){case 0:case 11:case 15:as(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Vf(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,qt=r;else e:for(n=e;qt!==null;){r=qt;var a=r.sibling,i=r.return;if(jR(r),r===n){qt=null;break e}if(a!==null){a.return=i,qt=a;break e}qt=i}}}var Y8={getCacheForType:function(e){var t=an(_t),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return an(_t).controller.signal}},W8=typeof WeakMap=="function"?WeakMap:Map,$e=0,Qe=null,Ae=null,Ce=0,Ve=0,Bn=null,Ii=!1,Fc=!1,Ew=!1,ti=0,St=0,is=0,eo=0,Tw=0,Yn=0,Jl=0,id=null,Tn=null,Xb=!1,ny=0,RR=0,im=1/0,sm=null,Gi=null,Lt=0,Yi=null,ec=null,qa=0,Qb=0,Zb=null,DR=null,sd=0,Jb=null;function Zn(){return $e&2&&Ce!==0?Ce&-Ce:me.T!==null?_w():HM()}function $R(){if(Yn===0)if(!(Ce&536870912)||Pe){var e=Oh;Oh<<=1,!(Oh&3932160)&&(Oh=262144),Yn=e}else Yn=536870912;return e=nr.current,e!==null&&(e.flags|=32),Yn}function Pn(e,t,n){(e===Qe&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(tc(e,0),zi(e,Ce,Yn,!1)),Bf(e,n),(!($e&2)||e!==Qe)&&(e===Qe&&(!($e&2)&&(eo|=n),St===4&&zi(e,Ce,Yn,!1)),ya(e))}function LR(e,t,n){if($e&6)throw Error(H(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||zf(e,t),a=r?Z8(e,t):Wv(e,t,!0),i=r;do{if(a===0){Fc&&!r&&zi(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!X8(n)){a=Wv(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var o=e;a=id;var c=o.current.memoizedState.isDehydrated;if(c&&(tc(o,s).flags|=256),s=Wv(o,s,!1),s!==2){if(Ew&&!c){o.errorRecoveryDisabledLanes|=i,eo|=i,a=4;break e}i=Tn,Tn=a,i!==null&&(Tn===null?Tn=i:Tn.push.apply(Tn,i))}a=s}if(i=!1,a!==2)continue}}if(a===1){tc(e,0),zi(e,t,0,!0);break}e:{switch(r=e,i=a,i){case 0:case 1:throw Error(H(345));case 4:if((t&4194048)!==t)break;case 6:zi(r,t,Yn,!Ii);break e;case 2:Tn=null;break;case 3:case 5:break;default:throw Error(H(329))}if((t&62914560)===t&&(a=ny+300-Wn(),10<a)){if(zi(r,t,Yn,!Ii),qg(r,0,!0)!==0)break e;qa=t,r.timeoutHandle=rD(tO.bind(null,r,n,Tn,sm,Xb,t,Yn,eo,Jl,Ii,i,"Throttled",-0,0),a);break e}tO(r,n,Tn,sm,Xb,t,Yn,eo,Jl,Ii,i,null,-0,0)}}break}while(!0);ya(e)}function tO(e,t,n,r,a,i,s,o,c,u,d,f,h,p){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:La},_R(t,i,f);var g=(i&62914560)===i?ny-Wn():(i&4194048)===i?RR-Wn():0;if(g=RB(f,g),g!==null){qa=i,e.cancelPendingCommit=g(rO.bind(null,e,t,i,n,r,a,s,o,c,d,f,null,h,p)),zi(e,i,s,!u);return}}rO(e,t,i,n,r,a,s,o,c)}function X8(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!tr(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zi(e,t,n,r){t&=~Tw,t&=~eo,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-Qn(a),s=1<<i;r[i]=-1,a&=~s}n!==0&&UM(e,n,t)}function ry(){return $e&6?!0:(Kf(0),!1)}function Cw(){if(Ae!==null){if(Ve===0)var e=Ae.return;else e=Ae,Ia=Eo=null,pw(e),Nl=null,Cd=0,e=Ae;for(;e!==null;)gR(e.alternate,e),e=e.return;Ae=null}}function tc(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,gB(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),qa=0,Cw(),Qe=e,Ae=n=Va(e.current,null),Ce=t,Ve=0,Bn=null,Ii=!1,Fc=zf(e,t),Ew=!1,Jl=Yn=Tw=eo=is=St=0,Tn=id=null,Xb=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var a=31-Qn(r),i=1<<a;t|=e[a],r&=~i}return ti=t,Wg(),n}function IR(e,t){we=null,me.H=Pd,t===Uc||t===Qg?(t=kA(),Ve=3):t===ow?(t=kA(),Ve=4):Ve=t===jw?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bn=t,Ae===null&&(St=1,nm(e,gr(t,e.current)))}function zR(){var e=nr.current;return e===null?!0:(Ce&4194048)===Ce?br===null:(Ce&62914560)===Ce||Ce&536870912?e===br:!1}function BR(){var e=me.H;return me.H=Pd,e===null?Pd:e}function UR(){var e=me.A;return me.A=Y8,e}function om(){St=4,Ii||(Ce&4194048)!==Ce&&nr.current!==null||(Fc=!0),!(is&134217727)&&!(eo&134217727)||Qe===null||zi(Qe,Ce,Yn,!1)}function Wv(e,t,n){var r=$e;$e|=2;var a=BR(),i=UR();(Qe!==e||Ce!==t)&&(sm=null,tc(e,t)),t=!1;var s=St;e:do try{if(Ve!==0&&Ae!==null){var o=Ae,c=Bn;switch(Ve){case 8:Cw(),s=6;break e;case 3:case 2:case 9:case 6:nr.current===null&&(t=!0);var u=Ve;if(Ve=0,Bn=null,dl(e,o,c,u),n&&Fc){s=0;break e}break;default:u=Ve,Ve=0,Bn=null,dl(e,o,c,u)}}Q8(),s=St;break}catch(d){IR(e,d)}while(!0);return t&&e.shellSuspendCounter++,Ia=Eo=null,$e=r,me.H=a,me.A=i,Ae===null&&(Qe=null,Ce=0,Wg()),s}function Q8(){for(;Ae!==null;)FR(Ae)}function Z8(e,t){var n=$e;$e|=2;var r=BR(),a=UR();Qe!==e||Ce!==t?(sm=null,im=Wn()+500,tc(e,t)):Fc=zf(e,t);e:do try{if(Ve!==0&&Ae!==null){t=Ae;var i=Bn;t:switch(Ve){case 1:Ve=0,Bn=null,dl(e,t,i,1);break;case 2:case 9:if(MA(i)){Ve=0,Bn=null,nO(t);break}t=function(){Ve!==2&&Ve!==9||Qe!==e||(Ve=7),ya(e)},i.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:MA(i)?(Ve=0,Bn=null,nO(t)):(Ve=0,Bn=null,dl(e,t,i,7));break;case 5:var s=null;switch(Ae.tag){case 26:s=Ae.memoizedState;case 5:case 27:var o=Ae;if(s?lD(s):o.stateNode.complete){Ve=0,Bn=null;var c=o.sibling;if(c!==null)Ae=c;else{var u=o.return;u!==null?(Ae=u,ay(u)):Ae=null}break t}}Ve=0,Bn=null,dl(e,t,i,5);break;case 6:Ve=0,Bn=null,dl(e,t,i,6);break;case 8:Cw(),St=6;break e;default:throw Error(H(462))}}J8();break}catch(d){IR(e,d)}while(!0);return Ia=Eo=null,me.H=r,me.A=a,$e=n,Ae!==null?0:(Qe=null,Ce=0,Wg(),St)}function J8(){for(;Ae!==null&&!wz();)FR(Ae)}function FR(e){var t=mR(e.alternate,e,ti);e.memoizedProps=e.pendingProps,t===null?ay(e):Ae=t}function nO(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=WA(n,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=WA(n,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:pw(t);default:gR(n,t),t=Ae=gk(t,ti),t=mR(n,t,ti)}e.memoizedProps=e.pendingProps,t===null?ay(e):Ae=t}function dl(e,t,n,r){Ia=Eo=null,pw(t),Nl=null,Cd=0;var a=t.return;try{if(U8(e,a,t,n,Ce)){St=1,nm(e,gr(n,e.current)),Ae=null;return}}catch(i){if(a!==null)throw Ae=a,i;St=1,nm(e,gr(n,e.current)),Ae=null;return}t.flags&32768?(Pe||r===1?e=!0:Fc||Ce&536870912?e=!1:(Ii=e=!0,(r===2||r===9||r===3||r===6)&&(r=nr.current,r!==null&&r.tag===13&&(r.flags|=16384))),VR(t,e)):ay(t)}function ay(e){var t=e;do{if(t.flags&32768){VR(t,Ii);return}e=t.return;var n=H8(t.alternate,t,ti);if(n!==null){Ae=n;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);St===0&&(St=5)}function VR(e,t){do{var n=q8(e.alternate,e);if(n!==null){n.flags&=32767,Ae=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=n}while(e!==null);St=6,Ae=null}function rO(e,t,n,r,a,i,s,o,c){e.cancelPendingCommit=null;do iy();while(Lt!==0);if($e&6)throw Error(H(327));if(t!==null){if(t===e.current)throw Error(H(177));if(i=t.lanes|t.childLanes,i|=ew,Mz(e,n,i,s,o,c),e===Qe&&(Ae=Qe=null,Ce=0),ec=t,Yi=e,qa=n,Qb=i,Zb=a,DR=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,rB(qp,function(){return YR(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=me.T,me.T=null,a=Ie.p,Ie.p=2,s=$e,$e|=4;try{K8(e,t,n)}finally{$e=s,Ie.p=a,me.T=r}}Lt=1,HR(),qR(),KR()}}function HR(){if(Lt===1){Lt=0;var e=Yi,t=ec,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=me.T,me.T=null;var r=Ie.p;Ie.p=2;var a=$e;$e|=4;try{ER(t,e);var i=r0,s=lk(e.containerInfo),o=i.focusedElem,c=i.selectionRange;if(s!==o&&o&&o.ownerDocument&&ok(o.ownerDocument.documentElement,o)){if(c!==null&&JS(o)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(d,o.value.length);else{var f=o.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var p=h.getSelection(),g=o.textContent.length,m=Math.min(c.start,g),v=c.end===void 0?m:Math.min(c.end,g);!p.extend&&m>v&&(s=v,v=m,m=s);var y=OA(o,m),x=OA(o,v);if(y&&x&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==x.node||p.focusOffset!==x.offset)){var b=f.createRange();b.setStart(y.node,y.offset),p.removeAllRanges(),m>v?(p.addRange(b),p.extend(x.node,x.offset)):(b.setEnd(x.node,x.offset),p.addRange(b))}}}}for(f=[],p=o;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<f.length;o++){var w=f[o];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}mm=!!n0,r0=n0=null}finally{$e=a,Ie.p=r,me.T=n}}e.current=t,Lt=2}}function qR(){if(Lt===2){Lt=0;var e=Yi,t=ec,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=me.T,me.T=null;var r=Ie.p;Ie.p=2;var a=$e;$e|=4;try{wR(e,t.alternate,t)}finally{$e=a,Ie.p=r,me.T=n}}Lt=3}}function KR(){if(Lt===4||Lt===3){Lt=0,jz();var e=Yi,t=ec,n=qa,r=DR;t.subtreeFlags&10256||t.flags&10256?Lt=5:(Lt=0,ec=Yi=null,GR(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Gi=null),KS(n),t=t.stateNode,Xn&&typeof Xn.onCommitFiberRoot=="function")try{Xn.onCommitFiberRoot(If,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=me.T,a=Ie.p,Ie.p=2,me.T=null;try{for(var i=e.onRecoverableError,s=0;s<r.length;s++){var o=r[s];i(o.value,{componentStack:o.stack})}}finally{me.T=t,Ie.p=a}}qa&3&&iy(),ya(e),a=e.pendingLanes,n&261930&&a&42?e===Jb?sd++:(sd=0,Jb=e):sd=0,Kf(0)}}function GR(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Vf(t)))}function iy(){return HR(),qR(),KR(),YR()}function YR(){if(Lt!==5)return!1;var e=Yi,t=Qb;Qb=0;var n=KS(qa),r=me.T,a=Ie.p;try{Ie.p=32>n?32:n,me.T=null,n=Zb,Zb=null;var i=Yi,s=qa;if(Lt=0,ec=Yi=null,qa=0,$e&6)throw Error(H(331));var o=$e;if($e|=4,MR(i.current),CR(i,i.current,s,n),$e=o,Kf(0,!1),Xn&&typeof Xn.onPostCommitFiberRoot=="function")try{Xn.onPostCommitFiberRoot(If,i)}catch{}return!0}finally{Ie.p=a,me.T=r,GR(e,t)}}function aO(e,t,n){t=gr(n,t),t=Kb(e.stateNode,t,2),e=Ki(e,t,2),e!==null&&(Bf(e,2),ya(e))}function He(e,t,n){if(e.tag===3)aO(e,e,n);else for(;t!==null;){if(t.tag===3){aO(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Gi===null||!Gi.has(r))){e=gr(n,e),n=cR(2),r=Ki(t,n,2),r!==null&&(uR(n,r,t,e),Bf(r,2),ya(r));break}}t=t.return}}function Xv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new W8;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(Ew=!0,a.add(n),e=eB.bind(null,e,t,n),t.then(e,e))}function eB(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qe===e&&(Ce&n)===n&&(St===4||St===3&&(Ce&62914560)===Ce&&300>Wn()-ny?!($e&2)&&tc(e,0):Tw|=n,Jl===Ce&&(Jl=0)),ya(e)}function WR(e,t){t===0&&(t=BM()),e=No(e,t),e!==null&&(Bf(e,t),ya(e))}function tB(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),WR(e,n)}function nB(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(H(314))}r!==null&&r.delete(t),WR(e,n)}function rB(e,t){return HS(e,t)}var lm=null,Zo=null,e0=!1,cm=!1,Qv=!1,Bi=0;function ya(e){e!==Zo&&e.next===null&&(Zo===null?lm=Zo=e:Zo=Zo.next=e),cm=!0,e0||(e0=!0,iB())}function Kf(e,t){if(!Qv&&cm){Qv=!0;do for(var n=!1,r=lm;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Qn(42|e)+1)-1,i&=a&~(s&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,iO(r,i))}else i=Ce,i=qg(r,r===Qe?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||zf(r,i)||(n=!0,iO(r,i));r=r.next}while(n);Qv=!1}}function aB(){XR()}function XR(){cm=e0=!1;var e=0;Bi!==0&&mB()&&(e=Bi);for(var t=Wn(),n=null,r=lm;r!==null;){var a=r.next,i=QR(r,t);i===0?(r.next=null,n===null?lm=a:n.next=a,a===null&&(Zo=n)):(n=r,(e!==0||i&3)&&(cm=!0)),r=a}Lt!==0&&Lt!==5||Kf(e),Bi!==0&&(Bi=0)}function QR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-Qn(i),o=1<<s,c=a[s];c===-1?(!(o&n)||o&r)&&(a[s]=Pz(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}if(t=Qe,n=Ce,n=qg(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ov(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||zf(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ov(r),KS(n)){case 2:case 8:n=IM;break;case 32:n=qp;break;case 268435456:n=zM;break;default:n=qp}return r=ZR.bind(null,e),n=HS(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ov(r),e.callbackPriority=2,e.callbackNode=null,2}function ZR(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(iy()&&e.callbackNode!==n)return null;var r=Ce;return r=qg(e,e===Qe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(LR(e,r,t),QR(e,Wn()),e.callbackNode!=null&&e.callbackNode===n?ZR.bind(null,e):null)}function iO(e,t){if(iy())return null;LR(e,t,!0)}function iB(){yB(function(){$e&6?HS(LM,aB):XR()})}function _w(){if(Bi===0){var e=Xl;e===0&&(e=Ah,Ah<<=1,!(Ah&261888)&&(Ah=256)),Bi=e}return Bi}function sO(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mp(""+e)}function oO(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function sB(e,t,n,r,a){if(t==="submit"&&n&&n.stateNode===a){var i=sO((a[kn]||null).action),s=r.submitter;s&&(t=(t=s[kn]||null)?sO(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var o=new Kg("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Bi!==0){var c=s?oO(a,s):new FormData(a);Hb(n,{pending:!0,data:c,method:a.method,action:i},null,c)}}else typeof i=="function"&&(o.preventDefault(),c=s?oO(a,s):new FormData(a),Hb(n,{pending:!0,data:c,method:a.method,action:i},i,c))},currentTarget:a}]})}}for(var Zv=0;Zv<Mb.length;Zv++){var Jv=Mb[Zv],oB=Jv.toLowerCase(),lB=Jv[0].toUpperCase()+Jv.slice(1);Hr(oB,"on"+lB)}Hr(uk,"onAnimationEnd");Hr(dk,"onAnimationIteration");Hr(fk,"onAnimationStart");Hr("dblclick","onDoubleClick");Hr("focusin","onFocus");Hr("focusout","onBlur");Hr(A8,"onTransitionRun");Hr(O8,"onTransitionStart");Hr(N8,"onTransitionCancel");Hr(hk,"onTransitionEnd");Yl("onMouseEnter",["mouseout","mouseover"]);Yl("onMouseLeave",["mouseout","mouseover"]);Yl("onPointerEnter",["pointerout","pointerover"]);Yl("onPointerLeave",["pointerout","pointerover"]);jo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));jo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));jo("onBeforeInput",["compositionend","keypress","textInput","paste"]);jo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));jo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));jo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Md="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(" "),cB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Md));function JR(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(d){Gp(d)}a.currentTarget=null,i=c}else for(s=0;s<r.length;s++){if(o=r[s],c=o.instance,u=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(d){Gp(d)}a.currentTarget=null,i=c}}}}function je(e,t){var n=t[Ab];n===void 0&&(n=t[Ab]=new Set);var r=e+"__bubble";n.has(r)||(eD(t,e,2,!1),n.add(r))}function ex(e,t,n){var r=0;t&&(r|=4),eD(n,e,r,t)}var Rh="_reactListening"+Math.random().toString(36).slice(2);function Pw(e){if(!e[Rh]){e[Rh]=!0,qM.forEach(function(n){n!=="selectionchange"&&(cB.has(n)||ex(n,!1,e),ex(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rh]||(t[Rh]=!0,ex("selectionchange",!1,t))}}function eD(e,t,n,r){switch(hD(t)){case 2:var a=LB;break;case 8:a=IB;break;default:a=Dw}n=a.bind(null,t,n,e),a=void 0,!Cb||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function tx(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===a)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&s.stateNode.containerInfo===a)return;s=s.return}for(;o!==null;){if(s=nl(o),s===null)return;if(c=s.tag,c===5||c===6||c===26||c===27){r=i=s;continue e}o=o.parentNode}}r=r.return}JM(function(){var u=i,d=WS(n),f=[];e:{var h=pk.get(e);if(h!==void 0){var p=Kg,g=e;switch(e){case"keypress":if(yp(n)===0)break e;case"keydown":case"keyup":p=n8;break;case"focusin":g="focus",p=_v;break;case"focusout":g="blur",p=_v;break;case"beforeblur":case"afterblur":p=_v;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=mA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Hz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=i8;break;case uk:case dk:case fk:p=Gz;break;case hk:p=o8;break;case"scroll":case"scrollend":p=Fz;break;case"wheel":p=c8;break;case"copy":case"cut":case"paste":p=Wz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yA;break;case"toggle":case"beforetoggle":p=d8}var m=(t&4)!==0,v=!m&&(e==="scroll"||e==="scrollend"),y=m?h!==null?h+"Capture":null:h;m=[];for(var x=u,b;x!==null;){var w=x;if(b=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||b===null||y===null||(w=Ad(x,y),w!=null&&m.push(kd(x,w,b))),v)break;x=x.return}0<m.length&&(h=new p(h,g,null,n,d),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Tb&&(g=n.relatedTarget||n.fromElement)&&(nl(g)||g[Ic]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=u,g=g?nl(g):null,g!==null&&(v=Lf(g),m=g.tag,g!==v||m!==5&&m!==27&&m!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=mA,w="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(m=yA,w="onPointerLeave",y="onPointerEnter",x="pointer"),v=p==null?h:Iu(p),b=g==null?h:Iu(g),h=new m(w,x+"leave",p,n,d),h.target=v,h.relatedTarget=b,w=null,nl(d)===u&&(m=new m(y,x+"enter",g,n,d),m.target=b,m.relatedTarget=v,w=m),v=w,p&&g)t:{for(m=uB,y=p,x=g,b=0,w=y;w;w=m(w))b++;w=0;for(var S=x;S;S=m(S))w++;for(;0<b-w;)y=m(y),b--;for(;0<w-b;)x=m(x),w--;for(;b--;){if(y===x||x!==null&&y===x.alternate){m=y;break t}y=m(y),x=m(x)}m=null}else m=null;p!==null&&lO(f,h,p,m,!1),g!==null&&v!==null&&lO(f,v,g,m,!0)}}e:{if(h=u?Iu(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var A=SA;else if(bA(h))if(ik)A=S8;else{A=x8;var O=v8}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&YS(u.elementType)&&(A=SA):A=b8;if(A&&(A=A(e,u))){ak(f,A,n,d);break e}O&&O(e,h,u),e==="focusout"&&u&&h.type==="number"&&u.memoizedProps.value!=null&&Eb(h,"number",h.value)}switch(O=u?Iu(u):window,e){case"focusin":(bA(O)||O.contentEditable==="true")&&(il=O,_b=u,Qu=null);break;case"focusout":Qu=_b=il=null;break;case"mousedown":Pb=!0;break;case"contextmenu":case"mouseup":case"dragend":Pb=!1,NA(f,n,d);break;case"selectionchange":if(j8)break;case"keydown":case"keyup":NA(f,n,d)}var N;if(ZS)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else al?nk(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(tk&&n.locale!=="ko"&&(al||E!=="onCompositionStart"?E==="onCompositionEnd"&&al&&(N=ek()):(Li=d,XS="value"in Li?Li.value:Li.textContent,al=!0)),O=um(u,E),0<O.length&&(E=new gA(E,e,null,n,d),f.push({event:E,listeners:O}),N?E.data=N:(N=rk(n),N!==null&&(E.data=N)))),(N=h8?p8(e,n):m8(e,n))&&(E=um(u,"onBeforeInput"),0<E.length&&(O=new gA("onBeforeInput","beforeinput",null,n,d),f.push({event:O,listeners:E}),O.data=N)),sB(f,e,u,n,d)}JR(f,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function um(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Ad(e,n),a!=null&&r.unshift(kd(e,a,i)),a=Ad(e,t),a!=null&&r.push(kd(e,a,i))),e.tag===3)return r;e=e.return}return[]}function uB(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function lO(e,t,n,r,a){for(var i=t._reactName,s=[];n!==null&&n!==r;){var o=n,c=o.alternate,u=o.stateNode;if(o=o.tag,c!==null&&c===r)break;o!==5&&o!==26&&o!==27||u===null||(c=u,a?(u=Ad(n,i),u!=null&&s.unshift(kd(n,u,c))):a||(u=Ad(n,i),u!=null&&s.push(kd(n,u,c)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var dB=/\r\n?/g,fB=/\u0000|\uFFFD/g;function cO(e){return(typeof e=="string"?e:""+e).replace(dB,`
`).replace(fB,"")}function tD(e,t){return t=cO(t),cO(e)===t}function Ge(e,t,n,r,a,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Wl(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Wl(e,""+r);break;case"className":Eh(e,"class",r);break;case"tabIndex":Eh(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Eh(e,n,r);break;case"style":ZM(e,r,i);break;case"data":if(t!=="object"){Eh(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=mp(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"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 i=="function"&&(n==="formAction"?(t!=="input"&&Ge(e,t,"name",a.name,a,null),Ge(e,t,"formEncType",a.formEncType,a,null),Ge(e,t,"formMethod",a.formMethod,a,null),Ge(e,t,"formTarget",a.formTarget,a,null)):(Ge(e,t,"encType",a.encType,a,null),Ge(e,t,"method",a.method,a,null),Ge(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=mp(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=La);break;case"onScroll":r!=null&&je("scroll",e);break;case"onScrollEnd":r!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(H(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(H(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=mp(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":je("beforetoggle",e),je("toggle",e),pp(e,"popover",r);break;case"xlinkActuate":ja(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ja(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ja(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ja(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ja(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ja(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ja(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ja(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ja(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":pp(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Bz.get(n)||n,pp(e,n,r))}}function t0(e,t,n,r,a,i){switch(n){case"style":ZM(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(H(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(H(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Wl(e,r):(typeof r=="number"||typeof r=="bigint")&&Wl(e,""+r);break;case"onScroll":r!=null&&je("scroll",e);break;case"onScrollEnd":r!=null&&je("scrollend",e);break;case"onClick":r!=null&&(e.onclick=La);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!KM.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[kn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):pp(e,n,r)}}}function sn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var r=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(s!=null)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:Ge(e,t,i,s,n,null)}}a&&Ge(e,t,"srcSet",n.srcSet,n,null),r&&Ge(e,t,"src",n.src,n,null);return;case"input":je("invalid",e);var o=i=s=a=null,c=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case"name":a=d;break;case"type":s=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":i=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(H(137,t));break;default:Ge(e,t,r,d,n,null)}}WM(e,i,o,c,u,s,a,!1);return;case"select":je("invalid",e),r=s=i=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":s=o;break;case"multiple":r=o;default:Ge(e,t,a,o,n,null)}t=i,n=s,e.multiple=!!r,t!=null?jl(e,!!r,t,!1):n!=null&&jl(e,!!r,n,!0);return;case"textarea":je("invalid",e),i=a=r=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":r=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(H(91));break;default:Ge(e,t,s,o,n,null)}QM(e,r,a,i);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ge(e,t,c,r,n,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(r=0;r<Md.length;r++)je(Md[r],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:Ge(e,t,u,r,n,null)}return;default:if(YS(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&t0(e,t,d,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&Ge(e,t,o,r,n,null))}function hB(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,s=null,o=null,c=null,u=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(p)||Ge(e,t,p,null,r,f)}}for(var h in r){var p=r[h];if(f=n[h],r.hasOwnProperty(h)&&(p!=null||f!=null))switch(h){case"type":i=p;break;case"name":a=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":o=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(H(137,t));break;default:p!==f&&Ge(e,t,h,p,r,f)}}Nb(e,s,o,c,u,d,i,a);return;case"select":p=s=o=h=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":p=c;default:r.hasOwnProperty(i)||Ge(e,t,i,null,r,c)}for(a in r)if(i=r[a],c=n[a],r.hasOwnProperty(a)&&(i!=null||c!=null))switch(a){case"value":h=i;break;case"defaultValue":o=i;break;case"multiple":s=i;default:i!==c&&Ge(e,t,a,i,r,c)}t=o,n=s,r=p,h!=null?jl(e,!!n,h,!1):!!r!=!!n&&(t!=null?jl(e,!!n,t,!0):jl(e,!!n,n?[]:"",!1));return;case"textarea":p=h=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Ge(e,t,o,null,r,a)}for(s in r)if(a=r[s],i=n[s],r.hasOwnProperty(s)&&(a!=null||i!=null))switch(s){case"value":h=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(H(91));break;default:a!==i&&Ge(e,t,s,a,r,i)}XM(e,h,p);return;case"option":for(var g in n)if(h=n[g],n.hasOwnProperty(g)&&h!=null&&!r.hasOwnProperty(g))switch(g){case"selected":e.selected=!1;break;default:Ge(e,t,g,null,r,h)}for(c in r)if(h=r[c],p=n[c],r.hasOwnProperty(c)&&h!==p&&(h!=null||p!=null))switch(c){case"selected":e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Ge(e,t,c,h,r,p)}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 m in n)h=n[m],n.hasOwnProperty(m)&&h!=null&&!r.hasOwnProperty(m)&&Ge(e,t,m,null,r,h);for(u in r)if(h=r[u],p=n[u],r.hasOwnProperty(u)&&h!==p&&(h!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(H(137,t));break;default:Ge(e,t,u,h,r,p)}return;default:if(YS(t)){for(var v in n)h=n[v],n.hasOwnProperty(v)&&h!==void 0&&!r.hasOwnProperty(v)&&t0(e,t,v,void 0,r,h);for(d in r)h=r[d],p=n[d],!r.hasOwnProperty(d)||h===p||h===void 0&&p===void 0||t0(e,t,d,h,r,p);return}}for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!=null&&!r.hasOwnProperty(y)&&Ge(e,t,y,null,r,h);for(f in r)h=r[f],p=n[f],!r.hasOwnProperty(f)||h===p||h==null&&p==null||Ge(e,t,f,h,r,p)}function uO(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pB(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],i=a.transferSize,s=a.initiatorType,o=a.duration;if(i&&o&&uO(s)){for(s=0,o=a.responseEnd,r+=1;r<n.length;r++){var c=n[r],u=c.startTime;if(u>o)break;var d=c.transferSize,f=c.initiatorType;d&&uO(f)&&(c=c.responseEnd,s+=d*(c<o?1:(o-u)/(c-u)))}if(--r,t+=8*(i+s)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var n0=null,r0=null;function dm(e){return e.nodeType===9?e:e.ownerDocument}function dO(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function nD(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function a0(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nx=null;function mB(){var e=window.event;return e&&e.type==="popstate"?e===nx?!1:(nx=e,!0):(nx=null,!1)}var rD=typeof setTimeout=="function"?setTimeout:void 0,gB=typeof clearTimeout=="function"?clearTimeout:void 0,fO=typeof Promise=="function"?Promise:void 0,yB=typeof queueMicrotask=="function"?queueMicrotask:typeof fO<"u"?function(e){return fO.resolve(null).then(e).catch(vB)}:rD;function vB(e){setTimeout(function(){throw e})}function ls(e){return e==="head"}function hO(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(a),rc(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")od(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,od(n);for(var i=n.firstChild;i;){var s=i.nextSibling,o=i.nodeName;i[Uf]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=s}}else n==="body"&&od(e.ownerDocument.body);n=a}while(n);rc(t)}function pO(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function i0(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":i0(n),GS(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function xB(e,t,n,r){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Uf])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Sr(e.nextSibling),e===null)break}return null}function bB(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Sr(e.nextSibling),e===null))return null;return e}function aD(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Sr(e.nextSibling),e===null))return null;return e}function s0(e){return e.data==="$?"||e.data==="$~"}function o0(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function SB(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Sr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var l0=null;function mO(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Sr(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function gO(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function iD(e,t,n){switch(t=dm(n),e){case"html":if(e=t.documentElement,!e)throw Error(H(452));return e;case"head":if(e=t.head,!e)throw Error(H(453));return e;case"body":if(e=t.body,!e)throw Error(H(454));return e;default:throw Error(H(451))}}function od(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);GS(e)}var wr=new Map,yO=new Set;function fm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var oi=Ie.d;Ie.d={f:wB,r:jB,D:AB,C:OB,L:NB,m:EB,X:CB,S:TB,M:_B};function wB(){var e=oi.f(),t=ry();return e||t}function jB(e){var t=zc(e);t!==null&&t.tag===5&&t.type==="form"?Zk(t):oi.r(e)}var Vc=typeof document>"u"?null:document;function sD(e,t,n){var r=Vc;if(r&&typeof t=="string"&&t){var a=mr(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),yO.has(a)||(yO.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),sn(t,"link",e),Kt(t),r.head.appendChild(t)))}}function AB(e){oi.D(e),sD("dns-prefetch",e,null)}function OB(e,t){oi.C(e,t),sD("preconnect",e,t)}function NB(e,t,n){oi.L(e,t,n);var r=Vc;if(r&&e&&t){var a='link[rel="preload"][as="'+mr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+mr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+mr(n.imageSizes)+'"]')):a+='[href="'+mr(e)+'"]';var i=a;switch(t){case"style":i=nc(e);break;case"script":i=Hc(e)}wr.has(i)||(e=lt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),wr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Gf(i))||t==="script"&&r.querySelector(Yf(i))||(t=r.createElement("link"),sn(t,"link",e),Kt(t),r.head.appendChild(t)))}}function EB(e,t){oi.m(e,t);var n=Vc;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+mr(r)+'"][href="'+mr(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Hc(e)}if(!wr.has(i)&&(e=lt({rel:"modulepreload",href:e},t),wr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Yf(i)))return}r=n.createElement("link"),sn(r,"link",e),Kt(r),n.head.appendChild(r)}}}function TB(e,t,n){oi.S(e,t,n);var r=Vc;if(r&&e){var a=wl(r).hoistableStyles,i=nc(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Gf(i)))o.loading=5;else{e=lt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=wr.get(i))&&Mw(e,n);var c=s=r.createElement("link");Kt(c),sn(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Op(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function CB(e,t){oi.X(e,t);var n=Vc;if(n&&e){var r=wl(n).hoistableScripts,a=Hc(e),i=r.get(a);i||(i=n.querySelector(Yf(a)),i||(e=lt({src:e,async:!0},t),(t=wr.get(a))&&kw(e,t),i=n.createElement("script"),Kt(i),sn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function _B(e,t){oi.M(e,t);var n=Vc;if(n&&e){var r=wl(n).hoistableScripts,a=Hc(e),i=r.get(a);i||(i=n.querySelector(Yf(a)),i||(e=lt({src:e,async:!0,type:"module"},t),(t=wr.get(a))&&kw(e,t),i=n.createElement("script"),Kt(i),sn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function vO(e,t,n,r){var a=(a=Vi.current)?fm(a):null;if(!a)throw Error(H(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=nc(n.href),n=wl(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=nc(n.href);var i=wl(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Gf(e)))&&!i._p&&(s.instance=i,s.state.loading=5),wr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wr.set(e,n),i||PB(a,e,n,s.state))),t&&r===null)throw Error(H(528,""));return s}if(t&&r!==null)throw Error(H(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hc(n),n=wl(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(H(444,e))}}function nc(e){return'href="'+mr(e)+'"'}function Gf(e){return'link[rel="stylesheet"]['+e+"]"}function oD(e){return lt({},e,{"data-precedence":e.precedence,precedence:null})}function PB(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),sn(t,"link",n),Kt(t),e.head.appendChild(t))}function Hc(e){return'[src="'+mr(e)+'"]'}function Yf(e){return"script[async]"+e}function xO(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+mr(n.href)+'"]');if(r)return t.instance=r,Kt(r),r;var a=lt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Kt(r),sn(r,"style",a),Op(r,n.precedence,e),t.instance=r;case"stylesheet":a=nc(n.href);var i=e.querySelector(Gf(a));if(i)return t.state.loading|=4,t.instance=i,Kt(i),i;r=oD(n),(a=wr.get(a))&&Mw(r,a),i=(e.ownerDocument||e).createElement("link"),Kt(i);var s=i;return s._p=new Promise(function(o,c){s.onload=o,s.onerror=c}),sn(i,"link",r),t.state.loading|=4,Op(i,n.precedence,e),t.instance=i;case"script":return i=Hc(n.src),(a=e.querySelector(Yf(i)))?(t.instance=a,Kt(a),a):(r=n,(a=wr.get(i))&&(r=lt({},n),kw(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Kt(a),sn(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(H(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Op(r,n.precedence,e));return t.instance}function Op(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Mw(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function kw(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Np=null;function bO(e,t,n){if(Np===null){var r=new Map,a=Np=new Map;a.set(n,r)}else a=Np,r=a.get(n),r||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[Uf]||i[tn]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(i):r.set(s,[i])}}return r}function SO(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function MB(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function lD(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function kB(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=nc(r.href),i=t.querySelector(Gf(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hm.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Kt(i);return}i=t.ownerDocument||t,r=oD(r),(a=wr.get(a))&&Mw(r,a),i=i.createElement("link"),Kt(i);var s=i;s._p=new Promise(function(o,c){s.onload=o,s.onerror=c}),sn(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=hm.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var rx=0;function RB(e,t){return e.stylesheets&&e.count===0&&Ep(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Ep(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&rx===0&&(rx=62500*pB());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ep(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>rx?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function hm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ep(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pm=null;function Ep(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pm=new Map,t.forEach(DB,e),pm=null,hm.call(e))}function DB(e,t){if(!(t.state.loading&4)){var n=pm.get(e);if(n)var r=n.get(null);else{n=new Map,pm.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var s=a[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}a=t.instance,s=a.getAttribute("data-precedence"),i=n.get(s)||r,i===r&&n.set(null,a),n.set(s,a),this.count++,r=hm.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Rd={$$typeof:$a,Provider:null,Consumer:null,_currentValue:Xs,_currentValue2:Xs,_threadCount:0};function $B(e,t,n,r,a,i,s,o,c){this.tag=1,this.containerInfo=e,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=Nv(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nv(0),this.hiddenUpdates=Nv(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function cD(e,t,n,r,a,i,s,o,c,u,d,f){return e=new $B(e,t,n,s,c,u,d,f,o),t=1,i===!0&&(t|=24),i=Kn(3,null,null,t),e.current=i,i.stateNode=e,t=iw(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},lw(i),e}function uD(e){return e?(e=ll,e):ll}function dD(e,t,n,r,a,i){a=uD(a),r.context===null?r.context=a:r.pendingContext=a,r=qi(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=Ki(e,r,t),n!==null&&(Pn(n,e,t),Ju(n,e,t))}function wO(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Rw(e,t){wO(e,t),(e=e.alternate)&&wO(e,t)}function fD(e){if(e.tag===13||e.tag===31){var t=No(e,67108864);t!==null&&Pn(t,e,67108864),Rw(e,67108864)}}function jO(e){if(e.tag===13||e.tag===31){var t=Zn();t=qS(t);var n=No(e,t);n!==null&&Pn(n,e,t),Rw(e,t)}}var mm=!0;function LB(e,t,n,r){var a=me.T;me.T=null;var i=Ie.p;try{Ie.p=2,Dw(e,t,n,r)}finally{Ie.p=i,me.T=a}}function IB(e,t,n,r){var a=me.T;me.T=null;var i=Ie.p;try{Ie.p=8,Dw(e,t,n,r)}finally{Ie.p=i,me.T=a}}function Dw(e,t,n,r){if(mm){var a=c0(r);if(a===null)tx(e,t,r,gm,n),AO(e,r);else if(BB(a,e,t,n,r))r.stopPropagation();else if(AO(e,r),t&4&&-1<zB.indexOf(e)){for(;a!==null;){var i=zc(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=js(i.pendingLanes);if(s!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var c=1<<31-Qn(s);o.entanglements[1]|=c,s&=~c}ya(i),!($e&6)&&(im=Wn()+500,Kf(0))}}break;case 31:case 13:o=No(i,2),o!==null&&Pn(o,i,2),ry(),Rw(i,2)}if(i=c0(r),i===null&&tx(e,t,r,gm,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else tx(e,t,r,null,n)}}function c0(e){return e=WS(e),$w(e)}var gm=null;function $w(e){if(gm=null,e=nl(e),e!==null){var t=Lf(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=MM(t),e!==null)return e;e=null}else if(n===31){if(e=kM(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gm=e,null}function hD(e){switch(e){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(Az()){case LM:return 2;case IM:return 8;case qp:case Oz:return 32;case zM:return 268435456;default:return 32}default:return 32}}var u0=!1,Wi=null,Xi=null,Qi=null,Dd=new Map,$d=new Map,Ni=[],zB="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 AO(e,t){switch(e){case"focusin":case"focusout":Wi=null;break;case"dragenter":case"dragleave":Xi=null;break;case"mouseover":case"mouseout":Qi=null;break;case"pointerover":case"pointerout":Dd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$d.delete(t.pointerId)}}function vu(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=zc(t),t!==null&&fD(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function BB(e,t,n,r,a){switch(t){case"focusin":return Wi=vu(Wi,e,t,n,r,a),!0;case"dragenter":return Xi=vu(Xi,e,t,n,r,a),!0;case"mouseover":return Qi=vu(Qi,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Dd.set(i,vu(Dd.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,$d.set(i,vu($d.get(i)||null,e,t,n,r,a)),!0}return!1}function pD(e){var t=nl(e.target);if(t!==null){var n=Lf(t);if(n!==null){if(t=n.tag,t===13){if(t=MM(n),t!==null){e.blockedOn=t,lA(e.priority,function(){jO(n)});return}}else if(t===31){if(t=kM(n),t!==null){e.blockedOn=t,lA(e.priority,function(){jO(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=c0(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Tb=r,n.target.dispatchEvent(r),Tb=null}else return t=zc(n),t!==null&&fD(t),e.blockedOn=n,!1;t.shift()}return!0}function OO(e,t,n){Tp(e)&&n.delete(t)}function UB(){u0=!1,Wi!==null&&Tp(Wi)&&(Wi=null),Xi!==null&&Tp(Xi)&&(Xi=null),Qi!==null&&Tp(Qi)&&(Qi=null),Dd.forEach(OO),$d.forEach(OO)}function Dh(e,t){e.blockedOn===t&&(e.blockedOn=null,u0||(u0=!0,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,UB)))}var $h=null;function NO(e){$h!==e&&($h=e,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,function(){$h===e&&($h=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if($w(r||n)===null)continue;break}var i=zc(n);i!==null&&(e.splice(t,3),t-=3,Hb(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function rc(e){function t(c){return Dh(c,e)}Wi!==null&&Dh(Wi,e),Xi!==null&&Dh(Xi,e),Qi!==null&&Dh(Qi,e),Dd.forEach(t),$d.forEach(t);for(var n=0;n<Ni.length;n++){var r=Ni[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ni.length&&(n=Ni[0],n.blockedOn===null);)pD(n),n.blockedOn===null&&Ni.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],s=a[kn]||null;if(typeof i=="function")s||NO(n);else if(s){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,s=i[kn]||null)o=s.formAction;else if($w(a)!==null)continue}else o=s.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),NO(n)}}}function mD(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(s){return a=s})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Lw(e){this._internalRoot=e}sy.prototype.render=Lw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));var n=t.current,r=Zn();dD(n,r,e,t,null,null)};sy.prototype.unmount=Lw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dD(e.current,2,null,e,null,null),ry(),t[Ic]=null}};function sy(e){this._internalRoot=e}sy.prototype.unstable_scheduleHydration=function(e){if(e){var t=HM();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ni.length&&t!==0&&t<Ni[n].priority;n++);Ni.splice(n,0,e),n===0&&pD(e)}};var EO=_M.version;if(EO!=="19.2.7")throw Error(H(527,EO,"19.2.7"));Ie.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=yz(t),e=e!==null?RM(e):null,e=e===null?null:e.stateNode,e};var FB={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:me,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lh.isDisabled&&Lh.supportsFiber)try{If=Lh.inject(FB),Xn=Lh}catch{}}Vg.createRoot=function(e,t){if(!PM(e))throw Error(H(299));var n=!1,r="",a=sR,i=oR,s=lR;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=cD(e,1,!1,null,null,n,r,null,a,i,s,mD),e[Ic]=t.current,Pw(e),new Lw(t)};Vg.hydrateRoot=function(e,t,n){if(!PM(e))throw Error(H(299));var r=!1,a="",i=sR,s=oR,o=lR,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=cD(e,1,!0,t,n??null,r,a,c,i,s,o,mD),t.context=uD(null),n=t.current,r=Zn(),r=qS(r),a=qi(r),a.callback=null,Ki(n,a,r),n=r,t.current.lanes=n,Bf(t,n),ya(t),e[Ic]=t.current,Pw(e),new sy(t)};Vg.version="19.2.7";function gD(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gD)}catch(e){console.error(e)}}gD(),AM.exports=Vg;var VB=AM.exports;const HB=Fe(VB);var Wf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Us,Ti,Rl,iM,qB=(iM=class extends Wf{constructor(){super();ue(this,Us);ue(this,Ti);ue(this,Rl);te(this,Rl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){D(this,Ti)||this.setEventListener(D(this,Rl))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Ti))==null||t.call(this),te(this,Ti,void 0))}setEventListener(t){var n;te(this,Rl,t),(n=D(this,Ti))==null||n.call(this),te(this,Ti,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){D(this,Us)!==t&&(te(this,Us,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,Us)=="boolean"?D(this,Us):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Us=new WeakMap,Ti=new WeakMap,Rl=new WeakMap,iM),Iw=new qB,KB={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ci,$S,sM,GB=(sM=class{constructor(){ue(this,Ci,KB);ue(this,$S,!1)}setTimeoutProvider(e){te(this,Ci,e)}setTimeout(e,t){return D(this,Ci).setTimeout(e,t)}clearTimeout(e){D(this,Ci).clearTimeout(e)}setInterval(e,t){return D(this,Ci).setInterval(e,t)}clearInterval(e){D(this,Ci).clearInterval(e)}},Ci=new WeakMap,$S=new WeakMap,sM),Ms=new GB;function YB(e){setTimeout(e,0)}var WB=typeof window>"u"||"Deno"in globalThis;function Cn(){}function XB(e,t){return typeof e=="function"?e(t):e}function d0(e){return typeof e=="number"&&e>=0&&e!==1/0}function yD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zi(e,t){return typeof e=="function"?e(t):e}function Vn(e,t){return typeof e=="function"?e(t):e}function TO(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==zw(s,t.options))return!1}else if(!Id(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function CO(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ld(t.options.mutationKey)!==Ld(i))return!1}else if(!Id(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function zw(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ld)(e)}function Ld(e){return JSON.stringify(e,(t,n)=>h0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Id(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Id(e[n],t[n])):!1}var QB=Object.prototype.hasOwnProperty;function vD(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=_O(e)&&_O(t);if(!r&&!(h0(e)&&h0(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),o=s.length,c=r?new Array(o):{};let u=0;for(let d=0;d<o;d++){const f=r?d:s[d],h=e[f],p=t[f];if(h===p){c[f]=h,(r?d<i:QB.call(e,f))&&u++;continue}if(h===null||p===null||typeof h!="object"||typeof p!="object"){c[f]=p;continue}const g=vD(h,p,n+1);c[f]=g,g===h&&u++}return i===o&&u===i?e:c}function f0(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function _O(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function h0(e){if(!PO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!PO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function PO(e){return Object.prototype.toString.call(e)==="[object Object]"}function ZB(e){return new Promise(t=>{Ms.setTimeout(t,e)})}function p0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?vD(e,t):t}function JB(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function eU(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Bw=Symbol();function xD(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Bw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bD(e,t){return typeof e=="function"?e(...t):!!e}function tU(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var zd=(()=>{let e=()=>WB;return{isServer(){return e()},setIsServer(t){e=t}}})();function m0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var nU=YB;function rU(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=nU;const i=o=>{t?e.push(o):a(()=>{n(o)})},s=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||s()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var en=rU(),Dl,_i,$l,oM,aU=(oM=class extends Wf{constructor(){super();ue(this,Dl,!0);ue(this,_i);ue(this,$l);te(this,$l,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){D(this,_i)||this.setEventListener(D(this,$l))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,_i))==null||t.call(this),te(this,_i,void 0))}setEventListener(t){var n;te(this,$l,t),(n=D(this,_i))==null||n.call(this),te(this,_i,t(this.setOnline.bind(this)))}setOnline(t){D(this,Dl)!==t&&(te(this,Dl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return D(this,Dl)}},Dl=new WeakMap,_i=new WeakMap,$l=new WeakMap,oM),ym=new aU;function iU(e){return Math.min(1e3*2**e,3e4)}function SD(e){return(e??"online")==="online"?ym.isOnline():!0}var g0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wD(e){let t=!1,n=0,r;const a=m0(),i=()=>a.status!=="pending",s=m=>{var v;if(!i()){const y=new g0(m);h(y),(v=e.onCancel)==null||v.call(e,y)}},o=()=>{t=!0},c=()=>{t=!1},u=()=>Iw.isFocused()&&(e.networkMode==="always"||ym.isOnline())&&e.canRun(),d=()=>SD(e.networkMode)&&e.canRun(),f=m=>{i()||(r==null||r(),a.resolve(m))},h=m=>{i()||(r==null||r(),a.reject(m))},p=()=>new Promise(m=>{var v;r=y=>{(i()||u())&&m(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;r=void 0,i()||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(i())return;let m;const v=n===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var A;if(i())return;const x=e.retry??(zd.isServer()?0:3),b=e.retryDelay??iU,w=typeof b=="function"?b(n,y):b,S=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(t||!S){h(y);return}n++,(A=e.onFail)==null||A.call(e,n,y),ZB(w).then(()=>u()?void 0:p()).then(()=>{t?h(y):g()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:c,canStart:d,start:()=>(d()?g():p().then(g),a)}}var Fs,lM,jD=(lM=class{constructor(){ue(this,Fs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),d0(this.gcTime)&&te(this,Fs,Ms.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zd.isServer()?1/0:5*60*1e3))}clearGcTimeout(){D(this,Fs)!==void 0&&(Ms.clearTimeout(D(this,Fs)),te(this,Fs,void 0))}},Fs=new WeakMap,lM);function sU(e){return{onFetch:(t,n)=>{var d,f,h,p,g;const r=t.options,a=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((g=t.state.data)==null?void 0:g.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const v=b=>{tU(b,()=>t.signal,()=>m=!0)},y=xD(t.options,t.fetchOptions),x=async(b,w,S)=>{if(m)return Promise.reject(t.signal.reason);if(w==null&&b.pages.length)return Promise.resolve(b);const O=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return v(_),_})(),N=await y(O),{maxPages:E}=t.options,T=S?eU:JB;return{pages:T(b.pages,N,E),pageParams:T(b.pageParams,w,E)}};if(a&&i.length){const b=a==="backward",w=b?oU:MO,S={pages:i,pageParams:s},A=w(r,S);o=await x(S,A,b)}else{const b=e??i.length;do{const w=c===0?s[0]??r.initialPageParam:MO(r,o);if(c>0&&w==null)break;o=await x(o,w),c++}while(c<b)}return o};t.options.persister?t.fetchFn=()=>{var m,v;return(v=(m=t.options).persister)==null?void 0:v.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function MO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function oU(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ll,Vs,Il,ur,Hs,Ft,Mf,qs,Fn,AD,_a,cM,lU=(cM=class extends jD{constructor(t){super();ue(this,Fn);ue(this,Ll);ue(this,Vs);ue(this,Il);ue(this,ur);ue(this,Hs);ue(this,Ft);ue(this,Mf);ue(this,qs);te(this,qs,!1),te(this,Mf,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,Hs,t.client),te(this,ur,D(this,Hs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,Vs,RO(this.options)),this.state=t.state??D(this,Vs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return D(this,Ll)}get promise(){var t;return(t=D(this,Ft))==null?void 0:t.promise}setOptions(t){if(this.options={...D(this,Mf),...t},t!=null&&t._type&&te(this,Ll,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=RO(this.options);n.data!==void 0&&(this.setState(kO(n.data,n.dataUpdatedAt)),te(this,Vs,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,ur).remove(this)}setData(t,n){const r=p0(this.state.data,t,this.options);return Te(this,Fn,_a).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Te(this,Fn,_a).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=D(this,Ft))==null?void 0:r.promise;return(a=D(this,Ft))==null||a.cancel(t),n?n.then(Cn).catch(Cn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return D(this,Vs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Vn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bw||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Zi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!yD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Ft))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Ft))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,ur).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(D(this,Ft)&&(D(this,qs)||Te(this,Fn,AD).call(this)?D(this,Ft).cancel({revert:!0}):D(this,Ft).cancelRetry()),this.scheduleGc()),D(this,ur).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Te(this,Fn,_a).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,f,h,p,g,m,v,y,x,b;if(this.state.fetchStatus!=="idle"&&((u=D(this,Ft))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,Ft))return D(this,Ft).continueRetry(),D(this,Ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(S=>S.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(te(this,qs,!0),r.signal)})},i=()=>{const w=xD(this.options,n),A=(()=>{const O={client:D(this,Hs),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return te(this,qs,!1),this.options.persister?this.options.persister(w,A,this):w(A)},o=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,Hs),state:this.state,fetchFn:i};return a(w),w})(),c=D(this,Ll)==="infinite"?sU(this.options.pages):this.options.behavior;c==null||c.onFetch(o,this),te(this,Il,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&Te(this,Fn,_a).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta}),te(this,Ft,wD({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:w=>{w instanceof g0&&w.revert&&this.setState({...D(this,Il),fetchStatus:"idle"}),r.abort()},onFail:(w,S)=>{Te(this,Fn,_a).call(this,{type:"failed",failureCount:w,error:S})},onPause:()=>{Te(this,Fn,_a).call(this,{type:"pause"})},onContinue:()=>{Te(this,Fn,_a).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const w=await D(this,Ft).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(h=D(this,ur).config).onSuccess)==null||p.call(h,w,this),(m=(g=D(this,ur).config).onSettled)==null||m.call(g,w,this.state.error,this),w}catch(w){if(w instanceof g0){if(w.silent)return D(this,Ft).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Te(this,Fn,_a).call(this,{type:"error",error:w}),(y=(v=D(this,ur).config).onError)==null||y.call(v,w,this),(b=(x=D(this,ur).config).onSettled)==null||b.call(x,this.state.data,w,this),w}finally{this.scheduleGc()}}},Ll=new WeakMap,Vs=new WeakMap,Il=new WeakMap,ur=new WeakMap,Hs=new WeakMap,Ft=new WeakMap,Mf=new WeakMap,qs=new WeakMap,Fn=new WeakSet,AD=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},_a=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...OD(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...kO(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,Il,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),en.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,ur).notify({query:this,type:"updated",action:t})})},cM);function OD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:SD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function RO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Nn,_e,kf,hn,Ks,zl,ka,Pi,Rf,Bl,Ul,Gs,Ys,Mi,Fl,Ue,Uu,y0,v0,x0,b0,S0,w0,j0,ND,uM,cU=(uM=class extends Wf{constructor(t,n){super();ue(this,Ue);ue(this,Nn);ue(this,_e);ue(this,kf);ue(this,hn);ue(this,Ks);ue(this,zl);ue(this,ka);ue(this,Pi);ue(this,Rf);ue(this,Bl);ue(this,Ul);ue(this,Gs);ue(this,Ys);ue(this,Mi);ue(this,Fl,new Set);this.options=n,te(this,Nn,t),te(this,Pi,null),te(this,ka,m0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(D(this,_e).addObserver(this),DO(D(this,_e),this.options)?Te(this,Ue,Uu).call(this):this.updateResult(),Te(this,Ue,b0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return A0(D(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return A0(D(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Te(this,Ue,S0).call(this),Te(this,Ue,w0).call(this),D(this,_e).removeObserver(this)}setOptions(t){const n=this.options,r=D(this,_e);if(this.options=D(this,Nn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vn(this.options.enabled,D(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Te(this,Ue,j0).call(this),D(this,_e).setOptions(this.options),n._defaulted&&!f0(this.options,n)&&D(this,Nn).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,_e),observer:this});const a=this.hasListeners();a&&$O(D(this,_e),r,this.options,n)&&Te(this,Ue,Uu).call(this),this.updateResult(),a&&(D(this,_e)!==r||Vn(this.options.enabled,D(this,_e))!==Vn(n.enabled,D(this,_e))||Zi(this.options.staleTime,D(this,_e))!==Zi(n.staleTime,D(this,_e)))&&Te(this,Ue,y0).call(this);const i=Te(this,Ue,v0).call(this);a&&(D(this,_e)!==r||Vn(this.options.enabled,D(this,_e))!==Vn(n.enabled,D(this,_e))||i!==D(this,Mi))&&Te(this,Ue,x0).call(this,i)}getOptimisticResult(t){const n=D(this,Nn).getQueryCache().build(D(this,Nn),t),r=this.createResult(n,t);return dU(this,r)&&(te(this,hn,r),te(this,zl,this.options),te(this,Ks,D(this,_e).state)),r}getCurrentResult(){return D(this,hn)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&D(this,ka).status==="pending"&&D(this,ka).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){D(this,Fl).add(t)}getCurrentQuery(){return D(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=D(this,Nn).defaultQueryOptions(t),r=D(this,Nn).getQueryCache().build(D(this,Nn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Te(this,Ue,Uu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,hn)))}createResult(t,n){var E;const r=D(this,_e),a=this.options,i=D(this,hn),s=D(this,Ks),o=D(this,zl),u=t!==r?t.state:D(this,kf),{state:d}=t;let f={...d},h=!1,p;if(n._optimisticResults){const T=this.hasListeners(),_=!T&&DO(t,n),C=T&&$O(t,r,n,a);(_||C)&&(f={...f,...OD(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:v}=f;p=f.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let T;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(T=i.data,y=!0):T=typeof n.placeholderData=="function"?n.placeholderData((E=D(this,Ul))==null?void 0:E.state.data,D(this,Ul)):n.placeholderData,T!==void 0&&(v="success",p=p0(i==null?void 0:i.data,T,n),h=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(s==null?void 0:s.data)&&n.select===D(this,Rf))p=D(this,Bl);else try{te(this,Rf,n.select),p=n.select(p),p=p0(i==null?void 0:i.data,p,n),te(this,Bl,p),te(this,Pi,null)}catch(T){te(this,Pi,T)}D(this,Pi)&&(g=D(this,Pi),p=D(this,Bl),m=Date.now(),v="error");const x=f.fetchStatus==="fetching",b=v==="pending",w=v==="error",S=b&&x,A=p!==void 0,N={status:v,fetchStatus:f.fetchStatus,isPending:b,isSuccess:v==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:w&&!A,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&A,isStale:Uw(t,n),refetch:this.refetch,promise:D(this,ka),isEnabled:Vn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=N.data!==void 0,_=N.status==="error"&&!T,C=k=>{_?k.reject(N.error):T&&k.resolve(N.data)},$=()=>{const k=te(this,ka,N.promise=m0());C(k)},R=D(this,ka);switch(R.status){case"pending":t.queryHash===r.queryHash&&C(R);break;case"fulfilled":(_||N.data!==R.value)&&$();break;case"rejected":(!_||N.error!==R.reason)&&$();break}}return N}updateResult(){const t=D(this,hn),n=this.createResult(D(this,_e),this.options);if(te(this,Ks,D(this,_e).state),te(this,zl,this.options),D(this,Ks).data!==void 0&&te(this,Ul,D(this,_e)),f0(n,t))return;te(this,hn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!D(this,Fl).size)return!0;const s=new Set(i??D(this,Fl));return this.options.throwOnError&&s.add("error"),Object.keys(D(this,hn)).some(o=>{const c=o;return D(this,hn)[c]!==t[c]&&s.has(c)})};Te(this,Ue,ND).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Te(this,Ue,b0).call(this)}},Nn=new WeakMap,_e=new WeakMap,kf=new WeakMap,hn=new WeakMap,Ks=new WeakMap,zl=new WeakMap,ka=new WeakMap,Pi=new WeakMap,Rf=new WeakMap,Bl=new WeakMap,Ul=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Mi=new WeakMap,Fl=new WeakMap,Ue=new WeakSet,Uu=function(t){Te(this,Ue,j0).call(this);let n=D(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Cn)),n},y0=function(){Te(this,Ue,S0).call(this);const t=Zi(this.options.staleTime,D(this,_e));if(zd.isServer()||D(this,hn).isStale||!d0(t))return;const r=yD(D(this,hn).dataUpdatedAt,t)+1;te(this,Gs,Ms.setTimeout(()=>{D(this,hn).isStale||this.updateResult()},r))},v0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,_e)):this.options.refetchInterval)??!1},x0=function(t){Te(this,Ue,w0).call(this),te(this,Mi,t),!(zd.isServer()||Vn(this.options.enabled,D(this,_e))===!1||!d0(D(this,Mi))||D(this,Mi)===0)&&te(this,Ys,Ms.setInterval(()=>{(this.options.refetchIntervalInBackground||Iw.isFocused())&&Te(this,Ue,Uu).call(this)},D(this,Mi)))},b0=function(){Te(this,Ue,y0).call(this),Te(this,Ue,x0).call(this,Te(this,Ue,v0).call(this))},S0=function(){D(this,Gs)!==void 0&&(Ms.clearTimeout(D(this,Gs)),te(this,Gs,void 0))},w0=function(){D(this,Ys)!==void 0&&(Ms.clearInterval(D(this,Ys)),te(this,Ys,void 0))},j0=function(){const t=D(this,Nn).getQueryCache().build(D(this,Nn),this.options);if(t===D(this,_e))return;const n=D(this,_e);te(this,_e,t),te(this,kf,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ND=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(D(this,hn))}),D(this,Nn).getQueryCache().notify({query:D(this,_e),type:"observerResultsUpdated"})})},uM);function uU(e,t){return Vn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Vn(t.retryOnMount,e)===!1)}function DO(e,t){return uU(e,t)||e.state.data!==void 0&&A0(e,t,t.refetchOnMount)}function A0(e,t,n){if(Vn(t.enabled,e)!==!1&&Zi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Uw(e,t)}return!1}function $O(e,t,n,r){return(e!==t||Vn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Uw(e,n)}function Uw(e,t){return Vn(t.enabled,e)!==!1&&e.isStaleByTime(Zi(t.staleTime,e))}function dU(e,t){return!f0(e.getCurrentResult(),t)}var Df,Xr,ln,Ws,Qr,gi,dM,fU=(dM=class extends jD{constructor(t){super();ue(this,Qr);ue(this,Df);ue(this,Xr);ue(this,ln);ue(this,Ws);te(this,Df,t.client),this.mutationId=t.mutationId,te(this,ln,t.mutationCache),te(this,Xr,[]),this.state=t.state||hU(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){D(this,Xr).includes(t)||(D(this,Xr).push(t),this.clearGcTimeout(),D(this,ln).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,Xr,D(this,Xr).filter(n=>n!==t)),this.scheduleGc(),D(this,ln).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,Xr).length||(this.state.status==="pending"?this.scheduleGc():D(this,ln).remove(this))}continue(){var t;return((t=D(this,Ws))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,c,u,d,f,h,p,g,m,v,y,x,b,w,S,A,O;const n=()=>{Te(this,Qr,gi).call(this,{type:"continue"})},r={client:D(this,Df),meta:this.options.meta,mutationKey:this.options.mutationKey};te(this,Ws,wD({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(N,E)=>{Te(this,Qr,gi).call(this,{type:"failed",failureCount:N,error:E})},onPause:()=>{Te(this,Qr,gi).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,ln).canRun(this)}));const a=this.state.status==="pending",i=!D(this,Ws).canStart();try{if(a)n();else{Te(this,Qr,gi).call(this,{type:"pending",variables:t,isPaused:i}),D(this,ln).config.onMutate&&await D(this,ln).config.onMutate(t,this,r);const E=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,r));E!==this.state.context&&Te(this,Qr,gi).call(this,{type:"pending",context:E,variables:t,isPaused:i})}const N=await D(this,Ws).start();return await((u=(c=D(this,ln).config).onSuccess)==null?void 0:u.call(c,N,t,this.state.context,this,r)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,N,t,this.state.context,r)),await((p=(h=D(this,ln).config).onSettled)==null?void 0:p.call(h,N,null,this.state.variables,this.state.context,this,r)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,N,null,t,this.state.context,r)),Te(this,Qr,gi).call(this,{type:"success",data:N}),N}catch(N){try{await((y=(v=D(this,ln).config).onError)==null?void 0:y.call(v,N,t,this.state.context,this,r))}catch(E){Promise.reject(E)}try{await((b=(x=this.options).onError)==null?void 0:b.call(x,N,t,this.state.context,r))}catch(E){Promise.reject(E)}try{await((S=(w=D(this,ln).config).onSettled)==null?void 0:S.call(w,void 0,N,this.state.variables,this.state.context,this,r))}catch(E){Promise.reject(E)}try{await((O=(A=this.options).onSettled)==null?void 0:O.call(A,void 0,N,t,this.state.context,r))}catch(E){Promise.reject(E)}throw Te(this,Qr,gi).call(this,{type:"error",error:N}),N}finally{D(this,ln).runNext(this)}}},Df=new WeakMap,Xr=new WeakMap,ln=new WeakMap,Ws=new WeakMap,Qr=new WeakSet,gi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),en.batch(()=>{D(this,Xr).forEach(r=>{r.onMutationUpdate(t)}),D(this,ln).notify({mutation:this,type:"updated",action:t})})},dM);function hU(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ra,Dr,$f,fM,pU=(fM=class extends Wf{constructor(t={}){super();ue(this,Ra);ue(this,Dr);ue(this,$f);this.config=t,te(this,Ra,new Set),te(this,Dr,new Map),te(this,$f,0)}build(t,n,r){const a=new fU({client:t,mutationCache:this,mutationId:++bh(this,$f)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){D(this,Ra).add(t);const n=Ih(t);if(typeof n=="string"){const r=D(this,Dr).get(n);r?r.push(t):D(this,Dr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(D(this,Ra).delete(t)){const n=Ih(t);if(typeof n=="string"){const r=D(this,Dr).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&D(this,Dr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ih(t);if(typeof n=="string"){const r=D(this,Dr).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Ih(t);if(typeof n=="string"){const a=(r=D(this,Dr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{D(this,Ra).forEach(t=>{this.notify({type:"removed",mutation:t})}),D(this,Ra).clear(),D(this,Dr).clear()})}getAll(){return Array.from(D(this,Ra))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>CO(n,r))}findAll(t={}){return this.getAll().filter(n=>CO(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(Cn))))}},Ra=new WeakMap,Dr=new WeakMap,$f=new WeakMap,fM);function Ih(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Zr,hM,mU=(hM=class extends Wf{constructor(t={}){super();ue(this,Zr);this.config=t,te(this,Zr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??zw(a,n);let s=this.get(i);return s||(s=new lU({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){D(this,Zr).has(t.queryHash)||(D(this,Zr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,Zr).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,Zr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,Zr).get(t)}getAll(){return[...D(this,Zr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>TO(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>TO(t,r)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Zr=new WeakMap,hM),vt,ki,Ri,Vl,Hl,Di,ql,Kl,pM,gU=(pM=class{constructor(e={}){ue(this,vt);ue(this,ki);ue(this,Ri);ue(this,Vl);ue(this,Hl);ue(this,Di);ue(this,ql);ue(this,Kl);te(this,vt,e.queryCache||new mU),te(this,ki,e.mutationCache||new pU),te(this,Ri,e.defaultOptions||{}),te(this,Vl,new Map),te(this,Hl,new Map),te(this,Di,0)}mount(){bh(this,Di)._++,D(this,Di)===1&&(te(this,ql,Iw.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,vt).onFocus())})),te(this,Kl,ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,vt).onOnline())})))}unmount(){var e,t;bh(this,Di)._--,D(this,Di)===0&&((e=D(this,ql))==null||e.call(this),te(this,ql,void 0),(t=D(this,Kl))==null||t.call(this),te(this,Kl,void 0))}isFetching(e){return D(this,vt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return D(this,ki).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,vt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=D(this,vt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Zi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return D(this,vt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=D(this,vt).get(r.queryHash),i=a==null?void 0:a.state.data,s=XB(t,i);if(s!==void 0)return D(this,vt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>D(this,vt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,vt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,vt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,vt);return en.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=en.batch(()=>D(this,vt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Cn).catch(Cn)}invalidateQueries(e,t={}){return en.batch(()=>(D(this,vt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=en.batch(()=>D(this,vt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Cn)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Cn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,vt).build(this,t);return n.isStaleByTime(Zi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Cn).catch(Cn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Cn).catch(Cn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ym.isOnline()?D(this,ki).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,vt)}getMutationCache(){return D(this,ki)}getDefaultOptions(){return D(this,Ri)}setDefaultOptions(e){te(this,Ri,e)}setQueryDefaults(e,t){D(this,Vl).set(Ld(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,Vl).values()],n={};return t.forEach(r=>{Id(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){D(this,Hl).set(Ld(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,Hl).values()],n={};return t.forEach(r=>{Id(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,Ri).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=zw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bw&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,Ri).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,vt).clear(),D(this,ki).clear()}},vt=new WeakMap,ki=new WeakMap,Ri=new WeakMap,Vl=new WeakMap,Hl=new WeakMap,Di=new WeakMap,ql=new WeakMap,Kl=new WeakMap,pM),ED=j.createContext(void 0),Wt=e=>{const t=j.useContext(ED);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},yU=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(ED.Provider,{value:e,children:t})),TD=j.createContext(!1),vU=()=>j.useContext(TD);TD.Provider;function xU(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bU=j.createContext(xU()),SU=()=>j.useContext(bU),wU=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?bD(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},jU=e=>{j.useEffect(()=>{e.clearReset()},[e])},AU=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||bD(n,[e.error,r])),OU=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},NU=(e,t)=>e.isLoading&&e.isFetching&&!t,EU=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,LO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function TU(e,t,n){var p,g,m,v;const r=vU(),a=SU(),i=Wt(),s=i.defaultQueryOptions(e);(g=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||g.call(p,s);const o=i.getQueryCache().get(s.queryHash),c=e.subscribed!==!1;s._optimisticResults=r?"isRestoring":c?"optimistic":void 0,OU(s),wU(s,a,o),jU(a);const u=!i.getQueryCache().get(s.queryHash),[d]=j.useState(()=>new t(i,s)),f=d.getOptimisticResult(s),h=!r&&c;if(j.useSyncExternalStore(j.useCallback(y=>{const x=h?d.subscribe(en.batchCalls(y)):Cn;return d.updateResult(),x},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),j.useEffect(()=>{d.setOptions(s)},[s,d]),EU(s,f))throw LO(s,d,a);if(AU({result:f,errorResetBoundary:a,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw f.error;if((v=(m=i.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||v.call(m,s,f),s.experimental_prefetchInRender&&!zd.isServer()&&NU(f,r)){const y=u?LO(s,d,a):o==null?void 0:o.promise;y==null||y.catch(Cn).finally(()=>{d.updateResult()})}return s.notifyOnChangeProps?f:d.trackResult(f)}function oe(e,t){return TU(e,cU)}/**
 * react-router v7.17.0
 *
 * 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 IO="popstate";function zO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function CU(e={}){function t(r,a){var u;let i=(u=a.state)==null?void 0:u.masked,{pathname:s,search:o,hash:c}=i||r.location;return O0("",{pathname:s,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Bd(a)}return PU(t,n,null,e)}function ht(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _U(){return Math.random().toString(36).substring(2,10)}function BO(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 O0(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?qc(t):t,state:n,key:t&&t.key||r||_U(),mask:a}}function Bd({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 qc(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 PU(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,o="POP",c=null,u=d();u==null&&(u=0,s.replaceState({...s.state,idx:u},""));function d(){return(s.state||{idx:null}).idx}function f(){o="POP";let v=d(),y=v==null?null:v-u;u=v,c&&c({action:o,location:m.location,delta:y})}function h(v,y){o="PUSH";let x=zO(v)?v:O0(m.location,v,y);u=d()+1;let b=BO(x,u),w=m.createHref(x.mask||x);try{s.pushState(b,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(w)}i&&c&&c({action:o,location:m.location,delta:1})}function p(v,y){o="REPLACE";let x=zO(v)?v:O0(m.location,v,y);u=d();let b=BO(x,u),w=m.createHref(x.mask||x);s.replaceState(b,"",w),i&&c&&c({action:o,location:m.location,delta:0})}function g(v){return MU(a,v)}let m={get action(){return o},get location(){return e(a,s)},listen(v){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(IO,f),c=v,()=>{a.removeEventListener(IO,f),c=null}},createHref(v){return t(a,v)},createURL:g,encodeLocation(v){let y=g(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(v){return s.go(v)}};return m}function MU(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),ht(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Bd(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function CD(e,t,n="/"){return kU(e,t,n,!1)}function kU(e,t,n,r,a){let i=typeof t=="string"?qc(t):t,s=ni(i.pathname||"/",n);if(s==null)return null;let o=RU(e),c=null,u=KU(s);for(let d=0;c==null&&d<o.length;++d)c=HU(o[d],u,r);return c}function RU(e){let t=_D(e);return DU(t),t}function _D(e,t=[],n=[],r="",a=!1){let i=(s,o,c=a,u)=>{let d={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(r)&&c)return;ht(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length)}let f=Br([r,d.relativePath]),h=n.concat(d);s.children&&s.children.length>0&&(ht(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),_D(s.children,t,h,f,c)),!(s.path==null&&!s.index)&&t.push({path:f,score:FU(f,s.index),routesMeta:h})};return e.forEach((s,o)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))i(s,o);else for(let u of PD(s.path))i(s,o,!0,u)}),t}function PD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=PD(r.join("/")),o=[];return o.push(...s.map(c=>c===""?i:[i,c].join("/"))),a&&o.push(...s),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function DU(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:VU(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var $U=/^:[\w-]+$/,LU=3,IU=2,zU=1,BU=10,UU=-2,UO=e=>e==="*";function FU(e,t){let n=e.split("/"),r=n.length;return n.some(UO)&&(r+=UU),t&&(r+=IU),n.filter(a=>!UO(a)).reduce((a,i)=>a+($U.test(i)?LU:i===""?zU:BU),r)}function VU(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function HU(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let o=0;o<r.length;++o){let c=r[o],u=o===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=vm({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=vm({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(a,f.params),s.push({params:a,pathname:Br([i,f.pathname]),pathnameBase:XU(Br([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Br([i,f.pathnameBase]))}return s}function vm(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=qU(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((u,{paramName:d,isOptional:f},h)=>{if(d==="*"){let g=o[h]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const p=o[h];return f&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function qU(e,t=!1,n=!0){jr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,c,u,d)=>{if(r.push({paramName:o,isOptional:c!=null}),c){let f=d.charAt(u+s.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function KU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ni(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)||"/"}var GU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function YU(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?qc(e):e,i;return n?(n=MD(n),n.startsWith("/")?i=FO(n.substring(1),"/"):i=FO(n,t)):i=t,{pathname:i,search:QU(r),hash:ZU(a)}}function FO(e,t){let n=xm(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function ax(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 WU(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Fw(e){let t=WU(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function oy(e,t,n,r=!1){let a;typeof e=="string"?a=qc(e):(a={...e},ht(!a.pathname||!a.pathname.includes("?"),ax("?","pathname","search",a)),ht(!a.pathname||!a.pathname.includes("#"),ax("#","pathname","hash",a)),ht(!a.search||!a.search.includes("#"),ax("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;a.pathname=h.join("/")}o=f>=0?t[f]:"/"}let c=YU(a,o),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var MD=e=>e.replace(/\/\/+/g,"/"),Br=e=>MD(e.join("/")),xm=e=>e.replace(/\/+$/,""),XU=e=>xm(e).replace(/^\/*/,"/"),QU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ZU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,JU=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 e7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function t7(e){let t=e.map(n=>n.route.path).filter(Boolean);return Br(t)||"/"}var kD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function RD(e,t){let n=e;if(typeof n!="string"||!GU.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(kD)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=ni(s.pathname,t);s.origin===i.origin&&o!=null?n=o+s.search+s.hash:a=!0}catch{jr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var DD=["POST","PUT","PATCH","DELETE"];new Set(DD);var n7=["GET",...DD];new Set(n7);var Kc=j.createContext(null);Kc.displayName="DataRouter";var ly=j.createContext(null);ly.displayName="DataRouterState";var $D=j.createContext(!1);function r7(){return j.useContext($D)}var LD=j.createContext({isTransitioning:!1});LD.displayName="ViewTransition";var a7=j.createContext(new Map);a7.displayName="Fetchers";var i7=j.createContext(null);i7.displayName="Await";var ar=j.createContext(null);ar.displayName="Navigation";var Xf=j.createContext(null);Xf.displayName="Location";var Er=j.createContext({outlet:null,matches:[],isDataRoute:!1});Er.displayName="Route";var Vw=j.createContext(null);Vw.displayName="RouteError";var ID="REACT_ROUTER_ERROR",s7="REDIRECT",o7="ROUTE_ERROR_RESPONSE";function l7(e){if(e.startsWith(`${ID}:${s7}:{`))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 c7(e){if(e.startsWith(`${ID}:${o7}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new JU(t.status,t.statusText,t.data)}catch{}}function u7(e,{relative:t}={}){ht(Gc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=j.useContext(ar),{hash:a,pathname:i,search:s}=Qf(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:Br([n,i])),r.createHref({pathname:o,search:s,hash:a})}function Gc(){return j.useContext(Xf)!=null}function Tr(){return ht(Gc(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(Xf).location}var zD="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function BD(e){j.useContext(ar).static||j.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=j.useContext(Er);return e?O7():d7()}function d7(){ht(Gc(),"useNavigate() may be used only in the context of a <Router> component.");let e=j.useContext(Kc),{basename:t,navigator:n}=j.useContext(ar),{matches:r}=j.useContext(Er),{pathname:a}=Tr(),i=JSON.stringify(Fw(r)),s=j.useRef(!1);return BD(()=>{s.current=!0}),j.useCallback((c,u={})=>{if(jr(s.current,zD),!s.current)return;if(typeof c=="number"){n.go(c);return}let d=oy(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Br([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,i,a,e])}var f7=j.createContext(null);function h7(e){let t=j.useContext(Er).outlet;return j.useMemo(()=>t&&j.createElement(f7.Provider,{value:e},t),[t,e])}function UD(){let{matches:e}=j.useContext(Er),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Qf(e,{relative:t}={}){let{matches:n}=j.useContext(Er),{pathname:r}=Tr(),a=JSON.stringify(Fw(n));return j.useMemo(()=>oy(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function p7(e,t){return FD(e,t)}function FD(e,t,n){var v;ht(Gc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=j.useContext(ar),{matches:a}=j.useContext(Er),i=a[a.length-1],s=i?i.params:{},o=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let y=u&&u.path||"";HD(o,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${y}">) 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="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let d=Tr(),f;if(t){let y=typeof t=="string"?qc(t):t;ht(c==="/"||((v=y.pathname)==null?void 0:v.startsWith(c)),`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 "${c}" but pathname "${y.pathname}" was given in the \`location\` prop.`),f=y}else f=d;let h=f.pathname||"/",p=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):CD(e,{pathname:p});jr(u||g!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),jr(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.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 m=x7(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Br([c,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Br([c,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&m?j.createElement(Xf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},m):m}function m7(){let e=A7(),t=e7(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)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:i},"ErrorBoundary")," or"," ",j.createElement("code",{style:i},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),n?j.createElement("pre",{style:a},n):null,s)}var g7=j.createElement(m7,null),VD=class extends j.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=c7(e.digest);n&&(e=n)}let t=e!==void 0?j.createElement(Er.Provider,{value:this.props.routeContext},j.createElement(Vw.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?j.createElement(y7,{error:e},t):t}};VD.contextType=$D;var ix=new WeakMap;function y7({children:e,error:t}){let{basename:n}=j.useContext(ar);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=l7(t.digest);if(r){let a=ix.get(t);if(a)throw a;let i=RD(r.location,n);if(kD&&!ix.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw ix.set(t,s),s}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function v7({routeContext:e,match:t,children:n}){let r=j.useContext(Kc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),j.createElement(Er.Provider,{value:e},n)}function x7(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 a=e,i=r==null?void 0:r.errors;if(i!=null){let d=a.findIndex(f=>f.route.id&&(i==null?void 0:i[f.route.id])!==void 0);ht(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let s=!1,o=-1;if(n&&r){s=r.renderFallback;for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(o=d),f.route.id){let{loaderData:h,errors:p}=r,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){n.isStatic&&(s=!0),o>=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,u=r&&c?(d,f)=>{var h,p;c(d,{location:r.location,params:((p=(h=r.matches)==null?void 0:h[0])==null?void 0:p.params)??{},pattern:t7(r.matches),errorInfo:f})}:void 0;return a.reduceRight((d,f,h)=>{let p,g=!1,m=null,v=null;r&&(p=i&&f.route.id?i[f.route.id]:void 0,m=f.route.errorElement||g7,s&&(o<0&&h===0?(HD("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,v=null):o===h&&(g=!0,v=f.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),x=()=>{let b;return p?b=m:g?b=v:f.route.Component?b=j.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,j.createElement(v7,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?j.createElement(VD,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:u}):x()},null)}function Hw(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function b7(e){let t=j.useContext(Kc);return ht(t,Hw(e)),t}function S7(e){let t=j.useContext(ly);return ht(t,Hw(e)),t}function w7(e){let t=j.useContext(Er);return ht(t,Hw(e)),t}function qw(e){let t=w7(e),n=t.matches[t.matches.length-1];return ht(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function j7(){return qw("useRouteId")}function A7(){var r;let e=j.useContext(Vw),t=S7("useRouteError"),n=qw("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function O7(){let{router:e}=b7("useNavigate"),t=qw("useNavigate"),n=j.useRef(!1);return BD(()=>{n.current=!0}),j.useCallback(async(a,i={})=>{jr(n.current,zD),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var VO={};function HD(e,t,n){!t&&!VO[e]&&(VO[e]=!0,jr(!1,n))}j.memo(N7);function N7({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return FD(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function bm({to:e,replace:t,state:n,relative:r}){ht(Gc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=j.useContext(ar);jr(!a,"<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:i}=j.useContext(Er),{pathname:s}=Tr(),o=Xt(),c=oy(e,Fw(i),s,r==="path"),u=JSON.stringify(c);return j.useEffect(()=>{o(JSON.parse(u),{replace:t,state:n,relative:r})},[o,u,r,t,n]),null}function qD(e){return h7(e.context)}function de(e){ht(!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 E7({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:s}){ht(!Gc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),c=j.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:s,future:{}}),[o,a,i,s]);typeof n=="string"&&(n=qc(n));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:p="default",mask:g}=n,m=j.useMemo(()=>{let v=ni(u,o);return v==null?null:{location:{pathname:v,search:d,hash:f,state:h,key:p,mask:g},navigationType:r}},[o,u,d,f,h,p,r,g]);return jr(m!=null,`<Router basename="${o}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:j.createElement(ar.Provider,{value:c},j.createElement(Xf.Provider,{children:t,value:m}))}function T7({children:e,location:t}){return p7(N0(e),t)}function N0(e,t=[]){let n=[];return j.Children.forEach(e,(r,a)=>{if(!j.isValidElement(r))return;let i=[...t,a];if(r.type===j.Fragment){n.push.apply(n,N0(r.props.children,i));return}ht(r.type===de,`[${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>`),ht(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.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&&(s.children=N0(r.props.children,i)),n.push(s)}),n}var Cp="get",_p="application/x-www-form-urlencoded";function cy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function C7(e){return cy(e)&&e.tagName.toLowerCase()==="button"}function _7(e){return cy(e)&&e.tagName.toLowerCase()==="form"}function P7(e){return cy(e)&&e.tagName.toLowerCase()==="input"}function M7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function k7(e,t){return e.button===0&&(!t||t==="_self")&&!M7(e)}function E0(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(a=>[n,a]):[[n,r]])},[]))}function R7(e,t){let n=E0(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var zh=null;function D7(){if(zh===null)try{new FormData(document.createElement("form"),0),zh=!1}catch{zh=!0}return zh}var $7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sx(e){return e!=null&&!$7.has(e)?(jr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_p}"`),null):e}function L7(e,t){let n,r,a,i,s;if(_7(e)){let o=e.getAttribute("action");r=o?ni(o,t):null,n=e.getAttribute("method")||Cp,a=sx(e.getAttribute("enctype"))||_p,i=new FormData(e)}else if(C7(e)||P7(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||o.getAttribute("action");if(r=c?ni(c,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||Cp,a=sx(e.getAttribute("formenctype"))||sx(o.getAttribute("enctype"))||_p,i=new FormData(o,e),!D7()){let{name:u,type:d,value:f}=e;if(d==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(cy(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Cp,r=null,a=_p,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Kw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function KD(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&ni(a.pathname,t)==="/"?a.pathname=`${xm(t)}/_root.${r}`:a.pathname=`${xm(a.pathname)}.${r}`,a}async function I7(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 z7(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 B7(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await I7(i,n);return s.links?s.links():[]}return[]}));return H7(r.flat(1).filter(z7).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function HO(e,t,n,r,a,i){let s=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,o=(c,u)=>{var d;return n[u].pathname!==c.pathname||((d=n[u].route.path)==null?void 0:d.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>s(c,u)||o(c,u)):i==="data"?t.filter((c,u)=>{var f;let d=r.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(s(c,u)||o(c,u))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function U7(e,t,{includeHydrateFallback:n}={}){return F7(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function F7(e){return[...new Set(e)]}function V7(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function H7(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(V7(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function Gw(){let e=j.useContext(Kc);return Kw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function q7(){let e=j.useContext(ly);return Kw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Yw=j.createContext(void 0);Yw.displayName="FrameworkContext";function Ww(){let e=j.useContext(Yw);return Kw(e,"You must render this element inside a <HydratedRouter> element"),e}function K7(e,t){let n=j.useContext(Yw),[r,a]=j.useState(!1),[i,s]=j.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,h=j.useRef(null);j.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let m=y=>{y.forEach(x=>{s(x.isIntersecting)})},v=new IntersectionObserver(m,{threshold:.5});return h.current&&v.observe(h.current),()=>{v.disconnect()}}},[e]),j.useEffect(()=>{if(r){let m=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(m)}}},[r]);let p=()=>{a(!0)},g=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:xu(o,p),onBlur:xu(c,g),onMouseEnter:xu(u,p),onMouseLeave:xu(d,g),onTouchStart:xu(f,p)}]:[!1,h,{}]}function xu(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function G7({page:e,...t}){let n=r7(),{router:r}=Gw(),a=j.useMemo(()=>CD(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?j.createElement(W7,{page:e,matches:a,...t}):j.createElement(X7,{page:e,matches:a,...t}):null}function Y7(e){let{manifest:t,routeModules:n}=Ww(),[r,a]=j.useState([]);return j.useEffect(()=>{let i=!1;return B7(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function W7({page:e,matches:t,...n}){let r=Tr(),{future:a}=Ww(),{basename:i}=Gw(),s=j.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let o=KD(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,u=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?c=!0:u.push(d.route.id);return c&&u.length>0&&o.searchParams.set("_routes",u.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return j.createElement(j.Fragment,null,s.map(o=>j.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...n})))}function X7({page:e,matches:t,...n}){let r=Tr(),{future:a,manifest:i,routeModules:s}=Ww(),{basename:o}=Gw(),{loaderData:c,matches:u}=q7(),d=j.useMemo(()=>HO(e,t,u,i,r,"data"),[e,t,u,i,r]),f=j.useMemo(()=>HO(e,t,u,i,r,"assets"),[e,t,u,i,r]),h=j.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let m=new Set,v=!1;if(t.forEach(x=>{var w;let b=i.routes[x.route.id];!b||!b.hasLoader||(!d.some(S=>S.route.id===x.route.id)&&x.route.id in c&&((w=s[x.route.id])!=null&&w.shouldRevalidate)||b.hasClientLoader?v=!0:m.add(x.route.id))}),m.size===0)return[];let y=KD(e,o,a.v8_trailingSlashAwareDataRequests,"data");return v&&m.size>0&&y.searchParams.set("_routes",t.filter(x=>m.has(x.route.id)).map(x=>x.route.id).join(",")),[y.pathname+y.search]},[o,a.v8_trailingSlashAwareDataRequests,c,r,i,d,t,e,s]),p=j.useMemo(()=>U7(f,i),[f,i]),g=Y7(f);return j.createElement(j.Fragment,null,h.map(m=>j.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),p.map(m=>j.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),g.map(({key:m,link:v})=>j.createElement("link",{key:m,nonce:n.nonce,...v,crossOrigin:v.crossOrigin??n.crossOrigin})))}function Q7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Z7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Z7&&(window.__reactRouterVersion="7.17.0")}catch{}function J7({basename:e,children:t,useTransitions:n,window:r}){let a=j.useRef();a.current==null&&(a.current=CU({window:r,v5Compat:!0}));let i=a.current,[s,o]=j.useState({action:i.action,location:i.location}),c=j.useCallback(u=>{n===!1?o(u):j.startTransition(()=>o(u))},[n]);return j.useLayoutEffect(()=>i.listen(c),[i,c]),j.createElement(E7,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}var GD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=j.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,mask:o,state:c,target:u,to:d,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:p,...g},m){let{basename:v,navigator:y,useTransitions:x}=j.useContext(ar),b=typeof d=="string"&&GD.test(d),w=RD(d,v);d=w.to;let S=u7(d,{relative:a}),A=Tr(),O=null;if(o){let k=oy(o,[],A.mask?A.mask.pathname:"/",!0);v!=="/"&&(k.pathname=k.pathname==="/"?v:Br([v,k.pathname])),O=y.createHref(k)}let[N,E,T]=K7(r,g),_=n9(d,{replace:s,mask:o,state:c,target:u,preventScrollReset:f,relative:a,viewTransition:h,defaultShouldRevalidate:p,useTransitions:x});function C(k){t&&t(k),k.defaultPrevented||_(k)}let $=!(w.isExternal||i),R=j.createElement("a",{...g,...T,href:($?O:void 0)||w.absoluteURL||S,onClick:$?C:t,ref:Q7(m,E),target:u,"data-discover":!b&&n==="render"?"true":void 0});return N&&!b?j.createElement(j.Fragment,null,R,j.createElement(G7,{page:S})):R});De.displayName="Link";var Jo=j.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:o,children:c,...u},d){let f=Qf(s,{relative:u.relative}),h=Tr(),p=j.useContext(ly),{navigator:g,basename:m}=j.useContext(ar),v=p!=null&&o9(f)&&o===!0,y=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,x=h.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(x=x.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=ni(b,m)||b);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=x===y||!a&&x.startsWith(y)&&x.charAt(w)==="/",A=b!=null&&(b===y||!a&&b.startsWith(y)&&b.charAt(y.length)==="/"),O={isActive:S,isPending:A,isTransitioning:v},N=S?t:void 0,E;typeof r=="function"?E=r(O):E=[r,S?"active":null,A?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let T=typeof i=="function"?i(O):i;return j.createElement(De,{...u,"aria-current":N,className:E,ref:d,style:T,to:s,viewTransition:o},typeof c=="function"?c(O):c)});Jo.displayName="NavLink";var e9=j.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=Cp,action:o,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h,...p},g)=>{let{useTransitions:m}=j.useContext(ar),v=i9(),y=s9(o,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",b=typeof o=="string"&&GD.test(o),w=S=>{if(c&&c(S),S.defaultPrevented)return;S.preventDefault();let A=S.nativeEvent.submitter,O=(A==null?void 0:A.getAttribute("formmethod"))||s,N=()=>v(A||S.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h});m&&n!==!1?j.startTransition(()=>N()):N()};return j.createElement("form",{ref:g,method:x,action:y,onSubmit:r?c:w,...p,"data-discover":!b&&e==="render"?"true":void 0})});e9.displayName="Form";function t9(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function YD(e){let t=j.useContext(Kc);return ht(t,t9(e)),t}function n9(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:c,useTransitions:u}={}){let d=Xt(),f=Tr(),h=Qf(e,{relative:s});return j.useCallback(p=>{if(k7(p,t)){p.preventDefault();let g=n!==void 0?n:Bd(f)===Bd(h),m=()=>d(e,{replace:g,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:c});u?j.startTransition(()=>m()):m()}},[f,d,h,n,r,a,t,e,i,s,o,c,u])}function WD(e){jr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=j.useRef(E0(e)),n=j.useRef(!1),r=Tr(),a=j.useMemo(()=>R7(r.search,n.current?null:t.current),[r.search]),i=Xt(),s=j.useCallback((o,c)=>{const u=E0(typeof o=="function"?o(new URLSearchParams(a)):o);n.current=!0,i("?"+u,c)},[i,a]);return[a,s]}var r9=0,a9=()=>`__${String(++r9)}__`;function i9(){let{router:e}=YD("useSubmit"),{basename:t}=j.useContext(ar),n=j7(),r=e.fetch,a=e.navigate;return j.useCallback(async(i,s={})=>{let{action:o,method:c,encType:u,formData:d,body:f}=L7(i,t);if(s.navigate===!1){let h=s.fetcherKey||a9();await r(h,n,s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:d,body:f,formMethod:s.method||c,formEncType:s.encType||u,flushSync:s.flushSync})}else await a(s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:d,body:f,formMethod:s.method||c,formEncType:s.encType||u,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function s9(e,{relative:t}={}){let{basename:n}=j.useContext(ar),r=j.useContext(Er);ht(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...Qf(e||".",{relative:t})},s=Tr();if(e==null){i.search=s.search;let o=new URLSearchParams(i.search),c=o.getAll("index");if(c.some(d=>d==="")){o.delete("index"),c.filter(f=>f).forEach(f=>o.append("index",f));let d=o.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Br([n,i.pathname])),Bd(i)}function o9(e,{relative:t}={}){let n=j.useContext(LD);ht(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=YD("useViewTransitionState"),a=Qf(e,{relative:t});if(!n.isTransitioning)return!1;let i=ni(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=ni(n.nextLocation.pathname,r)||n.nextLocation.pathname;return vm(a.pathname,s)!=null||vm(a.pathname,i)!=null}const XD=j.createContext(null);function l9({children:e}){const[t,n]=j.useState(()=>localStorage.getItem("mall_zip")||""),[r,a]=j.useState(()=>{const g=localStorage.getItem("mall_store_id");return g?Number(g):null}),[i,s]=j.useState(()=>localStorage.getItem("mall_store_name")||""),[o,c]=j.useState(()=>localStorage.getItem("mall_token")),[u,d]=j.useState(0),f=(g,m,v)=>{n(g),a(m),s(v),localStorage.setItem("mall_zip",g),localStorage.setItem("mall_store_id",String(m)),localStorage.setItem("mall_store_name",v)},h=()=>{n(""),a(null),s(""),localStorage.removeItem("mall_zip"),localStorage.removeItem("mall_store_id"),localStorage.removeItem("mall_store_name")},p=g=>{c(g),g?localStorage.setItem("mall_token",g):localStorage.removeItem("mall_token")};return j.useEffect(()=>{const g=()=>c(localStorage.getItem("mall_token"));return window.addEventListener("storage",g),()=>window.removeEventListener("storage",g)},[]),l.jsx(XD.Provider,{value:{zip:t,storeId:r,storeName:i,setZone:f,clearZone:h,custToken:o,setCustToken:p,cartCount:u,setCartCount:d},children:e})}const wn=()=>j.useContext(XD),Oe=e=>`$${(Number(e)||0).toFixed(2)}`,Xw=j.createContext({});function Yc(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const uy=j.createContext(null),dy=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class c9 extends j.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function u9({children:e,isPresent:t}){const n=j.useId(),r=j.useRef(null),a=j.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=j.useContext(dy);return j.useInsertionEffect(()=>{const{width:s,height:o,top:c,left:u}=a.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return i&&(d.nonce=i),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${s}px !important;
            height: ${o}px !important;
            top: ${c}px !important;
            left: ${u}px !important;
          }
        `),()=>{document.head.removeChild(d)}},[t]),l.jsx(c9,{isPresent:t,childRef:r,sizeRef:a,children:j.cloneElement(e,{ref:r})})}const d9=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:s})=>{const o=Yc(f9),c=j.useId(),u=j.useCallback(f=>{o.set(f,!0);for(const h of o.values())if(!h)return;r&&r()},[o,r]),d=j.useMemo(()=>({id:c,initial:t,isPresent:n,custom:a,onExitComplete:u,register:f=>(o.set(f,!1),()=>o.delete(f))}),i?[Math.random(),u]:[n,u]);return j.useMemo(()=>{o.forEach((f,h)=>o.set(h,!1))},[n]),j.useEffect(()=>{!n&&!o.size&&r&&r()},[n]),s==="popLayout"&&(e=l.jsx(u9,{isPresent:n,children:e})),l.jsx(uy.Provider,{value:d,children:e})};function f9(){return new Map}function QD(e=!0){const t=j.useContext(uy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=j.useId();j.useEffect(()=>{e&&a(i)},[e]);const s=j.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const Bh=e=>e.key||"";function qO(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const Qw=typeof window<"u",fy=Qw?j.useLayoutEffect:j.useEffect,T0=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1})=>{const[o,c]=QD(s),u=j.useMemo(()=>qO(e),[e]),d=s&&!o?[]:u.map(Bh),f=j.useRef(!0),h=j.useRef(u),p=Yc(()=>new Map),[g,m]=j.useState(u),[v,y]=j.useState(u);fy(()=>{f.current=!1,h.current=u;for(let w=0;w<v.length;w++){const S=Bh(v[w]);d.includes(S)?p.delete(S):p.get(S)!==!0&&p.set(S,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let S=0;S<v.length;S++){const A=v[S],O=Bh(A);d.includes(O)||(w.splice(S,0,A),x.push(A))}i==="wait"&&x.length&&(w=x),y(qO(w)),m(u);return}const{forceRender:b}=j.useContext(Xw);return l.jsx(l.Fragment,{children:v.map(w=>{const S=Bh(w),A=s&&!o?!1:u===v||d.includes(S),O=()=>{if(p.has(S))p.set(S,!0);else return;let N=!0;p.forEach(E=>{E||(N=!1)}),N&&(b==null||b(),y(h.current),s&&(c==null||c()),r&&r())};return l.jsx(d9,{isPresent:A,initial:!f.current||n?void 0:!1,custom:A?void 0:t,presenceAffectsLayout:a,mode:i,onExitComplete:A?void 0:O,children:w},S)})})},xn=e=>e;let h9=xn,ZD=xn;function Zw(e){let t;return()=>(t===void 0&&(t=e()),t)}const fo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ka=e=>e*1e3,Ga=e=>e/1e3,p9={useManualTiming:!1};function m9(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(u){i.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&r?t:n;return d&&i.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(s=u,r){a=!0;return}r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,a&&(a=!1,c.process(u))}};return c}const Uh=["read","resolveKeyframes","update","preRender","render","postRender"],g9=40;function JD(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Uh.reduce((y,x)=>(y[x]=m9(i),y),{}),{read:o,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=s,p=()=>{const y=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,g9),1),a.timestamp=y,a.isProcessing=!0,o.process(a),c.process(a),u.process(a),d.process(a),f.process(a),h.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},g=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:Uh.reduce((y,x)=>{const b=s[x];return y[x]=(w,S=!1,A=!1)=>(n||g(),b.schedule(w,S,A)),y},{}),cancel:y=>{for(let x=0;x<Uh.length;x++)s[Uh[x]].cancel(y)},state:a,steps:s}}const{schedule:Le,cancel:Fr,state:Vt,steps:ox}=JD(typeof requestAnimationFrame<"u"?requestAnimationFrame:xn,!0),e3=j.createContext({strict:!1}),KO={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"]},ac={};for(const e in KO)ac[e]={isEnabled:t=>KO[e].some(n=>!!t[n])};function y9(e){for(const t in e)ac[t]={...ac[t],...e[t]}}const v9=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","ignoreStrict","viewport"]);function Sm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||v9.has(e)}let t3=e=>!Sm(e);function x9(e){e&&(t3=t=>t.startsWith("on")?!Sm(t):e(t))}try{x9(require("@emotion/is-prop-valid").default)}catch{}function b9(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(t3(a)||n===!0&&Sm(a)||!t&&!Sm(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function S9(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const hy=j.createContext({});function Ud(e){return typeof e=="string"||Array.isArray(e)}function py(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Jw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ej=["initial",...Jw];function my(e){return py(e.animate)||ej.some(t=>Ud(e[t]))}function n3(e){return!!(my(e)||e.variants)}function w9(e,t){if(my(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ud(n)?n:void 0,animate:Ud(r)?r:void 0}}return e.inherit!==!1?t:{}}function j9(e){const{initial:t,animate:n}=w9(e,j.useContext(hy));return j.useMemo(()=>({initial:t,animate:n}),[GO(t),GO(n)])}function GO(e){return Array.isArray(e)?e.join(" "):e}const A9=Symbol.for("motionComponentSymbol");function fl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function O9(e,t,n){return j.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):fl(n)&&(n.current=r))},[t])}const tj=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),N9="framerAppearId",r3="data-"+tj(N9),{schedule:nj}=JD(queueMicrotask,!1),a3=j.createContext({});function E9(e,t,n,r,a){var i,s;const{visualElement:o}=j.useContext(hy),c=j.useContext(e3),u=j.useContext(uy),d=j.useContext(dy).reducedMotion,f=j.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=j.useContext(a3);h&&!h.projection&&a&&(h.type==="html"||h.type==="svg")&&T9(f.current,n,a,p);const g=j.useRef(!1);j.useInsertionEffect(()=>{h&&g.current&&h.update(n,u)});const m=n[r3],v=j.useRef(!!m&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,m))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,m)));return fy(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),nj.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),j.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,m)}),v.current=!1))}),h}function T9(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:i3(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&fl(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function i3(e){if(e)return e.options.allowProjection!==!1?e.projection:i3(e.parent)}function C9({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){var i,s;e&&y9(e);function o(u,d){let f;const h={...j.useContext(dy),...u,layoutId:_9(u)},{isStatic:p}=h,g=j9(u),m=r(u,p);if(!p&&Qw){P9();const v=M9(h);f=v.MeasureLayout,g.visualElement=E9(a,m,h,t,v.ProjectionNode)}return l.jsxs(hy.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,n(a,u,O9(m,g.visualElement,d),m,p,g.visualElement)]})}o.displayName=`motion.${typeof a=="string"?a:`create(${(s=(i=a.displayName)!==null&&i!==void 0?i:a.name)!==null&&s!==void 0?s:""})`}`;const c=j.forwardRef(o);return c[A9]=a,c}function _9({layoutId:e}){const t=j.useContext(Xw).id;return t&&e!==void 0?t+"-"+e:e}function P9(e,t){j.useContext(e3).strict}function M9(e){const{drag:t,layout:n}=ac;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const k9=["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 rj(e){return typeof e!="string"||e.includes("-")?!1:!!(k9.indexOf(e)>-1||/[A-Z]/u.test(e))}function YO(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function aj(e,t,n,r){if(typeof t=="function"){const[a,i]=YO(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=YO(r);t=t(n!==void 0?n:e.custom,a,i)}return t}const C0=e=>Array.isArray(e),R9=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),D9=e=>C0(e)?e[e.length-1]||0:e,fn=e=>!!(e&&e.getVelocity);function Pp(e){const t=fn(e)?e.get():e;return R9(t)?t.toValue():t}function $9({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,a,i){const s={latestValues:L9(r,a,i,e),renderState:t()};return n&&(s.onMount=o=>n({props:r,current:o,...s}),s.onUpdate=o=>n(o)),s}const s3=e=>(t,n)=>{const r=j.useContext(hy),a=j.useContext(uy),i=()=>$9(e,t,r,a);return n?i():Yc(i)};function L9(e,t,n,r){const a={},i=r(e,{});for(const h in i)a[h]=Pp(i[h]);let{initial:s,animate:o}=e;const c=my(e),u=n3(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const f=d?o:s;if(f&&typeof f!="boolean"&&!py(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const g=aj(e,h[p]);if(g){const{transitionEnd:m,transition:v,...y}=g;for(const x in y){let b=y[x];if(Array.isArray(b)){const w=d?b.length-1:0;b=b[w]}b!==null&&(a[x]=b)}for(const x in m)a[x]=m[x]}}}return a}const Wc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],To=new Set(Wc),o3=e=>t=>typeof t=="string"&&t.startsWith(e),l3=o3("--"),I9=o3("var(--"),ij=e=>I9(e)?z9.test(e.split("/*")[0].trim()):!1,z9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,c3=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pa=(e,t,n)=>n>t?t:n<e?e:n,Xc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fd={...Xc,transform:e=>pa(0,1,e)},Fh={...Xc,default:1},Zf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yi=Zf("deg"),ca=Zf("%"),he=Zf("px"),B9=Zf("vh"),U9=Zf("vw"),WO={...ca,parse:e=>ca.parse(e)/100,transform:e=>ca.transform(e*100)},F9={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,top:he,right:he,bottom:he,left:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,backgroundPositionX:he,backgroundPositionY:he},V9={rotate:yi,rotateX:yi,rotateY:yi,rotateZ:yi,scale:Fh,scaleX:Fh,scaleY:Fh,scaleZ:Fh,skew:yi,skewX:yi,skewY:yi,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Fd,originX:WO,originY:WO,originZ:he},XO={...Xc,transform:Math.round},sj={...F9,...V9,zIndex:XO,size:he,fillOpacity:Fd,strokeOpacity:Fd,numOctaves:XO},H9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},q9=Wc.length;function K9(e,t,n){let r="",a=!0;for(let i=0;i<q9;i++){const s=Wc[i],o=e[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||n){const u=c3(o,sj[s]);if(!c){a=!1;const d=H9[s]||s;r+=`${d}(${u}) `}n&&(t[s]=u)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function oj(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let s=!1,o=!1;for(const c in t){const u=t[c];if(To.has(c)){s=!0;continue}else if(l3(c)){a[c]=u;continue}else{const d=c3(u,sj[c]);c.startsWith("origin")?(o=!0,i[c]=d):r[c]=d}}if(t.transform||(s||n?r.transform=K9(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const G9={offset:"stroke-dashoffset",array:"stroke-dasharray"},Y9={offset:"strokeDashoffset",array:"strokeDasharray"};function W9(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?G9:Y9;e[i.offset]=he.transform(-r);const s=he.transform(t),o=he.transform(n);e[i.array]=`${s} ${o}`}function QO(e,t,n){return typeof e=="string"?e:he.transform(t+n*e)}function X9(e,t,n){const r=QO(t,e.x,e.width),a=QO(n,e.y,e.height);return`${r} ${a}`}function lj(e,{attrX:t,attrY:n,attrScale:r,originX:a,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:c=0,...u},d,f){if(oj(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(a!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=X9(g,a!==void 0?a:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&W9(h,s,o,c,!1)}const cj=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),u3=()=>({...cj(),attrs:{}}),uj=e=>typeof e=="string"&&e.toLowerCase()==="svg";function d3(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const f3=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"]);function h3(e,t,n,r){d3(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(f3.has(a)?a:tj(a),t.attrs[a])}const wm={};function Q9(e){Object.assign(wm,e)}function p3(e,{layout:t,layoutId:n}){return To.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wm[e]||e==="opacity")}function dj(e,t,n){var r;const{style:a}=e,i={};for(const s in a)(fn(a[s])||t.style&&fn(t.style[s])||p3(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=a[s]);return i}function m3(e,t,n){const r=dj(e,t,n);for(const a in e)if(fn(e[a])||fn(t[a])){const i=Wc.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}function Z9(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const ZO=["x","y","width","height","cx","cy","r"],J9={useVisualState:s3({scrapeMotionValuesFromProps:m3,createRenderState:u3,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:a})=>{if(!n)return;let i=!!e.drag;if(!i){for(const o in a)if(To.has(o)){i=!0;break}}if(!i)return;let s=!t;if(t)for(let o=0;o<ZO.length;o++){const c=ZO[o];e[c]!==t[c]&&(s=!0)}s&&Le.read(()=>{Z9(n,r),Le.render(()=>{lj(r,a,uj(n.tagName),e.transformTemplate),h3(n,r)})})}})},eF={useVisualState:s3({scrapeMotionValuesFromProps:dj,createRenderState:cj})};function g3(e,t,n){for(const r in t)!fn(t[r])&&!p3(r,n)&&(e[r]=t[r])}function tF({transformTemplate:e},t){return j.useMemo(()=>{const n=cj();return oj(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nF(e,t){const n=e.style||{},r={};return g3(r,n,e),Object.assign(r,tF(e,t)),r}function rF(e,t){const n={},r=nF(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}function aF(e,t,n,r){const a=j.useMemo(()=>{const i=u3();return lj(i,t,uj(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};g3(i,e.style,e),a.style={...i,...a.style}}return a}function iF(e=!1){return(n,r,a,{latestValues:i},s)=>{const c=(rj(n)?aF:rF)(r,i,s,n),u=b9(r,typeof n=="string",e),d=n!==j.Fragment?{...u,...c,ref:a}:{},{children:f}=r,h=j.useMemo(()=>fn(f)?f.get():f,[f]);return j.createElement(n,{...d,children:h})}}function sF(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const s={...rj(r)?J9:eF,preloadedFeatures:e,useRender:iF(a),createVisualElement:t,Component:r};return C9(s)}}function y3(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}function gy(e,t,n){const r=e.getProps();return aj(r,t,n!==void 0?n:r.custom,e)}const v3=Zw(()=>window.ScrollTimeline!==void 0);class oF{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(a=>{if(v3()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{r.forEach((a,i)=>{a&&a(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class lF extends oF{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function fj(e,t){return e?e[t]||e.default||e:void 0}const _0=2e4;function x3(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<_0;)t+=n,r=e.next(t);return t>=_0?1/0:t}function hj(e){return typeof e=="function"}function JO(e,t){e.timeline=t,e.onfinish=null}const pj=e=>Array.isArray(e)&&typeof e[0]=="number",cF={linearEasing:void 0};function uF(e,t){const n=Zw(e);return()=>{var r;return(r=cF[t])!==null&&r!==void 0?r:n()}}const jm=uF(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),b3=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i<a;i++)r+=e(fo(0,a-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function S3(e){return!!(typeof e=="function"&&jm()||!e||typeof e=="string"&&(e in P0||jm())||pj(e)||Array.isArray(e)&&e.every(S3))}const Fu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,P0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Fu([0,.65,.55,1]),circOut:Fu([.55,0,1,.45]),backIn:Fu([.31,.01,.66,-.59]),backOut:Fu([.33,1.53,.69,.99])};function w3(e,t){if(e)return typeof e=="function"&&jm()?b3(e,t):pj(e)?Fu(e):Array.isArray(e)?e.map(n=>w3(n,t)||P0.easeOut):P0[e]}const Rr={x:!1,y:!1};function j3(){return Rr.x||Rr.y}function A3(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let a=document;const i=(r=void 0)!==null&&r!==void 0?r:a.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function O3(e,t){const n=A3(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function eN(e){return t=>{t.pointerType==="touch"||j3()||e(t)}}function dF(e,t,n={}){const[r,a,i]=O3(e,n),s=eN(o=>{const{target:c}=o,u=t(o);if(typeof u!="function"||!c)return;const d=eN(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,a)});return r.forEach(o=>{o.addEventListener("pointerenter",s,a)}),i}const N3=(e,t)=>t?e===t?!0:N3(e,t.parentElement):!1,mj=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,fF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hF(e){return fF.has(e.tagName)||e.tabIndex!==-1}const Vu=new WeakSet;function tN(e){return t=>{t.key==="Enter"&&e(t)}}function lx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const pF=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=tN(()=>{if(Vu.has(n))return;lx(n,"down");const a=tN(()=>{lx(n,"up")}),i=()=>lx(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function nN(e){return mj(e)&&!j3()}function mF(e,t,n={}){const[r,a,i]=O3(e,n),s=o=>{const c=o.currentTarget;if(!nN(o)||Vu.has(c))return;Vu.add(c);const u=t(o),d=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!nN(p)||!Vu.has(c))&&(Vu.delete(c),typeof u=="function"&&u(p,{success:g}))},f=p=>{d(p,n.useGlobalTarget||N3(c,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,a),window.addEventListener("pointercancel",h,a)};return r.forEach(o=>{!hF(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,a),o.addEventListener("focus",u=>pF(u,a),a)}),i}function gF(e){return e==="x"||e==="y"?Rr[e]?null:(Rr[e]=!0,()=>{Rr[e]=!1}):Rr.x||Rr.y?null:(Rr.x=Rr.y=!0,()=>{Rr.x=Rr.y=!1})}const E3=new Set(["width","height","top","left","right","bottom",...Wc]);let Mp;function yF(){Mp=void 0}const ua={now:()=>(Mp===void 0&&ua.set(Vt.isProcessing||p9.useManualTiming?Vt.timestamp:performance.now()),Mp),set:e=>{Mp=e,queueMicrotask(yF)}};function gj(e,t){e.indexOf(t)===-1&&e.push(t)}function yj(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class vj{constructor(){this.subscriptions=[]}add(t){return gj(this.subscriptions,t),()=>yj(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function xj(e,t){return t?e*(1e3/t):0}const rN=30,vF=e=>!isNaN(parseFloat(e)),ld={current:void 0};class xF{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const i=ua.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ua.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=vF(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 vj);const r=this.events[t].add(n);return t==="change"?()=>{r(),Le.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}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()}get(){return ld.current&&ld.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=ua.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rN)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rN);return xj(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ra(e,t){return new xF(e,t)}function bF(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ra(n))}function SF(e,t){const n=gy(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i){const o=D9(i[s]);bF(e,s,o)}}function wF(e){return!!(fn(e)&&e.add)}function M0(e,t){const n=e.getValue("willChange");if(wF(n))return n.add(t)}function T3(e){return e.props[r3]}const C3=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jF=1e-7,AF=12;function OF(e,t,n,r,a){let i,s,o=0;do s=t+(n-t)/2,i=C3(s,r,a)-e,i>0?n=s:t=s;while(Math.abs(i)>jF&&++o<AF);return s}function Jf(e,t,n,r){if(e===t&&n===r)return xn;const a=i=>OF(i,0,1,e,n);return i=>i===0||i===1?i:C3(a(i),t,r)}const _3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,P3=e=>t=>1-e(1-t),M3=Jf(.33,1.53,.69,.99),bj=P3(M3),k3=_3(bj),R3=e=>(e*=2)<1?.5*bj(e):.5*(2-Math.pow(2,-10*(e-1))),Sj=e=>1-Math.sin(Math.acos(e)),D3=P3(Sj),$3=_3(Sj),L3=e=>/^0[^.\s]+$/u.test(e);function NF(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||L3(e):!0}const cd=e=>Math.round(e*1e5)/1e5,wj=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function EF(e){return e==null}const TF=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jj=(e,t)=>n=>!!(typeof n=="string"&&TF.test(n)&&n.startsWith(e)||t&&!EF(n)&&Object.prototype.hasOwnProperty.call(n,t)),I3=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(wj);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},CF=e=>pa(0,255,e),cx={...Xc,transform:e=>Math.round(CF(e))},ks={test:jj("rgb","red"),parse:I3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+cx.transform(e)+", "+cx.transform(t)+", "+cx.transform(n)+", "+cd(Fd.transform(r))+")"};function _F(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const k0={test:jj("#"),parse:_F,transform:ks.transform},hl={test:jj("hsl","hue"),parse:I3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ca.transform(cd(t))+", "+ca.transform(cd(n))+", "+cd(Fd.transform(r))+")"},cn={test:e=>ks.test(e)||k0.test(e)||hl.test(e),parse:e=>ks.test(e)?ks.parse(e):hl.test(e)?hl.parse(e):k0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ks.transform(e):hl.transform(e)},PF=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function MF(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(wj))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(PF))===null||n===void 0?void 0:n.length)||0)>0}const z3="number",B3="color",kF="var",RF="var(",aN="${}",DF=/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 Vd(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(DF,c=>(cn.test(c)?(r.color.push(i),a.push(B3),n.push(cn.parse(c))):c.startsWith(RF)?(r.var.push(i),a.push(kF),n.push(c)):(r.number.push(i),a.push(z3),n.push(parseFloat(c))),++i,aN)).split(aN);return{values:n,split:o,indexes:r,types:a}}function U3(e){return Vd(e).values}function F3(e){const{split:t,types:n}=Vd(e),r=t.length;return a=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],a[s]!==void 0){const o=n[s];o===z3?i+=cd(a[s]):o===B3?i+=cn.transform(a[s]):i+=a[s]}return i}}const $F=e=>typeof e=="number"?0:e;function LF(e){const t=U3(e);return F3(e)(t.map($F))}const ss={test:MF,parse:U3,createTransformer:F3,getAnimatableNone:LF},IF=new Set(["brightness","contrast","saturate","opacity"]);function zF(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(wj)||[];if(!r)return e;const a=n.replace(r,"");let i=IF.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const BF=/\b([a-z-]*)\(.*?\)/gu,R0={...ss,getAnimatableNone:e=>{const t=e.match(BF);return t?t.map(zF).join(" "):e}},UF={...sj,color:cn,backgroundColor:cn,outlineColor:cn,fill:cn,stroke:cn,borderColor:cn,borderTopColor:cn,borderRightColor:cn,borderBottomColor:cn,borderLeftColor:cn,filter:R0,WebkitFilter:R0},Aj=e=>UF[e];function V3(e,t){let n=Aj(e);return n!==R0&&(n=ss),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FF=new Set(["auto","none","0"]);function VF(e,t,n){let r=0,a;for(;r<e.length&&!a;){const i=e[r];typeof i=="string"&&!FF.has(i)&&Vd(i).values.length&&(a=e[r]),r++}if(a&&n)for(const i of t)e[i]=V3(n,a)}const iN=e=>e===Xc||e===he,sN=(e,t)=>parseFloat(e.split(", ")[t]),oN=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const a=r.match(/^matrix3d\((.+)\)$/u);if(a)return sN(a[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?sN(i[1],e):0}},HF=new Set(["x","y","z"]),qF=Wc.filter(e=>!HF.has(e));function KF(e){const t=[];return qF.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ic={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-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:oN(4,13),y:oN(5,14)};ic.translateX=ic.x;ic.translateY=ic.y;const to=new Set;let D0=!1,$0=!1;function H3(){if($0){const e=Array.from(to).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=KF(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))===null||o===void 0||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}$0=!1,D0=!1,to.forEach(e=>e.complete()),to.clear()}function q3(){to.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($0=!0)})}function GF(){q3(),H3()}class Oj{constructor(t,n,r,a,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(to.add(this),D0||(D0=!0,Le.read(q3),Le.resolveKeyframes(H3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=a==null?void 0:a.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,o);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=o),a&&s===void 0&&a.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),to.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,to.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const K3=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),YF=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function WF(e){const t=YF.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function G3(e,t,n=1){const[r,a]=WF(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return K3(s)?parseFloat(s):s}return ij(a)?G3(a,t,n+1):a}const Y3=e=>t=>t.test(e),XF={test:e=>e==="auto",parse:e=>e},W3=[Xc,he,ca,yi,U9,B9,XF],lN=e=>W3.find(Y3(e));class X3 extends Oj{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),ij(u))){const d=G3(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!E3.has(r)||t.length!==2)return;const[a,i]=t,s=lN(a),o=lN(i);if(s!==o)if(iN(s)&&iN(o))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)NF(t[a])&&r.push(a);r.length&&VF(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=ic[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:a}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=a.length-1,o=a[s];a[s]=ic[r](n.measureViewportBox(),window.getComputedStyle(n.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const cN=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ss.test(e)||e==="0")&&!e.startsWith("url("));function QF(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 ZF(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=cN(a,t),o=cN(i,t);return!s||!o?!1:QF(e)||(n==="spring"||hj(n))&&r}const JF=e=>e!==null;function yy(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(JF),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const eV=40;class Q3{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ua.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>eV?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&GF(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ua.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:i,delay:s,onComplete:o,onUpdate:c,isGenerator:u}=this.options;if(!u&&!ZF(t,r,a,i))if(s)this.options.duration=0;else{c&&c(yy(t,this.options,n)),o&&o(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const mt=(e,t,n)=>e+(t-e)*n;function ux(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 tV({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,s=0;if(!t)a=i=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,c=2*n-o;a=ux(c,o,e+1/3),i=ux(c,o,e),s=ux(c,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Am(e,t){return n=>n>0?t:e}const dx=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},nV=[k0,ks,hl],rV=e=>nV.find(t=>t.test(e));function uN(e){const t=rV(e);if(!t)return!1;let n=t.parse(e);return t===hl&&(n=tV(n)),n}const dN=(e,t)=>{const n=uN(e),r=uN(t);if(!n||!r)return Am(e,t);const a={...n};return i=>(a.red=dx(n.red,r.red,i),a.green=dx(n.green,r.green,i),a.blue=dx(n.blue,r.blue,i),a.alpha=mt(n.alpha,r.alpha,i),ks.transform(a))},aV=(e,t)=>n=>t(e(n)),eh=(...e)=>e.reduce(aV),L0=new Set(["none","hidden"]);function iV(e,t){return L0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sV(e,t){return n=>mt(e,t,n)}function Nj(e){return typeof e=="number"?sV:typeof e=="string"?ij(e)?Am:cn.test(e)?dN:cV:Array.isArray(e)?Z3:typeof e=="object"?cn.test(e)?dN:oV:Am}function Z3(e,t){const n=[...e],r=n.length,a=e.map((i,s)=>Nj(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=a[s](i);return n}}function oV(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=Nj(e[a])(e[a],t[a]));return a=>{for(const i in r)n[i]=r[i](a);return n}}function lV(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][a[s]],c=(n=e.values[o])!==null&&n!==void 0?n:0;r[i]=c,a[s]++}return r}const cV=(e,t)=>{const n=ss.createTransformer(t),r=Vd(e),a=Vd(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?L0.has(e)&&!a.values.length||L0.has(t)&&!r.values.length?iV(e,t):eh(Z3(lV(r,a),a.values),n):Am(e,t)};function J3(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?mt(e,t,n):Nj(e)(e,t)}const uV=5;function e$(e,t,n){const r=Math.max(t-uV,0);return xj(n-e(r),t-r)}const xt={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},fx=.001;function dV({duration:e=xt.duration,bounce:t=xt.bounce,velocity:n=xt.velocity,mass:r=xt.mass}){let a,i,s=1-t;s=pa(xt.minDamping,xt.maxDamping,s),e=pa(xt.minDuration,xt.maxDuration,Ga(e)),s<1?(a=u=>{const d=u*s,f=d*e,h=d-n,p=I0(u,s),g=Math.exp(-f);return fx-h/p*g},i=u=>{const f=u*s*e,h=f*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,g=Math.exp(-f),m=I0(Math.pow(u,2),s);return(-a(u)+fx>0?-1:1)*((h-p)*g)/m}):(a=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-fx+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const o=5/e,c=hV(a,i,o);if(e=Ka(e),isNaN(c))return{stiffness:xt.stiffness,damping:xt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const fV=12;function hV(e,t,n){let r=n;for(let a=1;a<fV;a++)r=r-e(r)/t(r);return r}function I0(e,t){return e*Math.sqrt(1-t*t)}const pV=["duration","bounce"],mV=["stiffness","damping","mass"];function fN(e,t){return t.some(n=>e[n]!==void 0)}function gV(e){let t={velocity:xt.velocity,stiffness:xt.stiffness,damping:xt.damping,mass:xt.mass,isResolvedFromDuration:!1,...e};if(!fN(e,mV)&&fN(e,pV))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*pa(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:xt.mass,stiffness:a,damping:i}}else{const n=dV(e);t={...t,...n,mass:xt.mass},t.isResolvedFromDuration=!0}return t}function t$(e=xt.visualDuration,t=xt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=gV({...n,velocity:-Ga(n.velocity||0)}),g=h||0,m=u/(2*Math.sqrt(c*d)),v=s-i,y=Ga(Math.sqrt(c/d)),x=Math.abs(v)<5;r||(r=x?xt.restSpeed.granular:xt.restSpeed.default),a||(a=x?xt.restDelta.granular:xt.restDelta.default);let b;if(m<1){const S=I0(y,m);b=A=>{const O=Math.exp(-m*y*A);return s-O*((g+m*y*v)/S*Math.sin(S*A)+v*Math.cos(S*A))}}else if(m===1)b=S=>s-Math.exp(-y*S)*(v+(g+y*v)*S);else{const S=y*Math.sqrt(m*m-1);b=A=>{const O=Math.exp(-m*y*A),N=Math.min(S*A,300);return s-O*((g+m*y*v)*Math.sinh(N)+S*v*Math.cosh(N))/S}}const w={calculatedDuration:p&&f||null,next:S=>{const A=b(S);if(p)o.done=S>=f;else{let O=0;m<1&&(O=S===0?Ka(g):e$(b,S,A));const N=Math.abs(O)<=r,E=Math.abs(s-A)<=a;o.done=N&&E}return o.value=o.done?s:A,o},toString:()=>{const S=Math.min(x3(w),_0),A=b3(O=>w.next(S*O).value,S,30);return S+"ms "+A}};return w}function hN({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=N=>o!==void 0&&N<o||c!==void 0&&N>c,g=N=>o===void 0?c:c===void 0||Math.abs(o-N)<Math.abs(c-N)?o:c;let m=n*t;const v=f+m,y=s===void 0?v:s(v);y!==v&&(m=y-f);const x=N=>-m*Math.exp(-N/r),b=N=>y+x(N),w=N=>{const E=x(N),T=b(N);h.done=Math.abs(E)<=u,h.value=h.done?y:T};let S,A;const O=N=>{p(h.value)&&(S=N,A=t$({keyframes:[h.value,g(h.value)],velocity:e$(b,N,h.value),damping:a,stiffness:i,restDelta:u,restSpeed:d}))};return O(0),{calculatedDuration:null,next:N=>{let E=!1;return!A&&S===void 0&&(E=!0,w(N),O(N)),S!==void 0&&N>=S?A.next(N-S):(!E&&w(N),h)}}}const yV=Jf(.42,0,1,1),vV=Jf(0,0,.58,1),n$=Jf(.42,0,.58,1),xV=e=>Array.isArray(e)&&typeof e[0]!="number",bV={linear:xn,easeIn:yV,easeInOut:n$,easeOut:vV,circIn:Sj,circInOut:$3,circOut:D3,backIn:bj,backInOut:k3,backOut:M3,anticipate:R3},pN=e=>{if(pj(e)){ZD(e.length===4);const[t,n,r,a]=e;return Jf(t,n,r,a)}else if(typeof e=="string")return bV[e];return e};function SV(e,t,n){const r=[],a=n||J3,i=e.length-1;for(let s=0;s<i;s++){let o=a(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||xn:t;o=eh(c,o)}r.push(o)}return r}function Ej(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const i=e.length;if(ZD(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=SV(t,r,a),c=o.length,u=d=>{if(s&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=fo(e[f],e[f+1],d);return o[f](h)};return n?d=>u(pa(e[0],e[i-1],d)):u}function wV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=fo(0,t,r);e.push(mt(n,1,a))}}function r$(e){const t=[0];return wV(t,e.length-1),t}function jV(e,t){return e.map(n=>n*t)}function AV(e,t){return e.map(()=>t||n$).splice(0,e.length-1)}function Om({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=xV(r)?r.map(pN):pN(r),i={done:!1,value:t[0]},s=jV(n&&n.length===t.length?n:r$(t),e),o=Ej(s,t,{ease:Array.isArray(a)?a:AV(t,a)});return{calculatedDuration:e,next:c=>(i.value=o(c),i.done=c>=e,i)}}const OV=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Le.update(t,!0),stop:()=>Fr(t),now:()=>Vt.isProcessing?Vt.timestamp:ua.now()}},NV={decay:hN,inertia:hN,tween:Om,keyframes:Om,spring:t$},EV=e=>e/100;class Tj extends Q3{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:a,keyframes:i}=this.options,s=(a==null?void 0:a.KeyframeResolver)||Oj,o=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new s(i,o,n,r,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=this.options,o=hj(n)?n:NV[n]||Om;let c,u;o!==Om&&typeof t[0]!="number"&&(c=eh(EV,J3(t[0],t[1])),t=[0,100]);const d=o({...this.options,keyframes:t});i==="mirror"&&(u=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),d.calculatedDuration===null&&(d.calculatedDuration=x3(d));const{calculatedDuration:f}=d,h=f+a,p=h*(r+1)-a;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:N}=this.options;return{done:!0,value:N[N.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:p,repeatType:g,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,w=i;if(p){const N=Math.min(this.currentTime,d)/f;let E=Math.floor(N),T=N%1;!T&&N>=1&&(T=1),T===1&&E--,E=Math.min(E,p+1),!!(E%2)&&(g==="reverse"?(T=1-T,m&&(T-=m/f)):g==="mirror"&&(w=s)),b=pa(0,1,T)*f}const S=x?{done:!1,value:c[0]}:w.next(b);o&&(S.value=o(S.value));let{done:A}=S;!x&&u!==null&&(A=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return O&&a!==void 0&&(S.value=yy(c,this.options,a)),v&&v(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Ga(t.calculatedDuration):0}get time(){return Ga(this.currentTime)}set time(t){t=Ka(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ga(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=OV,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const TV=new Set(["opacity","clipPath","filter","transform"]);function CV(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=w3(o,a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const _V=Zw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nm=10,PV=2e4;function MV(e){return hj(e.type)||e.type==="spring"||!S3(e.ease)}function kV(e,t){const n=new Tj({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let i=0;for(;!r.done&&i<PV;)r=n.sample(i),a.push(r.value),i+=Nm;return{times:void 0,keyframes:a,duration:i-Nm,ease:"linear"}}const a$={anticipate:R3,backInOut:k3,circInOut:$3};function RV(e){return e in a$}class mN extends Q3{constructor(t){super(t);const{name:n,motionValue:r,element:a,keyframes:i}=this.options;this.resolver=new X3(i,(s,o)=>this.onKeyframesResolved(s,o),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:a,ease:i,type:s,motionValue:o,name:c,startTime:u}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i=="string"&&jm()&&RV(i)&&(i=a$[i]),MV(this.options)){const{onComplete:f,onUpdate:h,motionValue:p,element:g,...m}=this.options,v=kV(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,a=v.times,i=v.ease,s="keyframes"}const d=CV(o.owner.current,c,t,{...this.options,duration:r,times:a,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(JO(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;o.set(yy(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:a,type:s,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ga(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ga(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ka(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return xn;const{animation:r}=n;JO(r,t)}return xn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:a,type:i,ease:s,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...p}=this.options,g=new Tj({...p,keyframes:r,duration:a,type:i,ease:s,times:o,isGenerator:!0}),m=Ka(this.time);u.setWithVelocity(g.sample(m-Nm).value,g.sample(m).value,Nm)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:a,repeatType:i,damping:s,type:o}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return _V()&&r&&TV.has(r)&&!c&&!u&&!a&&i!=="mirror"&&s!==0&&o!=="inertia"}}const DV={type:"spring",stiffness:500,damping:25,restSpeed:10},$V=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LV={type:"keyframes",duration:.8},IV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zV=(e,{keyframes:t})=>t.length>2?LV:To.has(e)?e.startsWith("scale")?$V(t[1]):DV:IV;function BV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Cj=(e,t,n,r={},a,i)=>s=>{const o=fj(r,e)||{},c=o.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ka(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};BV(o)||(d={...d,...zV(e,d)}),d.duration&&(d.duration=Ka(d.duration)),d.repeatDelay&&(d.repeatDelay=Ka(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=yy(d.keyframes,o);if(h!==void 0)return Le.update(()=>{d.onUpdate(h),d.onComplete()}),new lF([])}return!i&&mN.supports(d)?new mN(d):new Tj(d)};function UV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function i$(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...c}=t;r&&(s=r);const u=[],d=a&&e.animationState&&e.animationState.getState()[a];for(const f in c){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),p=c[f];if(p===void 0||d&&UV(d,f))continue;const g={delay:n,...fj(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const y=T3(e);if(y){const x=window.MotionHandoffAnimation(y,f,Le);x!==null&&(g.startTime=x,m=!0)}}M0(e,f),h.start(Cj(f,h,p,e.shouldReduceMotion&&E3.has(f)?{type:!1}:g,e,m));const v=h.animation;v&&u.push(v)}return o&&Promise.all(u).then(()=>{Le.update(()=>{o&&SF(e,o)})}),u}function z0(e,t,n={}){var r;const a=gy(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const s=a?()=>Promise.all(i$(e,a,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=i;return FV(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[u,d]=c==="beforeChildren"?[s,o]:[o,s];return u().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function FV(e,t,n=0,r=0,a=1,i){const s=[],o=(e.variantChildren.size-1)*r,c=a===1?(u=0)=>u*r:(u=0)=>o-u*r;return Array.from(e.variantChildren).sort(VV).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(z0(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function VV(e,t){return e.sortNodePosition(t)}function HV(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>z0(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=z0(e,t,n);else{const a=typeof t=="function"?gy(e,t,n.custom):t;r=Promise.all(i$(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const qV=ej.length;function s$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?s$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<qV;n++){const r=ej[n],a=e.props[r];(Ud(a)||a===!1)&&(t[r]=a)}return t}const KV=[...Jw].reverse(),GV=Jw.length;function YV(e){return t=>Promise.all(t.map(({animation:n,options:r})=>HV(e,n,r)))}function WV(e){let t=YV(e),n=gN(),r=!0;const a=c=>(u,d)=>{var f;const h=gy(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:g,...m}=h;u={...u,...m,...g}}return u};function i(c){t=c(e)}function s(c){const{props:u}=e,d=s$(e.parent)||{},f=[],h=new Set;let p={},g=1/0;for(let v=0;v<GV;v++){const y=KV[v],x=n[y],b=u[y]!==void 0?u[y]:d[y],w=Ud(b),S=y===c?x.isActive:null;S===!1&&(g=v);let A=b===d[y]&&b!==u[y]&&w;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),x.protectedKeys={...p},!x.isActive&&S===null||!b&&!x.prevProp||py(b)||typeof b=="boolean")continue;const O=XV(x.prevProp,b);let N=O||y===c&&x.isActive&&!A&&w||v>g&&w,E=!1;const T=Array.isArray(b)?b:[b];let _=T.reduce(a(y),{});S===!1&&(_={});const{prevResolvedValues:C={}}=x,$={...C,..._},R=L=>{N=!0,h.has(L)&&(E=!0,h.delete(L)),x.needsAnimating[L]=!0;const z=e.getValue(L);z&&(z.liveStyle=!1)};for(const L in $){const z=_[L],V=C[L];if(p.hasOwnProperty(L))continue;let K=!1;C0(z)&&C0(V)?K=!y3(z,V):K=z!==V,K?z!=null?R(L):h.add(L):z!==void 0&&h.has(L)?R(L):x.protectedKeys[L]=!0}x.prevProp=b,x.prevResolvedValues=_,x.isActive&&(p={...p,..._}),r&&e.blockInitialAnimation&&(N=!1),N&&(!(A&&O)||E)&&f.push(...T.map(L=>({animation:L,options:{type:y}})))}if(h.size){const v={};h.forEach(y=>{const x=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),v[y]=x??null}),f.push({animation:v})}let m=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function o(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>n,reset:()=>{n=gN(),r=!0}}}function XV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!y3(t,e):!1}function vs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gN(){return{animate:vs(!0),whileInView:vs(),whileHover:vs(),whileTap:vs(),whileDrag:vs(),whileFocus:vs(),exit:vs()}}class cs{constructor(t){this.isMounted=!1,this.node=t}update(){}}class QV extends cs{constructor(t){super(t),t.animationState||(t.animationState=WV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();py(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===void 0||t.call(this)}}let ZV=0;class JV extends cs{constructor(){super(...arguments),this.id=ZV++}update(){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;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const eH={animation:{Feature:QV},exit:{Feature:JV}};function Hd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function th(e){return{point:{x:e.pageX,y:e.pageY}}}const tH=e=>t=>mj(t)&&e(t,th(t));function ud(e,t,n,r){return Hd(e,t,tH(n),r)}const yN=(e,t)=>Math.abs(e-t);function nH(e,t){const n=yN(e.x,t.x),r=yN(e.y,t.y);return Math.sqrt(n**2+r**2)}class o${constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=px(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=nH(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:g}=f,{timestamp:m}=Vt;this.history.push({...g,timestamp:m});const{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=hx(h,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=px(f.type==="pointercancel"?this.lastMoveEventInfo:hx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!mj(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const s=th(t),o=hx(s,this.transformPagePoint),{point:c}=o,{timestamp:u}=Vt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,px(o,this.history)),this.removeListeners=eh(ud(this.contextWindow,"pointermove",this.handlePointerMove),ud(this.contextWindow,"pointerup",this.handlePointerUp),ud(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fr(this.updatePoint)}}function hx(e,t){return t?{point:t(e.point)}:e}function vN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function px({point:e},t){return{point:e,delta:vN(e,l$(t)),offset:vN(e,rH(t)),velocity:aH(t,.1)}}function rH(e){return e[0]}function l$(e){return e[e.length-1]}function aH(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=l$(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ka(t)));)n--;if(!r)return{x:0,y:0};const i=Ga(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const c$=1e-4,iH=1-c$,sH=1+c$,u$=.01,oH=0-u$,lH=0+u$;function rr(e){return e.max-e.min}function cH(e,t,n){return Math.abs(e-t)<=n}function xN(e,t,n,r=.5){e.origin=r,e.originPoint=mt(t.min,t.max,e.origin),e.scale=rr(n)/rr(t),e.translate=mt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=iH&&e.scale<=sH||isNaN(e.scale))&&(e.scale=1),(e.translate>=oH&&e.translate<=lH||isNaN(e.translate))&&(e.translate=0)}function dd(e,t,n,r){xN(e.x,t.x,n.x,r?r.originX:void 0),xN(e.y,t.y,n.y,r?r.originY:void 0)}function bN(e,t,n){e.min=n.min+t.min,e.max=e.min+rr(t)}function uH(e,t,n){bN(e.x,t.x,n.x),bN(e.y,t.y,n.y)}function SN(e,t,n){e.min=t.min-n.min,e.max=e.min+rr(t)}function fd(e,t,n){SN(e.x,t.x,n.x),SN(e.y,t.y,n.y)}function dH(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?mt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?mt(n,e,r.max):Math.min(e,n)),e}function wN(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 fH(e,{top:t,left:n,bottom:r,right:a}){return{x:wN(e.x,n,a),y:wN(e.y,t,r)}}function jN(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 hH(e,t){return{x:jN(e.x,t.x),y:jN(e.y,t.y)}}function pH(e,t){let n=.5;const r=rr(e),a=rr(t);return a>r?n=fo(t.min,t.max-r,e.min):r>a&&(n=fo(e.min,e.max-a,t.min)),pa(0,1,n)}function mH(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 B0=.35;function gH(e=B0){return e===!1?e=0:e===!0&&(e=B0),{x:AN(e,"left","right"),y:AN(e,"top","bottom")}}function AN(e,t,n){return{min:ON(e,t),max:ON(e,n)}}function ON(e,t){return typeof e=="number"?e:e[t]||0}const NN=()=>({translate:0,scale:1,origin:0,originPoint:0}),pl=()=>({x:NN(),y:NN()}),EN=()=>({min:0,max:0}),wt=()=>({x:EN(),y:EN()});function cr(e){return[e("x"),e("y")]}function d$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function yH({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vH(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 mx(e){return e===void 0||e===1}function U0({scale:e,scaleX:t,scaleY:n}){return!mx(e)||!mx(t)||!mx(n)}function Ns(e){return U0(e)||f$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f$(e){return TN(e.x)||TN(e.y)}function TN(e){return e&&e!=="0%"}function Em(e,t,n){const r=e-n,a=t*r;return n+a}function CN(e,t,n,r,a){return a!==void 0&&(e=Em(e,a,r)),Em(e,n,r)+t}function F0(e,t=0,n=1,r,a){e.min=CN(e.min,t,n,r,a),e.max=CN(e.max,t,n,r,a)}function h$(e,{x:t,y:n}){F0(e.x,t.translate,t.scale,t.originPoint),F0(e.y,n.translate,n.scale,n.originPoint)}const _N=.999999999999,PN=1.0000000000001;function xH(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;o<a;o++){i=n[o],s=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&gl(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,h$(e,s)),r&&Ns(i.latestValues)&&gl(e,i.latestValues))}t.x<PN&&t.x>_N&&(t.x=1),t.y<PN&&t.y>_N&&(t.y=1)}function ml(e,t){e.min=e.min+t,e.max=e.max+t}function MN(e,t,n,r,a=.5){const i=mt(e.min,e.max,a);F0(e,t,n,i,r)}function gl(e,t){MN(e.x,t.x,t.scaleX,t.scale,t.originX),MN(e.y,t.y,t.scaleY,t.scale,t.originY)}function p$(e,t){return d$(vH(e.getBoundingClientRect(),t))}function bH(e,t,n){const r=p$(e,n),{scroll:a}=t;return a&&(ml(r.x,a.offset.x),ml(r.y,a.offset.y)),r}const m$=({current:e})=>e?e.ownerDocument.defaultView:null,SH=new WeakMap;class wH{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=wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(th(d).point)},i=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gF(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cr(v=>{let y=this.getAxisMotionValue(v).get()||0;if(ca.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[v];b&&(y=rr(b)*(parseFloat(y)/100))}}this.originPoint[v]=y}),g&&Le.postRender(()=>g(d,f)),M0(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=jH(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&m(d,f)},o=(d,f)=>this.stop(d,f),c=()=>cr(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new o$(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:o,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:m$(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Le.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Vh(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=dH(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&fl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=fH(a.layoutBox,n):this.constraints=!1,this.elastic=gH(r),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&cr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=mH(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!fl(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=bH(r,a.root,this.visualElement.getTransformPagePoint());let s=hH(a.layout.layoutBox,i);if(n){const o=n(yH(s));this.hasMutatedConstraints=!!o,o&&(s=d$(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},u=cr(d=>{if(!Vh(d,n,this.currentDirection))return;let f=c&&c[d]||{};s&&(f={min:0,max:0});const h=a?200:1e6,p=a?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return M0(this.visualElement,t),r.start(Cj(t,r,0,n,this.visualElement,!1))}stopAnimation(){cr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){cr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){cr(n=>{const{drag:r}=this.getProps();if(!Vh(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[n];i.set(t[n]-mt(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!fl(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};cr(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const c=o.get();a[s]=pH({min:c,max:c},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),cr(s=>{if(!Vh(s,t,null))return;const o=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];o.set(mt(c,u,a[s]))})}addListeners(){if(!this.visualElement.current)return;SH.set(this.visualElement,this);const t=this.visualElement.current,n=ud(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();fl(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Le.read(r);const s=Hd(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(cr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=B0,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Vh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function jH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AH extends cs{constructor(t){super(t),this.removeGroupControls=xn,this.removeListeners=xn,this.controls=new wH(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xn}unmount(){this.removeGroupControls(),this.removeListeners()}}const kN=e=>(t,n)=>{e&&Le.postRender(()=>e(t,n))};class OH extends cs{constructor(){super(...arguments),this.removePointerDownListener=xn}onPointerDown(t){this.session=new o$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:m$(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:kN(t),onStart:kN(n),onMove:r,onEnd:(i,s)=>{delete this.session,a&&Le.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=ud(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const kp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function RN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=RN(e,t.target.x),r=RN(e,t.target.y);return`${n}% ${r}%`}},NH={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=ss.parse(e);if(a.length>5)return r;const i=ss.createTransformer(e),s=typeof a[0]!="number"?1:0,o=n.x.scale*t.x,c=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=c;const u=mt(o,c,.5);return typeof a[2+s]=="number"&&(a[2+s]/=u),typeof a[3+s]=="number"&&(a[3+s]/=u),i(a)}};class EH extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;Q9(TH),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),kp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,a||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Le.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),nj.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function g$(e){const[t,n]=QD(),r=j.useContext(Xw);return l.jsx(EH,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(a3),isPresent:t,safeToRemove:n})}const TH={borderRadius:{...bu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bu,borderTopRightRadius:bu,borderBottomLeftRadius:bu,borderBottomRightRadius:bu,boxShadow:NH};function CH(e,t,n){const r=fn(e)?e:ra(e);return r.start(Cj("",r,t,n)),r.animation}function _H(e){return e instanceof SVGElement&&e.tagName!=="svg"}const PH=(e,t)=>e.depth-t.depth;class MH{constructor(){this.children=[],this.isDirty=!1}add(t){gj(this.children,t),this.isDirty=!0}remove(t){yj(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(PH),this.isDirty=!1,this.children.forEach(t)}}function kH(e,t){const n=ua.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Fr(r),e(i-t))};return Le.read(r,!0),()=>Fr(r)}const y$=["TopLeft","TopRight","BottomLeft","BottomRight"],RH=y$.length,DN=e=>typeof e=="string"?parseFloat(e):e,$N=e=>typeof e=="number"||he.test(e);function DH(e,t,n,r,a,i){a?(e.opacity=mt(0,n.opacity!==void 0?n.opacity:1,$H(r)),e.opacityExit=mt(t.opacity!==void 0?t.opacity:1,0,LH(r))):i&&(e.opacity=mt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<RH;s++){const o=`border${y$[s]}Radius`;let c=LN(t,o),u=LN(n,o);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||$N(c)===$N(u)?(e[o]=Math.max(mt(DN(c),DN(u),r),0),(ca.test(u)||ca.test(c))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=mt(t.rotate||0,n.rotate||0,r))}function LN(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const $H=v$(0,.5,D3),LH=v$(.5,.95,xn);function v$(e,t,n){return r=>r<e?0:r>t?1:n(fo(e,t,r))}function IN(e,t){e.min=t.min,e.max=t.max}function ir(e,t){IN(e.x,t.x),IN(e.y,t.y)}function zN(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function BN(e,t,n,r,a){return e-=t,e=Em(e,1/n,r),a!==void 0&&(e=Em(e,1/a,r)),e}function IH(e,t=0,n=1,r=.5,a,i=e,s=e){if(ca.test(t)&&(t=parseFloat(t),t=mt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=mt(i.min,i.max,r);e===i&&(o-=t),e.min=BN(e.min,t,n,o,a),e.max=BN(e.max,t,n,o,a)}function UN(e,t,[n,r,a],i,s){IH(e,t[n],t[r],t[a],t.scale,i,s)}const zH=["x","scaleX","originX"],BH=["y","scaleY","originY"];function FN(e,t,n,r){UN(e.x,t,zH,n?n.x:void 0,r?r.x:void 0),UN(e.y,t,BH,n?n.y:void 0,r?r.y:void 0)}function VN(e){return e.translate===0&&e.scale===1}function x$(e){return VN(e.x)&&VN(e.y)}function HN(e,t){return e.min===t.min&&e.max===t.max}function UH(e,t){return HN(e.x,t.x)&&HN(e.y,t.y)}function qN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function b$(e,t){return qN(e.x,t.x)&&qN(e.y,t.y)}function KN(e){return rr(e.x)/rr(e.y)}function GN(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class FH{constructor(){this.members=[]}add(t){gj(this.members,t),t.scheduleRender()}remove(t){if(yj(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){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function VH(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((a||i||s)&&(r=`translate3d(${a}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const o=e.x.scale*t.x,c=e.y.scale*t.y;return(o!==1||c!==1)&&(r+=`scale(${o}, ${c})`),r||"none"}const Es={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Hu=typeof window<"u"&&window.MotionDebug!==void 0,gx=["","X","Y","Z"],HH={visibility:"hidden"},YN=1e3;let qH=0;function yx(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function S$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=T3(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Le,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&S$(r)}function w$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=qH++,this.animationId=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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Hu&&(Es.totalNodes=Es.resolvedTargetDeltas=Es.recalculatedProjection=0),this.nodes.forEach(YH),this.nodes.forEach(JH),this.nodes.forEach(eq),this.nodes.forEach(WH),Hu&&window.MotionDebug.record(Es)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new MH)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new vj),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const c=this.eventHandlers.get(s);c&&c.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_H(s),this.instance=s;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=kH(h,250),kp.hasAnimatedSinceResize&&(kp.hasAnimatedSinceResize=!1,this.nodes.forEach(XN))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||iq,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=d.getProps(),x=!this.targetLayout||!b$(this.targetLayout,g)||p,b=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,b);const w={...fj(m,"layout"),onPlay:v,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else h||XN(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Fr(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(tq),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&S$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(WN);return}this.isUpdating||this.nodes.forEach(QH),this.isUpdating=!1,this.nodes.forEach(ZH),this.nodes.forEach(KH),this.nodes.forEach(GH),this.clearAllSnapshots();const o=ua.now();Vt.delta=pa(0,1e3/60,o-Vt.timestamp),Vt.timestamp=o,Vt.isProcessing=!0,ox.update.process(Vt),ox.preRender.process(Vt),ox.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nj.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(XH),this.sharedNodes.forEach(nq)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!a)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!x$(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&(o||Ns(this.latestValues)||d)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return s&&(c=this.removeTransform(c)),sq(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:o}=this.options;if(!o)return wt();const c=o.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(oq))){const{scroll:d}=this.root;d&&(ml(c.x,d.offset.x),ml(c.y,d.offset.y))}return c}removeElementScroll(s){var o;const c=wt();if(ir(c,s),!((o=this.scroll)===null||o===void 0)&&o.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&ir(c,s),ml(c.x,f.offset.x),ml(c.y,f.offset.y))}return c}applyTransform(s,o=!1){const c=wt();ir(c,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];!o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&gl(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ns(d.latestValues)&&gl(c,d.latestValues)}return Ns(this.latestValues)&&gl(c,this.latestValues),c}removeTransform(s){const o=wt();ir(o,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Ns(u.latestValues))continue;U0(u.latestValues)&&u.updateSnapshot();const d=wt(),f=u.measurePageBox();ir(d,f),FN(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Ns(this.latestValues)&&FN(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var o;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),fd(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=wt(),this.targetWithTransforms=wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uH(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ir(this.target,this.layout.layoutBox),h$(this.target,this.targetDelta)):ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),fd(this.relativeTargetOrigin,this.target,p.target),ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Hu&&Es.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||U0(this.parent.latestValues)||f$(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const o=this.getLead(),c=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Vt.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;ir(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;xH(this.layoutCorrected,this.treeScale,this.path,c),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=wt());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zN(this.prevProjectionDelta.x,this.projectionDelta.x),zN(this.prevProjectionDelta.y,this.projectionDelta.y)),dd(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!GN(this.projectionDelta.x,this.prevProjectionDelta.x)||!GN(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),Hu&&Es.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)===null||o===void 0||o.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pl(),this.projectionDelta=pl(),this.projectionDeltaWithTransform=pl()}setAnimationOrigin(s,o=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=pl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const h=wt(),p=c?c.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,v=this.getStack(),y=!v||v.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(aq));this.animationProgress=0;let b;this.mixTargetDelta=w=>{const S=w/1e3;QN(f.x,s.x,S),QN(f.y,s.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fd(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),rq(this.relativeTarget,this.relativeTargetOrigin,h,S),b&&UH(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=wt()),ir(b,this.relativeTarget)),m&&(this.animationValues=d,DH(d,u,this.latestValues,S,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Fr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{kp.hasAnimatedSinceResize=!0,this.currentAnimation=CH(0,YN,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(YN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:c,layout:u,latestValues:d}=s;if(!(!o||!c||!u)){if(this!==s&&this.layout&&u&&j$(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||wt();const f=rr(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const h=rr(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}ir(o,c),gl(o,d),dd(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new FH),this.sharedNodes.get(s).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const u={};c.z&&yx("z",s,u,this.animationValues);for(let d=0;d<gx.length;d++)yx(`rotate${gx[d]}`,s,u,this.animationValues),yx(`skew${gx[d]}`,s,u,this.animationValues);s.render();for(const d in u)s.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);s.scheduleRender()}getProjectionStyles(s){var o,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return HH;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Pp(s==null?void 0:s.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Pp(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Ns(this.latestValues)&&(m.transform=d?d({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=VH(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:p,y:g}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(o=h.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in wm){if(h[m]===void 0)continue;const{correct:v,applyTo:y}=wm[m],x=u.transform==="none"?h[m]:v(h[m],f);if(y){const b=y.length;for(let w=0;w<b;w++)u[y[w]]=x}else u[m]=x}return this.options.layoutId&&(u.pointerEvents=f===this?Pp(s==null?void 0:s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(WN),this.root.sharedNodes.clear()}}}function KH(e){e.updateLayout()}function GH(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?cr(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=rr(h);h.min=r[f].min,h.max=h.min+p}):j$(i,n.layoutBox,r)&&cr(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=rr(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const o=pl();dd(o,r,n.layoutBox);const c=pl();s?dd(c,e.applyTransform(a,!0),n.measuredBox):dd(c,r,n.layoutBox);const u=!x$(o);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const g=wt();fd(g,n.layoutBox,h.layoutBox);const m=wt();fd(m,r,p.layoutBox),b$(g,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function YH(e){Hu&&Es.totalNodes++,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 WH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function XH(e){e.clearSnapshot()}function WN(e){e.clearMeasurements()}function QH(e){e.isLayoutDirty=!1}function ZH(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function XN(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function JH(e){e.resolveTargetDelta()}function eq(e){e.calcProjection()}function tq(e){e.resetSkewAndRotation()}function nq(e){e.removeLeadSnapshot()}function QN(e,t,n){e.translate=mt(t.translate,0,n),e.scale=mt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ZN(e,t,n,r){e.min=mt(t.min,n.min,r),e.max=mt(t.max,n.max,r)}function rq(e,t,n,r){ZN(e.x,t.x,n.x,r),ZN(e.y,t.y,n.y,r)}function aq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const iq={duration:.45,ease:[.4,0,.1,1]},JN=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eE=JN("applewebkit/")&&!JN("chrome/")?Math.round:xn;function tE(e){e.min=eE(e.min),e.max=eE(e.max)}function sq(e){tE(e.x),tE(e.y)}function j$(e,t,n){return e==="position"||e==="preserve-aspect"&&!cH(KN(t),KN(n),.2)}function oq(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const lq=w$({attachResizeListener:(e,t)=>Hd(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vx={current:void 0},A$=w$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vx.current){const e=new lq({});e.mount(window),e.setOptions({layoutScroll:!0}),vx.current=e}return vx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cq={pan:{Feature:OH},drag:{Feature:AH,ProjectionNode:A$,MeasureLayout:g$}};function nE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&Le.postRender(()=>i(t,th(t)))}class uq extends cs{mount(){const{current:t}=this.node;t&&(this.unmount=dF(t,n=>(nE(this.node,n,"Start"),r=>nE(this.node,r,"End"))))}unmount(){}}class dq extends cs{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=eh(Hd(this.node.current,"focus",()=>this.onFocus()),Hd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function rE(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&Le.postRender(()=>i(t,th(t)))}class fq extends cs{mount(){const{current:t}=this.node;t&&(this.unmount=mF(t,n=>(rE(this.node,n,"Start"),(r,{success:a})=>rE(this.node,r,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const V0=new WeakMap,xx=new WeakMap,hq=e=>{const t=V0.get(e.target);t&&t(e)},pq=e=>{e.forEach(hq)};function mq({root:e,...t}){const n=e||document;xx.has(n)||xx.set(n,{});const r=xx.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(pq,{root:e,...t})),r[a]}function gq(e,t,n){const r=mq(t);return V0.set(e,n),r.observe(e),()=>{V0.delete(e),r.unobserve(e)}}const yq={some:0,all:1};class vq extends cs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:yq[a]},o=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return gq(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(xq(t,n))&&this.startObserver()}unmount(){}}function xq({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const bq={inView:{Feature:vq},tap:{Feature:fq},focus:{Feature:dq},hover:{Feature:uq}},Sq={layout:{ProjectionNode:A$,MeasureLayout:g$}},Tm={current:null},_j={current:!1};function O$(){if(_j.current=!0,!!Qw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Tm.current=e.matches;e.addListener(t),t()}else Tm.current=!1}const wq=[...W3,cn,ss],jq=e=>wq.find(Y3(e)),aE=new WeakMap;function Aq(e,t,n){for(const r in t){const a=t[r],i=n[r];if(fn(a))e.addValue(r,a);else if(fn(i))e.addValue(r,ra(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(r);e.addValue(r,ra(s!==void 0?s:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const iE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Oq{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Oj,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 p=ua.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Le.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=s;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=my(n),this.isVariantNode=n3(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const g=h[p];c[p]!==void 0&&fn(g)&&g.set(c[p],!1)}}mount(t){this.current=t,aE.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((n,r)=>this.bindToMotionValue(r,n)),_j.current||O$(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Tm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){aE.delete(this.current),this.projection&&this.projection.unmount(),Fr(this.notifyUpdate),Fr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=To.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),n.owner&&n.stop()})}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 ac){const n=ac[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wt()}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<iE.length;r++){const a=iE[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=Aq(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=ra(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(K3(a)||L3(a))?a=parseFloat(a):!jq(a)&&ss.test(n)&&(a=V3(t,n)),this.setBaseTarget(t,fn(a)?a.get():a)),fn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=aj(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!fn(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new vj),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class N$ extends Oq{constructor(){super(...arguments),this.KeyframeResolver=X3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Nq(e){return window.getComputedStyle(e)}class Eq extends N${constructor(){super(...arguments),this.type="html",this.renderInstance=d3}readValueFromInstance(t,n){if(To.has(n)){const r=Aj(n);return r&&r.default||0}else{const r=Nq(t),a=(l3(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return p$(t,n)}build(t,n,r){oj(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return dj(t,n,r)}}class Tq extends N${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=wt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(To.has(n)){const r=Aj(n);return r&&r.default||0}return n=f3.has(n)?n:tj(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return m3(t,n,r)}build(t,n,r){lj(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){h3(t,n,r,a)}mount(t){this.isSVGTag=uj(t.tagName),super.mount(t)}}const Cq=(e,t)=>rj(e)?new Tq(t):new Eq(t,{allowProjection:e!==j.Fragment}),_q=sF({...eH,...bq,...cq,...Sq},Cq),Pt=S9(_q);function E$(e,t){let n;const r=()=>{const{currentTime:a}=t,s=(a===null?0:a.value)/100;n!==s&&e(s),n=s};return Le.update(r,!0),()=>Fr(r)}const Rp=new WeakMap;let vi;function Pq(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function Mq({target:e,contentRect:t,borderBoxSize:n}){var r;(r=Rp.get(e))===null||r===void 0||r.forEach(a=>{a({target:e,contentSize:t,get size(){return Pq(e,n)}})})}function kq(e){e.forEach(Mq)}function Rq(){typeof ResizeObserver>"u"||(vi=new ResizeObserver(kq))}function Dq(e,t){vi||Rq();const n=A3(e);return n.forEach(r=>{let a=Rp.get(r);a||(a=new Set,Rp.set(r,a)),a.add(t),vi==null||vi.observe(r)}),()=>{n.forEach(r=>{const a=Rp.get(r);a==null||a.delete(t),a!=null&&a.size||vi==null||vi.unobserve(r)})}}const Dp=new Set;let hd;function $q(){hd=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};Dp.forEach(n=>n(t))},window.addEventListener("resize",hd)}function Lq(e){return Dp.add(e),hd||$q(),()=>{Dp.delete(e),!Dp.size&&hd&&(hd=void 0)}}function Iq(e,t){return typeof e=="function"?Lq(e):Dq(e,t)}const zq=50,sE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Bq=()=>({time:0,x:sE(),y:sE()}),Uq={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function oE(e,t,n,r){const a=n[t],{length:i,position:s}=Uq[t],o=a.current,c=n.time;a.current=e[`scroll${s}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=fo(0,a.scrollLength,a.current);const u=r-c;a.velocity=u>zq?0:xj(a.current-o,u)}function Fq(e,t,n){oE(e,"x",t,n),oE(e,"y",t,n),t.time=n}function Vq(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const a=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:a,y:i}=r.getBBox();n.x+=a,n.y+=i;let s=null,o=r.parentNode;for(;!s;)o.tagName==="svg"&&(s=o),o=r.parentNode;r=s}else break;return n}const H0={start:0,center:.5,end:1};function lE(e,t,n=0){let r=0;if(e in H0&&(e=H0[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(r=t*e),n+r}const Hq=[0,0];function qq(e,t,n,r){let a=Array.isArray(e)?e:Hq,i=0,s=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,H0[e]?e:"0"]),i=lE(a[0],n,r),s=lE(a[1],t),i-s}const Kq={All:[[0,0],[1,1]]},Gq={x:0,y:0};function Yq(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function Wq(e,t,n){const{offset:r=Kq.All}=n,{target:a=e,axis:i="y"}=n,s=i==="y"?"height":"width",o=a!==e?Vq(a,e):Gq,c=a===e?{width:e.scrollWidth,height:e.scrollHeight}:Yq(a),u={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let d=!t[i].interpolate;const f=r.length;for(let h=0;h<f;h++){const p=qq(r[h],u[s],c[s],o[i]);!d&&p!==t[i].interpolatorOffsets[h]&&(d=!0),t[i].offset[h]=p}d&&(t[i].interpolate=Ej(t[i].offset,r$(r),{clamp:!1}),t[i].interpolatorOffsets=[...t[i].offset]),t[i].progress=pa(0,1,t[i].interpolate(t[i].current))}function Xq(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function Qq(e,t,n,r={}){return{measure:()=>Xq(e,r.target,n),update:a=>{Fq(e,n,a),(r.offset||r.target)&&Wq(e,n,r)},notify:()=>t(n)}}const Su=new WeakMap,cE=new WeakMap,bx=new WeakMap,uE=e=>e===document.documentElement?window:e;function Pj(e,{container:t=document.documentElement,...n}={}){let r=bx.get(t);r||(r=new Set,bx.set(t,r));const a=Bq(),i=Qq(t,e,a,n);if(r.add(i),!Su.has(t)){const o=()=>{for(const h of r)h.measure()},c=()=>{for(const h of r)h.update(Vt.timestamp)},u=()=>{for(const h of r)h.notify()},d=()=>{Le.read(o,!1,!0),Le.read(c,!1,!0),Le.update(u,!1,!0)};Su.set(t,d);const f=uE(t);window.addEventListener("resize",d,{passive:!0}),t!==document.documentElement&&cE.set(t,Iq(t,d)),f.addEventListener("scroll",d,{passive:!0})}const s=Su.get(t);return Le.read(s,!1,!0),()=>{var o;Fr(s);const c=bx.get(t);if(!c||(c.delete(i),c.size))return;const u=Su.get(t);Su.delete(t),u&&(uE(t).removeEventListener("scroll",u),(o=cE.get(t))===null||o===void 0||o(),window.removeEventListener("resize",u))}}function Zq({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},a=Pj(i=>{r.value=i[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:a}}const Sx=new Map;function T$({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Sx.has(t)||Sx.set(t,{});const r=Sx.get(t);return r[n]||(r[n]=v3()?new ScrollTimeline({source:t,axis:n}):Zq({source:t,axis:n})),r[n]}function Jq(e){return e.length===2}function C$(e){return e&&(e.target||e.offset)}function eK(e,t){return Jq(e)||C$(t)?Pj(n=>{e(n[t.axis].progress,n)},t):E$(e,T$(t))}function tK(e,t){if(e.flatten(),C$(t))return e.pause(),Pj(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=T$(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),E$(a=>{r.time=r.duration*a},n))):xn}}function nK(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?eK(e,r):tK(e,r)}function dE(e,t){h9(!!(!t||t.current))}const rK=()=>({scrollX:ra(0),scrollY:ra(0),scrollXProgress:ra(0),scrollYProgress:ra(0)});function aK({container:e,target:t,layoutEffect:n=!0,...r}={}){const a=Yc(rK);return(n?fy:j.useEffect)(()=>(dE("target",t),dE("container",e),nK((s,{x:o,y:c})=>{a.scrollX.set(o.current),a.scrollXProgress.set(o.progress),a.scrollY.set(c.current),a.scrollYProgress.set(c.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),a}function iK(e){const t=Yc(()=>ra(e)),{isStatic:n}=j.useContext(dy);if(n){const[,r]=j.useState(e);j.useEffect(()=>t.on("change",r),[])}return t}function _$(e,t){const n=iK(t()),r=()=>n.set(t());return r(),fy(()=>{const a=()=>Le.preRender(r,!1,!0),i=e.map(s=>s.on("change",a));return()=>{i.forEach(s=>s()),Fr(r)}}),n}const sK=e=>e&&typeof e=="object"&&e.mix,oK=e=>sK(e)?e.mix:void 0;function lK(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],o=Ej(a,i,{mixer:oK(i[0]),...s});return t?o(r):o}function cK(e){ld.current=[],e();const t=_$(ld.current,e);return ld.current=void 0,t}function wx(e,t,n,r){if(typeof e=="function")return cK(e);const a=typeof t=="function"?t:lK(t,n,r);return Array.isArray(e)?fE(e,a):fE([e],([i])=>a(i))}function fE(e,t){const n=Yc(()=>[]);return _$(e,()=>{n.length=0;const r=e.length;for(let a=0;a<r;a++)n[a]=e[a].get();return t(n)})}function li(){!_j.current&&O$();const[e]=j.useState(Tm.current);return e}const ge=e=>typeof e=="string",wu=()=>{let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n},hE=e=>e==null?"":String(e),uK=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},dK=/###/g,pE=e=>e&&e.includes("###")?e.replace(dK,"."):e,mE=e=>!e||ge(e),pd=(e,t,n)=>{const r=ge(t)?t.split("."):t;let a=0;for(;a<r.length-1;){if(mE(e))return{};const i=pE(r[a]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++a}return mE(e)?{}:{obj:e,k:pE(r[a])}},gE=(e,t,n)=>{const{obj:r,k:a}=pd(e,t,Object);if(r!==void 0||t.length===1){r[a]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),o=pd(e,s,Object);for(;o.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),o=pd(e,s,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},fK=(e,t,n,r)=>{const{obj:a,k:i}=pd(e,t,Object);a[i]=a[i]||[],a[i].push(n)},Cm=(e,t)=>{const{obj:n,k:r}=pd(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},hK=(e,t,n)=>{const r=Cm(e,n);return r!==void 0?r:Cm(t,n)},P$=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?ge(e[r])||e[r]instanceof String||ge(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):P$(e[r],t[r],n):e[r]=t[r]);return e},Ea=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),pK={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},mK=e=>ge(e)?e.replace(/[&<>"'\/]/g,t=>pK[t]):e;class gK{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const yK=[" ",",","?","!",";"],vK=new gK(20),xK=(e,t,n)=>{t=t||"",n=n||"";const r=yK.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const a=vK.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!a.test(e);if(!i){const s=e.indexOf(n);s>0&&!a.test(e.substring(0,s))&&(i=!0)}return i},q0=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let a=e;for(let i=0;i<r.length;){if(!a||typeof a!="object")return;let s,o="";for(let c=i;c<r.length;++c)if(c!==i&&(o+=n),o+=r[c],s=a[o],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&c<r.length-1)continue;i+=c-i+1;break}a=s}return a},qd=e=>e==null?void 0:e.replace(/_/g,"-"),bK={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class _m{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||bK,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,a){return a&&!this.debug?null:(t=t.map(i=>ge(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),ge(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new _m(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new _m(this.logger,t)}}var aa=new _m;let vy=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const a=this.observers[r].get(n)||0;this.observers[r].set(n,a+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...a)=>{n(...a),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,i])=>{for(let s=0;s<i;s++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([a,i])=>{for(let s=0;s<i;s++)a(t,...n)})}};class yE extends vy{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,a={}){var u,d;const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.includes(".")?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):ge(r)&&i?o.push(...r.split(i)):o.push(r)));const c=Cm(this.data,o);return!c&&!n&&!r&&t.includes(".")&&(t=o[0],n=o[1],r=o.slice(2).join(".")),c||!s||!ge(r)?c:q0((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[n],r,i)}addResource(t,n,r,a,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(s?r.split(s):r)),t.includes(".")&&(o=t.split("."),a=n,n=o[1]),this.addNamespaces(n),gE(this.data,o,a),i.silent||this.emit("added",t,n,r,a)}addResources(t,n,r,a={silent:!1}){for(const i in r)(ge(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});a.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,a,i,s={silent:!1,skipCopy:!1}){let o=[t,n];t.includes(".")&&(o=t.split("."),a=r,r=n,n=o[1]),this.addNamespaces(n);let c=Cm(this.data,o)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),a?P$(c,r,i):c={...c,...r},gE(this.data,o,c),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var M$={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(i=>{var s;t=((s=this.processors[i])==null?void 0:s.process(t,n,r,a))??t}),t}};const k$=Symbol("i18next/PATH_KEY");function SK(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),a===k$?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Cl(e,t){const{[k$]:n}=e(SK()),r=(t==null?void 0:t.keySeparator)??".",a=(t==null?void 0:t.nsSeparator)??":",i=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&a){const s=t==null?void 0:t.ns,o=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(o&&(i?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${a}${n.slice(1).join(r)}`}return n.join(r)}const jx=e=>!ge(e)&&typeof e!="boolean"&&typeof e!="number";class Pm extends vy{constructor(t,n={}){super(),uK(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=aa.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const a=this.resolve(t,r);if((a==null?void 0:a.res)===void 0)return!1;const i=jx(a.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!xK(t,r,a);if(s&&!o){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:ge(i)?[i]:i};const u=t.split(r);(r!==a||r===a&&this.options.ns.includes(u[0]))&&(i=u.shift()),t=u.join(a)}return{key:t,namespaces:ge(i)?[i]:i}}translate(t,n,r){let a=typeof n=="object"?{...n}:n;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=Cl(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map($=>typeof $=="function"?Cl($,{...this.options,...a}):String($));const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:c}=this.extractFromKey(t[t.length-1],a),u=c[c.length-1];let d=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return h?i?{res:`${u}${d}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:`${u}${d}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:o;const p=this.resolve(t,a);let g=p==null?void 0:p.res;const m=(p==null?void 0:p.usedKey)||o,v=(p==null?void 0:p.exactUsedKey)||o,y=["[object Number]","[object Function]","[object RegExp]"],x=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,w=a.count!==void 0&&!ge(a.count),S=Pm.hasDefaultValue(a),A=w?this.pluralResolver.getSuffix(f,a.count,a):"",O=a.ordinal&&w?this.pluralResolver.getSuffix(f,a.count,{ordinal:!1}):"",N=w&&!a.ordinal&&a.count===0,E=N&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${A}`]||a[`defaultValue${O}`]||a.defaultValue;let T=g;b&&!g&&S&&(T=E);const _=jx(T),C=Object.prototype.toString.apply(T);if(b&&T&&_&&!y.includes(C)&&!(ge(x)&&Array.isArray(T))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,T,{...a,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=$,p.usedParams=this.getUsedParamsDetails(a),p):$}if(s){const $=Array.isArray(T),R=$?[]:{},k=$?v:m;for(const M in T)if(Object.prototype.hasOwnProperty.call(T,M)){const L=`${k}${s}${M}`;S&&!g?R[M]=this.translate(L,{...a,defaultValue:jx(E)?E[M]:void 0,joinArrays:!1,ns:c}):R[M]=this.translate(L,{...a,joinArrays:!1,ns:c}),R[M]===L&&(R[M]=T[M])}g=R}}else if(b&&ge(x)&&Array.isArray(g))g=g.join(x),g&&(g=this.extendTranslation(g,t,a,r));else{let $=!1,R=!1;!this.isValidLookup(g)&&S&&($=!0,g=E),this.isValidLookup(g)||(R=!0,g=o);const M=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:g,L=S&&E!==g&&this.options.updateMissing;if(R||$||L){if(this.logger.log(L?"updateKey":"missingKey",f,u,w&&!L?`${o}${this.pluralResolver.getSuffix(f,a.count,a)}`:o,L?E:g),s){const U=this.resolve(o,{...a,keySeparator:!1});U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let z=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let U=0;U<V.length;U++)z.push(V[U]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(a.lng||this.language):z.push(a.lng||this.language);const K=(U,G,ne)=>{var ve;const J=S&&ne!==g?ne:M;this.options.missingKeyHandler?this.options.missingKeyHandler(U,u,G,J,L,a):(ve=this.backendConnector)!=null&&ve.saveMissing&&this.backendConnector.saveMissing(U,u,G,J,L,a),this.emit("missingKey",U,u,G,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?z.forEach(U=>{const G=this.pluralResolver.getSuffixes(U,a);N&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!G.includes(`${this.options.pluralSeparator}zero`)&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(ne=>{K([U],o+ne,a[`defaultValue${ne}`]||E)})}):K(z,o,E))}g=this.extendTranslation(g,t,a,p,r),R&&g===o&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${o}`),(R||$)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${o}`:o,$?g:void 0,a))}return i?(p.res=g,p.usedParams=this.getUsedParamsDetails(a),p):g}extendTranslation(t,n,r,a,i){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=ge(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const p=t.match(this.interpolator.nestingRegexp);f=p&&p.length}let h=r.replace&&!ge(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||a.usedLng,r),d){const p=t.match(this.interpolator.nestingRegexp),g=p&&p.length;f<g&&(r.nest=!1)}!r.lng&&a&&a.res&&(r.lng=this.language||a.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...p)=>(i==null?void 0:i[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,o=ge(s)?[s]:s;return t!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(t=M$.handle(o,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,a,i,s,o;return ge(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(c=>typeof c=="function"?Cl(c,{...this.options,...n}):c)),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;a=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!ge(n.count),p=h&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(ge(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{var y,x;this.isValidLookup(r)||(o=v,!this.checkedLoadedFor[`${m[0]}-${v}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${m[0]}-${v}`]=!0,this.logger.warn(`key "${a}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(b=>{var A;if(this.isValidLookup(r))return;s=b;const w=[d];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,b,v,n);else{let O;h&&(O=this.pluralResolver.getSuffix(b,n.count,n));const N=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&O.startsWith(E)&&w.push(d+O.replace(E,this.options.pluralSeparator)),w.push(d+O),p&&w.push(d+N)),g){const T=`${d}${this.options.contextSeparator||"_"}${n.context}`;w.push(T),h&&(n.ordinal&&O.startsWith(E)&&w.push(T+O.replace(E,this.options.pluralSeparator)),w.push(T+O),p&&w.push(T+N))}}let S;for(;S=w.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(b,v,S,n))}))})}),{res:r,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,a={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ge(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const i of n)delete a[i]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class vE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=aa.create("languageUtils")}getScriptPartFromCode(t){if(t=qd(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=qd(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ge(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getScriptPartFromCode(r);if(this.isSupportedCode(a))return n=a;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ge(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),a=[],i=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return ge(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):ge(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{a.includes(s)||i(this.formatLanguageCode(s))}),a}}const xE={zero:0,one:1,two:2,few:3,many:4,other:5},bE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class wK{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=aa.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=qd(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),bE;if(!t.match(/-|_/))return bE;const c=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(c,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,i)=>xE[a]-xE[i]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n,r={}){const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const SE=(e,t,n,r=".",a=!0)=>{let i=hK(e,t,n);return!i&&a&&ge(n)&&(i=q0(e,n,r),i===void 0&&(i=q0(t,n,r))),i},Ax=e=>e.replace(/\$/g,"$$$$");class wE{constructor(t={}){var n;this.logger=aa.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:mK,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=i?Ea(i):s||"{{",this.suffix=o?Ea(o):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f?Ea(f):"-",this.unescapeSuffix=this.unescapePrefix?"":d?Ea(d):"",this.nestingPrefix=h?Ea(h):p||Ea("$t("),this.nestingSuffix=g?Ea(g):m||Ea(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var p;let i,s,o;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(!g.includes(this.formatSeparator)){const x=SE(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...a,...n,interpolationkey:g}):x}const m=g.split(this.formatSeparator),v=m.shift().trim(),y=m.join(this.formatSeparator).trim();return this.format(SE(n,c,v,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...a,...n,interpolationkey:v})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Ax(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Ax(this.escape(g)):Ax(g)}].forEach(g=>{for(o=0;i=g.regex.exec(t);){const m=i[1].trim();if(s=u(m),s===void 0)if(typeof d=="function"){const y=d(t,i,a);s=ge(y)?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,m))s="";else if(f){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),s="";else!ge(s)&&!this.useRawValueToEscape&&(s=hE(s));const v=g.safeValue(s);if(t=t.replace(i[0],v),f?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n,r={}){let a,i,s;const o=(c,u)=>{const d=this.nestingOptionsSeparator;if(!c.includes(d))return c;const f=c.split(new RegExp(`${Ea(d)}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,s);const p=h.match(/'/g),g=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),u&&(s={...u,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,m),`${c}${d}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,c};for(;a=this.nestingRegexp.exec(t);){let c=[];s={...r},s=s.replace&&!ge(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const u=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(u!==-1&&(c=a[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),a[1]=a[1].slice(0,u)),i=n(o.call(this,a[1].trim(),s),s),i&&a[0]===t&&!ge(i))return i;ge(i)||(i=hE(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),i=""),c.length&&(i=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:a[1].trim()}),i.trim())),t=t.replace(a[0],i),this.regexp.lastIndex=0}return t}}const jK=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].slice(0,-1);t==="currency"&&!a.includes(":")?n.currency||(n.currency=a.trim()):t==="relativetime"&&!a.includes(":")?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[o,...c]=s.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=o.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},jE=e=>{const t={};return(n,r,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=r+JSON.stringify(i);let o=t[s];return o||(o=e(qd(r),a),t[s]=o),o(n)}},AK=e=>(t,n,r)=>e(qd(n),r)(t);class OK{constructor(t={}){this.logger=aa.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?jE:AK;this.formats={number:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i});return o=>s.format(o)}),currency:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i,style:"currency"});return o=>s.format(o)}),datetime:r((a,i)=>{const s=new Intl.DateTimeFormat(a,{...i});return o=>s.format(o)}),relativetime:r((a,i)=>{const s=new Intl.RelativeTimeFormat(a,{...i});return o=>s.format(o,i.range||"day")}),list:r((a,i)=>{const s=new Intl.ListFormat(a,{...i});return o=>s.format(o)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=jE(n)}format(t,n,r,a={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(o=>o.includes(")"))){const o=i.findIndex(c=>c.includes(")"));i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,c)=>{var f;const{formatName:u,formatOptions:d}=jK(c);if(this.formats[u]){let h=o;try{const p=((f=a==null?void 0:a.formatParams)==null?void 0:f[a.interpolationkey])||{},g=p.locale||p.lng||a.locale||a.lng||r;h=this.formats[u](o,g,{...d,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${u}`);return o},t)}}const NK=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class EK extends vy{constructor(t,n,r,a={}){var i,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=aa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(i=this.backend)==null?void 0:i.init)==null||s.call(i,r,a.backend,a)}queueLoad(t,n,r,a){const i={},s={},o={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,d=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(o[u]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const a=t.split("|"),i=a[0],s=a[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(c=>{fK(c.loaded,[i],s),NK(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{o[u]||(o[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r,a=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:i,callback:s});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&a<this.maxRetries){setTimeout(()=>{this.read(t,n,r,a+1,i*2,s)},i);return}s(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return c(t,n,o)}prepareLoading(t,n,r={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();ge(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ge(n)&&(n=[n]);const i=this.queueLoad(t,n,r,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),a=r[0],i=r[1];this.read(a,i,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${a}`,o),this.loaded(t,s,o)})}saveMissing(t,n,r,a,i,s={},o=()=>{}){var c,u,d,f,h;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const p={...s,isUpdate:i},g=this.backend.create.bind(this.backend);if(g.length<6)try{let m;g.length===5?m=g(t,n,r,a,p):m=g(t,n,r,a),m&&typeof m.then=="function"?m.then(v=>o(null,v)).catch(o):o(null,m)}catch(m){o(m)}else g(t,n,r,a,o,p)}!t||!t[0]||this.store.addResource(t[0],n,r,a)}}}const Ox=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ge(e[1])&&(t.defaultValue=e[1]),ge(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),AE=e=>(ge(e.ns)&&(e.ns=[e.ns]),ge(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ge(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Hh=()=>{},TK=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class md extends vy{constructor(t={},n){if(super(),this.options=AE(t),this.services={},this.logger=aa,this.modules={external:[]},TK(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(ge(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=Ox();this.options={...r,...this.options,...AE(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const a=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?aa.init(a(this.modules.logger),this.options):aa.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=OK;const d=new vE(this.options);this.store=new yE(this.options.resources,this.options);const f=this.services;f.logger=aa,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new wK(d,{prepend:this.options.pluralSeparator}),u&&(f.formatter=a(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new wE(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new EK(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Pm(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Hh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const o=wu(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(f),n(d,f)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),o}loadResources(t,n=Hh){var i,s;let r=n;const a=ge(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&(o.includes(f)||o.push(f))})};a?c(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(s=(i=this.options.preload)==null?void 0:i.forEach)==null||s.call(i,u=>c(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const a=wu();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Hh),this.services.backendConnector.reload(t,n,i=>{a.resolve(),r(i)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&M$.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=wu();this.emit("languageChanging",t);const a=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,c)=>{c?this.isLanguageChangingTo===t&&(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(o,(...u)=>this.t(...u))},s=o=>{var d,f;!t&&!o&&this.services.languageDetector&&(o=[]);const c=ge(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(ge(o)?[o]:o);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,u)),this.loadResources(u,h=>{i(h,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,a){const i=a==null?void 0:a.scopeNs,s=(o,c,...u)=>{let d;typeof c!="object"?d=this.options.overloadTranslationOptionHandler([o,c].concat(u)):d={...c},d.lng=d.lng||s.lng,d.lngs=d.lngs||s.lngs;const f=d.ns!==void 0&&d.ns!==null;d.ns=d.ns||s.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||s.keyPrefix);const h={...this.options,...d};Array.isArray(i)&&!f&&(h.ns=i),typeof d.keyPrefix=="function"&&(d.keyPrefix=Cl(d.keyPrefix,h));const p=this.options.keySeparator||".";let g;return d.keyPrefix&&Array.isArray(o)?g=o.map(m=>(typeof m=="function"&&(m=Cl(m,h)),`${d.keyPrefix}${p}${m}`)):(typeof o=="function"&&(o=Cl(o,h)),g=d.keyPrefix?`${d.keyPrefix}${p}${o}`:o),this.t(g,d)};return ge(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(o,c)=>{const u=this.services.backendConnector.state[`${o}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!a||s(i,t)))}loadNamespaces(t,n){const r=wu();return this.options.ns?(ge(t)&&(t=[t]),t.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=wu();ge(t)&&(t=[t]);const a=this.options.preload||[],i=t.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var a,i;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const o=s.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new vE(Ox());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new md(t,n);return r.createInstance=md.createInstance,r}cloneInstance(t={},n=Hh){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},i=new md(a);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const o=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,f)=>(d[f]={...c[u][f]},d),c[u]),c),{});i.store=new yE(o,a),i.services.resourceStore=i.store}if(t.interpolation){const c={...Ox().interpolation,...this.options.interpolation,...t.interpolation},u={...a,interpolation:c};i.services.interpolator=new wE(u)}return i.translator=new Pm(i.services,a),i.translator.on("*",(o,...c)=>{i.emit(o,...c)}),i.init(a,n),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const on=md.createInstance();on.createInstance;on.dir;on.init;on.loadResources;on.reloadResources;on.use;on.changeLanguage;on.getFixedT;on.t;on.exists;on.setDefaultNamespace;on.hasLoadedNamespace;on.loadNamespaces;on.loadLanguages;const CK=(e,t,n,r)=>{var i,s,o,c;const a=[n,{code:t,...r||{}}];if((s=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&s.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ho(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(c=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&c.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},OE={},K0=(e,t,n,r)=>{ho(n)&&OE[n]||(ho(n)&&(OE[n]=new Date),CK(e,t,n,r))},R$=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},G0=(e,t,n)=>{e.loadNamespaces(t,R$(e,n))},NE=(e,t,n,r)=>{if(ho(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return G0(e,n,r);n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,R$(e,r))},_K=(e,t,n={})=>!t.languages||!t.languages.length?(K0(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!a(r.isLanguageChangingTo,e))return!1}}),ho=e=>typeof e=="string",PK=e=>typeof e=="object"&&e!==null,MK=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,kK={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},RK=e=>kK[e],DK=e=>e.replace(MK,RK);let Y0={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:DK,transDefaultProps:void 0};const $K=(e={})=>{Y0={...Y0,...e}},LK=()=>Y0;let D$;const IK=e=>{D$=e},zK=()=>D$,BK={type:"3rdParty",init(e){$K(e.options.react),IK(e)}},UK=j.createContext();class FK{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var $$={exports:{}},L$={};/**
 * @license React
 * use-sync-external-store-shim.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 sc=j;function VK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var HK=typeof Object.is=="function"?Object.is:VK,qK=sc.useState,KK=sc.useEffect,GK=sc.useLayoutEffect,YK=sc.useDebugValue;function WK(e,t){var n=t(),r=qK({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return GK(function(){a.value=n,a.getSnapshot=t,Nx(a)&&i({inst:a})},[e,n,t]),KK(function(){return Nx(a)&&i({inst:a}),e(function(){Nx(a)&&i({inst:a})})},[e]),YK(n),n}function Nx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!HK(e,n)}catch{return!0}}function XK(e,t){return t()}var QK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?XK:WK;L$.useSyncExternalStore=sc.useSyncExternalStore!==void 0?sc.useSyncExternalStore:QK;$$.exports=L$;var ZK=$$.exports;const JK=(e,t)=>{if(ho(t))return t;if(PK(t)&&ho(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},eG={t:JK,ready:!1},tG=()=>()=>{},ci=(e,t={})=>{var E,T,_;const{i18n:n}=t,{i18n:r,defaultNS:a}=j.useContext(UK)||{},i=n||r||zK();i&&!i.reportNamespaces&&(i.reportNamespaces=new FK),i||K0(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=j.useMemo(()=>{var C;return{...LK(),...(C=i==null?void 0:i.options)==null?void 0:C.react,...t}},[i,t]),{useSuspense:o,keyPrefix:c}=s,u=a||((E=i==null?void 0:i.options)==null?void 0:E.defaultNS),d=ho(u)?[u]:u||["translation"],f=j.useMemo(()=>d,d);(_=(T=i==null?void 0:i.reportNamespaces)==null?void 0:T.addUsedNamespaces)==null||_.call(T,f);const h=j.useRef(0),p=j.useCallback(C=>{if(!i)return tG;const{bindI18n:$,bindI18nStore:R}=s,k=()=>{h.current+=1,C()};return $&&i.on($,k),R&&i.store.on(R,k),()=>{$&&$.split(" ").forEach(M=>i.off(M,k)),R&&R.split(" ").forEach(M=>i.store.off(M,k))}},[i,s]),g=j.useRef(),m=j.useCallback(()=>{if(!i)return eG;const C=!!(i.isInitialized||i.initializedStoreOnce)&&f.every(z=>_K(z,i,s)),$=t.lng||i.language,R=h.current,k=g.current;if(k&&k.ready===C&&k.lng===$&&k.keyPrefix===c&&k.revision===R)return k;const L={t:i.getFixedT($,s.nsMode==="fallback"?f:f[0],c,{scopeNs:f}),ready:C,lng:$,keyPrefix:c,revision:R};return g.current=L,L},[i,f,c,s,t.lng]),[v,y]=j.useState(0),{t:x,ready:b}=ZK.useSyncExternalStore(p,m,m);j.useEffect(()=>{if(i&&!b&&!o){const C=()=>y($=>$+1);t.lng?NE(i,t.lng,f,C):G0(i,f,C)}},[i,t.lng,f,b,o,v]);const w=i||{},S=j.useRef(null),A=j.useRef(),O=C=>{const $=Object.getOwnPropertyDescriptors(C);$.__original&&delete $.__original;const R=Object.create(Object.getPrototypeOf(C),$);if(!Object.prototype.hasOwnProperty.call(R,"__original"))try{Object.defineProperty(R,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return R},N=j.useMemo(()=>{const C=w,$=C==null?void 0:C.language;let R=C;C&&(S.current&&S.current.__original===C?A.current!==$?(R=O(C),S.current=R,A.current=$):R=S.current:(R=O(C),S.current=R,A.current=$));const k=!b&&!o?(...L)=>(K0(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),x(...L)):x,M=[k,R,b];return M.t=k,M.i18n=R,M.ready=b,M},[x,w,b,w.resolvedLanguage,w.language,w.languages]);if(i&&o&&!b)throw new Promise(C=>{const $=()=>C();t.lng?NE(i,t.lng,f,$):G0(i,f,$)});return N};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nG=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),I$=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var rG={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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aG=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},c)=>j.createElement("svg",{ref:c,...rG,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:I$("lucide",a),...o},[...s.map(([u,d])=>j.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W=(e,t)=>{const n=j.forwardRef(({className:r,...a},i)=>j.createElement(aG,{ref:i,iconNode:t,className:I$(`lucide-${nG(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z$=W("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rs=W("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iG=W("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mj=W("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B$=W("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sG=W("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U$=W("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F$=W("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V$=W("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cG=W("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qu=W("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.400.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$=W("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uG=W("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dG=W("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q$=W("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K$=W("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G$=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mm=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const EE=W("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kd=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y$=W("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W$=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hG=W("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pG=W("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X$=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gt=W("Flower2",[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q$=W("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
 * @license lucide-react v0.400.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=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gG=W("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yG=W("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gd=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z$=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vG=W("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xG=W("KeySquare",[["path",{d:"M12.4 2.7c.9-.9 2.5-.9 3.4 0l5.5 5.5c.9.9.9 2.5 0 3.4l-3.7 3.7c-.9.9-2.5.9-3.4 0L8.7 9.8c-.9-.9-.9-2.5 0-3.4Z",key:"9li5bk"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M9.4 10.6 2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4",key:"1ym3zm"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kj=W("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J$=W("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W0=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e5=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const SG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const km=W("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yd=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jG=W("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AG=W("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t5=W("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const NG=W("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n5=W("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TE=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const EG=W("PieChart",[["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}],["path",{d:"M22 12A10 10 0 0 0 12 2v10z",key:"1rfc4y"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TG=W("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CG=W("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _G=W("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oc=W("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PG=W("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
 * @license lucide-react v0.400.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=W("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X0=W("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xy=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const by=W("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kG=W("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.400.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=W("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nh=W("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RG=W("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a5=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qc=W("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rj=W("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dj=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DG=W("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _l=W("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rn=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ri=W("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
 * @license lucide-react v0.400.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=W("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $G=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LG=W("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IG=W("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zG=W("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q0=W("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BG=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rm=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ah=W("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
 * @license lucide-react v0.400.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=W("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const s5=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const o5=W("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.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const UG=W("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
 * @license lucide-react v0.400.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=W("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function c5(e,t){return function(){return e.apply(t,arguments)}}const{toString:FG}=Object.prototype,{getPrototypeOf:Sy}=Object,{iterator:wy,toStringTag:u5}=Symbol,jy=(e=>t=>{const n=FG.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qr=e=>(e=e.toLowerCase(),t=>jy(t)===e),Ay=e=>t=>typeof t===e,{isArray:po}=Array,lc=Ay("undefined");function Zc(e){return e!==null&&!lc(e)&&e.constructor!==null&&!lc(e.constructor)&&Mn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d5=qr("ArrayBuffer");function VG(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&d5(e.buffer),t}const HG=Ay("string"),Mn=Ay("function"),f5=Ay("number"),ih=e=>e!==null&&typeof e=="object",qG=e=>e===!0||e===!1,$p=e=>{if(jy(e)!=="object")return!1;const t=Sy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(u5 in e)&&!(wy in e)},KG=e=>{if(!ih(e)||Zc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},GG=qr("Date"),YG=qr("File"),WG=e=>!!(e&&typeof e.uri<"u"),XG=e=>e&&typeof e.getParts<"u",QG=qr("Blob"),ZG=qr("FileList"),JG=e=>ih(e)&&Mn(e.pipe);function eY(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const CE=eY(),_E=typeof CE.FormData<"u"?CE.FormData:void 0,tY=e=>{if(!e)return!1;if(_E&&e instanceof _E)return!0;const t=Sy(e);if(!t||t===Object.prototype||!Mn(e.append))return!1;const n=jy(e);return n==="formdata"||n==="object"&&Mn(e.toString)&&e.toString()==="[object FormData]"},nY=qr("URLSearchParams"),[rY,aY,iY,sY]=["ReadableStream","Request","Response","Headers"].map(qr),oY=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sh(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),po(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Zc(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let o;for(r=0;r<s;r++)o=i[r],t.call(null,e[o],o,e)}}function h5(e,t){if(Zc(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,p5=e=>!lc(e)&&e!==Ds;function Z0(...e){const{caseless:t,skipUndefined:n}=p5(this)&&this||{},r={},a=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&typeof s=="string"&&h5(r,s)||s,c=J0(r,o)?r[o]:void 0;$p(c)&&$p(i)?r[o]=Z0(c,i):$p(i)?r[o]=Z0({},i):po(i)?r[o]=i.slice():(!n||!lc(i))&&(r[o]=i)};for(let i=0,s=e.length;i<s;i++){const o=e[i];if(!o||Zc(o)||(sh(o,a),typeof o!="object"||po(o)))continue;const c=Object.getOwnPropertySymbols(o);for(let u=0;u<c.length;u++){const d=c[u];xY.call(o,d)&&a(o[d],d)}}return r}const lY=(e,t,n,{allOwnKeys:r}={})=>(sh(t,(a,i)=>{n&&Mn(a)?Object.defineProperty(e,i,{__proto__:null,value:c5(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),cY=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),uY=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},dY=(e,t,n,r)=>{let a,i,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&Sy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fY=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},hY=e=>{if(!e)return null;if(po(e))return e;let t=e.length;if(!f5(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},pY=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Sy(Uint8Array)),mY=(e,t)=>{const r=(e&&e[wy]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},gY=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},yY=qr("HTMLFormElement"),vY=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),J0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:xY}=Object.prototype,bY=qr("RegExp"),m5=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};sh(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(r[i]=s||a)}),Object.defineProperties(e,r)},SY=e=>{m5(e,(t,n)=>{if(Mn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Mn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wY=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return po(e)?r(e):r(String(e).split(t)),n},jY=()=>{},AY=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function OY(e){return!!(e&&Mn(e.append)&&e[u5]==="FormData"&&e[wy])}const NY=e=>{const t=new WeakSet,n=r=>{if(ih(r)){if(t.has(r))return;if(Zc(r))return r;if(!("toJSON"in r)){t.add(r);const a=po(r)?[]:{};return sh(r,(i,s)=>{const o=n(i);!lc(o)&&(a[s]=o)}),t.delete(r),a}}return r};return n(e)},EY=qr("AsyncFunction"),TY=e=>e&&(ih(e)||Mn(e))&&Mn(e.then)&&Mn(e.catch),g5=((e,t)=>e?setImmediate:t?((n,r)=>(Ds.addEventListener("message",({source:a,data:i})=>{a===Ds&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ds.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Mn(Ds.postMessage)),CY=typeof queueMicrotask<"u"?queueMicrotask.bind(Ds):typeof process<"u"&&process.nextTick||g5,_Y=e=>e!=null&&Mn(e[wy]),I={isArray:po,isArrayBuffer:d5,isBuffer:Zc,isFormData:tY,isArrayBufferView:VG,isString:HG,isNumber:f5,isBoolean:qG,isObject:ih,isPlainObject:$p,isEmptyObject:KG,isReadableStream:rY,isRequest:aY,isResponse:iY,isHeaders:sY,isUndefined:lc,isDate:GG,isFile:YG,isReactNativeBlob:WG,isReactNative:XG,isBlob:QG,isRegExp:bY,isFunction:Mn,isStream:JG,isURLSearchParams:nY,isTypedArray:pY,isFileList:ZG,forEach:sh,merge:Z0,extend:lY,trim:oY,stripBOM:cY,inherits:uY,toFlatObject:dY,kindOf:jy,kindOfTest:qr,endsWith:fY,toArray:hY,forEachEntry:mY,matchAll:gY,isHTMLForm:yY,hasOwnProperty:J0,hasOwnProp:J0,reduceDescriptors:m5,freezeMethods:SY,toObjectSet:wY,toCamelCase:vY,noop:jY,toFiniteNumber:AY,findKey:h5,global:Ds,isContextDefined:p5,isSpecCompliantForm:OY,toJSONObject:NY,isAsyncFn:EY,isThenable:TY,setImmediate:g5,asap:CY,isIterable:_Y},PY=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MY=e=>{const t={};let n,r,a;return e&&e.split(`
`).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),r=s.substring(a+1).trim(),!(!n||t[n]&&PY[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function kY(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const RY=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),DY=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function $j(e,t){return I.isArray(e)?e.map(n=>$j(n,t)):kY(String(e).replace(t,""))}const $Y=e=>$j(e,RY),LY=e=>$j(e,DY);function y5(e){const t=Object.create(null);return I.forEach(e.toJSON(),(n,r)=>{t[r]=LY(n)}),t}const PE=Symbol("internals");function ju(e){return e&&String(e).trim().toLowerCase()}function Lp(e){return e===!1||e==null?e:I.isArray(e)?e.map(Lp):$Y(String(e))}function IY(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const zY=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ex(e,t,n,r,a){if(I.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!I.isString(t)){if(I.isString(r))return t.indexOf(r)!==-1;if(I.isRegExp(r))return r.test(t)}}function BY(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function UY(e,t){const n=I.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,s){return this[r].call(this,t,a,i,s)},configurable:!0})})}let bn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,c,u){const d=ju(c);if(!d)return;const f=I.findKey(a,d);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||c]=Lp(o))}const s=(o,c)=>I.forEach(o,(u,d)=>i(u,d,c));if(I.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(I.isString(t)&&(t=t.trim())&&!zY(t))s(MY(t),n);else if(I.isObject(t)&&I.isIterable(t)){let o={},c,u;for(const d of t){if(!I.isArray(d))throw new TypeError("Object iterator must return a key-value pair");o[u=d[0]]=(c=o[u])?I.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}s(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ju(t),t){const r=I.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return IY(a);if(I.isFunction(n))return n.call(this,a,r);if(I.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ju(t),t){const r=I.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ex(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(s){if(s=ju(s),s){const o=I.findKey(r,s);o&&(!n||Ex(r,r[o],o,n))&&(delete r[o],a=!0)}}return I.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||Ex(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return I.forEach(this,(a,i)=>{const s=I.findKey(r,i);if(s){n[s]=Lp(a),delete n[i];return}const o=t?BY(i):String(i).trim();o!==i&&delete n[i],n[o]=Lp(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return I.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&I.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[PE]=this[PE]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=ju(s);r[o]||(UY(a,s),r[o]=!0)}return I.isArray(t)?t.forEach(i):i(t),this}};bn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(bn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});I.freezeMethods(bn);const FY="[REDACTED ****]";function VY(e){if(I.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(I.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function HY(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||I.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof bn&&(i=i.toJSON()),r.push(i);let s;if(I.isArray(i))s=[],i.forEach((o,c)=>{const u=a(o);I.isUndefined(u)||(s[c]=u)});else{if(!I.isPlainObject(i)&&VY(i))return r.pop(),i;s=Object.create(null);for(const[o,c]of Object.entries(i)){const u=n.has(o.toLowerCase())?FY:a(c);I.isUndefined(u)||(s[o]=u)}}return r.pop(),s};return a(e)}let ae=class v5 extends Error{static from(t,n,r,a,i,s){const o=new v5(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),s&&Object.assign(o,s),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&I.hasOwnProp(t,"redact")?t.redact:void 0,r=I.isArray(n)&&n.length>0?HY(t,n):I.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};ae.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ae.ERR_BAD_OPTION="ERR_BAD_OPTION";ae.ECONNABORTED="ECONNABORTED";ae.ETIMEDOUT="ETIMEDOUT";ae.ECONNREFUSED="ECONNREFUSED";ae.ERR_NETWORK="ERR_NETWORK";ae.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ae.ERR_DEPRECATED="ERR_DEPRECATED";ae.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ae.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ae.ERR_CANCELED="ERR_CANCELED";ae.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ae.ERR_INVALID_URL="ERR_INVALID_URL";ae.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const qY=null;function e1(e){return I.isPlainObject(e)||I.isArray(e)}function x5(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function Tx(e,t,n){return e?e.concat(t).map(function(a,i){return a=x5(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function KY(e){return I.isArray(e)&&!e.some(e1)}const GY=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function Oy(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!I.isUndefined(y[v])});const r=n.metaTokens,a=n.visitor||f,i=n.dots,s=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,u=o&&I.isSpecCompliantForm(t);if(!I.isFunction(a))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(I.isDate(m))return m.toISOString();if(I.isBoolean(m))return m.toString();if(!u&&I.isBlob(m))throw new ae("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(m)||I.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,v,y){let x=m;if(I.isReactNative(t)&&I.isReactNativeBlob(m))return t.append(Tx(y,v,i),d(m)),!1;if(m&&!y&&typeof m=="object"){if(I.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(I.isArray(m)&&KY(m)||(I.isFileList(m)||I.endsWith(v,"[]"))&&(x=I.toArray(m)))return v=x5(v),x.forEach(function(w,S){!(I.isUndefined(w)||w===null)&&t.append(s===!0?Tx([v],S,i):s===null?v:v+"[]",d(w))}),!1}return e1(m)?!0:(t.append(Tx(y,v,i),d(m)),!1)}const h=[],p=Object.assign(GY,{defaultVisitor:f,convertValue:d,isVisitable:e1});function g(m,v,y=0){if(!I.isUndefined(m)){if(y>c)throw new ae("Object is too deeply nested ("+y+" levels). Max depth: "+c,ae.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(m)!==-1)throw new Error("Circular reference detected in "+v.join("."));h.push(m),I.forEach(m,function(b,w){(!(I.isUndefined(b)||b===null)&&a.call(t,b,I.isString(w)?w.trim():w,v,p))===!0&&g(b,v?v.concat(w):[w],y+1)}),h.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return g(e),t}function ME(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Lj(e,t){this._pairs=[],e&&Oy(e,this,t)}const b5=Lj.prototype;b5.append=function(t,n){this._pairs.push([t,n])};b5.toString=function(t){const n=t?function(r){return t.call(this,r,ME)}:ME;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function YY(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function S5(e,t,n){if(!t)return e;const r=n&&n.encode||YY,a=I.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let s;if(i?s=i(t,a):s=I.isURLSearchParams(t)?t.toString():new Lj(t,a).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class kE{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ij={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},WY=typeof URLSearchParams<"u"?URLSearchParams:Lj,XY=typeof FormData<"u"?FormData:null,QY=typeof Blob<"u"?Blob:null,ZY={isBrowser:!0,classes:{URLSearchParams:WY,FormData:XY,Blob:QY},protocols:["http","https","file","blob","url","data"]},zj=typeof window<"u"&&typeof document<"u",t1=typeof navigator=="object"&&navigator||void 0,JY=zj&&(!t1||["ReactNative","NativeScript","NS"].indexOf(t1.product)<0),eW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tW=zj&&window.location.href||"http://localhost",nW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zj,hasStandardBrowserEnv:JY,hasStandardBrowserWebWorkerEnv:eW,navigator:t1,origin:tW},Symbol.toStringTag,{value:"Module"})),rn={...nW,...ZY};function rW(e,t){return Oy(e,new rn.classes.URLSearchParams,{visitor:function(n,r,a,i){return rn.isNode&&I.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function aW(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function iW(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r<a;r++)i=n[r],t[i]=e[i];return t}function w5(e){function t(n,r,a,i){let s=n[i++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),c=i>=n.length;return s=!s&&I.isArray(a)?a.length:s,c?(I.hasOwnProp(a,s)?a[s]=I.isArray(a[s])?a[s].concat(r):[a[s],r]:a[s]=r,!o):((!I.hasOwnProp(a,s)||!I.isObject(a[s]))&&(a[s]=[]),t(n,r,a[s],i)&&I.isArray(a[s])&&(a[s]=iW(a[s])),!o)}if(I.isFormData(e)&&I.isFunction(e.entries)){const n={};return I.forEachEntry(e,(r,a)=>{t(aW(r),a,n,0)}),n}return null}const Fo=(e,t)=>e!=null&&I.hasOwnProp(e,t)?e[t]:void 0;function sW(e,t,n){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const oh={transitional:Ij,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=I.isObject(t);if(i&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return a?JSON.stringify(w5(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const c=Fo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return rW(t,c).toString();if((o=I.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Fo(this,"env"),d=u&&u.FormData;return Oy(o?{"files[]":t}:t,d&&new d,c)}}return i||a?(n.setContentType("application/json",!1),sW(t)):t}],transformResponse:[function(t){const n=Fo(this,"transitional")||oh.transitional,r=n&&n.forcedJSONParsing,a=Fo(this,"responseType"),i=a==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Fo(this,"parseReviver"))}catch(c){if(o)throw c.name==="SyntaxError"?ae.from(c,ae.ERR_BAD_RESPONSE,this,null,Fo(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch","query"],e=>{oh.headers[e]={}});function Cx(e,t){const n=this||oh,r=t||n,a=bn.from(r.headers);let i=r.data;return I.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function j5(e){return!!(e&&e.__CANCEL__)}let lh=class extends ae{constructor(t,n,r){super(t??"canceled",ae.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function A5(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ae("Request failed with status code "+n.status,n.status>=400&&n.status<500?ae.ERR_BAD_REQUEST:ae.ERR_BAD_RESPONSE,n.config,n.request,n))}function oW(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function lW(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[i];s||(s=u),n[a]=c,r[a]=u;let f=i,h=0;for(;f!==a;)h+=n[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-s<t)return;const p=d&&u-d;return p?Math.round(h*1e3/p):void 0}}function cW(e,t){let n=0,r=1e3/t,a,i;const s=(u,d=Date.now())=>{n=d,a=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?s(u,d):(a=u,i||(i=setTimeout(()=>{i=null,s(a)},r-f)))},()=>a&&s(a)]}const Dm=(e,t,n=3)=>{let r=0;const a=lW(50,250);return cW(i=>{if(!i||typeof i.loaded!="number")return;const s=i.loaded,o=i.lengthComputable?i.total:void 0,c=o!=null?Math.min(s,o):s,u=Math.max(0,c-r),d=a(u);r=Math.max(r,c);const f={loaded:c,total:o,progress:o?c/o:void 0,bytes:u,rate:d||void 0,estimated:d&&o?(o-c)/d:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(f)},n)},RE=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},DE=e=>(...t)=>I.asap(()=>e(...t)),uW=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,dW=rn.hasStandardBrowserEnv?{write(e,t,n,r,a,i,s){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];I.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),I.isString(r)&&o.push(`path=${r}`),I.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),I.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),a=r.indexOf("=");if(a!==-1&&r.slice(0,a)===e)return decodeURIComponent(r.slice(a+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function fW(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hW(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function O5(e,t,n){let r=!fW(t);return e&&(r||n===!1)?hW(e,t):t}const $E=e=>e instanceof bn?{...e}:e;function mo(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,d,f,h){return I.isPlainObject(u)&&I.isPlainObject(d)?I.merge.call({caseless:h},u,d):I.isPlainObject(d)?I.merge({},d):I.isArray(d)?d.slice():d}function a(u,d,f,h){if(I.isUndefined(d)){if(!I.isUndefined(u))return r(void 0,u,f,h)}else return r(u,d,f,h)}function i(u,d){if(!I.isUndefined(d))return r(void 0,d)}function s(u,d){if(I.isUndefined(d)){if(!I.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function o(u,d,f){if(I.hasOwnProp(t,f))return r(u,d);if(I.hasOwnProp(e,f))return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:o,headers:(u,d,f)=>a($E(u),$E(d),f,!0)};return I.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=I.hasOwnProp(c,d)?c[d]:a,h=I.hasOwnProp(e,d)?e[d]:void 0,p=I.hasOwnProp(t,d)?t[d]:void 0,g=f(h,p,d);I.isUndefined(g)&&f!==o||(n[d]=g)}),n}const pW=["content-type","content-length"];function mW(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{pW.includes(r.toLowerCase())&&e.set(r,a)})}const gW=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function N5(e){const t=mo({},e),n=h=>I.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let o=n("headers");const c=n("auth"),u=n("baseURL"),d=n("allowAbsoluteUrls"),f=n("url");if(t.headers=o=bn.from(o),t.url=S5(O5(u,f,d),n("params"),n("paramsSerializer")),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?gW(c.password):""))),I.isFormData(r)&&(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv||I.isReactNative(r)?o.setContentType(void 0):I.isFunction(r.getHeaders)&&mW(o,r.getHeaders(),n("formDataHeaderPolicy"))),rn.hasStandardBrowserEnv&&(I.isFunction(a)&&(a=a(t)),a===!0||a==null&&uW(t.url))){const p=i&&s&&dW.read(s);p&&o.set(i,p)}return t}const yW=typeof XMLHttpRequest<"u",vW=yW&&function(e){return new Promise(function(n,r){const a=N5(e);let i=a.data;const s=bn.from(a.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:u}=a,d,f,h,p,g;function m(){p&&p(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function y(){if(!v)return;const b=bn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:b,config:e,request:v};A5(function(O){n(O),m()},function(O){r(O),m()},S),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(y)},v.onabort=function(){v&&(r(new ae("Request aborted",ae.ECONNABORTED,e,v)),m(),v=null)},v.onerror=function(w){const S=w&&w.message?w.message:"Network Error",A=new ae(S,ae.ERR_NETWORK,e,v);A.event=w||null,r(A),m(),v=null},v.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||Ij;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),r(new ae(w,S.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,e,v)),m(),v=null},i===void 0&&s.setContentType(null),"setRequestHeader"in v&&I.forEach(y5(s),function(w,S){v.setRequestHeader(S,w)}),I.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),o&&o!=="json"&&(v.responseType=a.responseType),u&&([h,g]=Dm(u,!0),v.addEventListener("progress",h)),c&&v.upload&&([f,p]=Dm(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(d=b=>{v&&(r(!b||b.type?new lh(null,e,v):b),v.abort(),m(),v=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const x=oW(a.url);if(x&&!rn.protocols.includes(x)){r(new ae("Unsupported protocol "+x+":",ae.ERR_BAD_REQUEST,e));return}v.send(i||null)})},xW=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(c){if(!r){r=!0,s();const u=c instanceof Error?c:this.reason;n.abort(u instanceof ae?u:new lh(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new ae(`timeout of ${t}ms exceeded`,ae.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>I.asap(s),o},bW=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},SW=async function*(e,t){for await(const n of wW(e))yield*bW(n,t)},wW=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},LE=(e,t,n,r)=>{const a=SW(e,t);let i=0,s,o=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await a.next();if(u){o(),c.close();return}let f=d.byteLength;if(n){let h=i+=f;n(h)}c.enqueue(new Uint8Array(d))}catch(u){throw o(u),u}},cancel(c){return o(c),a.return()}},{highWaterMark:2})};function jW(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let s=r.length;const o=r.length;for(let p=0;p<o;p++)if(r.charCodeAt(p)===37&&p+2<o){const g=r.charCodeAt(p+1),m=r.charCodeAt(p+2);(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(s-=2,p+=2)}let c=0,u=o-1;const d=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);u>=0&&(r.charCodeAt(u)===61?(c++,u--):d(u)&&(c++,u-=3)),c===1&&u>=0&&(r.charCodeAt(u)===61||d(u))&&c++;const h=Math.floor(s/4)*3-(c||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let s=0,o=r.length;s<o;s++){const c=r.charCodeAt(s);if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&s+1<o){const u=r.charCodeAt(s+1);u>=56320&&u<=57343?(i+=4,s++):i+=3}else i+=3}return i}const Bj="1.17.0",IE=64*1024,{isFunction:qh}=I,AW=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),zE=e=>{if(!I.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},BE=(e,...t)=>{try{return!!e(...t)}catch{return!1}},OW=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},NW=e=>{const t=I.global!==void 0&&I.global!==null?I.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=I.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:s}=e,o=a?qh(a):typeof fetch=="function",c=qh(i),u=qh(s);if(!o)return!1;const d=o&&qh(n),f=o&&(typeof r=="function"?(y=>x=>y.encode(x))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=c&&d&&BE(()=>{let y=!1;const x=new i(rn.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),b=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),y&&!b}),p=u&&d&&BE(()=>I.isReadableStream(new s("").body)),g={stream:p&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!g[y]&&(g[y]=(x,b)=>{let w=x&&x[y];if(w)return w.call(x);throw new ae(`Response type '${y}' is not supported`,ae.ERR_NOT_SUPPORT,b)})});const m=async y=>{if(y==null)return 0;if(I.isBlob(y))return y.size;if(I.isSpecCompliantForm(y))return(await new i(rn.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(I.isArrayBufferView(y)||I.isArrayBuffer(y))return y.byteLength;if(I.isURLSearchParams(y)&&(y=y+""),I.isString(y))return(await f(y)).byteLength},v=async(y,x)=>{const b=I.toFiniteNumber(y.getContentLength());return b??m(x)};return async y=>{let{url:x,method:b,data:w,signal:S,cancelToken:A,timeout:O,onDownloadProgress:N,onUploadProgress:E,responseType:T,headers:_,withCredentials:C="same-origin",fetchOptions:$,maxContentLength:R,maxBodyLength:k}=N5(y);const M=I.isNumber(R)&&R>-1,L=I.isNumber(k)&&k>-1,z=J=>I.hasOwnProp(y,J)?y[J]:void 0;let V=a||fetch;T=T?(T+"").toLowerCase():"text";let K=xW([S,A&&A.toAbortSignal()],O),U=null;const G=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let ne;try{let J;const ve=z("auth");if(ve){const Q=ve.username||"",q=ve.password||"";J={username:Q,password:q}}if(OW(x)){const Q=new URL(x,rn.origin);if(!J&&(Q.username||Q.password)){const q=zE(Q.username),ke=zE(Q.password);J={username:q,password:ke}}(Q.username||Q.password)&&(Q.username="",Q.password="",x=Q.href)}if(J&&(_.delete("authorization"),_.set("Authorization","Basic "+btoa(AW((J.username||"")+":"+(J.password||""))))),M&&typeof x=="string"&&x.startsWith("data:")&&jW(x)>R)throw new ae("maxContentLength size of "+R+" exceeded",ae.ERR_BAD_RESPONSE,y,U);if(L&&b!=="get"&&b!=="head"){const Q=await v(_,w);if(typeof Q=="number"&&isFinite(Q)&&Q>k)throw new ae("Request body larger than maxBodyLength limit",ae.ERR_BAD_REQUEST,y,U)}if(E&&h&&b!=="get"&&b!=="head"&&(ne=await v(_,w))!==0){let Q=new i(x,{method:"POST",body:w,duplex:"half"}),q;if(I.isFormData(w)&&(q=Q.headers.get("content-type"))&&_.setContentType(q),Q.body){const[ke,xe]=RE(ne,Dm(DE(E)));w=LE(Q.body,IE,ke,xe)}}I.isString(C)||(C=C?"include":"omit");const ee=c&&"credentials"in i.prototype;if(I.isFormData(w)){const Q=_.getContentType();Q&&/^multipart\/form-data/i.test(Q)&&!/boundary=/i.test(Q)&&_.delete("content-type")}_.set("User-Agent","axios/"+Bj,!1);const ct={...$,signal:K,method:b.toUpperCase(),headers:y5(_.normalize()),body:w,duplex:"half",credentials:ee?C:void 0};U=c&&new i(x,ct);let Ke=await(c?V(U,$):V(x,ct));if(M){const Q=I.toFiniteNumber(Ke.headers.get("content-length"));if(Q!=null&&Q>R)throw new ae("maxContentLength size of "+R+" exceeded",ae.ERR_BAD_RESPONSE,y,U)}const X=p&&(T==="stream"||T==="response");if(p&&Ke.body&&(N||M||X&&G)){const Q={};["status","statusText","headers"].forEach(pt=>{Q[pt]=Ke[pt]});const q=I.toFiniteNumber(Ke.headers.get("content-length")),[ke,xe]=N&&RE(q,Dm(DE(N),!0))||[];let Ze=0;const ut=pt=>{if(M&&(Ze=pt,Ze>R))throw new ae("maxContentLength size of "+R+" exceeded",ae.ERR_BAD_RESPONSE,y,U);ke&&ke(pt)};Ke=new s(LE(Ke.body,IE,ut,()=>{xe&&xe(),G&&G()}),Q)}T=T||"text";let le=await g[I.findKey(g,T)||"text"](Ke,y);if(M&&!p&&!X){let Q;if(le!=null&&(typeof le.byteLength=="number"?Q=le.byteLength:typeof le.size=="number"?Q=le.size:typeof le=="string"&&(Q=typeof r=="function"?new r().encode(le).byteLength:le.length)),typeof Q=="number"&&Q>R)throw new ae("maxContentLength size of "+R+" exceeded",ae.ERR_BAD_RESPONSE,y,U)}return!X&&G&&G(),await new Promise((Q,q)=>{A5(Q,q,{data:le,headers:bn.from(Ke.headers),status:Ke.status,statusText:Ke.statusText,config:y,request:U})})}catch(J){if(G&&G(),K&&K.aborted&&K.reason instanceof ae){const ve=K.reason;throw ve.config=y,U&&(ve.request=U),J!==ve&&(ve.cause=J),ve}throw J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new ae("Network Error",ae.ERR_NETWORK,y,U,J&&J.response),{cause:J.cause||J}):ae.from(J,J&&J.code,y,U,J&&J.response)}}},EW=new Map,E5=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let s=i.length,o=s,c,u,d=EW;for(;o--;)c=i[o],u=d.get(c),u===void 0&&d.set(c,u=o?new Map:NW(t)),d=u;return u};E5();const Uj={http:qY,xhr:vW,fetch:{get:E5}};I.forEach(Uj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const UE=e=>`- ${e}`,TW=e=>I.isFunction(e)||e===null||e===!1;function CW(e,t){e=I.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let s=0;s<n;s++){r=e[s];let o;if(a=r,!TW(r)&&(a=Uj[(o=String(r)).toLowerCase()],a===void 0))throw new ae(`Unknown adapter '${o}'`);if(a&&(I.isFunction(a)||(a=a.get(t))))break;i[o||"#"+s]=a}if(!a){const s=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=n?s.length>1?`since :
`+s.map(UE).join(`
`):" "+UE(s[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const T5={getAdapter:CW,adapters:Uj};function _x(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new lh(null,e)}function FE(e){return _x(e),e.headers=bn.from(e.headers),e.data=Cx.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),T5.getAdapter(e.adapter||oh.adapter,e)(e).then(function(r){_x(e),e.response=r;try{r.data=Cx.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=bn.from(r.headers),r},function(r){if(!j5(r)&&(_x(e),r&&r.response)){e.response=r.response;try{r.response.data=Cx.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=bn.from(r.response.headers)}return Promise.reject(r)})}const Ny={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ny[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const VE={};Ny.transitional=function(t,n,r){function a(i,s){return"[Axios v"+Bj+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(t===!1)throw new ae(a(s," has been removed"+(n?" in "+n:"")),ae.ERR_DEPRECATED);return n&&!VE[s]&&(VE[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,o):!0}};Ny.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function _W(e,t,n){if(typeof e!="object")throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const o=e[i],c=o===void 0||s(o,i,e);if(c!==!0)throw new ae("option "+i+" must be "+c,ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ae("Unknown option "+i,ae.ERR_BAD_OPTION)}}const Ip={assertOptions:_W,validators:Ny},On=Ip.validators;let no=class{constructor(t){this.defaults=t||{},this.interceptors={request:new kE,response:new kE}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const s=a.stack.indexOf(`
`);return s===-1?"":a.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){const s=i.indexOf(`
`),o=s===-1?-1:i.indexOf(`
`,s+1),c=o===-1?"":i.slice(o+1);String(r.stack).endsWith(c)||(r.stack+=`
`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mo(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&Ip.assertOptions(r,{silentJSONParsing:On.transitional(On.boolean),forcedJSONParsing:On.transitional(On.boolean),clarifyTimeoutError:On.transitional(On.boolean),legacyInterceptorReqResOrdering:On.transitional(On.boolean),advertiseZstdAcceptEncoding:On.transitional(On.boolean)},!1),a!=null&&(I.isFunction(a)?n.paramsSerializer={serialize:a}:Ip.assertOptions(a,{encode:On.function,serialize:On.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ip.assertOptions(n,{baseUrl:On.spelling("baseURL"),withXsrfToken:On.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&I.merge(i.common,i[n.method]);i&&I.forEach(["delete","get","head","post","put","patch","query","common"],g=>{delete i[g]}),n.headers=bn.concat(s,i);const o=[];let c=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;c=c&&m.synchronous;const v=n.transitional||Ij;v&&v.legacyInterceptorReqResOrdering?o.unshift(m.fulfilled,m.rejected):o.push(m.fulfilled,m.rejected)});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!c){const g=[FE.bind(this),void 0];for(g.unshift(...o),g.push(...u),h=g.length,d=Promise.resolve(n);f<h;)d=d.then(g[f++],g[f++]);return d}h=o.length;let p=n;for(;f<h;){const g=o[f++],m=o[f++];try{p=g(p)}catch(v){m.call(this,v);break}}try{d=FE.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=mo(this.defaults,t);const n=O5(t.baseURL,t.url,t.allowAbsoluteUrls);return S5(n,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){no.prototype[t]=function(n,r){return this.request(mo(r||{},{method:t,url:n,data:(r||{}).data}))}});I.forEach(["post","put","patch","query"],function(t){function n(r){return function(i,s,o){return this.request(mo(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}no.prototype[t]=n(),t!=="query"&&(no.prototype[t+"Form"]=n(!0))});let PW=class C5{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(a=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{r.subscribe(o),i=o}).then(a);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,o){r.reason||(r.reason=new lh(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new C5(function(a){t=a}),cancel:t}}};function MW(e){return function(n){return e.apply(null,n)}}function kW(e){return I.isObject(e)&&e.isAxiosError===!0}const n1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(n1).forEach(([e,t])=>{n1[t]=e});function _5(e){const t=new no(e),n=c5(no.prototype.request,t);return I.extend(n,no.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return _5(mo(e,a))},n}const Nt=_5(oh);Nt.Axios=no;Nt.CanceledError=lh;Nt.CancelToken=PW;Nt.isCancel=j5;Nt.VERSION=Bj;Nt.toFormData=Oy;Nt.AxiosError=ae;Nt.Cancel=Nt.CanceledError;Nt.all=function(t){return Promise.all(t)};Nt.spread=MW;Nt.isAxiosError=kW;Nt.mergeConfig=mo;Nt.AxiosHeaders=bn;Nt.formToJSON=e=>w5(I.isHTMLForm(e)?new FormData(e):e);Nt.getAdapter=T5.getAdapter;Nt.HttpStatusCode=n1;Nt.default=Nt;const{Axios:YNe,AxiosError:WNe,CanceledError:XNe,isCancel:QNe,CancelToken:ZNe,VERSION:JNe,all:eEe,Cancel:tEe,isAxiosError:nEe,spread:rEe,toFormData:aEe,AxiosHeaders:iEe,HttpStatusCode:sEe,formToJSON:oEe,getAdapter:lEe,mergeConfig:cEe,create:uEe}=Nt,B=Nt.create({baseURL:""}),P5=()=>location.pathname.startsWith("/admin"),M5=()=>P5()?"mall_admin_token":"mall_token";B.interceptors.request.use(e=>{const t=localStorage.getItem(M5());return t&&(e.headers.Authorization=`Bearer ${t}`),e});B.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem(M5()),P5()&&location.pathname!=="/admin/login"&&(location.href="/admin/login")),Promise.reject(e)});const Z=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),k5=(e,t)=>B.post("/api/mall/auth/login",{username:e,password:t}),RW=(e,t,n)=>B.post("/api/mall/auth/register",{username:e,password:t,displayName:n}),Fj=()=>Z(B.get("/api/mall/auth/me")),DW=()=>Z(B.post("/api/mall/auth/otp/setup",{})),$W=e=>Z(B.post("/api/mall/auth/otp/confirm",{code:e})),LW=()=>Z(B.post("/api/mall/auth/otp/disable",{})),IW=(e,t)=>Z(B.post("/api/mall/auth/change-password",{currentPassword:e,newPassword:t})),Co=(e=!0)=>Z(B.get(`/api/mall/store?activeOnly=${e}`)),zW=e=>Z(B.post("/api/mall/store",e)),BW=(e,t)=>Z(B.put(`/api/mall/store/${e}`,t)),UW=(e,t)=>Z(B.put(`/api/mall/store/${e}/active`,{active:t})),FW=e=>Z(B.get(`/api/mall/zone/lookup?zip=${encodeURIComponent(e)}`)),cc=(e={})=>{const t=new URLSearchParams;return Object.entries(e).forEach(([n,r])=>{r!==void 0&&r!==""&&r!==null&&t.set(n,String(r))}),Z(B.get(`/api/mall/product?${t}`))},R5=e=>Z(B.get(`/api/mall/product/${e}`)),VW=e=>Z(B.post("/api/mall/product",e)),HW=(e,t)=>Z(B.put(`/api/mall/product/${e}`,t)),qW=e=>B.delete(`/api/mall/product/${e}`),KW=(e,t)=>Z(B.put(`/api/mall/product/${e}/status`,{status:t})),D5=()=>Z(B.get("/api/mall/category")),GW=e=>Z(B.get(`/api/mall/store-inventory/store/${e}`)),YW=(e,t,n)=>Z(B.put(`/api/mall/store-inventory/store/${e}/product/${t}/toggle`,{available:n})),WW=(e,t,n)=>Z(B.put(`/api/mall/store-inventory/store/${e}/product/${t}/adjust`,{delta:n})),XW=(e,t)=>Z(B.get(`/api/mall/schedule/availability?storeId=${e}&date=${t}`)),$5=()=>Z(B.get("/api/mall/schedule/holidays")),QW=e=>Z(B.post("/api/mall/schedule/holiday",e)),Vj=()=>Z(B.get("/api/mall/cart")),ZW=e=>Z(B.post("/api/mall/cart",e)),JW=(e,t)=>Z(B.put(`/api/mall/cart/${e}`,{quantity:t})),eX=e=>B.delete(`/api/mall/cart/${e}`),tX=(e="")=>Z(B.get(`/api/mall/order?status=${e}`)),nX=e=>Z(B.post("/api/mall/order/checkout",e)),L5=(e,t)=>Z(B.put(`/api/mall/order/${e}/status`,{status:t})),rX=(e="",t=100)=>Z(B.get(`/api/mall/order/admin?status=${e}&limit=${t}`)),aX=e=>Z(B.post("/api/mall/payment",e)),iX=()=>Z(B.get("/api/mall/subscription")),sX=e=>Z(B.post("/api/mall/subscription",e)),HE=(e,t)=>Z(B.put(`/api/mall/subscription/${e}/status`,{status:t})),oX=()=>Z(B.get("/api/mall/subscription/admin")),lX=(e,t)=>Z(B.put(`/api/mall/subscription/admin/${e}/status`,{status:t})),cX=(e="",t="")=>{const n=new URLSearchParams;return e&&n.set("status",e),t&&n.set("storeId",t),Z(B.get(`/api/mall/transfer?${n}`))},uX=e=>Z(B.put(`/api/mall/transfer/${e}/approve`,{})),dX=e=>Z(B.put(`/api/mall/transfer/${e}/reject`,{})),fX=e=>Z(B.get(`/api/mall/review/product/${e}`)),hX=e=>Z(B.get(`/api/mall/review/product/${e}/stats`)),pX=e=>Z(B.post("/api/mall/review",e)),mX=()=>Z(B.get("/api/mall/member/me")),gX=(e="",t="",n=100)=>{const r=new URLSearchParams;return e&&r.set("keyword",e),t&&r.set("tier",t),r.set("limit",String(n)),Z(B.get(`/api/mall/member/admin?${r}`))},yX=()=>Z(B.get("/api/mall/cs")),vX=e=>Z(B.post("/api/mall/cs",e)),xX=()=>Z(B.get("/api/mall/wishlist")),bX=e=>Z(B.post(`/api/mall/wishlist/${e}`,{})),SX=e=>B.delete(`/api/mall/wishlist/${e}`),wX=(e=1,t=500)=>Z(B.get(`/api/mall/analytics/dashboard?days=${e}&bigOrderThreshold=${t}`)),I5=(e=7)=>Z(B.get(`/api/mall/analytics/store-sales?days=${e}`)),z5=(e=14)=>Z(B.get(`/api/mall/analytics/trend?days=${e}`)),B5=(e=10)=>Z(B.get(`/api/mall/analytics/top-products?limit=${e}`)),jX=(e,t,n)=>Z(B.post("/api/mall/gateway/tax/quote",{amount:e,zip:t,state:n})),AX=(e,t)=>Z(B.post("/api/mall/gateway/address/verify",{address:e,zip:t})),OX=()=>Z(B.get("/api/mall/gateway/providers")),U5=(e="",t="",n=6)=>{const r=new URLSearchParams;return e&&r.set("occasion",e),t&&r.set("keyword",t),r.set("limit",String(n)),Z(B.get(`/api/mall/ai/recommend?${r}`))},NX=e=>Z(B.get(`/api/mall/ai/review-summary/${e}`)),F5=e=>Z(B.post("/api/mall/ai/nl-search",{query:e})),EX=(e,t,n)=>Z(B.post("/api/mall/ai/card-message",{occasion:e,tone:t,recipient:n})),TX=(e="valentine",t=14)=>Z(B.get(`/api/mall/ai/demand-forecast?season=${e}&days=${t}`)),CX=e=>Z(B.post("/api/mall/ai/transfer-recommend",{storeIds:e})),_X=()=>Z(B.get("/api/admin/users")),PX=e=>Z(B.post("/api/admin/users",e)),MX=(e,t)=>Z(B.put(`/api/admin/users/${e}/role`,{role:t})),kX=(e,t)=>Z(B.put(`/api/admin/users/${e}/active`,{active:t})),RX=(e,t)=>Z(B.put(`/api/admin/users/${e}/password`,{password:t})),DX=e=>B.delete(`/api/admin/users/${e}`),$X=e=>Z(B.post(`/api/admin/users/${e}/otp-reset`,{})),LX=(e="",t="",n=100)=>{const r=new URLSearchParams;return e&&r.set("action",e),t&&r.set("actor",t),r.set("limit",String(n)),Z(B.get(`/api/admin/audit?${r}`))},IX=()=>Z(B.get("/api/admin/settings")),zX=(e,t)=>Z(B.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t})),BX=(e=!0)=>Z(B.get(`/api/mall/loyalty/tiers?activeOnly=${e}`)),UX=(e,t)=>Z(B.put(`/api/mall/loyalty/tiers/${e}`,t)),Hj=()=>Z(B.get("/api/mall/loyalty/me")),FX=(e=100)=>Z(B.get(`/api/mall/loyalty/points/history?limit=${e}`)),VX=(e,t,n)=>Z(B.post("/api/mall/loyalty/points/adjust",{owner:e,points:t,reason:n})),HX=()=>Z(B.post("/api/mall/loyalty/recalc-all",{})),V5=(e=30)=>Z(B.get(`/api/mall/loyalty/analytics/by-tier?days=${e}`)),qX=(e="")=>Z(B.get(`/api/mall/event/ongoing${e?`?tier=${e}`:""}`)),KX=e=>Z(B.post(`/api/mall/event/${e}/join`,{})),GX=(e="",t="",n=!1)=>{const r=new URLSearchParams;return e&&r.set("status",e),t&&r.set("type",t),r.set("activeOnly",String(n)),Z(B.get(`/api/mall/event?${r}`))},YX=e=>Z(B.post("/api/mall/event",e)),WX=e=>Z(B.post(`/api/mall/event/${e}/publish`,{})),XX=e=>Z(B.post(`/api/mall/event/${e}/end`,{})),QX=e=>B.delete(`/api/mall/event/${e}`),ZX=e=>Z(B.get(`/api/mall/event/${e}/performance`)),JX=(e,t,n)=>Z(B.post("/api/mall/event/ai/copy",{eventType:e,theme:t,tone:n})),eQ=()=>Z(B.get("/api/mall/rag/toggles")),tQ=(e,t)=>Z(B.put(`/api/mall/rag/toggles/${e}`,{value:t}));function Jr({children:e,delay:t=0,y:n=24,className:r="",as:a="div"}){const i=li(),s=Pt[a];return l.jsx(s,{className:r,initial:i?!1:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t,ease:[.22,1,.36,1]},children:e})}const nQ={hidden:{},show:{transition:{staggerChildren:.07,delayChildren:.05}}},rQ={hidden:{opacity:0,y:22},show:{opacity:1,y:0,transition:{duration:.6,ease:[.22,1,.36,1]}}};function $m({children:e,className:t=""}){const n=li();return l.jsx(Pt.div,{className:t,variants:n?void 0:nQ,initial:n?!1:"hidden",whileInView:"show",viewport:{once:!0,margin:"-40px"},children:e})}function Lm({children:e,className:t=""}){const n=li();return l.jsx(Pt.div,{className:t,variants:n?void 0:rQ,children:e})}const qE=["","sage","cream"];function ch({count:e=14,className:t=""}){const n=li(),r=j.useMemo(()=>Array.from({length:e}).map((a,i)=>{const s=8+Math.round(Math.random()*14);return{left:Math.round(Math.random()*100),size:s,delay:+(Math.random()*12).toFixed(2),duration:+(10+Math.random()*10).toFixed(2),kind:qE[i%qE.length]}}),[e]);return n?null:l.jsx("div",{className:`petal-layer ${t}`,"aria-hidden":"true",children:r.map((a,i)=>l.jsx("span",{className:`petal ${a.kind}`,style:{left:`${a.left}%`,width:`${a.size}px`,height:`${a.size}px`,animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))})}function Ya({children:e,className:t="",onClick:n,type:r="button",disabled:a}){const i=li();return l.jsx(Pt.button,{type:r,onClick:n,disabled:a,className:t,whileHover:i||a?void 0:{scale:1.03,y:-1},whileTap:i||a?void 0:{scale:.97},transition:{type:"spring",stiffness:380,damping:22},children:e})}const Be={name:"Montvale Florist",tagline:"100% Florist-Designed and Hand-Delivered!",founded:2010,address:"6 Railroad Ave, Montvale, NJ 07645",phone:"(201) 690-6721",phoneTel:"+12016906721",email:"wecare@montvalefloristnj.com",rating:4.9,reviewCount:44893,promise:[{title:"100% Florist-Designed",desc:"Every arrangement is crafted by hand in our shop — never mass-produced."},{title:"Locally Independent",desc:"A real, community-focused florist in Montvale since 2010 — not an online middleman."},{title:"100% Satisfaction",desc:"We stand behind every bouquet with our satisfaction guarantee."}],hours:[{day:"Mon – Fri",open:"9:00 AM – 5:30 PM",cutoff:"Same-day by 1:00 PM"},{day:"Saturday",open:"9:00 AM – 4:00 PM",cutoff:"Same-day by 12:00 PM"},{day:"Sunday",open:"9:00 AM – 12:00 PM",cutoff:"Same-day by 10:00 AM"}],social:{instagram:"https://instagram.com/themontvaleflorist",instagramHandle:"@themontvaleflorist",facebook:"https://facebook.com/montvaleflorist1",pinterest:"https://pinterest.com/montvaleflorist",google:"https://www.google.com/search?q=Montvale+Florist",yelp:"https://yelp.com/biz/montvale-florist-montvale-3"},payments:["Visa","Mastercard","Amex","Discover","Apple Pay","Google Pay"],wallets:["Apple Pay","Google Pay"],cards:["Visa","Mastercard","Amex","Discover"],policies:["Terms of Service","Privacy Policy","Accessibility Statement","Delivery Policy"],about:"Montvale Florist is your go-to local florist, delivering not just flowers, but joy, comfort, and memories. An independent, community-focused florist dedicated to craftsmanship and personal service since 2010."},Px=[{img:"/img/hero/slide-1.jpg",eyebrow:"Birthday Blooms",headline:`Make Their Birthday
Unforgettable`,subtext:"Florist-designed bouquets, hand-delivered the same day — a celebration in every petal.",cta:"Find the Perfect Gift",to:"/category?occasion=BIRTHDAY"},{img:"/img/hero/slide-2.jpg",eyebrow:"Sympathy & Comfort",headline:`Honor Their Memory
with Heartfelt Flowers`,subtext:"Thoughtful tributes, gently arranged and delivered with care and compassion.",cta:"Send Your Condolences",to:"/category?occasion=SYMPATHY"},{img:"/img/hero/slide-3.jpg",eyebrow:"Just Because",headline:`Brighten Their Day,
Just Because`,subtext:"No occasion needed — send a smile with fresh, locally designed blooms.",cta:"Send a Smile",to:"/category?occasion=JUST_BECAUSE"}],aQ=[{code:"en",label:"EN"},{code:"ko",label:"한국어"}];function Ey({variant:e="shop"}){const{i18n:t}=ci(),n=(t.language||"en").split("-")[0],r=s=>{s!==n&&t.changeLanguage(s)},a=e==="admin",i=a?"flex items-center gap-0.5 rounded-lg border border-edge bg-card/60 p-0.5":"flex items-center gap-0.5 rounded-full border border-blush-100 bg-white/70 p-0.5 shadow-soft";return l.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Language",children:[l.jsx(mG,{size:15,className:a?"text-slate-400":"text-sage-600"}),l.jsx("div",{className:i,role:"group",children:aQ.map(s=>{const o=s.code===n,c="px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors",u=a?o?"bg-brand text-ink":"text-slate-300 hover:text-brand":o?"bg-blush-500 text-white":"text-sage-700 hover:text-blush-600";return l.jsx("button",{type:"button",onClick:()=>r(s.code),"aria-pressed":o,className:`${c} ${a?"rounded-md":""} ${u}`,children:s.label},s.code)})})]})}function iQ(){const{t:e}=ci(),[t,n]=j.useState(""),[r,a]=j.useState(null),[i,s]=j.useState(!1),[o,c]=j.useState(""),{setZone:u}=wn(),d=Xt(),f=async p=>{if(p.preventDefault(),c(""),a(null),!/^\d{5}$/.test(t)){c(e("zip.errInvalid"));return}s(!0);try{const g=await FW(t);a(g),g!=null&&g.deliverable||c(e("zip.errNotDeliverable"))}catch{c(e("zip.errFailed"))}finally{s(!1)}},h=p=>{u(t,p.storeId,p.storeName),d("/home")};return l.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[l.jsx("div",{className:"absolute top-5 right-5 z-20",children:l.jsx(Ey,{variant:"shop"})}),l.jsx(ch,{count:18}),l.jsx(Pt.div,{"aria-hidden":!0,className:"absolute -top-20 -left-20 text-blush-200/40",animate:{rotate:[0,360]},transition:{duration:80,repeat:1/0,ease:"linear"},children:l.jsx(gt,{size:320,strokeWidth:.5})}),l.jsx(Pt.div,{"aria-hidden":!0,className:"absolute -bottom-24 -right-16 text-sage-300/40",animate:{rotate:[360,0]},transition:{duration:90,repeat:1/0,ease:"linear"},children:l.jsx(gt,{size:260,strokeWidth:.5})}),l.jsxs(Pt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-lg text-center",children:[l.jsxs("div",{className:"flex flex-col items-center mb-5",children:[l.jsx(Pt.span,{animate:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:l.jsx(gt,{className:"text-blush-500",size:44})}),l.jsx("h1",{className:"font-serif text-4xl font-bold text-blush-900 mt-3",children:"Montvale Florist"}),l.jsx("p",{className:"font-display text-[13px] tracking-[0.35em] uppercase text-sage-600 mt-1",children:e("zip.since",{year:Be.founded})})]}),l.jsx("p",{className:"font-display text-2xl text-[#6b5258] mb-1",children:Be.tagline}),l.jsx("p",{className:"text-[#8a7077] text-sm mb-8",children:e("zip.lead")}),l.jsxs("form",{onSubmit:f,className:"bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-7 border border-blush-100",children:[l.jsxs("label",{className:"flex items-center gap-2 text-sm text-blush-700 font-medium mb-3 justify-center",children:[l.jsx(km,{size:16})," ",e("zip.enterZip")]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{value:t,onChange:p=>n(p.target.value.replace(/\D/g,"").slice(0,5)),placeholder:e("zip.placeholder"),inputMode:"numeric",autoFocus:!0,className:"flex-1 px-4 py-3.5 rounded-2xl bg-blush-50 border border-blush-100 text-center text-lg tracking-[0.3em] outline-none focus:border-blush-400 transition-colors"}),l.jsx(Ya,{type:"submit",disabled:i,className:"px-7 rounded-2xl bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60 flex items-center gap-1",children:i?"…":l.jsxs(l.Fragment,{children:[e("zip.go")," ",l.jsx(Rs,{size:16})]})})]}),o&&l.jsx("p",{className:"text-blush-500 text-xs mt-3",children:o}),(r==null?void 0:r.deliverable)&&l.jsxs(Pt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-6 text-left overflow-hidden",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-sage-700 font-medium mb-3",children:[l.jsx(ah,{size:15})," ",e("zip.availableStores")]}),l.jsx("div",{className:"space-y-2",children:(r.stores||[]).map(p=>l.jsxs(Ya,{onClick:()=>h(p),className:"w-full flex items-center justify-between bg-blush-50 hover:bg-blush-100 border border-blush-100 rounded-2xl px-4 py-3.5 text-left",children:[l.jsxs("span",{children:[l.jsxs("span",{className:"font-medium text-sm flex items-center gap-1.5 text-blush-900",children:[l.jsx(rh,{size:14,className:"text-blush-500"}),p.storeName]}),l.jsx("span",{className:"block text-xs text-[#8a7077] mt-0.5",children:e("zip.radiusSameDay",{radius:p.radiusMi,cutoff:p.sameDayCutoff,tz:p.timezone})})]}),l.jsx(Rs,{size:16,className:"text-blush-500"})]},p.storeId))})]})]}),l.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6 text-[12px] text-[#8a7077]",children:[l.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(p=>l.jsx(ri,{size:13,fill:"currentColor"},p))}),Be.rating,"★ · ",e("zip.reviews",{n:Be.reviewCount.toLocaleString()})]}),l.jsx("button",{onClick:()=>d("/home"),className:"text-xs text-[#a08a90] hover:text-blush-600 mt-4 underline-offset-2 hover:underline",children:e("zip.browsePickup")})]})]})}function H5({size:e=18}){return l.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:l.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12c0 4.24 2.64 7.85 6.36 9.31-.09-.79-.17-2 .03-2.86.18-.78 1.17-4.97 1.17-4.97s-.3-.6-.3-1.48c0-1.39.81-2.43 1.81-2.43.85 0 1.27.64 1.27 1.41 0 .86-.55 2.14-.83 3.33-.24 1 .5 1.81 1.48 1.81 1.78 0 3.14-1.88 3.14-4.58 0-2.4-1.72-4.07-4.19-4.07-2.85 0-4.52 2.14-4.52 4.35 0 .86.33 1.78.74 2.28.08.1.09.19.07.29l-.27 1.13c-.04.18-.14.22-.33.13-1.25-.58-2.03-2.4-2.03-3.87 0-3.15 2.29-6.04 6.6-6.04 3.46 0 6.16 2.47 6.16 5.77 0 3.44-2.17 6.21-5.18 6.21-1.01 0-1.97-.53-2.29-1.15l-.62 2.37c-.23.86-.83 1.94-1.24 2.6.94.29 1.92.44 2.95.44 5.52 0 10-4.48 10-10S17.52 2 12 2z"})})}function sQ({size:e=18}){return l.jsxs("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",children:[l.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),l.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"}),l.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84z"}),l.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.3 9.14 5.38 12 5.38z"})]})}function oQ({size:e=18}){return l.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:l.jsx("path",{d:"M12.27 13.3l4.45-2.16c.51-.25.66-.92.31-1.36-1.13-1.44-2.7-2.49-4.49-2.99-.55-.15-1.08.27-1.08.84l-.02 5.04c0 .65.72 1.06 1.32.77zM12.6 15.34l4.46 2.13c.51.25 1.13-.07 1.21-.63.25-1.8-.06-3.66-.92-5.31-.27-.51-.96-.6-1.36-.18l-3.5 3.42c-.45.45-.31 1.18.11 1.4v-.84zm-2.59.4l-3.45-3.4c-.41-.4-1.09-.32-1.37.18-.86 1.64-1.18 3.49-.95 5.29.07.56.69.89 1.21.64l4.45-2.12c.6-.29.74-1.02.06-1.43zm.08 2.36l-.02 4.95c0 .57.53.99 1.08.84 1.78-.49 3.34-1.53 4.48-2.96.35-.44.2-1.11-.31-1.36l-4.45-2.15c-.6-.29-1.31.13-1.31.78l.84.01zm-.45-7.1L5.66 7.06c-.43-.7-1.46-.56-1.69.23-.13.45-.22.92-.27 1.4-.16 1.55.05 3.12.61 4.56.21.53.91.62 1.27.13l3.95-5.32c.32-.43.06-1.05-.5-1.16l.39.56z"})})}const lQ={instagram:({size:e})=>l.jsx(Z$,{size:e}),facebook:({size:e})=>l.jsx(X$,{size:e}),pinterest:H5,google:sQ,yelp:oQ},cQ={instagram:"Instagram",facebook:"Facebook",pinterest:"Pinterest",google:"Google Business",yelp:"Yelp"},uQ=["instagram","facebook","pinterest","google","yelp"];function dQ({size:e=18,className:t="",iconClass:n=""}){return l.jsx("div",{className:`flex items-center gap-3 ${t}`,children:uQ.map(r=>{const a=Be.social[r];if(!a)return null;const i=lQ[r];return l.jsx("a",{href:a,target:"_blank",rel:"noreferrer","aria-label":cQ[r],className:`transition-colors ${n}`,children:l.jsx(i,{size:e})},r)})})}function fQ({url:e,title:t,image:n,className:r=""}){const a=encodeURIComponent(e),i=encodeURIComponent(t||Be.name),s=encodeURIComponent(n||""),o=`https://www.facebook.com/sharer/sharer.php?u=${a}`,c=`https://pinterest.com/pin/create/button/?url=${a}&media=${s}&description=${i}`,u=Be.social.instagram,d=f=>window.open(f,"_blank","noopener,width=640,height=600");return l.jsxs("div",{className:`flex items-center gap-2 ${r}`,children:[l.jsx("span",{className:"text-xs text-[#a08a90]",children:"Share:"}),l.jsx("button",{type:"button",onClick:()=>d(u),"aria-label":"Share on Instagram",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:l.jsx(Z$,{size:16})}),l.jsx("button",{type:"button",onClick:()=>d(o),"aria-label":"Share on Facebook",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:l.jsx(X$,{size:16})}),l.jsx("button",{type:"button",onClick:()=>d(c),"aria-label":"Share on Pinterest",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:l.jsx(H5,{size:16})})]})}function hQ(){return l.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Visa",children:[l.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),l.jsx("text",{x:"24",y:"21",textAnchor:"middle",fontFamily:"Georgia, serif",fontWeight:"700",fontStyle:"italic",fontSize:"13",fill:"#1a1f71",children:"VISA"})]})}function pQ(){return l.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Mastercard",children:[l.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),l.jsx("circle",{cx:"20",cy:"16",r:"8",fill:"#eb001b"}),l.jsx("circle",{cx:"28",cy:"16",r:"8",fill:"#f79e1b",fillOpacity:"0.85"})]})}function mQ(){return l.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"American Express",children:[l.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#2e77bb"}),l.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",fill:"#fff",children:"AMEX"})]})}function gQ(){return l.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Discover",children:[l.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),l.jsx("circle",{cx:"36",cy:"22",r:"9",fill:"#f68121"}),l.jsx("text",{x:"22",y:"19",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"7",fill:"#231f20",children:"DISCOVER"})]})}function yQ(){return l.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Apple Pay",children:[l.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#000"}),l.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"-apple-system, Helvetica, sans-serif",fontWeight:"600",fontSize:"9",fill:"#fff",children:" Pay"})]})}function vQ(){return l.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Google Pay",children:[l.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),l.jsxs("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",children:[l.jsx("tspan",{fill:"#4285f4",children:"G"}),l.jsx("tspan",{fill:"#ea4335",children:"o"}),l.jsx("tspan",{fill:"#fbbc05",children:"o"}),l.jsx("tspan",{fill:"#4285f4",children:"g"}),l.jsx("tspan",{fill:"#34a853",children:"l"}),l.jsx("tspan",{fill:"#ea4335",children:"e"}),l.jsx("tspan",{fill:"#5f6368",children:" Pay"})]})]})}const q5={Visa:hQ,Mastercard:pQ,Amex:mQ,Discover:gQ,"Apple Pay":yQ,"Google Pay":vQ};function K5({items:e,className:t=""}){return l.jsx("div",{className:`flex flex-wrap items-center gap-1.5 ${t}`,children:e.map(n=>{const r=q5[n];return r?l.jsx(r,{},n):l.jsx("span",{className:"text-[10px] bg-cream/10 rounded px-2 py-1",children:n},n)})})}function xQ(e){const t=e.replace(/\D/g,"");return t.length<4?"•••• •••• •••• ••••":`•••• •••• •••• ${t.slice(-4)}`}function bQ(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function SQ({method:e,onMethod:t,onCardChange:n,cards:r=["Visa","Mastercard","Amex","Discover"],wallets:a=["Apple Pay","Google Pay"]}){const[i,s]=j.useState(""),[o,c]=j.useState(""),[u,d]=j.useState(""),[f,h]=j.useState(""),[p,g]=j.useState(!1),m=i.replace(/\D/g,""),v=(x=i,b=o,w=u)=>{const S=x.replace(/\D/g,""),A=S.length>=15&&/^\d{2}\/\d{2}$/.test(b)&&w.replace(/\D/g,"").length>=3;n==null||n({last4:S.slice(-4),expiry:b,complete:A})},y=x=>x==="Apple Pay"?"APPLE_PAY":"GOOGLE_PAY";return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[l.jsxs("button",{type:"button",onClick:()=>t("CARD"),className:`flex items-center justify-center gap-1.5 py-2.5 rounded-xl border text-sm ${e==="CARD"?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 text-[#6b5258]"}`,children:[l.jsx(EE,{size:16})," Card"]}),a.map(x=>{const b=y(x),w=q5[x];return l.jsx("button",{type:"button",onClick:()=>t(b),className:`flex items-center justify-center py-2 rounded-xl border ${e===b?"border-bloom bg-petal":"border-blush-100"}`,"aria-label":x,children:w?l.jsx(w,{}):l.jsx("span",{className:"text-sm",children:x})},x)})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[11px] text-gray-400",children:"Accepted:"}),l.jsx(K5,{items:r})]}),e==="CARD"?l.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 space-y-3 bg-white",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Card number"}),l.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 rounded-xl border border-blush-100 focus-within:border-bloom",children:[l.jsx(EE,{size:16,className:"text-blush-400 shrink-0"}),l.jsx("input",{inputMode:"numeric",autoComplete:"cc-number",value:p?bQ(i):m?xQ(i):"",onFocus:()=>g(!0),onBlur:()=>g(!1),onChange:x=>{const b=x.target.value;s(b),v(b)},placeholder:"1234 1234 1234 1234",className:"flex-1 bg-transparent text-sm outline-none tracking-wider"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Expiry (MM/YY)"}),l.jsx("input",{inputMode:"numeric",autoComplete:"cc-exp",value:o,onChange:x=>{let b=x.target.value.replace(/\D/g,"").slice(0,4);b.length>=3&&(b=b.slice(0,2)+"/"+b.slice(2)),c(b),v(i,b)},placeholder:"MM/YY",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"CVC"}),l.jsx("input",{inputMode:"numeric",autoComplete:"cc-csc",value:u,onChange:x=>{const b=x.target.value.replace(/\D/g,"").slice(0,4);d(b),v(i,o,b)},placeholder:"•••",type:"password",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Name on card"}),l.jsx("input",{autoComplete:"cc-name",value:f,onChange:x=>h(x.target.value),placeholder:"Full name",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),l.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400",children:[l.jsx(W0,{size:11})," Card number is masked and never stored on this device. Processed via GUARDiA PaymentGateway."]})]}):l.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 bg-white",children:[l.jsx("button",{type:"button",className:`w-full py-3 rounded-xl font-semibold flex items-center justify-center gap-2 ${e==="APPLE_PAY"?"bg-black text-white":"bg-white border border-edge text-[#3c4043]"}`,children:e==="APPLE_PAY"?" Pay":"G Pay"}),l.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400 mt-2",children:[l.jsx(W0,{size:11})," ",e==="APPLE_PAY"?"Apple Pay":"Google Pay"," via secure wallet. If unconfigured, processed as mock at checkout."]})]})]})}const wQ=[{to:"/home",key:"home"},{to:"/category",key:"shopAll"},{to:"/category?occasion=ROMANCE",key:"loveRomance"},{to:"/category?occasion=BIRTHDAY",key:"birthday"},{to:"/category?occasion=SYMPATHY",key:"sympathy"},{to:"/daily-standard",key:"todaysBouquet",accent:!0},{to:"/subscription",key:"subscriptions"},{to:"/events",key:"offers"}];function jQ(){const{t:e}=ci(),{zip:t,storeName:n,custToken:r,cartCount:a,setCartCount:i}=wn(),s=Xt(),o=Tr(),c=li(),[u,d]=j.useState("");j.useEffect(()=>{if(!r){i(0);return}Vj().then(h=>i((h||[]).reduce((p,g)=>p+(g.quantity||1),0))).catch(()=>{})},[r]);const f=h=>{h.preventDefault(),u.trim()&&s(`/search?q=${encodeURIComponent(u.trim())}`)};return l.jsxs("div",{className:"min-h-screen bg-cream text-[#43343a] flex flex-col",children:[l.jsx("div",{className:"bg-sage-700 text-cream/95 text-[12px] tracking-wide",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-9 flex items-center justify-center sm:justify-between gap-3",children:[l.jsxs("span",{className:"hidden sm:flex items-center gap-1.5",children:[l.jsx(gt,{size:13})," ",Be.tagline]}),l.jsxs("span",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(ri,{size:12,className:"text-gold",fill:"currentColor"})," ",Be.rating,"★ · ",e("shop.topbar.reviews",{n:Be.reviewCount.toLocaleString()})]}),l.jsxs("a",{href:`tel:${Be.phoneTel}`,className:"hidden sm:flex items-center gap-1 hover:text-white",children:[l.jsx(TE,{size:12})," ",Be.phone]})]})]})}),l.jsxs("header",{className:"sticky top-0 z-30 bg-cream/90 backdrop-blur-md border-b border-blush-100",children:[l.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-[72px] flex items-center gap-4",children:[l.jsxs(De,{to:"/home",className:"flex items-center gap-2.5 shrink-0",children:[l.jsx(Pt.span,{animate:c?void 0:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:l.jsx(gt,{className:"text-blush-500",size:28})}),l.jsxs("span",{className:"leading-none",children:[l.jsx("span",{className:"block font-serif text-[20px] font-bold text-blush-900 tracking-tight",children:"Montvale"}),l.jsx("span",{className:"block font-display text-[12px] tracking-[0.35em] text-sage-600 uppercase -mt-0.5",children:"Florist"})]})]}),l.jsxs("form",{onSubmit:f,className:"flex-1 max-w-md hidden md:flex items-center bg-white border border-blush-100 rounded-full px-4 py-2.5 shadow-soft",children:[l.jsx(nh,{size:16,className:"text-blush-400"}),l.jsx("input",{value:u,onChange:h=>d(h.target.value),placeholder:e("common.searchPlaceholder"),className:"flex-1 bg-transparent ml-2 text-sm outline-none placeholder:text-blush-300"})]}),l.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-3 ml-auto",children:[l.jsx(Ey,{variant:"shop"}),l.jsxs(De,{to:"/",className:"hidden sm:flex items-center gap-1 text-sm text-sage-700 hover:text-blush-500 transition-colors",children:[l.jsx(km,{size:15})," ",t?`${t}`:e("shop.header.zip")]}),l.jsx(De,{to:"/wishlist","aria-label":e("shop.header.wishlist"),className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:l.jsx(Gd,{size:20})}),l.jsxs(De,{to:"/cart",className:"relative p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:[l.jsx(Dj,{size:20}),l.jsx(T0,{children:a>0&&l.jsx(Pt.span,{initial:c?!1:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-1 -right-1 bg-blush-500 text-white text-[10px] rounded-full min-w-[18px] h-[18px] px-1 flex items-center justify-center",children:a},a)})]}),l.jsx(De,{to:r?"/mypage":"/account",className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:l.jsx(s5,{size:20})})]})]}),l.jsx("nav",{className:"border-t border-blush-50 bg-white/60",children:l.jsx("div",{className:"max-w-6xl mx-auto px-4 h-11 flex items-center gap-7 text-[13px] overflow-x-auto thin-scroll",children:wQ.map(h=>{const p=o.pathname+o.search===h.to||h.to==="/home"&&o.pathname==="/home";return l.jsxs(De,{to:h.to,className:`relative whitespace-nowrap py-1 transition-colors ${h.accent?"text-sage-700 font-medium":"text-[#6b5258] hover:text-blush-500"} ${p?"text-blush-600":""}`,children:[e(`shop.nav.${h.key}`),p&&l.jsx(Pt.span,{layoutId:"nav-underline",className:"absolute -bottom-[1px] left-0 right-0 h-[2px] bg-blush-500 rounded-full"})]},h.to)})})})]}),l.jsx("main",{className:"flex-1",children:l.jsx(qD,{})}),l.jsxs("footer",{className:"mt-16 bg-sage-800 text-cream/85",children:[l.jsx("div",{className:"botanical-divider py-6 opacity-50",children:l.jsx(gt,{size:16})}),l.jsxs("div",{className:"max-w-6xl mx-auto px-4 pb-10 grid md:grid-cols-4 gap-8",children:[l.jsxs("div",{className:"md:col-span-1",children:[l.jsx("div",{className:"font-serif text-xl font-bold text-white mb-1",children:"Montvale Florist"}),l.jsx("p",{className:"font-display text-[13px] tracking-[0.3em] uppercase text-sage-300 mb-3",children:e("shop.footer.since",{year:Be.founded})}),l.jsx("p",{className:"text-[13px] leading-relaxed text-cream/70",children:Be.tagline}),l.jsx(dQ,{size:18,className:"mt-4 text-cream/80",iconClass:"hover:text-white"})]}),l.jsxs("div",{children:[l.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.visitUs")}),l.jsxs("p",{className:"text-[13px] flex items-start gap-1.5 text-cream/75 mb-1.5",children:[l.jsx(km,{size:14,className:"mt-0.5 shrink-0"})," ",Be.address]}),l.jsxs("a",{href:`tel:${Be.phoneTel}`,className:"text-[13px] flex items-center gap-1.5 text-cream/75 hover:text-white mb-1.5",children:[l.jsx(TE,{size:14})," ",Be.phone]}),l.jsx("p",{className:"text-[13px] text-cream/60",children:Be.email})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"font-semibold text-white mb-3 text-sm flex items-center gap-1.5",children:[l.jsx(q$,{size:14})," ",e("shop.footer.hours")]}),Be.hours.map(h=>l.jsxs("div",{className:"text-[13px] text-cream/75 mb-1",children:[l.jsx("span",{className:"inline-block w-20",children:h.day})," ",h.open]},h.day))]}),l.jsxs("div",{children:[l.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.customerCare")}),l.jsxs(De,{to:"/cs",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[l.jsx(qu,{size:13})," ",e("shop.footer.contactAiHelp")]}),l.jsxs(De,{to:"/orders",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[l.jsx(qu,{size:13})," ",e("shop.footer.orderStatus")]}),l.jsxs(De,{to:"/subscription",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[l.jsx(qu,{size:13})," ",e("shop.footer.subscriptions")]}),l.jsxs(De,{to:"/app",className:"flex items-center gap-1 text-[13px] text-gold hover:text-white mb-3 font-medium",children:[l.jsx(qu,{size:13})," ",e("shop.footer.getApp")]}),l.jsx("div",{className:"text-[11px] text-cream/50 mb-1.5",children:e("shop.footer.weAccept")}),l.jsx(K5,{items:Be.payments})]})]}),l.jsx("div",{className:"border-t border-cream/10",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex flex-col sm:flex-row items-center justify-between gap-2 text-[11px] text-cream/50",children:[l.jsxs("span",{children:["© 2026 Montvale Florist · ",Be.address]}),l.jsx("span",{className:"flex flex-wrap gap-3",children:Be.policies.map(h=>l.jsx("span",{className:"hover:text-cream/80",children:h},h))})]})})]})]})}function uc({p:e}){var a;const t=li(),n=e.salePrice!=null&&e.salePrice>0&&e.salePrice<(e.price||0),r=n?Math.round((1-e.salePrice/e.price)*100):0;return l.jsx(Pt.div,{whileHover:t?void 0:{y:-8},transition:{type:"spring",stiffness:300,damping:24},className:"group h-full",children:l.jsxs(De,{to:`/product/${e.id}`,className:"block h-full bg-white rounded-3xl overflow-hidden border border-blush-100/70 shadow-soft hover:shadow-bloom transition-shadow duration-500",children:[l.jsxs("div",{className:"relative aspect-[4/5] zoom-frame bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center",children:[e.thumbnail?l.jsx("img",{src:e.thumbnail,alt:e.name,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):l.jsx(gt,{className:"text-blush-200",size:56}),n&&l.jsxs("span",{className:"absolute top-3 left-3 bg-blush-500 text-white text-[11px] font-semibold px-2.5 py-1 rounded-full shadow-petal",children:["-",r,"%"]}),e.occasion&&l.jsx("span",{className:"absolute top-3 right-3 bg-white/85 backdrop-blur text-sage-700 text-[10px] uppercase tracking-wide px-2.5 py-1 rounded-full",children:e.occasion}),l.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-t from-blush-900/10 to-transparent"})]}),l.jsxs("div",{className:"p-4",children:[e.brand&&l.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-sage-600 mb-0.5",children:e.brand}),l.jsx("div",{className:"font-serif text-[15px] leading-snug text-blush-900 truncate",children:e.name}),l.jsxs("div",{className:"flex items-center justify-between mt-2",children:[l.jsx("div",{className:"flex items-baseline gap-1.5",children:n?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-blush-600 font-bold",children:Oe(e.salePrice)}),l.jsx("span",{className:"text-gray-400 line-through text-xs",children:Oe(e.price)})]}):l.jsx("span",{className:"font-bold text-blush-900",children:Oe(e.price)})}),e.ratingAvg!=null&&e.reviewCount?l.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-gold",children:[l.jsx(ri,{size:12,fill:"currentColor"}),(a=e.ratingAvg)==null?void 0:a.toFixed(1)]}):null]})]})]})})}const AQ=[gG,gt,Qc],OQ=6e3;function NQ(){const{storeName:e}=wn(),t=li(),n=j.useRef(null),{scrollYProgress:r}=aK({target:n,offset:["start start","end start"]}),a=wx(r,[0,1],["0%",t?"0%":"28%"]),i=wx(r,[0,1],[1,t?1:1.12]),s=wx(r,[0,.8],[1,t?1:.2]),[o,c]=j.useState(0),[u,d]=j.useState(1),f=Px.length,h=j.useCallback(g=>{d(g>o||o===f-1&&g===0?1:-1),c((g%f+f)%f)},[o,f]);j.useEffect(()=>{if(t)return;const g=setInterval(()=>{d(1),c(m=>(m+1)%f)},OQ);return()=>clearInterval(g)},[t,f]);const p=Px[o];return l.jsxs("section",{ref:n,className:"relative overflow-hidden min-h-[78vh] flex items-center",children:[l.jsxs(Pt.div,{style:{y:a,scale:i},className:"absolute inset-0 z-0",children:[l.jsx(T0,{initial:!1,children:l.jsx(Pt.img,{src:p.img,alt:"",className:"absolute inset-0 w-full h-full object-cover",initial:{opacity:0,scale:t?1:1.06},animate:{opacity:1,scale:1},exit:{opacity:0},transition:{duration:t?0:1.1,ease:[.22,1,.36,1]}},p.img)}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blush-900/70 via-blush-900/40 to-transparent"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-sage-900/40 to-transparent"})]}),l.jsx(ch,{count:16,className:"z-[1]"}),l.jsx(Pt.div,{style:{opacity:s},className:"relative z-10 max-w-6xl mx-auto px-4 w-full py-20",children:l.jsx(T0,{mode:"wait",custom:u,children:l.jsxs(Pt.div,{className:"max-w-xl",custom:u,initial:t?!1:{opacity:0,x:u*36},animate:{opacity:1,x:0},exit:t?{opacity:0}:{opacity:0,x:u*-36},transition:{duration:.7,ease:[.22,1,.36,1]},children:[l.jsxs("div",{className:"inline-flex items-center gap-2 text-cream/90 text-[12px] tracking-[0.25em] uppercase mb-5",children:[l.jsx("span",{className:"h-px w-8 bg-gold"})," ",p.eyebrow]}),l.jsx("h1",{className:"font-serif text-5xl md:text-6xl font-bold text-white leading-[1.05] mb-5 whitespace-pre-line drop-shadow-sm",children:p.headline}),l.jsxs("p",{className:"text-cream/90 text-lg leading-relaxed mb-8 max-w-md font-light",children:[p.subtext,e?` Same-day from ${e}.`:""]}),l.jsxs("div",{className:"flex flex-wrap gap-3",children:[l.jsx(De,{to:p.to,children:l.jsxs(Ya,{className:"inline-flex items-center gap-2 bg-white text-blush-700 font-semibold px-7 py-3.5 rounded-full shadow-bloom hover:bg-cream",children:[p.cta," ",l.jsx(Rs,{size:17})]})}),l.jsx(De,{to:"/daily-standard",children:l.jsxs(Ya,{className:"inline-flex items-center gap-2 border border-white/70 text-white px-7 py-3.5 rounded-full hover:bg-white/10",children:[l.jsx(kj,{size:16})," Today's Bouquet"]})})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-7 text-cream/85 text-sm",children:[l.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(g=>l.jsx(ri,{size:15,fill:"currentColor"},g))}),l.jsx("span",{className:"font-medium",children:Be.rating}),l.jsxs("span",{className:"text-cream/60",children:["· ",Be.reviewCount.toLocaleString()," happy customers"]})]})]},o)})}),l.jsx("button",{"aria-label":"Previous slide",onClick:()=>h(o-1),className:"absolute left-3 md:left-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:l.jsx(cG,{size:22})}),l.jsx("button",{"aria-label":"Next slide",onClick:()=>h(o+1),className:"absolute right-3 md:right-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:l.jsx(qu,{size:22})}),l.jsx("div",{className:"absolute bottom-7 left-1/2 -translate-x-1/2 z-20 flex items-center gap-2.5",children:Px.map((g,m)=>l.jsx("button",{"aria-label":`Go to slide ${m+1}`,onClick:()=>h(m),className:`h-2.5 rounded-full transition-all duration-300 ${m===o?"w-8 bg-white":"w-2.5 bg-white/45 hover:bg-white/70"}`},m))}),l.jsx(Pt.div,{"aria-hidden":!0,className:"absolute -bottom-6 right-6 z-[2] text-white/20 hidden md:block pointer-events-none",animate:t?void 0:{rotate:[0,5,-4,0],y:[0,-8,0]},transition:{duration:9,repeat:1/0,ease:"easeInOut"},children:l.jsx(gt,{size:130,strokeWidth:1})})]})}function EQ(){var i,s,o;const{data:e}=oe({queryKey:["ai-rec"],queryFn:()=>U5("","",8)}),{data:t}=oe({queryKey:["best"],queryFn:()=>cc({sort:"sales",size:8})}),{data:n}=oe({queryKey:["feat"],queryFn:()=>cc({sort:"rating",size:12})}),r=(t==null?void 0:t.items)||[],a=(n==null?void 0:n.items)||[];return l.jsxs("div",{children:[l.jsx(NQ,{}),l.jsx("section",{className:"bg-ivory border-b border-blush-100",children:l.jsx("div",{className:"max-w-6xl mx-auto px-4 py-10 grid md:grid-cols-3 gap-6",children:Be.promise.map((c,u)=>{const d=AQ[u];return l.jsxs(Jr,{delay:u*.1,className:"flex items-start gap-3",children:[l.jsx("span",{className:"shrink-0 w-11 h-11 rounded-full bg-blush-50 text-blush-500 flex items-center justify-center",children:l.jsx(d,{size:20})}),l.jsxs("div",{children:[l.jsx("div",{className:"font-serif text-lg text-blush-900",children:c.title}),l.jsx("p",{className:"text-sm text-[#6b5258] leading-relaxed mt-0.5",children:c.desc})]})]},c.title)})})}),l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-14 space-y-20",children:[l.jsxs("section",{children:[l.jsxs(Jr,{className:"flex items-end justify-between mb-7",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[l.jsx(Rn,{size:15})," Curated by GUARDiA AI · On-premise"]}),l.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Picked Just for You"})]}),l.jsxs(De,{to:"/category",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",l.jsx(Rs,{size:15})]})]}),l.jsxs($m,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:[(e||[]).slice(0,8).map(c=>l.jsx(Lm,{children:l.jsx(uc,{p:c})},c.id)),!(e||[]).length&&l.jsx("div",{className:"col-span-4 text-blush-300 text-sm py-12 text-center",children:"Curating fresh picks…"})]})]}),l.jsx("div",{className:"botanical-divider",children:l.jsx(gt,{size:18})}),l.jsx(Jr,{children:l.jsxs("section",{className:"relative overflow-hidden rounded-4xl bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[l.jsx(ch,{count:8}),l.jsxs("div",{className:"relative z-10 p-8 md:p-12 flex flex-col md:flex-row items-center justify-between gap-6",children:[l.jsxs("div",{className:"max-w-lg",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[l.jsx(kj,{size:15})," Farmgirl-style daily"]}),l.jsx("h3",{className:"font-serif text-3xl md:text-4xl font-bold mb-3",children:"Today's Designer Bouquet"}),l.jsx("p",{className:"text-cream/85 leading-relaxed",children:"Made fresh each morning with whatever's most beautiful in the cooler — hand-designed by our florists and curated by GUARDiA AI. Limited daily stock."})]}),l.jsx(De,{to:"/daily-standard",children:l.jsxs(Ya,{className:"inline-flex items-center gap-2 bg-white text-sage-800 font-semibold px-7 py-3.5 rounded-full shadow-bloom",children:["See today's bouquet ",l.jsx(Rs,{size:16})]})})]})]})}),l.jsxs("section",{children:[l.jsxs(Jr,{className:"flex items-end justify-between mb-7",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[l.jsx(ri,{size:14})," Most loved"]}),l.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Bestsellers"})]}),l.jsxs(De,{to:"/category?sort=sales",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",l.jsx(Rs,{size:15})]})]}),l.jsx($m,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(c=>l.jsx(Lm,{children:l.jsx(uc,{p:c})},c.id))})]}),l.jsx(Jr,{children:l.jsx("section",{className:"grid md:grid-cols-3 gap-5",children:[{to:"/category?occasion=ROMANCE",label:"Love & Romance",sub:"Roses that speak from the heart",img:(i=a[1])==null?void 0:i.thumbnail},{to:"/category?occasion=SYMPATHY",label:"Sympathy & Comfort",sub:"Thoughtful tributes, gently delivered",img:(s=a[2])==null?void 0:s.thumbnail},{to:"/subscription",label:"Flower Subscriptions",sub:"Fresh blooms, week after week",img:(o=a[3])==null?void 0:o.thumbnail}].map((c,u)=>l.jsxs(De,{to:c.to,className:"group relative rounded-3xl overflow-hidden zoom-frame aspect-[5/4] block shadow-soft",children:[c.img?l.jsx("img",{src:c.img,alt:"",loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):l.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blush-100 to-sage-100"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-blush-900/75 via-blush-900/20 to-transparent"}),l.jsxs("div",{className:"absolute bottom-0 left-0 p-6 text-white",children:[l.jsx("div",{className:"font-serif text-xl font-semibold mb-0.5",children:c.label}),l.jsx("p",{className:"text-cream/85 text-sm",children:c.sub}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] text-gold mt-2 group-hover:gap-2 transition-all",children:["Explore ",l.jsx(Rs,{size:14})]})]})]},c.to))})}),l.jsx(Jr,{children:l.jsxs("section",{className:"rounded-4xl bg-blush-50 border border-blush-100 p-8 md:p-10 text-center",children:[l.jsx("div",{className:"flex justify-center mb-4",children:l.jsx("span",{className:"w-12 h-12 rounded-full bg-white text-blush-500 flex items-center justify-center shadow-soft",children:l.jsx(ah,{size:22})})}),l.jsxs("h3",{className:"font-serif text-2xl text-blush-900 mb-2",children:["Your Local Florist Since ",Be.founded]}),l.jsx("p",{className:"text-[#6b5258] max-w-xl mx-auto leading-relaxed text-[15px]",children:Be.about}),l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 mt-5 text-[12px] text-sage-700",children:[l.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Same-Day Delivery"}),l.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Hand-Delivered"}),l.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"100% Satisfaction"}),l.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"No-Contact Available"})]})]})})]})]})}const KE=[["","All"],["BIRTHDAY","Birthday"],["ANNIVERSARY","Anniversary"],["SYMPATHY","Sympathy"],["CONGRATS","Congrats"],["ROMANCE","Romance"]],TQ=[["","Recommended"],["price_asc","Price ↑"],["price_desc","Price ↓"],["sales","Bestselling"],["rating","Top rated"]];function CQ(){var v;const[e,t]=WD(),n=e.get("occasion")||"",[r,a]=j.useState(e.get("sort")||""),[i,s]=j.useState(""),[o,c]=j.useState(""),[u,d]=j.useState(null);oe({queryKey:["cats"],queryFn:D5});const{data:f}=oe({queryKey:["products",n,r,i],queryFn:()=>cc({occasion:n,sort:r,maxPrice:i?Number(i):void 0,size:24})}),h=u?u.items:(f==null?void 0:f.items)||[],p=y=>{const x=new URLSearchParams(e);y?x.set("occasion",y):x.delete("occasion"),t(x),d(null)},g=async y=>{if(y.preventDefault(),!o.trim()){d(null);return}const x=await F5(o.trim()).catch(()=>null);d(x)},m=((v=KE.find(y=>y[0]===n))==null?void 0:v[1])||"All";return l.jsxs("div",{children:[l.jsx("section",{className:"bg-gradient-to-br from-blush-50 to-ivory border-b border-blush-100",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[l.jsx("div",{className:"text-[12px] tracking-[0.2em] uppercase text-sage-600 mb-2",children:"Shop the collection"}),l.jsx("h1",{className:"font-serif text-4xl text-blush-900",children:m==="All"?"All Flowers":m})]})}),l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[l.jsxs("form",{onSubmit:g,className:"flex items-center gap-2 bg-white border border-blush-100 rounded-full px-5 py-3 mb-6 max-w-xl shadow-soft",children:[l.jsx(Rn,{size:16,className:"text-blush-500"}),l.jsx("input",{value:o,onChange:y=>c(y.target.value),placeholder:'Try "anniversary roses under $80"',className:"flex-1 text-sm outline-none bg-transparent placeholder:text-blush-300"}),l.jsx("button",{className:"text-blush-500 text-sm font-semibold",children:"AI Search"})]}),u&&l.jsxs("div",{className:"text-xs text-sage-700 mb-4",children:["AI understood: ",l.jsx("span",{className:"font-medium",children:JSON.stringify(u.parsed)})," · ",u.source]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-7",children:[KE.map(([y,x])=>l.jsx("button",{onClick:()=>p(y),className:`px-4 py-1.5 rounded-full text-sm border transition-colors ${n===y?"bg-blush-500 text-white border-blush-500":"bg-white text-[#6b5258] border-blush-100 hover:border-blush-300"}`,children:x},y)),l.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[l.jsx(DG,{size:15,className:"text-blush-300"}),l.jsx("input",{value:i,onChange:y=>{s(y.target.value.replace(/\D/g,"")),d(null)},placeholder:"Max $",className:"w-24 px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none focus:border-blush-300"}),l.jsx("select",{value:r,onChange:y=>{a(y.target.value),d(null)},className:"px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none bg-white",children:TQ.map(([y,x])=>l.jsx("option",{value:y,children:x},y))})]})]}),l.jsx($m,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:h.map(y=>l.jsx(Lm,{children:l.jsx(uc,{p:y})},y.id))}),!h.length&&l.jsxs(Jr,{className:"text-center text-blush-300 py-20",children:[l.jsx(gt,{size:40,className:"mx-auto mb-3 text-blush-200"}),"No flowers match those filters."]})]})]})}function _Q(){const{t:e}=ci(),[t]=WD(),n=t.get("q")||"",{data:r,isLoading:a}=oe({queryKey:["nl-search",n],queryFn:()=>F5(n),enabled:!!n}),i=(r==null?void 0:r.items)||[];return l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(Rn,{className:"text-bloom",size:20}),l.jsx("h1",{className:"font-serif text-2xl font-bold",children:e("search.resultsFor",{query:n})})]}),(r==null?void 0:r.parsed)&&l.jsxs("div",{className:"text-xs text-bloom2 mb-5",children:[e("search.aiUnderstood")," ",l.jsx("span",{className:"font-medium",children:JSON.stringify(r.parsed)})," · ",r.source]}),a&&l.jsx("div",{className:"text-gray-400 py-10 text-center",children:e("search.searching")}),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(s=>l.jsx(uc,{p:s},s.id))}),!a&&!i.length&&l.jsx("div",{className:"text-center text-gray-400 py-16",children:e("search.noResults")})]})}function PQ(){var ne,J,ve;const{id:e}=UD(),t=Number(e),n=Xt(),r=li(),{custToken:a,setCartCount:i}=wn(),[s,o]=j.useState(""),[c,u]=j.useState(null),[d,f]=j.useState(null),[h,p]=j.useState(""),[g,m]=j.useState(1),[v,y]=j.useState(""),[x,b]=j.useState(!1),[w,S]=j.useState(null),{data:A}=oe({queryKey:["product",t],queryFn:()=>R5(t)}),{data:O}=oe({queryKey:["reviews",t],queryFn:()=>fX(t)}),{data:N}=oe({queryKey:["rstats",t],queryFn:()=>hX(t)}),{data:E}=oe({queryKey:["aisum",t],queryFn:()=>NX(t)});if(!A)return l.jsx("div",{className:"max-w-6xl mx-auto px-4 py-24 text-center text-blush-300",children:"Loading…"});const T=A.sizes||[],_=T.find(ee=>ee.sizeCode===s)||T[0],C=A.options||[],$=C.filter(ee=>ee.optionType==="VASE"),R=C.filter(ee=>ee.optionType==="WRAP"),k=ee=>C.find(ct=>ct.id===ee),M=_?_.price:A.salePrice&&A.salePrice>0?A.salePrice:A.price,L=(((ne=k(c))==null?void 0:ne.extraPrice)||0)+(((J=k(d))==null?void 0:J.extraPrice)||0),z=(M+L)*g,V=w||A.thumbnail,K=async()=>{if(!a){n("/account");return}try{await ZW({productId:A.id,optionId:c||d||null,sizeCode:(_==null?void 0:_.sizeCode)||"",cardMessage:h,quantity:g}),i(ee=>ee+g),y("Added to your cart.")}catch{y("Could not add to cart.")}},U=async()=>{await K(),n("/cart")},G=async()=>{if(!a){n("/account");return}b(!0),setTimeout(()=>b(!1),700),await bX(A.id).catch(()=>{}),y("Saved to your wishlist.")};return l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-10",children:[l.jsxs(Jr,{children:[l.jsx("div",{className:"relative aspect-[4/5] rounded-4xl overflow-hidden bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center shadow-soft",children:V?l.jsx(Pt.img,{src:V,alt:A.name,initial:r?!1:{opacity:0,scale:1.04},animate:{opacity:1,scale:1},transition:{duration:.6},className:"w-full h-full object-cover"},V):l.jsx(gt,{className:"text-blush-200",size:96})}),!!(A.images||[]).length&&l.jsxs("div",{className:"flex gap-2 mt-3",children:[l.jsx("button",{onClick:()=>S(null),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w?"border-blush-100":"border-blush-400"}`,children:A.thumbnail?l.jsx("img",{src:A.thumbnail,className:"w-full h-full object-cover"}):l.jsx(gt,{className:"text-blush-200 m-auto",size:20})}),A.images.map((ee,ct)=>l.jsx("button",{onClick:()=>S(ee),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w===ee?"border-blush-400":"border-blush-100"}`,children:l.jsx("img",{src:ee,className:"w-full h-full object-cover"})},ct))]})]}),l.jsxs(Jr,{delay:.1,children:[A.brand&&l.jsx("div",{className:"text-[11px] uppercase tracking-[0.2em] text-sage-600 mb-1",children:A.brand}),l.jsx("h1",{className:"font-serif text-3xl font-bold text-blush-900 mb-2 leading-tight",children:A.name}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-gold mb-4",children:[l.jsx(ri,{size:15,fill:"currentColor"})," ",((ve=A.ratingAvg)==null?void 0:ve.toFixed(1))||"–",l.jsxs("span",{className:"text-[#a08a90]",children:["(",A.reviewCount||0," reviews)"]}),A.occasion&&l.jsx("span",{className:"text-xs bg-blush-50 text-blush-700 px-2.5 py-0.5 rounded-full ml-1",children:A.occasion})]}),l.jsx("p",{className:"text-[#6b5258] text-[15px] mb-6 leading-relaxed",children:A.description}),!!T.length&&l.jsxs("div",{className:"mb-6",children:[l.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Choose your size"}),l.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:T.map(ee=>l.jsxs(Ya,{onClick:()=>o(ee.sizeCode),className:`rounded-2xl border p-3 text-center transition-colors ${(_==null?void 0:_.sizeCode)===ee.sizeCode?"border-blush-400 bg-blush-50":"border-blush-100 hover:border-blush-300"}`,children:[l.jsx("div",{className:"font-semibold text-sm text-blush-900",children:ee.label}),l.jsxs("div",{className:"text-xs text-[#8a7077]",children:[ee.stemCount," stems"]}),l.jsx("div",{className:"text-blush-600 font-bold text-sm mt-1",children:Oe(ee.price)})]},ee.sizeCode))})]}),!!$.length&&l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Add a vase"}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(Kh,{active:c===null,onClick:()=>u(null),children:"No vase"}),$.map(ee=>l.jsxs(Kh,{active:c===ee.id,onClick:()=>u(ee.id),children:[ee.optionValue," +",Oe(ee.extraPrice)]},ee.id))]})]}),!!R.length&&l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Wrapping"}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(Kh,{active:d===null,onClick:()=>f(null),children:"Standard"}),R.map(ee=>l.jsxs(Kh,{active:d===ee.id,onClick:()=>f(ee.id),children:[ee.optionValue," +",Oe(ee.extraPrice)]},ee.id))]})]}),l.jsxs("div",{className:"mb-5",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-sm font-medium text-blush-900",children:"Card message"}),l.jsxs(De,{to:"/cs",className:"text-xs text-blush-500 flex items-center gap-1",children:[l.jsx(Rn,{size:12})," AI message helper"]})]}),l.jsx("textarea",{value:h,onChange:ee=>p(ee.target.value),rows:2,maxLength:200,placeholder:"Write a heartfelt note for the recipient…",className:"w-full px-3.5 py-2.5 rounded-2xl border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),l.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[l.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full",children:[l.jsx("button",{onClick:()=>m(ee=>Math.max(1,ee-1)),className:"px-3.5 py-1.5 text-blush-600",children:"−"}),l.jsx("span",{className:"px-2 text-sm w-8 text-center",children:g}),l.jsx("button",{onClick:()=>m(ee=>ee+1),className:"px-3.5 py-1.5 text-blush-600",children:"+"})]}),l.jsx("div",{className:"font-serif text-2xl font-bold text-blush-900",children:Oe(z)})]}),v&&l.jsx("div",{className:"text-sm text-sage-700 mb-3",children:v}),l.jsxs("div",{className:"flex gap-3",children:[l.jsxs(Ya,{onClick:K,className:"flex-1 flex items-center justify-center gap-2 border border-blush-400 text-blush-600 font-semibold py-3.5 rounded-full hover:bg-blush-50",children:[l.jsx(Dj,{size:18})," Add to Cart"]}),l.jsx(Ya,{onClick:U,className:"flex-1 bg-blush-500 text-white font-semibold py-3.5 rounded-full hover:bg-blush-600 shadow-petal",children:"Buy Now"}),l.jsx("button",{onClick:G,className:`px-4 border border-blush-100 rounded-full text-blush-500 hover:bg-blush-50 ${x?"animate-heartbeat":""}`,children:l.jsx(Gd,{size:18,fill:x?"currentColor":"none"})})]}),l.jsxs("div",{className:"flex items-center gap-5 mt-5 text-xs text-sage-700",children:[l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(ah,{size:14})," Same-day local delivery"]}),l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(Qc,{size:14})," 100% satisfaction"]})]}),l.jsx("div",{className:"mt-4 pt-4 border-t border-blush-100/60",children:l.jsx(fQ,{url:typeof window<"u"?window.location.href:"",title:A.name,image:A.thumbnail||""})})]})]}),l.jsxs("div",{className:"mt-16",children:[l.jsx("div",{className:"botanical-divider mb-8",children:l.jsx(gt,{size:16})}),l.jsxs("h2",{className:"font-serif text-2xl font-bold text-blush-900 mb-5",children:["Reviews (",(N==null?void 0:N.count)??A.reviewCount??0,")"]}),(E==null?void 0:E.summary)&&l.jsxs(Jr,{className:"bg-gradient-to-br from-blush-50 to-sage-50 border border-blush-100 rounded-3xl p-5 mb-6",children:[l.jsxs("div",{className:"flex items-center gap-2 text-blush-700 font-medium text-sm mb-1.5",children:[l.jsx(Rn,{size:15})," AI Review Summary ",l.jsx("span",{className:"text-xs text-[#a08a90]",children:E.source})]}),l.jsx("p",{className:"text-sm text-[#5a474d] leading-relaxed",children:E.summary})]}),l.jsxs("div",{className:"space-y-3",children:[(O||[]).map(ee=>l.jsxs("div",{className:"bg-white rounded-3xl border border-blush-100/70 p-5 shadow-soft",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-medium text-sm text-blush-900",children:ee.title||"Review"}),l.jsxs("span",{className:"flex items-center gap-0.5 text-gold text-sm",children:[l.jsx(ri,{size:13,fill:"currentColor"}),ee.rating]})]}),l.jsx("p",{className:"text-sm text-[#6b5258] mt-1.5 leading-relaxed",children:ee.content})]},ee.id)),!(O||[]).length&&l.jsx("div",{className:"text-blush-300 text-sm py-8 text-center",children:"No reviews yet — be the first."})]}),l.jsx(De,{to:`/review/${A.id}`,className:"inline-flex items-center gap-1 mt-5 text-sm text-blush-500 font-semibold hover:text-blush-700",children:"Write a review →"})]})]})}function Kh({active:e,onClick:t,children:n}){return l.jsx("button",{onClick:t,className:`px-3.5 py-1.5 rounded-full text-sm border transition-colors ${e?"bg-blush-500 text-white border-blush-500":"border-blush-100 text-[#6b5258] hover:border-blush-300"}`,children:n})}function MQ(){const{t:e}=ci(),t=Wt(),n=Xt(),{custToken:r,setCartCount:a}=wn(),{data:i}=oe({queryKey:["cart"],queryFn:Vj,enabled:!!r}),s=()=>t.invalidateQueries({queryKey:["cart"]}),o=async(f,h)=>{h<1||(await JW(f,h),s())},c=async f=>{await eX(f),s(),a(h=>Math.max(0,h-1))};if(!r)return l.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-20 text-center",children:[l.jsx(Dj,{className:"mx-auto text-bloom/40 mb-3",size:48}),l.jsx("p",{className:"text-gray-500 mb-4",children:e("cart.signInPrompt")}),l.jsx(De,{to:"/account",className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:e("cart.signInRegister")})]});const u=i||[],d=u.reduce((f,h)=>f+(h.price||(h.unitPrice||0)*(h.quantity||1)),0);return l.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[l.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:e("cart.title")}),u.length?l.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[l.jsx("div",{className:"md:col-span-2 space-y-3",children:u.map(f=>l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex gap-4",children:[l.jsx("div",{className:"w-20 h-20 bg-petal rounded-xl flex items-center justify-center overflow-hidden shrink-0",children:f.thumbnail?l.jsx("img",{src:f.thumbnail,className:"w-full h-full object-cover"}):l.jsx(gt,{className:"text-bloom/30",size:32})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium text-sm",children:f.productName||`Product #${f.productId}`}),l.jsxs("div",{className:"text-xs text-gray-500",children:[f.sizeCode,f.cardMessage?` · ${e("cart.card")}: ${f.cardMessage.slice(0,20)}`:""]}),l.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[l.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full text-sm",children:[l.jsx("button",{onClick:()=>o(f.id,(f.quantity||1)-1),className:"px-2.5 py-1 text-bloom2",children:"−"}),l.jsx("span",{className:"px-1 w-6 text-center",children:f.quantity||1}),l.jsx("button",{onClick:()=>o(f.id,(f.quantity||1)+1),className:"px-2.5 py-1 text-bloom2",children:"+"})]}),l.jsx("button",{onClick:()=>c(f.id),className:"text-blush-400 hover:text-blush-600",children:l.jsx(Q0,{size:16})})]})]}),l.jsx("div",{className:"font-bold text-bloom2 text-sm",children:Oe(f.price||(f.unitPrice||0)*(f.quantity||1))})]},f.id))}),l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit",children:[l.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[l.jsx("span",{className:"text-gray-500",children:e("cart.subtotal")}),l.jsx("span",{className:"font-medium",children:Oe(d)})]}),l.jsxs("div",{className:"flex justify-between text-sm mb-3",children:[l.jsx("span",{className:"text-gray-500",children:e("cart.shippingTax")}),l.jsx("span",{className:"text-gray-400",children:e("cart.calcAtCheckout")})]}),l.jsxs("div",{className:"border-t border-blush-100/60 pt-3 flex justify-between font-bold",children:[l.jsx("span",{children:e("cart.total")}),l.jsx("span",{className:"text-bloom2",children:Oe(d)})]}),l.jsx("button",{onClick:()=>n("/checkout"),className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:e("cart.checkout")})]})]}):l.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("cart.empty")," ",l.jsx(De,{to:"/category",className:"text-bloom",children:e("cart.startShopping")})]})]})}function kQ(e){const t=[],n=new Date;for(let r=0;r<e;r++){const a=new Date(n);a.setDate(n.getDate()+r),t.push(a.toISOString().slice(0,10))}return t}function RQ(){var zo;const e=Xt(),{custToken:t,storeId:n,zip:r,setCartCount:a}=wn(),[i,s]=j.useState("DELIVERY"),[o,c]=j.useState(n||0),[u,d]=j.useState(""),[f,h]=j.useState(null),[p,g]=j.useState(""),[m,v]=j.useState(""),[y,x]=j.useState(""),[b,w]=j.useState(r||""),[S,A]=j.useState(""),[O,N]=j.useState(""),[E,T]=j.useState(0),[_,C]=j.useState("CARD"),[$,R]=j.useState({last4:"",expiry:"",complete:!1}),[k,M]=j.useState(null),[L,z]=j.useState(null),[V,K]=j.useState(!1),[U,G]=j.useState(null),[ne,J]=j.useState(""),{data:ve}=oe({queryKey:["cart"],queryFn:Vj,enabled:!!t}),{data:ee}=oe({queryKey:["stores"],queryFn:()=>Co(!0)}),{data:ct}=oe({queryKey:["loyalty-me"],queryFn:Hj,enabled:!!t}),{data:Ke}=oe({queryKey:["holidays"],queryFn:$5}),{data:X}=oe({queryKey:["avail",o,u],queryFn:()=>XW(o,u),enabled:!!o&&!!u});j.useEffect(()=>{!o&&(ee!=null&&ee.length)&&c(ee[0].id)},[ee]);const le=ve||[],Q=le.reduce((ce,Ut)=>ce+(Ut.price||(Ut.unitPrice||0)*(Ut.quantity||1)),0),q=X!=null&&X.surgeMultiplier&&X.surgeMultiplier>1?Q*(X.surgeMultiplier-1):0,ke=((zo=ct==null?void 0:ct.benefit)==null?void 0:zo.discountRate)||0,xe=Q*(ke/100),Ze=(L==null?void 0:L.taxAmount)||0,ut=(ct==null?void 0:ct.pointBalance)||0,pt=Math.min(ut,Math.floor(Q)),Ln=Math.max(0,Q+q+Ze-xe-E),pi=j.useMemo(()=>new Set((Ke||[]).filter(ce=>ce.blocked).map(ce=>ce.holidayDate)),[Ke]),Io=async()=>{if(!y||!b)return;const ce=await AX(y,b).catch(()=>null);M(ce)},Sa=async()=>{var Pr;const ce=((Pr=ee==null?void 0:ee.find(xh=>xh.id===o))==null?void 0:Pr.state)||"",Ut=await jX(Q,b||"",ce).catch(()=>null);z(Ut)};j.useEffect(()=>{Q>0&&o&&Sa()},[Q,o,b]);const wa=async()=>{var ce,Ut;if(J(""),!t){e("/account");return}if(!le.length){J("Your cart is empty.");return}if(!u||!f){J("Please select a delivery/pickup date and time slot.");return}if(i==="DELIVERY"&&(!y||!p)){J("Please enter the recipient and delivery address.");return}if(_==="CARD"&&!$.complete){J("Please enter your card details.");return}K(!0);try{const Pr=await nX({storeId:o,fulfillmentType:i,receiverName:p,receiverPhone:m,address:i==="DELIVERY"?y:"",deliveryZip:b,scheduledDate:u,slotId:f.id,slotLabel:f.label,cardMessage:S,memo:O,couponId:null,discountAmount:Math.round((xe+E)*100)/100,taxAmount:Ze,surgeAmount:Math.round(q*100)/100});await aX({orderId:Pr.id,amount:Ln,method:_,usePoints:E,cardLast4:_==="CARD"?$.last4:""}).catch(()=>{}),a(0),G(Pr)}catch(Pr){J(((Ut=(ce=Pr==null?void 0:Pr.response)==null?void 0:ce.data)==null?void 0:Ut.message)||"Order failed. Please try again in a moment.")}finally{K(!1)}};return t?U?l.jsxs("div",{className:"max-w-lg mx-auto px-4 py-20 text-center",children:[l.jsx(H$,{className:"mx-auto text-leaf mb-4",size:56}),l.jsx("h1",{className:"font-serif text-2xl font-bold mb-2",children:"Your order has been placed"}),l.jsxs("p",{className:"text-gray-500 mb-1",children:["Order Number ",l.jsx("span",{className:"font-semibold text-bloom2",children:U.orderNo||`#${U.id}`})]}),l.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[u," · ",f==null?void 0:f.label," · ",Oe(Ln)]}),l.jsxs("div",{className:"flex gap-3 justify-center",children:[l.jsx("button",{onClick:()=>e("/orders"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Order History"}),l.jsx("button",{onClick:()=>e("/home"),className:"border border-blush-100 px-6 py-2.5 rounded-full text-bloom2",children:"Continue Shopping"})]})]}):l.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[l.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:"Checkout"}),l.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[l.jsxs("div",{className:"md:col-span-2 space-y-5",children:[l.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[l.jsx("div",{className:"text-sm font-semibold mb-3",children:"Fulfillment Method"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("button",{onClick:()=>s("DELIVERY"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="DELIVERY"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[l.jsx(ah,{size:18})," Local Delivery"]}),l.jsxs("button",{onClick:()=>s("PICKUP"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="PICKUP"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[l.jsx(rh,{size:18})," Store Pickup"]})]}),l.jsxs("div",{className:"mt-3",children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Store"}),l.jsx("select",{value:o,onChange:ce=>c(Number(ce.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:(ee||[]).map(ce=>l.jsxs("option",{value:ce.id,children:[ce.name," (",ce.city,", ",ce.state,")"]},ce.id))})]})]}),l.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[l.jsx(F$,{size:16,className:"text-bloom"})," Delivery / Pickup Date"]}),l.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:kQ(14).map(ce=>{const Ut=pi.has(ce),Pr=u===ce,xh=new Date(ce);return l.jsxs("button",{disabled:Ut,onClick:()=>{d(ce),h(null)},className:`shrink-0 w-16 py-2 rounded-xl border text-center text-xs ${Ut?"opacity-30 cursor-not-allowed border-blush-100":Pr?"border-bloom bg-bloom text-white":"border-blush-100 hover:border-bloom"}`,children:[l.jsx("div",{className:"font-semibold",children:xh.toLocaleDateString("en-US",{weekday:"short"})}),l.jsx("div",{className:"text-base",children:xh.getDate()}),Ut&&l.jsx("div",{className:"text-[9px]",children:"Closed"})]},ce)})}),u&&X&&l.jsxs("div",{className:"mt-3",children:[X.blocked&&l.jsxs("div",{className:"flex items-center gap-1.5 text-blush-500 text-xs mb-2",children:[l.jsx(Rm,{size:13})," Delivery is unavailable on this date (peak season / closed)."]}),X.surgeMultiplier>1&&l.jsxs("div",{className:"text-xs text-amber-600 mb-2",children:["⚡ Peak-season surge pricing ×",X.surgeMultiplier," applied"]}),X.sameDayAvailable&&l.jsxs("div",{className:"text-xs text-leaf mb-2",children:["Same-Day Delivery available (order by ",X.sameDayCutoff,")"]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium mb-2",children:[l.jsx(q$,{size:14,className:"text-bloom"})," Delivery Time Slot"]}),l.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[(X.slots||[]).map(ce=>{const Ut=ce.available===!1||ce.capacity!=null&&ce.booked>=ce.capacity;return l.jsx("button",{disabled:Ut,onClick:()=>h({id:ce.id,label:ce.slotLabel}),className:`py-2 rounded-lg border text-xs ${Ut?"opacity-30 cursor-not-allowed":(f==null?void 0:f.id)===ce.id?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 hover:border-bloom"}`,children:ce.slotLabel},ce.id)}),!(X.slots||[]).length&&l.jsx("div",{className:"col-span-3 text-gray-400 text-xs py-2",children:"No time slots available."})]})]})]}),i==="DELIVERY"&&l.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[l.jsx("div",{className:"text-sm font-semibold",children:"Recipient Information"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx("input",{value:p,onChange:ce=>g(ce.target.value),placeholder:"Recipient Name",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),l.jsx("input",{value:m,onChange:ce=>v(ce.target.value),placeholder:"Phone",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{value:y,onChange:ce=>x(ce.target.value),placeholder:"Delivery Address",className:"flex-1 px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),l.jsx("input",{value:b,onChange:ce=>w(ce.target.value.replace(/\D/g,"").slice(0,5)),placeholder:"ZIP",className:"w-24 px-3 py-2 rounded-xl border border-blush-100 text-sm text-center outline-none focus:border-bloom"}),l.jsxs("button",{onClick:Io,className:"px-3 rounded-xl border border-bloom text-bloom text-sm font-semibold flex items-center gap-1",children:[l.jsx(km,{size:14})," Verify"]})]}),k&&l.jsx("div",{className:`text-xs ${k.valid?"text-leaf":"text-blush-500"}`,children:k.valid?`Verified: ${k.normalized||y} (${k.provider})`:`Address verification failed (${k.provider})`})]}),l.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"text-sm font-semibold",children:"Gift Card Message"}),l.jsxs("span",{className:"text-xs text-bloom flex items-center gap-1",children:[l.jsx(Rn,{size:12})," AI writing is on the product page"]})]}),l.jsx("textarea",{value:S,onChange:ce=>A(ce.target.value),rows:2,maxLength:200,placeholder:"Message for the recipient",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),l.jsx("input",{value:O,onChange:ce=>N(ce.target.value),placeholder:"Special Instructions (optional)",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),l.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[l.jsx("div",{className:"text-sm font-semibold mb-3",children:"Payment Method"}),l.jsx(SQ,{method:_,onMethod:C,onCardChange:R,cards:Be.cards,wallets:Be.wallets})]})]}),l.jsxs("aside",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit sticky top-20",children:[l.jsx("div",{className:"text-sm font-semibold mb-3",children:"Order Summary"}),l.jsxs("div",{className:"space-y-1.5 text-sm",children:[l.jsx(Au,{k:"Subtotal",v:Oe(Q)}),q>0&&l.jsx(Au,{k:"Surge Pricing",v:`+${Oe(q)}`,amber:!0}),l.jsx(Au,{k:"Tax",v:Oe(Ze),sub:L?`${L.provider} ${(L.rate*100).toFixed(1)}%`:""}),xe>0&&l.jsx(Au,{k:`Tier Discount (${(ct==null?void 0:ct.tierName)||""} ${ke}%)`,v:`-${Oe(xe)}`,green:!0}),E>0&&l.jsx(Au,{k:"Points Used",v:`-${Oe(E)}`,green:!0})]}),!!t&&l.jsxs("div",{className:"mt-4 bg-petal rounded-xl p-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-bloom2 mb-1",children:[l.jsxs("span",{children:["Points Balance ",ut.toLocaleString()," pts"]}),l.jsx("button",{onClick:()=>T(pt),className:"text-bloom font-semibold",children:"Use All"})]}),l.jsx("input",{type:"range",min:0,max:pt,value:E,onChange:ce=>T(Number(ce.target.value)),className:"w-full accent-bloom"}),l.jsxs("div",{className:"text-xs text-gray-500 text-right",children:[E.toLocaleString()," pts used"]})]}),l.jsxs("div",{className:"border-t border-blush-100/60 mt-4 pt-3 flex justify-between font-bold text-base",children:[l.jsx("span",{children:"Order Total"}),l.jsx("span",{className:"text-bloom2",children:Oe(Ln)})]}),ne&&l.jsx("div",{className:"text-blush-500 text-xs mt-3",children:ne}),l.jsx("button",{onClick:wa,disabled:V,className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2 disabled:opacity-60",children:V?"Processing…":`Place Order · ${Oe(Ln)}`}),l.jsx("p",{className:"text-[11px] text-gray-400 text-center mt-2",children:"Payments processed via GUARDiA PaymentGateway (secure adapter) · Card details not stored"})]})]})]}):(e("/account"),null)}function Au({k:e,v:t,sub:n,amber:r,green:a}){return l.jsxs("div",{className:"flex justify-between",children:[l.jsxs("span",{className:"text-gray-500",children:[e,n&&l.jsx("span",{className:"text-[10px] text-gray-400 ml-1",children:n})]}),l.jsx("span",{className:r?"text-amber-600":a?"text-leaf":"font-medium",children:t})]})}const DQ={PAID:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONFIRMED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",DELIVERED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",COMPLETED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",APPROVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",PUBLISHED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RESOLVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",SHIPPED:"bg-sky-500/15 text-sky-400 border-sky-500/30",PREPARING:"bg-sky-500/15 text-sky-400 border-sky-500/30",REQUESTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",IN_PROGRESS:"bg-sky-500/15 text-sky-400 border-sky-500/30",PENDING:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-amber-500/15 text-amber-400 border-amber-500/30",OPEN:"bg-amber-500/15 text-amber-400 border-amber-500/30",DRAFT:"bg-slate-500/15 text-slate-400 border-slate-500/30",ENDED:"bg-slate-600/20 text-slate-400 border-slate-600/30",CANCELLED:"bg-slate-600/20 text-slate-400 border-slate-600/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",REFUNDED:"bg-rose-500/15 text-rose-400 border-rose-500/30",FAILED:"bg-rose-500/15 text-rose-400 border-rose-500/30",BASIC:"bg-slate-500/15 text-slate-300 border-slate-500/30",SILVER:"bg-slate-300/20 text-slate-200 border-slate-300/30",GOLD:"bg-amber-400/15 text-amber-300 border-amber-400/30",VIP:"bg-violet-500/15 text-violet-300 border-violet-500/30"},$Q={PENDING:"Pending",PAID:"Paid",PREPARING:"Preparing",SHIPPED:"Out for Delivery",DELIVERED:"Delivered",CONFIRMED:"Confirmed",CANCELLED:"Cancelled",REFUNDED:"Refunded",ACTIVE:"Active",PAUSED:"Paused",REQUESTED:"Requested",APPROVED:"Approved",REJECTED:"Rejected",COMPLETED:"Completed",PUBLISHED:"Published",DRAFT:"Draft",ENDED:"Ended",OPEN:"Open",IN_PROGRESS:"Processing",RESOLVED:"Resolved"};function Ar({status:e}){if(!e)return null;const t=DQ[e]||"bg-slate-500/15 text-slate-400 border-slate-500/30";return l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${t}`,children:$Q[e]||e})}const GE=[["WEEKLY","Weekly"],["BIWEEKLY","Every 2 Weeks"],["MONTHLY","Monthly"]];function LQ(){const e=Wt(),t=Xt(),{custToken:n,storeId:r}=wn(),[a,i]=j.useState("WEEKLY"),[s,o]=j.useState(0),[c,u]=j.useState(!1),{data:d}=oe({queryKey:["subs"],queryFn:iX,enabled:!!n}),{data:f}=oe({queryKey:["stores"],queryFn:()=>Co(!0)}),{data:h}=oe({queryKey:["sub-prods"],queryFn:()=>cc({size:12,sort:"sales"})}),p=(h==null?void 0:h.items)||[],g=async()=>{var b;if(!n){t("/account");return}const y=r||((b=f==null?void 0:f[0])==null?void 0:b.id),x=p.find(w=>w.id===s)||p[0];x&&(await sX({storeId:y,productId:x.id,sizeCode:"ORIGINAL",frequency:a,receiverName:"",receiverPhone:"",address:"",deliveryZip:"",price:x.price}).catch(()=>{}),u(!1),e.invalidateQueries({queryKey:["subs"]}))},m=async(y,x)=>{await HE(y,x==="ACTIVE"?"PAUSED":"ACTIVE").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})},v=async y=>{await HE(y,"CANCELLED").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})};return l.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(by,{className:"text-bloom",size:22}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Flower Subscription"})]}),l.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Get fresh flowers delivered weekly, every two weeks, or monthly."}),!n&&l.jsxs("div",{className:"bg-petal rounded-2xl p-6 text-center text-sm text-gray-600 mb-6",children:["Please log in to start a subscription. ",l.jsx(De,{to:"/account",className:"text-bloom font-semibold",children:"Log In →"})]}),l.jsx("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-6",children:c?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium mb-2",children:"Delivery Frequency"}),l.jsx("div",{className:"flex gap-2",children:GE.map(([y,x])=>l.jsx("button",{onClick:()=>i(y),className:`px-4 py-2 rounded-full text-sm border ${a===y?"bg-bloom text-white border-bloom":"border-blush-100"}`,children:x},y))})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium mb-2",children:"Choose a Product"}),l.jsxs("select",{value:s,onChange:y=>o(Number(y.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:[l.jsx("option",{value:0,children:"Best Seller (Recommended)"}),p.map(y=>l.jsxs("option",{value:y.id,children:[y.name," — ",Oe(y.price)]},y.id))]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:g,className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start Subscription"}),l.jsx("button",{onClick:()=>u(!1),className:"border border-blush-100 px-6 py-2.5 rounded-full text-gray-600",children:"Cancel"})]})]}):l.jsx("button",{onClick:()=>n?u(!0):t("/account"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start a New Subscription"})}),l.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Subscriptions"}),l.jsxs("div",{className:"space-y-3",children:[(d||[]).map(y=>{var x;return l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex items-center gap-4",children:[l.jsx("div",{className:"w-14 h-14 bg-petal rounded-xl flex items-center justify-center",children:l.jsx(gt,{className:"text-bloom/40",size:26})}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"font-medium text-sm",children:[y.productName||`상품 #${y.productId}`," · ",((x=GE.find(b=>b[0]===y.frequency))==null?void 0:x[1])||y.frequency]}),l.jsxs("div",{className:"text-xs text-gray-500",children:["다음 배송 ",y.nextDeliveryDate||"-"," · ",Oe(y.price)]})]}),l.jsx(Ar,{status:y.status}),y.status!=="CANCELLED"&&l.jsxs(l.Fragment,{children:[l.jsx("button",{onClick:()=>m(y.id,y.status),className:"text-xs text-bloom2 border border-blush-100 rounded-full px-3 py-1.5",children:y.status==="ACTIVE"?"일시정지":"재개"}),l.jsx("button",{onClick:()=>v(y.id),className:"text-xs text-blush-400 border border-blush-100 rounded-full px-3 py-1.5",children:"해지"})]})]},y.id)}),!(d||[]).length&&l.jsx("div",{className:"text-gray-400 text-sm py-8 text-center",children:"아직 구독이 없습니다."})]})]})}function IQ(){const{storeName:e}=wn(),{data:t}=oe({queryKey:["daily-rec"],queryFn:()=>U5("daily","",8)}),{data:n}=oe({queryKey:["daily-fresh"],queryFn:()=>cc({sort:"rating",size:8})}),r=(t&&t.length?t:n==null?void 0:n.items)||[];return l.jsxs("div",{children:[l.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[l.jsx(ch,{count:12}),l.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-4 py-16",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[l.jsx(kj,{size:15})," Fresh today, gone tomorrow"]}),l.jsx("h1",{className:"font-serif text-5xl font-bold mb-4",children:"Today's Designer Bouquet"}),l.jsxs("p",{className:"text-cream/85 max-w-xl leading-relaxed text-lg font-light",children:["Hand-designed each morning with the freshest stems in our cooler, then curated by ",l.jsx("b",{className:"font-medium",children:"GUARDiA AI"}),". Limited daily stock · ",e||"your nearest store"," same-day delivery."]})]})]}),l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(Rn,{className:"text-blush-500",size:18}),l.jsx("h2",{className:"font-serif text-2xl font-bold text-blush-900",children:"Today's Picks"}),l.jsx("span",{className:"text-xs text-sage-600",children:"AI-curated"})]}),l.jsx($m,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(a=>l.jsx(Lm,{children:l.jsx(uc,{p:a})},a.id))}),!r.length&&l.jsxs("div",{className:"text-center text-blush-300 py-20",children:[l.jsx(gt,{className:"mx-auto text-blush-200 mb-3",size:40}),"Today's bouquet is being designed. ",l.jsx(De,{to:"/category",className:"text-blush-500",children:"Browse all flowers →"})]})]})]})}const zQ={DISCOUNT:LG,POINT_BONUS:Kd,GIFT:Q$,TIER_ONLY:Kd,SEASON:Yd};function BQ(){const{custToken:e}=wn(),t=Xt(),[n,r]=j.useState(""),{data:a}=oe({queryKey:["loyalty-me"],queryFn:Hj,enabled:!!e}),i=(a==null?void 0:a.tier)||"",{data:s}=oe({queryKey:["ongoing-events",i],queryFn:()=>qX(i)}),o=async c=>{var u,d;if(!e){t("/account");return}r("");try{const f=await KX(c);r(f!=null&&f.coupon?`참여 완료! 쿠폰 발급: ${f.coupon.name} (${f.coupon.code})`:"이벤트에 참여했습니다.")}catch(f){r(((d=(u=f==null?void 0:f.response)==null?void 0:u.data)==null?void 0:d.message)||"참여 자격이 없거나 이미 참여했습니다.")}};return l.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(Yd,{className:"text-bloom",size:22}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"이벤트 / 캠페인"})]}),i&&l.jsxs("p",{className:"text-sm text-gray-500 mb-2",children:["현재 등급 ",l.jsx("span",{className:"font-semibold text-bloom2",children:(a==null?void 0:a.tierName)||i})," · 등급 전용 이벤트가 함께 표시됩니다."]}),n&&l.jsx("div",{className:"bg-petal text-bloom2 text-sm rounded-xl px-4 py-2 mb-4",children:n}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:[(s||[]).map(c=>{const u=zQ[c.eventType]||Yd,d=(c.banners||[])[0];return l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 overflow-hidden",children:[l.jsx("div",{className:"bg-gradient-to-r from-bloom2 to-bloom text-white p-5",children:d?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"font-serif text-lg font-bold",children:d.headline||c.title}),l.jsx("p",{className:"text-white/85 text-sm mt-1",children:d.subtext||c.description})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"font-serif text-lg font-bold",children:c.title}),l.jsx("p",{className:"text-white/85 text-sm mt-1",children:c.description})]})}),l.jsxs("div",{className:"p-4 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[l.jsx(u,{size:16,className:"text-bloom"}),l.jsx("span",{children:c.eventType}),c.bonusPointRate>0&&l.jsxs("span",{className:"text-xs text-leaf",children:["+",c.bonusPointRate,"% 포인트"]}),c.targetTiers&&l.jsxs("span",{className:"text-xs bg-petal text-bloom2 px-2 py-0.5 rounded-full",children:[c.targetTiers," 전용"]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ar,{status:c.status}),l.jsx("button",{onClick:()=>o(c.id),className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full hover:bg-bloom2",children:"참여"})]})]}),l.jsxs("div",{className:"px-4 pb-3 text-[11px] text-gray-400",children:[c.startDate," ~ ",c.endDate]})]},c.id)}),!(s||[]).length&&l.jsx("div",{className:"col-span-2 text-center text-gray-400 py-16",children:"진행 중인 이벤트가 없습니다."})]})]})}function UQ(){const{t:e}=ci(),t=Wt(),n=Xt(),{custToken:r}=wn(),{data:a}=oe({queryKey:["wishlist"],queryFn:xX,enabled:!!r});if(!r)return n("/account"),null;const i=a||[],s=async o=>{await SX(o).catch(()=>{}),t.invalidateQueries({queryKey:["wishlist"]})};return l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(Gd,{className:"text-bloom",size:22}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:e("wishlist.title")})]}),i.length?l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(o=>l.jsxs("div",{className:"relative",children:[l.jsx(uc,{p:{...o,id:o.productId||o.id}}),l.jsx("button",{onClick:()=>s(o.productId||o.id),className:"absolute top-2 right-2 bg-white/90 rounded-full p-1.5 text-bloom shadow",children:l.jsx(Gd,{size:16,fill:"currentColor"})})]},o.id||o.productId))}):l.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("wishlist.empty")," ",l.jsx(De,{to:"/category",className:"text-bloom",children:e("wishlist.startShopping")})]})]})}const YE={BASIC:"from-slate-400 to-slate-500",SILVER:"from-slate-300 to-slate-400",GOLD:"from-amber-400 to-amber-500",VIP:"from-violet-500 to-fuchsia-500"};function FQ(){const{custToken:e,setCustToken:t}=wn(),n=Xt(),{data:r}=oe({queryKey:["member"],queryFn:mX,enabled:!!e}),{data:a}=oe({queryKey:["loyalty-me"],queryFn:Hj,enabled:!!e}),{data:i}=oe({queryKey:["point-history"],queryFn:()=>FX(20),enabled:!!e});if(!e)return n("/account"),null;const s=(a==null?void 0:a.tier)||"BASIC",o=a==null?void 0:a.nextTier,c=()=>{t(null),n("/home")};return l.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(s5,{className:"text-bloom",size:22}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"My Account"})]}),l.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-sm text-gray-500 hover:text-bloom",children:[l.jsx(e5,{size:16})," Log Out"]})]}),l.jsxs("div",{className:`rounded-2xl bg-gradient-to-r ${YE[s]||YE.BASIC} text-white p-6 mb-5`,children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-xs uppercase tracking-widest text-white/70",children:"Membership Tier"}),l.jsxs("div",{className:"font-serif text-2xl font-bold flex items-center gap-2",children:[l.jsx(Kd,{size:24})," ",(a==null?void 0:a.tierName)||s]}),l.jsxs("div",{className:"text-sm text-white/85 mt-1",children:["Spent in last 12 months ",Oe(a==null?void 0:a.spend12m)," · ",(a==null?void 0:a.orderCount12m)||0," orders"]})]}),l.jsxs("div",{className:"text-right",children:[l.jsx("div",{className:"text-xs text-white/70",children:"Points Balance"}),l.jsxs("div",{className:"text-3xl font-bold",children:[((a==null?void 0:a.pointBalance)||0).toLocaleString(),l.jsx("span",{className:"text-base",children:"P"})]})]})]}),o&&!o.isTop&&l.jsxs("div",{className:"mt-4 text-xs text-white/85 bg-white/15 rounded-lg px-3 py-2",children:["Spend ",Oe(o.spendNeeded)," more or place ",o.ordersNeeded," more orders to reach ",l.jsx("b",{children:o.nextTierName}),"."]})]}),(a==null?void 0:a.benefit)&&l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-5",children:[l.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[l.jsx(Q$,{size:16,className:"text-bloom"})," My Tier Benefits"]}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[l.jsx(Gh,{label:"Discount",value:`${a.benefit.discountRate}%`}),l.jsx(Gh,{label:"Earn Rate",value:`${a.benefit.pointEarnRate}%`}),l.jsx(Gh,{label:"Free Shipping",value:a.benefit.freeShipThreshold===0?"Always":a.benefit.freeShipThreshold?Oe(a.benefit.freeShipThreshold)+"+":"None"}),l.jsx(Gh,{label:"Priority Slot",value:a.benefit.prioritySlot?"Included":"–"})]})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[l.jsx(Mx,{to:"/orders",icon:t5,label:"Order History"}),l.jsx(Mx,{to:"/wishlist",icon:Gd,label:"Wishlist"}),l.jsx(Mx,{to:"/subscription",icon:by,label:"Manage Subscription"})]}),l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[l.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[l.jsx(K$,{size:16,className:"text-bloom"})," Points Earned / Used History"]}),l.jsxs("div",{className:"divide-y divide-blush-100/60",children:[(i||[]).map(u=>l.jsxs("div",{className:"flex items-center justify-between py-2 text-sm",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-700",children:u.reason||u.entryType}),u.orderNo&&l.jsx("span",{className:"text-xs text-gray-400 ml-2",children:u.orderNo}),l.jsx("div",{className:"text-[11px] text-gray-400",children:(u.createdAt||"").slice(0,10)})]}),l.jsxs("span",{className:u.points>=0?"text-leaf font-semibold":"text-blush-500 font-semibold",children:[u.points>=0?"+":"",u.points,"P"]})]},u.id)),!(i||[]).length&&l.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No points history yet."})]})]}),(r==null?void 0:r.username)&&l.jsx("div",{className:"text-center text-xs text-gray-400 mt-6",children:r.displayName||r.username})]})}function Gh({label:e,value:t}){return l.jsxs("div",{className:"bg-petal rounded-xl p-3 text-center",children:[l.jsx("div",{className:"text-[11px] text-gray-500",children:e}),l.jsx("div",{className:"font-bold text-bloom2",children:t})]})}function Mx({to:e,icon:t,label:n}){return l.jsxs(De,{to:e,className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex flex-col items-center gap-1.5 hover:border-bloom",children:[l.jsx(t,{size:22,className:"text-bloom"}),l.jsx("span",{className:"text-sm",children:n})]})}function VQ(){const e=Wt(),t=Xt(),{custToken:n}=wn(),{data:r}=oe({queryKey:["my-orders"],queryFn:()=>tX(""),enabled:!!n});if(!n)return t("/account"),null;const a=r||[],i=async(s,o)=>{await L5(s,o).catch(()=>{}),e.invalidateQueries({queryKey:["my-orders"]})};return l.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(t5,{className:"text-bloom",size:22}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"주문 내역"})]}),a.length?l.jsx("div",{className:"space-y-3",children:a.map(s=>l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"font-semibold text-sm",children:s.orderNo||`주문 #${s.id}`}),l.jsx(Ar,{status:s.status})]}),l.jsxs("div",{className:"text-xs text-gray-500 mb-3",children:[(s.createdAt||"").slice(0,16).replace("T"," ")," · ",s.fulfillmentType==="PICKUP"?"매장 픽업":"배송"," · ",s.scheduledDate," ",s.slotLabel]}),l.jsx("div",{className:"space-y-1.5",children:(s.items||[]).map(o=>l.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[l.jsx("div",{className:"w-9 h-9 bg-petal rounded-lg flex items-center justify-center",children:l.jsx(gt,{className:"text-bloom/40",size:16})}),l.jsxs("span",{className:"flex-1",children:[o.productName||`상품 #${o.productId}`," ",o.sizeCode&&`· ${o.sizeCode}`," ×",o.quantity]}),l.jsx("span",{className:"text-gray-600",children:Oe(o.price||o.unitPrice)})]},o.id))}),l.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-blush-100/60",children:[l.jsx("span",{className:"font-bold text-bloom2",children:Oe(s.payAmount??s.totalAmount)}),l.jsxs("div",{className:"flex gap-2",children:[s.status==="DELIVERED"&&l.jsx("button",{onClick:()=>i(s.id,"CONFIRMED"),className:"text-xs bg-bloom text-white px-3 py-1.5 rounded-full",children:"구매확정"}),["PENDING","PAID"].includes(s.status)&&l.jsx("button",{onClick:()=>i(s.id,"CANCELLED"),className:"text-xs border border-blush-100 text-blush-400 px-3 py-1.5 rounded-full",children:"주문취소"})]})]})]},s.id))}):l.jsxs("div",{className:"text-center text-gray-400 py-16",children:["주문 내역이 없습니다. ",l.jsx(De,{to:"/category",className:"text-bloom",children:"쇼핑하기 →"})]})]})}function HQ(){const{productId:e}=UD(),t=Number(e),n=Xt(),{custToken:r}=wn(),[a,i]=j.useState(5),[s,o]=j.useState(""),[c,u]=j.useState(""),[d,f]=j.useState(""),[h,p]=j.useState("");if(!r)return n("/account"),null;const g=async m=>{m.preventDefault(),p("");try{await pX({productId:t,rating:a,title:s,content:c,imageUrl:d}),p("리뷰가 등록되었습니다."),setTimeout(()=>n(`/product/${t}`),800)}catch{p("등록에 실패했습니다. (구매 이력이 필요할 수 있습니다)")}};return l.jsxs("div",{className:"max-w-lg mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(NG,{className:"text-bloom",size:22}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"리뷰 작성"})]}),l.jsxs("form",{onSubmit:g,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium mb-2",children:"별점"}),l.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(m=>l.jsx("button",{type:"button",onClick:()=>i(m),className:"text-amber-400",children:l.jsx(ri,{size:28,fill:m<=a?"currentColor":"none"})},m))})]}),l.jsx("input",{value:s,onChange:m=>o(m.target.value),placeholder:"제목",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),l.jsx("textarea",{value:c,onChange:m=>u(m.target.value),rows:5,required:!0,placeholder:"상품은 어떠셨나요? 신선도, 배송, 디자인 등을 적어주세요.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),l.jsx("input",{value:d,onChange:m=>f(m.target.value),placeholder:"사진 URL (선택)",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),h&&l.jsx("div",{className:"text-sm text-leaf",children:h}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{className:"flex-1 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:"등록"}),l.jsx("button",{type:"button",onClick:()=>n(-1),className:"px-6 border border-blush-100 rounded-full text-gray-600",children:"취소"})]})]})]})}function qQ(){const[e,t]=j.useState("login"),[n,r]=j.useState(""),[a,i]=j.useState(""),[s,o]=j.useState(""),[c,u]=j.useState(""),[d,f]=j.useState(!1),{setCustToken:h}=wn(),p=Xt(),g=async m=>{var v,y;m.preventDefault(),u(""),f(!0);try{const b=(y=(v=(e==="login"?await k5(n,a):await RW(n,a,s||n)).data)==null?void 0:v.data)==null?void 0:y.token;if(!b)throw new Error("no token");h(b),p("/home")}catch{u(e==="login"?"Login failed — check your username and password.":"Sign-up failed — that username may already be taken.")}finally{f(!1)}};return l.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[l.jsx(ch,{count:12}),l.jsxs(Pt.form,{onSubmit:g,initial:{opacity:0,y:22},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-sm bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-8 border border-blush-100",children:[l.jsxs(De,{to:"/home",className:"flex flex-col items-center gap-1 mb-6",children:[l.jsx(gt,{className:"text-blush-500",size:32}),l.jsx("span",{className:"font-serif text-xl font-bold text-blush-900",children:"Montvale Florist"})]}),l.jsx("div",{className:"flex gap-2 mb-6 bg-blush-50 rounded-full p-1 text-sm",children:["login","register"].map(m=>l.jsx("button",{type:"button",onClick:()=>{t(m),u("")},className:`flex-1 py-2 rounded-full font-medium transition-colors ${e===m?"bg-blush-500 text-white shadow-petal":"text-blush-700"}`,children:m==="login"?"Sign In":"Create Account"},m))}),l.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Username"}),l.jsx("input",{value:n,onChange:m=>r(m.target.value),required:!0,className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),e==="register"&&l.jsxs(l.Fragment,{children:[l.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Name"}),l.jsx("input",{value:s,onChange:m=>o(m.target.value),className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),l.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Password"}),l.jsx("input",{type:"password",value:a,onChange:m=>i(m.target.value),required:!0,className:"w-full mb-4 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),c&&l.jsx("p",{className:"text-blush-500 text-xs mb-3",children:c}),l.jsx(Ya,{type:"submit",disabled:d,className:"w-full py-2.5 rounded-full bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60",children:d?"Please wait…":e==="login"?"Sign In":"Create Account"}),l.jsxs("p",{className:"text-center text-[11px] text-[#a08a90] mt-4",children:["Store & owner staff → ",l.jsx("a",{href:"/admin/login",className:"text-blush-600",children:"Admin Console"})]}),l.jsx("p",{className:"text-center text-[11px] text-sage-600 mt-2",children:Be.tagline})]})]})}const KQ=["DELIVERY","PRODUCT","PAYMENT","REFUND","OTHER"];function GQ(){const e=Wt(),t=Xt(),{custToken:n}=wn(),[r,a]=j.useState("DELIVERY"),[i,s]=j.useState(""),[o,c]=j.useState(""),[u,d]=j.useState(""),[f,h]=j.useState(""),[p,g]=j.useState("Birthday"),[m,v]=j.useState("Warm"),[y,x]=j.useState(""),[b,w]=j.useState([]),{data:S}=oe({queryKey:["cs"],queryFn:yX,enabled:!!n}),A=async N=>{if(N.preventDefault(),h(""),!n){t("/account");return}try{const E=await vX({orderNo:i,category:r,subject:o,content:u});h(E!=null&&E.aiReply?`AI auto-reply: ${E.aiReply}`:"Your request has been submitted."),c(""),d(""),e.invalidateQueries({queryKey:["cs"]})}catch{h("Failed to submit your request.")}},O=async()=>{const N=await EX(p,m,y).catch(()=>null);w((N==null?void 0:N.messages)||[])};return l.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(yG,{className:"text-bloom",size:22}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Customer Support (1:1)"})]}),l.jsxs("div",{className:"bg-petal rounded-2xl p-5 mb-6",children:[l.jsxs("div",{className:"flex items-center gap-2 text-bloom2 font-medium text-sm mb-3",children:[l.jsx(Rn,{size:16})," AI Card Message Helper"]}),l.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[l.jsx("input",{value:p,onChange:N=>g(N.target.value),placeholder:"Occasion (e.g. Birthday)",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),l.jsx("input",{value:m,onChange:N=>v(N.target.value),placeholder:"Tone",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),l.jsx("input",{value:y,onChange:N=>x(N.target.value),placeholder:"Recipient",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"})]}),l.jsx("button",{onClick:O,className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full",children:"Suggest Messages"}),!!b.length&&l.jsx("ul",{className:"mt-3 space-y-2",children:b.map((N,E)=>l.jsx("li",{className:"bg-white rounded-lg px-3 py-2 text-sm text-gray-700",children:N},E))})]}),l.jsxs("form",{onSubmit:A,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3 mb-8",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx("select",{value:r,onChange:N=>a(N.target.value),className:"px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:KQ.map(N=>l.jsx("option",{value:N,children:N},N))}),l.jsx("input",{value:i,onChange:N=>s(N.target.value),placeholder:"Order number (optional)",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),l.jsx("input",{value:o,onChange:N=>c(N.target.value),required:!0,placeholder:"Subject",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),l.jsx("textarea",{value:u,onChange:N=>d(N.target.value),rows:4,required:!0,placeholder:"Tell us how we can help. Our AI will try to answer first.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),f&&l.jsx("div",{className:"text-sm text-leaf bg-leaf/10 rounded-lg px-3 py-2",children:f}),l.jsxs("button",{className:"flex items-center gap-1.5 bg-bloom text-white font-semibold px-6 py-2.5 rounded-full hover:bg-bloom2",children:[l.jsx(RG,{size:16})," Submit Request"]}),!n&&l.jsxs("p",{className:"text-xs text-gray-400",children:["Please log in to submit a request. ",l.jsx(De,{to:"/account",className:"text-bloom",children:"Log In"})]})]}),l.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Requests"}),l.jsxs("div",{className:"space-y-2",children:[(S||[]).map(N=>l.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-medium text-sm",children:N.subject}),l.jsx(Ar,{status:N.status})]}),l.jsx("p",{className:"text-sm text-gray-600 mt-1",children:N.content}),N.aiReply&&l.jsxs("div",{className:"mt-2 text-xs text-bloom2 bg-petal rounded-lg px-3 py-2",children:[l.jsx("b",{children:"AI Reply:"})," ",N.aiReply]}),N.itsmSrId&&l.jsxs("div",{className:"text-[11px] text-gray-400 mt-1",children:["ITSM SR: ",N.itsmSrId]})]},N.id)),!(S||[]).length&&l.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No requests submitted yet."})]})]})}const G5="https://itsm.zioinfo.co.kr",kx=e=>e==null?void 0:e.replace(/https?:\/\/zioinfo\.co\.kr:8443/g,G5);function YQ(){const[e,t]=j.useState(null),[n,r]=j.useState(!0),[a,i]=j.useState(""),[s,o]=j.useState(!1),c=()=>{r(!0),i(""),fetch(`${G5}/api/app/public-latest`).then(d=>d.json()).then(d=>t({...d,qr_url:kx(d.qr_url),landing_url:kx(d.landing_url),download_url:kx(d.download_url)})).catch(()=>i("Unable to connect to the app store. Please try again in a moment.")).finally(()=>r(!1))};j.useEffect(()=>{c()},[]);const u=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return l.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[l.jsxs("div",{className:"text-center mb-8",children:[l.jsxs("div",{className:"flex items-center gap-2 justify-center mb-2",children:[l.jsx(_l,{className:"text-bloom",size:26}),l.jsx("h1",{className:"font-serif text-2xl font-bold text-bloom2",children:"Order with the App"})]}),l.jsxs("p",{className:"text-sm text-gray-500",children:["Scan the QR code to open the ",l.jsx("span",{className:"text-bloom font-semibold",children:"GUARDiA Mall"})," customer app install page.",l.jsx("br",{}),"Enjoy same-day delivery alerts, easy reordering, and subscription management right in the app."]})]}),n&&l.jsx("div",{className:"text-center text-gray-400 py-10",children:"Loading…"}),a&&l.jsx("div",{className:"bg-petal border border-blush-100 rounded-2xl p-6 text-center text-blush-500 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&l.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-10 text-center text-gray-400",children:[l.jsx(gt,{size:40,className:"mx-auto mb-3 text-bloom/30"}),"No app version has been published yet.",l.jsx("br",{}),l.jsx("span",{className:"text-xs",children:"App uploads and version management are handled in GUARDiA Manager."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&l.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start shadow-sm",children:[l.jsx("div",{className:"bg-petal rounded-2xl p-3 flex items-center justify-center",children:e.qr_url?l.jsx("img",{src:e.qr_url,alt:"App install QR code",className:"w-44 h-44"}):l.jsx(_l,{size:64,className:"text-bloom/40"})}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Mall"}),l.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-bloom text-white text-xs font-semibold",children:["v",e.version]})]}),l.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:[e.platform," ",e.file_size_mb?`· ${e.file_size_mb}MB`:"",e.download_count!=null&&` · ${e.download_count} downloads`]}),e.release_notes&&l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1",children:"What's New"}),l.jsx("div",{className:"text-sm text-gray-600 whitespace-pre-line bg-petal rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.landing_url&&l.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full bg-bloom text-white text-sm font-semibold hover:bg-bloom2",children:[l.jsx(W$,{size:15})," Install Page"]}),e.download_url&&l.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[l.jsx(Y$,{size:15})," Download APK"]}),l.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[s?l.jsx(V$,{size:15,className:"text-leaf"}):l.jsx(G$,{size:15}),s?"Copied":"Copy Link"]}),l.jsx("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-full border border-blush-100 text-gray-500 text-sm hover:bg-petal",children:l.jsx(xy,{size:15})})]})]})]})]})}const WQ=(e,t)=>B.post("/api/mall/auth/verify",{verifyToken:e,code:t}),XQ=(e,t)=>B.post("/api/mall/auth/verify-otp",{verifyToken:e,code:t}),QQ=e=>B.post("/api/mall/auth/signup",e),ZQ=e=>B.post("/api/mall/auth/find-id",e),JQ=e=>B.post("/api/mall/auth/reset-password",e),eZ=e=>B.post("/api/messages",e),tZ=e=>B.get("/api/messages/sent",{params:e}),nZ=e=>B.get(`/api/messages/sent/${e}`),rZ=e=>B.get("/api/messages/received",{params:e}),aZ=e=>B.get(`/api/messages/received/${e}`),iZ=e=>B.get("/api/schedules",{params:e}),sZ=e=>B.post("/api/schedules",e),oZ=e=>B.get(`/api/schedules/${e}`),lZ=e=>B.delete(`/api/schedules/${e}`),cZ=e=>B.get("/api/worklogs",{params:e}),uZ=e=>B.get("/api/worklogs/dashboard/progress",{params:e}),dZ=e=>B.post("/api/worklogs",e),fZ=e=>B.get(`/api/worklogs/${e}`),hZ=e=>B.delete(`/api/worklogs/${e}`),pZ=(e,t)=>B.post(`/api/worklogs/${e}/comments`,{cmtContent:t}),mZ=e=>B.get("/api/stats/personal-work",{params:e}),gZ=e=>B.get("/api/stats/company-work",{params:e}),yZ=(e,t=0,n=100)=>B.get("/api/system/roles",{params:{...e?{keyword:e}:{},page:t,size:n}}),vZ=e=>B.post("/api/system/roles",e),xZ=(e,t)=>B.put(`/api/system/roles/${encodeURIComponent(e)}`,t),bZ=e=>B.delete("/api/system/roles",{data:{ids:e}}),SZ=(e=0,t=200)=>B.get("/api/system/role-menus",{params:{page:e,size:t}}),wZ=e=>B.get(`/api/system/roles/${encodeURIComponent(e)}/menus`),jZ=(e,t)=>B.put(`/api/system/roles/${encodeURIComponent(e)}/menus`,{menus:t}),AZ=(e,t=0,n=200)=>B.get("/api/system/codes",{params:{...e?{keyword:e}:{},page:t,size:n}}),WE=e=>B.get(`/api/system/codes/${encodeURIComponent(e)}`),OZ=e=>B.post("/api/system/codes",e),NZ=(e,t)=>B.put(`/api/system/codes/${encodeURIComponent(e)}`,t),EZ=e=>B.delete(`/api/system/codes/${encodeURIComponent(e)}`),TZ=(e=0,t=200)=>B.get("/api/system/menus",{params:{page:e,size:t}}),CZ=e=>B.post("/api/system/menus",e),_Z=(e,t)=>B.put(`/api/system/menus/${encodeURIComponent(e)}`,t),PZ=e=>B.delete("/api/system/menus",{data:{ids:e}}),MZ=(e,t=0,n=200)=>B.get("/api/system/depts",{params:{...e?{keyword:e}:{},page:t,size:n}}),kZ=e=>B.post("/api/system/depts",e),RZ=(e,t)=>B.put(`/api/system/depts/${encodeURIComponent(e)}`,t),DZ=e=>B.delete(`/api/system/depts/${encodeURIComponent(e)}`),$Z=(e,t=0,n=200)=>B.get("/api/system/companies",{params:{...e?{keyword:e}:{},page:t,size:n}}),LZ=e=>B.post("/api/system/companies",e),IZ=(e,t)=>B.put(`/api/system/companies/${encodeURIComponent(e)}`,t),zZ=e=>B.delete("/api/system/companies",{data:{ids:e}});function BZ(){const{t:e}=ci(),[t,n]=j.useState("admin"),[r,a]=j.useState(""),[i,s]=j.useState(""),[o,c]=j.useState("login"),[u,d]=j.useState(""),[f,h]=j.useState("EMAIL"),[p,g]=j.useState(""),[m,v]=j.useState(""),[y,x]=j.useState(""),[b,w]=j.useState(""),[S,A]=j.useState(null),O=Xt(),N=f==="OTP"||f==="OTP_SETUP",E=f==="OTP_SETUP";j.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]);const T=async $=>{localStorage.setItem("mall_admin_token",$);const R=await Fj().catch(()=>null);if(R!=null&&R.role&&localStorage.setItem("mall_role",R.role),R!=null&&R.username&&localStorage.setItem("mall_admin_user",R.username),(R==null?void 0:R.role)==="USER"){s(e("admin.login.errNoPriv")),localStorage.removeItem("mall_admin_token");return}O("/admin/dashboard")},_=async $=>{var R;$.preventDefault(),s("");try{const M=((R=(await k5(t,r)).data)==null?void 0:R.data)||{};if(M.twofa==="true"){d(M.verifyToken||""),h(M.verifyMethod||"EMAIL"),g(M.maskedEmail||""),v(M.qrImage||""),x(M.secret||""),w(""),c("verify");return}const L=M.token;if(!L)throw new Error("no token");await T(L)}catch{s(e("admin.login.errFailed"))}},C=async $=>{var R,k;$.preventDefault(),s("");try{const L=(k=(R=(N?await XQ(u,b.trim()):await WQ(u,b.trim())).data)==null?void 0:R.data)==null?void 0:k.token;if(!L)throw new Error("no token");v(""),x(""),await T(L)}catch{s("인증 코드가 올바르지 않거나 만료되었습니다. (Invalid or expired code)")}};return l.jsxs("div",{className:"admin-shell min-h-screen flex items-center justify-center bg-ink text-[#e6edf6]",children:[l.jsx("div",{className:"absolute top-5 right-5",children:l.jsx(Ey,{variant:"admin"})}),o==="login"?l.jsxs("form",{onSubmit:_,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[l.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[l.jsx("img",{src:"/login.png",alt:"GUARDiA",style:{height:36,width:"auto"},onError:$=>{$.target.style.display="none"}}),l.jsx("span",{className:"text-xl font-bold",children:e("admin.login.title")})]}),l.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:e("admin.login.subtitle")}),l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.username")}),l.jsx("input",{value:t,onChange:$=>n($.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.password")}),l.jsx("input",{type:"password",value:r,onChange:$=>a($.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),i&&l.jsx("p",{className:"text-rose-400 text-xs mb-3",children:i}),l.jsx("button",{className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90",children:e("admin.login.signIn")}),l.jsxs("div",{className:"flex items-center justify-center gap-2 text-[11px] text-slate-400 mt-4",children:[l.jsx("button",{type:"button",onClick:()=>A("signup"),className:"hover:text-brand",children:"운영자 가입"}),l.jsx("span",{className:"text-slate-600",children:"|"}),l.jsx("button",{type:"button",onClick:()=>A("findId"),className:"hover:text-brand",children:"아이디 찾기"}),l.jsx("span",{className:"text-slate-600",children:"|"}),l.jsx("button",{type:"button",onClick:()=>A("resetPw"),className:"hover:text-brand",children:"비밀번호 초기화"})]}),l.jsxs("p",{className:"text-center text-[11px] text-slate-500 mt-3",children:[e("admin.login.storefrontHere")," ",l.jsx("a",{href:"/",className:"text-brand",children:e("admin.login.here")})]})]}):l.jsxs("form",{onSubmit:C,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[l.jsx("div",{className:"flex items-center gap-2 justify-center mb-4",children:l.jsx("span",{className:"text-xl font-bold",children:"2차 인증 / 2FA"})}),l.jsx("p",{className:"text-center text-sm text-slate-400 mb-2",children:"운영 계정 보안을 위한 2차 인증입니다."}),N?E?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-center text-[12px] text-slate-500 mb-3",children:"최초 로그인입니다. 아래 QR을 Authenticator 앱(Google·Microsoft)으로 스캔해 등록한 뒤 6자리 코드를 입력하세요."}),m&&l.jsx("div",{className:"flex justify-center mb-3",children:l.jsx("img",{src:m,alt:"OTP QR",width:180,height:180,style:{background:"#fff",padding:8,borderRadius:8}})}),y&&l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"QR 스캔이 안 되면 수동 입력 키"}),l.jsx("code",{className:"block text-xs text-accent bg-ink border border-edge rounded-md px-2 py-1.5 break-all select-all",children:y})]})]}):l.jsx("p",{className:"text-center text-[12px] text-slate-500 mb-6",children:"Authenticator 앱에 표시된 6자리 코드를 입력하세요."}):l.jsxs("p",{className:"text-center text-[12px] text-slate-500 mb-6",children:["인증 코드를 ",p||"등록된 이메일"," 로 보냈습니다."]}),l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"인증 코드 (6자리)"}),l.jsx("input",{value:b,onChange:$=>w($.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,autoFocus:!0,className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm tracking-[0.4em] text-center focus:border-brand outline-none"}),i&&l.jsx("p",{className:"text-rose-400 text-xs mb-3",children:i}),l.jsx("button",{className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90",children:E?"등록하고 로그인 / Register":"확인 / Verify"}),l.jsx("button",{type:"button",onClick:()=>{c("login"),w(""),s(""),v(""),x("")},className:"w-full py-2 mt-2 rounded-lg text-slate-400 text-xs hover:text-brand",children:"← 돌아가기 / Back"})]}),S&&l.jsx(UZ,{kind:S,onClose:()=>A(null)})]})}function UZ({kind:e,onClose:t}){const[n,r]=j.useState(""),[a,i]=j.useState(""),[s,o]=j.useState(""),[c,u]=j.useState(""),[d,f]=j.useState(!1),[h,p]=j.useState(""),[g,m]=j.useState(!1),v=e==="signup"?"운영자 가입 (승인 대기)":e==="findId"?"아이디 찾기":"비밀번호 초기화",y=async b=>{var w,S,A;b.preventDefault(),f(!0),p(""),m(!1);try{if(e==="signup"){const N=((w=(await QQ({username:n,password:a,displayName:s,email:c})).data)==null?void 0:w.data)||{};m(!!N.success),p(N.message||"처리되었습니다.")}else if(e==="findId"){const N=((S=(await ZQ({displayName:s,email:c})).data)==null?void 0:S.data)||{};m(!!N.found),p(N.found?`회원님의 아이디는 [ ${N.maskedUsername} ] 입니다.`:"일치하는 계정을 찾을 수 없습니다.")}else{const N=((A=(await JQ({username:n,email:c})).data)==null?void 0:A.data)||{};m(!!N.success),p(N.message||"처리되었습니다.")}}catch{p("요청을 처리하지 못했습니다. 잠시 후 다시 시도하세요.")}finally{f(!1)}},x="w-full mb-3 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none";return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:t,children:l.jsxs("div",{className:"w-[360px] bg-panel border border-edge rounded-2xl p-7 text-[#e6edf6]",onClick:b=>b.stopPropagation(),children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsx("span",{className:"text-lg font-bold",children:v}),l.jsx("button",{type:"button",onClick:t,className:"text-slate-400 hover:text-brand text-xl leading-none",children:"×"})]}),l.jsxs("form",{onSubmit:y,children:[(e==="signup"||e==="resetPw")&&l.jsxs(l.Fragment,{children:[l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"아이디"}),l.jsx("input",{value:n,onChange:b=>r(b.target.value),className:x,autoFocus:!0})]}),e==="signup"&&l.jsxs(l.Fragment,{children:[l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"비밀번호 (4자 이상)"}),l.jsx("input",{type:"password",value:a,onChange:b=>i(b.target.value),className:x})]}),(e==="signup"||e==="findId")&&l.jsxs(l.Fragment,{children:[l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"이름 (표시명)"}),l.jsx("input",{value:s,onChange:b=>o(b.target.value),className:x,autoFocus:e==="findId"})]}),l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"이메일"}),l.jsx("input",{type:"email",value:c,onChange:b=>u(b.target.value),className:x}),h&&l.jsx("p",{className:`text-xs mb-3 ${g?"text-emerald-400":"text-amber-400"}`,children:h}),l.jsx("button",{disabled:d,className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90 disabled:opacity-60",children:d?"처리 중…":e==="signup"?"가입 신청":e==="findId"?"아이디 찾기":"임시 비밀번호 발송"})]}),e==="signup"&&l.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"가입 후 관리자 승인이 완료되면 로그인할 수 있습니다."}),e==="resetPw"&&l.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"임시 비밀번호는 등록된 이메일로만 발송됩니다."})]})})}const FZ=[{to:"/admin/dashboard",key:"dashboard",icon:bG,roles:["ADMIN","MANAGER"]},{to:"/admin/stores",key:"stores",icon:rh,roles:["ADMIN","MANAGER"]},{to:"/admin/products",key:"products",icon:gt,roles:["ADMIN","MANAGER"]},{to:"/admin/inventory",key:"inventory",icon:B$,roles:["ADMIN","MANAGER"]},{to:"/admin/orders",key:"orders",icon:Rj,roles:["ADMIN","MANAGER"]},{to:"/admin/transfers",key:"transfers",icon:z$,roles:["ADMIN","MANAGER"]},{to:"/admin/members",key:"members",icon:o5,roles:["ADMIN","MANAGER"]},{to:"/admin/loyalty",key:"loyalty",icon:Kd,roles:["ADMIN","MANAGER"]},{to:"/admin/events",key:"events",icon:Yd,roles:["ADMIN","MANAGER"]},{to:"/admin/subscriptions",key:"subscriptions",icon:by,roles:["ADMIN","MANAGER"]},{to:"/admin/schedule",key:"schedule",icon:U$,roles:["ADMIN","MANAGER"]},{to:"/admin/analytics",key:"analytics",icon:Mj,roles:["ADMIN","MANAGER"]}],VZ=[{to:"/admin/users",key:"users",icon:i5,roles:["ADMIN"]},{to:"/admin/audit",key:"audit",icon:r5,roles:["ADMIN","MANAGER"]},{to:"/admin/settings",key:"settings",icon:a5,roles:["ADMIN"]},{to:"/admin/app",key:"appInstall",icon:_l,roles:["ADMIN","MANAGER"]}],HZ=[{to:"/admin/ai-techniques",label:"AI Techniques",icon:Rn,roles:["ADMIN","MANAGER"]},{to:"/admin/ai-platform",label:"AI 플랫폼 설정",icon:Mm,roles:["ADMIN"]}],qZ=[{to:"/admin/uiws/worklog",label:"업무일지 Worklog",icon:dG,roles:["ADMIN","MANAGER"]},{to:"/admin/uiws/schedule",label:"일정 Schedule",icon:F$,roles:["ADMIN","MANAGER"]},{to:"/admin/uiws/message",label:"쪽지 Message",icon:SG,roles:["ADMIN","MANAGER"]},{to:"/admin/uiws/stats",label:"업무통계 Stats",icon:EG,roles:["ADMIN","MANAGER"]}],KZ=[{to:"/admin/uiws/system/roles",label:"권한 관리",icon:Qc,roles:["ADMIN"]},{to:"/admin/uiws/system/role-menus",label:"역할-메뉴 권한",icon:xG,roles:["ADMIN"]},{to:"/admin/uiws/system/codes",label:"공통코드",icon:J$,roles:["ADMIN"]},{to:"/admin/uiws/system/menus",label:"메뉴 관리",icon:wG,roles:["ADMIN"]},{to:"/admin/uiws/system/depts",label:"부서 관리",icon:lG,roles:["ADMIN"]},{to:"/admin/uiws/system/companies",label:"거래처 관리",icon:oG,roles:["ADMIN"]}],Ou=({isActive:e})=>`flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function GZ(){const{t:e}=ci(),t=localStorage.getItem("mall_admin_token"),[n,r]=j.useState(()=>localStorage.getItem("mall_role")||""),[a,i]=j.useState(()=>localStorage.getItem("mall_admin_user")||""),s=Xt();if(j.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]),j.useEffect(()=>{t&&Fj().then(p=>{p!=null&&p.role&&(localStorage.setItem("mall_role",p.role),r(p.role)),p!=null&&p.username&&(localStorage.setItem("mall_admin_user",p.username),i(p.username))}).catch(()=>{})},[t]),!t)return l.jsx(bm,{to:"/admin/login",replace:!0});if(n&&n==="USER")return l.jsx(bm,{to:"/admin/login",replace:!0});const o=FZ.filter(p=>!n||p.roles.includes(n)),c=VZ.filter(p=>p.roles.includes(n)),u=HZ.filter(p=>!n||p.roles.includes(n)),d=qZ.filter(p=>!n||p.roles.includes(n)),f=KZ.filter(p=>p.roles.includes(n)),h=()=>{localStorage.removeItem("mall_admin_token"),localStorage.removeItem("mall_role"),localStorage.removeItem("mall_admin_user"),s("/admin/login")};return l.jsxs("div",{className:"admin-shell flex h-screen bg-ink text-[#e6edf6]",children:[l.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[l.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[l.jsx(gt,{className:"text-brand",size:22}),l.jsxs("div",{children:[l.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA Mall"}),l.jsx("div",{className:"text-[11px] text-slate-400",children:e("admin.console")})]})]}),l.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[o.map(({to:p,key:g,icon:m})=>l.jsxs(Jo,{to:p,className:Ou,children:[l.jsx(m,{size:18}),e(`admin.nav.${g}`)]},p)),c.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:e("admin.system")}),c.map(({to:p,key:g,icon:m})=>l.jsxs(Jo,{to:p,className:Ou,children:[l.jsx(m,{size:18}),e(`admin.nav.${g}`)]},p))]}),u.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:"AI"}),u.map(({to:p,label:g,icon:m})=>l.jsxs(Jo,{to:p,className:Ou,children:[l.jsx(m,{size:18}),g]},p))]}),d.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:"업무 (UIWS)"}),d.map(({to:p,label:g,icon:m})=>l.jsxs(Jo,{to:p,className:Ou,children:[l.jsx(m,{size:18}),g]},p))]}),f.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:"시스템관리 (권한)"}),f.map(({to:p,label:g,icon:m})=>l.jsxs(Jo,{to:p,className:Ou,children:[l.jsx(m,{size:18}),g]},p))]})]}),l.jsx("div",{className:"p-4 text-[11px] text-slate-500 border-t border-edge",children:e("admin.onPremiseTag")})]}),l.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[l.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[l.jsx("div",{className:"text-sm text-slate-400 truncate",children:e("admin.header")}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(Ey,{variant:"admin"}),l.jsxs(De,{to:"/admin/mypage",className:"flex items-center gap-1.5 text-sm text-slate-300 hover:text-brand",title:"마이페이지 / My Page",children:[l.jsx(uG,{size:18})," ",a||"admin"," ",l.jsx("span",{className:"text-[10px] text-brand",children:n})]}),l.jsxs("button",{onClick:h,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[l.jsx(e5,{size:16})," ",e("admin.signOut")]})]})]}),l.jsx("main",{className:"flex-1 overflow-auto p-6",children:l.jsx(qD,{})})]})]})}function Y5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Y5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function be(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Y5(e))&&(r&&(r+=" "),r+=t);return r}var YZ=Array.isArray,$n=YZ,WZ=typeof Sh=="object"&&Sh&&Sh.Object===Object&&Sh,W5=WZ,XZ=W5,QZ=typeof self=="object"&&self&&self.Object===Object&&self,ZZ=XZ||QZ||Function("return this")(),va=ZZ,JZ=va,eJ=JZ.Symbol,uh=eJ,XE=uh,X5=Object.prototype,tJ=X5.hasOwnProperty,nJ=X5.toString,Nu=XE?XE.toStringTag:void 0;function rJ(e){var t=tJ.call(e,Nu),n=e[Nu];try{e[Nu]=void 0;var r=!0}catch{}var a=nJ.call(e);return r&&(t?e[Nu]=n:delete e[Nu]),a}var aJ=rJ,iJ=Object.prototype,sJ=iJ.toString;function oJ(e){return sJ.call(e)}var lJ=oJ,QE=uh,cJ=aJ,uJ=lJ,dJ="[object Null]",fJ="[object Undefined]",ZE=QE?QE.toStringTag:void 0;function hJ(e){return e==null?e===void 0?fJ:dJ:ZE&&ZE in Object(e)?cJ(e):uJ(e)}var ui=hJ;function pJ(e){return e!=null&&typeof e=="object"}var di=pJ,mJ=ui,gJ=di,yJ="[object Symbol]";function vJ(e){return typeof e=="symbol"||gJ(e)&&mJ(e)==yJ}var Jc=vJ,xJ=$n,bJ=Jc,SJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wJ=/^\w*$/;function jJ(e,t){if(xJ(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||bJ(e)?!0:wJ.test(e)||!SJ.test(e)||t!=null&&e in Object(t)}var qj=jJ;function AJ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var us=AJ;const eu=Fe(us);var OJ=ui,NJ=us,EJ="[object AsyncFunction]",TJ="[object Function]",CJ="[object GeneratorFunction]",_J="[object Proxy]";function PJ(e){if(!NJ(e))return!1;var t=OJ(e);return t==TJ||t==CJ||t==EJ||t==_J}var Kj=PJ;const pe=Fe(Kj);var MJ=va,kJ=MJ["__core-js_shared__"],RJ=kJ,Rx=RJ,JE=function(){var e=/[^.]+$/.exec(Rx&&Rx.keys&&Rx.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function DJ(e){return!!JE&&JE in e}var $J=DJ,LJ=Function.prototype,IJ=LJ.toString;function zJ(e){if(e!=null){try{return IJ.call(e)}catch{}try{return e+""}catch{}}return""}var Q5=zJ,BJ=Kj,UJ=$J,FJ=us,VJ=Q5,HJ=/[\\^$.*+?()[\]{}|]/g,qJ=/^\[object .+?Constructor\]$/,KJ=Function.prototype,GJ=Object.prototype,YJ=KJ.toString,WJ=GJ.hasOwnProperty,XJ=RegExp("^"+YJ.call(WJ).replace(HJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QJ(e){if(!FJ(e)||UJ(e))return!1;var t=BJ(e)?XJ:qJ;return t.test(VJ(e))}var ZJ=QJ;function JJ(e,t){return e==null?void 0:e[t]}var eee=JJ,tee=ZJ,nee=eee;function ree(e,t){var n=nee(e,t);return tee(n)?n:void 0}var _o=ree,aee=_o,iee=aee(Object,"create"),Ty=iee,eT=Ty;function see(){this.__data__=eT?eT(null):{},this.size=0}var oee=see;function lee(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var cee=lee,uee=Ty,dee="__lodash_hash_undefined__",fee=Object.prototype,hee=fee.hasOwnProperty;function pee(e){var t=this.__data__;if(uee){var n=t[e];return n===dee?void 0:n}return hee.call(t,e)?t[e]:void 0}var mee=pee,gee=Ty,yee=Object.prototype,vee=yee.hasOwnProperty;function xee(e){var t=this.__data__;return gee?t[e]!==void 0:vee.call(t,e)}var bee=xee,See=Ty,wee="__lodash_hash_undefined__";function jee(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=See&&t===void 0?wee:t,this}var Aee=jee,Oee=oee,Nee=cee,Eee=mee,Tee=bee,Cee=Aee;function tu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tu.prototype.clear=Oee;tu.prototype.delete=Nee;tu.prototype.get=Eee;tu.prototype.has=Tee;tu.prototype.set=Cee;var _ee=tu;function Pee(){this.__data__=[],this.size=0}var Mee=Pee;function kee(e,t){return e===t||e!==e&&t!==t}var Gj=kee,Ree=Gj;function Dee(e,t){for(var n=e.length;n--;)if(Ree(e[n][0],t))return n;return-1}var Cy=Dee,$ee=Cy,Lee=Array.prototype,Iee=Lee.splice;function zee(e){var t=this.__data__,n=$ee(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Iee.call(t,n,1),--this.size,!0}var Bee=zee,Uee=Cy;function Fee(e){var t=this.__data__,n=Uee(t,e);return n<0?void 0:t[n][1]}var Vee=Fee,Hee=Cy;function qee(e){return Hee(this.__data__,e)>-1}var Kee=qee,Gee=Cy;function Yee(e,t){var n=this.__data__,r=Gee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Wee=Yee,Xee=Mee,Qee=Bee,Zee=Vee,Jee=Kee,ete=Wee;function nu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nu.prototype.clear=Xee;nu.prototype.delete=Qee;nu.prototype.get=Zee;nu.prototype.has=Jee;nu.prototype.set=ete;var _y=nu,tte=_o,nte=va,rte=tte(nte,"Map"),Yj=rte,tT=_ee,ate=_y,ite=Yj;function ste(){this.size=0,this.__data__={hash:new tT,map:new(ite||ate),string:new tT}}var ote=ste;function lte(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var cte=lte,ute=cte;function dte(e,t){var n=e.__data__;return ute(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Py=dte,fte=Py;function hte(e){var t=fte(this,e).delete(e);return this.size-=t?1:0,t}var pte=hte,mte=Py;function gte(e){return mte(this,e).get(e)}var yte=gte,vte=Py;function xte(e){return vte(this,e).has(e)}var bte=xte,Ste=Py;function wte(e,t){var n=Ste(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var jte=wte,Ate=ote,Ote=pte,Nte=yte,Ete=bte,Tte=jte;function ru(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ru.prototype.clear=Ate;ru.prototype.delete=Ote;ru.prototype.get=Nte;ru.prototype.has=Ete;ru.prototype.set=Tte;var Wj=ru,Z5=Wj,Cte="Expected a function";function Xj(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Cte);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(Xj.Cache||Z5),n}Xj.Cache=Z5;var J5=Xj;const _te=Fe(J5);var Pte=J5,Mte=500;function kte(e){var t=Pte(e,function(r){return n.size===Mte&&n.clear(),r}),n=t.cache;return t}var Rte=kte,Dte=Rte,$te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lte=/\\(\\)?/g,Ite=Dte(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($te,function(n,r,a,i){t.push(a?i.replace(Lte,"$1"):r||n)}),t}),zte=Ite;function Bte(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var Qj=Bte,nT=uh,Ute=Qj,Fte=$n,Vte=Jc,rT=nT?nT.prototype:void 0,aT=rT?rT.toString:void 0;function e4(e){if(typeof e=="string")return e;if(Fte(e))return Ute(e,e4)+"";if(Vte(e))return aT?aT.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Hte=e4,qte=Hte;function Kte(e){return e==null?"":qte(e)}var t4=Kte,Gte=$n,Yte=qj,Wte=zte,Xte=t4;function Qte(e,t){return Gte(e)?e:Yte(e,t)?[e]:Wte(Xte(e))}var n4=Qte,Zte=Jc;function Jte(e){if(typeof e=="string"||Zte(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var My=Jte,ene=n4,tne=My;function nne(e,t){t=ene(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[tne(t[n++])];return n&&n==r?e:void 0}var Zj=nne,rne=Zj;function ane(e,t,n){var r=e==null?void 0:rne(e,t);return r===void 0?n:r}var r4=ane;const Jn=Fe(r4);function ine(e){return e==null}var sne=ine;const ye=Fe(sne);var one=ui,lne=$n,cne=di,une="[object String]";function dne(e){return typeof e=="string"||!lne(e)&&cne(e)&&one(e)==une}var fne=dne;const go=Fe(fne);var a4={exports:{}},qe={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Jj=Symbol.for("react.element"),e2=Symbol.for("react.portal"),ky=Symbol.for("react.fragment"),Ry=Symbol.for("react.strict_mode"),Dy=Symbol.for("react.profiler"),$y=Symbol.for("react.provider"),Ly=Symbol.for("react.context"),hne=Symbol.for("react.server_context"),Iy=Symbol.for("react.forward_ref"),zy=Symbol.for("react.suspense"),By=Symbol.for("react.suspense_list"),Uy=Symbol.for("react.memo"),Fy=Symbol.for("react.lazy"),pne=Symbol.for("react.offscreen"),i4;i4=Symbol.for("react.module.reference");function Cr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Jj:switch(e=e.type,e){case ky:case Dy:case Ry:case zy:case By:return e;default:switch(e=e&&e.$$typeof,e){case hne:case Ly:case Iy:case Fy:case Uy:case $y:return e;default:return t}}case e2:return t}}}qe.ContextConsumer=Ly;qe.ContextProvider=$y;qe.Element=Jj;qe.ForwardRef=Iy;qe.Fragment=ky;qe.Lazy=Fy;qe.Memo=Uy;qe.Portal=e2;qe.Profiler=Dy;qe.StrictMode=Ry;qe.Suspense=zy;qe.SuspenseList=By;qe.isAsyncMode=function(){return!1};qe.isConcurrentMode=function(){return!1};qe.isContextConsumer=function(e){return Cr(e)===Ly};qe.isContextProvider=function(e){return Cr(e)===$y};qe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jj};qe.isForwardRef=function(e){return Cr(e)===Iy};qe.isFragment=function(e){return Cr(e)===ky};qe.isLazy=function(e){return Cr(e)===Fy};qe.isMemo=function(e){return Cr(e)===Uy};qe.isPortal=function(e){return Cr(e)===e2};qe.isProfiler=function(e){return Cr(e)===Dy};qe.isStrictMode=function(e){return Cr(e)===Ry};qe.isSuspense=function(e){return Cr(e)===zy};qe.isSuspenseList=function(e){return Cr(e)===By};qe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ky||e===Dy||e===Ry||e===zy||e===By||e===pne||typeof e=="object"&&e!==null&&(e.$$typeof===Fy||e.$$typeof===Uy||e.$$typeof===$y||e.$$typeof===Ly||e.$$typeof===Iy||e.$$typeof===i4||e.getModuleId!==void 0)};qe.typeOf=Cr;a4.exports=qe;var mne=a4.exports,gne=ui,yne=di,vne="[object Number]";function xne(e){return typeof e=="number"||yne(e)&&gne(e)==vne}var s4=xne;const bne=Fe(s4);var Sne=s4;function wne(e){return Sne(e)&&e!=+e}var jne=wne;const au=Fe(jne);var gn=function(t){return t===0?0:t>0?1:-1},$s=function(t){return go(t)&&t.indexOf("%")===t.length-1},Y=function(t){return bne(t)&&!au(t)},Ane=function(t){return ye(t)},It=function(t){return Y(t)||go(t)},One=0,Po=function(t){var n=++One;return"".concat(t||"").concat(n)},yn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Y(t)&&!go(t))return r;var i;if($s(t)){var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return au(i)&&(i=r),a&&i>n&&(i=n),i},Ei=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Nne=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},$t=function(t,n){return Y(t)&&Y(n)?function(r){return t+r*(n-t)}:function(){return n}};function Im(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Jn(r,t))===n})}var Ene=function(t,n){return Y(t)&&Y(n)?t-n:go(t)&&go(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Pl(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 r1(e){"@babel/helpers - typeof";return r1=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},r1(e)}var Tne=["viewBox","children"],Cne=["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"],iT=["points","pathLength"],Dx={svg:Tne,polygon:iT,polyline:iT},t2=["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"],zm=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(j.isValidElement(t)&&(r=t.props),!eu(r))return null;var a={};return Object.keys(r).forEach(function(i){t2.includes(i)&&(a[i]=n||function(s){return r[i](r,s)})}),a},_ne=function(t,n,r){return function(a){return t(n,r,a),null}},yo=function(t,n,r){if(!eu(t)||r1(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var s=t[i];t2.includes(i)&&typeof s=="function"&&(a||(a={}),a[i]=_ne(s,n,r))}),a},Pne=["children"],Mne=["children"];function sT(e,t){if(e==null)return{};var n=kne(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function a1(e){"@babel/helpers - typeof";return a1=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},a1(e)}var oT={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"},Wa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},lT=null,$x=null,n2=function e(t){if(t===lT&&Array.isArray($x))return $x;var n=[];return j.Children.forEach(t,function(r){ye(r)||(mne.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),$x=n,lT=t,n};function er(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Wa(a)}):r=[Wa(t)],n2(e).forEach(function(a){var i=Jn(a,"type.displayName")||Jn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Un(e,t){var n=er(e,t);return n&&n[0]}var cT=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Y(r)||r<=0||!Y(a)||a<=0)},Rne=["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"],Dne=function(t){return t&&t.type&&go(t.type)&&Rne.indexOf(t.type)>=0},o4=function(t){return t&&a1(t)==="object"&&"clipDot"in t},$ne=function(t,n,r,a){var i,s=(i=Dx==null?void 0:Dx[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!pe(t)&&(a&&s.includes(n)||Cne.includes(n))||r&&t2.includes(n)},ie=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(j.isValidElement(t)&&(a=t.props),!eu(a))return null;var i={};return Object.keys(a).forEach(function(s){var o;$ne((o=a)===null||o===void 0?void 0:o[s],s,n,r)&&(i[s]=a[s])}),i},i1=function e(t,n){if(t===n)return!0;var r=j.Children.count(t);if(r!==j.Children.count(n))return!1;if(r===0)return!0;if(r===1)return uT(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],s=n[a];if(Array.isArray(i)||Array.isArray(s)){if(!e(i,s))return!1}else if(!uT(i,s))return!1}return!0},uT=function(t,n){if(ye(t)&&ye(n))return!0;if(!ye(t)&&!ye(n)){var r=t.props||{},a=r.children,i=sT(r,Pne),s=n.props||{},o=s.children,c=sT(s,Mne);return a&&o?Pl(i,c)&&i1(a,o):!a&&!o?Pl(i,c):!1}return!1},dT=function(t,n){var r=[],a={};return n2(t).forEach(function(i,s){if(Dne(i))r.push(i);else if(i){var o=Wa(i.type),c=n[o]||{},u=c.handler,d=c.once;if(u&&(!d||!a[o])){var f=u(i,o,s);r.push(f),a[o]=!0}}}),r},Lne=function(t){var n=t&&t.type;return n&&oT[n]?oT[n]:null},Ine=function(t,n){return n2(n).indexOf(t)},zne=["children","width","height","viewBox","className","style","title","desc"];function s1(){return s1=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},s1.apply(this,arguments)}function Bne(e,t){if(e==null)return{};var n=Une(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Une(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 o1(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,s=e.style,o=e.title,c=e.desc,u=Bne(e,zne),d=a||{width:n,height:r,x:0,y:0},f=be("recharts-surface",i);return P.createElement("svg",s1({},ie(u,!0,"svg"),{className:f,width:n,height:r,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),P.createElement("title",null,o),P.createElement("desc",null,c),t)}var Fne=["children","className"];function l1(){return l1=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},l1.apply(this,arguments)}function Vne(e,t){if(e==null)return{};var n=Hne(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hne(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 Ne=P.forwardRef(function(e,t){var n=e.children,r=e.className,a=Vne(e,Fne),i=be("recharts-layer",r);return P.createElement("g",l1({className:i},ie(a,!0),{ref:t}),n)}),Ur=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i]};function qne(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i}var Kne=qne,Gne=Kne;function Yne(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Gne(e,t,n)}var Wne=Yne,Xne="\\ud800-\\udfff",Qne="\\u0300-\\u036f",Zne="\\ufe20-\\ufe2f",Jne="\\u20d0-\\u20ff",ere=Qne+Zne+Jne,tre="\\ufe0e\\ufe0f",nre="\\u200d",rre=RegExp("["+nre+Xne+ere+tre+"]");function are(e){return rre.test(e)}var l4=are;function ire(e){return e.split("")}var sre=ire,c4="\\ud800-\\udfff",ore="\\u0300-\\u036f",lre="\\ufe20-\\ufe2f",cre="\\u20d0-\\u20ff",ure=ore+lre+cre,dre="\\ufe0e\\ufe0f",fre="["+c4+"]",c1="["+ure+"]",u1="\\ud83c[\\udffb-\\udfff]",hre="(?:"+c1+"|"+u1+")",u4="[^"+c4+"]",d4="(?:\\ud83c[\\udde6-\\uddff]){2}",f4="[\\ud800-\\udbff][\\udc00-\\udfff]",pre="\\u200d",h4=hre+"?",p4="["+dre+"]?",mre="(?:"+pre+"(?:"+[u4,d4,f4].join("|")+")"+p4+h4+")*",gre=p4+h4+mre,yre="(?:"+[u4+c1+"?",c1,d4,f4,fre].join("|")+")",vre=RegExp(u1+"(?="+u1+")|"+yre+gre,"g");function xre(e){return e.match(vre)||[]}var bre=xre,Sre=sre,wre=l4,jre=bre;function Are(e){return wre(e)?jre(e):Sre(e)}var Ore=Are,Nre=Wne,Ere=l4,Tre=Ore,Cre=t4;function _re(e){return function(t){t=Cre(t);var n=Ere(t)?Tre(t):void 0,r=n?n[0]:t.charAt(0),a=n?Nre(n,1).join(""):t.slice(1);return r[e]()+a}}var Pre=_re,Mre=Pre,kre=Mre("toUpperCase"),Rre=kre;const Vy=Fe(Rre);function et(e){return function(){return e}}const m4=Math.cos,Bm=Math.sin,Kr=Math.sqrt,Um=Math.PI,Hy=2*Um,d1=Math.PI,f1=2*d1,Ts=1e-6,Dre=f1-Ts;function g4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function $re(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return g4;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class Lre{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?g4:$re(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,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,s){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,o=this._y1,c=r-t,u=a-n,d=s-t,f=o-n,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Ts)if(!(Math.abs(f*c-u*d)>Ts)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,g=a-o,m=c*c+u*u,v=p*p+g*g,y=Math.sqrt(m),x=Math.sqrt(h),b=i*Math.tan((d1-Math.acos((m+h-v)/(2*y*x)))/2),w=b/x,S=b/y;Math.abs(w-1)>Ts&&this._append`L${t+w*d},${n+w*f}`,this._append`A${i},${i},0,0,${+(f*p>d*g)},${this._x1=t+S*c},${this._y1=n+S*u}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),c=r*Math.sin(a),u=t+o,d=n+c,f=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Ts||Math.abs(this._y1-d)>Ts)&&this._append`L${u},${d}`,r&&(h<0&&(h=h%f1+f1),h>Dre?this._append`A${r},${r},0,1,${f},${t-o},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:h>Ts&&this._append`A${r},${r},0,${+(h>=d1)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function r2(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 Lre(t)}function a2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function y4(e){this._context=e}y4.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 qy(e){return new y4(e)}function v4(e){return e[0]}function x4(e){return e[1]}function b4(e,t){var n=et(!0),r=null,a=qy,i=null,s=r2(o);e=typeof e=="function"?e:e===void 0?v4:et(e),t=typeof t=="function"?t:t===void 0?x4:et(t);function o(c){var u,d=(c=a2(c)).length,f,h=!1,p;for(r==null&&(i=a(p=s())),u=0;u<=d;++u)!(u<d&&n(f=c[u],u,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(f,u,c),+t(f,u,c));if(p)return i=null,p+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:et(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:et(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:et(!!c),o):n},o.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),o):a},o.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),o):r},o}function Yh(e,t,n){var r=null,a=et(!0),i=null,s=qy,o=null,c=r2(u);e=typeof e=="function"?e:e===void 0?v4:et(+e),t=typeof t=="function"?t:et(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?x4:et(+n);function u(f){var h,p,g,m=(f=a2(f)).length,v,y=!1,x,b=new Array(m),w=new Array(m);for(i==null&&(o=s(x=c())),h=0;h<=m;++h){if(!(h<m&&a(v=f[h],h,f))===y)if(y=!y)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),g=h-1;g>=p;--g)o.point(b[g],w[g]);o.lineEnd(),o.areaEnd()}y&&(b[h]=+e(v,h,f),w[h]=+t(v,h,f),o.point(r?+r(v,h,f):b[h],n?+n(v,h,f):w[h]))}if(x)return o=null,x+""||null}function d(){return b4().defined(a).curve(s).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:et(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:et(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:et(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:et(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:et(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:et(+f),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:et(!!f),u):a},u.curve=function(f){return arguments.length?(s=f,i!=null&&(o=s(i)),u):s},u.context=function(f){return arguments.length?(f==null?i=o=null:o=s(i=f),u):i},u}class S4{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 Ire(e){return new S4(e,!0)}function zre(e){return new S4(e,!1)}const i2={draw(e,t){const n=Kr(t/Um);e.moveTo(n,0),e.arc(0,0,n,0,Hy)}},Bre={draw(e,t){const n=Kr(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()}},w4=Kr(1/3),Ure=w4*2,Fre={draw(e,t){const n=Kr(t/Ure),r=n*w4;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Vre={draw(e,t){const n=Kr(t),r=-n/2;e.rect(r,r,n,n)}},Hre=.8908130915292852,j4=Bm(Um/10)/Bm(7*Um/10),qre=Bm(Hy/10)*j4,Kre=-m4(Hy/10)*j4,Gre={draw(e,t){const n=Kr(t*Hre),r=qre*n,a=Kre*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=Hy*i/5,o=m4(s),c=Bm(s);e.lineTo(c*n,-o*n),e.lineTo(o*r-c*a,c*r+o*a)}e.closePath()}},Lx=Kr(3),Yre={draw(e,t){const n=-Kr(t/(Lx*3));e.moveTo(0,n*2),e.lineTo(-Lx*n,-n),e.lineTo(Lx*n,-n),e.closePath()}},sr=-.5,or=Kr(3)/2,h1=1/Kr(12),Wre=(h1/2+1)*3,Xre={draw(e,t){const n=Kr(t/Wre),r=n/2,a=n*h1,i=r,s=n*h1+n,o=-i,c=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,c),e.lineTo(sr*r-or*a,or*r+sr*a),e.lineTo(sr*i-or*s,or*i+sr*s),e.lineTo(sr*o-or*c,or*o+sr*c),e.lineTo(sr*r+or*a,sr*a-or*r),e.lineTo(sr*i+or*s,sr*s-or*i),e.lineTo(sr*o+or*c,sr*c-or*o),e.closePath()}};function Qre(e,t){let n=null,r=r2(a);e=typeof e=="function"?e:et(e||i2),t=typeof t=="function"?t:et(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:et(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:et(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function Fm(){}function Vm(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 A4(e){this._context=e}A4.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:Vm(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:Vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zre(e){return new A4(e)}function O4(e){this._context=e}O4.prototype={areaStart:Fm,areaEnd:Fm,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:Vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jre(e){return new O4(e)}function N4(e){this._context=e}N4.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:Vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eae(e){return new N4(e)}function E4(e){this._context=e}E4.prototype={areaStart:Fm,areaEnd:Fm,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 tae(e){return new E4(e)}function fT(e){return e<0?-1:1}function hT(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(fT(i)+fT(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function pT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ix(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function Hm(e){this._context=e}Hm.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:Ix(this,this._t0,pT(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,Ix(this,pT(this,n=hT(this,e,t)),n);break;default:Ix(this,this._t0,n=hT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function T4(e){this._context=new C4(e)}(T4.prototype=Object.create(Hm.prototype)).point=function(e,t){Hm.prototype.point.call(this,t,e)};function C4(e){this._context=e}C4.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,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function nae(e){return new Hm(e)}function rae(e){return new T4(e)}function _4(e){this._context=e}_4.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=mT(e),a=mT(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(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 mT(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function aae(e){return new _4(e)}function Ky(e,t){this._context=e,this._t=t}Ky.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 iae(e){return new Ky(e,.5)}function sae(e){return new Ky(e,0)}function oae(e){return new Ky(e,1)}function dc(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<o;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function p1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function lae(e,t){return e[t]}function cae(e){const t=[];return t.key=e,t}function uae(){var e=et([]),t=p1,n=dc,r=lae;function a(i){var s=Array.from(e.apply(this,arguments),cae),o,c=s.length,u=-1,d;for(const f of i)for(o=0,++u;o<c;++o)(s[o][u]=[0,+r(f,s[o].key,u,i)]).data=f;for(o=0,d=a2(t(s));o<c;++o)s[d[o]].index=o;return n(s,d),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:et(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:et(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?p1:typeof i=="function"?i:et(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??dc,a):n},a}function dae(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}dc(e,t)}}function fae(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,o=0;s<a;++s)o+=e[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}dc(e,t)}}function hae(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var o=0,c=0,u=0;o<s;++o){for(var d=e[t[o]],f=d[r][1]||0,h=d[r-1][1]||0,p=(f-h)/2,g=0;g<o;++g){var m=e[t[g]],v=m[r][1]||0,y=m[r-1][1]||0;p+=v-y}c+=f,u+=p*f}a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,dc(e,t)}}function Wd(e){"@babel/helpers - typeof";return Wd=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},Wd(e)}var pae=["type","size","sizeType"];function m1(){return m1=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},m1.apply(this,arguments)}function gT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function yT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gT(Object(n),!0).forEach(function(r){mae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mae(e,t,n){return t=gae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gae(e){var t=yae(e,"string");return Wd(t)=="symbol"?t:t+""}function yae(e,t){if(Wd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vae(e,t){if(e==null)return{};var n=xae(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(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={};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 P4={symbolCircle:i2,symbolCross:Bre,symbolDiamond:Fre,symbolSquare:Vre,symbolStar:Gre,symbolTriangle:Yre,symbolWye:Xre},bae=Math.PI/180,Sae=function(t){var n="symbol".concat(Vy(t));return P4[n]||i2},wae=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 a=18*bae;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},jae=function(t,n){P4["symbol".concat(Vy(t))]=n},s2=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,s=t.sizeType,o=s===void 0?"area":s,c=vae(t,pae),u=yT(yT({},c),{},{type:r,size:i,sizeType:o}),d=function(){var v=Sae(r),y=Qre().type(v).size(wae(i,o,r));return y()},f=u.className,h=u.cx,p=u.cy,g=ie(u,!0);return h===+h&&p===+p&&i===+i?P.createElement("path",m1({},g,{className:be("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};s2.registerSymbol=jae;function fc(e){"@babel/helpers - typeof";return fc=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},fc(e)}function g1(){return g1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g1.apply(this,arguments)}function vT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Aae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vT(Object(n),!0).forEach(function(r){Xd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k4(r.key),r)}}function Eae(e,t,n){return t&&Nae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tae(e,t,n){return t=qm(t),Cae(e,M4()?Reflect.construct(t,n||[],qm(e).constructor):t.apply(e,n))}function Cae(e,t){if(t&&(fc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _ae(e)}function _ae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M4=function(){return!!e})()}function qm(e){return qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qm(e)}function Pae(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&&y1(e,t)}function y1(e,t){return y1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},y1(e,t)}function Xd(e,t,n){return t=k4(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k4(e){var t=Mae(e,"string");return fc(t)=="symbol"?t:t+""}function Mae(e,t){if(fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lr=32,o2=function(e){function t(){return Oae(this,t),Tae(this,t,arguments)}return Pae(t,e),Eae(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=lr/2,s=lr/6,o=lr/3,c=r.inactive?a:r.color;if(r.type==="plainline")return P.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:lr,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return P.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(o,`
            A`).concat(s,",").concat(s,",0,1,1,").concat(2*o,",").concat(i,`
            H`).concat(lr,"M").concat(2*o,",").concat(i,`
            A`).concat(s,",").concat(s,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return P.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(lr/8,"h").concat(lr,"v").concat(lr*3/4,"h").concat(-lr,"z"),className:"recharts-legend-icon"});if(P.isValidElement(r.legendIcon)){var u=Aae({},r);return delete u.legendIcon,P.cloneElement(r.legendIcon,u)}return P.createElement(s2,{fill:c,cx:i,cy:i,size:lr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,s=a.iconSize,o=a.layout,c=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:lr,height:lr},f={display:o==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,g){var m=p.formatter||c,v=be(Xd(Xd({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var y=pe(p.value)?null:p.value;Ur(!pe(p.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 x=p.inactive?u:p.color;return P.createElement("li",g1({className:v,style:f,key:"legend-item-".concat(g)},yo(r.props,p,g)),P.createElement(o1,{width:s,height:s,viewBox:d,style:h},r.renderIcon(p)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(y,p,g):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,s=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return P.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(j.PureComponent);Xd(o2,"displayName","Legend");Xd(o2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var kae=_y;function Rae(){this.__data__=new kae,this.size=0}var Dae=Rae;function $ae(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Lae=$ae;function Iae(e){return this.__data__.get(e)}var zae=Iae;function Bae(e){return this.__data__.has(e)}var Uae=Bae,Fae=_y,Vae=Yj,Hae=Wj,qae=200;function Kae(e,t){var n=this.__data__;if(n instanceof Fae){var r=n.__data__;if(!Vae||r.length<qae-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hae(r)}return n.set(e,t),this.size=n.size,this}var Gae=Kae,Yae=_y,Wae=Dae,Xae=Lae,Qae=zae,Zae=Uae,Jae=Gae;function iu(e){var t=this.__data__=new Yae(e);this.size=t.size}iu.prototype.clear=Wae;iu.prototype.delete=Xae;iu.prototype.get=Qae;iu.prototype.has=Zae;iu.prototype.set=Jae;var R4=iu,eie="__lodash_hash_undefined__";function tie(e){return this.__data__.set(e,eie),this}var nie=tie;function rie(e){return this.__data__.has(e)}var aie=rie,iie=Wj,sie=nie,oie=aie;function Km(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new iie;++t<n;)this.add(e[t])}Km.prototype.add=Km.prototype.push=sie;Km.prototype.has=oie;var D4=Km;function lie(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var $4=lie;function cie(e,t){return e.has(t)}var L4=cie,uie=D4,die=$4,fie=L4,hie=1,pie=2;function mie(e,t,n,r,a,i){var s=n&hie,o=e.length,c=t.length;if(o!=c&&!(s&&c>o))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=n&pie?new uie:void 0;for(i.set(e,t),i.set(t,e);++f<o;){var g=e[f],m=t[f];if(r)var v=s?r(m,g,f,t,e,i):r(g,m,f,e,t,i);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!die(t,function(y,x){if(!fie(p,x)&&(g===y||a(g,y,n,r,i)))return p.push(x)})){h=!1;break}}else if(!(g===m||a(g,m,n,r,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var I4=mie,gie=va,yie=gie.Uint8Array,vie=yie;function xie(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var bie=xie;function Sie(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var l2=Sie,xT=uh,bT=vie,wie=Gj,jie=I4,Aie=bie,Oie=l2,Nie=1,Eie=2,Tie="[object Boolean]",Cie="[object Date]",_ie="[object Error]",Pie="[object Map]",Mie="[object Number]",kie="[object RegExp]",Rie="[object Set]",Die="[object String]",$ie="[object Symbol]",Lie="[object ArrayBuffer]",Iie="[object DataView]",ST=xT?xT.prototype:void 0,zx=ST?ST.valueOf:void 0;function zie(e,t,n,r,a,i,s){switch(n){case Iie:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lie:return!(e.byteLength!=t.byteLength||!i(new bT(e),new bT(t)));case Tie:case Cie:case Mie:return wie(+e,+t);case _ie:return e.name==t.name&&e.message==t.message;case kie:case Die:return e==t+"";case Pie:var o=Aie;case Rie:var c=r&Nie;if(o||(o=Oie),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=Eie,s.set(e,t);var d=jie(o(e),o(t),r,a,i,s);return s.delete(e),d;case $ie:if(zx)return zx.call(e)==zx.call(t)}return!1}var Bie=zie;function Uie(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var z4=Uie,Fie=z4,Vie=$n;function Hie(e,t,n){var r=t(e);return Vie(e)?r:Fie(r,n(e))}var qie=Hie;function Kie(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i}var Gie=Kie;function Yie(){return[]}var Wie=Yie,Xie=Gie,Qie=Wie,Zie=Object.prototype,Jie=Zie.propertyIsEnumerable,wT=Object.getOwnPropertySymbols,ese=wT?function(e){return e==null?[]:(e=Object(e),Xie(wT(e),function(t){return Jie.call(e,t)}))}:Qie,tse=ese;function nse(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var rse=nse,ase=ui,ise=di,sse="[object Arguments]";function ose(e){return ise(e)&&ase(e)==sse}var lse=ose,jT=lse,cse=di,B4=Object.prototype,use=B4.hasOwnProperty,dse=B4.propertyIsEnumerable,fse=jT(function(){return arguments}())?jT:function(e){return cse(e)&&use.call(e,"callee")&&!dse.call(e,"callee")},c2=fse,Gm={exports:{}};function hse(){return!1}var pse=hse;Gm.exports;(function(e,t){var n=va,r=pse,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,o=s?n.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||r;e.exports=u})(Gm,Gm.exports);var U4=Gm.exports,mse=9007199254740991,gse=/^(?:0|[1-9]\d*)$/;function yse(e,t){var n=typeof e;return t=t??mse,!!t&&(n=="number"||n!="symbol"&&gse.test(e))&&e>-1&&e%1==0&&e<t}var u2=yse,vse=9007199254740991;function xse(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vse}var d2=xse,bse=ui,Sse=d2,wse=di,jse="[object Arguments]",Ase="[object Array]",Ose="[object Boolean]",Nse="[object Date]",Ese="[object Error]",Tse="[object Function]",Cse="[object Map]",_se="[object Number]",Pse="[object Object]",Mse="[object RegExp]",kse="[object Set]",Rse="[object String]",Dse="[object WeakMap]",$se="[object ArrayBuffer]",Lse="[object DataView]",Ise="[object Float32Array]",zse="[object Float64Array]",Bse="[object Int8Array]",Use="[object Int16Array]",Fse="[object Int32Array]",Vse="[object Uint8Array]",Hse="[object Uint8ClampedArray]",qse="[object Uint16Array]",Kse="[object Uint32Array]",at={};at[Ise]=at[zse]=at[Bse]=at[Use]=at[Fse]=at[Vse]=at[Hse]=at[qse]=at[Kse]=!0;at[jse]=at[Ase]=at[$se]=at[Ose]=at[Lse]=at[Nse]=at[Ese]=at[Tse]=at[Cse]=at[_se]=at[Pse]=at[Mse]=at[kse]=at[Rse]=at[Dse]=!1;function Gse(e){return wse(e)&&Sse(e.length)&&!!at[bse(e)]}var Yse=Gse;function Wse(e){return function(t){return e(t)}}var F4=Wse,Ym={exports:{}};Ym.exports;(function(e,t){var n=W5,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Ym,Ym.exports);var Xse=Ym.exports,Qse=Yse,Zse=F4,AT=Xse,OT=AT&&AT.isTypedArray,Jse=OT?Zse(OT):Qse,V4=Jse,eoe=rse,toe=c2,noe=$n,roe=U4,aoe=u2,ioe=V4,soe=Object.prototype,ooe=soe.hasOwnProperty;function loe(e,t){var n=noe(e),r=!n&&toe(e),a=!n&&!r&&roe(e),i=!n&&!r&&!a&&ioe(e),s=n||r||a||i,o=s?eoe(e.length,String):[],c=o.length;for(var u in e)(t||ooe.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||aoe(u,c)))&&o.push(u);return o}var coe=loe,uoe=Object.prototype;function doe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||uoe;return e===n}var foe=doe;function hoe(e,t){return function(n){return e(t(n))}}var H4=hoe,poe=H4,moe=poe(Object.keys,Object),goe=moe,yoe=foe,voe=goe,xoe=Object.prototype,boe=xoe.hasOwnProperty;function Soe(e){if(!yoe(e))return voe(e);var t=[];for(var n in Object(e))boe.call(e,n)&&n!="constructor"&&t.push(n);return t}var woe=Soe,joe=Kj,Aoe=d2;function Ooe(e){return e!=null&&Aoe(e.length)&&!joe(e)}var dh=Ooe,Noe=coe,Eoe=woe,Toe=dh;function Coe(e){return Toe(e)?Noe(e):Eoe(e)}var Gy=Coe,_oe=qie,Poe=tse,Moe=Gy;function koe(e){return _oe(e,Moe,Poe)}var Roe=koe,NT=Roe,Doe=1,$oe=Object.prototype,Loe=$oe.hasOwnProperty;function Ioe(e,t,n,r,a,i){var s=n&Doe,o=NT(e),c=o.length,u=NT(t),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=o[f];if(!(s?h in t:Loe.call(t,h)))return!1}var p=i.get(e),g=i.get(t);if(p&&g)return p==t&&g==e;var m=!0;i.set(e,t),i.set(t,e);for(var v=s;++f<c;){h=o[f];var y=e[h],x=t[h];if(r)var b=s?r(x,y,h,t,e,i):r(y,x,h,e,t,i);if(!(b===void 0?y===x||a(y,x,n,r,i):b)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var w=e.constructor,S=t.constructor;w!=S&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof S=="function"&&S instanceof S)&&(m=!1)}return i.delete(e),i.delete(t),m}var zoe=Ioe,Boe=_o,Uoe=va,Foe=Boe(Uoe,"DataView"),Voe=Foe,Hoe=_o,qoe=va,Koe=Hoe(qoe,"Promise"),Goe=Koe,Yoe=_o,Woe=va,Xoe=Yoe(Woe,"Set"),q4=Xoe,Qoe=_o,Zoe=va,Joe=Qoe(Zoe,"WeakMap"),ele=Joe,v1=Voe,x1=Yj,b1=Goe,S1=q4,w1=ele,K4=ui,su=Q5,ET="[object Map]",tle="[object Object]",TT="[object Promise]",CT="[object Set]",_T="[object WeakMap]",PT="[object DataView]",nle=su(v1),rle=su(x1),ale=su(b1),ile=su(S1),sle=su(w1),Cs=K4;(v1&&Cs(new v1(new ArrayBuffer(1)))!=PT||x1&&Cs(new x1)!=ET||b1&&Cs(b1.resolve())!=TT||S1&&Cs(new S1)!=CT||w1&&Cs(new w1)!=_T)&&(Cs=function(e){var t=K4(e),n=t==tle?e.constructor:void 0,r=n?su(n):"";if(r)switch(r){case nle:return PT;case rle:return ET;case ale:return TT;case ile:return CT;case sle:return _T}return t});var ole=Cs,Bx=R4,lle=I4,cle=Bie,ule=zoe,MT=ole,kT=$n,RT=U4,dle=V4,fle=1,DT="[object Arguments]",$T="[object Array]",Wh="[object Object]",hle=Object.prototype,LT=hle.hasOwnProperty;function ple(e,t,n,r,a,i){var s=kT(e),o=kT(t),c=s?$T:MT(e),u=o?$T:MT(t);c=c==DT?Wh:c,u=u==DT?Wh:u;var d=c==Wh,f=u==Wh,h=c==u;if(h&&RT(e)){if(!RT(t))return!1;s=!0,d=!1}if(h&&!d)return i||(i=new Bx),s||dle(e)?lle(e,t,n,r,a,i):cle(e,t,c,n,r,a,i);if(!(n&fle)){var p=d&&LT.call(e,"__wrapped__"),g=f&&LT.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,v=g?t.value():t;return i||(i=new Bx),a(m,v,n,r,i)}}return h?(i||(i=new Bx),ule(e,t,n,r,a,i)):!1}var mle=ple,gle=mle,IT=di;function G4(e,t,n,r,a){return e===t?!0:e==null||t==null||!IT(e)&&!IT(t)?e!==e&&t!==t:gle(e,t,n,r,G4,a)}var f2=G4,yle=R4,vle=f2,xle=1,ble=2;function Sle(e,t,n,r){var a=n.length,i=a,s=!r;if(e==null)return!i;for(e=Object(e);a--;){var o=n[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){o=n[a];var c=o[0],u=e[c],d=o[1];if(s&&o[2]){if(u===void 0&&!(c in e))return!1}else{var f=new yle;if(r)var h=r(u,d,c,e,t,f);if(!(h===void 0?vle(d,u,xle|ble,r,f):h))return!1}}return!0}var wle=Sle,jle=us;function Ale(e){return e===e&&!jle(e)}var Y4=Ale,Ole=Y4,Nle=Gy;function Ele(e){for(var t=Nle(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Ole(a)]}return t}var Tle=Ele;function Cle(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var W4=Cle,_le=wle,Ple=Tle,Mle=W4;function kle(e){var t=Ple(e);return t.length==1&&t[0][2]?Mle(t[0][0],t[0][1]):function(n){return n===e||_le(n,e,t)}}var Rle=kle;function Dle(e,t){return e!=null&&t in Object(e)}var $le=Dle,Lle=n4,Ile=c2,zle=$n,Ble=u2,Ule=d2,Fle=My;function Vle(e,t,n){t=Lle(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var s=Fle(t[r]);if(!(i=e!=null&&n(e,s)))break;e=e[s]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&Ule(a)&&Ble(s,a)&&(zle(e)||Ile(e)))}var Hle=Vle,qle=$le,Kle=Hle;function Gle(e,t){return e!=null&&Kle(e,t,qle)}var Yle=Gle,Wle=f2,Xle=r4,Qle=Yle,Zle=qj,Jle=Y4,ece=W4,tce=My,nce=1,rce=2;function ace(e,t){return Zle(e)&&Jle(t)?ece(tce(e),t):function(n){var r=Xle(n,e);return r===void 0&&r===t?Qle(n,e):Wle(t,r,nce|rce)}}var ice=ace;function sce(e){return e}var ou=sce;function oce(e){return function(t){return t==null?void 0:t[e]}}var lce=oce,cce=Zj;function uce(e){return function(t){return cce(t,e)}}var dce=uce,fce=lce,hce=dce,pce=qj,mce=My;function gce(e){return pce(e)?fce(mce(e)):hce(e)}var yce=gce,vce=Rle,xce=ice,bce=ou,Sce=$n,wce=yce;function jce(e){return typeof e=="function"?e:e==null?bce:typeof e=="object"?Sce(e)?xce(e[0],e[1]):vce(e):wce(e)}var xa=jce;function Ace(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var X4=Ace;function Oce(e){return e!==e}var Nce=Oce;function Ece(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var Tce=Ece,Cce=X4,_ce=Nce,Pce=Tce;function Mce(e,t,n){return t===t?Pce(e,t,n):Cce(e,_ce,n)}var kce=Mce,Rce=kce;function Dce(e,t){var n=e==null?0:e.length;return!!n&&Rce(e,t,0)>-1}var $ce=Dce;function Lce(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var Ice=Lce;function zce(){}var Bce=zce,Ux=q4,Uce=Bce,Fce=l2,Vce=1/0,Hce=Ux&&1/Fce(new Ux([,-0]))[1]==Vce?function(e){return new Ux(e)}:Uce,qce=Hce,Kce=D4,Gce=$ce,Yce=Ice,Wce=L4,Xce=qce,Qce=l2,Zce=200;function Jce(e,t,n){var r=-1,a=Gce,i=e.length,s=!0,o=[],c=o;if(n)s=!1,a=Yce;else if(i>=Zce){var u=t?null:Xce(e);if(u)return Qce(u);s=!1,a=Wce,c=new Kce}else c=t?[]:o;e:for(;++r<i;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,s&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),o.push(d)}else a(c,f,n)||(c!==o&&c.push(f),o.push(d))}return o}var eue=Jce,tue=xa,nue=eue;function rue(e,t){return e&&e.length?nue(e,tue(t)):[]}var aue=rue;const zT=Fe(aue);function Q4(e,t,n){return t===!0?zT(e,n):pe(t)?zT(e,t):e}function hc(e){"@babel/helpers - typeof";return hc=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},hc(e)}var iue=["ref"];function BT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?BT(Object(n),!0).forEach(function(r){Yy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UT(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,J4(r.key),r)}}function oue(e,t,n){return t&&UT(e.prototype,t),n&&UT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lue(e,t,n){return t=Wm(t),cue(e,Z4()?Reflect.construct(t,n||[],Wm(e).constructor):t.apply(e,n))}function cue(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uue(e)}function uue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z4=function(){return!!e})()}function Wm(e){return Wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wm(e)}function due(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j1(e,t)}function j1(e,t){return j1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},j1(e,t)}function Yy(e,t,n){return t=J4(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J4(e){var t=fue(e,"string");return hc(t)=="symbol"?t:t+""}function fue(e,t){if(hc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hue(e,t){if(e==null)return{};var n=pue(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pue(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 mue(e){return e.value}function gue(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if(typeof e=="function")return P.createElement(e,t);t.ref;var n=hue(t,iue);return P.createElement(o2,n)}var FT=1,ia=function(e){function t(){var n;sue(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=lue(this,t,[].concat(a)),Yy(n,"lastBoundingBox",{width:-1,height:-1}),n}return due(t,e),oue(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,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>FT||Math.abs(a.height-this.lastBoundingBox.height)>FT)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(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 a=this.props,i=a.layout,s=a.align,o=a.verticalAlign,c=a.margin,u=a.chartWidth,d=a.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var g=this.getBBoxSnapshot();h={top:((d||0)-g.height)/2}}else h=o==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Ta(Ta({},f),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,s=a.width,o=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,f=Ta(Ta({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(c)),c);return P.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},gue(i,Ta(Ta({},this.props),{},{payload:Q4(d,u,mue)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Ta(Ta({},this.defaultProps),r.props),s=i.layout;return s==="vertical"&&Y(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||a}:null}}])}(j.PureComponent);Yy(ia,"displayName","Legend");Yy(ia,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var VT=uh,yue=c2,vue=$n,HT=VT?VT.isConcatSpreadable:void 0;function xue(e){return vue(e)||yue(e)||!!(HT&&e&&e[HT])}var bue=xue,Sue=z4,wue=bue;function eL(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=wue),a||(a=[]);++i<s;){var o=e[i];t>0&&n(o)?t>1?eL(o,t-1,n,r,a):Sue(a,o):r||(a[a.length]=o)}return a}var tL=eL;function jue(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var c=s[e?o:++a];if(n(i[c],c,i)===!1)break}return t}}var Aue=jue,Oue=Aue,Nue=Oue(),Eue=Nue,Tue=Eue,Cue=Gy;function _ue(e,t){return e&&Tue(e,t,Cue)}var nL=_ue,Pue=dh;function Mue(e,t){return function(n,r){if(n==null)return n;if(!Pue(n))return e(n,r);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++i<a)&&r(s[i],i,s)!==!1;);return n}}var kue=Mue,Rue=nL,Due=kue,$ue=Due(Rue),h2=$ue,Lue=h2,Iue=dh;function zue(e,t){var n=-1,r=Iue(e)?Array(e.length):[];return Lue(e,function(a,i,s){r[++n]=t(a,i,s)}),r}var rL=zue;function Bue(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var Uue=Bue,qT=Jc;function Fue(e,t){if(e!==t){var n=e!==void 0,r=e===null,a=e===e,i=qT(e),s=t!==void 0,o=t===null,c=t===t,u=qT(t);if(!o&&!u&&!i&&e>t||i&&s&&c&&!o&&!u||r&&s&&c||!n&&c||!a)return 1;if(!r&&!i&&!u&&e<t||u&&n&&a&&!r&&!i||o&&n&&a||!s&&a||!c)return-1}return 0}var Vue=Fue,Hue=Vue;function que(e,t,n){for(var r=-1,a=e.criteria,i=t.criteria,s=a.length,o=n.length;++r<s;){var c=Hue(a[r],i[r]);if(c){if(r>=o)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var Kue=que,Fx=Qj,Gue=Zj,Yue=xa,Wue=rL,Xue=Uue,Que=F4,Zue=Kue,Jue=ou,ede=$n;function tde(e,t,n){t.length?t=Fx(t,function(i){return ede(i)?function(s){return Gue(s,i.length===1?i[0]:i)}:i}):t=[Jue];var r=-1;t=Fx(t,Que(Yue));var a=Wue(e,function(i,s,o){var c=Fx(t,function(u){return u(i)});return{criteria:c,index:++r,value:i}});return Xue(a,function(i,s){return Zue(i,s,n)})}var nde=tde;function rde(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ade=rde,ide=ade,KT=Math.max;function sde(e,t,n){return t=KT(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=KT(r.length-t,0),s=Array(i);++a<i;)s[a]=r[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=r[a];return o[t]=n(s),ide(e,this,o)}}var ode=sde;function lde(e){return function(){return e}}var cde=lde,ude=_o,dde=function(){try{var e=ude(Object,"defineProperty");return e({},"",{}),e}catch{}}(),aL=dde,fde=cde,GT=aL,hde=ou,pde=GT?function(e,t){return GT(e,"toString",{configurable:!0,enumerable:!1,value:fde(t),writable:!0})}:hde,mde=pde,gde=800,yde=16,vde=Date.now;function xde(e){var t=0,n=0;return function(){var r=vde(),a=yde-(r-n);if(n=r,a>0){if(++t>=gde)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var bde=xde,Sde=mde,wde=bde,jde=wde(Sde),Ade=jde,Ode=ou,Nde=ode,Ede=Ade;function Tde(e,t){return Ede(Nde(e,t,Ode),e+"")}var Cde=Tde,_de=Gj,Pde=dh,Mde=u2,kde=us;function Rde(e,t,n){if(!kde(n))return!1;var r=typeof t;return(r=="number"?Pde(n)&&Mde(t,n.length):r=="string"&&t in n)?_de(n[t],e):!1}var Wy=Rde,Dde=tL,$de=nde,Lde=Cde,YT=Wy,Ide=Lde(function(e,t){if(e==null)return[];var n=t.length;return n>1&&YT(e,t[0],t[1])?t=[]:n>2&&YT(t[0],t[1],t[2])&&(t=[t[0]]),$de(e,Dde(t,1),[])}),zde=Ide;const p2=Fe(zde);function Qd(e){"@babel/helpers - typeof";return Qd=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},Qd(e)}function A1(){return A1=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},A1.apply(this,arguments)}function Bde(e,t){return Hde(e)||Vde(e,t)||Fde(e,t)||Ude()}function Ude(){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 Fde(e,t){if(e){if(typeof e=="string")return WT(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 WT(e,t)}}function WT(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 Vde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function Hde(e){if(Array.isArray(e))return e}function XT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Vx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(n),!0).forEach(function(r){qde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qde(e,t,n){return t=Kde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kde(e){var t=Gde(e,"string");return Qd(t)=="symbol"?t:t+""}function Gde(e,t){if(Qd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yde(e){return Array.isArray(e)&&It(e[0])&&It(e[1])?e.join(" ~ "):e}var Wde=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,s=t.itemStyle,o=s===void 0?{}:s,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,m=t.label,v=t.labelFormatter,y=t.accessibilityLayer,x=y===void 0?!1:y,b=function(){if(d&&d.length){var C={padding:0,margin:0},$=(h?p2(d,h):d).map(function(R,k){if(R.type==="none")return null;var M=Vx({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},o),L=R.formatter||f||Yde,z=R.value,V=R.name,K=z,U=V;if(L&&K!=null&&U!=null){var G=L(z,V,R,k,d);if(Array.isArray(G)){var ne=Bde(G,2);K=ne[0],U=ne[1]}else K=G}return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(k),style:M},It(U)?P.createElement("span",{className:"recharts-tooltip-item-name"},U):null,It(U)?P.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,P.createElement("span",{className:"recharts-tooltip-item-value"},K),P.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:C},$)}return null},w=Vx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),S=Vx({margin:0},u),A=!ye(m),O=A?m:"",N=be("recharts-default-tooltip",p),E=be("recharts-tooltip-label",g);A&&v&&d!==void 0&&d!==null&&(O=v(m,d));var T=x?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",A1({className:N,style:w},T),P.createElement("p",{className:E,style:S},P.isValidElement(O)?O:"".concat(O)),b())};function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function Xh(e,t,n){return t=Xde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xde(e){var t=Qde(e,"string");return Zd(t)=="symbol"?t:t+""}function Qde(e,t){if(Zd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eu="recharts-tooltip-wrapper",Zde={visibility:"hidden"};function Jde(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return be(Eu,Xh(Xh(Xh(Xh({},"".concat(Eu,"-right"),Y(n)&&t&&Y(t.x)&&n>=t.x),"".concat(Eu,"-left"),Y(n)&&t&&Y(t.x)&&n<t.x),"".concat(Eu,"-bottom"),Y(r)&&t&&Y(t.y)&&r>=t.y),"".concat(Eu,"-top"),Y(r)&&t&&Y(t.y)&&r<t.y))}function QT(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,s=e.reverseDirection,o=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&Y(i[r]))return i[r];var d=n[r]-o-a,f=n[r]+a;if(t[r])return s[r]?d:f;if(s[r]){var h=d,p=c[r];return h<p?Math.max(f,c[r]):Math.max(d,c[r])}var g=f+o,m=c[r]+u;return g>m?Math.max(d,c[r]):Math.max(f,c[r])}function efe(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 tfe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,c=e.viewBox,u,d,f;return s.height>0&&s.width>0&&n?(d=QT({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=QT({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=efe({translateX:d,translateY:f,useTranslate3d:o})):u=Zde,{cssProperties:u,cssClasses:Jde({translateX:d,translateY:f,coordinate:n})}}function pc(e){"@babel/helpers - typeof";return pc=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},pc(e)}function ZT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function JT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZT(Object(n),!0).forEach(function(r){N1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rfe(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 afe(e,t,n){return t&&rfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ife(e,t,n){return t=Xm(t),sfe(e,iL()?Reflect.construct(t,n||[],Xm(e).constructor):t.apply(e,n))}function sfe(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ofe(e)}function ofe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iL=function(){return!!e})()}function Xm(e){return Xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xm(e)}function lfe(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&&O1(e,t)}function O1(e,t){return O1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},O1(e,t)}function N1(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=cfe(e,"string");return pc(t)=="symbol"?t:t+""}function cfe(e,t){if(pc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eC=1,ufe=function(e){function t(){var n;nfe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=ife(this,t,[].concat(a)),N1(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),N1(n,"handleKeyDown",function(s){if(s.key==="Escape"){var o,c,u,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&o!==void 0?o:0,y:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),n}return lfe(t,e),afe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>eC||Math.abs(r.height-this.state.lastBoundingBox.height)>eC)&&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,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,c=a.animationEasing,u=a.children,d=a.coordinate,f=a.hasPayload,h=a.isAnimationActive,p=a.offset,g=a.position,m=a.reverseDirection,v=a.useTranslate3d,y=a.viewBox,x=a.wrapperStyle,b=tfe({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:y}),w=b.cssClasses,S=b.cssProperties,A=JT(JT({transition:h&&i?"transform ".concat(o,"ms ").concat(c):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return P.createElement("div",{tabIndex:-1,className:w,style:A,ref:function(N){r.wrapperNode=N}},u)}}])}(j.PureComponent),dfe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ds={isSsr:dfe()};function mc(e){"@babel/helpers - typeof";return mc=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},mc(e)}function tC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tC(Object(n),!0).forEach(function(r){m2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ffe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hfe(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 pfe(e,t,n){return t&&hfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mfe(e,t,n){return t=Qm(t),gfe(e,oL()?Reflect.construct(t,n||[],Qm(e).constructor):t.apply(e,n))}function gfe(e,t){if(t&&(mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yfe(e)}function yfe(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 Qm(e){return Qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qm(e)}function vfe(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&&E1(e,t)}function E1(e,t){return E1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},E1(e,t)}function m2(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=xfe(e,"string");return mc(t)=="symbol"?t:t+""}function xfe(e,t){if(mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function bfe(e){return e.dataKey}function Sfe(e,t){return P.isValidElement(e)?P.cloneElement(e,t):typeof e=="function"?P.createElement(e,t):P.createElement(Wde,t)}var Hn=function(e){function t(){return ffe(this,t),mfe(this,t,arguments)}return vfe(t,e),pfe(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,c=a.animationEasing,u=a.content,d=a.coordinate,f=a.filterNull,h=a.isAnimationActive,p=a.offset,g=a.payload,m=a.payloadUniqBy,v=a.position,y=a.reverseDirection,x=a.useTranslate3d,b=a.viewBox,w=a.wrapperStyle,S=g??[];f&&S.length&&(S=Q4(g.filter(function(O){return O.value!=null&&(O.hide!==!0||r.props.includeHidden)}),m,bfe));var A=S.length>0;return P.createElement(ufe,{allowEscapeViewBox:s,animationDuration:o,animationEasing:c,isAnimationActive:h,active:i,coordinate:d,hasPayload:A,offset:p,position:v,reverseDirection:y,useTranslate3d:x,viewBox:b,wrapperStyle:w},Sfe(u,nC(nC({},this.props),{},{payload:S})))}}])}(j.PureComponent);m2(Hn,"displayName","Tooltip");m2(Hn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ds.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 wfe=va,jfe=function(){return wfe.Date.now()},Afe=jfe,Ofe=/\s/;function Nfe(e){for(var t=e.length;t--&&Ofe.test(e.charAt(t)););return t}var Efe=Nfe,Tfe=Efe,Cfe=/^\s+/;function _fe(e){return e&&e.slice(0,Tfe(e)+1).replace(Cfe,"")}var Pfe=_fe,Mfe=Pfe,rC=us,kfe=Jc,aC=NaN,Rfe=/^[-+]0x[0-9a-f]+$/i,Dfe=/^0b[01]+$/i,$fe=/^0o[0-7]+$/i,Lfe=parseInt;function Ife(e){if(typeof e=="number")return e;if(kfe(e))return aC;if(rC(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=rC(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Mfe(e);var n=Dfe.test(e);return n||$fe.test(e)?Lfe(e.slice(2),n?2:8):Rfe.test(e)?aC:+e}var cL=Ife,zfe=us,Hx=Afe,iC=cL,Bfe="Expected a function",Ufe=Math.max,Ffe=Math.min;function Vfe(e,t,n){var r,a,i,s,o,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Bfe);t=iC(t)||0,zfe(n)&&(d=!!n.leading,f="maxWait"in n,i=f?Ufe(iC(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(A){var O=r,N=a;return r=a=void 0,u=A,s=e.apply(N,O),s}function g(A){return u=A,o=setTimeout(y,t),d?p(A):s}function m(A){var O=A-c,N=A-u,E=t-O;return f?Ffe(E,i-N):E}function v(A){var O=A-c,N=A-u;return c===void 0||O>=t||O<0||f&&N>=i}function y(){var A=Hx();if(v(A))return x(A);o=setTimeout(y,m(A))}function x(A){return o=void 0,h&&r?p(A):(r=a=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,r=c=a=o=void 0}function w(){return o===void 0?s:x(Hx())}function S(){var A=Hx(),O=v(A);if(r=arguments,a=this,c=A,O){if(o===void 0)return g(c);if(f)return clearTimeout(o),o=setTimeout(y,t),p(c)}return o===void 0&&(o=setTimeout(y,t)),s}return S.cancel=b,S.flush=w,S}var Hfe=Vfe,qfe=Hfe,Kfe=us,Gfe="Expected a function";function Yfe(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Gfe);return Kfe(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),qfe(e,t,{leading:r,maxWait:t,trailing:a})}var Wfe=Yfe;const uL=Fe(Wfe);function Jd(e){"@babel/helpers - typeof";return Jd=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},Jd(e)}function sC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Qh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sC(Object(n),!0).forEach(function(r){Xfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xfe(e,t,n){return t=Qfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qfe(e){var t=Zfe(e,"string");return Jd(t)=="symbol"?t:t+""}function Zfe(e,t){if(Jd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jfe(e,t){return rhe(e)||nhe(e,t)||the(e,t)||ehe()}function ehe(){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 the(e,t){if(e){if(typeof e=="string")return oC(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 oC(e,t)}}function oC(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 nhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function rhe(e){if(Array.isArray(e))return e}var Zh=j.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,i=e.width,s=i===void 0?"100%":i,o=e.height,c=o===void 0?"100%":o,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,m=g===void 0?0:g,v=e.id,y=e.className,x=e.onResize,b=e.style,w=b===void 0?{}:b,S=j.useRef(null),A=j.useRef();A.current=x,j.useImperativeHandle(t,function(){return Object.defineProperty(S.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),S.current},configurable:!0})});var O=j.useState({containerWidth:a.width,containerHeight:a.height}),N=Jfe(O,2),E=N[0],T=N[1],_=j.useCallback(function($,R){T(function(k){var M=Math.round($),L=Math.round(R);return k.containerWidth===M&&k.containerHeight===L?k:{containerWidth:M,containerHeight:L}})},[]);j.useEffect(function(){var $=function(V){var K,U=V[0].contentRect,G=U.width,ne=U.height;_(G,ne),(K=A.current)===null||K===void 0||K.call(A,G,ne)};m>0&&($=uL($,m,{trailing:!0,leading:!1}));var R=new ResizeObserver($),k=S.current.getBoundingClientRect(),M=k.width,L=k.height;return _(M,L),R.observe(S.current),function(){R.disconnect()}},[_,m]);var C=j.useMemo(function(){var $=E.containerWidth,R=E.containerHeight;if($<0||R<0)return null;Ur($s(s)||$s(c),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,s,c),Ur(!n||n>0,"The aspect(%s) must be greater than zero.",n);var k=$s(s)?$:s,M=$s(c)?R:c;n&&n>0&&(k?M=k/n:M&&(k=M*n),h&&M>h&&(M=h)),Ur(k>0||M>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,k,M,s,c,d,f,n);var L=!Array.isArray(p)&&Wa(p.type).endsWith("Chart");return P.Children.map(p,function(z){return P.isValidElement(z)?j.cloneElement(z,Qh({width:k,height:M},L?{style:Qh({height:"100%",width:"100%",maxHeight:M,maxWidth:k},z.props.style)}:{})):z})},[n,p,c,h,f,d,E,s]);return P.createElement("div",{id:v?"".concat(v):void 0,className:be("recharts-responsive-container",y),style:Qh(Qh({},w),{},{width:s,height:c,minWidth:d,minHeight:f,maxHeight:h}),ref:S},C)}),Xy=function(t){return null};Xy.displayName="Cell";function ef(e){"@babel/helpers - typeof";return ef=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},ef(e)}function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function T1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(n),!0).forEach(function(r){ahe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ahe(e,t,n){return t=ihe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ihe(e){var t=she(e,"string");return ef(t)=="symbol"?t:t+""}function she(e,t){if(ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vo={widthCache:{},cacheCount:0},ohe=2e3,lhe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},cC="recharts_measurement_span";function che(e){var t=T1({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var gd=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ds.isSsr)return{width:0,height:0};var r=che(n),a=JSON.stringify({text:t,copyStyle:r});if(Vo.widthCache[a])return Vo.widthCache[a];try{var i=document.getElementById(cC);i||(i=document.createElement("span"),i.setAttribute("id",cC),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=T1(T1({},lhe),r);Object.assign(i.style,s),i.textContent="".concat(t);var o=i.getBoundingClientRect(),c={width:o.width,height:o.height};return Vo.widthCache[a]=c,++Vo.cacheCount>ohe&&(Vo.cacheCount=0,Vo.widthCache={}),c}catch{return{width:0,height:0}}},uhe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function tf(e){"@babel/helpers - typeof";return tf=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},tf(e)}function Zm(e,t){return phe(e)||hhe(e,t)||fhe(e,t)||dhe()}function dhe(){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 fhe(e,t){if(e){if(typeof e=="string")return uC(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 uC(e,t)}}function uC(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 hhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function phe(e){if(Array.isArray(e))return e}function mhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dC(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,yhe(r.key),r)}}function ghe(e,t,n){return t&&dC(e.prototype,t),n&&dC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yhe(e){var t=vhe(e,"string");return tf(t)=="symbol"?t:t+""}function vhe(e,t){if(tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,hC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xhe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,bhe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,dL={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},She=Object.keys(dL),yl="NaN";function whe(e,t){return e*dL[t]}var Jh=function(){function e(t,n){mhe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!xhe.test(n)&&(this.num=NaN,this.unit=""),She.includes(n)&&(this.num=whe(t,n),this.unit="px")}return ghe(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,a=(r=bhe.exec(n))!==null&&r!==void 0?r:[],i=Zm(a,3),s=i[1],o=i[2];return new e(parseFloat(s),o??"")}}])}();function fL(e){if(e.includes(yl))return yl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=fC.exec(t))!==null&&n!==void 0?n:[],a=Zm(r,4),i=a[1],s=a[2],o=a[3],c=Jh.parse(i??""),u=Jh.parse(o??""),d=s==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return yl;t=t.replace(fC,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=hC.exec(t))!==null&&f!==void 0?f:[],p=Zm(h,4),g=p[1],m=p[2],v=p[3],y=Jh.parse(g??""),x=Jh.parse(v??""),b=m==="+"?y.add(x):y.subtract(x);if(b.isNaN())return yl;t=t.replace(hC,b.toString())}return t}var pC=/\(([^()]*)\)/;function jhe(e){for(var t=e;t.includes("(");){var n=pC.exec(t),r=Zm(n,2),a=r[1];t=t.replace(pC,fL(a))}return t}function Ahe(e){var t=e.replace(/\s+/g,"");return t=jhe(t),t=fL(t),t}function Ohe(e){try{return Ahe(e)}catch{return yl}}function qx(e){var t=Ohe(e.slice(5,-1));return t===yl?"":t}var Nhe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Ehe=["dx","dy","angle","className","breakAll"];function C1(){return C1=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},C1.apply(this,arguments)}function mC(e,t){if(e==null)return{};var n=The(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function The(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 gC(e,t){return Mhe(e)||Phe(e,t)||_he(e,t)||Che()}function Che(){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 _he(e,t){if(e){if(typeof e=="string")return yC(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 yC(e,t)}}function yC(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 Phe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function Mhe(e){if(Array.isArray(e))return e}var hL=/[ \f\n\r\t\v\u2028\u2029]+/,pL=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];ye(n)||(r?i=n.toString().split(""):i=n.toString().split(hL));var s=i.map(function(c){return{word:c,width:gd(c,a).width}}),o=r?0:gd(" ",a).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}},khe=function(t,n,r,a,i){var s=t.maxLines,o=t.children,c=t.style,u=t.breakAll,d=Y(s),f=o,h=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return k.reduce(function(M,L){var z=L.word,V=L.width,K=M[M.length-1];if(K&&(a==null||i||K.width+V+r<Number(a)))K.words.push(z),K.width+=V+r;else{var U={words:[z],width:V};M.push(U)}return M},[])},p=h(n),g=function(k){return k.reduce(function(M,L){return M.width>L.width?M:L})};if(!d)return p;for(var m="…",v=function(k){var M=f.slice(0,k),L=pL({breakAll:u,style:c,children:M+m}).wordsWithComputedWidth,z=h(L),V=z.length>s||g(z).width>Number(a);return[V,z]},y=0,x=f.length-1,b=0,w;y<=x&&b<=f.length-1;){var S=Math.floor((y+x)/2),A=S-1,O=v(A),N=gC(O,2),E=N[0],T=N[1],_=v(S),C=gC(_,1),$=C[0];if(!E&&!$&&(y=S+1),E&&$&&(x=S-1),!E&&$){w=T;break}b++}return w||p},vC=function(t){var n=ye(t)?[]:t.toString().split(hL);return[{words:n}]},Rhe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,o=t.maxLines;if((n||r)&&!ds.isSsr){var c,u,d=pL({breakAll:s,children:a,style:i});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;c=f,u=h}else return vC(a);return khe({breakAll:s,children:a,maxLines:o,style:i},c,u,n,r)}return vC(a)},xC="#808080",vo=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,s=t.lineHeight,o=s===void 0?"1em":s,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,v=t.fill,y=v===void 0?xC:v,x=mC(t,Nhe),b=j.useMemo(function(){return Rhe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),w=x.dx,S=x.dy,A=x.angle,O=x.className,N=x.breakAll,E=mC(x,Ehe);if(!It(r)||!It(i))return null;var T=r+(Y(w)?w:0),_=i+(Y(S)?S:0),C;switch(m){case"start":C=qx("calc(".concat(u,")"));break;case"middle":C=qx("calc(".concat((b.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:C=qx("calc(".concat(b.length-1," * -").concat(o,")"));break}var $=[];if(f){var R=b[0].width,k=x.width;$.push("scale(".concat((Y(k)?k/R:1)/R,")"))}return A&&$.push("rotate(".concat(A,", ").concat(T,", ").concat(_,")")),$.length&&(E.transform=$.join(" ")),P.createElement("text",C1({},ie(E,!0),{x:T,y:_,className:be("recharts-text",O),textAnchor:p,fill:y.includes("url")?xC:y}),b.map(function(M,L){var z=M.words.join(N?"":" ");return P.createElement("tspan",{x:T,dy:L===0?C:o,key:"".concat(z,"-").concat(L)},z)}))};function Ji(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dhe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function g2(e){let t,n,r;e.length!==2?(t=Ji,n=(o,c)=>Ji(e(o),c),r=(o,c)=>e(o)-c):(t=e===Ji||e===Dhe?e:$he,n=e,r=e);function a(o,c,u=0,d=o.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(o[f],c)<0?u=f+1:d=f}while(u<d)}return u}function i(o,c,u=0,d=o.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(o[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function s(o,c,u=0,d=o.length){const f=a(o,c,u,d-1);return f>u&&r(o[f-1],c)>-r(o[f],c)?f-1:f}return{left:a,center:s,right:i}}function $he(){return 0}function mL(e){return e===null?NaN:+e}function*Lhe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Ihe=g2(Ji),fh=Ihe.right;g2(mL).center;class bC extends Map{constructor(t,n=Uhe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(SC(this,t))}has(t){return super.has(SC(this,t))}set(t,n){return super.set(zhe(this,t),n)}delete(t){return super.delete(Bhe(this,t))}}function SC({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function zhe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Bhe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Uhe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Fhe(e=Ji){if(e===Ji)return gL;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 gL(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Vhe=Math.sqrt(50),Hhe=Math.sqrt(10),qhe=Math.sqrt(2);function Jm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Vhe?10:i>=Hhe?5:i>=qhe?2:1;let o,c,u;return a<0?(u=Math.pow(10,-a)/s,o=Math.round(e*u),c=Math.round(t*u),o/u<e&&++o,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*s,o=Math.round(e/u),c=Math.round(t/u),o*u<e&&++o,c*u>t&&--c),c<o&&.5<=n&&n<2?Jm(e,t,n*2):[o,c,u]}function _1(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,s]=r?Jm(t,e,n):Jm(e,t,n);if(!(i>=a))return[];const o=i-a+1,c=new Array(o);if(r)if(s<0)for(let u=0;u<o;++u)c[u]=(i-u)/-s;else for(let u=0;u<o;++u)c[u]=(i-u)*s;else if(s<0)for(let u=0;u<o;++u)c[u]=(a+u)/-s;else for(let u=0;u<o;++u)c[u]=(a+u)*s;return c}function P1(e,t,n){return t=+t,e=+e,n=+n,Jm(e,t,n)[2]}function M1(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?P1(t,e,n):P1(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function wC(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function jC(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function yL(e,t,n=0,r=1/0,a){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(a=a===void 0?gL:Fhe(a);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/c+h)),g=Math.min(r,Math.floor(t+(c-u)*f/c+h));yL(e,t,p,g,a)}const i=e[t];let s=n,o=r;for(Tu(e,n,t),a(e[r],i)>0&&Tu(e,n,r);s<o;){for(Tu(e,s,o),++s,--o;a(e[s],i)<0;)++s;for(;a(e[o],i)>0;)--o}a(e[n],i)===0?Tu(e,n,o):(++o,Tu(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function Tu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Khe(e,t,n){if(e=Float64Array.from(Lhe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return jC(e);if(t>=1)return wC(e);var r,a=(r-1)*t,i=Math.floor(a),s=wC(yL(e,i).subarray(0,i+1)),o=jC(e.subarray(i+1));return s+(o-s)*(a-i)}}function Ghe(e,t,n=mL){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,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function Yhe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function _r(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function fi(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 k1=Symbol("implicit");function y2(){var e=new bC,t=[],n=[],r=k1;function a(i){let s=e.get(i);if(s===void 0){if(r!==k1)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new bC;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return y2(t,n).unknown(r)},_r.apply(a,arguments),a}function nf(){var e=y2().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,o=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var h=t().length,p=a<r,g=p?a:r,m=p?r:a;i=(m-g)/Math.max(1,h-c+u*2),o&&(i=Math.floor(i)),g+=(m-g-i*(h-c))*d,s=i*(1-c),o&&(g=Math.round(g),s=Math.round(s));var v=Yhe(h).map(function(y){return g+i*y});return n(p?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,f()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return nf(t(),[r,a]).round(o).paddingInner(c).paddingOuter(u).align(d)},_r.apply(f(),arguments)}function vL(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return vL(t())},e}function yd(){return vL(nf.apply(null,arguments).paddingInner(1))}function v2(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hh(){}var rf=.7,eg=1/rf,Ml="\\s*([+-]?\\d+)\\s*",af="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",da="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Whe=/^#([0-9a-f]{3,8})$/,Xhe=new RegExp(`^rgb\\(${Ml},${Ml},${Ml}\\)$`),Qhe=new RegExp(`^rgb\\(${da},${da},${da}\\)$`),Zhe=new RegExp(`^rgba\\(${Ml},${Ml},${Ml},${af}\\)$`),Jhe=new RegExp(`^rgba\\(${da},${da},${da},${af}\\)$`),epe=new RegExp(`^hsl\\(${af},${da},${da}\\)$`),tpe=new RegExp(`^hsla\\(${af},${da},${da},${af}\\)$`),AC={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};v2(hh,sf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:OC,formatHex:OC,formatHex8:npe,formatHsl:rpe,formatRgb:NC,toString:NC});function OC(){return this.rgb().formatHex()}function npe(){return this.rgb().formatHex8()}function rpe(){return bL(this).formatHsl()}function NC(){return this.rgb().formatRgb()}function sf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Whe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?EC(t):n===3?new _n(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ep(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ep(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=Xhe.exec(e))?new _n(t[1],t[2],t[3],1):(t=Qhe.exec(e))?new _n(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Zhe.exec(e))?ep(t[1],t[2],t[3],t[4]):(t=Jhe.exec(e))?ep(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=epe.exec(e))?_C(t[1],t[2]/100,t[3]/100,1):(t=tpe.exec(e))?_C(t[1],t[2]/100,t[3]/100,t[4]):AC.hasOwnProperty(e)?EC(AC[e]):e==="transparent"?new _n(NaN,NaN,NaN,0):null}function EC(e){return new _n(e>>16&255,e>>8&255,e&255,1)}function ep(e,t,n,r){return r<=0&&(e=t=n=NaN),new _n(e,t,n,r)}function ape(e){return e instanceof hh||(e=sf(e)),e?(e=e.rgb(),new _n(e.r,e.g,e.b,e.opacity)):new _n}function R1(e,t,n,r){return arguments.length===1?ape(e):new _n(e,t,n,r??1)}function _n(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}v2(_n,R1,xL(hh,{brighter(e){return e=e==null?eg:Math.pow(eg,e),new _n(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rf:Math.pow(rf,e),new _n(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _n(ro(this.r),ro(this.g),ro(this.b),tg(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:TC,formatHex:TC,formatHex8:ipe,formatRgb:CC,toString:CC}));function TC(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}`}function ipe(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}${Ls((isNaN(this.opacity)?1:this.opacity)*255)}`}function CC(){const e=tg(this.opacity);return`${e===1?"rgb(":"rgba("}${ro(this.r)}, ${ro(this.g)}, ${ro(this.b)}${e===1?")":`, ${e})`}`}function tg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ro(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ls(e){return e=ro(e),(e<16?"0":"")+e.toString(16)}function _C(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new zr(e,t,n,r)}function bL(e){if(e instanceof zr)return new zr(e.h,e.s,e.l,e.opacity);if(e instanceof hh||(e=sf(e)),!e)return new zr;if(e instanceof zr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,c=(i+a)/2;return o?(t===i?s=(n-r)/o+(n<r)*6:n===i?s=(r-t)/o+2:s=(t-n)/o+4,o/=c<.5?i+a:2-i-a,s*=60):o=c>0&&c<1?0:s,new zr(s,o,c,e.opacity)}function spe(e,t,n,r){return arguments.length===1?bL(e):new zr(e,t,n,r??1)}function zr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}v2(zr,spe,xL(hh,{brighter(e){return e=e==null?eg:Math.pow(eg,e),new zr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rf:Math.pow(rf,e),new zr(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,a=2*n-r;return new _n(Kx(e>=240?e-240:e+120,a,r),Kx(e,a,r),Kx(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new zr(PC(this.h),tp(this.s),tp(this.l),tg(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=tg(this.opacity);return`${e===1?"hsl(":"hsla("}${PC(this.h)}, ${tp(this.s)*100}%, ${tp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PC(e){return e=(e||0)%360,e<0?e+360:e}function tp(e){return Math.max(0,Math.min(1,e||0))}function Kx(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 x2=e=>()=>e;function ope(e,t){return function(n){return e+n*t}}function lpe(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 cpe(e){return(e=+e)==1?SL:function(t,n){return n-t?lpe(t,n,e):x2(isNaN(t)?n:t)}}function SL(e,t){var n=t-e;return n?ope(e,n):x2(isNaN(e)?t:e)}const MC=function e(t){var n=cpe(t);function r(a,i){var s=n((a=R1(a)).r,(i=R1(i)).r),o=n(a.g,i.g),c=n(a.b,i.b),u=SL(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=o(d),a.b=c(d),a.opacity=u(d),a+""}}return r.gamma=e,r}(1);function upe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function dpe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fpe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=lu(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(o){for(s=0;s<r;++s)i[s]=a[s](o);return i}}function hpe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ng(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ppe(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=lu(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var D1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Gx=new RegExp(D1.source,"g");function mpe(e){return function(){return e}}function gpe(e){return function(t){return e(t)+""}}function ype(e,t){var n=D1.lastIndex=Gx.lastIndex=0,r,a,i,s=-1,o=[],c=[];for(e=e+"",t=t+"";(r=D1.exec(e))&&(a=Gx.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,c.push({i:s,x:ng(r,a)})),n=Gx.lastIndex;return n<t.length&&(i=t.slice(n),o[s]?o[s]+=i:o[++s]=i),o.length<2?c[0]?gpe(c[0].x):mpe(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)o[(f=c[d]).i]=f.x(u);return o.join("")})}function lu(e,t){var n=typeof t,r;return t==null||n==="boolean"?x2(t):(n==="number"?ng:n==="string"?(r=sf(t))?(t=r,MC):ype:t instanceof sf?MC:t instanceof Date?hpe:dpe(t)?upe:Array.isArray(t)?fpe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ppe:ng)(e,t)}function b2(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function vpe(e,t){t===void 0&&(t=e,e=lu);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[o](s-o)}}function xpe(e){return function(){return e}}function rg(e){return+e}var kC=[0,1];function vn(e){return e}function $1(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:xpe(isNaN(t)?NaN:.5)}function bpe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Spe(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=$1(a,r),i=n(s,i)):(r=$1(r,a),i=n(i,s)),function(o){return i(r(o))}}function wpe(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=$1(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(o){var c=fh(e,o,1,r)-1;return i[c](a[c](o))}}function ph(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Qy(){var e=kC,t=kC,n=lu,r,a,i,s=vn,o,c,u;function d(){var h=Math.min(e.length,t.length);return s!==vn&&(s=bpe(e[0],e[h-1])),o=h>2?wpe:Spe,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(c||(c=o(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(a((u||(u=o(t,e.map(r),ng)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,rg),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=b2,d()},f.clamp=function(h){return arguments.length?(s=h?!0:vn,d()):s!==vn},f.interpolate=function(h){return arguments.length?(n=h,d()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return r=h,a=p,d()}}function S2(){return Qy()(vn,vn)}function jpe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ag(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 gc(e){return e=ag(Math.abs(e)),e?e[1]:NaN}function Ape(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],c=0;a>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),i.push(n.substring(a-=o,a+o)),!((c+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function Ope(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Npe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function of(e){if(!(t=Npe.exec(e)))throw new Error("invalid format: "+e);var t;return new w2({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]})}of.prototype=w2.prototype;function w2(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+""}w2.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 Epe(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var ig;function Tpe(e,t){var n=ag(e,t);if(!n)return ig=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(ig=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+ag(e,Math.max(0,t+i-1))[0]}function RC(e,t){var n=ag(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const DC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:jpe,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)=>RC(e*100,t),r:RC,s:Tpe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function $C(e){return e}var LC=Array.prototype.map,IC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Cpe(e){var t=e.grouping===void 0||e.thousands===void 0?$C:Ape(LC.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?$C:Ope(LC.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f,h){f=of(f);var p=f.fill,g=f.align,m=f.sign,v=f.symbol,y=f.zero,x=f.width,b=f.comma,w=f.precision,S=f.trim,A=f.type;A==="n"?(b=!0,A="g"):DC[A]||(w===void 0&&(w=12),S=!0,A="g"),(y||p==="0"&&g==="=")&&(y=!0,p="0",g="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),N=(v==="$"?r:/[%p]/.test(A)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),E=DC[A],T=/[defgprs%]/.test(A);w=w===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function _(C){var $=O,R=N,k,M,L;if(A==="c")R=E(C)+R,C="";else{C=+C;var z=C<0||1/C<0;if(C=isNaN(C)?c:E(Math.abs(C),w),S&&(C=Epe(C)),z&&+C==0&&m!=="+"&&(z=!1),$=(z?m==="("?m:o:m==="-"||m==="("?"":m)+$,R=(A==="s"&&!isNaN(C)&&ig!==void 0?IC[8+ig/3]:"")+R+(z&&m==="("?")":""),T){for(k=-1,M=C.length;++k<M;)if(L=C.charCodeAt(k),48>L||L>57){R=(L===46?a+C.slice(k+1):C.slice(k))+R,C=C.slice(0,k);break}}}b&&!y&&(C=t(C,1/0));var V=$.length+C.length+R.length,K=V<x?new Array(x-V+1).join(p):"";switch(b&&y&&(C=t(K+C,K.length?x-R.length:1/0),K=""),g){case"<":C=$+C+R+K;break;case"=":C=$+K+C+R;break;case"^":C=K.slice(0,V=K.length>>1)+$+C+R+K.slice(V);break;default:C=K+$+C+R;break}return i(C)}return _.toString=function(){return f+""},_}function d(f,h){var p=Math.max(-8,Math.min(8,Math.floor(gc(h)/3)))*3,g=Math.pow(10,-p),m=u((f=of(f),f.type="f",f),{suffix:IC[8+p/3]});return function(v){return m(g*v)}}return{format:u,formatPrefix:d}}var np,j2,wL;_pe({thousands:",",grouping:[3],currency:["$",""]});function _pe(e){return np=Cpe(e),j2=np.format,wL=np.formatPrefix,np}function Ppe(e){return Math.max(0,-gc(Math.abs(e)))}function Mpe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gc(t)/3)))*3-gc(Math.abs(e)))}function kpe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gc(t)-gc(e))+1}function jL(e,t,n,r){var a=M1(e,t,n),i;switch(r=of(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=Mpe(a,s))&&(r.precision=i),wL(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=kpe(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Ppe(a))&&(r.precision=i-(r.type==="%")*2);break}}return j2(r)}function fs(e){var t=e.domain;return e.ticks=function(n){var r=t();return _1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return jL(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],c,u,d=10;for(o<s&&(u=s,s=o,o=u,u=a,a=i,i=u);d-- >0;){if(u=P1(s,o,n),u===c)return r[a]=s,r[i]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;c=u}return e},e}function sg(){var e=S2();return e.copy=function(){return ph(e,sg())},_r.apply(e,arguments),fs(e)}function AL(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,rg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return AL(e).unknown(t)},e=arguments.length?Array.from(e,rg):[0,1],fs(n)}function OL(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function zC(e){return Math.log(e)}function BC(e){return Math.exp(e)}function Rpe(e){return-Math.log(-e)}function Dpe(e){return-Math.exp(-e)}function $pe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Lpe(e){return e===10?$pe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Ipe(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 UC(e){return(t,n)=>-e(-t,n)}function A2(e){const t=e(zC,BC),n=t.domain;let r=10,a,i;function s(){return a=Ipe(r),i=Lpe(r),n()[0]<0?(a=UC(a),i=UC(i),e(Rpe,Dpe)):e(zC,BC),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const c=n();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let h=a(u),p=a(d),g,m;const v=o==null?10:+o;let y=[];if(!(r%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(g=1;g<r;++g)if(m=h<0?g/i(-h):g*i(h),!(m<u)){if(m>d)break;y.push(m)}}else for(;h<=p;++h)for(g=r-1;g>=1;--g)if(m=h>0?g/i(-h):g*i(h),!(m<u)){if(m>d)break;y.push(m)}y.length*2<v&&(y=_1(u,d,v))}else y=_1(h,p,Math.min(p-h,v)).map(i);return f?y.reverse():y},t.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=of(c)).precision==null&&(c.trim=!0),c=j2(c)),o===1/0)return c;const u=Math.max(1,r*o/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*r<r-.5&&(f*=r),f<=u?c(d):""}},t.nice=()=>n(OL(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function NL(){const e=A2(Qy()).domain([1,10]);return e.copy=()=>ph(e,NL()).base(e.base()),_r.apply(e,arguments),e}function FC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function VC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function O2(e){var t=1,n=e(FC(t),VC(t));return n.constant=function(r){return arguments.length?e(FC(t=+r),VC(t)):t},fs(n)}function EL(){var e=O2(Qy());return e.copy=function(){return ph(e,EL()).constant(e.constant())},_r.apply(e,arguments)}function HC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function zpe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Bpe(e){return e<0?-e*e:e*e}function N2(e){var t=e(vn,vn),n=1;function r(){return n===1?e(vn,vn):n===.5?e(zpe,Bpe):e(HC(n),HC(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},fs(t)}function E2(){var e=N2(Qy());return e.copy=function(){return ph(e,E2()).exponent(e.exponent())},_r.apply(e,arguments),e}function Upe(){return E2.apply(null,arguments).exponent(.5)}function qC(e){return Math.sign(e)*e*e}function Fpe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function TL(){var e=S2(),t=[0,1],n=!1,r;function a(i){var s=Fpe(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(qC(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,rg)).map(qC)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return TL(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},_r.apply(a,arguments),fs(a)}function CL(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s<o;)n[s-1]=Ghe(e,s/o);return i}function i(s){return s==null||isNaN(s=+s)?r:t[fh(n,s)]}return i.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(Ji),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return CL().domain(e).range(t).unknown(r)},_r.apply(i,arguments)}function _L(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(c){return c!=null&&c<=c?a[fh(r,c,0,n)]:i}function o(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,o()):[e,t]},s.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,o()):a.slice()},s.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return _L().domain([e,t]).range(a).unknown(i)},_r.apply(fs(s),arguments)}function PL(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[fh(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return PL().domain(e).range(t).unknown(n)},_r.apply(a,arguments)}const Yx=new Date,Wx=new Date;function Bt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const c=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return c;let u;do c.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<s);return c},a.filter=i=>Bt(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(Yx.setTime(+i),Wx.setTime(+s),e(Yx),e(Wx),Math.floor(n(Yx,Wx))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const og=Bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);og.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):og);og.range;const za=1e3,xr=za*60,Ba=xr*60,ai=Ba*24,T2=ai*7,KC=ai*30,Xx=ai*365,Is=Bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*za)},(e,t)=>(t-e)/za,e=>e.getUTCSeconds());Is.range;const C2=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za)},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getMinutes());C2.range;const _2=Bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getUTCMinutes());_2.range;const P2=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za-e.getMinutes()*xr)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getHours());P2.range;const M2=Bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getUTCHours());M2.range;const mh=Bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xr)/ai,e=>e.getDate()-1);mh.range;const Zy=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ai,e=>e.getUTCDate()-1);Zy.range;const ML=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ai,e=>Math.floor(e/ai));ML.range;function Mo(e){return Bt(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())*xr)/T2)}const Jy=Mo(0),lg=Mo(1),Vpe=Mo(2),Hpe=Mo(3),yc=Mo(4),qpe=Mo(5),Kpe=Mo(6);Jy.range;lg.range;Vpe.range;Hpe.range;yc.range;qpe.range;Kpe.range;function ko(e){return Bt(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)/T2)}const ev=ko(0),cg=ko(1),Gpe=ko(2),Ype=ko(3),vc=ko(4),Wpe=ko(5),Xpe=ko(6);ev.range;cg.range;Gpe.range;Ype.range;vc.range;Wpe.range;Xpe.range;const k2=Bt(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());k2.range;const R2=Bt(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());R2.range;const ii=Bt(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());ii.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(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)});ii.range;const si=Bt(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());si.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(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)});si.range;function kL(e,t,n,r,a,i){const s=[[Is,1,za],[Is,5,5*za],[Is,15,15*za],[Is,30,30*za],[i,1,xr],[i,5,5*xr],[i,15,15*xr],[i,30,30*xr],[a,1,Ba],[a,3,3*Ba],[a,6,6*Ba],[a,12,12*Ba],[r,1,ai],[r,2,2*ai],[n,1,T2],[t,1,KC],[t,3,3*KC],[e,1,Xx]];function o(u,d,f){const h=d<u;h&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:c(u,d,f),g=p?p.range(u,+d+1):[];return h?g.reverse():g}function c(u,d,f){const h=Math.abs(d-u)/f,p=g2(([,,v])=>v).right(s,h);if(p===s.length)return e.every(M1(u/Xx,d/Xx,f));if(p===0)return og.every(Math.max(M1(u,d,f),1));const[g,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(m)}return[o,c]}const[Qpe,Zpe]=kL(si,R2,ev,ML,M2,_2),[Jpe,eme]=kL(ii,k2,Jy,mh,P2,C2);function Qx(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 Zx(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 Cu(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tme(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,c=e.shortMonths,u=_u(a),d=Pu(a),f=_u(i),h=Pu(i),p=_u(s),g=Pu(s),m=_u(o),v=Pu(o),y=_u(c),x=Pu(c),b={a:L,A:z,b:V,B:K,c:null,d:ZC,e:ZC,f:Ame,g:Rme,G:$me,H:Sme,I:wme,j:jme,L:RL,m:Ome,M:Nme,p:U,q:G,Q:t_,s:n_,S:Eme,u:Tme,U:Cme,V:_me,w:Pme,W:Mme,x:null,X:null,y:kme,Y:Dme,Z:Lme,"%":e_},w={a:ne,A:J,b:ve,B:ee,c:null,d:JC,e:JC,f:Ume,g:Qme,G:Jme,H:Ime,I:zme,j:Bme,L:$L,m:Fme,M:Vme,p:ct,q:Ke,Q:t_,s:n_,S:Hme,u:qme,U:Kme,V:Gme,w:Yme,W:Wme,x:null,X:null,y:Xme,Y:Zme,Z:ege,"%":e_},S={a:T,A:_,b:C,B:$,c:R,d:XC,e:XC,f:yme,g:WC,G:YC,H:QC,I:QC,j:hme,L:gme,m:fme,M:pme,p:E,q:dme,Q:xme,s:bme,S:mme,u:sme,U:ome,V:lme,w:ime,W:cme,x:k,X:M,y:WC,Y:YC,Z:ume,"%":vme};b.x=A(n,b),b.X=A(r,b),b.c=A(t,b),w.x=A(n,w),w.X=A(r,w),w.c=A(t,w);function A(X,le){return function(Q){var q=[],ke=-1,xe=0,Ze=X.length,ut,pt,Ln;for(Q instanceof Date||(Q=new Date(+Q));++ke<Ze;)X.charCodeAt(ke)===37&&(q.push(X.slice(xe,ke)),(pt=GC[ut=X.charAt(++ke)])!=null?ut=X.charAt(++ke):pt=ut==="e"?" ":"0",(Ln=le[ut])&&(ut=Ln(Q,pt)),q.push(ut),xe=ke+1);return q.push(X.slice(xe,ke)),q.join("")}}function O(X,le){return function(Q){var q=Cu(1900,void 0,1),ke=N(q,X,Q+="",0),xe,Ze;if(ke!=Q.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(le&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(xe=Zx(Cu(q.y,0,1)),Ze=xe.getUTCDay(),xe=Ze>4||Ze===0?cg.ceil(xe):cg(xe),xe=Zy.offset(xe,(q.V-1)*7),q.y=xe.getUTCFullYear(),q.m=xe.getUTCMonth(),q.d=xe.getUTCDate()+(q.w+6)%7):(xe=Qx(Cu(q.y,0,1)),Ze=xe.getDay(),xe=Ze>4||Ze===0?lg.ceil(xe):lg(xe),xe=mh.offset(xe,(q.V-1)*7),q.y=xe.getFullYear(),q.m=xe.getMonth(),q.d=xe.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Ze="Z"in q?Zx(Cu(q.y,0,1)).getUTCDay():Qx(Cu(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Ze+5)%7:q.w+q.U*7-(Ze+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,Zx(q)):Qx(q)}}function N(X,le,Q,q){for(var ke=0,xe=le.length,Ze=Q.length,ut,pt;ke<xe;){if(q>=Ze)return-1;if(ut=le.charCodeAt(ke++),ut===37){if(ut=le.charAt(ke++),pt=S[ut in GC?le.charAt(ke++):ut],!pt||(q=pt(X,Q,q))<0)return-1}else if(ut!=Q.charCodeAt(q++))return-1}return q}function E(X,le,Q){var q=u.exec(le.slice(Q));return q?(X.p=d.get(q[0].toLowerCase()),Q+q[0].length):-1}function T(X,le,Q){var q=p.exec(le.slice(Q));return q?(X.w=g.get(q[0].toLowerCase()),Q+q[0].length):-1}function _(X,le,Q){var q=f.exec(le.slice(Q));return q?(X.w=h.get(q[0].toLowerCase()),Q+q[0].length):-1}function C(X,le,Q){var q=y.exec(le.slice(Q));return q?(X.m=x.get(q[0].toLowerCase()),Q+q[0].length):-1}function $(X,le,Q){var q=m.exec(le.slice(Q));return q?(X.m=v.get(q[0].toLowerCase()),Q+q[0].length):-1}function R(X,le,Q){return N(X,t,le,Q)}function k(X,le,Q){return N(X,n,le,Q)}function M(X,le,Q){return N(X,r,le,Q)}function L(X){return s[X.getDay()]}function z(X){return i[X.getDay()]}function V(X){return c[X.getMonth()]}function K(X){return o[X.getMonth()]}function U(X){return a[+(X.getHours()>=12)]}function G(X){return 1+~~(X.getMonth()/3)}function ne(X){return s[X.getUTCDay()]}function J(X){return i[X.getUTCDay()]}function ve(X){return c[X.getUTCMonth()]}function ee(X){return o[X.getUTCMonth()]}function ct(X){return a[+(X.getUTCHours()>=12)]}function Ke(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var le=A(X+="",b);return le.toString=function(){return X},le},parse:function(X){var le=O(X+="",!1);return le.toString=function(){return X},le},utcFormat:function(X){var le=A(X+="",w);return le.toString=function(){return X},le},utcParse:function(X){var le=O(X+="",!0);return le.toString=function(){return X},le}}}var GC={"-":"",_:" ",0:"0"},Qt=/^\s*\d+/,nme=/^%/,rme=/[\\^$*+?|[\]().{}]/g;function Re(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function ame(e){return e.replace(rme,"\\$&")}function _u(e){return new RegExp("^(?:"+e.map(ame).join("|")+")","i")}function Pu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function ime(e,t,n){var r=Qt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sme(e,t,n){var r=Qt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ome(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function lme(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function cme(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function YC(e,t,n){var r=Qt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function WC(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ume(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 dme(e,t,n){var r=Qt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function fme(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function XC(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function hme(e,t,n){var r=Qt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function QC(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pme(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function mme(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gme(e,t,n){var r=Qt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function yme(e,t,n){var r=Qt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vme(e,t,n){var r=nme.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xme(e,t,n){var r=Qt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function bme(e,t,n){var r=Qt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ZC(e,t){return Re(e.getDate(),t,2)}function Sme(e,t){return Re(e.getHours(),t,2)}function wme(e,t){return Re(e.getHours()%12||12,t,2)}function jme(e,t){return Re(1+mh.count(ii(e),e),t,3)}function RL(e,t){return Re(e.getMilliseconds(),t,3)}function Ame(e,t){return RL(e,t)+"000"}function Ome(e,t){return Re(e.getMonth()+1,t,2)}function Nme(e,t){return Re(e.getMinutes(),t,2)}function Eme(e,t){return Re(e.getSeconds(),t,2)}function Tme(e){var t=e.getDay();return t===0?7:t}function Cme(e,t){return Re(Jy.count(ii(e)-1,e),t,2)}function DL(e){var t=e.getDay();return t>=4||t===0?yc(e):yc.ceil(e)}function _me(e,t){return e=DL(e),Re(yc.count(ii(e),e)+(ii(e).getDay()===4),t,2)}function Pme(e){return e.getDay()}function Mme(e,t){return Re(lg.count(ii(e)-1,e),t,2)}function kme(e,t){return Re(e.getFullYear()%100,t,2)}function Rme(e,t){return e=DL(e),Re(e.getFullYear()%100,t,2)}function Dme(e,t){return Re(e.getFullYear()%1e4,t,4)}function $me(e,t){var n=e.getDay();return e=n>=4||n===0?yc(e):yc.ceil(e),Re(e.getFullYear()%1e4,t,4)}function Lme(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Re(t/60|0,"0",2)+Re(t%60,"0",2)}function JC(e,t){return Re(e.getUTCDate(),t,2)}function Ime(e,t){return Re(e.getUTCHours(),t,2)}function zme(e,t){return Re(e.getUTCHours()%12||12,t,2)}function Bme(e,t){return Re(1+Zy.count(si(e),e),t,3)}function $L(e,t){return Re(e.getUTCMilliseconds(),t,3)}function Ume(e,t){return $L(e,t)+"000"}function Fme(e,t){return Re(e.getUTCMonth()+1,t,2)}function Vme(e,t){return Re(e.getUTCMinutes(),t,2)}function Hme(e,t){return Re(e.getUTCSeconds(),t,2)}function qme(e){var t=e.getUTCDay();return t===0?7:t}function Kme(e,t){return Re(ev.count(si(e)-1,e),t,2)}function LL(e){var t=e.getUTCDay();return t>=4||t===0?vc(e):vc.ceil(e)}function Gme(e,t){return e=LL(e),Re(vc.count(si(e),e)+(si(e).getUTCDay()===4),t,2)}function Yme(e){return e.getUTCDay()}function Wme(e,t){return Re(cg.count(si(e)-1,e),t,2)}function Xme(e,t){return Re(e.getUTCFullYear()%100,t,2)}function Qme(e,t){return e=LL(e),Re(e.getUTCFullYear()%100,t,2)}function Zme(e,t){return Re(e.getUTCFullYear()%1e4,t,4)}function Jme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?vc(e):vc.ceil(e),Re(e.getUTCFullYear()%1e4,t,4)}function ege(){return"+0000"}function e_(){return"%"}function t_(e){return+e}function n_(e){return Math.floor(+e/1e3)}var Ho,IL,zL;tge({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 tge(e){return Ho=tme(e),IL=Ho.format,Ho.parse,zL=Ho.utcFormat,Ho.utcParse,Ho}function nge(e){return new Date(e)}function rge(e){return e instanceof Date?+e:+new Date(+e)}function D2(e,t,n,r,a,i,s,o,c,u){var d=S2(),f=d.invert,h=d.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),x=u("%b %d"),b=u("%B"),w=u("%Y");function S(A){return(c(A)<A?p:o(A)<A?g:s(A)<A?m:i(A)<A?v:r(A)<A?a(A)<A?y:x:n(A)<A?b:w)(A)}return d.invert=function(A){return new Date(f(A))},d.domain=function(A){return arguments.length?h(Array.from(A,rge)):h().map(nge)},d.ticks=function(A){var O=h();return e(O[0],O[O.length-1],A??10)},d.tickFormat=function(A,O){return O==null?S:u(O)},d.nice=function(A){var O=h();return(!A||typeof A.range!="function")&&(A=t(O[0],O[O.length-1],A??10)),A?h(OL(O,A)):d},d.copy=function(){return ph(d,D2(e,t,n,r,a,i,s,o,c,u))},d}function age(){return _r.apply(D2(Jpe,eme,ii,k2,Jy,mh,P2,C2,Is,IL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ige(){return _r.apply(D2(Qpe,Zpe,si,R2,ev,Zy,M2,_2,Is,zL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function tv(){var e=0,t=1,n,r,a,i,s=vn,o=!1,c;function u(f){return f==null||isNaN(f=+f)?c:s(a===0?.5:(f=(i(f)-n)*a,o?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(o=!!f,u):o},u.interpolator=function(f){return arguments.length?(s=f,u):s};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,s=f(p,g),u):[s(0),s(1)]}}return u.range=d(lu),u.rangeRound=d(b2),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return i=f,n=f(e),r=f(t),a=n===r?0:1/(r-n),u}}function hs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function BL(){var e=fs(tv()(vn));return e.copy=function(){return hs(e,BL())},fi.apply(e,arguments)}function UL(){var e=A2(tv()).domain([1,10]);return e.copy=function(){return hs(e,UL()).base(e.base())},fi.apply(e,arguments)}function FL(){var e=O2(tv());return e.copy=function(){return hs(e,FL()).constant(e.constant())},fi.apply(e,arguments)}function $2(){var e=N2(tv());return e.copy=function(){return hs(e,$2()).exponent(e.exponent())},fi.apply(e,arguments)}function sge(){return $2.apply(null,arguments).exponent(.5)}function VL(){var e=[],t=vn;function n(r){if(r!=null&&!isNaN(r=+r))return t((fh(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Ji),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Khe(e,i/r))},n.copy=function(){return VL(t).domain(e)},fi.apply(n,arguments)}function nv(){var e=0,t=.5,n=1,r=1,a,i,s,o,c,u=vn,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-i)*(r*m<r*i?o:c),u(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,n]=m,a=d(e=+e),i=d(t=+t),s=d(n=+n),o=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),r=i<a?-1:1,p):[e,t,n]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(u=m,p):u};function g(m){return function(v){var y,x,b;return arguments.length?([y,x,b]=v,u=vpe(m,[y,x,b]),p):[u(0),u(.5),u(1)]}}return p.range=g(lu),p.rangeRound=g(b2),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return d=m,a=m(e),i=m(t),s=m(n),o=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),r=i<a?-1:1,p}}function HL(){var e=fs(nv()(vn));return e.copy=function(){return hs(e,HL())},fi.apply(e,arguments)}function qL(){var e=A2(nv()).domain([.1,1,10]);return e.copy=function(){return hs(e,qL()).base(e.base())},fi.apply(e,arguments)}function KL(){var e=O2(nv());return e.copy=function(){return hs(e,KL()).constant(e.constant())},fi.apply(e,arguments)}function L2(){var e=N2(nv());return e.copy=function(){return hs(e,L2()).exponent(e.exponent())},fi.apply(e,arguments)}function oge(){return L2.apply(null,arguments).exponent(.5)}const r_=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:nf,scaleDiverging:HL,scaleDivergingLog:qL,scaleDivergingPow:L2,scaleDivergingSqrt:oge,scaleDivergingSymlog:KL,scaleIdentity:AL,scaleImplicit:k1,scaleLinear:sg,scaleLog:NL,scaleOrdinal:y2,scalePoint:yd,scalePow:E2,scaleQuantile:CL,scaleQuantize:_L,scaleRadial:TL,scaleSequential:BL,scaleSequentialLog:UL,scaleSequentialPow:$2,scaleSequentialQuantile:VL,scaleSequentialSqrt:sge,scaleSequentialSymlog:FL,scaleSqrt:Upe,scaleSymlog:EL,scaleThreshold:PL,scaleTime:age,scaleUtc:ige,tickFormat:jL},Symbol.toStringTag,{value:"Module"}));var lge=Jc;function cge(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],s=t(i);if(s!=null&&(o===void 0?s===s&&!lge(s):n(s,o)))var o=s,c=i}return c}var rv=cge;function uge(e,t){return e>t}var GL=uge,dge=rv,fge=GL,hge=ou;function pge(e){return e&&e.length?dge(e,hge,fge):void 0}var mge=pge;const Ui=Fe(mge);function gge(e,t){return e<t}var YL=gge,yge=rv,vge=YL,xge=ou;function bge(e){return e&&e.length?yge(e,xge,vge):void 0}var Sge=bge;const av=Fe(Sge);var wge=Qj,jge=xa,Age=rL,Oge=$n;function Nge(e,t){var n=Oge(e)?wge:Age;return n(e,jge(t))}var Ege=Nge,Tge=tL,Cge=Ege;function _ge(e,t){return Tge(Cge(e,t),1)}var Pge=_ge;const Mge=Fe(Pge);var kge=f2;function Rge(e,t){return kge(e,t)}var Dge=Rge;const xo=Fe(Dge);var cu=1e9,$ge={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},z2,ft=!0,Or="[DecimalError] ",ao=Or+"Invalid argument: ",I2=Or+"Exponent out of range: ",uu=Math.floor,_s=Math.pow,Lge=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gn,Ht=1e7,it=7,WL=9007199254740991,ug=uu(WL/it),re={};re.absoluteValue=re.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};re.comparedTo=re.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};re.decimalPlaces=re.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*it;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};re.dividedBy=re.div=function(e){return Xa(this,new this.constructor(e))};re.dividedToIntegerBy=re.idiv=function(e){var t=this,n=t.constructor;return Xe(Xa(t,new n(e),0,1),n.precision)};re.equals=re.eq=function(e){return!this.cmp(e)};re.exponent=function(){return kt(this)};re.greaterThan=re.gt=function(e){return this.cmp(e)>0};re.greaterThanOrEqualTo=re.gte=function(e){return this.cmp(e)>=0};re.isInteger=re.isint=function(){return this.e>this.d.length-2};re.isNegative=re.isneg=function(){return this.s<0};re.isPositive=re.ispos=function(){return this.s>0};re.isZero=function(){return this.s===0};re.lessThan=re.lt=function(e){return this.cmp(e)<0};re.lessThanOrEqualTo=re.lte=function(e){return this.cmp(e)<1};re.logarithm=re.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Gn))throw Error(Or+"NaN");if(n.s<1)throw Error(Or+(n.s?"NaN":"-Infinity"));return n.eq(Gn)?new r(0):(ft=!1,t=Xa(lf(n,i),lf(e,i),i),ft=!0,Xe(t,a))};re.minus=re.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?ZL(t,e):XL(t,(e.s=-e.s,e))};re.modulo=re.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Or+"NaN");return n.s?(ft=!1,t=Xa(n,e,0,1).times(e),ft=!0,n.minus(t)):Xe(new r(n),a)};re.naturalExponential=re.exp=function(){return QL(this)};re.naturalLogarithm=re.ln=function(){return lf(this)};re.negated=re.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};re.plus=re.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?XL(t,e):ZL(t,(e.s=-e.s,e))};re.precision=re.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ao+e);if(t=kt(a)+1,r=a.d.length-1,n=r*it+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};re.squareRoot=re.sqrt=function(){var e,t,n,r,a,i,s,o=this,c=o.constructor;if(o.s<1){if(!o.s)return new c(0);throw Error(Or+"NaN")}for(e=kt(o),ft=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=sa(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=uu((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=s=n+3;;)if(i=r,r=i.plus(Xa(o,i,s+2)).times(.5),sa(i.d).slice(0,s)===(t=sa(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Xe(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;s+=4}return ft=!0,Xe(r,n)};re.times=re.mul=function(e){var t,n,r,a,i,s,o,c,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=h.length,u=p.length,c<u&&(i=h,h=p,p=i,s=c,c=u,u=s),i=[],s=c+u,r=s;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)o=i[a]+p[r]*h[a-r-1]+t,i[a--]=o%Ht|0,t=o/Ht|0;i[a]=(i[a]+t)%Ht|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ft?Xe(e,f.precision):e};re.toDecimalPlaces=re.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ma(e,0,cu),t===void 0?t=r.rounding:ma(t,0,8),Xe(n,e+kt(n)+1,t))};re.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=bo(r,!0):(ma(e,0,cu),t===void 0?t=a.rounding:ma(t,0,8),r=Xe(new a(r),e+1,t),n=bo(r,!0,e+1)),n};re.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?bo(a):(ma(e,0,cu),t===void 0?t=i.rounding:ma(t,0,8),r=Xe(new i(a),e+kt(a)+1,t),n=bo(r.abs(),!1,e+kt(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};re.toInteger=re.toint=function(){var e=this,t=e.constructor;return Xe(new t(e),kt(e)+1,t.rounding)};re.toNumber=function(){return+this};re.toPower=re.pow=function(e){var t,n,r,a,i,s,o=this,c=o.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Gn);if(o=new c(o),!o.s){if(e.s<1)throw Error(Or+"Infinity");return o}if(o.eq(Gn))return o;if(r=c.precision,e.eq(Gn))return Xe(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=o.s,s){if((n=d<0?-d:d)<=WL){for(a=new c(Gn),t=Math.ceil(r/it+4),ft=!1;n%2&&(a=a.times(o),i_(a.d,t)),n=uu(n/2),n!==0;)o=o.times(o),i_(o.d,t);return ft=!0,e.s<0?new c(Gn).div(a):Xe(a,r)}}else if(i<0)throw Error(Or+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,ft=!1,a=e.times(lf(o,r+u)),ft=!0,a=QL(a),a.s=i,a};re.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=kt(a),r=bo(a,n<=i.toExpNeg||n>=i.toExpPos)):(ma(e,1,cu),t===void 0?t=i.rounding:ma(t,0,8),a=Xe(new i(a),e,t),n=kt(a),r=bo(a,e<=n||n<=i.toExpNeg,e)),r};re.toSignificantDigits=re.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ma(e,1,cu),t===void 0?t=r.rounding:ma(t,0,8)),Xe(new r(n),e,t)};re.toString=re.valueOf=re.val=re.toJSON=re[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),n=e.constructor;return bo(e,t<=n.toExpNeg||t>=n.toExpPos)};function XL(e,t){var n,r,a,i,s,o,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),ft?Xe(t,f):t;if(c=e.d,u=t.d,s=e.e,a=t.e,c=c.slice(),i=s-a,i){for(i<0?(r=c,i=-i,o=u.length):(r=u,a=s,o=c.length),s=Math.ceil(f/it),o=s>o?s+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=c.length,i=u.length,o-i<0&&(i=o,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Ht|0,c[i]%=Ht;for(n&&(c.unshift(n),++a),o=c.length;c[--o]==0;)c.pop();return t.d=c,t.e=a,ft?Xe(t,f):t}function ma(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ao+e)}function sa(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)r=e[t]+"",n=it-r.length,n&&(i+=wi(n)),i+=r;s=e[t],r=s+"",n=it-r.length,n&&(i+=wi(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var Xa=function(){function e(r,a){var i,s=0,o=r.length;for(r=r.slice();o--;)i=r[o]*a+s,r[o]=i%Ht|0,s=i/Ht|0;return s&&r.unshift(s),r}function t(r,a,i,s){var o,c;if(i!=s)c=i>s?1:-1;else for(o=c=0;o<i;o++)if(r[o]!=a[o]){c=r[o]>a[o]?1:-1;break}return c}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]<a[i]?1:0,r[i]=s*Ht+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,s){var o,c,u,d,f,h,p,g,m,v,y,x,b,w,S,A,O,N,E=r.constructor,T=r.s==a.s?1:-1,_=r.d,C=a.d;if(!r.s)return new E(r);if(!a.s)throw Error(Or+"Division by zero");for(c=r.e-a.e,O=C.length,S=_.length,p=new E(T),g=p.d=[],u=0;C[u]==(_[u]||0);)++u;if(C[u]>(_[u]||0)&&--c,i==null?x=i=E.precision:s?x=i+(kt(r)-kt(a))+1:x=i,x<0)return new E(0);if(x=x/it+2|0,u=0,O==1)for(d=0,C=C[0],x++;(u<S||d)&&x--;u++)b=d*Ht+(_[u]||0),g[u]=b/C|0,d=b%C|0;else{for(d=Ht/(C[0]+1)|0,d>1&&(C=e(C,d),_=e(_,d),O=C.length,S=_.length),w=O,m=_.slice(0,O),v=m.length;v<O;)m[v++]=0;N=C.slice(),N.unshift(0),A=C[0],C[1]>=Ht/2&&++A;do d=0,o=t(C,m,O,v),o<0?(y=m[0],O!=v&&(y=y*Ht+(m[1]||0)),d=y/A|0,d>1?(d>=Ht&&(d=Ht-1),f=e(C,d),h=f.length,v=m.length,o=t(f,m,h,v),o==1&&(d--,n(f,O<h?N:C,h))):(d==0&&(o=d=1),f=C.slice()),h=f.length,h<v&&f.unshift(0),n(m,f,v),o==-1&&(v=m.length,o=t(C,m,O,v),o<1&&(d++,n(m,O<v?N:C,v))),v=m.length):o===0&&(d++,m=[0]),g[u++]=d,o&&m[0]?m[v++]=_[w]||0:(m=[_[w]],v=1);while((w++<S||m[0]!==void 0)&&x--)}return g[0]||g.shift(),p.e=c,Xe(p,s?i+kt(p)+1:i)}}();function QL(e,t){var n,r,a,i,s,o,c=0,u=0,d=e.constructor,f=d.precision;if(kt(e)>16)throw Error(I2+kt(e));if(!e.s)return new d(Gn);for(ft=!1,o=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(r=Math.log(_s(2,u))/Math.LN10*2+5|0,o+=r,n=a=i=new d(Gn),d.precision=o;;){if(a=Xe(a.times(e),o),n=n.times(++c),s=i.plus(Xa(a,n,o)),sa(s.d).slice(0,o)===sa(i.d).slice(0,o)){for(;u--;)i=Xe(i.times(i),o);return d.precision=f,t==null?(ft=!0,Xe(i,f)):i}i=s}}function kt(e){for(var t=e.e*it,n=e.d[0];n>=10;n/=10)t++;return t}function Jx(e,t,n){if(t>e.LN10.sd())throw ft=!0,n&&(e.precision=n),Error(Or+"LN10 precision limit exceeded");return Xe(new e(e.LN10),t)}function wi(e){for(var t="";e--;)t+="0";return t}function lf(e,t){var n,r,a,i,s,o,c,u,d,f=1,h=10,p=e,g=p.d,m=p.constructor,v=m.precision;if(p.s<1)throw Error(Or+(p.s?"NaN":"-Infinity"));if(p.eq(Gn))return new m(0);if(t==null?(ft=!1,u=v):u=t,p.eq(10))return t==null&&(ft=!0),Jx(m,u);if(u+=h,m.precision=u,n=sa(g),r=n.charAt(0),i=kt(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=sa(p.d),r=n.charAt(0),f++;i=kt(p),r>1?(p=new m("0."+n),i++):p=new m(r+"."+n.slice(1))}else return c=Jx(m,u+2,v).times(i+""),p=lf(new m(r+"."+n.slice(1)),u-h).plus(c),m.precision=v,t==null?(ft=!0,Xe(p,v)):p;for(o=s=p=Xa(p.minus(Gn),p.plus(Gn),u),d=Xe(p.times(p),u),a=3;;){if(s=Xe(s.times(d),u),c=o.plus(Xa(s,new m(a),u)),sa(c.d).slice(0,u)===sa(o.d).slice(0,u))return o=o.times(2),i!==0&&(o=o.plus(Jx(m,u+2,v).times(i+""))),o=Xa(o,new m(f),u),m.precision=v,t==null?(ft=!0,Xe(o,v)):o;o=c,a+=2}}function a_(e,t){var n,r,a;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(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=uu(n/it),e.d=[],r=(n+1)%it,n<0&&(r+=it),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=it;r<a;)e.d.push(+t.slice(r,r+=it));t=t.slice(r),r=it-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),ft&&(e.e>ug||e.e<-ug))throw Error(I2+n)}else e.s=0,e.e=0,e.d=[0];return e}function Xe(e,t,n){var r,a,i,s,o,c,u,d,f=e.d;for(s=1,i=f[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=it,a=t,u=f[d=0];else{if(d=Math.ceil((r+1)/it),i=f.length,d>=i)return e;for(u=i=f[d],s=1;i>=10;i/=10)s++;r%=it,a=r-it+s}if(n!==void 0&&(i=_s(10,s-a-1),o=u/i%10|0,c=t<0||f[d+1]!==void 0||u%i,c=n<4?(o||c)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||c||n==6&&(r>0?a>0?u/_s(10,s-a):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(i=kt(e),f.length=1,t=t-i-1,f[0]=_s(10,(it-t%it)%it),e.e=uu(-t/it)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,i=1,d--):(f.length=d+1,i=_s(10,it-r),f[d]=a>0?(u/_s(10,s-a)%_s(10,a)|0)*i:0),c)for(;;)if(d==0){(f[0]+=i)==Ht&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=Ht)break;f[d--]=0,i=1}for(r=f.length;f[--r]===0;)f.pop();if(ft&&(e.e>ug||e.e<-ug))throw Error(I2+kt(e));return e}function ZL(e,t){var n,r,a,i,s,o,c,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ft?Xe(t,p):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),s=u-r,s){for(d=s<0,d?(n=c,s=-s,o=f.length):(n=f,r=u,o=c.length),a=Math.max(Math.ceil(p/it),o)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=c.length,o=f.length,d=a<o,d&&(o=a),a=0;a<o;a++)if(c[a]!=f[a]){d=c[a]<f[a];break}s=0}for(d&&(n=c,c=f,f=n,t.s=-t.s),o=c.length,a=f.length-o;a>0;--a)c[o++]=0;for(a=f.length;a>s;){if(c[--a]<f[a]){for(i=a;i&&c[--i]===0;)c[i]=Ht-1;--c[i],c[a]+=Ht}c[a]-=f[a]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,ft?Xe(t,p):t):new h(0)}function bo(e,t,n){var r,a=kt(e),i=sa(e.d),s=i.length;return t?(n&&(r=n-s)>0?i=i.charAt(0)+"."+i.slice(1)+wi(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+wi(-a-1)+i,n&&(r=n-s)>0&&(i+=wi(r))):a>=s?(i+=wi(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+wi(r))):((r=a+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-s)>0&&(a+1===s&&(i+="."),i+=wi(r))),e.s<0?"-"+i:i}function i_(e,t){if(e.length>t)return e.length=t,!0}function JL(e){var t,n,r;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(ao+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return a_(s,i.toString())}else if(typeof i!="string")throw Error(ao+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,Lge.test(i))a_(s,i);else throw Error(ao+i)}if(a.prototype=re,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=JL,a.config=a.set=Ige,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 a.config(e),a}function Ige(e){if(!e||typeof e!="object")throw Error(Or+"Object expected");var t,n,r,a=["precision",1,cu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(uu(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(ao+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ao+n+": "+r);return this}var z2=JL($ge);Gn=new z2(1);const Ye=z2;function zge(e){return Vge(e)||Fge(e)||Uge(e)||Bge()}function Bge(){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 Uge(e,t){if(e){if(typeof e=="string")return L1(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 L1(e,t)}}function Fge(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Vge(e){if(Array.isArray(e))return L1(e)}function L1(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 Hge=function(t){return t},e6={},t6=function(t){return t===e6},s_=function(t){return function n(){return arguments.length===0||arguments.length===1&&t6(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},qge=function e(t,n){return t===1?n:s_(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var s=a.filter(function(o){return o!==e6}).length;return s>=t?n.apply(void 0,a):e(t-s,s_(function(){for(var o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];var d=a.map(function(f){return t6(f)?c.shift():f});return n.apply(void 0,zge(d).concat(c))}))})},iv=function(t){return qge(t.length,t)},I1=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},Kge=iv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Gge=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Hge;var a=n.reverse(),i=a[0],s=a.slice(1);return function(){return s.reduce(function(o,c){return c(o)},i.apply(void 0,arguments))}},z1=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},n6=function(t){var n=null,r=null;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return n&&i.every(function(o,c){return o===n[c]})||(n=i,r=t.apply(void 0,i)),r}};function Yge(e){var t;return e===0?t=1:t=Math.floor(new Ye(e).abs().log(10).toNumber())+1,t}function Wge(e,t,n){for(var r=new Ye(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var Xge=iv(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),Qge=iv(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Zge=iv(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const sv={rangeStep:Wge,getDigitCount:Yge,interpolateNumber:Xge,uninterpolateNumber:Qge,uninterpolateTruncation:Zge};function B1(e){return tye(e)||eye(e)||r6(e)||Jge()}function Jge(){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 eye(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tye(e){if(Array.isArray(e))return U1(e)}function cf(e,t){return aye(e)||rye(e,t)||r6(e,t)||nye()}function nye(){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 r6(e,t){if(e){if(typeof e=="string")return U1(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 U1(e,t)}}function U1(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 rye(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var s=e[Symbol.iterator](),o;!(r=(o=s.next()).done)&&(n.push(o.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,i=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(a)throw i}}return n}}function aye(e){if(Array.isArray(e))return e}function a6(e){var t=cf(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function i6(e,t,n){if(e.lte(0))return new Ye(0);var r=sv.getDigitCount(e.toNumber()),a=new Ye(10).pow(r),i=e.div(a),s=r!==1?.05:.1,o=new Ye(Math.ceil(i.div(s).toNumber())).add(n).mul(s),c=o.mul(a);return t?c:new Ye(Math.ceil(c))}function iye(e,t,n){var r=1,a=new Ye(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Ye(10).pow(sv.getDigitCount(e)-1),a=new Ye(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Ye(Math.floor(e)))}else e===0?a=new Ye(Math.floor((t-1)/2)):n||(a=new Ye(Math.floor(e)));var s=Math.floor((t-1)/2),o=Gge(Kge(function(c){return a.add(new Ye(c-s).mul(r)).toNumber()}),I1);return o(0,t)}function s6(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ye(0),tickMin:new Ye(0),tickMax:new Ye(0)};var i=i6(new Ye(t).sub(e).div(n-1),r,a),s;e<=0&&t>=0?s=new Ye(0):(s=new Ye(e).add(t).div(2),s=s.sub(new Ye(s).mod(i)));var o=Math.ceil(s.sub(e).div(i).toNumber()),c=Math.ceil(new Ye(t).sub(s).div(i).toNumber()),u=o+c+1;return u>n?s6(e,t,n,r,a+1):(u<n&&(c=t>0?c+(n-u):c,o=t>0?o:o+(n-u)),{step:i,tickMin:s.sub(new Ye(o).mul(i)),tickMax:s.add(new Ye(c).mul(i))})}function sye(e){var t=cf(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(a,2),o=a6([n,r]),c=cf(o,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(B1(I1(0,a-1).map(function(){return 1/0}))):[].concat(B1(I1(0,a-1).map(function(){return-1/0})),[d]);return n>r?z1(f):f}if(u===d)return iye(u,a,i);var h=s6(u,d,s,i),p=h.step,g=h.tickMin,m=h.tickMax,v=sv.rangeStep(g,m.add(new Ye(.1).mul(p)),p);return n>r?z1(v):v}function oye(e,t){var n=cf(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=a6([r,a]),o=cf(s,2),c=o[0],u=o[1];if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var d=Math.max(t,2),f=i6(new Ye(u).sub(c).div(d-1),i,0),h=[].concat(B1(sv.rangeStep(new Ye(c),new Ye(u).sub(new Ye(.99).mul(f)),f)),[u]);return r>a?z1(h):h}var lye=n6(sye),cye=n6(oye),uye="Invariant failed";function So(e,t){throw new Error(uye)}var dye=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function xc(e){"@babel/helpers - typeof";return xc=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},xc(e)}function dg(){return dg=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},dg.apply(this,arguments)}function fye(e,t){return gye(e)||mye(e,t)||pye(e,t)||hye()}function hye(){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 pye(e,t){if(e){if(typeof e=="string")return o_(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 o_(e,t)}}function o_(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 mye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function gye(e){if(Array.isArray(e))return e}function yye(e,t){if(e==null)return{};var n=vye(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vye(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 xye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bye(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,c6(r.key),r)}}function Sye(e,t,n){return t&&bye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wye(e,t,n){return t=fg(t),jye(e,o6()?Reflect.construct(t,n||[],fg(e).constructor):t.apply(e,n))}function jye(e,t){if(t&&(xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aye(e)}function Aye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o6=function(){return!!e})()}function fg(e){return fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fg(e)}function Oye(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&&F1(e,t)}function F1(e,t){return F1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},F1(e,t)}function l6(e,t,n){return t=c6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c6(e){var t=Nye(e,"string");return xc(t)=="symbol"?t:t+""}function Nye(e,t){if(xc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gh=function(e){function t(){return xye(this,t),wye(this,t,arguments)}return Oye(t,e),Sye(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,s=r.width,o=r.dataKey,c=r.data,u=r.dataPointFormatter,d=r.xAxis,f=r.yAxis,h=yye(r,dye),p=ie(h,!1);this.props.direction==="x"&&d.type!=="number"&&So();var g=c.map(function(m){var v=u(m,o),y=v.x,x=v.y,b=v.value,w=v.errorVal;if(!w)return null;var S=[],A,O;if(Array.isArray(w)){var N=fye(w,2);A=N[0],O=N[1]}else A=O=w;if(i==="vertical"){var E=d.scale,T=x+a,_=T+s,C=T-s,$=E(b-A),R=E(b+O);S.push({x1:R,y1:_,x2:R,y2:C}),S.push({x1:$,y1:T,x2:R,y2:T}),S.push({x1:$,y1:_,x2:$,y2:C})}else if(i==="horizontal"){var k=f.scale,M=y+a,L=M-s,z=M+s,V=k(b-A),K=k(b+O);S.push({x1:L,y1:K,x2:z,y2:K}),S.push({x1:M,y1:V,x2:M,y2:K}),S.push({x1:L,y1:V,x2:z,y2:V})}return P.createElement(Ne,dg({className:"recharts-errorBar",key:"bar-".concat(S.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},p),S.map(function(U){return P.createElement("line",dg({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return P.createElement(Ne,{className:"recharts-errorBars"},g)}}])}(P.Component);l6(gh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});l6(gh,"displayName","ErrorBar");function uf(e){"@babel/helpers - typeof";return uf=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},uf(e)}function l_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l_(Object(n),!0).forEach(function(r){Eye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eye(e,t,n){return t=Tye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tye(e){var t=Cye(e,"string");return uf(t)=="symbol"?t:t+""}function Cye(e,t){if(uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u6=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,s=Un(n,ia);if(!s)return null;var o=ia.defaultProps,c=o!==void 0?xs(xs({},o),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:i==="children"?u=(r||[]).reduce(function(d,f){var h=f.item,p=f.props,g=p.sectors||p.data||[];return d.concat(g.map(function(m){return{type:s.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(r||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?xs(xs({},h),f.props):{},g=p.dataKey,m=p.name,v=p.legendType,y=p.hide;return{inactive:y,dataKey:g,type:c.iconType||v||"square",color:B2(f),value:m||g,payload:p}}),xs(xs(xs({},c),ia.getWithHeight(s,a)),{},{payload:u,item:s})};function df(e){"@babel/helpers - typeof";return df=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},df(e)}function c_(e){return kye(e)||Mye(e)||Pye(e)||_ye()}function _ye(){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 Pye(e,t){if(e){if(typeof e=="string")return V1(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 V1(e,t)}}function Mye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kye(e){if(Array.isArray(e))return V1(e)}function V1(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 u_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u_(Object(n),!0).forEach(function(r){kl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kl(e,t,n){return t=Rye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rye(e){var t=Dye(e,"string");return df(t)=="symbol"?t:t+""}function Dye(e,t){if(df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function At(e,t,n){return ye(e)||ye(t)?n:It(t)?Jn(e,t,n):pe(t)?t(e):n}function vd(e,t,n,r){var a=Mge(e,function(o){return At(o,t)});if(n==="number"){var i=a.filter(function(o){return Y(o)||parseFloat(o)});return i.length?[av(i),Ui(i)]:[1/0,-1/0]}var s=r?a.filter(function(o){return!ye(o)}):a;return s.map(function(o){return It(o)||o instanceof Date?o:""})}var $ye=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<o;u++){var d=u>0?a[u-1].coordinate:a[o-1].coordinate,f=a[u].coordinate,h=u>=o-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(gn(f-d)!==gn(h-f)){var g=[];if(gn(h-f)===gn(c[1]-c[0])){p=h;var m=f+c[1]-c[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{p=d;var v=h+c[1]-c[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var y=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>y[0]&&t<=y[1]||t>=g[0]&&t<=g[1]){s=a[u].index;break}}else{var x=Math.min(d,h),b=Math.max(d,h);if(t>(x+f)/2&&t<=(b+f)/2){s=a[u].index;break}}}else for(var w=0;w<o;w++)if(w===0&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w>0&&w<o-1&&t>(r[w].coordinate+r[w-1].coordinate)/2&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w===o-1&&t>(r[w].coordinate+r[w-1].coordinate)/2){s=r[w].index;break}return s},B2=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?bt(bt({},t.type.defaultProps),t.props):t.props,s=i.stroke,o=i.fill,c;switch(a){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:o;break;default:c=o;break}return c},Lye=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var s={},o=Object.keys(i),c=0,u=o.length;c<u;c++)for(var d=i[o[c]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],m=g.items,v=g.cateAxisId,y=m.filter(function(O){return Wa(O.type).indexOf("Bar")>=0});if(y&&y.length){var x=y[0].type.defaultProps,b=x!==void 0?bt(bt({},x),y[0].props):y[0].props,w=b.barSize,S=b[v];s[S]||(s[S]=[]);var A=ye(w)?n:w;s[S].push({item:y[0],stackList:y.slice(1),barSize:ye(A)?void 0:yn(A,r,0)})}}return s},Iye=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,s=i===void 0?[]:i,o=t.maxBarSize,c=s.length;if(c<1)return null;var u=yn(n,a,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=a/c,g=s.reduce(function(w,S){return w+S.barSize||0},0);g+=(c-1)*u,g>=a&&(g-=(c-1)*u,u=0),g>=a&&p>0&&(h=!0,p*=.9,g=c*p);var m=(a-g)/2>>0,v={offset:m-u,size:0};d=s.reduce(function(w,S){var A={item:S.item,position:{offset:v.offset+v.size+u,size:h?p:S.barSize}},O=[].concat(c_(w),[A]);return v=O[O.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(N){O.push({item:N,position:v})}),O},f)}else{var y=yn(r,a,0,!0);a-2*y-(c-1)*u<=0&&(u=0);var x=(a-2*y-(c-1)*u)/c;x>1&&(x>>=0);var b=o===+o?Math.min(x,o):x;d=s.reduce(function(w,S,A){var O=[].concat(c_(w),[{item:S.item,position:{offset:y+(x+u)*A+(x-b)/2,size:b}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(N){O.push({item:N,position:O[O.length-1].position})}),O},f)}return d},zye=function(t,n,r,a){var i=r.children,s=r.width,o=r.margin,c=s-(o.left||0)-(o.right||0),u=u6({children:i,legendWidth:c});if(u){var d=a||{},f=d.width,h=d.height,p=u.align,g=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&Y(t[p]))return bt(bt({},t),{},kl({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&Y(t[g]))return bt(bt({},t),{},kl({},g,t[g]+(h||0)))}return t},Bye=function(t,n,r){return ye(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},d6=function(t,n,r,a,i){var s=n.props.children,o=er(s,gh).filter(function(u){return Bye(a,i,u.props.direction)});if(o&&o.length){var c=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=At(d,r);if(ye(f))return u;var h=Array.isArray(f)?[av(f),Ui(f)]:[f,f],p=c.reduce(function(g,m){var v=At(d,m,0),y=h[0]-Math.abs(Array.isArray(v)?v[0]:v),x=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(y,g[0]),Math.max(x,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},Uye=function(t,n,r,a,i){var s=n.map(function(o){return d6(t,o,r,i,a)}).filter(function(o){return!ye(o)});return s&&s.length?s.reduce(function(o,c){return[Math.min(o[0],c[0]),Math.max(o[1],c[1])]},[1/0,-1/0]):null},f6=function(t,n,r,a,i){var s=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&d6(t,c,u,a)||vd(t,u,r,i)});if(r==="number")return s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var o={};return s.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)o[u[d]]||(o[u[d]]=!0,c.push(u[d]));return c},[])},h6=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},p6=function(t,n,r,a){if(a)return t.map(function(c){return c.coordinate});var i,s,o=t.map(function(c){return c.coordinate===n&&(i=!0),c.coordinate===r&&(s=!0),c.coordinate});return i||o.push(n),s||o.push(r),o},Ua=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,s=t.type,o=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||r)&&s==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?gn(o[0]-o[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=i?i.indexOf(f):f;return{coordinate:a(h)+u,value:f,offset:u}});return d.filter(function(f){return!au(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:a(f)+u,value:f,index:h,offset:u}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,h){return{coordinate:a(f)+u,value:i?i[f]:f,index:h,offset:u}})},eb=new WeakMap,rp=function(t,n){if(typeof n!="function")return t;eb.has(t)||eb.set(t,new WeakMap);var r=eb.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},m6=function(t,n,r){var a=t.scale,i=t.type,s=t.layout,o=t.axisType;if(a==="auto")return s==="radial"&&o==="radiusAxis"?{scale:nf(),realScaleType:"band"}:s==="radial"&&o==="angleAxis"?{scale:sg(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:yd(),realScaleType:"point"}:i==="category"?{scale:nf(),realScaleType:"band"}:{scale:sg(),realScaleType:"linear"};if(go(a)){var c="scale".concat(Vy(a));return{scale:(r_[c]||yd)(),realScaleType:r_[c]?c:"point"}}return pe(a)?{scale:a}:{scale:yd(),realScaleType:"point"}},d_=1e-4,g6=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-d_,s=Math.max(a[0],a[1])+d_,o=t(n[0]),c=t(n[r-1]);(o<i||o>s||c<i||c>s)&&t.domain([n[0],n[r-1]])}},Fye=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},Vye=function(t,n){if(!n||n.length!==2||!Y(n[0])||!Y(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!Y(t[0])||t[0]<r)&&(i[0]=r),(!Y(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},Hye=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,s=0,o=0;o<n;++o){var c=au(t[o][r][1])?t[o][r][0]:t[o][r][1];c>=0?(t[o][r][0]=i,t[o][r][1]=i+c,i=t[o][r][1]):(t[o][r][0]=s,t[o][r][1]=s+c,s=t[o][r][1])}},qye=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,s=0;s<n;++s){var o=au(t[s][r][1])?t[s][r][0]:t[s][r][1];o>=0?(t[s][r][0]=i,t[s][r][1]=i+o,i=t[s][r][1]):(t[s][r][0]=0,t[s][r][1]=0)}},Kye={sign:Hye,expand:dae,none:dc,silhouette:fae,wiggle:hae,positive:qye},Gye=function(t,n,r){var a=n.map(function(o){return o.props.dataKey}),i=Kye[r],s=uae().keys(a).value(function(o,c){return+At(o,c,0)}).order(p1).offset(i);return s(t)},Yye=function(t,n,r,a,i,s){if(!t)return null;var o=s?n.reverse():n,c={},u=o.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?bt(bt({},h.type.defaultProps),h.props):h.props,m=g.stackId,v=g.hide;if(v)return f;var y=g[r],x=f[y]||{hasStack:!1,stackGroups:{}};if(It(m)){var b=x.stackGroups[m]||{numericAxisId:r,cateAxisId:a,items:[]};b.items.push(h),x.hasStack=!0,x.stackGroups[m]=b}else x.stackGroups[Po("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[h]};return bt(bt({},f),{},kl({},y,x))},c),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,v){var y=p.stackGroups[v];return bt(bt({},m),{},kl({},v,{numericAxisId:r,cateAxisId:a,items:y.items,stackedData:Gye(t,y.items,i)}))},g)}return bt(bt({},f),{},kl({},h,p))},d)},y6=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,s=n.originalDomain,o=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=lye(u,i,o);return t.domain([av(d),Ui(d)]),{niceTicks:d}}if(i&&a==="number"){var f=t.domain(),h=cye(f,i,o);return{niceTicks:h}}return null};function hg(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ye(a[t.dataKey])){var o=Im(n,"value",a[t.dataKey]);if(o)return o.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=At(a,ye(s)?t.dataKey:s);return ye(c)?null:t.scale(c)}var f_=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,s=t.entry,o=t.index;if(n.type==="category")return r[o]?r[o].coordinate+a:null;var c=At(s,n.dataKey,n.domain[o]);return ye(c)?null:n.scale(c)-i/2+a},Wye=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},Xye=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?bt(bt({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(It(i)){var s=n[i];if(s){var o=s.items.indexOf(t);return o>=0?s.stackedData[o]:null}}return null},Qye=function(t){return t.reduce(function(n,r){return[av(r.concat([n[0]]).filter(Y)),Ui(r.concat([n[1]]).filter(Y))]},[1/0,-1/0])},v6=function(t,n,r){return Object.keys(t).reduce(function(a,i){var s=t[i],o=s.stackedData,c=o.reduce(function(u,d){var f=Qye(d.slice(n,r+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},h_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p_=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,H1=function(t,n,r){if(pe(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Y(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(h_.test(t[0])){var i=+h_.exec(t[0])[1];a[0]=n[0]-i}else pe(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Y(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(p_.test(t[1])){var s=+p_.exec(t[1])[1];a[1]=n[1]+s}else pe(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},pg=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=p2(n,function(f){return f.coordinate}),s=1/0,o=1,c=i.length;o<c;o++){var u=i[o],d=i[o-1];s=Math.min((u.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return r?void 0:0},m_=function(t,n,r){return!t||!t.length||xo(t,Jn(r,"type.defaultProps.domain"))?n:t},x6=function(t,n){var r=t.type.defaultProps?bt(bt({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,s=r.unit,o=r.formatter,c=r.tooltipType,u=r.chartType,d=r.hide;return bt(bt({},ie(t,!1)),{},{dataKey:a,unit:s,formatter:o,name:i||a,color:B2(t),value:At(n,a),type:c,payload:n,chartType:u,hide:d})};function ff(e){"@babel/helpers - typeof";return ff=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},ff(e)}function g_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g_(Object(n),!0).forEach(function(r){b6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b6(e,t,n){return t=Zye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zye(e){var t=Jye(e,"string");return ff(t)=="symbol"?t:t+""}function Jye(e,t){if(ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eve(e,t){return ave(e)||rve(e,t)||nve(e,t)||tve()}function tve(){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 nve(e,t){if(e){if(typeof e=="string")return y_(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 y_(e,t)}}function y_(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 rve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function ave(e){if(Array.isArray(e))return e}var mg=Math.PI/180,ive=function(t){return t*180/Math.PI},nt=function(t,n,r,a){return{x:t+Math.cos(-mg*a)*r,y:n+Math.sin(-mg*a)*r}},S6=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},sve=function(t,n,r,a,i){var s=t.width,o=t.height,c=t.startAngle,u=t.endAngle,d=yn(t.cx,s,s/2),f=yn(t.cy,o,o/2),h=S6(s,o,r),p=yn(t.innerRadius,h,0),g=yn(t.outerRadius,h,h*.8),m=Object.keys(n);return m.reduce(function(v,y){var x=n[y],b=x.domain,w=x.reversed,S;if(ye(x.range))a==="angleAxis"?S=[c,u]:a==="radiusAxis"&&(S=[p,g]),w&&(S=[S[1],S[0]]);else{S=x.range;var A=S,O=eve(A,2);c=O[0],u=O[1]}var N=m6(x,i),E=N.realScaleType,T=N.scale;T.domain(b).range(S),g6(T);var _=y6(T,Pa(Pa({},x),{},{realScaleType:E})),C=Pa(Pa(Pa({},x),_),{},{range:S,radius:g,realScaleType:E,scale:T,cx:d,cy:f,innerRadius:p,outerRadius:g,startAngle:c,endAngle:u});return Pa(Pa({},v),{},b6({},y,C))},{})},ove=function(t,n){var r=t.x,a=t.y,i=n.x,s=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(a-s,2))},lve=function(t,n){var r=t.x,a=t.y,i=n.cx,s=n.cy,o=ove({x:r,y:a},{x:i,y:s});if(o<=0)return{radius:o};var c=(r-i)/o,u=Math.acos(c);return a>s&&(u=2*Math.PI-u),{radius:o,angle:ive(u),angleInRadian:u}},cve=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),s=Math.min(a,i);return{startAngle:n-s*360,endAngle:r-s*360}},uve=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),s=Math.floor(a/360),o=Math.min(i,s);return t+o*360},v_=function(t,n){var r=t.x,a=t.y,i=lve({x:r,y:a},n),s=i.radius,o=i.angle,c=n.innerRadius,u=n.outerRadius;if(s<c||s>u)return!1;if(s===0)return!0;var d=cve(n),f=d.startAngle,h=d.endAngle,p=o,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?Pa(Pa({},n),{},{radius:s,angle:uve(p,n)}):null},w6=function(t){return!j.isValidElement(t)&&!pe(t)&&typeof t!="boolean"?t.className:""};function hf(e){"@babel/helpers - typeof";return hf=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},hf(e)}var dve=["offset"];function fve(e){return gve(e)||mve(e)||pve(e)||hve()}function hve(){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 pve(e,t){if(e){if(typeof e=="string")return q1(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 q1(e,t)}}function mve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gve(e){if(Array.isArray(e))return q1(e)}function q1(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 yve(e,t){if(e==null)return{};var n=vve(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vve(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 x_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x_(Object(n),!0).forEach(function(r){xve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xve(e,t,n){return t=bve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bve(e){var t=Sve(e,"string");return hf(t)=="symbol"?t:t+""}function Sve(e,t){if(hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pf(){return pf=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},pf.apply(this,arguments)}var wve=function(t){var n=t.value,r=t.formatter,a=ye(t.children)?n:t.children;return pe(r)?r(a):a},jve=function(t,n){var r=gn(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Ave=function(t,n,r){var a=t.position,i=t.viewBox,s=t.offset,o=t.className,c=i,u=c.cx,d=c.cy,f=c.innerRadius,h=c.outerRadius,p=c.startAngle,g=c.endAngle,m=c.clockWise,v=(f+h)/2,y=jve(p,g),x=y>=0?1:-1,b,w;a==="insideStart"?(b=p+x*s,w=m):a==="insideEnd"?(b=g-x*s,w=!m):a==="end"&&(b=g+x*s,w=m),w=y<=0?w:!w;var S=nt(u,d,v,b),A=nt(u,d,v,b+(w?1:-1)*359),O="M".concat(S.x,",").concat(S.y,`
    A`).concat(v,",").concat(v,",0,1,").concat(w?0:1,`,
    `).concat(A.x,",").concat(A.y),N=ye(t.id)?Po("recharts-radial-line-"):t.id;return P.createElement("text",pf({},r,{dominantBaseline:"central",className:be("recharts-radial-bar-label",o)}),P.createElement("defs",null,P.createElement("path",{id:N,d:O})),P.createElement("textPath",{xlinkHref:"#".concat(N)},n))},Ove=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,s=i.cx,o=i.cy,c=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,h=(d+f)/2;if(a==="outside"){var p=nt(s,o,u+r,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=s?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,y=nt(s,o,v,h),x=y.x,b=y.y;return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Nve=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,s=n,o=s.x,c=s.y,u=s.width,d=s.height,f=d>=0?1:-1,h=f*a,p=f>0?"end":"start",g=f>0?"start":"end",m=u>=0?1:-1,v=m*a,y=m>0?"end":"start",x=m>0?"start":"end";if(i==="top"){var b={x:o+u/2,y:c-f*a,textAnchor:"middle",verticalAnchor:p};return Dt(Dt({},b),r?{height:Math.max(c-r.y,0),width:u}:{})}if(i==="bottom"){var w={x:o+u/2,y:c+d+h,textAnchor:"middle",verticalAnchor:g};return Dt(Dt({},w),r?{height:Math.max(r.y+r.height-(c+d),0),width:u}:{})}if(i==="left"){var S={x:o-v,y:c+d/2,textAnchor:y,verticalAnchor:"middle"};return Dt(Dt({},S),r?{width:Math.max(S.x-r.x,0),height:d}:{})}if(i==="right"){var A={x:o+u+v,y:c+d/2,textAnchor:x,verticalAnchor:"middle"};return Dt(Dt({},A),r?{width:Math.max(r.x+r.width-A.x,0),height:d}:{})}var O=r?{width:u,height:d}:{};return i==="insideLeft"?Dt({x:o+v,y:c+d/2,textAnchor:x,verticalAnchor:"middle"},O):i==="insideRight"?Dt({x:o+u-v,y:c+d/2,textAnchor:y,verticalAnchor:"middle"},O):i==="insideTop"?Dt({x:o+u/2,y:c+h,textAnchor:"middle",verticalAnchor:g},O):i==="insideBottom"?Dt({x:o+u/2,y:c+d-h,textAnchor:"middle",verticalAnchor:p},O):i==="insideTopLeft"?Dt({x:o+v,y:c+h,textAnchor:x,verticalAnchor:g},O):i==="insideTopRight"?Dt({x:o+u-v,y:c+h,textAnchor:y,verticalAnchor:g},O):i==="insideBottomLeft"?Dt({x:o+v,y:c+d-h,textAnchor:x,verticalAnchor:p},O):i==="insideBottomRight"?Dt({x:o+u-v,y:c+d-h,textAnchor:y,verticalAnchor:p},O):eu(i)&&(Y(i.x)||$s(i.x))&&(Y(i.y)||$s(i.y))?Dt({x:o+yn(i.x,u),y:c+yn(i.y,d),textAnchor:"end",verticalAnchor:"end"},O):Dt({x:o+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},O)},Eve=function(t){return"cx"in t&&Y(t.cx)};function Gt(e){var t=e.offset,n=t===void 0?5:t,r=yve(e,dve),a=Dt({offset:n},r),i=a.viewBox,s=a.position,o=a.value,c=a.children,u=a.content,d=a.className,f=d===void 0?"":d,h=a.textBreakAll;if(!i||ye(o)&&ye(c)&&!j.isValidElement(u)&&!pe(u))return null;if(j.isValidElement(u))return j.cloneElement(u,a);var p;if(pe(u)){if(p=j.createElement(u,a),j.isValidElement(p))return p}else p=wve(a);var g=Eve(i),m=ie(a,!0);if(g&&(s==="insideStart"||s==="insideEnd"||s==="end"))return Ave(a,p,m);var v=g?Ove(a):Nve(a);return P.createElement(vo,pf({className:be("recharts-label",f)},m,v,{breakAll:h}),p)}Gt.displayName="Label";var j6=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,s=t.endAngle,o=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,g=t.left,m=t.width,v=t.height,y=t.clockWise,x=t.labelViewBox;if(x)return x;if(Y(m)&&Y(v)){if(Y(f)&&Y(h))return{x:f,y:h,width:m,height:v};if(Y(p)&&Y(g))return{x:p,y:g,width:m,height:v}}return Y(f)&&Y(h)?{x:f,y:h,width:0,height:0}:Y(n)&&Y(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:s||a||0,innerRadius:u||0,outerRadius:d||c||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},Tve=function(t,n){return t?t===!0?P.createElement(Gt,{key:"label-implicit",viewBox:n}):It(t)?P.createElement(Gt,{key:"label-implicit",viewBox:n,value:t}):j.isValidElement(t)?t.type===Gt?j.cloneElement(t,{key:"label-implicit",viewBox:n}):P.createElement(Gt,{key:"label-implicit",content:t,viewBox:n}):pe(t)?P.createElement(Gt,{key:"label-implicit",content:t,viewBox:n}):eu(t)?P.createElement(Gt,pf({viewBox:n},t,{key:"label-implicit"})):null:null},Cve=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 a=t.children,i=j6(t),s=er(a,Gt).map(function(c,u){return j.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return s;var o=Tve(t.label,n||i);return[o].concat(fve(s))};Gt.parseViewBox=j6;Gt.renderCallByParent=Cve;function _ve(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Pve=_ve;const Mve=Fe(Pve);function mf(e){"@babel/helpers - typeof";return mf=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},mf(e)}var kve=["valueAccessor"],Rve=["data","dataKey","clockWise","id","textBreakAll"];function Dve(e){return zve(e)||Ive(e)||Lve(e)||$ve()}function $ve(){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 Lve(e,t){if(e){if(typeof e=="string")return K1(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 K1(e,t)}}function Ive(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zve(e){if(Array.isArray(e))return K1(e)}function K1(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 gg(){return gg=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},gg.apply(this,arguments)}function b_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function S_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b_(Object(n),!0).forEach(function(r){Bve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bve(e,t,n){return t=Uve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uve(e){var t=Fve(e,"string");return mf(t)=="symbol"?t:t+""}function Fve(e,t){if(mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w_(e,t){if(e==null)return{};var n=Vve(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vve(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 Hve=function(t){return Array.isArray(t.value)?Mve(t.value):t.value};function fa(e){var t=e.valueAccessor,n=t===void 0?Hve:t,r=w_(e,kve),a=r.data,i=r.dataKey,s=r.clockWise,o=r.id,c=r.textBreakAll,u=w_(r,Rve);return!a||!a.length?null:P.createElement(Ne,{className:"recharts-label-list"},a.map(function(d,f){var h=ye(i)?n(d,f):At(d&&d.payload,i),p=ye(o)?{}:{id:"".concat(o,"-").concat(f)};return P.createElement(Gt,gg({},ie(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:c,viewBox:Gt.parseViewBox(ye(s)?d:S_(S_({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}fa.displayName="LabelList";function qve(e,t){return e?e===!0?P.createElement(fa,{key:"labelList-implicit",data:t}):P.isValidElement(e)||pe(e)?P.createElement(fa,{key:"labelList-implicit",data:t,content:e}):eu(e)?P.createElement(fa,gg({data:t},e,{key:"labelList-implicit"})):null:null}function Kve(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,a=er(r,fa).map(function(s,o){return j.cloneElement(s,{data:t,key:"labelList-".concat(o)})});if(!n)return a;var i=qve(e.label,t);return[i].concat(Dve(a))}fa.renderCallByParent=Kve;function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function G1(){return G1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G1.apply(this,arguments)}function j_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function A_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j_(Object(n),!0).forEach(function(r){Gve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gve(e,t,n){return t=Yve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yve(e){var t=Wve(e,"string");return gf(t)=="symbol"?t:t+""}function Wve(e,t){if(gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xve=function(t,n){var r=gn(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},ap=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,s=t.sign,o=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(o?1:-1)+a,f=Math.asin(c/d)/mg,h=u?i:i+s*f,p=nt(n,r,d,h),g=nt(n,r,a,h),m=u?i-s*f:i,v=nt(n,r,d*Math.cos(f*mg),m);return{center:p,circleTangency:g,lineTangency:v,theta:f}},A6=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.startAngle,o=t.endAngle,c=Xve(s,o),u=s+c,d=nt(n,r,i,s),f=nt(n,r,i,u),h="M ".concat(d.x,",").concat(d.y,`
    A `).concat(i,",").concat(i,`,0,
    `).concat(+(Math.abs(c)>180),",").concat(+(s>u),`,
    `).concat(f.x,",").concat(f.y,`
  `);if(a>0){var p=nt(n,r,a,s),g=nt(n,r,a,u);h+="L ".concat(g.x,",").concat(g.y,`
            A `).concat(a,",").concat(a,`,0,
            `).concat(+(Math.abs(c)>180),",").concat(+(s<=u),`,
            `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},Qve=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.cornerRadius,o=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=gn(d-u),h=ap({cx:n,cy:r,radius:i,angle:u,sign:f,cornerRadius:s,cornerIsExternal:c}),p=h.circleTangency,g=h.lineTangency,m=h.theta,v=ap({cx:n,cy:r,radius:i,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:c}),y=v.circleTangency,x=v.lineTangency,b=v.theta,w=c?Math.abs(u-d):Math.abs(u-d)-m-b;if(w<0)return o?"M ".concat(g.x,",").concat(g.y,`
        a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
        a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
      `):A6({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d});var S="M ".concat(g.x,",").concat(g.y,`
    A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,`
    A`).concat(i,",").concat(i,",0,").concat(+(w>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,`
    A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
  `);if(a>0){var A=ap({cx:n,cy:r,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),O=A.circleTangency,N=A.lineTangency,E=A.theta,T=ap({cx:n,cy:r,radius:a,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),_=T.circleTangency,C=T.lineTangency,$=T.theta,R=c?Math.abs(u-d):Math.abs(u-d)-E-$;if(R<0&&s===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(C.x,",").concat(C.y,`
      A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
      A`).concat(a,",").concat(a,",0,").concat(+(R>180),",").concat(+(f>0),",").concat(O.x,",").concat(O.y,`
      A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(N.x,",").concat(N.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},Zve={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},O6=function(t){var n=A_(A_({},Zve),t),r=n.cx,a=n.cy,i=n.innerRadius,s=n.outerRadius,o=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,h=n.className;if(s<i||d===f)return null;var p=be("recharts-sector",h),g=s-i,m=yn(o,g,0,!0),v;return m>0&&Math.abs(d-f)<360?v=Qve({cx:r,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(m,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):v=A6({cx:r,cy:a,innerRadius:i,outerRadius:s,startAngle:d,endAngle:f}),P.createElement("path",G1({},ie(n,!0),{className:p,d:v,role:"img"}))};function yf(e){"@babel/helpers - typeof";return yf=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},yf(e)}function Y1(){return Y1=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},Y1.apply(this,arguments)}function O_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function N_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O_(Object(n),!0).forEach(function(r){Jve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jve(e,t,n){return t=exe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function exe(e){var t=txe(e,"string");return yf(t)=="symbol"?t:t+""}function txe(e,t){if(yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E_={curveBasisClosed:Jre,curveBasisOpen:eae,curveBasis:Zre,curveBumpX:Ire,curveBumpY:zre,curveLinearClosed:tae,curveLinear:qy,curveMonotoneX:nae,curveMonotoneY:rae,curveNatural:aae,curveStep:iae,curveStepAfter:oae,curveStepBefore:sae},ip=function(t){return t.x===+t.x&&t.y===+t.y},Mu=function(t){return t.x},ku=function(t){return t.y},nxe=function(t,n){if(pe(t))return t;var r="curve".concat(Vy(t));return(r==="curveMonotone"||r==="curveBump")&&n?E_["".concat(r).concat(n==="vertical"?"Y":"X")]:E_[r]||qy},rxe=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,s=t.baseLine,o=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=nxe(r,o),f=u?i.filter(function(m){return ip(m)}):i,h;if(Array.isArray(s)){var p=u?s.filter(function(m){return ip(m)}):s,g=f.map(function(m,v){return N_(N_({},m),{},{base:p[v]})});return o==="vertical"?h=Yh().y(ku).x1(Mu).x0(function(m){return m.base.x}):h=Yh().x(Mu).y1(ku).y0(function(m){return m.base.y}),h.defined(ip).curve(d),h(g)}return o==="vertical"&&Y(s)?h=Yh().y(ku).x1(Mu).x0(s):Y(s)?h=Yh().x(Mu).y1(ku).y0(s):h=b4().x(Mu).y(ku),h.defined(ip).curve(d),h(f)},io=function(t){var n=t.className,r=t.points,a=t.path,i=t.pathRef;if((!r||!r.length)&&!a)return null;var s=r&&r.length?rxe(t):a;return j.createElement("path",Y1({},ie(t,!1),zm(t),{className:be("recharts-curve",n),d:s,ref:i}))},N6={exports:{}},axe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ixe=axe,sxe=ixe;function E6(){}function T6(){}T6.resetWarningCache=E6;var oxe=function(){function e(r,a,i,s,o,c){if(c!==sxe){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:T6,resetWarningCache:E6};return n.PropTypes=n,n};N6.exports=oxe();var lxe=N6.exports;const ze=Fe(lxe),{getOwnPropertyNames:cxe,getOwnPropertySymbols:uxe}=Object,{hasOwnProperty:dxe}=Object.prototype;function tb(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function sp(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);const{cache:i}=a,s=i.get(n),o=i.get(r);if(s&&o)return s===r&&o===n;i.set(n,r),i.set(r,n);const c=e(n,r,a);return i.delete(n),i.delete(r),c}}function fxe(e){return e!=null?e[Symbol.toStringTag]:void 0}function T_(e){return cxe(e).concat(uxe(e))}const hxe=Object.hasOwn||((e,t)=>dxe.call(e,t));function Ro(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const pxe="__v",mxe="__o",gxe="_owner",{getOwnPropertyDescriptor:C_,keys:__}=Object;function yxe(e,t){return e.byteLength===t.byteLength&&yg(new Uint8Array(e),new Uint8Array(t))}function vxe(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 xxe(e,t){return e.byteLength===t.byteLength&&yg(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function bxe(e,t){return Ro(e.getTime(),t.getTime())}function Sxe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function wxe(e,t){return e===t}function P_(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.entries();let s,o,c=0;for(;(s=i.next())&&!s.done;){const u=t.entries();let d=!1,f=0;for(;(o=u.next())&&!o.done;){if(a[f]){f++;continue}const h=s.value,p=o.value;if(n.equals(h[0],p[0],c,f,e,t,n)&&n.equals(h[1],p[1],h[0],p[0],e,t,n)){d=a[f]=!0;break}f++}if(!d)return!1;c++}return!0}const jxe=Ro;function Axe(e,t,n){const r=__(e);let a=r.length;if(__(t).length!==a)return!1;for(;a-- >0;)if(!C6(e,t,n,r[a]))return!1;return!0}function Ru(e,t,n){const r=T_(e);let a=r.length;if(T_(t).length!==a)return!1;let i,s,o;for(;a-- >0;)if(i=r[a],!C6(e,t,n,i)||(s=C_(e,i),o=C_(t,i),(s||o)&&(!s||!o||s.configurable!==o.configurable||s.enumerable!==o.enumerable||s.writable!==o.writable)))return!1;return!0}function Oxe(e,t){return Ro(e.valueOf(),t.valueOf())}function Nxe(e,t){return e.source===t.source&&e.flags===t.flags}function M_(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.values();let s,o;for(;(s=i.next())&&!s.done;){const c=t.values();let u=!1,d=0;for(;(o=c.next())&&!o.done;){if(!a[d]&&n.equals(s.value,o.value,s.value,o.value,e,t,n)){u=a[d]=!0;break}d++}if(!u)return!1}return!0}function yg(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 Exe(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 C6(e,t,n,r){return(r===gxe||r===mxe||r===pxe)&&(e.$$typeof||t.$$typeof)?!0:hxe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Txe="[object ArrayBuffer]",Cxe="[object Arguments]",_xe="[object Boolean]",Pxe="[object DataView]",Mxe="[object Date]",kxe="[object Error]",Rxe="[object Map]",Dxe="[object Number]",$xe="[object Object]",Lxe="[object RegExp]",Ixe="[object Set]",zxe="[object String]",Bxe={"[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},Uxe="[object URL]",Fxe=Object.prototype.toString;function Vxe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:c,arePrimitiveWrappersEqual:u,areRegExpsEqual:d,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:g}){return function(v,y,x){if(v===y)return!0;if(v==null||y==null)return!1;const b=typeof v;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(v,y,x):b==="function"?i(v,y,x):!1;const w=v.constructor;if(w!==y.constructor)return!1;if(w===Object)return c(v,y,x);if(Array.isArray(v))return t(v,y,x);if(w===Date)return r(v,y,x);if(w===RegExp)return d(v,y,x);if(w===Map)return s(v,y,x);if(w===Set)return f(v,y,x);const S=Fxe.call(v);if(S===Mxe)return r(v,y,x);if(S===Lxe)return d(v,y,x);if(S===Rxe)return s(v,y,x);if(S===Ixe)return f(v,y,x);if(S===$xe)return typeof v.then!="function"&&typeof y.then!="function"&&c(v,y,x);if(S===Uxe)return p(v,y,x);if(S===kxe)return a(v,y,x);if(S===Cxe)return c(v,y,x);if(Bxe[S])return h(v,y,x);if(S===Txe)return e(v,y,x);if(S===Pxe)return n(v,y,x);if(S===_xe||S===Dxe||S===zxe)return u(v,y,x);if(g){let A=g[S];if(!A){const O=fxe(v);O&&(A=g[O])}if(A)return A(v,y,x)}return!1}}function Hxe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:yxe,areArraysEqual:n?Ru:vxe,areDataViewsEqual:xxe,areDatesEqual:bxe,areErrorsEqual:Sxe,areFunctionsEqual:wxe,areMapsEqual:n?tb(P_,Ru):P_,areNumbersEqual:jxe,areObjectsEqual:n?Ru:Axe,arePrimitiveWrappersEqual:Oxe,areRegExpsEqual:Nxe,areSetsEqual:n?tb(M_,Ru):M_,areTypedArraysEqual:n?tb(yg,Ru):yg,areUrlsEqual:Exe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=sp(r.areArraysEqual),i=sp(r.areMapsEqual),s=sp(r.areObjectsEqual),o=sp(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:o})}return r}function qxe(e){return function(t,n,r,a,i,s,o){return e(t,n,o)}}function Kxe({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(o,c){const{cache:u=e?new WeakMap:void 0,meta:d}=n();return t(o,c,{cache:u,equals:r,meta:d,strict:a})};if(e)return function(o,c){return t(o,c,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const i={cache:void 0,equals:r,meta:void 0,strict:a};return function(o,c){return t(o,c,i)}}const Gxe=ps();ps({strict:!0});ps({circular:!0});ps({circular:!0,strict:!0});ps({createInternalComparator:()=>Ro});ps({strict:!0,createInternalComparator:()=>Ro});ps({circular:!0,createInternalComparator:()=>Ro});ps({circular:!0,createInternalComparator:()=>Ro,strict:!0});function ps(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,i=Hxe(e),s=Vxe(i),o=n?n(s):qxe(s);return Kxe({circular:t,comparator:s,createState:r,equals:o,strict:a})}function Yxe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function k_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):Yxe(a)};requestAnimationFrame(r)}function W1(e){"@babel/helpers - typeof";return W1=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},W1(e)}function Wxe(e){return Jxe(e)||Zxe(e)||Qxe(e)||Xxe()}function Xxe(){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 Qxe(e,t){if(e){if(typeof e=="string")return R_(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 R_(e,t)}}function R_(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 Zxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jxe(e){if(Array.isArray(e))return e}function ebe(){var e={},t=function(){return null},n=!1,r=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var s=i,o=Wxe(s),c=o[0],u=o.slice(1);if(typeof c=="number"){k_(a.bind(null,u),c);return}a(c),k_(a.bind(null,u));return}W1(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function vf(e){"@babel/helpers - typeof";return vf=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},vf(e)}function D_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D_(Object(n),!0).forEach(function(r){_6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _6(e,t,n){return t=tbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tbe(e){var t=nbe(e,"string");return vf(t)==="symbol"?t:String(t)}function nbe(e,t){if(vf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rbe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},abe=function(t){return t},ibe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},xd=function(t,n){return Object.keys(n).reduce(function(r,a){return $_($_({},r),{},_6({},a,t(a,n[a])))},{})},L_=function(t,n,r){return t.map(function(a){return"".concat(ibe(a)," ").concat(n,"ms ").concat(r)}).join(",")};function sbe(e,t){return cbe(e)||lbe(e,t)||P6(e,t)||obe()}function obe(){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 lbe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function cbe(e){if(Array.isArray(e))return e}function ube(e){return hbe(e)||fbe(e)||P6(e)||dbe()}function dbe(){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 P6(e,t){if(e){if(typeof e=="string")return X1(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 X1(e,t)}}function fbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hbe(e){if(Array.isArray(e))return X1(e)}function X1(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 vg=1e-4,M6=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},k6=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},I_=function(t,n){return function(r){var a=M6(t,n);return k6(a,r)}},pbe=function(t,n){return function(r){var a=M6(t,n),i=[].concat(ube(a.map(function(s,o){return s*o}).slice(1)),[0]);return k6(i,r)}},z_=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],i=n[1],s=n[2],o=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,s=1,o=1;break;case"ease":a=.25,i=.1,s=.25,o=1;break;case"ease-in":a=.42,i=0,s=1,o=1;break;case"ease-out":a=.42,i=0,s=.58,o=1;break;case"ease-in-out":a=0,i=0,s=.58,o=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=sbe(u,4);a=d[0],i=d[1],s=d[2],o=d[3]}}}var f=I_(a,s),h=I_(i,o),p=pbe(a,s),g=function(y){return y>1?1:y<0?0:y},m=function(y){for(var x=y>1?1:y,b=x,w=0;w<8;++w){var S=f(b)-x,A=p(b);if(Math.abs(S-x)<vg||A<vg)return h(b);b=g(b-S/A)}return h(b)};return m.isStepper=!1,m},mbe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,s=t.dt,o=s===void 0?17:s,c=function(d,f,h){var p=-(d-f)*r,g=h*i,m=h+(p-g)*o/1e3,v=h*o/1e3+d;return Math.abs(v-f)<vg&&Math.abs(m)<vg?[f,0]:[v,m]};return c.isStepper=!0,c.dt=o,c},gbe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return z_(a);case"spring":return mbe();default:if(a.split("(")[0]==="cubic-bezier")return z_(a)}return typeof a=="function"?a:null};function xf(e){"@babel/helpers - typeof";return xf=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},xf(e)}function B_(e){return xbe(e)||vbe(e)||R6(e)||ybe()}function ybe(){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 vbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xbe(e){if(Array.isArray(e))return Z1(e)}function U_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U_(Object(n),!0).forEach(function(r){Q1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q1(e,t,n){return t=bbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bbe(e){var t=Sbe(e,"string");return xf(t)==="symbol"?t:String(t)}function Sbe(e,t){if(xf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wbe(e,t){return Obe(e)||Abe(e,t)||R6(e,t)||jbe()}function jbe(){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 R6(e,t){if(e){if(typeof e=="string")return Z1(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 Z1(e,t)}}function Z1(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 Abe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function Obe(e){if(Array.isArray(e))return e}var xg=function(t,n,r){return t+(n-t)*r},J1=function(t){var n=t.from,r=t.to;return n!==r},Nbe=function e(t,n,r){var a=xd(function(i,s){if(J1(s)){var o=t(s.from,s.to,s.velocity),c=wbe(o,2),u=c[0],d=c[1];return Zt(Zt({},s),{},{from:u,velocity:d})}return s},n);return r<1?xd(function(i,s){return J1(s)?Zt(Zt({},s),{},{velocity:xg(s.velocity,a[i].velocity,r),from:xg(s.from,a[i].from,r)}):s},n):e(t,a,r-1)};const Ebe=function(e,t,n,r,a){var i=rbe(e,t),s=i.reduce(function(v,y){return Zt(Zt({},v),{},Q1({},y,[e[y],t[y]]))},{}),o=i.reduce(function(v,y){return Zt(Zt({},v),{},Q1({},y,{from:e[y],velocity:0,to:t[y]}))},{}),c=-1,u,d,f=function(){return null},h=function(){return xd(function(y,x){return x.from},o)},p=function(){return!Object.values(o).filter(J1).length},g=function(y){u||(u=y);var x=y-u,b=x/n.dt;o=Nbe(n,o,b),a(Zt(Zt(Zt({},e),t),h())),u=y,p()||(c=requestAnimationFrame(f))},m=function(y){d||(d=y);var x=(y-d)/r,b=xd(function(S,A){return xg.apply(void 0,B_(A).concat([n(x)]))},s);if(a(Zt(Zt(Zt({},e),t),b)),x<1)c=requestAnimationFrame(f);else{var w=xd(function(S,A){return xg.apply(void 0,B_(A).concat([n(1)]))},s);a(Zt(Zt(Zt({},e),t),w))}};return f=n.isStepper?g:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}};function bc(e){"@babel/helpers - typeof";return bc=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},bc(e)}var Tbe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Cbe(e,t){if(e==null)return{};var n=_be(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _be(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function nb(e){return Rbe(e)||kbe(e)||Mbe(e)||Pbe()}function Pbe(){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 Mbe(e,t){if(e){if(typeof e=="string")return eS(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 eS(e,t)}}function kbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rbe(e){if(Array.isArray(e))return eS(e)}function eS(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 F_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F_(Object(n),!0).forEach(function(r){Ku(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ku(e,t,n){return t=D6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $be(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,D6(r.key),r)}}function Lbe(e,t,n){return t&&$be(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function D6(e){var t=Ibe(e,"string");return bc(t)==="symbol"?t:String(t)}function Ibe(e,t){if(bc(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bc(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tS(e,t)}function tS(e,t){return tS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},tS(e,t)}function Bbe(e){var t=Ube();return function(){var r=bg(e),a;if(t){var i=bg(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return nS(this,a)}}function nS(e,t){if(t&&(bc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rS(e)}function rS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ube(){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 bg(e){return bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bg(e)}var Vr=function(e){zbe(n,e);var t=Bbe(n);function n(r,a){var i;Dbe(this,n),i=t.call(this,r,a);var s=i.props,o=s.isActive,c=s.attributeName,u=s.from,d=s.to,f=s.steps,h=s.children,p=s.duration;if(i.handleStyleChange=i.handleStyleChange.bind(rS(i)),i.changeStyle=i.changeStyle.bind(rS(i)),!o||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:d}),nS(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof h=="function")return i.state={style:u},nS(i);i.state={style:c?Ku({},c,u):u}}else i.state={style:{}};return i}return Lbe(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,s=a.canBegin;this.mounted=!0,!(!i||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,s=i.isActive,o=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,d=i.to,f=i.from,h=this.state.style;if(o){if(!s){var p={style:c?Ku({},c,d):d};this.state&&h&&(c&&h[c]!==d||!c&&h!==d)&&this.setState(p);return}if(!(Gxe(a.to,d)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||u?f:a.to;if(this.state&&h){var v={style:c?Ku({},c,m):m};(c&&h[c]!==m||!c&&h!==m)&&this.setState(v)}this.runAnimation(kr(kr({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,s=a.from,o=a.to,c=a.duration,u=a.easing,d=a.begin,f=a.onAnimationEnd,h=a.onAnimationStart,p=Ebe(s,o,gbe(u),c,this.changeStyle),g=function(){i.stopJSAnimation=p()};this.manager.start([h,d,g,c,f])}},{key:"runStepAnimation",value:function(a){var i=this,s=a.steps,o=a.begin,c=a.onAnimationStart,u=s[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(m,v,y){if(y===0)return m;var x=v.duration,b=v.easing,w=b===void 0?"ease":b,S=v.style,A=v.properties,O=v.onAnimationEnd,N=y>0?s[y-1]:v,E=A||Object.keys(S);if(typeof w=="function"||w==="spring")return[].concat(nb(m),[i.runJSAnimation.bind(i,{from:N.style,to:S,duration:x,easing:w}),x]);var T=L_(E,x,w),_=kr(kr(kr({},N.style),S),{},{transition:T});return[].concat(nb(m),[_,x,O]).filter(abe)};return this.manager.start([c].concat(nb(s.reduce(p,[d,Math.max(h,o)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=ebe());var i=a.begin,s=a.duration,o=a.attributeName,c=a.to,u=a.easing,d=a.onAnimationStart,f=a.onAnimationEnd,h=a.steps,p=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var m=o?Ku({},o,c):c,v=L_(Object.keys(m),s,u);g.start([d,i,kr(kr({},m),{},{transition:v}),s,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var s=a.duration;a.attributeName,a.easing;var o=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=Cbe(a,Tbe),u=j.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!o||u===0||s<=0)return i;var f=function(p){var g=p.props,m=g.style,v=m===void 0?{}:m,y=g.className,x=j.cloneElement(p,kr(kr({},c),{},{style:kr(kr({},v),d),className:y}));return x};return u===1?f(j.Children.only(i)):P.createElement("div",null,j.Children.map(i,function(h){return f(h)}))}}]),n}(j.PureComponent);Vr.displayName="Animate";Vr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Vr.propTypes={from:ze.oneOfType([ze.object,ze.string]),to:ze.oneOfType([ze.object,ze.string]),attributeName:ze.string,duration:ze.number,begin:ze.number,easing:ze.oneOfType([ze.string,ze.func]),steps:ze.arrayOf(ze.shape({duration:ze.number.isRequired,style:ze.object.isRequired,easing:ze.oneOfType([ze.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ze.func]),properties:ze.arrayOf("string"),onAnimationEnd:ze.func})),children:ze.oneOfType([ze.node,ze.func]),isActive:ze.bool,canBegin:ze.bool,onAnimationEnd:ze.func,shouldReAnimate:ze.bool,onAnimationStart:ze.func,onAnimationReStart:ze.func};function bf(e){"@babel/helpers - typeof";return bf=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},bf(e)}function Sg(){return Sg=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},Sg.apply(this,arguments)}function Fbe(e,t){return Kbe(e)||qbe(e,t)||Hbe(e,t)||Vbe()}function Vbe(){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 Hbe(e,t){if(e){if(typeof e=="string")return V_(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 V_(e,t)}}function V_(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 qbe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function Kbe(e){if(Array.isArray(e))return e}function H_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function q_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H_(Object(n),!0).forEach(function(r){Gbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gbe(e,t,n){return t=Ybe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ybe(e){var t=Wbe(e,"string");return bf(t)=="symbol"?t:t+""}function Wbe(e,t){if(bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var K_=function(t,n,r,a,i){var s=Math.min(Math.abs(r)/2,Math.abs(a)/2),o=a>=0?1:-1,c=r>=0?1:-1,u=a>=0&&r>=0||a<0&&r<0?1:0,d;if(s>0&&i instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=i[h]>s?s:i[h];d="M".concat(t,",").concat(n+o*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),d+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
        `).concat(t+r,",").concat(n+o*f[1])),d+="L ".concat(t+r,",").concat(n+a-o*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
        `).concat(t+r-c*f[2],",").concat(n+a)),d+="L ".concat(t+c*f[3],",").concat(n+a),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
        `).concat(t,",").concat(n+a-o*f[3])),d+="Z"}else if(s>0&&i===+i&&i>0){var g=Math.min(s,i);d="M ".concat(t,",").concat(n+o*g,`
            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+c*g,",").concat(n,`
            L `).concat(t+r-c*g,",").concat(n,`
            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r,",").concat(n+o*g,`
            L `).concat(t+r,",").concat(n+a-o*g,`
            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r-c*g,",").concat(n+a,`
            L `).concat(t+c*g,",").concat(n+a,`
            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(n+a-o*g," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return d},Xbe=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,s=n.y,o=n.width,c=n.height;if(Math.abs(o)>0&&Math.abs(c)>0){var u=Math.min(i,i+o),d=Math.max(i,i+o),f=Math.min(s,s+c),h=Math.max(s,s+c);return r>=u&&r<=d&&a>=f&&a<=h}return!1},Qbe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},U2=function(t){var n=q_(q_({},Qbe),t),r=j.useRef(),a=j.useState(-1),i=Fbe(a,2),s=i[0],o=i[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&o(w)}catch{}},[]);var c=n.x,u=n.y,d=n.width,f=n.height,h=n.radius,p=n.className,g=n.animationEasing,m=n.animationDuration,v=n.animationBegin,y=n.isAnimationActive,x=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var b=be("recharts-rectangle",p);return x?P.createElement(Vr,{canBegin:s>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:m,animationEasing:g,isActive:x},function(w){var S=w.width,A=w.height,O=w.x,N=w.y;return P.createElement(Vr,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:y,easing:g},P.createElement("path",Sg({},ie(n,!0),{className:b,d:K_(O,N,S,A,h),ref:r})))}):P.createElement("path",Sg({},ie(n,!0),{className:b,d:K_(c,u,d,f,h)}))},Zbe=["points","className","baseLinePoints","connectNulls"];function vl(){return vl=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},vl.apply(this,arguments)}function Jbe(e,t){if(e==null)return{};var n=e0e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function e0e(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 G_(e){return a0e(e)||r0e(e)||n0e(e)||t0e()}function t0e(){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 n0e(e,t){if(e){if(typeof e=="string")return aS(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 aS(e,t)}}function r0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a0e(e){if(Array.isArray(e))return aS(e)}function aS(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 Y_=function(t){return t&&t.x===+t.x&&t.y===+t.y},i0e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Y_(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Y_(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},bd=function(t,n){var r=i0e(t);n&&(r=[r.reduce(function(i,s){return[].concat(G_(i),G_(s))},[])]);var a=r.map(function(i){return i.reduce(function(s,o,c){return"".concat(s).concat(c===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},s0e=function(t,n,r){var a=bd(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(bd(n.reverse(),r).slice(1))},o0e=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,i=t.connectNulls,s=Jbe(t,Zbe);if(!n||!n.length)return null;var o=be("recharts-polygon",r);if(a&&a.length){var c=s.stroke&&s.stroke!=="none",u=s0e(n,a,i);return P.createElement("g",{className:o},P.createElement("path",vl({},ie(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),c?P.createElement("path",vl({},ie(s,!0),{fill:"none",d:bd(n,i)})):null,c?P.createElement("path",vl({},ie(s,!0),{fill:"none",d:bd(a,i)})):null)}var d=bd(n,i);return P.createElement("path",vl({},ie(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:o,d}))};function iS(){return iS=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},iS.apply(this,arguments)}var yh=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,s=be("recharts-dot",i);return n===+n&&r===+r&&a===+a?j.createElement("circle",iS({},ie(t,!1),zm(t),{className:s,cx:n,cy:r,r:a})):null};function Sf(e){"@babel/helpers - typeof";return Sf=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},Sf(e)}var l0e=["x","y","top","left","width","height","className"];function sS(){return sS=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},sS.apply(this,arguments)}function W_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function c0e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W_(Object(n),!0).forEach(function(r){u0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u0e(e,t,n){return t=d0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d0e(e){var t=f0e(e,"string");return Sf(t)=="symbol"?t:t+""}function f0e(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h0e(e,t){if(e==null)return{};var n=p0e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function p0e(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 m0e=function(t,n,r,a,i,s){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(s,",").concat(n,"h").concat(r)},g0e=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,s=t.top,o=s===void 0?0:s,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,m=h0e(t,l0e),v=c0e({x:r,y:i,top:o,left:u,width:f,height:p},m);return!Y(r)||!Y(i)||!Y(f)||!Y(p)||!Y(o)||!Y(u)?null:P.createElement("path",sS({},ie(v,!0),{className:be("recharts-cross",g),d:m0e(r,i,f,p,o,u)}))},y0e=rv,v0e=GL,x0e=xa;function b0e(e,t){return e&&e.length?y0e(e,x0e(t),v0e):void 0}var S0e=b0e;const w0e=Fe(S0e);var j0e=rv,A0e=xa,O0e=YL;function N0e(e,t){return e&&e.length?j0e(e,A0e(t),O0e):void 0}var E0e=N0e;const T0e=Fe(E0e);var C0e=["cx","cy","angle","ticks","axisLine"],_0e=["ticks","tick","angle","tickFormatter","stroke"];function Sc(e){"@babel/helpers - typeof";return Sc=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},Sc(e)}function Sd(){return Sd=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},Sd.apply(this,arguments)}function X_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X_(Object(n),!0).forEach(function(r){ov(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q_(e,t){if(e==null)return{};var n=P0e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P0e(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 M0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z_(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,L6(r.key),r)}}function k0e(e,t,n){return t&&Z_(e.prototype,t),n&&Z_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function R0e(e,t,n){return t=wg(t),D0e(e,$6()?Reflect.construct(t,n||[],wg(e).constructor):t.apply(e,n))}function D0e(e,t){if(t&&(Sc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $0e(e)}function $0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($6=function(){return!!e})()}function wg(e){return wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wg(e)}function L0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oS(e,t)}function oS(e,t){return oS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},oS(e,t)}function ov(e,t,n){return t=L6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L6(e){var t=I0e(e,"string");return Sc(t)=="symbol"?t:t+""}function I0e(e,t){if(Sc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lv=function(e){function t(){return M0e(this,t),R0e(this,t,arguments)}return L0e(t,e),k0e(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,i=this.props,s=i.angle,o=i.cx,c=i.cy;return nt(o,c,a,s)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,a;switch(r){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var r=this.props,a=r.cx,i=r.cy,s=r.angle,o=r.ticks,c=w0e(o,function(d){return d.coordinate||0}),u=T0e(o,function(d){return d.coordinate||0});return{cx:a,cy:i,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,s=r.angle,o=r.ticks,c=r.axisLine,u=Q_(r,C0e),d=o.reduce(function(g,m){return[Math.min(g[0],m.coordinate),Math.max(g[1],m.coordinate)]},[1/0,-1/0]),f=nt(a,i,d[0],s),h=nt(a,i,d[1],s),p=bs(bs(bs({},ie(u,!1)),{},{fill:"none"},ie(c,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return P.createElement("line",Sd({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,s=a.tick,o=a.angle,c=a.tickFormatter,u=a.stroke,d=Q_(a,_0e),f=this.getTickTextAnchor(),h=ie(d,!1),p=ie(s,!1),g=i.map(function(m,v){var y=r.getTickValueCoord(m),x=bs(bs(bs(bs({textAnchor:f,transform:"rotate(".concat(90-o,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:u},p),{},{index:v},y),{},{payload:m});return P.createElement(Ne,Sd({className:be("recharts-polar-radius-axis-tick",w6(s)),key:"tick-".concat(m.coordinate)},yo(r.props,m,v)),t.renderTickItem(s,x,c?c(m.value,v):m.value))});return P.createElement(Ne,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.axisLine,s=r.tick;return!a||!a.length?null:P.createElement(Ne,{className:be("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),s&&this.renderTicks(),Gt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,i){var s;return P.isValidElement(r)?s=P.cloneElement(r,a):pe(r)?s=r(a):s=P.createElement(vo,Sd({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),s}}])}(j.PureComponent);ov(lv,"displayName","PolarRadiusAxis");ov(lv,"axisType","radiusAxis");ov(lv,"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 wc(e){"@babel/helpers - typeof";return wc=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},wc(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 J_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ss(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J_(Object(n),!0).forEach(function(r){cv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eP(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 B0e(e,t,n){return t&&eP(e.prototype,t),n&&eP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function U0e(e,t,n){return t=jg(t),F0e(e,I6()?Reflect.construct(t,n||[],jg(e).constructor):t.apply(e,n))}function F0e(e,t){if(t&&(wc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V0e(e)}function V0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I6=function(){return!!e})()}function jg(e){return jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jg(e)}function H0e(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&&lS(e,t)}function lS(e,t){return lS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},lS(e,t)}function cv(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=q0e(e,"string");return wc(t)=="symbol"?t:t+""}function q0e(e,t){if(wc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var K0e=Math.PI/180,tP=1e-5,uv=function(e){function t(){return z0e(this,t),U0e(this,t,arguments)}return H0e(t,e),B0e(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.cx,s=a.cy,o=a.radius,c=a.orientation,u=a.tickSize,d=u||8,f=nt(i,s,o,r.coordinate),h=nt(i,s,o+(c==="inner"?-1:1)*d,r.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,i=Math.cos(-r.coordinate*K0e),s;return i>tP?s=a==="outer"?"start":"end":i<-tP?s=a==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,s=r.radius,o=r.axisLine,c=r.axisLineType,u=Ss(Ss({},ie(this.props,!1)),{},{fill:"none"},ie(o,!1));if(c==="circle")return P.createElement(yh,Ps({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:s}));var d=this.props.ticks,f=d.map(function(h){return nt(a,i,s,h.coordinate)});return P.createElement(o0e,Ps({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,s=a.tick,o=a.tickLine,c=a.tickFormatter,u=a.stroke,d=ie(this.props,!1),f=ie(s,!1),h=Ss(Ss({},d),{},{fill:"none"},ie(o,!1)),p=i.map(function(g,m){var v=r.getTickLineCoord(g),y=r.getTickTextAnchor(g),x=Ss(Ss(Ss({textAnchor:y},d),{},{stroke:"none",fill:u},f),{},{index:m,payload:g,x:v.x2,y:v.y2});return P.createElement(Ne,Ps({className:be("recharts-polar-angle-axis-tick",w6(s)),key:"tick-".concat(g.coordinate)},yo(r.props,g,m)),o&&P.createElement("line",Ps({className:"recharts-polar-angle-axis-tick-line"},h,v)),s&&t.renderTickItem(s,x,c?c(g.value,m):g.value))});return P.createElement(Ne,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.radius,s=r.axisLine;return i<=0||!a||!a.length?null:P.createElement(Ne,{className:be("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,i){var s;return P.isValidElement(r)?s=P.cloneElement(r,a):pe(r)?s=r(a):s=P.createElement(vo,Ps({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),s}}])}(j.PureComponent);cv(uv,"displayName","PolarAngleAxis");cv(uv,"axisType","angleAxis");cv(uv,"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 G0e=H4,Y0e=G0e(Object.getPrototypeOf,Object),W0e=Y0e,X0e=ui,Q0e=W0e,Z0e=di,J0e="[object Object]",e1e=Function.prototype,t1e=Object.prototype,B6=e1e.toString,n1e=t1e.hasOwnProperty,r1e=B6.call(Object);function a1e(e){if(!Z0e(e)||X0e(e)!=J0e)return!1;var t=Q0e(e);if(t===null)return!0;var n=n1e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&B6.call(n)==r1e}var i1e=a1e;const s1e=Fe(i1e);var o1e=ui,l1e=di,c1e="[object Boolean]";function u1e(e){return e===!0||e===!1||l1e(e)&&o1e(e)==c1e}var d1e=u1e;const f1e=Fe(d1e);function wf(e){"@babel/helpers - typeof";return wf=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},wf(e)}function Ag(){return Ag=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},Ag.apply(this,arguments)}function h1e(e,t){return y1e(e)||g1e(e,t)||m1e(e,t)||p1e()}function p1e(){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 m1e(e,t){if(e){if(typeof e=="string")return nP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nP(e,t)}}function nP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function y1e(e){if(Array.isArray(e))return e}function rP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rP(Object(n),!0).forEach(function(r){v1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function v1e(e,t,n){return t=x1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x1e(e){var t=b1e(e,"string");return wf(t)=="symbol"?t:t+""}function b1e(e,t){if(wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iP=function(t,n,r,a,i){var s=r-a,o;return o="M ".concat(t,",").concat(n),o+="L ".concat(t+r,",").concat(n),o+="L ".concat(t+r-s/2,",").concat(n+i),o+="L ".concat(t+r-s/2-a,",").concat(n+i),o+="L ".concat(t,",").concat(n," Z"),o},S1e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},w1e=function(t){var n=aP(aP({},S1e),t),r=j.useRef(),a=j.useState(-1),i=h1e(a,2),s=i[0],o=i[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&o(b)}catch{}},[]);var c=n.x,u=n.y,d=n.upperWidth,f=n.lowerWidth,h=n.height,p=n.className,g=n.animationEasing,m=n.animationDuration,v=n.animationBegin,y=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var x=be("recharts-trapezoid",p);return y?P.createElement(Vr,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:c,y:u},duration:m,animationEasing:g,isActive:y},function(b){var w=b.upperWidth,S=b.lowerWidth,A=b.height,O=b.x,N=b.y;return P.createElement(Vr,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:g},P.createElement("path",Ag({},ie(n,!0),{className:x,d:iP(O,N,w,S,A),ref:r})))}):P.createElement("g",null,P.createElement("path",Ag({},ie(n,!0),{className:x,d:iP(c,u,d,f,h)})))},j1e=["option","shapeType","propTransformer","activeClassName","isActive"];function jf(e){"@babel/helpers - typeof";return jf=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},jf(e)}function A1e(e,t){if(e==null)return{};var n=O1e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function O1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Og(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sP(Object(n),!0).forEach(function(r){N1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N1e(e,t,n){return t=E1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E1e(e){var t=T1e(e,"string");return jf(t)=="symbol"?t:t+""}function T1e(e,t){if(jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C1e(e,t){return Og(Og({},t),e)}function _1e(e,t){return e==="symbols"}function oP(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return P.createElement(U2,n);case"trapezoid":return P.createElement(w1e,n);case"sector":return P.createElement(O6,n);case"symbols":if(_1e(t))return P.createElement(s2,n);break;default:return null}}function P1e(e){return j.isValidElement(e)?e.props:e}function U6(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?C1e:r,i=e.activeClassName,s=i===void 0?"recharts-active-shape":i,o=e.isActive,c=A1e(e,j1e),u;if(j.isValidElement(t))u=j.cloneElement(t,Og(Og({},c),P1e(t)));else if(pe(t))u=t(c);else if(s1e(t)&&!f1e(t)){var d=a(t,c);u=P.createElement(oP,{shapeType:n,elementProps:d})}else{var f=c;u=P.createElement(oP,{shapeType:n,elementProps:f})}return o?P.createElement(Ne,{className:s},u):u}function dv(e,t){return t!=null&&"trapezoids"in e.props}function fv(e,t){return t!=null&&"sectors"in e.props}function Af(e,t){return t!=null&&"points"in e.props}function M1e(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&i}function k1e(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function R1e(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function D1e(e,t){var n;return dv(e,t)?n=M1e:fv(e,t)?n=k1e:Af(e,t)&&(n=R1e),n}function $1e(e,t){var n;return dv(e,t)?n="trapezoids":fv(e,t)?n="sectors":Af(e,t)&&(n="points"),n}function L1e(e,t){if(dv(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(fv(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 Af(e,t)?t.payload:{}}function I1e(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=$1e(n,t),i=L1e(n,t),s=r.filter(function(c,u){var d=xo(i,c),f=n.props[a].filter(function(g){var m=D1e(n,t);return m(g,t)}),h=n.props[a].indexOf(f[f.length-1]),p=u===h;return d&&p}),o=r.indexOf(s[s.length-1]);return o}var zp;function jc(e){"@babel/helpers - typeof";return jc=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},jc(e)}function xl(){return xl=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},xl.apply(this,arguments)}function lP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lP(Object(n),!0).forEach(function(r){vr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cP(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 B1e(e,t,n){return t&&cP(e.prototype,t),n&&cP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function U1e(e,t,n){return t=Ng(t),F1e(e,F6()?Reflect.construct(t,n||[],Ng(e).constructor):t.apply(e,n))}function F1e(e,t){if(t&&(jc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V1e(e)}function V1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F6=function(){return!!e})()}function Ng(e){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ng(e)}function H1e(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&&cS(e,t)}function cS(e,t){return cS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},cS(e,t)}function vr(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=q1e(e,"string");return jc(t)=="symbol"?t:t+""}function q1e(e,t){if(jc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hi=function(e){function t(n){var r;return z1e(this,t),r=U1e(this,t,[n]),vr(r,"pieRef",null),vr(r,"sectorRefs",[]),vr(r,"id",Po("recharts-pie-")),vr(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pe(a)&&a()}),vr(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pe(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return H1e(t,e),B1e(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{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 a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.label,o=i.labelLine,c=i.dataKey,u=i.valueKey,d=ie(this.props,!1),f=ie(s,!1),h=ie(o,!1),p=s&&s.offsetRadius||20,g=r.map(function(m,v){var y=(m.startAngle+m.endAngle)/2,x=nt(m.cx,m.cy,m.outerRadius+p,y),b=Je(Je(Je(Je({},d),m),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(x.x,m.cx)},x),w=Je(Je(Je(Je({},d),m),{},{fill:"none",stroke:m.fill},h),{},{index:v,points:[nt(m.cx,m.cy,m.outerRadius,y),x]}),S=c;return ye(c)&&ye(u)?S="value":ye(c)&&(S=u),P.createElement(Ne,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(v)},o&&t.renderLabelLineItem(o,w,"line"),t.renderLabelItem(s,b,At(m,S)))});return P.createElement(Ne,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(r){var a=this,i=this.props,s=i.activeShape,o=i.blendStroke,c=i.inactiveShape;return r.map(function(u,d){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var f=a.isActiveIndex(d),h=c&&a.hasActiveIndex()?c:null,p=f?s:h,g=Je(Je({},u),{},{stroke:o?u.fill:u.stroke,tabIndex:-1});return P.createElement(Ne,xl({ref:function(v){v&&!a.sectorRefs.includes(v)&&a.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},yo(a.props,u,d),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(d)}),P.createElement(U6,xl({option:p,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,i=a.sectors,s=a.isAnimationActive,o=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state,h=f.prevSectors,p=f.prevIsAnimationActive;return P.createElement(Vr,{begin:o,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var m=g.t,v=[],y=i&&i[0],x=y.startAngle;return i.forEach(function(b,w){var S=h&&h[w],A=w>0?Jn(b,"paddingAngle",0):0;if(S){var O=$t(S.endAngle-S.startAngle,b.endAngle-b.startAngle),N=Je(Je({},b),{},{startAngle:x+A,endAngle:x+O(m)+A});v.push(N),x=N.endAngle}else{var E=b.endAngle,T=b.startAngle,_=$t(0,E-T),C=_(m),$=Je(Je({},b),{},{startAngle:x+A,endAngle:x+C+A});v.push($),x=$.endAngle}}),P.createElement(Ne,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var s=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"ArrowRight":{var o=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[o].focus(),a.setState({sectorToFocus:o});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,i=r.isAnimationActive,s=this.state.prevSectors;return i&&a&&a.length&&(!s||!xo(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,i=a.hide,s=a.sectors,o=a.className,c=a.label,u=a.cx,d=a.cy,f=a.innerRadius,h=a.outerRadius,p=a.isAnimationActive,g=this.state.isAnimationFinished;if(i||!s||!s.length||!Y(u)||!Y(d)||!Y(f)||!Y(h))return null;var m=be("recharts-pie",o);return P.createElement(Ne,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){r.pieRef=y}},this.renderSectors(),c&&this.renderLabels(s),Gt.renderCallByParent(this.props,null,!1),(!p||g)&&fa.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,a,i){if(P.isValidElement(r))return P.cloneElement(r,a);if(pe(r))return r(a);var s=be("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return P.createElement(io,xl({},a,{key:i,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(r,a,i){if(P.isValidElement(r))return P.cloneElement(r,a);var s=i;if(pe(r)&&(s=r(a),P.isValidElement(s)))return s;var o=be("recharts-pie-label-text",typeof r!="boolean"&&!pe(r)?r.className:"");return P.createElement(vo,xl({},a,{alignmentBaseline:"middle",className:o}),s)}}])}(j.PureComponent);zp=hi;vr(hi,"displayName","Pie");vr(hi,"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:!ds.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});vr(hi,"parseDeltaAngle",function(e,t){var n=gn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});vr(hi,"getRealPieData",function(e){var t=e.data,n=e.children,r=ie(e,!1),a=er(n,Xy);return t&&t.length?t.map(function(i,s){return Je(Je(Je({payload:i},r),i),a&&a[s]&&a[s].props)}):a&&a.length?a.map(function(i){return Je(Je({},r),i.props)}):[]});vr(hi,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,s=S6(a,i),o=r+yn(e.cx,a,a/2),c=n+yn(e.cy,i,i/2),u=yn(e.innerRadius,s,0),d=yn(e.outerRadius,s,s*.8),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:o,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}});vr(hi,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Je(Je({},t.type.defaultProps),t.props):t.props,a=zp.getRealPieData(r);if(!a||!a.length)return null;var i=r.cornerRadius,s=r.startAngle,o=r.endAngle,c=r.paddingAngle,u=r.dataKey,d=r.nameKey,f=r.valueKey,h=r.tooltipType,p=Math.abs(r.minAngle),g=zp.parseCoordinateOfPie(r,n),m=zp.parseDeltaAngle(s,o),v=Math.abs(m),y=u;ye(u)&&ye(f)?(Ur(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y="value"):ye(u)&&(Ur(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y=f);var x=a.filter(function(N){return At(N,y,0)!==0}).length,b=(v>=360?x:x-1)*c,w=v-x*p-b,S=a.reduce(function(N,E){var T=At(E,y,0);return N+(Y(T)?T:0)},0),A;if(S>0){var O;A=a.map(function(N,E){var T=At(N,y,0),_=At(N,d,E),C=(Y(T)?T:0)/S,$;E?$=O.endAngle+gn(m)*c*(T!==0?1:0):$=s;var R=$+gn(m)*((T!==0?p:0)+C*w),k=($+R)/2,M=(g.innerRadius+g.outerRadius)/2,L=[{name:_,value:T,payload:N,dataKey:y,type:h}],z=nt(g.cx,g.cy,M,k);return O=Je(Je(Je({percent:C,cornerRadius:i,name:_,tooltipPayload:L,midAngle:k,middleRadius:M,tooltipPosition:z},N),g),{},{value:At(N,y),startAngle:$,endAngle:R,payload:N,paddingAngle:gn(m)*c}),O})}return Je(Je({},g),{},{sectors:A,data:a})});var K1e=Math.ceil,G1e=Math.max;function Y1e(e,t,n,r){for(var a=-1,i=G1e(K1e((t-e)/(n||1)),0),s=Array(i);i--;)s[r?i:++a]=e,e+=n;return s}var W1e=Y1e,X1e=cL,uP=1/0,Q1e=17976931348623157e292;function Z1e(e){if(!e)return e===0?e:0;if(e=X1e(e),e===uP||e===-uP){var t=e<0?-1:1;return t*Q1e}return e===e?e:0}var H6=Z1e,J1e=W1e,eSe=Wy,rb=H6;function tSe(e){return function(t,n,r){return r&&typeof r!="number"&&eSe(t,n,r)&&(n=r=void 0),t=rb(t),n===void 0?(n=t,t=0):n=rb(n),r=r===void 0?t<n?1:-1:rb(r),J1e(t,n,r,e)}}var nSe=tSe,rSe=nSe,aSe=rSe(),iSe=aSe;const Eg=Fe(iSe);function Of(e){"@babel/helpers - typeof";return Of=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},Of(e)}function dP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(n),!0).forEach(function(r){q6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q6(e,t,n){return t=sSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sSe(e){var t=oSe(e,"string");return Of(t)=="symbol"?t:t+""}function oSe(e,t){if(Of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lSe=["Webkit","Moz","O","ms"],cSe=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=lSe.reduce(function(i,s){return fP(fP({},i),{},q6({},s+r,n))},{});return a[t]=n,a};function Ac(e){"@babel/helpers - typeof";return Ac=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},Ac(e)}function Tg(){return Tg=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},Tg.apply(this,arguments)}function hP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ab(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(n),!0).forEach(function(r){zn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pP(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,G6(r.key),r)}}function dSe(e,t,n){return t&&pP(e.prototype,t),n&&pP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fSe(e,t,n){return t=Cg(t),hSe(e,K6()?Reflect.construct(t,n||[],Cg(e).constructor):t.apply(e,n))}function hSe(e,t){if(t&&(Ac(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pSe(e)}function pSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K6=function(){return!!e})()}function Cg(e){return Cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cg(e)}function mSe(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&&uS(e,t)}function uS(e,t){return uS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},uS(e,t)}function zn(e,t,n){return t=G6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G6(e){var t=gSe(e,"string");return Ac(t)=="symbol"?t:t+""}function gSe(e,t){if(Ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ySe=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,s=t.width,o=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=yd().domain(Eg(0,c)).range([i,i+s-o]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(a),scale:u,scaleValues:d}},mP=function(t){return t.changedTouches&&!!t.changedTouches.length},Oc=function(e){function t(n){var r;return uSe(this,t),r=fSe(this,t,[n]),zn(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),zn(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),zn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,s=a.onDragEnd,o=a.startIndex;s==null||s({endIndex:i,startIndex:o})}),r.detachDragEndListener()}),zn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),zn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),zn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),zn(r,"handleSlideDragStart",function(a){var i=mP(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return mSe(t,e),dSe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,s=this.state.scaleValues,o=this.props,c=o.gap,u=o.data,d=u.length-1,f=Math.min(a,i),h=Math.max(a,i),p=t.getIndexInRange(s,f),g=t.getIndexInRange(s,h);return{startIndex:p-p%c,endIndex:g===d?d:g-g%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,s=a.tickFormatter,o=a.dataKey,c=At(i[r],o,r);return pe(s)?s(c,r):c}},{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 a=this.state,i=a.slideMoveStartX,s=a.startX,o=a.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,h=c.startIndex,p=c.endIndex,g=c.onChange,m=r.pageX-i;m>0?m=Math.min(m,u+d-f-o,u+d-f-s):m<0&&(m=Math.max(m,u-s,u-o));var v=this.getIndex({startX:s+m,endX:o+m});(v.startIndex!==h||v.endIndex!==p)&&g&&g(v),this.setState({startX:s+m,endX:o+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=mP(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,s=a.movingTravellerId,o=a.endX,c=a.startX,u=this.state[s],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,m=d.gap,v=d.data,y={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,f+h-p-u):x<0&&(x=Math.max(x,f-u)),y[s]=u+x;var b=this.getIndex(y),w=b.startIndex,S=b.endIndex,A=function(){var N=v.length-1;return s==="startX"&&(o>c?w%m===0:S%m===0)||o<c&&S===N||s==="endX"&&(o>c?S%m===0:w%m===0)||o>c&&S===N};this.setState(zn(zn({},s,u+x),"brushMoveStartX",r.pageX),function(){g&&A()&&g(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,s=this.state,o=s.scaleValues,c=s.startX,u=s.endX,d=this.state[a],f=o.indexOf(d);if(f!==-1){var h=f+r;if(!(h===-1||h>=o.length)){var p=o[h];a==="startX"&&p>=u||a==="endX"&&p<=c||this.setState(zn({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,s=r.width,o=r.height,c=r.fill,u=r.stroke;return P.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:s,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,s=r.width,o=r.height,c=r.data,u=r.children,d=r.padding,f=j.Children.only(u);return f?P.cloneElement(f,{x:a,y:i,width:s,height:o,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,s,o=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,h=c.traveller,p=c.ariaLabel,g=c.data,m=c.startIndex,v=c.endIndex,y=Math.max(r,this.props.x),x=ab(ab({},ie(this.props,!1)),{},{x:y,y:u,width:d,height:f}),b=p||"Min value: ".concat((i=g[m])===null||i===void 0?void 0:i.name,", Max value: ").concat((s=g[v])===null||s===void 0?void 0:s.name);return P.createElement(Ne,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),o.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,a){var i=this.props,s=i.y,o=i.height,c=i.stroke,u=i.travellerWidth,d=Math.min(r,a)+u,f=Math.max(Math.abs(a-r)-u,0);return P.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:s,width:f,height:o})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,s=r.y,o=r.height,c=r.travellerWidth,u=r.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:u};return P.createElement(Ne,{className:"recharts-brush-texts"},P.createElement(vo,Tg({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:s+o/2},g),this.getTextOfTick(a)),P.createElement(vo,Tg({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+p,y:s+o/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,s=r.children,o=r.x,c=r.y,u=r.width,d=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,v=h.isSlideMoving,y=h.isTravellerMoving,x=h.isTravellerFocused;if(!a||!a.length||!Y(o)||!Y(c)||!Y(u)||!Y(d)||u<=0||d<=0)return null;var b=be("recharts-brush",i),w=P.Children.count(s)===1,S=cSe("userSelect","none");return P.createElement(Ne,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||v||y||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,s=r.width,o=r.height,c=r.stroke,u=Math.floor(i+o/2)-1;return P.createElement(P.Fragment,null,P.createElement("rect",{x:a,y:i,width:s,height:o,fill:c,stroke:"none"}),P.createElement("line",{x1:a+1,y1:u,x2:a+s-1,y2:u,fill:"none",stroke:"#fff"}),P.createElement("line",{x1:a+1,y1:u+2,x2:a+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return P.isValidElement(r)?i=P.cloneElement(r,a):pe(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,s=r.width,o=r.x,c=r.travellerWidth,u=r.updateId,d=r.startIndex,f=r.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return ab({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:s},i&&i.length?ySe({data:i,width:s,x:o,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||o!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([o,o+s-c]);var h=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:s,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,s=0,o=i-1;o-s>1;){var c=Math.floor((s+o)/2);r[c]>a?o=c:s=c}return a>=r[o]?o:s}}])}(j.PureComponent);zn(Oc,"displayName","Brush");zn(Oc,"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 vSe=h2;function xSe(e,t){var n;return vSe(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var bSe=xSe,SSe=$4,wSe=xa,jSe=bSe,ASe=$n,OSe=Wy;function NSe(e,t,n){var r=ASe(e)?SSe:jSe;return n&&OSe(e,t,n)&&(t=void 0),r(e,wSe(t))}var ESe=NSe;const TSe=Fe(ESe);var ha=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},gP=aL;function CSe(e,t,n){t=="__proto__"&&gP?gP(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var _Se=CSe,PSe=_Se,MSe=nL,kSe=xa;function RSe(e,t){var n={};return t=kSe(t),MSe(e,function(r,a,i){PSe(n,a,t(r,a,i))}),n}var DSe=RSe;const $Se=Fe(DSe);function LSe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var ISe=LSe,zSe=h2;function BSe(e,t){var n=!0;return zSe(e,function(r,a,i){return n=!!t(r,a,i),n}),n}var USe=BSe,FSe=ISe,VSe=USe,HSe=xa,qSe=$n,KSe=Wy;function GSe(e,t,n){var r=qSe(e)?FSe:VSe;return n&&KSe(e,t,n)&&(t=void 0),r(e,HSe(t))}var YSe=GSe;const Y6=Fe(YSe);var WSe=["x","y"];function Nf(e){"@babel/helpers - typeof";return Nf=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},Nf(e)}function dS(){return dS=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},dS.apply(this,arguments)}function yP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Du(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yP(Object(n),!0).forEach(function(r){XSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XSe(e,t,n){return t=QSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QSe(e){var t=ZSe(e,"string");return Nf(t)=="symbol"?t:t+""}function ZSe(e,t){if(Nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JSe(e,t){if(e==null)return{};var n=ewe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ewe(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 twe(e,t){var n=e.x,r=e.y,a=JSe(e,WSe),i="".concat(n),s=parseInt(i,10),o="".concat(r),c=parseInt(o,10),u="".concat(t.height||a.height),d=parseInt(u,10),f="".concat(t.width||a.width),h=parseInt(f,10);return Du(Du(Du(Du(Du({},t),a),s?{x:s}:{}),c?{y:c}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function vP(e){return P.createElement(U6,dS({shapeType:"rectangle",propTransformer:twe,activeClassName:"recharts-active-bar"},e))}var nwe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=Y(r)||Ane(r);return i?t(r,a):(i||So(),n)}},rwe=["value","background"],W6;function Nc(e){"@babel/helpers - typeof";return Nc=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},Nc(e)}function awe(e,t){if(e==null)return{};var n=iwe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iwe(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 _g(){return _g=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},_g.apply(this,arguments)}function xP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xP(Object(n),!0).forEach(function(r){Fi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function swe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q6(r.key),r)}}function owe(e,t,n){return t&&bP(e.prototype,t),n&&bP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lwe(e,t,n){return t=Pg(t),cwe(e,X6()?Reflect.construct(t,n||[],Pg(e).constructor):t.apply(e,n))}function cwe(e,t){if(t&&(Nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uwe(e)}function uwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X6=function(){return!!e})()}function Pg(e){return Pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pg(e)}function dwe(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&&fS(e,t)}function fS(e,t){return fS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},fS(e,t)}function Fi(e,t,n){return t=Q6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q6(e){var t=fwe(e,"string");return Nc(t)=="symbol"?t:t+""}function fwe(e,t){if(Nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Do=function(e){function t(){var n;swe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=lwe(this,t,[].concat(a)),Fi(n,"state",{isAnimationFinished:!1}),Fi(n,"id",Po("recharts-bar-")),Fi(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),s&&s()}),Fi(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),s&&s()}),n}return dwe(t,e),owe(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,s=i.shape,o=i.dataKey,c=i.activeIndex,u=i.activeBar,d=ie(this.props,!1);return r&&r.map(function(f,h){var p=h===c,g=p?u:s,m=Et(Et(Et({},d),f),{},{isActive:p,option:g,index:h,dataKey:o,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return P.createElement(Ne,_g({className:"recharts-bar-rectangle"},yo(a.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),P.createElement(vP,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,s=a.layout,o=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,d=a.animationEasing,f=a.animationId,h=this.state.prevData;return P.createElement(Vr,{begin:c,duration:u,isActive:o,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=i.map(function(v,y){var x=h&&h[y];if(x){var b=$t(x.x,v.x),w=$t(x.y,v.y),S=$t(x.width,v.width),A=$t(x.height,v.height);return Et(Et({},v),{},{x:b(g),y:w(g),width:S(g),height:A(g)})}if(s==="horizontal"){var O=$t(0,v.height),N=O(g);return Et(Et({},v),{},{y:v.y+v.height-N,height:N})}var E=$t(0,v.width),T=E(g);return Et(Et({},v),{},{width:T})});return P.createElement(Ne,null,r.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!xo(s,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,s=a.dataKey,o=a.activeIndex,c=ie(this.props.background,!1);return i.map(function(u,d){u.value;var f=u.background,h=awe(u,rwe);if(!f)return null;var p=Et(Et(Et(Et(Et({},h),{},{fill:"#eee"},f),c),yo(r.props,u,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return P.createElement(vP,_g({key:"background-bar-".concat(d),option:r.props.background,isActive:d===o},p))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.data,o=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=er(d,gh);if(!f)return null;var h=u==="vertical"?s[0].height/2:s[0].width/2,p=function(v,y){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:At(v,y)}},g={clipPath:r?"url(#clipPath-".concat(a,")"):null};return P.createElement(Ne,g,f.map(function(m){return P.cloneElement(m,{key:"error-bar-".concat(a,"-").concat(m.props.dataKey),data:s,xAxis:o,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,s=r.className,o=r.xAxis,c=r.yAxis,u=r.left,d=r.top,f=r.width,h=r.height,p=r.isAnimationActive,g=r.background,m=r.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,y=be("recharts-bar",s),x=o&&o.allowDataOverflow,b=c&&c.allowDataOverflow,w=x||b,S=ye(m)?this.id:m;return P.createElement(Ne,{className:y},x||b?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(S)},P.createElement("rect",{x:x?u:u-f/2,y:b?d:d-h/2,width:x?f:f*2,height:b?h:h*2}))):null,P.createElement(Ne,{className:"recharts-bar-rectangles",clipPath:w?"url(#clipPath-".concat(S,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(w,S),(!p||v)&&fa.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])}(j.PureComponent);W6=Do;Fi(Do,"displayName","Bar");Fi(Do,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ds.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Fi(Do,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,s=e.yAxis,o=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=Fye(r,n);if(!p)return null;var g=t.layout,m=n.type.defaultProps,v=m!==void 0?Et(Et({},m),n.props):n.props,y=v.dataKey,x=v.children,b=v.minPointSize,w=g==="horizontal"?s:i,S=u?w.scale.domain():null,A=Wye({numericAxis:w}),O=er(x,Xy),N=f.map(function(E,T){var _,C,$,R,k,M;u?_=Vye(u[d+T],S):(_=At(E,y),Array.isArray(_)||(_=[A,_]));var L=nwe(b,W6.defaultProps.minPointSize)(_[1],T);if(g==="horizontal"){var z,V=[s.scale(_[0]),s.scale(_[1])],K=V[0],U=V[1];C=f_({axis:i,ticks:o,bandSize:a,offset:p.offset,entry:E,index:T}),$=(z=U??K)!==null&&z!==void 0?z:void 0,R=p.size;var G=K-U;if(k=Number.isNaN(G)?0:G,M={x:C,y:s.y,width:R,height:s.height},Math.abs(L)>0&&Math.abs(k)<Math.abs(L)){var ne=gn(k||L)*(Math.abs(L)-Math.abs(k));$-=ne,k+=ne}}else{var J=[i.scale(_[0]),i.scale(_[1])],ve=J[0],ee=J[1];if(C=ve,$=f_({axis:s,ticks:c,bandSize:a,offset:p.offset,entry:E,index:T}),R=ee-ve,k=p.size,M={x:i.x,y:$,width:i.width,height:k},Math.abs(L)>0&&Math.abs(R)<Math.abs(L)){var ct=gn(R||L)*(Math.abs(L)-Math.abs(R));R+=ct}}return Et(Et(Et({},E),{},{x:C,y:$,width:R,height:k,value:u?_:_[1],payload:E,background:M},O&&O[T]&&O[T].props),{},{tooltipPayload:[x6(n,E)],tooltipPosition:{x:C+R/2,y:$+k/2}})});return Et({data:N,layout:g},h)});function Ef(e){"@babel/helpers - typeof";return Ef=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},Ef(e)}function hwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SP(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 pwe(e,t,n){return t&&SP(e.prototype,t),n&&SP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(n),!0).forEach(function(r){hv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hv(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=mwe(e,"string");return Ef(t)=="symbol"?t:t+""}function mwe(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F2=function(t,n,r,a,i){var s=t.width,o=t.height,c=t.layout,u=t.children,d=Object.keys(n),f={left:r.left,leftMirror:r.left,right:s-r.right,rightMirror:s-r.right,top:r.top,topMirror:r.top,bottom:o-r.bottom,bottomMirror:o-r.bottom},h=!!Un(u,Do);return d.reduce(function(p,g){var m=n[g],v=m.orientation,y=m.domain,x=m.padding,b=x===void 0?{}:x,w=m.mirror,S=m.reversed,A="".concat(v).concat(w?"Mirror":""),O,N,E,T,_;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var C=y[1]-y[0],$=1/0,R=m.categoricalDomain.sort(Ene);if(R.forEach(function(J,ve){ve>0&&($=Math.min((J||0)-(R[ve-1]||0),$))}),Number.isFinite($)){var k=$/C,M=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(O=k*M/2),m.padding==="no-gap"){var L=yn(t.barCategoryGap,k*M),z=k*M/2;O=z-L-(z-L)/M*L}}}a==="xAxis"?N=[r.left+(b.left||0)+(O||0),r.left+r.width-(b.right||0)-(O||0)]:a==="yAxis"?N=c==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(O||0),r.top+r.height-(b.bottom||0)-(O||0)]:N=m.range,S&&(N=[N[1],N[0]]);var V=m6(m,i,h),K=V.scale,U=V.realScaleType;K.domain(y).range(N),g6(K);var G=y6(K,Lr(Lr({},m),{},{realScaleType:U}));a==="xAxis"?(_=v==="top"&&!w||v==="bottom"&&w,E=r.left,T=f[A]-_*m.height):a==="yAxis"&&(_=v==="left"&&!w||v==="right"&&w,E=f[A]-_*m.width,T=r.top);var ne=Lr(Lr(Lr({},m),G),{},{realScaleType:U,x:E,y:T,scale:K,width:a==="xAxis"?r.width:m.width,height:a==="yAxis"?r.height:m.height});return ne.bandSize=pg(ne,G),!m.hide&&a==="xAxis"?f[A]+=(_?-1:1)*ne.height:m.hide||(f[A]+=(_?-1:1)*ne.width),Lr(Lr({},p),{},hv({},g,ne))},{})},J6=function(t,n){var r=t.x,a=t.y,i=n.x,s=n.y;return{x:Math.min(r,i),y:Math.min(a,s),width:Math.abs(i-r),height:Math.abs(s-a)}},gwe=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return J6({x:n,y:r},{x:a,y:i})},eI=function(){function e(t){hwe(this,e),this.scale=t}return pwe(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]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();hv(eI,"EPS",1e-4);var V2=function(t){var n=Object.keys(t).reduce(function(r,a){return Lr(Lr({},r),{},hv({},a,eI.create(t[a])))},{});return Lr(Lr({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.bandAware,o=i.position;return $Se(a,function(c,u){return n[u].apply(c,{bandAware:s,position:o})})},isInRange:function(a){return Y6(a,function(i,s){return n[s].isInRange(i)})}})};function ywe(e){return(e%180+180)%180}var vwe=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=ywe(a),s=i*Math.PI/180,o=Math.atan(r/n),c=s>o&&s<Math.PI-o?r/Math.sin(s):n/Math.cos(s);return Math.abs(c)},xwe=xa,bwe=dh,Swe=Gy;function wwe(e){return function(t,n,r){var a=Object(t);if(!bwe(t)){var i=xwe(n);t=Swe(t),n=function(o){return i(a[o],o,a)}}var s=e(t,n,r);return s>-1?a[i?t[s]:s]:void 0}}var jwe=wwe,Awe=H6;function Owe(e){var t=Awe(e),n=t%1;return t===t?n?t-n:t:0}var Nwe=Owe,Ewe=X4,Twe=xa,Cwe=Nwe,_we=Math.max;function Pwe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:Cwe(n);return a<0&&(a=_we(r+a,0)),Ewe(e,Twe(t),a)}var Mwe=Pwe,kwe=jwe,Rwe=Mwe,Dwe=kwe(Rwe),$we=Dwe;const Lwe=Fe($we);var Iwe=_te(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("")}),H2=j.createContext(void 0),q2=j.createContext(void 0),tI=j.createContext(void 0),nI=j.createContext({}),rI=j.createContext(void 0),aI=j.createContext(0),iI=j.createContext(0),jP=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,s=t.clipPathId,o=t.children,c=t.width,u=t.height,d=Iwe(i);return P.createElement(H2.Provider,{value:r},P.createElement(q2.Provider,{value:a},P.createElement(nI.Provider,{value:i},P.createElement(tI.Provider,{value:d},P.createElement(rI.Provider,{value:s},P.createElement(aI.Provider,{value:u},P.createElement(iI.Provider,{value:c},o)))))))},zwe=function(){return j.useContext(rI)},sI=function(t){var n=j.useContext(H2);n==null&&So();var r=n[t];return r==null&&So(),r},Bwe=function(){var t=j.useContext(H2);return Ei(t)},Uwe=function(){var t=j.useContext(q2),n=Lwe(t,function(r){return Y6(r.domain,Number.isFinite)});return n||Ei(t)},oI=function(t){var n=j.useContext(q2);n==null&&So();var r=n[t];return r==null&&So(),r},Fwe=function(){var t=j.useContext(tI);return t},Vwe=function(){return j.useContext(nI)},K2=function(){return j.useContext(iI)},G2=function(){return j.useContext(aI)};function Ec(e){"@babel/helpers - typeof";return Ec=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},Ec(e)}function Hwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qwe(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,cI(r.key),r)}}function Kwe(e,t,n){return t&&qwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gwe(e,t,n){return t=Mg(t),Ywe(e,lI()?Reflect.construct(t,n||[],Mg(e).constructor):t.apply(e,n))}function Ywe(e,t){if(t&&(Ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wwe(e)}function Wwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lI=function(){return!!e})()}function Mg(e){return Mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mg(e)}function Xwe(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&&hS(e,t)}function hS(e,t){return hS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},hS(e,t)}function AP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function OP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(n),!0).forEach(function(r){Y2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y2(e,t,n){return t=cI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cI(e){var t=Qwe(e,"string");return Ec(t)=="symbol"?t:t+""}function Qwe(e,t){if(Ec(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ec(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Zwe(e,t){return nje(e)||tje(e,t)||eje(e,t)||Jwe()}function Jwe(){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 eje(e,t){if(e){if(typeof e=="string")return NP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NP(e,t)}}function NP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tje(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function nje(e){if(Array.isArray(e))return 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)}var rje=function(t,n){var r;return P.isValidElement(t)?r=P.cloneElement(t,n):pe(t)?r=t(n):r=P.createElement("line",pS({},n,{className:"recharts-reference-line-line"})),r},aje=function(t,n,r,a,i,s,o,c,u){var d=i.x,f=i.y,h=i.width,p=i.height;if(r){var g=u.y,m=t.y.apply(g,{position:s});if(ha(u,"discard")&&!t.y.isInRange(m))return null;var v=[{x:d+h,y:m},{x:d,y:m}];return c==="left"?v.reverse():v}if(n){var y=u.x,x=t.x.apply(y,{position:s});if(ha(u,"discard")&&!t.x.isInRange(x))return null;var b=[{x,y:f+p},{x,y:f}];return o==="top"?b.reverse():b}if(a){var w=u.segment,S=w.map(function(A){return t.apply(A,{position:s})});return ha(u,"discard")&&TSe(S,function(A){return!t.isInRange(A)})?null:S}return null};function ije(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,s=e.shape,o=e.className,c=e.alwaysShow,u=zwe(),d=sI(a),f=oI(i),h=Fwe();if(!u||!h)return null;Ur(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=V2({x:d.scale,y:f.scale}),g=It(t),m=It(n),v=r&&r.length===2,y=aje(p,g,m,v,h,e.position,d.orientation,f.orientation,e);if(!y)return null;var x=Zwe(y,2),b=x[0],w=b.x,S=b.y,A=x[1],O=A.x,N=A.y,E=ha(e,"hidden")?"url(#".concat(u,")"):void 0,T=OP(OP({clipPath:E},ie(e,!0)),{},{x1:w,y1:S,x2:O,y2:N});return P.createElement(Ne,{className:be("recharts-reference-line",o)},rje(s,T),Gt.renderCallByParent(e,gwe({x1:w,y1:S,x2:O,y2:N})))}var W2=function(e){function t(){return Hwe(this,t),Gwe(this,t,arguments)}return Xwe(t,e),Kwe(t,[{key:"render",value:function(){return P.createElement(ije,this.props)}}])}(P.Component);Y2(W2,"displayName","ReferenceLine");Y2(W2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function mS(){return mS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mS.apply(this,arguments)}function Tc(e){"@babel/helpers - typeof";return Tc=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},Tc(e)}function EP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function TP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EP(Object(n),!0).forEach(function(r){pv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oje(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,dI(r.key),r)}}function lje(e,t,n){return t&&oje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cje(e,t,n){return t=kg(t),uje(e,uI()?Reflect.construct(t,n||[],kg(e).constructor):t.apply(e,n))}function uje(e,t){if(t&&(Tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dje(e)}function dje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uI=function(){return!!e})()}function kg(e){return kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kg(e)}function fje(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&&gS(e,t)}function gS(e,t){return gS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},gS(e,t)}function pv(e,t,n){return t=dI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dI(e){var t=hje(e,"string");return Tc(t)=="symbol"?t:t+""}function hje(e,t){if(Tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pje=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,s=V2({x:a.scale,y:i.scale}),o=s.apply({x:n,y:r},{bandAware:!0});return ha(t,"discard")&&!s.isInRange(o)?null:o},mv=function(e){function t(){return sje(this,t),cje(this,t,arguments)}return fje(t,e),lje(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,s=r.r,o=r.alwaysShow,c=r.clipPathId,u=It(a),d=It(i);if(Ur(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=pje(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,m=g.shape,v=g.className,y=ha(this.props,"hidden")?"url(#".concat(c,")"):void 0,x=TP(TP({clipPath:y},ie(this.props,!0)),{},{cx:h,cy:p});return P.createElement(Ne,{className:be("recharts-reference-dot",v)},t.renderDot(m,x),Gt.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])}(P.Component);pv(mv,"displayName","ReferenceDot");pv(mv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});pv(mv,"renderDot",function(e,t){var n;return P.isValidElement(e)?n=P.cloneElement(e,t):pe(e)?n=e(t):n=P.createElement(yh,mS({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function yS(){return yS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yS.apply(this,arguments)}function Cc(e){"@babel/helpers - typeof";return Cc=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},Cc(e)}function CP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _P(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(n),!0).forEach(function(r){gv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gje(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,hI(r.key),r)}}function yje(e,t,n){return t&&gje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vje(e,t,n){return t=Rg(t),xje(e,fI()?Reflect.construct(t,n||[],Rg(e).constructor):t.apply(e,n))}function xje(e,t){if(t&&(Cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bje(e)}function bje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fI=function(){return!!e})()}function Rg(e){return Rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rg(e)}function Sje(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&&vS(e,t)}function vS(e,t){return vS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},vS(e,t)}function gv(e,t,n){return t=hI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hI(e){var t=wje(e,"string");return Cc(t)=="symbol"?t:t+""}function wje(e,t){if(Cc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jje=function(t,n,r,a,i){var s=i.x1,o=i.x2,c=i.y1,u=i.y2,d=i.xAxis,f=i.yAxis;if(!d||!f)return null;var h=V2({x:d.scale,y:f.scale}),p={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(c,{position:"start"}):h.y.rangeMin},g={x:n?h.x.apply(o,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return ha(i,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:J6(p,g)},yv=function(e){function t(){return mje(this,t),vje(this,t,arguments)}return Sje(t,e),yje(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,s=r.y1,o=r.y2,c=r.className,u=r.alwaysShow,d=r.clipPathId;Ur(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=It(a),h=It(i),p=It(s),g=It(o),m=this.props.shape;if(!f&&!h&&!p&&!g&&!m)return null;var v=jje(f,h,p,g,this.props);if(!v&&!m)return null;var y=ha(this.props,"hidden")?"url(#".concat(d,")"):void 0;return P.createElement(Ne,{className:be("recharts-reference-area",c)},t.renderRect(m,_P(_P({clipPath:y},ie(this.props,!0)),v)),Gt.renderCallByParent(this.props,v))}}])}(P.Component);gv(yv,"displayName","ReferenceArea");gv(yv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});gv(yv,"renderRect",function(e,t){var n;return P.isValidElement(e)?n=P.cloneElement(e,t):pe(e)?n=e(t):n=P.createElement(U2,yS({},t,{className:"recharts-reference-area-rect"})),n});function pI(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function Aje(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return vwe(r,n)}function Oje(e,t,n){var r=n==="width",a=e.x,i=e.y,s=e.width,o=e.height;return t===1?{start:r?a:i,end:r?a+s:i+o}:{start:r?a+s:i+o,end:r?a:i}}function Dg(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function Nje(e,t){return pI(e,t+1)}function Eje(e,t,n,r,a){for(var i=(r||[]).slice(),s=t.start,o=t.end,c=0,u=1,d=s,f=function(){var g=r==null?void 0:r[c];if(g===void 0)return{v:pI(r,u)};var m=c,v,y=function(){return v===void 0&&(v=n(g,m)),v},x=g.coordinate,b=c===0||Dg(e,x,y,d,o);b||(c=0,d=s,u+=1),b&&(d=x+e*(y()/2+a),c+=u)},h;u<=i.length;)if(h=f(),h)return h.v;return[]}function Tf(e){"@babel/helpers - typeof";return Tf=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},Tf(e)}function PP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PP(Object(n),!0).forEach(function(r){Tje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tje(e,t,n){return t=Cje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cje(e){var t=_je(e,"string");return Tf(t)=="symbol"?t:t+""}function _je(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pje(e,t,n,r,a){for(var i=(r||[]).slice(),s=i.length,o=t.start,c=t.end,u=function(h){var p=i[h],g,m=function(){return g===void 0&&(g=n(p,h)),g};if(h===s-1){var v=e*(p.coordinate+e*m()/2-c);i[h]=p=un(un({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else i[h]=p=un(un({},p),{},{tickCoord:p.coordinate});var y=Dg(e,p.tickCoord,m,o,c);y&&(c=p.tickCoord-e*(m()/2+a),i[h]=un(un({},p),{},{isShow:!0}))},d=s-1;d>=0;d--)u(d);return i}function Mje(e,t,n,r,a,i){var s=(r||[]).slice(),o=s.length,c=t.start,u=t.end;if(i){var d=r[o-1],f=n(d,o-1),h=e*(d.coordinate+e*f/2-u);s[o-1]=d=un(un({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Dg(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+a),s[o-1]=un(un({},d),{},{isShow:!0}))}for(var g=i?o-1:o,m=function(x){var b=s[x],w,S=function(){return w===void 0&&(w=n(b,x)),w};if(x===0){var A=e*(b.coordinate-e*S()/2-c);s[x]=b=un(un({},b),{},{tickCoord:A<0?b.coordinate-A*e:b.coordinate})}else s[x]=b=un(un({},b),{},{tickCoord:b.coordinate});var O=Dg(e,b.tickCoord,S,c,u);O&&(c=b.tickCoord+e*(S()/2+a),s[x]=un(un({},b),{},{isShow:!0}))},v=0;v<g;v++)m(v);return s}function X2(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,s=e.minTickGap,o=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!a||!a.length||!r)return[];if(Y(c)||ds.isSsr)return Nje(a,typeof c=="number"&&Y(c)?c:0);var h=[],p=o==="top"||o==="bottom"?"width":"height",g=d&&p==="width"?gd(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(b,w){var S=pe(u)?u(b.value,w):b.value;return p==="width"?Aje(gd(S,{fontSize:t,letterSpacing:n}),g,f):gd(S,{fontSize:t,letterSpacing:n})[p]},v=a.length>=2?gn(a[1].coordinate-a[0].coordinate):1,y=Oje(i,v,p);return c==="equidistantPreserveStart"?Eje(v,y,m,a,s):(c==="preserveStart"||c==="preserveStartEnd"?h=Mje(v,y,m,a,s,c==="preserveStartEnd"):h=Pje(v,y,m,a,s),h.filter(function(x){return x.isShow}))}var kje=["viewBox"],Rje=["viewBox"],Dje=["ticks"];function _c(e){"@babel/helpers - typeof";return _c=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},_c(e)}function bl(){return bl=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},bl.apply(this,arguments)}function MP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MP(Object(n),!0).forEach(function(r){Q2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ib(e,t){if(e==null)return{};var n=$je(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $je(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 Lje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kP(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,gI(r.key),r)}}function Ije(e,t,n){return t&&kP(e.prototype,t),n&&kP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zje(e,t,n){return t=$g(t),Bje(e,mI()?Reflect.construct(t,n||[],$g(e).constructor):t.apply(e,n))}function Bje(e,t){if(t&&(_c(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uje(e)}function Uje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mI=function(){return!!e})()}function $g(e){return $g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$g(e)}function Fje(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&&xS(e,t)}function xS(e,t){return xS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},xS(e,t)}function Q2(e,t,n){return t=gI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gI(e){var t=Vje(e,"string");return _c(t)=="symbol"?t:t+""}function Vje(e,t){if(_c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_c(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var du=function(e){function t(n){var r;return Lje(this,t),r=zje(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Fje(t,e),Ije(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,s=ib(r,kje),o=this.props,c=o.viewBox,u=ib(o,Rje);return!Pl(i,c)||!Pl(s,u)||!Pl(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.x,s=a.y,o=a.width,c=a.height,u=a.orientation,d=a.tickSize,f=a.mirror,h=a.tickMargin,p,g,m,v,y,x,b=f?-1:1,w=r.tickSize||d,S=Y(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":p=g=r.coordinate,v=s+ +!f*c,m=v-b*w,x=m-b*h,y=S;break;case"left":m=v=r.coordinate,g=i+ +!f*o,p=g-b*w,y=p-b*h,x=S;break;case"right":m=v=r.coordinate,g=i+ +f*o,p=g+b*w,y=p+b*h,x=S;break;default:p=g=r.coordinate,v=s+ +f*c,m=v+b*w,x=m+b*h,y=S;break}return{line:{x1:p,y1:m,x2:g,y2:v},tick:{x:y,y:x}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,s;switch(a){case"left":s=i?"start":"end";break;case"right":s=i?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=i?"start":"end";break;default:s=i?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,i=r.y,s=r.width,o=r.height,c=r.orientation,u=r.mirror,d=r.axisLine,f=Rt(Rt(Rt({},ie(this.props,!1)),ie(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);f=Rt(Rt({},f),{},{x1:a,y1:i+h*o,x2:a+s,y2:i+h*o})}else{var p=+(c==="left"&&!u||c==="right"&&u);f=Rt(Rt({},f),{},{x1:a+p*s,y1:i,x2:a+p*s,y2:i+o})}return P.createElement("line",bl({},f,{className:be("recharts-cartesian-axis-line",Jn(d,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var s=this,o=this.props,c=o.tickLine,u=o.stroke,d=o.tick,f=o.tickFormatter,h=o.unit,p=X2(Rt(Rt({},this.props),{},{ticks:r}),a,i),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=ie(this.props,!1),y=ie(d,!1),x=Rt(Rt({},v),{},{fill:"none"},ie(c,!1)),b=p.map(function(w,S){var A=s.getTickLineCoord(w),O=A.line,N=A.tick,E=Rt(Rt(Rt(Rt({textAnchor:g,verticalAnchor:m},v),{},{stroke:"none",fill:u},y),N),{},{index:S,payload:w,visibleTicksCount:p.length,tickFormatter:f});return P.createElement(Ne,bl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(w.value,"-").concat(w.coordinate,"-").concat(w.tickCoord)},yo(s.props,w,S)),c&&P.createElement("line",bl({},x,O,{className:be("recharts-cartesian-axis-tick-line",Jn(c,"className"))})),d&&t.renderTickItem(d,E,"".concat(pe(f)?f(w.value,S):w.value).concat(h||"")))});return P.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,s=a.width,o=a.height,c=a.ticksGenerator,u=a.className,d=a.hide;if(d)return null;var f=this.props,h=f.ticks,p=ib(f,Dje),g=h;return pe(c)&&(g=h&&h.length>0?c(this.props):c(p)),s<=0||o<=0||!g||!g.length?null:P.createElement(Ne,{className:be("recharts-cartesian-axis",u),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Gt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var s,o=be(a.className,"recharts-cartesian-axis-tick-value");return P.isValidElement(r)?s=P.cloneElement(r,Rt(Rt({},a),{},{className:o})):pe(r)?s=r(Rt(Rt({},a),{},{className:o})):s=P.createElement(vo,bl({},a,{className:"recharts-cartesian-axis-tick-value"}),i),s}}])}(j.Component);Q2(du,"displayName","CartesianAxis");Q2(du,"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 Hje=["x1","y1","x2","y2","key"],qje=["offset"];function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function RP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(n),!0).forEach(function(r){Kje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kje(e,t,n){return t=Gje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gje(e){var t=Yje(e,"string");return wo(t)=="symbol"?t:t+""}function Yje(e,t){if(wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zs(){return zs=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},zs.apply(this,arguments)}function DP(e,t){if(e==null)return{};var n=Wje(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wje(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 Xje=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,i=t.y,s=t.width,o=t.height,c=t.ry;return P.createElement("rect",{x:a,y:i,ry:c,width:s,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function yI(e,t){var n;if(P.isValidElement(e))n=P.cloneElement(e,t);else if(pe(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,s=t.y2,o=t.key,c=DP(t,Hje),u=ie(c,!1);u.offset;var d=DP(u,qje);n=P.createElement("line",zs({},d,{x1:r,y1:a,x2:i,y2:s,fill:"none",key:o}))}return n}function Qje(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(o,c){var u=dn(dn({},e),{},{x1:t,y1:o,x2:t+n,y2:o,key:"line-".concat(c),index:c});return yI(a,u)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Zje(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,i=e.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(o,c){var u=dn(dn({},e),{},{x1:o,y1:t,x2:o,y2:t+n,key:"line-".concat(c),index:c});return yI(a,u)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function Jje(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,s=e.height,o=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=o.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?a+s-h:d[p+1]-h;if(m<=0)return null;var v=p%t.length;return P.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:m,width:i,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function e2e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,s=e.y,o=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?i+o-h:d[p+1]-h;if(m<=0)return null;var v=p%r.length;return P.createElement("rect",{key:"react-".concat(p),x:h,y:s,width:m,height:c,stroke:"none",fill:r[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var t2e=function(t,n){var r=t.xAxis,a=t.width,i=t.height,s=t.offset;return p6(X2(dn(dn(dn({},du.defaultProps),r),{},{ticks:Ua(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.left,s.left+s.width,n)},n2e=function(t,n){var r=t.yAxis,a=t.width,i=t.height,s=t.offset;return p6(X2(dn(dn(dn({},du.defaultProps),r),{},{ticks:Ua(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.top,s.top+s.height,n)},qo={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Bp(e){var t,n,r,a,i,s,o=K2(),c=G2(),u=Vwe(),d=dn(dn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:qo.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:qo.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:qo.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:qo.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:qo.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:qo.verticalFill,x:Y(e.x)?e.x:u.left,y:Y(e.y)?e.y:u.top,width:Y(e.width)?e.width:u.width,height:Y(e.height)?e.height:u.height}),f=d.x,h=d.y,p=d.width,g=d.height,m=d.syncWithTicks,v=d.horizontalValues,y=d.verticalValues,x=Bwe(),b=Uwe();if(!Y(p)||p<=0||!Y(g)||g<=0||!Y(f)||f!==+f||!Y(h)||h!==+h)return null;var w=d.verticalCoordinatesGenerator||t2e,S=d.horizontalCoordinatesGenerator||n2e,A=d.horizontalPoints,O=d.verticalPoints;if((!A||!A.length)&&pe(S)){var N=v&&v.length,E=S({yAxis:b?dn(dn({},b),{},{ticks:N?v:b.ticks}):void 0,width:o,height:c,offset:u},N?!0:m);Ur(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(wo(E),"]")),Array.isArray(E)&&(A=E)}if((!O||!O.length)&&pe(w)){var T=y&&y.length,_=w({xAxis:x?dn(dn({},x),{},{ticks:T?y:x.ticks}):void 0,width:o,height:c,offset:u},T?!0:m);Ur(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(wo(_),"]")),Array.isArray(_)&&(O=_)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(Xje,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),P.createElement(Qje,zs({},d,{offset:u,horizontalPoints:A,xAxis:x,yAxis:b})),P.createElement(Zje,zs({},d,{offset:u,verticalPoints:O,xAxis:x,yAxis:b})),P.createElement(Jje,zs({},d,{horizontalPoints:A})),P.createElement(e2e,zs({},d,{verticalPoints:O})))}Bp.displayName="CartesianGrid";var r2e=["type","layout","connectNulls","ref"],a2e=["key"];function Pc(e){"@babel/helpers - typeof";return Pc=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},Pc(e)}function $P(e,t){if(e==null)return{};var n=i2e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i2e(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 wd(){return wd=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},wd.apply(this,arguments)}function LP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LP(Object(n),!0).forEach(function(r){Ir(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ko(e){return c2e(e)||l2e(e)||o2e(e)||s2e()}function s2e(){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 o2e(e,t){if(e){if(typeof e=="string")return bS(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 bS(e,t)}}function l2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c2e(e){if(Array.isArray(e))return bS(e)}function bS(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 u2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IP(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,xI(r.key),r)}}function d2e(e,t,n){return t&&IP(e.prototype,t),n&&IP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f2e(e,t,n){return t=Lg(t),h2e(e,vI()?Reflect.construct(t,n||[],Lg(e).constructor):t.apply(e,n))}function h2e(e,t){if(t&&(Pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p2e(e)}function p2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vI=function(){return!!e})()}function Lg(e){return Lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lg(e)}function m2e(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&&SS(e,t)}function SS(e,t){return SS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},SS(e,t)}function Ir(e,t,n){return t=xI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xI(e){var t=g2e(e,"string");return Pc(t)=="symbol"?t:t+""}function g2e(e,t){if(Pc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vh=function(e){function t(){var n;u2e(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=f2e(this,t,[].concat(a)),Ir(n,"state",{isAnimationFinished:!0,totalLength:0}),Ir(n,"generateSimpleStrokeDasharray",function(s,o){return"".concat(o,"px ").concat(s-o,"px")}),Ir(n,"getStrokeDasharray",function(s,o,c){var u=c.reduce(function(y,x){return y+x});if(!u)return n.generateSimpleStrokeDasharray(o,s);for(var d=Math.floor(s/u),f=s%u,h=o-s,p=[],g=0,m=0;g<c.length;m+=c[g],++g)if(m+c[g]>f){p=[].concat(Ko(c.slice(0,g)),[f-m]);break}var v=p.length%2===0?[0,h]:[h];return[].concat(Ko(t.repeat(c,d)),Ko(p),v).map(function(y){return"".concat(y,"px")}).join(", ")}),Ir(n,"id",Po("recharts-line-")),Ir(n,"pathRef",function(s){n.mainCurve=s}),Ir(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ir(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return m2e(t,e),d2e(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,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.points,o=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=er(d,gh);if(!f)return null;var h=function(m,v){return{x:m.x,y:m.y,value:m.value,errorVal:At(m.payload,v)}},p={clipPath:r?"url(#clipPath-".concat(a,")"):null};return P.createElement(Ne,p,f.map(function(g){return P.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:s,xAxis:o,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,a,i){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var o=this.props,c=o.dot,u=o.points,d=o.dataKey,f=ie(this.props,!1),h=ie(c,!0),p=u.map(function(m,v){var y=In(In(In({key:"dot-".concat(v),r:3},f),h),{},{index:v,cx:m.x,cy:m.y,value:m.value,dataKey:d,payload:m.payload,points:u});return t.renderDotItem(c,y)}),g={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return P.createElement(Ne,wd({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(r,a,i,s){var o=this.props,c=o.type,u=o.layout,d=o.connectNulls;o.ref;var f=$P(o,r2e),h=In(In(In({},ie(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:r},s),{},{type:c,layout:u,connectNulls:d});return P.createElement(io,wd({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var i=this,s=this.props,o=s.points,c=s.strokeDasharray,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=s.animateNewValues,m=s.width,v=s.height,y=this.state,x=y.prevPoints,b=y.totalLength;return P.createElement(Vr,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var S=w.t;if(x){var A=x.length/o.length,O=o.map(function(C,$){var R=Math.floor($*A);if(x[R]){var k=x[R],M=$t(k.x,C.x),L=$t(k.y,C.y);return In(In({},C),{},{x:M(S),y:L(S)})}if(g){var z=$t(m*2,C.x),V=$t(v/2,C.y);return In(In({},C),{},{x:z(S),y:V(S)})}return In(In({},C),{},{x:C.x,y:C.y})});return i.renderCurveStatically(O,r,a)}var N=$t(0,b),E=N(S),T;if(c){var _="".concat(c).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});T=i.getStrokeDasharray(E,b,_)}else T=i.generateSimpleStrokeDasharray(b,E);return i.renderCurveStatically(o,r,a,{strokeDasharray:T})})}},{key:"renderCurve",value:function(r,a){var i=this.props,s=i.points,o=i.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return o&&s&&s.length&&(!u&&d>0||!xo(u,s))?this.renderCurveWithAnimation(r,a):this.renderCurveStatically(s,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,s=a.dot,o=a.points,c=a.className,u=a.xAxis,d=a.yAxis,f=a.top,h=a.left,p=a.width,g=a.height,m=a.isAnimationActive,v=a.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,x=o.length===1,b=be("recharts-line",c),w=u&&u.allowDataOverflow,S=d&&d.allowDataOverflow,A=w||S,O=ye(v)?this.id:v,N=(r=ie(s,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=N.r,T=E===void 0?3:E,_=N.strokeWidth,C=_===void 0?2:_,$=o4(s)?s:{},R=$.clipDot,k=R===void 0?!0:R,M=T*2+C;return P.createElement(Ne,{className:b},w||S?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(O)},P.createElement("rect",{x:w?h:h-p/2,y:S?f:f-g/2,width:w?p:p*2,height:S?g:g*2})),!k&&P.createElement("clipPath",{id:"clipPath-dots-".concat(O)},P.createElement("rect",{x:h-M/2,y:f-M/2,width:p+M,height:g+M}))):null,!x&&this.renderCurve(A,O),this.renderErrorBar(A,O),(x||s)&&this.renderDots(A,k,O),(!m||y)&&fa.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,a){for(var i=r.length%2!==0?[].concat(Ko(r),[0]):r,s=[],o=0;o<a;++o)s=[].concat(Ko(s),Ko(i));return s}},{key:"renderDotItem",value:function(r,a){var i;if(P.isValidElement(r))i=P.cloneElement(r,a);else if(pe(r))i=r(a);else{var s=a.key,o=$P(a,a2e),c=be("recharts-line-dot",typeof r!="boolean"?r.className:"");i=P.createElement(yh,wd({key:s},o,{className:c}))}return i}}])}(j.PureComponent);Ir(vh,"displayName","Line");Ir(vh,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ds.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Ir(vh,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,s=e.dataKey,o=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(h,p){var g=At(h,s);return d==="horizontal"?{x:hg({axis:n,ticks:a,bandSize:o,entry:h,index:p}),y:ye(g)?null:r.scale(g),value:g,payload:h}:{x:ye(g)?null:n.scale(g),y:hg({axis:r,ticks:i,bandSize:o,entry:h,index:p}),value:g,payload:h}});return In({points:f,layout:d},u)});var y2e=["layout","type","stroke","connectNulls","isRange","ref"],v2e=["key"],bI;function Mc(e){"@babel/helpers - typeof";return Mc=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},Mc(e)}function SI(e,t){if(e==null)return{};var n=x2e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x2e(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 Bs(){return Bs=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},Bs.apply(this,arguments)}function zP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zP(Object(n),!0).forEach(function(r){oa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jI(r.key),r)}}function S2e(e,t,n){return t&&BP(e.prototype,t),n&&BP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function w2e(e,t,n){return t=Ig(t),j2e(e,wI()?Reflect.construct(t,n||[],Ig(e).constructor):t.apply(e,n))}function j2e(e,t){if(t&&(Mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A2e(e)}function A2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wI=function(){return!!e})()}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ig(e)}function O2e(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&&wS(e,t)}function wS(e,t){return wS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},wS(e,t)}function oa(e,t,n){return t=jI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jI(e){var t=N2e(e,"string");return Mc(t)=="symbol"?t:t+""}function N2e(e,t){if(Mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ms=function(e){function t(){var n;b2e(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=w2e(this,t,[].concat(a)),oa(n,"state",{isAnimationFinished:!0}),oa(n,"id",Po("recharts-area-")),oa(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),pe(s)&&s()}),oa(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),pe(s)&&s()}),n}return O2e(t,e),S2e(t,[{key:"renderDots",value:function(r,a,i){var s=this.props.isAnimationActive,o=this.state.isAnimationFinished;if(s&&!o)return null;var c=this.props,u=c.dot,d=c.points,f=c.dataKey,h=ie(this.props,!1),p=ie(u,!0),g=d.map(function(v,y){var x=xi(xi(xi({key:"dot-".concat(y),r:3},h),p),{},{index:y,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:d});return t.renderDotItem(u,x)}),m={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return P.createElement(Ne,Bs({className:"recharts-area-dots"},m),g)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,i=a.baseLine,s=a.points,o=a.strokeWidth,c=s[0].x,u=s[s.length-1].x,d=r*Math.abs(c-u),f=Ui(s.map(function(h){return h.y||0}));return Y(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(Ui(i.map(function(h){return h.y||0})),f)),Y(f)?P.createElement("rect",{x:c<u?c:c-d,y:0,width:d,height:Math.floor(f+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,i=a.baseLine,s=a.points,o=a.strokeWidth,c=s[0].y,u=s[s.length-1].y,d=r*Math.abs(c-u),f=Ui(s.map(function(h){return h.x||0}));return Y(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(Ui(i.map(function(h){return h.x||0})),f)),Y(f)?P.createElement("rect",{x:0,y:c<u?c:c-d,width:f+(o?parseInt("".concat(o),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,i,s){var o=this.props,c=o.layout,u=o.type,d=o.stroke,f=o.connectNulls,h=o.isRange;o.ref;var p=SI(o,y2e);return P.createElement(Ne,{clipPath:i?"url(#clipPath-".concat(s,")"):null},P.createElement(io,Bs({},ie(p,!0),{points:r,connectNulls:f,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),d!=="none"&&P.createElement(io,Bs({},ie(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:r})),d!=="none"&&h&&P.createElement(io,Bs({},ie(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var i=this,s=this.props,o=s.points,c=s.baseLine,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=this.state,m=g.prevPoints,v=g.prevBaseLine;return P.createElement(Vr,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var x=y.t;if(m){var b=m.length/o.length,w=o.map(function(N,E){var T=Math.floor(E*b);if(m[T]){var _=m[T],C=$t(_.x,N.x),$=$t(_.y,N.y);return xi(xi({},N),{},{x:C(x),y:$(x)})}return N}),S;if(Y(c)&&typeof c=="number"){var A=$t(v,c);S=A(x)}else if(ye(c)||au(c)){var O=$t(v,0);S=O(x)}else S=c.map(function(N,E){var T=Math.floor(E*b);if(v[T]){var _=v[T],C=$t(_.x,N.x),$=$t(_.y,N.y);return xi(xi({},N),{},{x:C(x),y:$(x)})}return N});return i.renderAreaStatically(w,S,r,a)}return P.createElement(Ne,null,P.createElement("defs",null,P.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(x))),P.createElement(Ne,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(o,c,r,a)))})}},{key:"renderArea",value:function(r,a){var i=this.props,s=i.points,o=i.baseLine,c=i.isAnimationActive,u=this.state,d=u.prevPoints,f=u.prevBaseLine,h=u.totalLength;return c&&s&&s.length&&(!d&&h>0||!xo(d,s)||!xo(f,o))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(s,o,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,s=a.dot,o=a.points,c=a.className,u=a.top,d=a.left,f=a.xAxis,h=a.yAxis,p=a.width,g=a.height,m=a.isAnimationActive,v=a.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,x=o.length===1,b=be("recharts-area",c),w=f&&f.allowDataOverflow,S=h&&h.allowDataOverflow,A=w||S,O=ye(v)?this.id:v,N=(r=ie(s,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=N.r,T=E===void 0?3:E,_=N.strokeWidth,C=_===void 0?2:_,$=o4(s)?s:{},R=$.clipDot,k=R===void 0?!0:R,M=T*2+C;return P.createElement(Ne,{className:b},w||S?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(O)},P.createElement("rect",{x:w?d:d-p/2,y:S?u:u-g/2,width:w?p:p*2,height:S?g:g*2})),!k&&P.createElement("clipPath",{id:"clipPath-dots-".concat(O)},P.createElement("rect",{x:d-M/2,y:u-M/2,width:p+M,height:g+M}))):null,x?null:this.renderArea(A,O),(s||x)&&this.renderDots(A,k,O),(!m||y)&&fa.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(j.PureComponent);bI=ms;oa(ms,"displayName","Area");oa(ms,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ds.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});oa(ms,"getBaseValue",function(e,t,n,r){var a=e.layout,i=e.baseValue,s=t.props.baseValue,o=s??i;if(Y(o)&&typeof o=="number")return o;var c=a==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return o==="dataMin"?f:o==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]});oa(ms,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,o=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,g=u&&u.length,m=bI.getBaseValue(t,n,r,a),v=p==="horizontal",y=!1,x=f.map(function(w,S){var A;g?A=u[d+S]:(A=At(w,c),Array.isArray(A)?y=!0:A=[m,A]);var O=A[1]==null||g&&At(w,c)==null;return v?{x:hg({axis:r,ticks:i,bandSize:o,entry:w,index:S}),y:O?null:a.scale(A[1]),value:A,payload:w}:{x:O?null:r.scale(A[1]),y:hg({axis:a,ticks:s,bandSize:o,entry:w,index:S}),value:A,payload:w}}),b;return g||y?b=x.map(function(w){var S=Array.isArray(w.value)?w.value[0]:null;return v?{x:w.x,y:S!=null&&w.y!=null?a.scale(S):null}:{x:S!=null?r.scale(S):null,y:w.y}}):b=v?a.scale(m):r.scale(m),xi({points:x,baseLine:b,layout:p,isRange:y},h)});oa(ms,"renderDotItem",function(e,t){var n;if(P.isValidElement(e))n=P.cloneElement(e,t);else if(pe(e))n=e(t);else{var r=be("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=SI(t,v2e);n=P.createElement(yh,Bs({},i,{key:a,className:r}))}return n});function kc(e){"@babel/helpers - typeof";return kc=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},kc(e)}function E2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T2e(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,NI(r.key),r)}}function C2e(e,t,n){return t&&T2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _2e(e,t,n){return t=zg(t),P2e(e,AI()?Reflect.construct(t,n||[],zg(e).constructor):t.apply(e,n))}function P2e(e,t){if(t&&(kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M2e(e)}function M2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AI=function(){return!!e})()}function zg(e){return zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zg(e)}function k2e(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&&jS(e,t)}function jS(e,t){return jS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},jS(e,t)}function OI(e,t,n){return t=NI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NI(e){var t=R2e(e,"string");return kc(t)=="symbol"?t:t+""}function R2e(e,t){if(kc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function AS(){return AS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AS.apply(this,arguments)}function D2e(e){var t=e.xAxisId,n=K2(),r=G2(),a=sI(t);return a==null?null:j.createElement(du,AS({},a,{className:be("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(s){return Ua(s,!0)}}))}var es=function(e){function t(){return E2e(this,t),_2e(this,t,arguments)}return k2e(t,e),C2e(t,[{key:"render",value:function(){return j.createElement(D2e,this.props)}}])}(j.Component);OI(es,"displayName","XAxis");OI(es,"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 Rc(e){"@babel/helpers - typeof";return Rc=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},Rc(e)}function $2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L2e(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,CI(r.key),r)}}function I2e(e,t,n){return t&&L2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function z2e(e,t,n){return t=Bg(t),B2e(e,EI()?Reflect.construct(t,n||[],Bg(e).constructor):t.apply(e,n))}function B2e(e,t){if(t&&(Rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U2e(e)}function U2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EI=function(){return!!e})()}function Bg(e){return Bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bg(e)}function F2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OS(e,t)}function OS(e,t){return OS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},OS(e,t)}function TI(e,t,n){return t=CI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CI(e){var t=V2e(e,"string");return Rc(t)=="symbol"?t:t+""}function V2e(e,t){if(Rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function NS(){return NS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NS.apply(this,arguments)}var H2e=function(t){var n=t.yAxisId,r=K2(),a=G2(),i=oI(n);return i==null?null:j.createElement(du,NS({},i,{className:be("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(o){return Ua(o,!0)}}))},ts=function(e){function t(){return $2e(this,t),z2e(this,t,arguments)}return F2e(t,e),I2e(t,[{key:"render",value:function(){return j.createElement(H2e,this.props)}}])}(j.Component);TI(ts,"displayName","YAxis");TI(ts,"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 UP(e){return Y2e(e)||G2e(e)||K2e(e)||q2e()}function q2e(){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 K2e(e,t){if(e){if(typeof e=="string")return ES(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 ES(e,t)}}function G2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y2e(e){if(Array.isArray(e))return ES(e)}function ES(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 TS=function(t,n,r,a,i){var s=er(t,W2),o=er(t,mv),c=[].concat(UP(s),UP(o)),u=er(t,yv),d="".concat(a,"Id"),f=a[0],h=n;if(c.length&&(h=c.reduce(function(m,v){if(v.props[d]===r&&ha(v.props,"extendDomain")&&Y(v.props[f])){var y=v.props[f];return[Math.min(m[0],y),Math.max(m[1],y)]}return m},h)),u.length){var p="".concat(f,"1"),g="".concat(f,"2");h=u.reduce(function(m,v){if(v.props[d]===r&&ha(v.props,"extendDomain")&&Y(v.props[p])&&Y(v.props[g])){var y=v.props[p],x=v.props[g];return[Math.min(m[0],y,x),Math.max(m[1],y,x)]}return m},h)}return i&&i.length&&(h=i.reduce(function(m,v){return Y(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},h)),h},_I={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new a(d,f||c,h),g=n?n+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],p]:c._events[g].push(p):(c._events[g]=p,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},o.prototype.listeners=function(u){var d=n?n+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},o.prototype.listenerCount=function(u){var d=n?n+u:u,f=this._events[d];return f?f.fn?1:f.length:0},o.prototype.emit=function(u,d,f,h,p,g){var m=n?n+u:u;if(!this._events[m])return!1;var v=this._events[m],y=arguments.length,x,b;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,h),!0;case 5:return v.fn.call(v.context,d,f,h,p),!0;case 6:return v.fn.call(v.context,d,f,h,p,g),!0}for(b=1,x=new Array(y-1);b<y;b++)x[b-1]=arguments[b];v.fn.apply(v.context,x)}else{var w=v.length,S;for(b=0;b<w;b++)switch(v[b].once&&this.removeListener(u,v[b].fn,void 0,!0),y){case 1:v[b].fn.call(v[b].context);break;case 2:v[b].fn.call(v[b].context,d);break;case 3:v[b].fn.call(v[b].context,d,f);break;case 4:v[b].fn.call(v[b].context,d,f,h);break;default:if(!x)for(S=1,x=new Array(y-1);S<y;S++)x[S-1]=arguments[S];v[b].fn.apply(v[b].context,x)}}return!0},o.prototype.on=function(u,d,f){return i(this,u,d,f,!1)},o.prototype.once=function(u,d,f){return i(this,u,d,f,!0)},o.prototype.removeListener=function(u,d,f,h){var p=n?n+u:u;if(!this._events[p])return this;if(!d)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&s(this,p);else{for(var m=0,v=[],y=g.length;m<y;m++)(g[m].fn!==d||h&&!g[m].once||f&&g[m].context!==f)&&v.push(g[m]);v.length?this._events[p]=v.length===1?v[0]:v:s(this,p)}return this},o.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&s(this,d)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(_I);var W2e=_I.exports;const X2e=Fe(W2e);var sb=new X2e,ob="recharts.syncMouseEvents";function Cf(e){"@babel/helpers - typeof";return Cf=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},Cf(e)}function Q2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z2e(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,PI(r.key),r)}}function J2e(e,t,n){return t&&Z2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lb(e,t,n){return t=PI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PI(e){var t=eAe(e,"string");return Cf(t)=="symbol"?t:t+""}function eAe(e,t){if(Cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tAe=function(){function e(){Q2e(this,e),lb(this,"activeIndex",0),lb(this,"coordinateList",[]),lb(this,"layout","horizontal")}return J2e(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,s=n.container,o=s===void 0?null:s,c=n.layout,u=c===void 0?null:c,d=n.offset,f=d===void 0?null:d,h=n.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??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 a=this.container.getBoundingClientRect(),i=a.x,s=a.y,o=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=i+c+u,h=s+this.offset.top+o/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function nAe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&Y(r)&&Y(a))return!0}return!1}function rAe(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function MI(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,s=nt(t,n,r,a),o=nt(t,n,r,i);return{points:[s,o],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function aAe(e,t,n){var r,a,i,s;if(e==="horizontal")r=t.x,i=r,a=n.top,s=n.top+n.height;else if(e==="vertical")a=t.y,s=a,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,h=nt(o,c,u,f),p=nt(o,c,d,f);r=h.x,a=h.y,i=p.x,s=p.y}else return MI(t);return[{x:r,y:a},{x:i,y:s}]}function _f(e){"@babel/helpers - typeof";return _f=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},_f(e)}function FP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function op(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(n),!0).forEach(function(r){iAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iAe(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 _f(t)=="symbol"?t:t+""}function oAe(e,t){if(_f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lAe(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,s=e.activeCoordinate,o=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!p||!i||!s||h!=="ScatterChart"&&a!=="axis")return null;var g,m=io;if(h==="ScatterChart")g=s,m=g0e;else if(h==="BarChart")g=rAe(f,s,c,d),m=U2;else if(f==="radial"){var v=MI(s),y=v.cx,x=v.cy,b=v.radius,w=v.startAngle,S=v.endAngle;g={cx:y,cy:x,startAngle:w,endAngle:S,innerRadius:b,outerRadius:b},m=O6}else g={points:aAe(f,s,c)},m=io;var A=op(op(op(op({stroke:"#ccc",pointerEvents:"none"},c),g),ie(p,!1)),{},{payload:o,payloadIndex:u,className:be("recharts-tooltip-cursor",p.className)});return j.isValidElement(p)?j.cloneElement(p,A):j.createElement(m,A)}var cAe=["item"],uAe=["children","className","width","height","style","compact","title","desc"];function Dc(e){"@babel/helpers - typeof";return Dc=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},Dc(e)}function Sl(){return Sl=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},Sl.apply(this,arguments)}function VP(e,t){return hAe(e)||fAe(e,t)||RI(e,t)||dAe()}function dAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,s,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function hAe(e){if(Array.isArray(e))return e}function HP(e,t){if(e==null)return{};var n=pAe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pAe(e,t){if(e==null)return{};var n={};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 mAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gAe(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,DI(r.key),r)}}function yAe(e,t,n){return t&&gAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vAe(e,t,n){return t=Ug(t),xAe(e,kI()?Reflect.construct(t,n||[],Ug(e).constructor):t.apply(e,n))}function xAe(e,t){if(t&&(Dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bAe(e)}function bAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kI=function(){return!!e})()}function Ug(e){return Ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ug(e)}function SAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CS(e,t)}function CS(e,t){return CS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},CS(e,t)}function $c(e){return AAe(e)||jAe(e)||RI(e)||wAe()}function wAe(){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 RI(e,t){if(e){if(typeof e=="string")return _S(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 _S(e,t)}}function jAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AAe(e){if(Array.isArray(e))return _S(e)}function _S(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 qP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qP(Object(n),!0).forEach(function(r){fe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fe(e,t,n){return t=DI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DI(e){var t=OAe(e,"string");return Dc(t)=="symbol"?t:t+""}function OAe(e,t){if(Dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var NAe={xAxis:["bottom","top"],yAxis:["left","right"]},EAe={width:"100%",height:"100%"},$I={x:0,y:0};function lp(e){return e}var TAe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},CAe=function(t,n,r,a){var i=n.find(function(d){return d&&d.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var s=i.coordinate,o=a.radius;return F(F(F({},a),nt(a.cx,a.cy,o,s)),{},{angle:s,radius:o})}var c=i.coordinate,u=a.angle;return F(F(F({},a),nt(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return $I},vv=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,s=(r??[]).reduce(function(o,c){var u=c.props.data;return u&&u.length?[].concat($c(o),$c(u)):o},[]);return s.length>0?s:t&&t.length&&Y(a)&&Y(i)?t.slice(a,i+1):[]};function LI(e){return e==="number"?[0,"auto"]:void 0}var PS=function(t,n,r,a){var i=t.graphicalItems,s=t.tooltipAxis,o=vv(n,t);return r<0||!i||!i.length||r>=o.length?null:i.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=f===void 0?o:f;h=Im(p,s.dataKey,a)}else h=f&&f[r]||o[r];return h?[].concat($c(c),[x6(u,h)]):c},[])},KP=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},s=TAe(i,r),o=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=$ye(s,o,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=PS(t,n,d,f),p=CAe(r,o,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},_Ae=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,s=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=h6(d,i);return r.reduce(function(g,m){var v,y=m.type.defaultProps!==void 0?F(F({},m.type.defaultProps),m.props):m.props,x=y.type,b=y.dataKey,w=y.allowDataOverflow,S=y.allowDuplicatedCategory,A=y.scale,O=y.ticks,N=y.includeHidden,E=y[s];if(g[E])return g;var T=vv(t.data,{graphicalItems:a.filter(function(G){var ne,J=s in G.props?G.props[s]:(ne=G.type.defaultProps)===null||ne===void 0?void 0:ne[s];return J===E}),dataStartIndex:c,dataEndIndex:u}),_=T.length,C,$,R;nAe(y.domain,w,x)&&(C=H1(y.domain,null,w),p&&(x==="number"||A!=="auto")&&(R=vd(T,b,"category")));var k=LI(x);if(!C||C.length===0){var M,L=(M=y.domain)!==null&&M!==void 0?M:k;if(b){if(C=vd(T,b,x),x==="category"&&p){var z=Nne(C);S&&z?($=C,C=Eg(0,_)):S||(C=m_(L,C,m).reduce(function(G,ne){return G.indexOf(ne)>=0?G:[].concat($c(G),[ne])},[]))}else if(x==="category")S?C=C.filter(function(G){return G!==""&&!ye(G)}):C=m_(L,C,m).reduce(function(G,ne){return G.indexOf(ne)>=0||ne===""||ye(ne)?G:[].concat($c(G),[ne])},[]);else if(x==="number"){var V=Uye(T,a.filter(function(G){var ne,J,ve=s in G.props?G.props[s]:(ne=G.type.defaultProps)===null||ne===void 0?void 0:ne[s],ee="hide"in G.props?G.props.hide:(J=G.type.defaultProps)===null||J===void 0?void 0:J.hide;return ve===E&&(N||!ee)}),b,i,d);V&&(C=V)}p&&(x==="number"||A!=="auto")&&(R=vd(T,b,"category"))}else p?C=Eg(0,_):o&&o[E]&&o[E].hasStack&&x==="number"?C=h==="expand"?[0,1]:v6(o[E].stackGroups,c,u):C=f6(T,a.filter(function(G){var ne=s in G.props?G.props[s]:G.type.defaultProps[s],J="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return ne===E&&(N||!J)}),x,d,!0);if(x==="number")C=TS(f,C,E,i,O),L&&(C=H1(L,C,w));else if(x==="category"&&L){var K=L,U=C.every(function(G){return K.indexOf(G)>=0});U&&(C=K)}}return F(F({},g),{},fe({},E,F(F({},y),{},{axisType:i,domain:C,categoricalDomain:R,duplicateDomain:$,originalDomain:(v=y.domain)!==null&&v!==void 0?v:k,isCategorical:p,layout:d})))},{})},PAe=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,s=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=vv(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=h.length,g=h6(d,i),m=-1;return r.reduce(function(v,y){var x=y.type.defaultProps!==void 0?F(F({},y.type.defaultProps),y.props):y.props,b=x[s],w=LI("number");if(!v[b]){m++;var S;return g?S=Eg(0,p):o&&o[b]&&o[b].hasStack?(S=v6(o[b].stackGroups,c,u),S=TS(f,S,b,i)):(S=H1(w,f6(h,r.filter(function(A){var O,N,E=s in A.props?A.props[s]:(O=A.type.defaultProps)===null||O===void 0?void 0:O[s],T="hide"in A.props?A.props.hide:(N=A.type.defaultProps)===null||N===void 0?void 0:N.hide;return E===b&&!T}),"number",d),a.defaultProps.allowDataOverflow),S=TS(f,S,b,i)),F(F({},v),{},fe({},b,F(F({axisType:i},a.defaultProps),{},{hide:!0,orientation:Jn(NAe,"".concat(i,".").concat(m%2),null),domain:S,originalDomain:w,isCategorical:g,layout:d})))}return v},{})},MAe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,s=n.graphicalItems,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.children,f="".concat(a,"Id"),h=er(d,i),p={};return h&&h.length?p=_Ae(t,{axes:h,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:o,dataStartIndex:c,dataEndIndex:u}):s&&s.length&&(p=PAe(t,{Axis:i,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:o,dataStartIndex:c,dataEndIndex:u})),p},kAe=function(t){var n=Ei(t),r=Ua(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:p2(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:pg(n,r)}},GP=function(t){var n=t.children,r=t.defaultShowTooltip,a=Un(n,Oc),i=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(s=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!r}},RAe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Wa(n&&n.type);return r&&r.indexOf("Bar")>=0})},YP=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"}},DAe=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,s=i===void 0?{}:i,o=t.yAxisMap,c=o===void 0?{}:o,u=r.width,d=r.height,f=r.children,h=r.margin||{},p=Un(f,Oc),g=Un(f,ia),m=Object.keys(c).reduce(function(S,A){var O=c[A],N=O.orientation;return!O.mirror&&!O.hide?F(F({},S),{},fe({},N,S[N]+O.width)):S},{left:h.left||0,right:h.right||0}),v=Object.keys(s).reduce(function(S,A){var O=s[A],N=O.orientation;return!O.mirror&&!O.hide?F(F({},S),{},fe({},N,Jn(S,"".concat(N))+O.height)):S},{top:h.top||0,bottom:h.bottom||0}),y=F(F({},v),m),x=y.bottom;p&&(y.bottom+=p.props.height||Oc.defaultProps.height),g&&n&&(y=zye(y,a,r,n));var b=u-y.left-y.right,w=d-y.top-y.bottom;return F(F({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(w,0)})},$Ae=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},xv=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,s=t.validateTooltipEventTypes,o=s===void 0?["axis"]:s,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(y,x){var b=x.graphicalItems,w=x.stackGroups,S=x.offset,A=x.updateId,O=x.dataStartIndex,N=x.dataEndIndex,E=y.barSize,T=y.layout,_=y.barGap,C=y.barCategoryGap,$=y.maxBarSize,R=YP(T),k=R.numericAxisName,M=R.cateAxisName,L=RAe(b),z=[];return b.forEach(function(V,K){var U=vv(y.data,{graphicalItems:[V],dataStartIndex:O,dataEndIndex:N}),G=V.type.defaultProps!==void 0?F(F({},V.type.defaultProps),V.props):V.props,ne=G.dataKey,J=G.maxBarSize,ve=G["".concat(k,"Id")],ee=G["".concat(M,"Id")],ct={},Ke=c.reduce(function(Sa,wa){var zo=x["".concat(wa.axisType,"Map")],ce=G["".concat(wa.axisType,"Id")];zo&&zo[ce]||wa.axisType==="zAxis"||So();var Ut=zo[ce];return F(F({},Sa),{},fe(fe({},wa.axisType,Ut),"".concat(wa.axisType,"Ticks"),Ua(Ut)))},ct),X=Ke[M],le=Ke["".concat(M,"Ticks")],Q=w&&w[ve]&&w[ve].hasStack&&Xye(V,w[ve].stackGroups),q=Wa(V.type).indexOf("Bar")>=0,ke=pg(X,le),xe=[],Ze=L&&Lye({barSize:E,stackGroups:w,totalSize:$Ae(Ke,M)});if(q){var ut,pt,Ln=ye(J)?$:J,pi=(ut=(pt=pg(X,le,!0))!==null&&pt!==void 0?pt:Ln)!==null&&ut!==void 0?ut:0;xe=Iye({barGap:_,barCategoryGap:C,bandSize:pi!==ke?pi:ke,sizeList:Ze[ee],maxBarSize:Ln}),pi!==ke&&(xe=xe.map(function(Sa){return F(F({},Sa),{},{position:F(F({},Sa.position),{},{offset:Sa.position.offset-pi/2})})}))}var Io=V&&V.type&&V.type.getComposedData;Io&&z.push({props:F(F({},Io(F(F({},Ke),{},{displayedData:U,props:y,dataKey:ne,item:V,bandSize:ke,barPosition:xe,offset:S,stackedData:Q,layout:T,dataStartIndex:O,dataEndIndex:N}))),{},fe(fe(fe({key:V.key||"item-".concat(K)},k,Ke[k]),M,Ke[M]),"animationId",A)),childIndex:Ine(V,y.children),item:V})}),z},p=function(y,x){var b=y.props,w=y.dataStartIndex,S=y.dataEndIndex,A=y.updateId;if(!cT({props:b}))return null;var O=b.children,N=b.layout,E=b.stackOffset,T=b.data,_=b.reverseStackOrder,C=YP(N),$=C.numericAxisName,R=C.cateAxisName,k=er(O,r),M=Yye(T,k,"".concat($,"Id"),"".concat(R,"Id"),E,_),L=c.reduce(function(G,ne){var J="".concat(ne.axisType,"Map");return F(F({},G),{},fe({},J,MAe(b,F(F({},ne),{},{graphicalItems:k,stackGroups:ne.axisType===$&&M,dataStartIndex:w,dataEndIndex:S}))))},{}),z=DAe(F(F({},L),{},{props:b,graphicalItems:k}),x==null?void 0:x.legendBBox);Object.keys(L).forEach(function(G){L[G]=d(b,L[G],z,G.replace("Map",""),n)});var V=L["".concat(R,"Map")],K=kAe(V),U=h(b,F(F({},L),{},{dataStartIndex:w,dataEndIndex:S,updateId:A,graphicalItems:k,stackGroups:M,offset:z}));return F(F({formattedGraphicalItems:U,graphicalItems:k,offset:z,stackGroups:M},K),L)},g=function(v){function y(x){var b,w,S;return mAe(this,y),S=vAe(this,y,[x]),fe(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),fe(S,"accessibilityManager",new tAe),fe(S,"handleLegendBBoxUpdate",function(A){if(A){var O=S.state,N=O.dataStartIndex,E=O.dataEndIndex,T=O.updateId;S.setState(F({legendBBox:A},p({props:S.props,dataStartIndex:N,dataEndIndex:E,updateId:T},F(F({},S.state),{},{legendBBox:A}))))}}),fe(S,"handleReceiveSyncEvent",function(A,O,N){if(S.props.syncId===A){if(N===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(O)}}),fe(S,"handleBrushChange",function(A){var O=A.startIndex,N=A.endIndex;if(O!==S.state.dataStartIndex||N!==S.state.dataEndIndex){var E=S.state.updateId;S.setState(function(){return F({dataStartIndex:O,dataEndIndex:N},p({props:S.props,dataStartIndex:O,dataEndIndex:N,updateId:E},S.state))}),S.triggerSyncEvent({dataStartIndex:O,dataEndIndex:N})}}),fe(S,"handleMouseEnter",function(A){var O=S.getMouseInfo(A);if(O){var N=F(F({},O),{},{isTooltipActive:!0});S.setState(N),S.triggerSyncEvent(N);var E=S.props.onMouseEnter;pe(E)&&E(N,A)}}),fe(S,"triggeredAfterMouseMove",function(A){var O=S.getMouseInfo(A),N=O?F(F({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(N),S.triggerSyncEvent(N);var E=S.props.onMouseMove;pe(E)&&E(N,A)}),fe(S,"handleItemMouseEnter",function(A){S.setState(function(){return{isTooltipActive:!0,activeItem:A,activePayload:A.tooltipPayload,activeCoordinate:A.tooltipPosition||{x:A.cx,y:A.cy}}})}),fe(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),fe(S,"handleMouseMove",function(A){A.persist(),S.throttleTriggeredAfterMouseMove(A)}),fe(S,"handleMouseLeave",function(A){S.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};S.setState(O),S.triggerSyncEvent(O);var N=S.props.onMouseLeave;pe(N)&&N(O,A)}),fe(S,"handleOuterEvent",function(A){var O=Lne(A),N=Jn(S.props,"".concat(O));if(O&&pe(N)){var E,T;/.*touch.*/i.test(O)?T=S.getMouseInfo(A.changedTouches[0]):T=S.getMouseInfo(A),N((E=T)!==null&&E!==void 0?E:{},A)}}),fe(S,"handleClick",function(A){var O=S.getMouseInfo(A);if(O){var N=F(F({},O),{},{isTooltipActive:!0});S.setState(N),S.triggerSyncEvent(N);var E=S.props.onClick;pe(E)&&E(N,A)}}),fe(S,"handleMouseDown",function(A){var O=S.props.onMouseDown;if(pe(O)){var N=S.getMouseInfo(A);O(N,A)}}),fe(S,"handleMouseUp",function(A){var O=S.props.onMouseUp;if(pe(O)){var N=S.getMouseInfo(A);O(N,A)}}),fe(S,"handleTouchMove",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(A.changedTouches[0])}),fe(S,"handleTouchStart",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&S.handleMouseDown(A.changedTouches[0])}),fe(S,"handleTouchEnd",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&S.handleMouseUp(A.changedTouches[0])}),fe(S,"handleDoubleClick",function(A){var O=S.props.onDoubleClick;if(pe(O)){var N=S.getMouseInfo(A);O(N,A)}}),fe(S,"handleContextMenu",function(A){var O=S.props.onContextMenu;if(pe(O)){var N=S.getMouseInfo(A);O(N,A)}}),fe(S,"triggerSyncEvent",function(A){S.props.syncId!==void 0&&sb.emit(ob,S.props.syncId,A,S.eventEmitterSymbol)}),fe(S,"applySyncEvent",function(A){var O=S.props,N=O.layout,E=O.syncMethod,T=S.state.updateId,_=A.dataStartIndex,C=A.dataEndIndex;if(A.dataStartIndex!==void 0||A.dataEndIndex!==void 0)S.setState(F({dataStartIndex:_,dataEndIndex:C},p({props:S.props,dataStartIndex:_,dataEndIndex:C,updateId:T},S.state)));else if(A.activeTooltipIndex!==void 0){var $=A.chartX,R=A.chartY,k=A.activeTooltipIndex,M=S.state,L=M.offset,z=M.tooltipTicks;if(!L)return;if(typeof E=="function")k=E(z,A);else if(E==="value"){k=-1;for(var V=0;V<z.length;V++)if(z[V].value===A.activeLabel){k=V;break}}var K=F(F({},L),{},{x:L.left,y:L.top}),U=Math.min($,K.x+K.width),G=Math.min(R,K.y+K.height),ne=z[k]&&z[k].value,J=PS(S.state,S.props.data,k),ve=z[k]?{x:N==="horizontal"?z[k].coordinate:U,y:N==="horizontal"?G:z[k].coordinate}:$I;S.setState(F(F({},A),{},{activeLabel:ne,activeCoordinate:ve,activePayload:J,activeTooltipIndex:k}))}else S.setState(A)}),fe(S,"renderCursor",function(A){var O,N=S.state,E=N.isTooltipActive,T=N.activeCoordinate,_=N.activePayload,C=N.offset,$=N.activeTooltipIndex,R=N.tooltipAxisBandSize,k=S.getTooltipEventType(),M=(O=A.props.active)!==null&&O!==void 0?O:E,L=S.props.layout,z=A.key||"_recharts-cursor";return P.createElement(lAe,{key:z,activeCoordinate:T,activePayload:_,activeTooltipIndex:$,chartName:n,element:A,isActive:M,layout:L,offset:C,tooltipAxisBandSize:R,tooltipEventType:k})}),fe(S,"renderPolarAxis",function(A,O,N){var E=Jn(A,"type.axisType"),T=Jn(S.state,"".concat(E,"Map")),_=A.type.defaultProps,C=_!==void 0?F(F({},_),A.props):A.props,$=T&&T[C["".concat(E,"Id")]];return j.cloneElement(A,F(F({},$),{},{className:be(E,$.className),key:A.key||"".concat(O,"-").concat(N),ticks:Ua($,!0)}))}),fe(S,"renderPolarGrid",function(A){var O=A.props,N=O.radialLines,E=O.polarAngles,T=O.polarRadius,_=S.state,C=_.radiusAxisMap,$=_.angleAxisMap,R=Ei(C),k=Ei($),M=k.cx,L=k.cy,z=k.innerRadius,V=k.outerRadius;return j.cloneElement(A,{polarAngles:Array.isArray(E)?E:Ua(k,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(T)?T:Ua(R,!0).map(function(K){return K.coordinate}),cx:M,cy:L,innerRadius:z,outerRadius:V,key:A.key||"polar-grid",radialLines:N})}),fe(S,"renderLegend",function(){var A=S.state.formattedGraphicalItems,O=S.props,N=O.children,E=O.width,T=O.height,_=S.props.margin||{},C=E-(_.left||0)-(_.right||0),$=u6({children:N,formattedGraphicalItems:A,legendWidth:C,legendContent:u});if(!$)return null;var R=$.item,k=HP($,cAe);return j.cloneElement(R,F(F({},k),{},{chartWidth:E,chartHeight:T,margin:_,onBBoxUpdate:S.handleLegendBBoxUpdate}))}),fe(S,"renderTooltip",function(){var A,O=S.props,N=O.children,E=O.accessibilityLayer,T=Un(N,Hn);if(!T)return null;var _=S.state,C=_.isTooltipActive,$=_.activeCoordinate,R=_.activePayload,k=_.activeLabel,M=_.offset,L=(A=T.props.active)!==null&&A!==void 0?A:C;return j.cloneElement(T,{viewBox:F(F({},M),{},{x:M.left,y:M.top}),active:L,label:k,payload:L?R:[],coordinate:$,accessibilityLayer:E})}),fe(S,"renderBrush",function(A){var O=S.props,N=O.margin,E=O.data,T=S.state,_=T.offset,C=T.dataStartIndex,$=T.dataEndIndex,R=T.updateId;return j.cloneElement(A,{key:A.key||"_recharts-brush",onChange:rp(S.handleBrushChange,A.props.onChange),data:E,x:Y(A.props.x)?A.props.x:_.left,y:Y(A.props.y)?A.props.y:_.top+_.height+_.brushBottom-(N.bottom||0),width:Y(A.props.width)?A.props.width:_.width,startIndex:C,endIndex:$,updateId:"brush-".concat(R)})}),fe(S,"renderReferenceElement",function(A,O,N){if(!A)return null;var E=S,T=E.clipPathId,_=S.state,C=_.xAxisMap,$=_.yAxisMap,R=_.offset,k=A.type.defaultProps||{},M=A.props,L=M.xAxisId,z=L===void 0?k.xAxisId:L,V=M.yAxisId,K=V===void 0?k.yAxisId:V;return j.cloneElement(A,{key:A.key||"".concat(O,"-").concat(N),xAxis:C[z],yAxis:$[K],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:T})}),fe(S,"renderActivePoints",function(A){var O=A.item,N=A.activePoint,E=A.basePoint,T=A.childIndex,_=A.isRange,C=[],$=O.props.key,R=O.item.type.defaultProps!==void 0?F(F({},O.item.type.defaultProps),O.item.props):O.item.props,k=R.activeDot,M=R.dataKey,L=F(F({index:T,dataKey:M,cx:N.x,cy:N.y,r:4,fill:B2(O.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},ie(k,!1)),zm(k));return C.push(y.renderActiveDot(k,L,"".concat($,"-activePoint-").concat(T))),E?C.push(y.renderActiveDot(k,F(F({},L),{},{cx:E.x,cy:E.y}),"".concat($,"-basePoint-").concat(T))):_&&C.push(null),C}),fe(S,"renderGraphicChild",function(A,O,N){var E=S.filterFormatItem(A,O,N);if(!E)return null;var T=S.getTooltipEventType(),_=S.state,C=_.isTooltipActive,$=_.tooltipAxis,R=_.activeTooltipIndex,k=_.activeLabel,M=S.props.children,L=Un(M,Hn),z=E.props,V=z.points,K=z.isRange,U=z.baseLine,G=E.item.type.defaultProps!==void 0?F(F({},E.item.type.defaultProps),E.item.props):E.item.props,ne=G.activeDot,J=G.hide,ve=G.activeBar,ee=G.activeShape,ct=!!(!J&&C&&L&&(ne||ve||ee)),Ke={};T!=="axis"&&L&&L.props.trigger==="click"?Ke={onClick:rp(S.handleItemMouseEnter,A.props.onClick)}:T!=="axis"&&(Ke={onMouseLeave:rp(S.handleItemMouseLeave,A.props.onMouseLeave),onMouseEnter:rp(S.handleItemMouseEnter,A.props.onMouseEnter)});var X=j.cloneElement(A,F(F({},E.props),Ke));function le(wa){return typeof $.dataKey=="function"?$.dataKey(wa.payload):null}if(ct)if(R>=0){var Q,q;if($.dataKey&&!$.allowDuplicatedCategory){var ke=typeof $.dataKey=="function"?le:"payload.".concat($.dataKey.toString());Q=Im(V,ke,k),q=K&&U&&Im(U,ke,k)}else Q=V==null?void 0:V[R],q=K&&U&&U[R];if(ee||ve){var xe=A.props.activeIndex!==void 0?A.props.activeIndex:R;return[j.cloneElement(A,F(F(F({},E.props),Ke),{},{activeIndex:xe})),null,null]}if(!ye(Q))return[X].concat($c(S.renderActivePoints({item:E,activePoint:Q,basePoint:q,childIndex:R,isRange:K})))}else{var Ze,ut=(Ze=S.getItemByXY(S.state.activeCoordinate))!==null&&Ze!==void 0?Ze:{graphicalItem:X},pt=ut.graphicalItem,Ln=pt.item,pi=Ln===void 0?A:Ln,Io=pt.childIndex,Sa=F(F(F({},E.props),Ke),{},{activeIndex:Io});return[j.cloneElement(pi,Sa),null,null]}return K?[X,null,null]:[X,null]}),fe(S,"renderCustomized",function(A,O,N){return j.cloneElement(A,F(F({key:"recharts-customized-".concat(N)},S.props),S.state))}),fe(S,"renderMap",{CartesianGrid:{handler:lp,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:lp},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:lp},YAxis:{handler:lp},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=x.id)!==null&&b!==void 0?b:Po("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=uL(S.triggeredAfterMouseMove,(w=x.throttleDelay)!==null&&w!==void 0?w:1e3/60),S.state={},S}return SAe(y,v),yAe(y,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,S=b.data,A=b.height,O=b.layout,N=Un(w,Hn);if(N){var E=N.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var T=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,_=PS(this.state,S,E,T),C=this.state.tooltipTicks[E].coordinate,$=(this.state.offset.top+A)/2,R=O==="horizontal",k=R?{x:C,y:$}:{y:C,x:$},M=this.state.formattedGraphicalItems.find(function(z){var V=z.item;return V.type.name==="Scatter"});M&&(k=F(F({},k),M.props.points[E].tooltipPosition),_=M.props.points[E].tooltipPayload);var L={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:T,activePayload:_,activeCoordinate:k};this.setState(L),this.renderCursor(N),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,A;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0}})}return null}},{key:"componentDidUpdate",value:function(b){i1([Un(b.children,Hn)],[Un(this.props.children,Hn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Un(this.props.children,Hn);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return o.indexOf(w)>=0?w:i}return i}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,S=w.getBoundingClientRect(),A=uhe(S),O={chartX:Math.round(b.pageX-A.left),chartY:Math.round(b.pageY-A.top)},N=S.width/w.offsetWidth||1,E=this.inRange(O.chartX,O.chartY,N);if(!E)return null;var T=this.state,_=T.xAxisMap,C=T.yAxisMap,$=this.getTooltipEventType(),R=KP(this.state,this.props.data,this.props.layout,E);if($!=="axis"&&_&&C){var k=Ei(_).scale,M=Ei(C).scale,L=k&&k.invert?k.invert(O.chartX):null,z=M&&M.invert?M.invert(O.chartY):null;return F(F({},O),{},{xValue:L,yValue:z},R)}return R?F(F({},O),R):null}},{key:"inRange",value:function(b,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=this.props.layout,O=b/S,N=w/S;if(A==="horizontal"||A==="vertical"){var E=this.state.offset,T=O>=E.left&&O<=E.left+E.width&&N>=E.top&&N<=E.top+E.height;return T?{x:O,y:N}:null}var _=this.state,C=_.angleAxisMap,$=_.radiusAxisMap;if(C&&$){var R=Ei(C);return v_({x:O,y:N},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),S=Un(b,Hn),A={};S&&w==="axis"&&(S.props.trigger==="click"?A={onClick:this.handleClick}:A={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 O=zm(this.props,this.handleOuterEvent);return F(F({},O),A)}},{key:"addListener",value:function(){sb.on(ob,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){sb.removeListener(ob,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,S){for(var A=this.state.formattedGraphicalItems,O=0,N=A.length;O<N;O++){var E=A[O];if(E.item===b||E.props.key===b.key||w===Wa(E.item.type)&&S===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,w=this.state.offset,S=w.left,A=w.top,O=w.height,N=w.width;return P.createElement("defs",null,P.createElement("clipPath",{id:b},P.createElement("rect",{x:S,y:A,height:O,width:N})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(w,S){var A=VP(S,2),O=A[0],N=A[1];return F(F({},w),{},fe({},O,N.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(w,S){var A=VP(S,2),O=A[0],N=A[1];return F(F({},w),{},fe({},O,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(b){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(b){var w=this.state,S=w.formattedGraphicalItems,A=w.activeItem;if(S&&S.length)for(var O=0,N=S.length;O<N;O++){var E=S[O],T=E.props,_=E.item,C=_.type.defaultProps!==void 0?F(F({},_.type.defaultProps),_.props):_.props,$=Wa(_.type);if($==="Bar"){var R=(T.data||[]).find(function(z){return Xbe(b,z)});if(R)return{graphicalItem:E,payload:R}}else if($==="RadialBar"){var k=(T.data||[]).find(function(z){return v_(b,z)});if(k)return{graphicalItem:E,payload:k}}else if(dv(E,A)||fv(E,A)||Af(E,A)){var M=I1e({graphicalItem:E,activeTooltipItem:A,itemData:C.data}),L=C.activeIndex===void 0?M:C.activeIndex;return{graphicalItem:F(F({},E),{},{childIndex:L}),payload:Af(E,A)?C.data[M]:E.props.data[M]}}}return null}},{key:"render",value:function(){var b=this;if(!cT(this))return null;var w=this.props,S=w.children,A=w.className,O=w.width,N=w.height,E=w.style,T=w.compact,_=w.title,C=w.desc,$=HP(w,uAe),R=ie($,!1);if(T)return P.createElement(jP,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement(o1,Sl({},R,{width:O,height:N,title:_,desc:C}),this.renderClipPath(),dT(S,this.renderMap)));if(this.props.accessibilityLayer){var k,M;R.tabIndex=(k=this.props.tabIndex)!==null&&k!==void 0?k:0,R.role=(M=this.props.role)!==null&&M!==void 0?M:"application",R.onKeyDown=function(z){b.accessibilityManager.keyboardEvent(z)},R.onFocus=function(){b.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return P.createElement(jP,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement("div",Sl({className:be("recharts-wrapper",A),style:F({position:"relative",cursor:"default",width:O,height:N},E)},L,{ref:function(V){b.container=V}}),P.createElement(o1,Sl({},R,{width:O,height:N,title:_,desc:C,style:EAe}),this.renderClipPath(),dT(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(j.Component);fe(g,"displayName",n),fe(g,"defaultProps",F({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),fe(g,"getDerivedStateFromProps",function(v,y){var x=v.dataKey,b=v.data,w=v.children,S=v.width,A=v.height,O=v.layout,N=v.stackOffset,E=v.margin,T=y.dataStartIndex,_=y.dataEndIndex;if(y.updateId===void 0){var C=GP(v);return F(F(F({},C),{},{updateId:0},p(F(F({props:v},C),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:b,prevWidth:S,prevHeight:A,prevLayout:O,prevStackOffset:N,prevMargin:E,prevChildren:w})}if(x!==y.prevDataKey||b!==y.prevData||S!==y.prevWidth||A!==y.prevHeight||O!==y.prevLayout||N!==y.prevStackOffset||!Pl(E,y.prevMargin)){var $=GP(v),R={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},k=F(F({},KP(y,b,O)),{},{updateId:y.updateId+1}),M=F(F(F({},$),R),k);return F(F(F({},M),p(F({props:v},M),y)),{},{prevDataKey:x,prevData:b,prevWidth:S,prevHeight:A,prevLayout:O,prevStackOffset:N,prevMargin:E,prevChildren:w})}if(!i1(w,y.prevChildren)){var L,z,V,K,U=Un(w,Oc),G=U&&(L=(z=U.props)===null||z===void 0?void 0:z.startIndex)!==null&&L!==void 0?L:T,ne=U&&(V=(K=U.props)===null||K===void 0?void 0:K.endIndex)!==null&&V!==void 0?V:_,J=G!==T||ne!==_,ve=!ye(b),ee=ve&&!J?y.updateId:y.updateId+1;return F(F({updateId:ee},p(F(F({props:v},y),{},{updateId:ee,dataStartIndex:G,dataEndIndex:ne}),y)),{},{prevChildren:w,dataStartIndex:G,dataEndIndex:ne})}return null}),fe(g,"renderActiveDot",function(v,y,x){var b;return j.isValidElement(v)?b=j.cloneElement(v,y):pe(v)?b=v(y):b=P.createElement(yh,y),P.createElement(Ne,{className:"recharts-active-dot",key:x},b)});var m=j.forwardRef(function(y,x){return P.createElement(g,Sl({},y,{ref:x}))});return m.displayName=g.displayName,m},LAe=xv({chartName:"LineChart",GraphicalChild:vh,axisComponents:[{axisType:"xAxis",AxisComp:es},{axisType:"yAxis",AxisComp:ts}],formatAxisMap:F2}),IAe=xv({chartName:"BarChart",GraphicalChild:Do,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:es},{axisType:"yAxis",AxisComp:ts}],formatAxisMap:F2}),zAe=xv({chartName:"PieChart",GraphicalChild:hi,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:uv},{axisType:"radiusAxis",AxisComp:lv}],formatAxisMap:sve,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),BAe=xv({chartName:"AreaChart",GraphicalChild:ms,axisComponents:[{axisType:"xAxis",AxisComp:es},{axisType:"yAxis",AxisComp:ts}],formatAxisMap:F2});const Yr=["#00a0c8","#3ddc97","#f59e0b","#ef4444","#8b5cf6","#06b6d4","#ec4899","#e84a7f"],Go={fontSize:11,fill:"#94a3b8"},cp={background:"#0f172a",border:"1px solid #1e293b",borderRadius:8,fontSize:12,color:"#e2e8f0"};function Fa({type:e="BAR",rows:t,dataKeys:n,xKey:r="name",height:a=260}){if(!t||!t.length)return l.jsx("div",{className:"flex items-center justify-center text-slate-500 text-sm",style:{height:a},children:"No data"});const i=(e||"BAR").toUpperCase();if(i==="PIE"){const s=n[0];return l.jsx(Zh,{width:"100%",height:a,children:l.jsxs(zAe,{children:[l.jsx(hi,{data:t,dataKey:s,nameKey:r,outerRadius:a/2.8,innerRadius:a/5,children:t.map((o,c)=>l.jsx(Xy,{fill:Yr[c%Yr.length]},c))}),l.jsx(Hn,{contentStyle:cp}),l.jsx(ia,{wrapperStyle:{fontSize:11}})]})})}return i==="LINE"?l.jsx(Zh,{width:"100%",height:a,children:l.jsxs(LAe,{data:t,children:[l.jsx(Bp,{strokeDasharray:"3 3",stroke:"#1e293b"}),l.jsx(es,{dataKey:r,tick:Go}),l.jsx(ts,{tick:Go}),l.jsx(Hn,{contentStyle:cp}),l.jsx(ia,{wrapperStyle:{fontSize:11}}),n.map((s,o)=>l.jsx(vh,{type:"monotone",dataKey:s,stroke:Yr[o%Yr.length],strokeWidth:2,dot:!1},s))]})}):i==="AREA"?l.jsx(Zh,{width:"100%",height:a,children:l.jsxs(BAe,{data:t,children:[l.jsx(Bp,{strokeDasharray:"3 3",stroke:"#1e293b"}),l.jsx(es,{dataKey:r,tick:Go}),l.jsx(ts,{tick:Go}),l.jsx(Hn,{contentStyle:cp}),l.jsx(ia,{wrapperStyle:{fontSize:11}}),n.map((s,o)=>l.jsx(ms,{type:"monotone",dataKey:s,stroke:Yr[o%Yr.length],fill:Yr[o%Yr.length],fillOpacity:.18,strokeWidth:2},s))]})}):l.jsx(Zh,{width:"100%",height:a,children:l.jsxs(IAe,{data:t,children:[l.jsx(Bp,{strokeDasharray:"3 3",stroke:"#1e293b"}),l.jsx(es,{dataKey:r,tick:Go}),l.jsx(ts,{tick:Go}),l.jsx(Hn,{contentStyle:cp,cursor:{fill:"#1e293b55"}}),l.jsx(ia,{wrapperStyle:{fontSize:11}}),n.map((s,o)=>l.jsx(Do,{dataKey:s,fill:Yr[o%Yr.length],radius:[3,3,0,0]},s))]})})}function up({icon:e,label:t,value:n,sub:r}){return l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-xs text-slate-400",children:t}),l.jsx(e,{size:18,className:"text-brand"})]}),l.jsx("div",{className:"text-2xl font-bold",children:n}),r&&l.jsx("div",{className:"text-xs text-slate-500 mt-1",children:r})]})}function UAe(){const{t:e}=ci(),{data:t}=oe({queryKey:["adash"],queryFn:()=>wX(1,500)}),{data:n}=oe({queryKey:["store-sales"],queryFn:()=>I5(7)}),{data:r}=oe({queryKey:["trend"],queryFn:()=>z5(14)}),{data:a}=oe({queryKey:["top"],queryFn:()=>B5(8)}),i=(t==null?void 0:t.today)||{},s=(n||[]).map(u=>({name:u.storeCode||u.storeName,Revenue:u.sales,Orders:u.orderCount})),o=(r||[]).map(u=>({name:(u.date||"").slice(5),Revenue:u.sales,Orders:u.orderCount})),c=(a||[]).map(u=>({name:u.name,"Units Sold":u.salesCount}));return l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-bold mb-5",children:e("admin.dashboard.title")}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[l.jsx(up,{icon:fG,label:e("admin.dashboard.todaysRevenue"),value:Oe(i.totalSales)}),l.jsx(up,{icon:Rj,label:e("admin.dashboard.todaysOrders"),value:`${i.orderCount||0}`}),l.jsx(up,{icon:BG,label:e("admin.dashboard.stores"),value:`${((t==null?void 0:t.storeRanking)||[]).length}`,sub:e("admin.dashboard.storesSub")}),l.jsx(up,{icon:ri,label:e("admin.dashboard.largeOrders"),value:`${((t==null?void 0:t.bigOrders)||[]).length}`,sub:e("admin.dashboard.largeOrdersSub")})]}),l.jsxs("div",{className:"grid lg:grid-cols-2 gap-5 mb-6",children:[l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:e("admin.dashboard.revenueByStore")}),l.jsx(Fa,{type:"BAR",rows:s,dataKeys:["Revenue","Orders"]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:e("admin.dashboard.revenueTrend")}),l.jsx(Fa,{type:"AREA",rows:o,dataKeys:["Revenue"]})]})]}),l.jsxs("div",{className:"grid lg:grid-cols-2 gap-5",children:[l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:e("admin.dashboard.bestSellers")}),l.jsx(Fa,{type:"BAR",rows:c,dataKeys:["Units Sold"]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:e("admin.dashboard.storeRanking")}),l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge",children:[l.jsx("th",{className:"text-left py-2",children:e("admin.dashboard.store")}),l.jsx("th",{className:"text-right",children:e("admin.dashboard.revenue")}),l.jsx("th",{className:"text-right",children:e("admin.dashboard.orders")})]})}),l.jsxs("tbody",{children:[((t==null?void 0:t.storeRanking)||[]).map((u,d)=>l.jsxs("tr",{className:"border-b border-edge/50",children:[l.jsx("td",{className:"py-2",children:u.storeName||u.storeCode}),l.jsx("td",{className:"text-right",children:Oe(u.sales)}),l.jsx("td",{className:"text-right text-slate-400",children:u.orderCount})]},d)),!((t==null?void 0:t.storeRanking)||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:3,className:"text-center text-slate-500 py-6",children:e("common.noData")})})]})]})]})]})]})}const WP={id:0,code:"",name:"",city:"",state:"",zip:"",address:"",phone:"",timezone:"America/New_York",openTime:"09:00",closeTime:"18:00",sameDayCutoff:"12:00",deliveryRadiusMi:"15",dailyCapacity:"50"};function FAe(){const e=Wt(),{data:t}=oe({queryKey:["admin-stores"],queryFn:()=>Co(!1)}),[n,r]=j.useState(!1),[a,i]=j.useState({...WP}),[s,o]=j.useState(""),[c,u]=j.useState(!1),d=()=>e.invalidateQueries({queryKey:["admin-stores"]}),f=async(v,y)=>{await UW(v,!y).catch(()=>{}),d()},h=()=>{i({...WP}),o(""),r(!0)},p=v=>{o(""),i({id:v.id,code:v.code??"",name:v.name??"",city:v.city??"",state:v.state??"",zip:v.zip??"",address:v.address??"",phone:v.phone??"",timezone:v.timezone??"America/New_York",openTime:v.openTime??"09:00",closeTime:v.closeTime??"18:00",sameDayCutoff:v.sameDayCutoff??"12:00",deliveryRadiusMi:String(v.deliveryRadiusMi??15),dailyCapacity:String(v.dailyCapacity??50)}),r(!0)},g=async()=>{if(!a.name.trim()){o("Store name is required.");return}if(!a.id&&!a.code.trim()){o("Store code is required.");return}u(!0),o("");const v={code:a.code.trim(),name:a.name.trim(),city:a.city.trim()||null,state:a.state.trim()||null,zip:a.zip.trim()||null,address:a.address.trim()||null,phone:a.phone.trim()||null,timezone:a.timezone.trim()||null,openTime:a.openTime||null,closeTime:a.closeTime||null,sameDayCutoff:a.sameDayCutoff||null,deliveryRadiusMi:a.deliveryRadiusMi===""?null:Number(a.deliveryRadiusMi),dailyCapacity:a.dailyCapacity===""?null:Number(a.dailyCapacity)};try{a.id?await BW(a.id,v):await zW(v),r(!1),d()}catch{o("Failed to save the store. Please check the inputs.")}finally{u(!1)}},m="bg-panel border border-edge rounded-lg px-3 py-2 text-sm";return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(rh,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Stores"})]}),l.jsxs("button",{onClick:h,className:"flex items-center gap-1.5 bg-brand text-ink text-sm font-semibold px-3 py-2 rounded-lg",children:[l.jsx(oc,{size:15})," New Store"]})]}),n&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 flex items-start justify-center overflow-y-auto p-4",onClick:()=>!c&&r(!1),children:l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 w-full max-w-xl mt-8 space-y-3",onClick:v=>v.stopPropagation(),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h2",{className:"text-lg font-bold",children:a.id?"Edit Store":"New Store"}),l.jsx("button",{onClick:()=>r(!1),className:"text-slate-400 hover:text-slate-200",children:l.jsx(l5,{size:18})})]}),s&&l.jsx("div",{className:"text-xs text-rose-400 bg-rose-500/10 border border-rose-500/30 rounded-lg px-3 py-2",children:s}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsx("input",{value:a.code,onChange:v=>i({...a,code:v.target.value}),disabled:!!a.id,placeholder:"Code *",className:`${m} ${a.id?"opacity-60":""}`}),l.jsx("input",{value:a.name,onChange:v=>i({...a,name:v.target.value}),placeholder:"Store Name *",className:`${m} col-span-2`})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsx("input",{value:a.city,onChange:v=>i({...a,city:v.target.value}),placeholder:"City",className:m}),l.jsx("input",{value:a.state,onChange:v=>i({...a,state:v.target.value}),placeholder:"State",className:m}),l.jsx("input",{value:a.zip,onChange:v=>i({...a,zip:v.target.value}),placeholder:"ZIP",className:m})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsx("input",{value:a.address,onChange:v=>i({...a,address:v.target.value}),placeholder:"Address",className:`${m} col-span-2`}),l.jsx("input",{value:a.phone,onChange:v=>i({...a,phone:v.target.value}),placeholder:"Phone",className:m})]}),l.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[l.jsx("input",{value:a.openTime,onChange:v=>i({...a,openTime:v.target.value}),placeholder:"Open (09:00)",className:m}),l.jsx("input",{value:a.closeTime,onChange:v=>i({...a,closeTime:v.target.value}),placeholder:"Close (18:00)",className:m}),l.jsx("input",{value:a.sameDayCutoff,onChange:v=>i({...a,sameDayCutoff:v.target.value}),placeholder:"Same-Day Cutoff",className:m}),l.jsx("input",{value:a.timezone,onChange:v=>i({...a,timezone:v.target.value}),placeholder:"Timezone",className:m})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx("input",{type:"number",value:a.deliveryRadiusMi,onChange:v=>i({...a,deliveryRadiusMi:v.target.value}),placeholder:"Delivery Radius (mi)",className:m}),l.jsx("input",{type:"number",value:a.dailyCapacity,onChange:v=>i({...a,dailyCapacity:v.target.value}),placeholder:"Daily Capacity",className:m})]}),l.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[l.jsx("button",{onClick:()=>r(!1),disabled:c,className:"border border-edge text-slate-400 text-sm px-4 py-2 rounded-lg",children:"Cancel"}),l.jsx("button",{onClick:g,disabled:c,className:"bg-brand text-ink font-semibold text-sm px-5 py-2 rounded-lg disabled:opacity-50",children:c?"Saving…":a.id?"Update":"Create"})]})]})}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Code"}),l.jsx("th",{className:"text-left",children:"Store"}),l.jsx("th",{className:"text-left",children:"Location"}),l.jsx("th",{className:"text-left",children:"Hours"}),l.jsx("th",{className:"text-right",children:"Same-Day Cutoff"}),l.jsx("th",{className:"text-right",children:"Radius (mi)"}),l.jsx("th",{className:"text-right",children:"Daily Capacity"}),l.jsx("th",{className:"text-center",children:"Status"}),l.jsx("th",{className:"text-center",children:"Manage"})]})}),l.jsxs("tbody",{children:[(t||[]).map(v=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3 font-mono text-xs text-brand",children:v.code}),l.jsx("td",{children:v.name}),l.jsxs("td",{className:"text-slate-400",children:[v.city,", ",v.state," ",v.zip]}),l.jsxs("td",{className:"text-slate-400",children:[v.openTime,"–",v.closeTime]}),l.jsx("td",{className:"text-right text-slate-400",children:v.sameDayCutoff}),l.jsx("td",{className:"text-right text-slate-400",children:v.deliveryRadiusMi}),l.jsx("td",{className:"text-right text-slate-400",children:v.dailyCapacity}),l.jsx("td",{className:"text-center",children:l.jsxs("button",{onClick:()=>f(v.id,v.active),className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs ${v.active?"bg-emerald-500/15 text-emerald-400":"bg-slate-600/20 text-slate-400"}`,children:[l.jsx(PG,{size:12})," ",v.active?"Active":"Inactive"]})}),l.jsx("td",{className:"text-center",children:l.jsx("button",{onClick:()=>p(v),title:"Edit",className:"text-xs bg-panel border border-edge text-slate-300 px-2 py-1 rounded inline-flex items-center gap-1",children:l.jsx(n5,{size:12})})})]},v.id)),!(t||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:9,className:"text-center text-slate-500 py-8",children:"No stores found."})})]})]})})]})}const VAe=["ON_SALE","SOLD_OUT","HIDDEN"],HAe=["","BIRTHDAY","ANNIVERSARY","SYMPATHY","LOVE","CONGRATS","GET_WELL","THANK_YOU"],qAe=["","ROSES","TULIPS","LILIES","ORCHIDS","SUNFLOWERS","MIXED"],XP={id:0,categoryId:"",sku:"",name:"",brand:"",description:"",price:"",salePrice:"",status:"ON_SALE",stock:"0",thumbnail:"",occasion:"",flowerType:"",shelfLifeDays:"5",sizes:[]};function KAe(){const e=Wt(),[t,n]=j.useState(""),[r,a]=j.useState(!1),[i,s]=j.useState({...XP}),[o,c]=j.useState(""),[u,d]=j.useState(!1),{data:f}=oe({queryKey:["admin-products",t],queryFn:()=>cc({keyword:t,size:100,status:""})}),{data:h}=oe({queryKey:["admin-cats"],queryFn:D5}),p=(f==null?void 0:f.items)||[],g=h||[],m=()=>e.invalidateQueries({queryKey:["admin-products"]}),v=async(E,T)=>{await KW(E,T==="ON_SALE"?"HIDDEN":"ON_SALE").catch(()=>{}),m()},y=()=>{s({...XP}),c(""),a(!0)},x=async E=>{c("");const T=await R5(E).catch(()=>null);T&&(s({id:T.id,categoryId:T.categoryId??"",sku:T.sku??"",name:T.name??"",brand:T.brand??"",description:T.description??"",price:String(T.price??""),salePrice:T.salePrice!=null?String(T.salePrice):"",status:T.status||"ON_SALE",stock:String(T.stock??0),thumbnail:T.thumbnail??"",occasion:T.occasion??"",flowerType:T.flowerType??"",shelfLifeDays:String(T.shelfLifeDays??5),sizes:(T.sizes||[]).map(_=>({sizeCode:_.sizeCode||"",label:_.label||"",price:String(_.price??""),stemCount:String(_.stemCount??"")}))}),a(!0))},b=()=>s(E=>({...E,sizes:[...E.sizes,{sizeCode:"ORIGINAL",label:"",price:"",stemCount:""}]})),w=(E,T,_)=>s(C=>({...C,sizes:C.sizes.map(($,R)=>R===E?{...$,[T]:_}:$)})),S=E=>s(T=>({...T,sizes:T.sizes.filter((_,C)=>C!==E)})),A=async()=>{if(!i.name.trim()){c("Product name is required.");return}if(i.price===""||isNaN(Number(i.price))){c("A valid price is required.");return}d(!0),c("");const E={categoryId:i.categoryId===""?null:Number(i.categoryId),sku:i.sku.trim()||null,name:i.name.trim(),brand:i.brand.trim()||null,description:i.description.trim()||null,price:Number(i.price),salePrice:i.salePrice===""?null:Number(i.salePrice),status:i.status,stock:i.stock===""?0:Number(i.stock),thumbnail:i.thumbnail.trim()||null,occasion:i.occasion||null,flowerType:i.flowerType||null,shelfLifeDays:i.shelfLifeDays===""?5:Number(i.shelfLifeDays),sizes:i.sizes.filter(T=>T.sizeCode&&T.price!=="").map((T,_)=>({sizeCode:T.sizeCode,label:T.label||T.sizeCode,price:Number(T.price),stemCount:T.stemCount===""?null:Number(T.stemCount),sortOrder:_}))};try{i.id?await HW(i.id,E):await VW(E),a(!1),m()}catch{c("Failed to save the product. Please check the inputs.")}finally{d(!1)}},O=async(E,T)=>{window.confirm(`Delete product "${T}"? This cannot be undone.`)&&(await qW(E).catch(()=>{}),m())},N="bg-panel border border-edge rounded-lg px-3 py-2 text-sm";return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(gt,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"상품 관리"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 bg-card border border-edge rounded-lg px-3 py-2",children:[l.jsx(nh,{size:15,className:"text-slate-500"}),l.jsx("input",{value:t,onChange:E=>n(E.target.value),placeholder:"상품 검색",className:"bg-transparent text-sm outline-none w-48"})]}),l.jsxs("button",{onClick:y,className:"flex items-center gap-1.5 bg-brand text-ink text-sm font-semibold px-3 py-2 rounded-lg",children:[l.jsx(oc,{size:15})," New Product"]})]})]}),r&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 flex items-start justify-center overflow-y-auto p-4",onClick:()=>!u&&a(!1),children:l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 w-full max-w-2xl mt-8 space-y-3",onClick:E=>E.stopPropagation(),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h2",{className:"text-lg font-bold",children:i.id?"Edit Product":"New Product"}),l.jsx("button",{onClick:()=>a(!1),className:"text-slate-400 hover:text-slate-200",children:l.jsx(l5,{size:18})})]}),o&&l.jsx("div",{className:"text-xs text-rose-400 bg-rose-500/10 border border-rose-500/30 rounded-lg px-3 py-2",children:o}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsx("input",{value:i.sku,onChange:E=>s({...i,sku:E.target.value}),placeholder:"SKU",className:N}),l.jsx("input",{value:i.name,onChange:E=>s({...i,name:E.target.value}),placeholder:"Product Name *",className:`${N} col-span-2`})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsxs("select",{value:i.categoryId,onChange:E=>s({...i,categoryId:E.target.value}),className:N,children:[l.jsx("option",{value:"",children:"Category"}),g.map(E=>l.jsx("option",{value:E.id,children:E.name},E.id))]}),l.jsx("input",{value:i.brand,onChange:E=>s({...i,brand:E.target.value}),placeholder:"Brand",className:N}),l.jsx("select",{value:i.status,onChange:E=>s({...i,status:E.target.value}),className:N,children:VAe.map(E=>l.jsx("option",{value:E,children:E},E))})]}),l.jsx("textarea",{value:i.description,onChange:E=>s({...i,description:E.target.value}),placeholder:"Description",rows:2,className:`${N} w-full`}),l.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[l.jsx("input",{type:"number",value:i.price,onChange:E=>s({...i,price:E.target.value}),placeholder:"Price *",className:N}),l.jsx("input",{type:"number",value:i.salePrice,onChange:E=>s({...i,salePrice:E.target.value}),placeholder:"Sale Price",className:N}),l.jsx("input",{type:"number",value:i.stock,onChange:E=>s({...i,stock:E.target.value}),placeholder:"Stock",className:N}),l.jsx("input",{type:"number",value:i.shelfLifeDays,onChange:E=>s({...i,shelfLifeDays:E.target.value}),placeholder:"Shelf Life (days)",className:N})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsx("select",{value:i.occasion,onChange:E=>s({...i,occasion:E.target.value}),className:N,children:HAe.map(E=>l.jsx("option",{value:E,children:E||"Occasion"},E))}),l.jsx("select",{value:i.flowerType,onChange:E=>s({...i,flowerType:E.target.value}),className:N,children:qAe.map(E=>l.jsx("option",{value:E,children:E||"Flower Type"},E))}),l.jsx("input",{value:i.thumbnail,onChange:E=>s({...i,thumbnail:E.target.value}),placeholder:"Thumbnail URL",className:N})]}),l.jsxs("div",{className:"border border-edge rounded-lg p-3 space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-semibold text-slate-300",children:"Sizes (Original / Deluxe / Grand)"}),l.jsxs("button",{onClick:b,className:"text-xs flex items-center gap-1 text-brand",children:[l.jsx(oc,{size:12})," Add Size"]})]}),i.sizes.length===0&&l.jsx("p",{className:"text-xs text-slate-500",children:"No size variants. Base price is used."}),i.sizes.map((E,T)=>l.jsxs("div",{className:"grid grid-cols-12 gap-2 items-center",children:[l.jsx("select",{value:E.sizeCode,onChange:_=>w(T,"sizeCode",_.target.value),className:`${N} col-span-3`,children:["ORIGINAL","DELUXE","GRAND"].map(_=>l.jsx("option",{children:_},_))}),l.jsx("input",{value:E.label,onChange:_=>w(T,"label",_.target.value),placeholder:"Label",className:`${N} col-span-3`}),l.jsx("input",{type:"number",value:E.price,onChange:_=>w(T,"price",_.target.value),placeholder:"Price",className:`${N} col-span-3`}),l.jsx("input",{type:"number",value:E.stemCount,onChange:_=>w(T,"stemCount",_.target.value),placeholder:"Stems",className:`${N} col-span-2`}),l.jsx("button",{onClick:()=>S(T),className:"col-span-1 text-rose-400 flex justify-center",children:l.jsx(Q0,{size:14})})]},T))]}),l.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[l.jsx("button",{onClick:()=>a(!1),disabled:u,className:"border border-edge text-slate-400 text-sm px-4 py-2 rounded-lg",children:"Cancel"}),l.jsx("button",{onClick:A,disabled:u,className:"bg-brand text-ink font-semibold text-sm px-5 py-2 rounded-lg disabled:opacity-50",children:u?"Saving…":i.id?"Update":"Create"})]})]})}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"SKU"}),l.jsx("th",{className:"text-left",children:"상품명"}),l.jsx("th",{className:"text-left",children:"상황"}),l.jsx("th",{className:"text-right",children:"가격"}),l.jsx("th",{className:"text-right",children:"재고"}),l.jsx("th",{className:"text-right",children:"판매"}),l.jsx("th",{className:"text-right",children:"평점"}),l.jsx("th",{className:"text-center",children:"상태"}),l.jsx("th",{className:"text-center",children:"관리"})]})}),l.jsxs("tbody",{children:[p.map(E=>{var T;return l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3 font-mono text-xs text-slate-400",children:E.sku}),l.jsx("td",{children:E.name}),l.jsx("td",{className:"text-slate-400",children:E.occasion||"-"}),l.jsx("td",{className:"text-right",children:Oe(E.salePrice&&E.salePrice>0?E.salePrice:E.price)}),l.jsx("td",{className:"text-right text-slate-400",children:E.stock}),l.jsx("td",{className:"text-right text-slate-400",children:E.salesCount}),l.jsx("td",{className:"text-right text-amber-400",children:((T=E.ratingAvg)==null?void 0:T.toFixed(1))||"-"}),l.jsx("td",{className:"text-center",children:l.jsx("button",{onClick:()=>v(E.id,E.status),children:l.jsx(Ar,{status:E.status})})}),l.jsx("td",{className:"text-center",children:l.jsxs("div",{className:"inline-flex gap-1",children:[l.jsx("button",{onClick:()=>x(E.id),title:"Edit",className:"text-xs bg-panel border border-edge text-slate-300 px-2 py-1 rounded inline-flex items-center gap-1",children:l.jsx(n5,{size:12})}),l.jsx("button",{onClick:()=>O(E.id,E.name),title:"Delete",className:"text-xs bg-rose-500/15 text-rose-400 px-2 py-1 rounded inline-flex items-center gap-1",children:l.jsx(Q0,{size:12})})]})})]},E.id)}),!p.length&&l.jsx("tr",{children:l.jsx("td",{colSpan:9,className:"text-center text-slate-500 py-8",children:"상품이 없습니다."})})]})]})})]})}function GAe(){const e=Wt(),[t,n]=j.useState(0),{data:r}=oe({queryKey:["inv-stores"],queryFn:()=>Co(!1)});j.useEffect(()=>{!t&&(r!=null&&r.length)&&n(r[0].id)},[r]);const{data:a}=oe({queryKey:["store-inv",t],queryFn:()=>GW(t),enabled:!!t}),i=async(o,c)=>{await YW(t,o,!c).catch(()=>{}),e.invalidateQueries({queryKey:["store-inv",t]})},s=async(o,c)=>{await WW(t,o,c).catch(()=>{}),e.invalidateQueries({queryKey:["store-inv",t]})};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(B$,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Store Inventory (ON/OFF)"})]}),l.jsx("select",{value:t,onChange:o=>n(Number(o.target.value)),className:"bg-card border border-edge rounded-lg px-3 py-2 text-sm",children:(r||[]).map(o=>l.jsx("option",{value:o.id,children:o.name},o.id))})]}),l.jsx("p",{className:"text-xs text-slate-500 mb-3",children:"Switching to OFF immediately marks the item as out of stock in that store's area."}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Product"}),l.jsx("th",{className:"text-right",children:"Stock"}),l.jsx("th",{className:"text-center",children:"Adjust"}),l.jsx("th",{className:"text-center",children:"Sale"})]})}),l.jsxs("tbody",{children:[(a||[]).map(o=>{const c=o.available!==!1;return l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3",children:o.productName||`Product #${o.productId}`}),l.jsx("td",{className:"text-right text-slate-300",children:o.stock??o.quantity??"-"}),l.jsx("td",{className:"text-center",children:l.jsxs("div",{className:"inline-flex items-center gap-1",children:[l.jsx("button",{onClick:()=>s(o.productId,-1),className:"w-6 h-6 rounded bg-panel border border-edge text-slate-300",children:"−"}),l.jsx("button",{onClick:()=>s(o.productId,1),className:"w-6 h-6 rounded bg-panel border border-edge text-slate-300",children:"+"})]})}),l.jsx("td",{className:"text-center",children:l.jsx("button",{onClick:()=>i(o.productId,c),className:`px-3 py-1 rounded-full text-xs ${c?"bg-emerald-500/15 text-emerald-400":"bg-rose-500/15 text-rose-400"}`,children:c?"ON":"OFF"})})]},o.productId||o.id)}),!(a||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:4,className:"text-center text-slate-500 py-8",children:"No inventory items found."})})]})]})})]})}const cb={PAID:"PREPARING",PREPARING:"SHIPPED",SHIPPED:"DELIVERED"};function YAe(){const e=Wt(),[t,n]=j.useState(""),[r,a]=j.useState([]),[i,s]=j.useState(!1),o=j.useRef(null),{data:c}=oe({queryKey:["admin-orders",t],queryFn:()=>rX(t,100)}),{data:u}=oe({queryKey:["ord-stores"],queryFn:()=>Co(!1)});j.useEffect(()=>{try{const p=location.protocol==="https:"?"wss":"ws",g=new WebSocket(`${p}://${location.host}/ws/mall/orders`);return o.current=g,g.onopen=()=>s(!0),g.onclose=()=>s(!1),g.onmessage=m=>{try{const v=JSON.parse(m.data);a(y=>[v,...y].slice(0,12)),v.event==="ORDER_NEW"&&e.invalidateQueries({queryKey:["admin-orders"]})}catch{}},()=>g.close()}catch{s(!1)}},[]);const d=async p=>{const g=cb[p.status];g&&(await L5(p.id,g).catch(()=>{}),e.invalidateQueries({queryKey:["admin-orders"]}))},f=p=>{var g;return((g=u==null?void 0:u.find(m=>m.id===p))==null?void 0:g.code)||`#${p}`},h=c||[];return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Rj,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Orders (Live)"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:`flex items-center gap-1.5 text-xs ${i?"text-emerald-400":"text-slate-500"}`,children:[l.jsx(X0,{size:13})," ",i?"Connected":"Offline"]}),l.jsxs("select",{value:t,onChange:p=>n(p.target.value),className:"bg-card border border-edge rounded-lg px-3 py-2 text-sm",children:[l.jsx("option",{value:"",children:"All"}),["PENDING","PAID","PREPARING","SHIPPED","DELIVERED","CONFIRMED","CANCELLED"].map(p=>l.jsx("option",{value:p,children:p},p))]})]})]}),!!r.length&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 mb-5",children:[l.jsxs("div",{className:"text-xs text-slate-400 mb-2 flex items-center gap-1.5",children:[l.jsx(X0,{size:12,className:"text-brand"})," Live Events"]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((p,g)=>l.jsxs("span",{className:"text-xs bg-panel border border-edge rounded-full px-3 py-1 text-slate-300",children:[p.event==="ORDER_NEW"?"🆕":"🔄"," ",p.orderNo," · ",f(p.storeId)," · ",p.status," ",p.payAmount?`· ${Oe(p.payAmount)}`:""]},g))})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Order No."}),l.jsx("th",{className:"text-left",children:"Store"}),l.jsx("th",{className:"text-left",children:"Fulfillment"}),l.jsx("th",{className:"text-left",children:"Schedule"}),l.jsx("th",{className:"text-left",children:"Recipient"}),l.jsx("th",{className:"text-right",children:"Amount"}),l.jsx("th",{className:"text-center",children:"Status"}),l.jsx("th",{className:"text-center",children:"Actions"})]})}),l.jsxs("tbody",{children:[h.map(p=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3 font-mono text-xs text-brand",children:p.orderNo||`#${p.id}`}),l.jsx("td",{className:"text-slate-400",children:f(p.storeId)}),l.jsx("td",{children:p.fulfillmentType==="PICKUP"?l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx(rh,{size:12})," 픽업"]}):l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx(ah,{size:12})," 배송"]})}),l.jsxs("td",{className:"text-slate-400 text-xs",children:[p.scheduledDate," ",p.slotLabel]}),l.jsx("td",{className:"text-slate-400",children:p.receiverName||"-"}),l.jsx("td",{className:"text-right",children:Oe(p.payAmount??p.totalAmount)}),l.jsx("td",{className:"text-center",children:l.jsx(Ar,{status:p.status})}),l.jsx("td",{className:"text-center",children:cb[p.status]&&l.jsxs("button",{onClick:()=>d(p),className:"text-xs bg-brand text-ink font-semibold px-2.5 py-1 rounded",children:["→ ",cb[p.status]]})})]},p.id)),!h.length&&l.jsx("tr",{children:l.jsx("td",{colSpan:8,className:"text-center text-slate-500 py-8",children:"주문이 없습니다."})})]})]})})]})}function WAe(){const e=Wt(),[t,n]=j.useState(""),[r,a]=j.useState([]),{data:i}=oe({queryKey:["transfers",t],queryFn:()=>cX(t,"")}),{data:s}=oe({queryKey:["tr-stores"],queryFn:()=>Co(!1)}),o=async f=>{await uX(f).catch(()=>{}),e.invalidateQueries({queryKey:["transfers"]})},c=async f=>{await dX(f).catch(()=>{}),e.invalidateQueries({queryKey:["transfers"]})},u=async()=>{const f=(s||[]).map(p=>p.id),h=await CX(f).catch(()=>[]);a(h||[])},d=f=>{var h;return((h=s==null?void 0:s.find(p=>p.id===f))==null?void 0:h.code)||`#${f}`};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(z$,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Inventory Transfers"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 bg-brand2 text-white text-sm px-3 py-2 rounded-lg",children:[l.jsx(Rn,{size:14})," AI Transfer Suggestions"]}),l.jsxs("select",{value:t,onChange:f=>n(f.target.value),className:"bg-card border border-edge rounded-lg px-3 py-2 text-sm",children:[l.jsx("option",{value:"",children:"All"}),["REQUESTED","APPROVED","REJECTED","COMPLETED"].map(f=>l.jsx("option",{value:f,children:f},f))]})]})]}),!!r.length&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 mb-5",children:[l.jsxs("div",{className:"text-xs text-brand mb-2 flex items-center gap-1.5",children:[l.jsx(Rn,{size:12})," AI Recommended Transfers"]}),l.jsx("div",{className:"space-y-1.5 text-sm",children:r.map((f,h)=>l.jsxs("div",{className:"flex items-center justify-between text-slate-300",children:[l.jsxs("span",{children:["Product #",f.productId,": ",d(f.fromStoreId)," → ",d(f.toStoreId)," ×",f.suggestedQty]}),l.jsx("span",{className:"text-xs text-slate-500",children:f.reason})]},h))})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"ID"}),l.jsx("th",{className:"text-left",children:"From → To"}),l.jsx("th",{className:"text-left",children:"Product"}),l.jsx("th",{className:"text-right",children:"Quantity"}),l.jsx("th",{className:"text-left",children:"Reason"}),l.jsx("th",{className:"text-center",children:"Status"}),l.jsx("th",{className:"text-center",children:"Actions"})]})}),l.jsxs("tbody",{children:[(i||[]).map(f=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3 text-slate-400",children:f.id}),l.jsxs("td",{children:[d(f.fromStoreId)," → ",d(f.toStoreId)]}),l.jsxs("td",{className:"text-slate-400",children:["#",f.productId,f.aiRecommended&&l.jsx("span",{className:"ml-1 text-[10px] text-brand",children:"AI"})]}),l.jsx("td",{className:"text-right",children:f.quantity}),l.jsx("td",{className:"text-slate-400 text-xs",children:f.reason}),l.jsx("td",{className:"text-center",children:l.jsx(Ar,{status:f.status})}),l.jsx("td",{className:"text-center",children:f.status==="REQUESTED"&&l.jsxs("div",{className:"inline-flex gap-1",children:[l.jsx("button",{onClick:()=>o(f.id),className:"text-xs bg-emerald-500/15 text-emerald-400 px-2 py-1 rounded",children:"Approve"}),l.jsx("button",{onClick:()=>c(f.id),className:"text-xs bg-rose-500/15 text-rose-400 px-2 py-1 rounded",children:"Reject"})]})})]},f.id)),!(i||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center text-slate-500 py-8",children:"No transfer requests."})})]})]})})]})}const XAe=["","STANDARD","BASIC","SILVER","GOLD","VIP"];function QAe(){const e=Wt(),[t,n]=j.useState(""),[r,a]=j.useState(""),{data:i}=oe({queryKey:["by-tier"],queryFn:()=>V5(30)}),{data:s}=oe({queryKey:["admin-members",t,r],queryFn:()=>gX(t,r,200)}),o=async()=>{await HX().catch(()=>{}),e.invalidateQueries({queryKey:["by-tier"]})},c=(i||[]).map(d=>({name:d.tier,customers:d.customers,sales:d.sales})),u=(s==null?void 0:s.items)||[];return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(o5,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Members (CRM)"})]}),l.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 bg-card border border-edge text-sm px-3 py-2 rounded-lg text-slate-300 hover:text-brand",children:[l.jsx(xy,{size:14})," Recalculate All Tiers"]})]}),l.jsxs("div",{className:"grid lg:grid-cols-2 gap-5 mb-5",children:[l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:"Customer Distribution by Tier (30 days)"}),l.jsx(Fa,{type:"BAR",rows:c,dataKeys:["customers"]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:"Sales Contribution by Tier"}),l.jsx(Fa,{type:"PIE",rows:(i||[]).map(d=>({name:d.tier,value:d.sales})),dataKeys:["value"]})]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:"Tier Summary"}),l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Tier"}),l.jsx("th",{className:"text-right",children:"Customers"}),l.jsx("th",{className:"text-right",children:"Orders"}),l.jsx("th",{className:"text-right",children:"Sales"})]})}),l.jsxs("tbody",{children:[(i||[]).map(d=>l.jsxs("tr",{className:"border-b border-edge/50",children:[l.jsx("td",{className:"p-3",children:l.jsx(Ar,{status:d.tier})}),l.jsx("td",{className:"text-right",children:d.customers}),l.jsx("td",{className:"text-right text-slate-400",children:d.orderCount}),l.jsx("td",{className:"text-right",children:Oe(d.sales)})]},d.tier)),!(i||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:4,className:"text-center text-slate-500 py-8",children:"No data"})})]})]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-edge",children:[l.jsxs("h2",{className:"text-sm font-semibold",children:["Member List ",l.jsxs("span",{className:"text-slate-500 font-normal",children:["(",(s==null?void 0:s.total)??0,")"]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("select",{value:r,onChange:d=>a(d.target.value),className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm",children:XAe.map(d=>l.jsx("option",{value:d,children:d||"All Tiers"},d))}),l.jsxs("div",{className:"flex items-center gap-2 bg-panel border border-edge rounded-lg px-3 py-2",children:[l.jsx(nh,{size:15,className:"text-slate-500"}),l.jsx("input",{value:t,onChange:d=>n(d.target.value),placeholder:"Search by name or ID",className:"bg-transparent text-sm outline-none w-48"})]})]})]}),l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Customer"}),l.jsx("th",{className:"text-left",children:"Email"}),l.jsx("th",{className:"text-left",children:"Phone"}),l.jsx("th",{className:"text-left",children:"ZIP"}),l.jsx("th",{className:"text-center",children:"Tier"}),l.jsx("th",{className:"text-right",children:"Orders"}),l.jsx("th",{className:"text-right",children:"Lifetime Value"}),l.jsx("th",{className:"text-left",children:"Joined"})]})}),l.jsxs("tbody",{children:[u.map(d=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsxs("td",{className:"p-3",children:[l.jsx("div",{className:"font-medium",children:d.displayName||d.username}),l.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["@",d.username]})]}),l.jsx("td",{className:"text-slate-400",children:d.emailMasked||"-"}),l.jsx("td",{className:"text-slate-400",children:d.phoneMasked||"-"}),l.jsx("td",{className:"text-slate-400",children:d.defaultZip||"-"}),l.jsx("td",{className:"text-center",children:l.jsx(Ar,{status:d.tier})}),l.jsx("td",{className:"text-right text-slate-400",children:d.orderCount}),l.jsx("td",{className:"text-right",children:Oe(d.totalSpent)}),l.jsx("td",{className:"text-slate-400 text-xs",children:d.createdAt?String(d.createdAt).slice(0,10):"-"})]},d.id)),!u.length&&l.jsx("tr",{children:l.jsx("td",{colSpan:8,className:"text-center text-slate-500 py-8",children:"No members found."})})]})]})]})]})}function ZAe(){const e=Wt(),{data:t}=oe({queryKey:["tiers-all"],queryFn:()=>BX(!1)}),[n,r]=j.useState(null),[a,i]=j.useState(""),[s,o]=j.useState(0),[c,u]=j.useState(""),[d,f]=j.useState(""),h=async()=>{n&&(await UX(n.id,n).catch(()=>{}),r(null),e.invalidateQueries({queryKey:["tiers-all"]}))},p=async()=>{if(!a||!s)return;const g=await VX(a,s,c).catch(()=>null);f(g?`${a} points adjusted · Balance ${g.balance}P`:"Adjustment failed"),i(""),o(0),u("")};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[l.jsx(Kd,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Tier & Points Management"})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden mb-6",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Tier"}),l.jsx("th",{className:"text-right",children:"Min Spend"}),l.jsx("th",{className:"text-right",children:"Min Orders"}),l.jsx("th",{className:"text-right",children:"Discount"}),l.jsx("th",{className:"text-right",children:"Earn Rate"}),l.jsx("th",{className:"text-right",children:"Free Shipping"}),l.jsx("th",{className:"text-center",children:"Priority Slot"}),l.jsx("th",{className:"text-center",children:"Edit"})]})}),l.jsxs("tbody",{children:[(t||[]).map(g=>l.jsxs("tr",{className:"border-b border-edge/50",children:[l.jsxs("td",{className:"p-3",children:[l.jsx(Ar,{status:g.tierCode})," ",l.jsx("span",{className:"text-slate-400 text-xs ml-1",children:g.name})]}),l.jsx("td",{className:"text-right",children:Oe(g.minSpend12m)}),l.jsx("td",{className:"text-right text-slate-400",children:g.minOrders12m}),l.jsxs("td",{className:"text-right",children:[g.discountRate,"%"]}),l.jsxs("td",{className:"text-right",children:[g.pointEarnRate,"%"]}),l.jsx("td",{className:"text-right text-slate-400",children:g.freeShipThreshold===0?"Always":g.freeShipThreshold?Oe(g.freeShipThreshold):"None"}),l.jsx("td",{className:"text-center",children:g.prioritySlot?"✓":"–"}),l.jsx("td",{className:"text-center",children:l.jsx("button",{onClick:()=>r({...g}),className:"text-xs text-brand",children:"Edit"})})]},g.id)),!(t||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:8,className:"text-center text-slate-500 py-8",children:"No tier data found."})})]})]})}),n&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-6",children:[l.jsxs("div",{className:"text-sm font-semibold mb-3",children:["Edit Tier: ",n.name," (",n.tierCode,")"]}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[l.jsx(dp,{label:"Min Spend ($)",value:n.minSpend12m,onChange:g=>r({...n,minSpend12m:Number(g)})}),l.jsx(dp,{label:"Min Orders",value:n.minOrders12m,onChange:g=>r({...n,minOrders12m:Number(g)})}),l.jsx(dp,{label:"Discount (%)",value:n.discountRate,onChange:g=>r({...n,discountRate:Number(g)})}),l.jsx(dp,{label:"Earn Rate (%)",value:n.pointEarnRate,onChange:g=>r({...n,pointEarnRate:Number(g)})})]}),l.jsxs("div",{className:"flex gap-2 mt-4",children:[l.jsx("button",{onClick:h,className:"bg-brand text-ink font-semibold px-5 py-2 rounded-lg text-sm",children:"Save"}),l.jsx("button",{onClick:()=>r(null),className:"border border-edge px-5 py-2 rounded-lg text-sm text-slate-400",children:"Cancel"})]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[l.jsx(K$,{size:16,className:"text-brand"})," Manual Point Adjustment"]}),l.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[l.jsx("input",{value:a,onChange:g=>i(g.target.value),placeholder:"Customer ID",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("input",{type:"number",value:s||"",onChange:g=>o(Number(g.target.value)),placeholder:"Points (+/-)",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("input",{value:c,onChange:g=>u(g.target.value),placeholder:"Reason",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("button",{onClick:p,className:"bg-brand2 text-white rounded-lg px-3 py-2 text-sm font-semibold",children:"Adjust"})]}),d&&l.jsx("div",{className:"text-xs text-accent mt-2",children:d})]})]})}function dp({label:e,value:t,onChange:n}){return l.jsxs("div",{children:[l.jsx("label",{className:"block text-[11px] text-slate-400 mb-1",children:e}),l.jsx("input",{value:t,onChange:r=>n(r.target.value),className:"w-full bg-panel border border-edge rounded-lg px-3 py-2"})]})}const JAe=["DISCOUNT","POINT_BONUS","GIFT","TIER_ONLY","SEASON"];function eOe(){const e=Wt(),[t,n]=j.useState(""),[r,a]=j.useState(!1),[i,s]=j.useState(null),[o,c]=j.useState({code:"",title:"",eventType:"DISCOUNT",description:"",startDate:"",endDate:"",targetTiers:"",bonusPointRate:0}),[u,d]=j.useState(""),{data:f}=oe({queryKey:["admin-events",t],queryFn:()=>GX(t,"",!1)}),h=()=>e.invalidateQueries({queryKey:["admin-events"]}),p=async()=>{await YX({...o,status:"DRAFT",banners:[]}).catch(()=>{}),a(!1),h()},g=async b=>{await WX(b).catch(()=>{}),h()},m=async b=>{await XX(b).catch(()=>{}),h()},v=async b=>{await QX(b).catch(()=>{}),h()},y=async b=>{const w=await ZX(b).catch(()=>null);s(w)},x=async()=>{const b=await JX(o.eventType,o.title||"Spring Season","friendly").catch(()=>null);b&&(c({...o,title:b.headline||o.title,description:b.subtext||o.description}),d(`AI copy generated (${b.source})`))};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Yd,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Events & Campaigns"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("select",{value:t,onChange:b=>n(b.target.value),className:"bg-card border border-edge rounded-lg px-3 py-2 text-sm",children:[l.jsx("option",{value:"",children:"All"}),["DRAFT","PUBLISHED","ENDED"].map(b=>l.jsx("option",{value:b,children:b},b))]}),l.jsxs("button",{onClick:()=>a(!r),className:"flex items-center gap-1.5 bg-brand text-ink text-sm font-semibold px-3 py-2 rounded-lg",children:[l.jsx(oc,{size:15})," New Event"]})]})]}),r&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-5 space-y-3",children:[l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsx("input",{value:o.code,onChange:b=>c({...o,code:b.target.value}),placeholder:"Code",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("input",{value:o.title,onChange:b=>c({...o,title:b.target.value}),placeholder:"Title",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm col-span-2"})]}),l.jsx("textarea",{value:o.description,onChange:b=>c({...o,description:b.target.value}),placeholder:"Description",rows:2,className:"w-full bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[l.jsx("select",{value:o.eventType,onChange:b=>c({...o,eventType:b.target.value}),className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm",children:JAe.map(b=>l.jsx("option",{children:b},b))}),l.jsx("input",{type:"date",value:o.startDate,onChange:b=>c({...o,startDate:b.target.value}),className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("input",{type:"date",value:o.endDate,onChange:b=>c({...o,endDate:b.target.value}),className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("input",{value:o.targetTiers,onChange:b=>c({...o,targetTiers:b.target.value}),placeholder:"Target Tiers (GOLD, VIP)",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:x,className:"flex items-center gap-1.5 bg-brand2 text-white text-sm px-3 py-2 rounded-lg",children:[l.jsx(Rn,{size:14})," Generate AI Copy"]}),u&&l.jsx("span",{className:"text-xs text-accent",children:u}),l.jsx("button",{onClick:p,className:"ml-auto bg-brand text-ink font-semibold text-sm px-5 py-2 rounded-lg",children:"Create"}),l.jsx("button",{onClick:()=>a(!1),className:"border border-edge text-slate-400 text-sm px-4 py-2 rounded-lg",children:"Cancel"})]})]}),i&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 mb-5 flex items-center gap-6 text-sm",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-brand",children:[l.jsx(Mj,{size:15})," ",i.title]}),l.jsxs("span",{className:"text-slate-400",children:["Participations ",i.participations," · Participants ",i.participants]}),l.jsxs("span",{className:"text-slate-400",children:["Linked Orders ",i.linkedOrders," · Attributed Sales ",Oe(i.attributedSales)]}),l.jsx("button",{onClick:()=>s(null),className:"ml-auto text-slate-500 text-xs",children:"Close"})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Code"}),l.jsx("th",{className:"text-left",children:"Title"}),l.jsx("th",{className:"text-left",children:"Type"}),l.jsx("th",{className:"text-left",children:"Period"}),l.jsx("th",{className:"text-left",children:"Target"}),l.jsx("th",{className:"text-center",children:"Status"}),l.jsx("th",{className:"text-center",children:"Actions"})]})}),l.jsxs("tbody",{children:[(f||[]).map(b=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3 font-mono text-xs text-brand",children:b.code}),l.jsx("td",{children:b.title}),l.jsx("td",{className:"text-slate-400 text-xs",children:b.eventType}),l.jsxs("td",{className:"text-slate-400 text-xs",children:[b.startDate,"~",b.endDate]}),l.jsx("td",{className:"text-slate-400 text-xs",children:b.targetTiers||"All"}),l.jsx("td",{className:"text-center",children:l.jsx(Ar,{status:b.status})}),l.jsx("td",{className:"text-center",children:l.jsxs("div",{className:"inline-flex gap-1",children:[b.status==="DRAFT"&&l.jsx("button",{onClick:()=>g(b.id),className:"text-xs bg-emerald-500/15 text-emerald-400 px-2 py-1 rounded",children:"Publish"}),b.status==="PUBLISHED"&&l.jsx("button",{onClick:()=>m(b.id),className:"text-xs bg-slate-600/20 text-slate-400 px-2 py-1 rounded",children:"End"}),l.jsx("button",{onClick:()=>y(b.id),className:"text-xs bg-panel border border-edge text-slate-300 px-2 py-1 rounded",children:"Performance"}),l.jsx("button",{onClick:()=>v(b.id),className:"text-xs bg-rose-500/15 text-rose-400 px-2 py-1 rounded",children:"Delete"})]})})]},b.id)),!(f||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center text-slate-500 py-8",children:"No events found."})})]})]})})]})}function tOe(){const e=Wt(),{data:t}=oe({queryKey:["admin-subs"],queryFn:oX}),n=t||[],r=()=>e.invalidateQueries({queryKey:["admin-subs"]}),a=async(s,o)=>{await lX(s,o).catch(()=>{}),r()},i=async s=>{window.confirm("Cancel this subscription? It cannot be resumed.")&&await a(s,"CANCELLED")};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[l.jsx(by,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Subscriptions"})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Customer"}),l.jsx("th",{className:"text-left",children:"Product"}),l.jsx("th",{className:"text-left",children:"Frequency"}),l.jsx("th",{className:"text-left",children:"Next Delivery"}),l.jsx("th",{className:"text-right",children:"Amount"}),l.jsx("th",{className:"text-center",children:"Status"}),l.jsx("th",{className:"text-center",children:"Actions"})]})}),l.jsxs("tbody",{children:[n.map(s=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3",children:s.owner}),l.jsx("td",{className:"text-slate-400",children:s.productName||`#${s.productId}`}),l.jsx("td",{className:"text-slate-400",children:s.frequency}),l.jsx("td",{className:"text-slate-400",children:s.nextDeliveryDate||"-"}),l.jsx("td",{className:"text-right",children:Oe(s.price)}),l.jsx("td",{className:"text-center",children:l.jsx(Ar,{status:s.status})}),l.jsx("td",{className:"text-center",children:l.jsxs("div",{className:"inline-flex gap-1",children:[s.status==="ACTIVE"&&l.jsxs("button",{onClick:()=>a(s.id,"PAUSED"),className:"text-xs bg-amber-500/15 text-amber-400 px-2 py-1 rounded inline-flex items-center gap-1",children:[l.jsx(OG,{size:12})," Pause"]}),s.status==="PAUSED"&&l.jsxs("button",{onClick:()=>a(s.id,"ACTIVE"),className:"text-xs bg-emerald-500/15 text-emerald-400 px-2 py-1 rounded inline-flex items-center gap-1",children:[l.jsx(TG,{size:12})," Resume"]}),s.status!=="CANCELLED"&&l.jsxs("button",{onClick:()=>i(s.id),className:"text-xs bg-rose-500/15 text-rose-400 px-2 py-1 rounded inline-flex items-center gap-1",children:[l.jsx(iG,{size:12})," Cancel"]}),s.status==="CANCELLED"&&l.jsx("span",{className:"text-xs text-slate-500",children:"—"})]})})]},s.id)),!n.length&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center text-slate-500 py-8",children:"No subscriptions found."})})]})]})})]})}const nOe=["valentine","mothers_day","christmas","thanksgiving"];function rOe(){const e=Wt(),[t,n]=j.useState({holidayDate:"",name:"",blocked:!0,surgeMultiplier:1,storeId:null}),[r,a]=j.useState("valentine"),[i,s]=j.useState(null),{data:o}=oe({queryKey:["admin-holidays"],queryFn:$5}),{data:c}=oe({queryKey:["sch-stores"],queryFn:()=>Co(!1)}),u=async()=>{t.holidayDate&&(await QW(t).catch(()=>{}),n({...t,holidayDate:"",name:""}),e.invalidateQueries({queryKey:["admin-holidays"]}))},d=async()=>{const h=await TX(r,14).catch(()=>null);s(h)},f=h=>{var p;return((p=c==null?void 0:c.find(g=>g.id===h))==null?void 0:p.code)||`#${h}`};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[l.jsx(U$,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Schedule · Holidays · Surge"})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-5",children:[l.jsx("div",{className:"text-sm font-semibold mb-3",children:"Add Holiday / Surge"}),l.jsxs("div",{className:"grid grid-cols-5 gap-3",children:[l.jsx("input",{type:"date",value:t.holidayDate,onChange:h=>n({...t,holidayDate:h.target.value}),className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("input",{value:t.name,onChange:h=>n({...t,name:h.target.value}),placeholder:"Name",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[l.jsx("input",{type:"checkbox",checked:t.blocked,onChange:h=>n({...t,blocked:h.target.checked})})," Block Delivery"]}),l.jsx("input",{type:"number",step:"0.1",value:t.surgeMultiplier,onChange:h=>n({...t,surgeMultiplier:Number(h.target.value)}),placeholder:"Surge Multiplier",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 bg-brand text-ink font-semibold rounded-lg px-3 py-2 text-sm justify-center",children:[l.jsx(oc,{size:15})," Add"]})]})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden mb-6",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Date"}),l.jsx("th",{className:"text-left",children:"Name"}),l.jsx("th",{className:"text-center",children:"Block Delivery"}),l.jsx("th",{className:"text-right",children:"Surge Multiplier"}),l.jsx("th",{className:"text-left",children:"Store"})]})}),l.jsxs("tbody",{children:[(o||[]).map(h=>l.jsxs("tr",{className:"border-b border-edge/50",children:[l.jsx("td",{className:"p-3",children:h.holidayDate}),l.jsx("td",{className:"text-slate-400",children:h.name}),l.jsx("td",{className:"text-center",children:h.blocked?l.jsx("span",{className:"text-rose-400",children:"Blocked"}):l.jsx("span",{className:"text-slate-500",children:"–"})}),l.jsx("td",{className:"text-right",children:h.surgeMultiplier>1?l.jsxs("span",{className:"text-amber-400",children:["×",h.surgeMultiplier]}):"–"}),l.jsx("td",{className:"text-slate-400 text-xs",children:h.storeId?f(h.storeId):"All"})]},h.id||h.holidayDate)),!(o||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"text-center text-slate-500 py-8",children:"No holidays registered."})})]})]})}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(Rn,{size:16,className:"text-brand"}),l.jsx("span",{className:"text-sm font-semibold",children:"AI Peak-Season Demand Forecast"}),l.jsx("select",{value:r,onChange:h=>a(h.target.value),className:"ml-auto bg-panel border border-edge rounded-lg px-3 py-1.5 text-sm",children:nOe.map(h=>l.jsx("option",{children:h},h))}),l.jsx("button",{onClick:d,className:"bg-brand2 text-white text-sm px-3 py-1.5 rounded-lg",children:"Run Forecast"})]}),i&&l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge",children:[l.jsx("th",{className:"text-left py-2",children:"Store"}),l.jsx("th",{className:"text-right",children:"Recent Orders"}),l.jsx("th",{className:"text-right",children:"Forecast Orders"}),l.jsx("th",{className:"text-right",children:"Multiplier"})]})}),l.jsx("tbody",{children:(i.forecast||[]).map((h,p)=>l.jsxs("tr",{className:"border-b border-edge/50",children:[l.jsx("td",{className:"py-2",children:f(h.storeId)}),l.jsx("td",{className:"text-right text-slate-400",children:h.recentOrders}),l.jsx("td",{className:"text-right text-brand",children:h.predictedOrders}),l.jsxs("td",{className:"text-right text-amber-400",children:["×",h.multiplier]})]},p))})]})]})]})}function aOe(){const[e,t]=j.useState(14),{data:n}=oe({queryKey:["an-store",e],queryFn:()=>I5(e)}),{data:r}=oe({queryKey:["an-trend",e],queryFn:()=>z5(e)}),{data:a}=oe({queryKey:["an-top"],queryFn:()=>B5(10)}),{data:i}=oe({queryKey:["an-tier"],queryFn:()=>V5(e)}),s=(n||[]).map(f=>({name:f.storeCode||f.storeName,Revenue:f.sales,Orders:f.orderCount})),o=(r||[]).map(f=>({name:(f.date||"").slice(5),Revenue:f.sales})),c=(a||[]).map(f=>({name:f.name,Sold:f.salesCount})),u=(i||[]).map(f=>({name:f.tier,Revenue:f.sales,Customers:f.customers})),d=(n||[]).reduce((f,h)=>f+(h.sales||0),0);return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Mj,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Revenue Analytics (BI)"})]}),l.jsx("select",{value:e,onChange:f=>t(Number(f.target.value)),className:"bg-card border border-edge rounded-lg px-3 py-2 text-sm",children:[7,14,30,90].map(f=>l.jsxs("option",{value:f,children:["Last ",f," days"]},f))})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-5",children:[l.jsx("div",{className:"text-xs text-slate-400",children:"Total Revenue (Period)"}),l.jsx("div",{className:"text-3xl font-bold",children:Oe(d)})]}),l.jsxs("div",{className:"grid lg:grid-cols-2 gap-5",children:[l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:"Revenue Trend"}),l.jsx(Fa,{type:"AREA",rows:o,dataKeys:["Revenue"]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:"Revenue by Store"}),l.jsx(Fa,{type:"BAR",rows:s,dataKeys:["Revenue","Orders"]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:"Revenue by Tier (BI)"}),l.jsx(Fa,{type:"BAR",rows:u,dataKeys:["Revenue","Customers"]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h2",{className:"text-sm font-semibold mb-3",children:"Best Sellers Top 10"}),l.jsx(Fa,{type:"BAR",rows:c,dataKeys:["Sold"]})]})]})]})}const QP=["USER","MANAGER","ADMIN"];function iOe(){const e=Wt(),{data:t}=oe({queryKey:["users"],queryFn:_X}),[n,r]=j.useState({username:"",password:"",role:"USER"}),[a,i]=j.useState(!1),s=()=>e.invalidateQueries({queryKey:["users"]}),o=async()=>{!n.username||!n.password||(await PX(n).catch(()=>{}),r({username:"",password:"",role:"USER"}),i(!1),s())},c=async(p,g)=>{await MX(p,g).catch(()=>{}),s()},u=async(p,g)=>{await kX(p,!g).catch(()=>{}),s()},d=async p=>{const g=prompt("New password");g&&(await RX(p,g).catch(()=>{}),alert("Password updated"))},f=async p=>{confirm("Are you sure you want to delete?")&&(await DX(p).catch(()=>{}),s())},h=async p=>{confirm(`'${p.username}' 사용자의 OTP를 초기화하시겠습니까?
초기화하면 다음 로그인 시 재등록해야 합니다.`)&&(await $X(p.id).catch(()=>{}),alert("OTP를 초기화했습니다."),s())};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(i5,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"User Management (RBAC)"})]}),l.jsxs("button",{onClick:()=>i(!a),className:"flex items-center gap-1.5 bg-brand text-ink text-sm font-semibold px-3 py-2 rounded-lg",children:[l.jsx(oc,{size:15})," Add User"]})]}),a&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-5 grid grid-cols-4 gap-3",children:[l.jsx("input",{value:n.username,onChange:p=>r({...n,username:p.target.value}),placeholder:"Username",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("input",{type:"password",value:n.password,onChange:p=>r({...n,password:p.target.value}),placeholder:"Password",className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("select",{value:n.role,onChange:p=>r({...n,role:p.target.value}),className:"bg-panel border border-edge rounded-lg px-3 py-2 text-sm",children:QP.map(p=>l.jsx("option",{children:p},p))}),l.jsx("button",{onClick:o,className:"bg-brand text-ink font-semibold rounded-lg px-3 py-2 text-sm",children:"Create"})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"ID"}),l.jsx("th",{className:"text-left",children:"Username"}),l.jsx("th",{className:"text-left",children:"Role"}),l.jsx("th",{className:"text-center",children:"Status"}),l.jsx("th",{className:"text-center",children:"Actions"})]})}),l.jsxs("tbody",{children:[(t||[]).map(p=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3 text-slate-400",children:p.id}),l.jsx("td",{children:p.username}),l.jsx("td",{children:l.jsx("select",{value:p.role,onChange:g=>c(p.id,g.target.value),className:"bg-panel border border-edge rounded px-2 py-1 text-xs",children:QP.map(g=>l.jsx("option",{children:g},g))})}),l.jsx("td",{className:"text-center",children:l.jsx("button",{onClick:()=>u(p.id,p.active),className:`px-2 py-1 rounded text-xs ${p.active!==!1?"bg-emerald-500/15 text-emerald-400":"bg-slate-600/20 text-slate-400"}`,children:p.active!==!1?"Active":"Inactive"})}),l.jsx("td",{className:"text-center",children:l.jsxs("div",{className:"inline-flex gap-1",children:[l.jsx("button",{onClick:()=>d(p.id),className:"text-xs bg-panel border border-edge px-2 py-1 rounded text-slate-300",children:"Password"}),l.jsx("button",{onClick:()=>h(p),className:"text-xs bg-panel border border-edge px-2 py-1 rounded text-slate-300",title:"OTP 초기화",children:"OTP Reset"}),l.jsx("button",{onClick:()=>f(p.id),className:"text-xs bg-rose-500/15 text-rose-400 px-2 py-1 rounded",children:"Delete"})]})})]},p.id)),!(t||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"text-center text-slate-500 py-8",children:"No users found."})})]})]})})]})}function sOe(){const[e,t]=j.useState(""),[n,r]=j.useState(""),{data:a}=oe({queryKey:["audit",e,n],queryFn:()=>LX(e,n,200)});return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(r5,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Audit Log"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 bg-card border border-edge rounded-lg px-3 py-2",children:[l.jsx(nh,{size:14,className:"text-slate-500"}),l.jsx("input",{value:n,onChange:i=>r(i.target.value),placeholder:"Actor",className:"bg-transparent text-sm outline-none w-28"})]}),l.jsx("input",{value:e,onChange:i=>t(i.target.value),placeholder:"Filter action",className:"bg-card border border-edge rounded-lg px-3 py-2 text-sm w-32"})]})]}),l.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-slate-400 text-xs border-b border-edge bg-panel",children:[l.jsx("th",{className:"text-left p-3",children:"Time"}),l.jsx("th",{className:"text-left",children:"Actor"}),l.jsx("th",{className:"text-left",children:"Action"}),l.jsx("th",{className:"text-left",children:"Target"}),l.jsx("th",{className:"text-left",children:"Details"})]})}),l.jsxs("tbody",{children:[(a||[]).map((i,s)=>l.jsxs("tr",{className:"border-b border-edge/50 hover:bg-panel/50",children:[l.jsx("td",{className:"p-3 text-slate-400 text-xs whitespace-nowrap",children:(i.createdAt||i.timestamp||"").slice(0,19).replace("T"," ")}),l.jsx("td",{className:"text-slate-300",children:i.actor||i.username||"-"}),l.jsx("td",{children:l.jsx("span",{className:"text-brand text-xs font-mono",children:i.action})}),l.jsx("td",{className:"text-slate-400 text-xs",children:i.target||i.resource||"-"}),l.jsx("td",{className:"text-slate-500 text-xs max-w-md truncate",children:i.detail||i.details||""})]},i.id||s)),!(a||[]).length&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"text-center text-slate-500 py-8",children:"No audit logs found."})})]})]})})]})}function oOe(){const e=Wt(),{data:t}=oe({queryKey:["providers"],queryFn:OX}),{data:n}=oe({queryKey:["settings"],queryFn:IX}),[r,a]=j.useState({}),i=async o=>{const c=r[o];c!==void 0&&(await zX(o,c).catch(()=>{}),e.invalidateQueries({queryKey:["settings"]}))},s=Array.isArray(t)?t:Object.entries(t||{}).map(([o,c])=>({adapter:o,provider:typeof c=="string"?c:c==null?void 0:c.provider,active:(c==null?void 0:c.active)??!0}));return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[l.jsx(a5,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Gateways · Settings"})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[l.jsx(_G,{size:16,className:"text-brand"})," Gateway Adapters (provider)"]}),l.jsxs("p",{className:"text-xs text-slate-500 mb-3 flex items-center gap-1.5",children:[l.jsx(Qc,{size:13,className:"text-accent"})," API keys are stored only in environment variables and are never shown on screen. (Default mock = 0 external calls)"]}),l.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-3",children:[s.map((o,c)=>l.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-3 flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-slate-400 uppercase",children:o.adapter}),l.jsx("div",{className:"font-semibold",children:o.provider||"mock"})]}),l.jsx("span",{className:`text-xs px-2 py-1 rounded ${o.provider&&o.provider!=="mock"?"bg-emerald-500/15 text-emerald-400":"bg-slate-600/20 text-slate-400"}`,children:o.provider&&o.provider!=="mock"?"Live":"mock"})]},c)),!s.length&&l.jsx("div",{className:"text-slate-500 text-sm",children:"Unable to load provider information."})]})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("div",{className:"text-sm font-semibold mb-3",children:"System Settings"}),l.jsxs("div",{className:"space-y-2",children:[(n||[]).map(o=>{const c=o.key||o.settingKey,u=r[c]??o.value??o.settingValue??"";return l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-sm text-slate-400 w-56 font-mono text-xs",children:c}),l.jsx("input",{value:u,onChange:d=>a({...r,[c]:d.target.value}),className:"flex-1 bg-panel border border-edge rounded-lg px-3 py-2 text-sm"}),l.jsx("button",{onClick:()=>i(c),className:"bg-brand2 text-white text-xs px-3 py-2 rounded-lg",children:"Save"})]},c)}),!(n||[]).length&&l.jsx("div",{className:"text-slate-500 text-sm py-4",children:"No settings available."})]})]})]})}const II="https://itsm.zioinfo.co.kr",ub=e=>e==null?void 0:e.replace(/https?:\/\/zioinfo\.co\.kr:8443/g,II);function lOe(){const[e,t]=j.useState(null),[n,r]=j.useState(!0),[a,i]=j.useState(""),[s,o]=j.useState(!1),c=()=>{r(!0),i(""),fetch(`${II}/api/app/public-latest`).then(d=>d.json()).then(d=>t({...d,qr_url:ub(d.qr_url),landing_url:ub(d.landing_url),download_url:ub(d.download_url)})).catch(()=>i("Unable to connect to the central app repository (ITSM).")).finally(()=>r(!1))};j.useEffect(()=>{c()},[]);const u=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(_l,{className:"text-brand",size:22}),l.jsx("h1",{className:"text-xl font-bold",children:"Admin App Install"})]}),l.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[l.jsx(xy,{size:15})," Refresh"]})]}),l.jsxs("p",{className:"text-sm text-slate-400 mb-6",children:["Mobile app for store and corporate admins. Scan the QR code to open the install page. App uploads and version management are centralized in ",l.jsx("span",{className:"text-brand",children:"GUARDiA Manager"})," (read-only)."]}),n&&l.jsx("div",{className:"text-slate-400 text-sm",children:"Loading…"}),a&&l.jsx("div",{className:"bg-card border border-edge rounded-xl p-6 text-rose-400 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-8 text-center text-slate-400",children:[l.jsx(_l,{size:36,className:"mx-auto mb-3 text-slate-600"}),"No app version has been registered yet.",l.jsx("br",{}),l.jsx("span",{className:"text-xs",children:"Once an APK is uploaded in GUARDiA Manager, the QR code will appear here."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start",children:[l.jsx("div",{className:"bg-white rounded-xl p-3 flex items-center justify-center",children:e.qr_url?l.jsx("img",{src:e.qr_url,alt:"Admin App QR",className:"w-44 h-44"}):l.jsx(_l,{size:64,className:"text-slate-400"})}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Mall Admin"}),l.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-brand2 text-white text-xs font-semibold",children:["v",e.version]})]}),l.jsxs("div",{className:"text-xs text-slate-400 mb-4",children:[e.platform," ",e.file_size_mb?`· ${e.file_size_mb}MB`:"",e.download_count!=null&&` · ${e.download_count} downloads`]}),e.release_notes&&l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-[11px] font-semibold text-slate-500 uppercase tracking-wider mb-1",children:"Release Notes"}),l.jsx("div",{className:"text-sm text-slate-300 whitespace-pre-line bg-ink border border-edge rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.landing_url&&l.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold",children:[l.jsx(W$,{size:15})," Install Page"]}),e.download_url&&l.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[l.jsx(Y$,{size:15})," Download APK"]}),l.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[s?l.jsx(V$,{size:15,className:"text-accent"}):l.jsx(G$,{size:15}),s?"Copied":"Copy Link"]})]})]})]})]})}function cOe(){const[e,t]=j.useState(null),[n,r]=j.useState(""),[a,i]=j.useState(""),s=localStorage.getItem("mall_role")||"",o=s==="ADMIN"||s==="MANAGER",c=()=>eQ().then(t).catch(()=>i("Failed to load toggles"));j.useEffect(()=>{c()},[]);const u=async(h,p)=>{if(!o){i("No permission to change (MANAGER or above)");return}r(h),i("");try{const g=await tQ(h,p);t(g)}catch{i("Change failed — check permission or server")}finally{r("")}};if(!e)return l.jsx("div",{className:"text-slate-400 text-sm",children:"Loading…"});const d=({on:h,k:p,disabled:g})=>l.jsx("button",{disabled:!o||n===p||g,onClick:()=>u(p,!h),className:`relative w-11 h-6 rounded-full transition ${h?"bg-brand":"bg-edge"} ${!o||g?"opacity-50 cursor-not-allowed":""}`,children:l.jsx("span",{className:`absolute top-0.5 ${h?"left-6":"left-0.5"} w-5 h-5 rounded-full bg-white transition`})}),f=({icon:h,title:p,desc:g,children:m})=>l.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-edge last:border-0",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(h,{size:16,className:"text-brand mt-0.5"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium",children:p}),l.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:g})]})]}),l.jsx("div",{className:"shrink-0",children:m})]});return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-5",children:[l.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[l.jsx(Rn,{className:"text-brand",size:20})," AI Techniques"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full bg-card border border-edge ${e.ragAvailable?"text-emerald-400":"text-amber-400"}`,children:[l.jsx(Mm,{size:13})," central guardia-rag ",e.ragAvailable?"available":"unavailable (Mall fallback)"]}),l.jsx("button",{onClick:c,className:"p-2 rounded-lg bg-card border border-edge text-slate-300",children:l.jsx(xy,{size:14})})]})]}),a&&l.jsx("div",{className:"mb-3 text-xs text-rose-400 bg-rose-950/30 border border-rose-900/50 rounded-lg px-3 py-2",children:a}),!o&&l.jsx("div",{className:"mb-3 text-xs text-slate-400",children:"Read-only — changes require MANAGER role or above."}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h3",{className:"text-sm font-semibold mb-2",children:"Retrieval & Generation"}),l.jsx(f,{icon:Qc,title:"Use RAG layer",desc:"off → all AI falls back to existing Ollama/Java path",children:l.jsx(d,{on:e.ragEnabled,k:"rag.enabled"})}),l.jsx(f,{icon:nh,title:"Hybrid search (retrieval_mode)",desc:"vector → hybrid (BM25+vector) for recommend/search",children:l.jsxs("select",{disabled:!o||n==="rag.retrieval_mode",value:e.retrievalMode,onChange:h=>u("rag.retrieval_mode",h.target.value),className:"bg-ink border border-edge rounded-lg text-xs px-2 py-1.5 outline-none",children:[l.jsx("option",{value:"vector",children:"vector"}),l.jsx("option",{value:"hybrid",children:"hybrid"}),l.jsx("option",{value:"graph",children:"graph"})]})}),l.jsx(f,{icon:AG,title:"GraphRAG",desc:"knowledge-graph search. Heavy → off by default (on ⇒ mode=graph)",children:l.jsx(d,{on:e.graphrag,k:"rag.graphrag"})}),l.jsx(f,{icon:J$,title:"Rerank",desc:"cross-encoder reorder. Heavy → off by default",children:l.jsx(d,{on:e.rerank,k:"rag.rerank"})})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsx("h3",{className:"text-sm font-semibold mb-2",children:"Agentic · Structured · Streaming"}),l.jsx(f,{icon:sG,title:"Structured output",desc:"recommend/decision results as /structured deterministic JSON. Default on",children:l.jsx(d,{on:e.structured,k:"rag.structured"})}),l.jsx(f,{icon:UG,title:"Agentic tool-use (/agent)",desc:"demand forecast / stock transfer via tool calls. Heavy → off by default",children:l.jsx(d,{on:e.toolUse,k:"rag.tool_use"})}),l.jsx(f,{icon:X0,title:"Token streaming (SSE)",desc:"stream long answers (CS reply / card message). Default off",children:l.jsx(d,{on:e.stream,k:"rag.stream"})})]}),l.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 lg:col-span-2",children:[l.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Parameters"}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[l.jsx(fp,{label:"top_k (1–20)",value:e.topK,min:1,max:20,step:1,onSave:h=>u("rag.top_k",h),canEdit:o}),l.jsx(fp,{label:"agent step cap (1–8)",value:e.agentMaxSteps,min:1,max:8,step:1,onSave:h=>u("rag.agent_max_steps",h),canEdit:o}),l.jsx(fp,{label:"faithfulness threshold (0–1)",value:e.faithfulnessThreshold,min:0,max:1,step:.05,onSave:h=>u("rag.faithfulness_threshold",h),canEdit:o}),l.jsx(fp,{label:"temperature (0–1)",value:e.temperature,min:0,max:1,step:.05,onSave:h=>u("rag.temperature",h),canEdit:o})]}),l.jsxs("div",{className:"mt-4 text-xs text-slate-400",children:["Generation model: ",l.jsx("span",{className:"text-slate-200 font-mono",children:e.generationModel})," · small model by default (server RAM). Heavy techniques are guarded by concurrency limits and fallback."]})]})]})]})}function fp({label:e,value:t,min:n,max:r,step:a,onSave:i,canEdit:s}){const[o,c]=j.useState(String(t));return j.useEffect(()=>{c(String(t))},[t]),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e}),l.jsx("input",{type:"number",min:n,max:r,step:a,value:o,disabled:!s,onChange:u=>c(u.target.value),onBlur:()=>{const u=Number(o);Number.isNaN(u)||i(u)},className:"w-full bg-ink border border-edge rounded-lg text-sm px-3 py-2 outline-none focus:border-brand disabled:opacity-50"})]})}const uOe=()=>B.get("/api/admin/ai-config").then(e=>{var t;return(t=e.data)==null?void 0:t.data}),dOe=e=>B.put("/api/admin/ai-config",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data}),fOe=()=>B.post("/api/admin/ai-config/test",{}).then(e=>{var t;return(t=e.data)==null?void 0:t.data}),hOe=e=>B.post("/api/ai/feedback",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data});function pOe({feature:e,question:t,answer:n,className:r}){const[a,i]=j.useState(null),[s,o]=j.useState(""),[c,u]=j.useState(!1),[d,f]=j.useState(!1),h=async(g,m)=>{f(!0);try{await hOe({feature:e,question:t,answer:n,verdict:g,correction:m}),u(!0)}catch{u(!0)}finally{f(!1)}},p=g=>{i(g),g==="up"&&h("up")};return c?l.jsx("div",{className:`text-xs text-emerald-300 ${r??""}`,children:"피드백 감사합니다."}):l.jsxs("div",{className:`flex flex-col gap-2 ${r??""}`,children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-400",children:[l.jsx("span",{children:"이 답변이 도움이 되었나요?"}),l.jsx("button",{onClick:()=>p("up"),disabled:d,"aria-label":"도움됨",className:`p-1.5 rounded-lg border transition-colors ${a==="up"?"bg-emerald-500/15 border-emerald-500/40 text-emerald-300":"bg-ink border-edge text-slate-300 hover:border-emerald-500/50"}`,children:l.jsx(zG,{size:14})}),l.jsx("button",{onClick:()=>p("down"),disabled:d,"aria-label":"도움 안됨",className:`p-1.5 rounded-lg border transition-colors ${a==="down"?"bg-rose-500/15 border-rose-500/40 text-rose-300":"bg-ink border-edge text-slate-300 hover:border-rose-500/50"}`,children:l.jsx(IG,{size:14})})]}),a==="down"&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{value:s,onChange:g=>o(g.target.value),placeholder:"더 나은 답변/교정 (선택)",className:"flex-1 px-3 py-1.5 rounded-lg bg-ink border border-edge text-xs focus:border-brand outline-none"}),l.jsx("button",{onClick:()=>h("down",s),disabled:d,className:"px-3 py-1.5 rounded-lg bg-brand text-ink text-xs font-semibold disabled:opacity-40",children:"보내기"})]})]})}const mOe=[{id:"ollama",label:"Ollama (기본)",hint:"온프레미스 · llama3.2:1b"},{id:"qwen3",label:"Qwen3",hint:"온프레미스 · qwen3:1.7b"},{id:"deepseek",label:"DeepSeek",hint:"온프레미스 · deepseek-r1:1.5b"},{id:"glm",label:"GLM (Zhipu)",hint:"온프레미스 · glm4:9b · RAM 증설 필요"},{id:"claude",label:"Claude (외부)",hint:"api.anthropic.com · 키 필요"}],zI=["claude-sonnet-4-6","claude-haiku-4-5","claude-opus-4-8"],Up="claude-sonnet-4-6",db=e=>zI.includes(e)?e:Up;function fb(e){var n,r,a;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"";return((a=e==null?void 0:e.response)==null?void 0:a.status)===403?"권한이 없습니다 (AI 설정은 ADMIN 전용).":t.includes("ERR-AI-400")?t.replace(/^ERR-AI-400:\s*/,""):"AI 설정을 처리하지 못했습니다."}function gOe(){const[e,t]=j.useState("ollama"),[n,r]=j.useState(Up),[a,i]=j.useState(!1),[s,o]=j.useState(""),[c,u]=j.useState(!0),[d,f]=j.useState(!1),[h,p]=j.useState(!1),[g,m]=j.useState(!1),[v,y]=j.useState(""),[x,b]=j.useState(!1),[w,S]=j.useState(null),A=()=>{f(!0),uOe().then(k=>{t(k.provider),r(db(k.claudeModel??Up)),i(!!k.claudeKeySet),o(k.ollamaTextModel??""),u(!!k.aiEnabled),y("")}).catch(k=>y(fb(k))).finally(()=>f(!1))};j.useEffect(()=>{A()},[]);const O=()=>{m(!1),S(null)},N=async()=>{p(!0),m(!1);try{const k=await dOe({provider:e,claudeModel:n});t(k.provider),r(db(k.claudeModel??Up)),i(!!k.claudeKeySet),o(k.ollamaTextModel??""),u(!!k.aiEnabled),m(!0),y("")}catch(k){y(fb(k))}finally{p(!1)}},E=async()=>{b(!0),S(null);try{S(await fOe())}catch(k){S({ok:!1,degraded:!1,message:fb(k)})}finally{b(!1)}},T=e==="claude",_=e==="glm",C=T&&!a,$=!T&&!c,R=w?w.degraded?"text-amber-300":w.ok?"text-emerald-300":"text-rose-300":"";return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[l.jsx(Mm,{size:20,className:"text-brand"})," AI 플랫폼 설정"]}),l.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"상품추천·리뷰요약·CS응답 등 텍스트 생성에 사용할 LLM 제공자와 모델을 선택합니다."})]}),l.jsx("button",{onClick:A,disabled:d,className:"px-3 py-1.5 rounded-lg bg-card border border-edge text-sm disabled:opacity-40",children:"새로고침"})]}),v&&l.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:v}),_&&l.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4 flex items-center gap-2",children:[l.jsx(Rm,{size:15})," GLM(glm4:9b)은 약 5.5GB 로드로 현재 서버 RAM(가용 ~2GB)을 초과합니다. RAM 증설 전까지 콜드로드 실패 시 Ollama 소형모델로 폴백합니다."]}),(C||$)&&l.jsx("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:C?"Claude API 키가 설정되지 않아 Ollama(온프레미스)로 폴백 동작합니다. 서버 환경변수 ANTHROPIC_API_KEY 설정 후 사용하세요.":"AI 기능이 비활성 상태입니다. 모든 AI 결과는 규칙 기반(degraded)으로 동작합니다."}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsxs("h2",{className:"text-sm font-semibold mb-4 flex items-center gap-2",children:[l.jsx(Mm,{size:16,className:"text-brand"})," 제공자 & 모델"]}),l.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:mOe.map(k=>l.jsxs("button",{onClick:()=>{t(k.id),O()},className:`text-left px-3 py-2.5 rounded-lg border text-sm transition-colors ${e===k.id?"bg-brand/15 border-brand text-brand":"bg-ink border-edge text-slate-300 hover:border-brand/50"}`,children:[l.jsxs("div",{className:"font-semibold flex items-center gap-1",children:[k.label,k.id==="glm"&&l.jsx(Rm,{size:12,className:"text-amber-400"})]}),l.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:k.hint})]},k.id))}),!T&&l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Ollama 텍스트 모델"}),l.jsx("div",{className:"px-3 py-2 rounded-lg bg-ink border border-edge text-sm font-mono",children:s||"llama3.2:1b"}),l.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"온프레미스 모델 — 외부 호출 없음. glm 은 RAM 초과 시 소형모델로 폴백."})]}),T&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Claude 모델"}),l.jsx("select",{value:n,onChange:k=>{r(db(k.target.value)),O()},className:"w-full px-3 py-2 rounded-lg bg-ink border border-edge text-sm focus:border-brand outline-none",children:zI.map(k=>l.jsx("option",{value:k,children:k},k))})]}),l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-xs text-slate-500 mb-1 flex items-center gap-1",children:[l.jsx(vG,{size:13})," API 키"]}),l.jsx("span",{className:`inline-block px-3 py-1 rounded-lg text-xs font-semibold ${a?"bg-emerald-500/15 text-emerald-300 border border-emerald-500/40":"bg-rose-500/15 text-rose-300 border border-rose-500/40"}`,children:a?"설정됨":"미설정"}),l.jsx("p",{className:"text-[11px] text-slate-500 mt-1.5",children:"키는 서버 환경변수(ANTHROPIC_API_KEY)로만 주입되며 화면·응답·로그에 노출되지 않습니다."})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{onClick:N,disabled:h||d,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-40",children:[l.jsx(kG,{size:15})," ",h?"저장 중…":"저장"]}),g&&l.jsx("span",{className:"text-emerald-300 text-xs",children:"저장됨"})]})]}),l.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsxs("h2",{className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[l.jsx(CG,{size:16,className:"text-brand"})," 연결 테스트"]}),l.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"저장된 설정 기준으로 선택한 제공자에 짧은 ping 을 보내 연결을 확인합니다(요약 결과만)."}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{onClick:E,disabled:x,className:"px-4 py-2 rounded-lg bg-card border border-edge text-sm disabled:opacity-40 hover:border-brand/50",children:x?"테스트 중…":"테스트 실행"}),w&&l.jsx("span",{className:`text-sm ${R}`,role:"status","aria-live":"polite",children:w.message})]}),l.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"먼저 변경 사항을 저장한 뒤 테스트하세요. Claude 실패 시 Ollama 로 자동 폴백합니다."}),l.jsx("div",{className:"mt-4 pt-4 border-t border-edge",children:l.jsx(pOe,{feature:"ai-config",question:"AI 플랫폼 설정 화면"})})]})]})]})}const hb=8;function hp(e,t){var n,r,a;return((n=e==null?void 0:e.response)==null?void 0:n.status)===403?"권한이 없습니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||t}function yOe(){const[e,t]=j.useState(""),[n,r]=j.useState(null),[a,i]=j.useState("idle"),[s,o]=j.useState(""),[c,u]=j.useState(""),[d,f]=j.useState(""),[h,p]=j.useState(!1),[g,m]=j.useState(null),[v,y]=j.useState(""),[x,b]=j.useState(""),[w,S]=j.useState(""),[A,O]=j.useState(!1),[N,E]=j.useState(!1),[T,_]=j.useState(null),C=()=>Fj().then(U=>{t((U==null?void 0:U.username)||localStorage.getItem("mall_admin_user")||""),typeof(U==null?void 0:U.otpEnabled)=="boolean"?r(U.otpEnabled):typeof(U==null?void 0:U.verifyMethod)=="string"&&r(U.verifyMethod==="OTP")}).catch(()=>{});j.useEffect(()=>{C()},[]);const $=async()=>{m(null),p(!0);try{const U=await DW();o((U==null?void 0:U.qrImage)||""),u((U==null?void 0:U.secret)||""),f(""),i("setup")}catch(U){m({ok:!1,text:hp(U,"OTP 등록을 시작하지 못했습니다.")})}finally{p(!1)}},R=async()=>{m(null),p(!0);try{await $W(d),u(""),o(""),f(""),i("done"),r(!0),m({ok:!0,text:"2차 인증이 활성화되었습니다."})}catch(U){m({ok:!1,text:hp(U,"코드가 일치하지 않거나 만료되었습니다.")})}finally{p(!1)}},k=()=>{i("idle"),u(""),o(""),f(""),m(null)},M=async()=>{if(window.confirm("Authenticator 2차 인증을 해제하시겠습니까?")){m(null),p(!0);try{await LW(),i("idle"),u(""),o(""),r(!1),m({ok:!0,text:"2차 인증이 해제되었습니다."})}catch(U){m({ok:!1,text:hp(U,"OTP 해제에 실패했습니다.")})}finally{p(!1)}}},L=async()=>{if(_(null),!v){_({ok:!1,text:"현재 비밀번호를 입력하세요."});return}if(x.length<hb){_({ok:!1,text:`새 비밀번호는 최소 ${hb}자 이상이어야 합니다.`});return}if(x!==w){_({ok:!1,text:"새 비밀번호가 일치하지 않습니다."});return}if(x===v){_({ok:!1,text:"새 비밀번호는 현재 비밀번호와 달라야 합니다."});return}E(!0);try{await IW(v,x),y(""),b(""),S(""),_({ok:!0,text:"비밀번호가 변경되었습니다."})}catch(U){_({ok:!1,text:hp(U,"비밀번호 변경에 실패했습니다.")})}finally{E(!1)}},z="w-full px-3 py-2 rounded-lg bg-ink border border-edge text-sm focus:border-brand outline-none",V=z+" tracking-[0.4em] text-center text-lg",K=({m:U})=>U?l.jsxs("div",{className:`flex items-center gap-2 text-sm rounded-lg px-3 py-2 mb-3 border ${U.ok?"bg-accent/10 border-accent/40 text-accent":"bg-rose-500/10 border-rose-500/40 text-rose-300"}`,children:[U.ok?l.jsx(H$,{size:16}):l.jsx(Rm,{size:16}),U.text]}):null;return l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h1",{className:"text-xl font-bold mb-1",children:"마이페이지 / My Page"}),l.jsx("p",{className:"text-sm text-slate-400 mb-6",children:e&&l.jsxs(l.Fragment,{children:["계정: ",l.jsx("span",{className:"text-slate-200",children:e})]})}),l.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5 mb-6",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx(Qc,{size:18,className:"text-brand"}),l.jsx("h2",{className:"font-semibold",children:"2차 인증 — Authenticator(OTP)"})]}),l.jsxs("p",{className:"text-xs text-slate-400 mb-4",children:["Google·Microsoft Authenticator 앱으로 6자리 코드를 사용하는 2차 인증을 설정합니다.",n!==null&&l.jsxs("span",{className:"ml-2",children:["현재 상태:"," ",l.jsx("span",{className:n?"text-accent":"text-slate-300",children:n?"OTP 사용 중":"미설정"})]})]}),l.jsx(K,{m:g}),a==="idle"&&l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsxs("button",{onClick:$,disabled:h,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:[l.jsx(MG,{size:16})," ",h?"발급 중…":n?"OTP 재설정 시작":"OTP 등록 시작"]}),n&&l.jsx("button",{onClick:M,disabled:h,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60",children:"Authenticator 해제"})]}),a==="setup"&&l.jsxs("div",{children:[l.jsxs("ol",{className:"list-decimal list-inside text-sm text-slate-300 leading-7 mb-3",children:[l.jsx("li",{children:"Authenticator 앱에서 아래 QR을 스캔하세요."}),l.jsx("li",{children:"스캔이 안 되면 수동 키를 직접 입력하세요."}),l.jsx("li",{children:"앱에 표시된 6자리 코드를 입력해 확인하세요."})]}),s&&l.jsx("div",{className:"flex justify-center mb-3",children:l.jsx("img",{src:s,alt:"OTP QR",width:200,height:200,style:{background:"#fff",padding:8,borderRadius:8}})}),c&&l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"수동 입력 키"}),l.jsx("code",{className:"block text-xs text-accent bg-ink border border-edge rounded-md px-2 py-1.5 break-all select-all",children:c})]}),l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"앱에 표시된 6자리 코드"}),l.jsx("input",{value:d,onChange:U=>f(U.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,placeholder:"000000",className:V+" mb-3"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:R,disabled:h||d.length!==6,className:"px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:h?"확인 중…":"코드 확인 · 활성화"}),l.jsx("button",{onClick:k,disabled:h,className:"px-4 py-2 rounded-lg border border-edge text-sm text-slate-300 hover:bg-card/60",children:"취소"})]})]}),a==="done"&&l.jsx("div",{className:"flex flex-wrap gap-2",children:l.jsx("button",{onClick:M,disabled:h,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60",children:"Authenticator 해제"})})]}),l.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(W0,{size:18,className:"text-brand"}),l.jsx("h2",{className:"font-semibold",children:"비밀번호 변경 / Change Password"})]}),l.jsx(K,{m:T}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"현재 비밀번호"}),l.jsx("input",{type:A?"text":"password",value:v,autoComplete:"current-password",onChange:U=>y(U.target.value),className:z})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"block text-xs text-slate-400 mb-1",children:["새 비밀번호 (최소 ",hb,"자)"]}),l.jsx("input",{type:A?"text":"password",value:x,autoComplete:"new-password",onChange:U=>b(U.target.value),className:z})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"새 비밀번호 확인"}),l.jsx("input",{type:A?"text":"password",value:w,autoComplete:"new-password",onChange:U=>S(U.target.value),className:z})]}),l.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-slate-400 cursor-pointer select-none",children:[l.jsx("button",{type:"button",onClick:()=>O(!A),className:"text-slate-400 hover:text-brand",children:A?l.jsx(hG,{size:15}):l.jsx(pG,{size:15})}),"비밀번호 표시"]}),l.jsx("button",{onClick:L,disabled:N,className:"px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:N?"변경 중…":"비밀번호 변경"})]})]})]})}const BI=j.createContext({theme:"dark",toggle:()=>{},setTheme:()=>{}}),ZP="mall_uiws_theme";function vOe(e){document.documentElement.setAttribute("data-uiws-theme",e)}function xOe({children:e}){const[t,n]=j.useState(()=>localStorage.getItem(ZP)==="light"?"light":"dark");j.useEffect(()=>{vOe(t),localStorage.setItem(ZP,t)},[t]);const r=i=>n(i),a=()=>n(i=>i==="dark"?"light":"dark");return l.jsx(BI.Provider,{value:{theme:t,toggle:a,setTheme:r},children:e})}function bOe(){return j.useContext(BI)}function SOe(){const{theme:e,toggle:t}=bOe();return l.jsxs("button",{onClick:t,title:"테마 전환",style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",background:"none",border:"1px solid var(--uiws-border, #2d3448)",borderRadius:8,color:"var(--uiws-text-muted, #8892b0)",cursor:"pointer",fontSize:13,width:"100%"},children:[e==="dark"?l.jsx($G,{size:16}):l.jsx(jG,{size:16}),e==="dark"?"라이트 모드":"다크 모드"]})}function Wr({children:e}){return l.jsx(xOe,{children:l.jsxs("div",{className:"uiws-scope",style:{minHeight:"100%",background:"var(--uiws-bg)",borderRadius:12,padding:20},children:[l.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:l.jsx("div",{style:{width:140},children:l.jsx(SOe,{})})}),e]})})}const Z2={background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,boxShadow:"var(--uiws-shadow)"};function ba({title:e,subtitle:t,actions:n}){return l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",marginBottom:20},children:[l.jsxs("div",{children:[l.jsx("h1",{style:{fontSize:22,fontWeight:700,color:"var(--uiws-text)"},children:e}),t&&l.jsx("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginTop:4},children:t})]}),l.jsx("div",{style:{display:"flex",gap:8},children:n})]})}function Pf({children:e,style:t}){return l.jsx("div",{style:{...Z2,padding:18,...t},children:e})}function se({children:e,onClick:t,variant:n="primary",type:r="button",disabled:a}){const i={primary:{background:"var(--uiws-primary)",color:"var(--uiws-primary-contrast)",border:"none"},ghost:{background:"transparent",color:"var(--uiws-text-muted)",border:"1px solid var(--uiws-border)"},danger:{background:"var(--uiws-danger)",color:"#fff",border:"none"}};return l.jsx("button",{type:r,onClick:t,disabled:a,style:{padding:"9px 16px",borderRadius:8,fontSize:13,fontWeight:600,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,...i[n]},children:e})}function Ee({value:e,onChange:t,placeholder:n,type:r="text",style:a}){return l.jsx("input",{type:r,value:e,placeholder:n,onChange:i=>t(i.target.value),style:{padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)",...a}})}function Me({label:e,children:t}){return l.jsxs("label",{style:{display:"block",marginBottom:12},children:[l.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:e}),t]})}function gs({children:e}){return l.jsx(Pf,{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:16},children:e})}function $o({columns:e,rows:t,rowKey:n,onRowClick:r,empty:a="데이터가 없습니다."}){return l.jsx("div",{style:{...Z2,overflow:"hidden"},children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[l.jsx("thead",{children:l.jsx("tr",{style:{background:"var(--uiws-surface-2)"},children:e.map(i=>l.jsx("th",{style:{textAlign:i.align??"left",padding:"11px 14px",color:"var(--uiws-text-muted)",fontWeight:600,fontSize:12,borderBottom:"1px solid var(--uiws-border)",width:i.width},children:i.header},i.key))})}),l.jsx("tbody",{children:t.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:a})}):t.map(i=>l.jsx("tr",{onClick:()=>r==null?void 0:r(i),style:{cursor:r?"pointer":"default",borderBottom:"1px solid var(--uiws-border)"},onMouseEnter:s=>s.currentTarget.style.background="var(--uiws-row-hover)",onMouseLeave:s=>s.currentTarget.style.background="transparent",children:e.map(s=>l.jsx("td",{style:{padding:"11px 14px",textAlign:s.align??"left"},children:s.render?s.render(i):String(i[s.key]??"")},s.key))},n(i)))})]})})}function UI({page:e,totalPages:t,onChange:n}){return t<=1?null:l.jsxs("div",{style:{display:"flex",gap:6,justifyContent:"center",marginTop:16},children:[l.jsx(se,{variant:"ghost",disabled:e<=0,onClick:()=>n(e-1),children:"이전"}),l.jsxs("span",{style:{alignSelf:"center",fontSize:13,color:"var(--uiws-text-muted)"},children:[e+1," / ",t]}),l.jsx(se,{variant:"ghost",disabled:e>=t-1,onClick:()=>n(e+1),children:"다음"})]})}function Lo({yn:e,yes:t="읽음",no:n="안읽음"}){const r=e==="Y";return l.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"2px 9px",borderRadius:999,color:r?"var(--uiws-success)":"var(--uiws-text-muted)",background:r?"rgba(46,204,113,0.12)":"var(--uiws-surface-2)",border:"1px solid var(--uiws-border)"},children:r?t:n})}function Gr({title:e,onClose:t,children:n,footer:r}){return l.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},children:l.jsxs("div",{onClick:a=>a.stopPropagation(),style:{...Z2,width:"min(560px, 92vw)",maxHeight:"88vh",overflow:"auto",padding:22},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[l.jsx("h2",{style:{fontSize:17,fontWeight:700,color:"var(--uiws-text)"},children:e}),l.jsx("button",{onClick:t,style:{background:"none",border:"none",color:"var(--uiws-text-muted)",fontSize:20,cursor:"pointer"},children:"×"})]}),l.jsx("div",{children:n}),r&&l.jsx("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:18},children:r})]})})}function Nr({label:e="불러오는 중..."}){return l.jsx("div",{style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)",fontSize:13},children:e})}const JP={ONGOING:"진행중",DONE:"종료"};function wOe(){const[e,t]=j.useState([]),[n,r]=j.useState(0),[a,i]=j.useState(0),[s,o]=j.useState([]),[c,u]=j.useState(""),[d,f]=j.useState(""),[h,p]=j.useState(!1),[g,m]=j.useState(!1),[v,y]=j.useState(null),x=async()=>{p(!0);try{const A=(await cZ({page:n,size:20,progressCd:c||void 0})).data.data;t(A.content??[]),i(A.totalPages??0);const O=await uZ({});o(O.data.data??[])}finally{p(!1)}};j.useEffect(()=>{x()},[n,c]);const b=[{key:"workDate",header:"근무일자",width:120},{key:"title",header:"제목"},{key:"writerNm",header:"작성자",width:120},{key:"progressCd",header:"진행",width:90,render:S=>JP[S.progressCd]??S.progressCd},{key:"commentCount",header:"댓글",width:70,align:"center"}],w=async S=>{const A=await fZ(S.worklogId);y(A.data.data)};return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"업무일지",subtitle:"UIWS 이식 · 업무일지 작성/조회/진행관리",actions:l.jsx(se,{onClick:()=>m(!0),children:"+ 업무일지 작성"})}),l.jsx("div",{style:{display:"flex",gap:10,marginBottom:16,flexWrap:"wrap"},children:s.map(S=>l.jsxs("div",{onClick:()=>{u(c===S.progressCd?"":S.progressCd),r(0)},style:{cursor:"pointer",padding:"12px 18px",borderRadius:10,minWidth:130,background:"var(--uiws-surface)",border:`1px solid ${c===S.progressCd?"var(--uiws-primary)":"var(--uiws-border)"}`},children:[l.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)"},children:S.progressNm}),l.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--uiws-primary)"},children:S.count})]},S.progressCd))}),l.jsxs(gs,{children:[l.jsx(Ee,{value:d,onChange:f,placeholder:"제목 검색",style:{minWidth:220}}),l.jsx(se,{variant:"ghost",onClick:()=>{r(0),x()},children:"검색"}),c&&l.jsxs(se,{variant:"ghost",onClick:()=>u(""),children:["필터 해제: ",JP[c]??c]})]}),h?l.jsx(Nr,{}):l.jsxs(l.Fragment,{children:[l.jsx($o,{columns:b,rows:e,rowKey:S=>S.worklogId,onRowClick:w,empty:"업무일지가 없습니다."}),l.jsx(UI,{page:n,totalPages:a,onChange:r})]}),g&&l.jsx(jOe,{onClose:()=>m(!1),onSaved:()=>{m(!1),x()}}),v&&l.jsx(AOe,{detail:v,onClose:()=>y(null),onChanged:()=>{y(null),x()}})]})}function jOe({onClose:e,onSaved:t}){const[n,r]=j.useState(""),[a,i]=j.useState(localStorage.getItem("erp_user")||"admin"),[s,o]=j.useState(new Date().toISOString().slice(0,10)),[c,u]=j.useState("NORMAL"),[d,f]=j.useState(""),h=async()=>{var p,g;f("");try{await dZ({title:n,writerId:a,workDate:s,workStatusCd:c,progressCd:"ONGOING",details:[]}),t()}catch(m){f(((g=(p=m==null?void 0:m.response)==null?void 0:p.data)==null?void 0:g.message)||"저장 실패")}};return l.jsxs(Gr,{title:"업무일지 작성",onClose:e,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:e,children:"취소"}),l.jsx(se,{onClick:h,children:"저장"})]}),children:[l.jsx(Me,{label:"제목",children:l.jsx(Ee,{value:n,onChange:r,style:{width:"100%"}})}),l.jsx(Me,{label:"작성자 ID",children:l.jsx(Ee,{value:a,onChange:i,style:{width:"100%"}})}),l.jsx(Me,{label:"근무일자",children:l.jsx(Ee,{type:"date",value:s,onChange:o,style:{width:"100%"}})}),l.jsx(Me,{label:"근무상태 코드",children:l.jsx(Ee,{value:c,onChange:u,style:{width:"100%"}})}),d&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:d})]})}function AOe({detail:e,onClose:t,onChanged:n}){var u;const[r,a]=j.useState(""),[i,s]=j.useState(""),o=async()=>{await hZ(e.worklogId),n()},c=async()=>{var d,f;s("");try{await pZ(e.worklogId,r),a(""),n()}catch(h){s(((f=(d=h==null?void 0:h.response)==null?void 0:d.data)==null?void 0:f.message)||"댓글 등록 실패")}};return l.jsxs(Gr,{title:e.title,onClose:t,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"danger",onClick:o,children:"삭제"}),l.jsx(se,{variant:"ghost",onClick:t,children:"닫기"})]}),children:[l.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:12},children:[e.writerNm," · ",e.workDate," · ",e.progressCd]}),l.jsxs("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:["시간대별 상세 ",((u=e.details)==null?void 0:u.length)??0,"건"]}),l.jsxs("div",{style:{marginTop:14},children:[l.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:8},children:"댓글"}),(e.comments??[]).map(d=>l.jsxs("div",{style:{padding:"8px 10px",borderRadius:8,background:"var(--uiws-surface-2)",marginBottom:6,fontSize:13},children:[l.jsx("b",{children:d.writerNm})," · ",l.jsx("span",{style:{color:"var(--uiws-text-muted)"},children:d.createdAt}),l.jsx("br",{}),d.cmtContent]},d.cmtId)),l.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[l.jsx(Ee,{value:r,onChange:a,placeholder:"댓글 입력(관리자/매니저)",style:{flex:1}}),l.jsx(se,{onClick:c,children:"등록"})]}),i&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:12,marginTop:6},children:i})]})]})}const OOe=["일","월","화","수","목","금","토"];function NOe(){const[e,t]=j.useState(new Date),[n,r]=j.useState("PERSONAL"),[a,i]=j.useState([]),[s,o]=j.useState(!1),[c,u]=j.useState(null),[d,f]=j.useState(null),h=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`,p=async()=>{o(!0);try{const w=await iZ({type:n,view:"month",baseDate:`${h}-01`});i(w.data.data??[])}finally{o(!1)}};j.useEffect(()=>{p()},[h,n]);const m=new Date(e.getFullYear(),e.getMonth(),1).getDay(),v=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),y=[...Array(m).fill(null),...Array.from({length:v},(w,S)=>S+1)],x=w=>{const S=`${h}-${String(w).padStart(2,"0")}`;return a.filter(A=>(A.startDt??"").slice(0,10)<=S&&S<=(A.endDt??"").slice(0,10))},b=w=>t(new Date(e.getFullYear(),e.getMonth()+w,1));return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"일정",subtitle:"UIWS 이식 · 개인/부서 일정 달력",actions:l.jsx(se,{onClick:()=>u(`${h}-01`),children:"+ 일정 등록"})}),l.jsxs(Pf,{style:{display:"flex",gap:10,alignItems:"center",marginBottom:16},children:[l.jsx(se,{variant:"ghost",onClick:()=>b(-1),children:"‹ 이전"}),l.jsx("div",{style:{fontWeight:700,minWidth:130,textAlign:"center",color:"var(--uiws-text)"},children:h}),l.jsx(se,{variant:"ghost",onClick:()=>b(1),children:"다음 ›"}),l.jsx("div",{style:{flex:1}}),l.jsx(se,{variant:n==="PERSONAL"?"primary":"ghost",onClick:()=>r("PERSONAL"),children:"개인"}),l.jsx(se,{variant:n==="DEPT"?"primary":"ghost",onClick:()=>r("DEPT"),children:"부서"})]}),s?l.jsx(Nr,{}):l.jsx("div",{style:{background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,overflow:"hidden"},children:l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(7,1fr)"},children:[OOe.map((w,S)=>l.jsx("div",{style:{padding:"10px 0",textAlign:"center",fontSize:12,fontWeight:600,color:S===0?"var(--uiws-danger)":"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:w},w)),y.map((w,S)=>l.jsxs("div",{onClick:()=>w&&u(`${h}-${String(w).padStart(2,"0")}`),style:{minHeight:96,padding:6,borderRight:"1px solid var(--uiws-border)",borderBottom:"1px solid var(--uiws-border)",cursor:w?"pointer":"default"},children:[w&&l.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:4},children:w}),w&&x(w).slice(0,3).map(A=>l.jsx("div",{onClick:O=>{O.stopPropagation(),oZ(A.scheduleId).then(N=>f(N.data.data))},style:{fontSize:11,padding:"2px 6px",borderRadius:6,marginBottom:3,background:"var(--uiws-primary-soft)",color:"var(--uiws-primary)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:A.title},A.scheduleId))]},S))]})}),c&&l.jsx(EOe,{date:c,type:n,onClose:()=>u(null),onSaved:()=>{u(null),p()}}),d&&l.jsx(TOe,{detail:d,onClose:()=>f(null),onDeleted:()=>{f(null),p()}})]})}function EOe({date:e,type:t,onClose:n,onSaved:r}){const[a,i]=j.useState(""),[s,o]=j.useState(`${e}T09:00:00`),[c,u]=j.useState(`${e}T18:00:00`),[d,f]=j.useState(""),[h,p]=j.useState(""),g=async()=>{var m,v;p("");try{await sZ({scheType:t,title:a,startDt:s,endDt:c,content:d,attachmentIds:[]}),r()}catch(y){p(((v=(m=y==null?void 0:y.response)==null?void 0:m.data)==null?void 0:v.message)||"저장 실패")}};return l.jsxs(Gr,{title:"일정 등록",onClose:n,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:n,children:"취소"}),l.jsx(se,{onClick:g,children:"저장"})]}),children:[l.jsx(Me,{label:"제목",children:l.jsx(Ee,{value:a,onChange:i,style:{width:"100%"}})}),l.jsx(Me,{label:"시작(yyyy-MM-ddTHH:mm:ss)",children:l.jsx(Ee,{value:s,onChange:o,style:{width:"100%"}})}),l.jsx(Me,{label:"종료",children:l.jsx(Ee,{value:c,onChange:u,style:{width:"100%"}})}),l.jsx(Me,{label:"내용",children:l.jsx(Ee,{value:d,onChange:f,style:{width:"100%"}})}),h&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}function TOe({detail:e,onClose:t,onDeleted:n}){const r=async()=>{await lZ(e.scheduleId),n()};return l.jsxs(Gr,{title:e.title,onClose:t,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"danger",onClick:r,children:"삭제"}),l.jsx(se,{variant:"ghost",onClick:t,children:"닫기"})]}),children:[l.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:8},children:[e.scheType," · ",e.startDt," ~ ",e.endDt]}),l.jsx("div",{style:{fontSize:14,color:"var(--uiws-text)"},children:e.content||"내용 없음"})]})}function COe(){const[e,t]=j.useState("received"),[n,r]=j.useState([]),[a,i]=j.useState(0),[s,o]=j.useState(0),[c,u]=j.useState(""),[d,f]=j.useState(!1),[h,p]=j.useState(!1),[g,m]=j.useState(null),v=async()=>{f(!0);try{const A=(await(e==="received"?rZ:tZ)({page:a,size:20,titleKeyword:c||void 0})).data.data;r(A.content??[]),o(A.totalPages??0)}finally{f(!1)}};j.useEffect(()=>{v()},[e,a]);const y=[{key:"title",header:"제목"},{key:"senderNm",header:"보낸사람",width:130},{key:"sentAt",header:"받은시각",width:170},{key:"readYn",header:"상태",width:90,render:w=>l.jsx(Lo,{yn:w.readYn})}],x=[{key:"title",header:"제목"},{key:"receiverSummary",header:"받는사람",width:160},{key:"open",header:"개봉",width:100,align:"center",render:w=>`${w.openCount}/${w.totalCount}`},{key:"sentAt",header:"보낸시각",width:170}],b=async w=>{const S=e==="received"?await aZ(w.messageId):await nZ(w.messageId);m({...S.data.data,_tab:e}),e==="received"&&v()};return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"쪽지",subtitle:"UIWS 이식 · 사내 쪽지 송수신",actions:l.jsx(se,{onClick:()=>p(!0),children:"+ 쪽지 보내기"})}),l.jsxs(gs,{children:[l.jsx(se,{variant:e==="received"?"primary":"ghost",onClick:()=>{t("received"),i(0)},children:"받은쪽지함"}),l.jsx(se,{variant:e==="sent"?"primary":"ghost",onClick:()=>{t("sent"),i(0)},children:"보낸쪽지함"}),l.jsx("div",{style:{flex:1}}),l.jsx(Ee,{value:c,onChange:u,placeholder:"제목 검색",style:{minWidth:200}}),l.jsx(se,{variant:"ghost",onClick:()=>{i(0),v()},children:"검색"})]}),d?l.jsx(Nr,{}):l.jsxs(l.Fragment,{children:[l.jsx($o,{columns:e==="received"?y:x,rows:n,rowKey:w=>w.messageId,onRowClick:b,empty:"쪽지가 없습니다."}),l.jsx(UI,{page:a,totalPages:s,onChange:i})]}),h&&l.jsx(_Oe,{onClose:()=>p(!1),onSent:()=>{p(!1),v()}}),g&&l.jsx(POe,{detail:g,onClose:()=>m(null)})]})}function _Oe({onClose:e,onSent:t}){const[n,r]=j.useState(""),[a,i]=j.useState(""),[s,o]=j.useState(""),[c,u]=j.useState(""),d=async()=>{var f,h;u("");try{await eZ({title:a,content:s,receivers:[{receiverId:n,rcvType:"RECV"}]}),t()}catch(p){u(((h=(f=p==null?void 0:p.response)==null?void 0:f.data)==null?void 0:h.message)||"전송 실패")}};return l.jsxs(Gr,{title:"쪽지 보내기",onClose:e,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:e,children:"취소"}),l.jsx(se,{onClick:d,children:"보내기"})]}),children:[l.jsx(Me,{label:"받는사람 ID",children:l.jsx(Ee,{value:n,onChange:r,style:{width:"100%"}})}),l.jsx(Me,{label:"제목",children:l.jsx(Ee,{value:a,onChange:i,style:{width:"100%"}})}),l.jsx(Me,{label:"내용",children:l.jsx(Ee,{value:s,onChange:o,style:{width:"100%"}})}),c&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:c})]})}function POe({detail:e,onClose:t}){return l.jsxs(Gr,{title:e.title,onClose:t,footer:l.jsx(se,{variant:"ghost",onClick:t,children:"닫기"}),children:[l.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:10},children:[e._tab==="received"?`보낸사람: ${e.senderNm}`:`개봉 ${e.openCount}/${e.totalCount}`," · ",e.sentAt]}),l.jsx("div",{style:{fontSize:14,color:"var(--uiws-text)",whiteSpace:"pre-wrap"},children:e.content}),e._tab==="sent"&&e.receivers&&l.jsxs("div",{style:{marginTop:14},children:[l.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:"수신자 개봉현황"}),e.receivers.map((n,r)=>l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:13,padding:"4px 0"},children:[l.jsxs("span",{children:[n.receiverNm," (",n.rcvType,")"]}),l.jsx(Lo,{yn:n.readYn})]},r))]})]})}function MOe(){const[e,t]=j.useState("personal"),[n,r]=j.useState(null),[a,i]=j.useState(!1),s=new Date().toISOString().slice(0,10),o=new Date(Date.now()-6*864e5).toISOString().slice(0,10),[c,u]=j.useState(o),[d,f]=j.useState(s),h=async()=>{i(!0);try{const m=await(e==="personal"?mZ:gZ)({fromDate:c,toDate:d});r(m.data.data)}finally{i(!1)}};j.useEffect(()=>{h()},[e]);const p=n?[...n.fixedColumns,...n.dynamicColumns]:[];return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"업무통계",subtitle:"UIWS 이식 · 근무현황 동적 피벗"}),l.jsxs(gs,{children:[l.jsx(se,{variant:e==="personal"?"primary":"ghost",onClick:()=>t("personal"),children:"개인별 근무현황"}),l.jsx(se,{variant:e==="company"?"primary":"ghost",onClick:()=>t("company"),children:"업체별 근무현황"}),l.jsx("div",{style:{flex:1}}),l.jsx(Ee,{type:"date",value:c,onChange:u}),l.jsx("span",{style:{color:"var(--uiws-text-muted)"},children:"~"}),l.jsx(Ee,{type:"date",value:d,onChange:f}),l.jsx(se,{variant:"ghost",onClick:h,children:"조회"})]}),a?l.jsx(Nr,{}):!n||n.rows.length===0?l.jsx("div",{style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:"집계 데이터가 없습니다."}):l.jsx("div",{style:{background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,overflow:"auto"},children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[l.jsx("thead",{children:l.jsx("tr",{style:{background:"var(--uiws-surface-2)"},children:p.map(g=>l.jsx("th",{style:{padding:"11px 14px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)",whiteSpace:"nowrap"},children:g.label},g.key))})}),l.jsx("tbody",{children:n.rows.map((g,m)=>l.jsx("tr",{style:{borderBottom:"1px solid var(--uiws-border)"},children:p.map(v=>l.jsx("td",{style:{padding:"10px 14px"},children:String(g[v.key]??"")},v.key))},m))})]})})]})}function MS(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (관리자 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 권한ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다. 잠시 후 다시 시도하세요."}function kOe(){const[e,t]=j.useState([]),[n,r]=j.useState(""),[a,i]=j.useState(!1),[s,o]=j.useState(""),[c,u]=j.useState(new Set),[d,f]=j.useState(null),[h,p]=j.useState(!1),g=async(x=n)=>{var b;i(!0),o("");try{const w=await yZ(x||void 0);t(((b=w.data.data)==null?void 0:b.content)??[]),u(new Set)}catch(w){o(MS(w))}finally{i(!1)}};j.useEffect(()=>{g("")},[]);const m=x=>u(b=>{const w=new Set(b);return w.has(x)?w.delete(x):w.add(x),w}),v=async()=>{if(c.size!==0&&window.confirm(`선택한 권한 ${c.size}건을 삭제하시겠습니까?`))try{await bZ([...c]),await g()}catch(x){o(MS(x))}},y=[{key:"sel",header:"",width:44,align:"center",render:x=>l.jsx("input",{type:"checkbox",checked:c.has(x.roleId),onClick:b=>b.stopPropagation(),onChange:()=>m(x.roleId)})},{key:"roleId",header:"권한ID",width:180},{key:"roleNm",header:"권한명"},{key:"roleDesc",header:"설명"},{key:"useYn",header:"사용",width:80,align:"center",render:x=>l.jsx(Lo,{yn:x.useYn,yes:"사용",no:"미사용"})}];return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"권한 관리",subtitle:"시스템관리(권한) · 역할(Role) 등록/수정/삭제 — RBAC",actions:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"danger",onClick:v,disabled:c.size===0,children:"선택 삭제"}),l.jsx(se,{onClick:()=>{f(null),p(!0)},children:"+ 권한 등록"})]})}),s&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:s}),l.jsxs(gs,{children:[l.jsx(Ee,{value:n,onChange:r,placeholder:"권한ID/권한명 검색",style:{minWidth:240}}),l.jsx(se,{variant:"ghost",onClick:()=>g(),children:"검색"})]}),a?l.jsx(Nr,{}):l.jsx($o,{columns:y,rows:e,rowKey:x=>x.roleId,onRowClick:x=>{f(x),p(!0)},empty:"등록된 권한이 없습니다."}),h&&l.jsx(ROe,{role:d,onClose:()=>p(!1),onSaved:()=>{p(!1),g()}})]})}function ROe({role:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=j.useState((e==null?void 0:e.roleId)??""),[s,o]=j.useState((e==null?void 0:e.roleNm)??""),[c,u]=j.useState((e==null?void 0:e.roleDesc)??""),[d,f]=j.useState((e==null?void 0:e.useYn)??"Y"),[h,p]=j.useState(""),g=async()=>{if(p(""),!s.trim()){p("권한명은 필수입니다.");return}if(!r&&!a.trim()){p("권한ID는 필수입니다.");return}try{const m={roleId:a,roleNm:s,roleDesc:c,useYn:d};r?await xZ(a,m):await vZ(m),n()}catch(m){p(MS(m))}};return l.jsxs(Gr,{title:r?"권한 수정":"권한 등록",onClose:t,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:t,children:"취소"}),l.jsx(se,{onClick:g,children:"저장"})]}),children:[l.jsx(Me,{label:"권한ID",children:l.jsx(Ee,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),l.jsx(Me,{label:"권한명",children:l.jsx(Ee,{value:s,onChange:o,style:{width:"100%"}})}),l.jsx(Me,{label:"설명",children:l.jsx(Ee,{value:c,onChange:u,style:{width:"100%"}})}),l.jsx(Me,{label:"사용 여부",children:l.jsxs("select",{value:d,onChange:m=>f(m.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[l.jsx("option",{value:"Y",children:"사용"}),l.jsx("option",{value:"N",children:"미사용"})]})}),h&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}function pb(e){var t,n,r;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (관리자 전용).":((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"요청을 처리하지 못했습니다."}function DOe(){const[e,t]=j.useState([]),[n,r]=j.useState(""),[a,i]=j.useState([]),[s,o]=j.useState(!1),[c,u]=j.useState(!1),[d,f]=j.useState(!1),[h,p]=j.useState(""),[g,m]=j.useState("");j.useEffect(()=>{o(!0),SZ().then(b=>{var S;const w=((S=b.data.data)==null?void 0:S.content)??[];t(w),w.length>0&&r(w[0].roleId)}).catch(b=>m(pb(b))).finally(()=>o(!1))},[]),j.useEffect(()=>{n&&(u(!0),p(""),m(""),wZ(n).then(b=>i(b.data.data??[])).catch(b=>m(pb(b))).finally(()=>u(!1)))},[n]);const v=(b,w)=>i(S=>S.map(A=>{if(A.menuId!==b)return A;const O=A[w]==="Y"?"N":"Y";return w==="writeYn"&&O==="Y"?{...A,writeYn:"Y",readYn:"Y"}:w==="readYn"&&O==="N"?{...A,readYn:"N",writeYn:"N"}:{...A,[w]:O}})),y=(b,w)=>i(S=>S.map(A=>w&&b==="writeYn"?{...A,writeYn:"Y",readYn:"Y"}:!w&&b==="readYn"?{...A,readYn:"N",writeYn:"N"}:{...A,[b]:w?"Y":"N"})),x=async()=>{f(!0),p(""),m("");try{await jZ(n,a),p("메뉴 권한 매핑이 저장되었습니다.")}catch(b){m(pb(b))}finally{f(!1)}};return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"역할-메뉴 권한",subtitle:"시스템관리(권한) · 역할별 메뉴 접근(읽기/쓰기) 매핑 — RBAC 핵심",actions:l.jsx(se,{onClick:x,disabled:d||!n,children:d?"저장 중...":"매핑 저장"})}),g&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:g}),h&&l.jsx("div",{style:{color:"var(--uiws-success)",fontSize:13,marginBottom:12},children:h}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr",gap:16,alignItems:"start"},children:[l.jsxs(Pf,{style:{padding:0},children:[l.jsx("div",{style:{padding:"12px 16px",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:"역할 목록"}),s?l.jsx(Nr,{}):l.jsxs("div",{children:[e.length===0&&l.jsx("div",{style:{padding:20,fontSize:13,color:"var(--uiws-text-faint)"},children:"역할이 없습니다."}),e.map(b=>l.jsxs("div",{onClick:()=>r(b.roleId),style:{padding:"11px 16px",cursor:"pointer",fontSize:13,borderLeft:`3px solid ${n===b.roleId?"var(--uiws-primary)":"transparent"}`,background:n===b.roleId?"var(--uiws-primary-soft)":"transparent",color:n===b.roleId?"var(--uiws-primary)":"var(--uiws-text)"},children:[l.jsx("div",{style:{fontWeight:600},children:b.roleNm}),l.jsx("div",{style:{fontSize:11,color:"var(--uiws-text-muted)"},children:b.roleId})]},b.roleId))]})]}),l.jsx(Pf,{style:{padding:0,overflow:"hidden"},children:c?l.jsx(Nr,{}):l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[l.jsx("thead",{children:l.jsxs("tr",{style:{background:"var(--uiws-surface-2)"},children:[l.jsx("th",{style:{textAlign:"left",padding:"11px 14px",color:"var(--uiws-text-muted)",fontWeight:600,fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:"메뉴"}),l.jsxs("th",{style:{width:120,padding:"8px 14px",color:"var(--uiws-text-muted)",fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:["읽기",l.jsx("br",{}),l.jsxs("label",{style:{fontWeight:400,fontSize:11},children:[l.jsx("input",{type:"checkbox",onChange:b=>y("readYn",b.target.checked)})," 전체"]})]}),l.jsxs("th",{style:{width:120,padding:"8px 14px",color:"var(--uiws-text-muted)",fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:["쓰기",l.jsx("br",{}),l.jsxs("label",{style:{fontWeight:400,fontSize:11},children:[l.jsx("input",{type:"checkbox",onChange:b=>y("writeYn",b.target.checked)})," 전체"]})]})]})}),l.jsx("tbody",{children:a.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:3,style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:"매핑 가능한 메뉴가 없습니다."})}):a.map(b=>l.jsxs("tr",{style:{borderBottom:"1px solid var(--uiws-border)"},children:[l.jsxs("td",{style:{padding:"11px 14px"},children:[b.menuNm," ",l.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",b.menuId,")"]})]}),l.jsx("td",{style:{padding:"11px 14px",textAlign:"center"},children:l.jsx("input",{type:"checkbox",checked:b.readYn==="Y",onChange:()=>v(b.menuId,"readYn")})}),l.jsx("td",{style:{padding:"11px 14px",textAlign:"center"},children:l.jsx("input",{type:"checkbox",checked:b.writeYn==="Y",onChange:()=>v(b.menuId,"writeYn")})})]},b.menuId))})]})})]})]})}function Gu(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (관리자 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 코드그룹입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function $Oe(){const[e,t]=j.useState([]),[n,r]=j.useState(""),[a,i]=j.useState(null),[s,o]=j.useState(""),[c,u]=j.useState(!1),[d,f]=j.useState(!1),[h,p]=j.useState(""),[g,m]=j.useState({open:!1,edit:null}),v=async(S="")=>{var A;u(!0),p("");try{const N=((A=(await AZ(S||void 0)).data.data)==null?void 0:A.content)??[];t(N),!n&&N.length>0&&r(N[0].grpCd)}catch(O){p(Gu(O))}finally{u(!1)}};j.useEffect(()=>{v("")},[]);const y=async(S=n)=>{if(!S){i(null);return}f(!0);try{const A=await WE(S);i(A.data.data??null)}catch(A){p(Gu(A))}finally{f(!1)}};j.useEffect(()=>{y()},[n]);const x=async S=>{if(window.confirm(`코드그룹 '${S}' 와 하위 코드값을 삭제하시겠습니까?`))try{await EZ(S),n===S&&(r(""),i(null)),await v()}catch(A){p(Gu(A))}},b=async S=>{try{const A=await WE(S);m({open:!0,edit:A.data.data??null})}catch(A){p(Gu(A))}},w=[{key:"codeVal",header:"코드값",width:160},{key:"codeNm",header:"코드명"},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:S=>l.jsx(Lo,{yn:S.useYn,yes:"사용",no:"미사용"})}];return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"공통코드 관리",subtitle:"시스템관리(권한) · 코드그룹/코드값 CRUD (값은 그룹 단위 저장)",actions:l.jsx(se,{onClick:()=>m({open:!0,edit:null}),children:"+ 코드그룹 등록"})}),h&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:h}),l.jsxs(gs,{children:[l.jsx(Ee,{value:s,onChange:o,placeholder:"코드그룹 검색",style:{minWidth:220}}),l.jsx(se,{variant:"ghost",onClick:()=>v(s),children:"검색"})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"300px 1fr",gap:16,alignItems:"start"},children:[l.jsxs(Pf,{style:{padding:0},children:[l.jsx("div",{style:{padding:"12px 16px",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:"코드그룹"}),c?l.jsx(Nr,{}):l.jsxs("div",{children:[e.length===0&&l.jsx("div",{style:{padding:20,fontSize:13,color:"var(--uiws-text-faint)"},children:"코드그룹이 없습니다."}),e.map(S=>l.jsxs("div",{onClick:()=>r(S.grpCd),style:{padding:"11px 16px",cursor:"pointer",fontSize:13,display:"flex",justifyContent:"space-between",alignItems:"center",borderLeft:`3px solid ${n===S.grpCd?"var(--uiws-primary)":"transparent"}`,background:n===S.grpCd?"var(--uiws-primary-soft)":"transparent"},children:[l.jsxs("div",{children:[l.jsx("div",{style:{fontWeight:600,color:n===S.grpCd?"var(--uiws-primary)":"var(--uiws-text)"},children:S.grpNm}),l.jsx("div",{style:{fontSize:11,color:"var(--uiws-text-muted)"},children:S.grpCd})]}),l.jsxs("div",{style:{display:"flex",gap:6},onClick:A=>A.stopPropagation(),children:[l.jsx(se,{variant:"ghost",onClick:()=>b(S.grpCd),children:"수정"}),l.jsx(se,{variant:"ghost",onClick:()=>x(S.grpCd),children:"삭제"})]})]},S.grpCd))]})]}),l.jsxs("div",{children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[l.jsxs("div",{style:{fontSize:14,fontWeight:600,color:"var(--uiws-text)"},children:["코드값 ",n&&l.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontWeight:400},children:["(",n,")"]})]}),l.jsx(se,{onClick:()=>n&&b(n),disabled:!n,children:"코드값 편집"})]}),d?l.jsx(Nr,{}):l.jsx($o,{columns:w,rows:(a==null?void 0:a.values)??[],rowKey:S=>`${S.grpCd}:${S.codeVal}`,empty:n?"코드값이 없습니다.":"코드그룹을 선택하세요."})]})]}),g.open&&l.jsx(LOe,{detail:g.edit,onClose:()=>m({open:!1,edit:null}),onSaved:S=>{m({open:!1,edit:null}),r(S),v(s),y(S)}})]})}function eM({value:e,onChange:t,style:n}){return l.jsxs("select",{value:e,onChange:r=>t(r.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)",...n},children:[l.jsx("option",{value:"Y",children:"사용"}),l.jsx("option",{value:"N",children:"미사용"})]})}function LOe({detail:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=j.useState((e==null?void 0:e.grpCd)??""),[s,o]=j.useState((e==null?void 0:e.grpNm)??""),[c,u]=j.useState((e==null?void 0:e.useYn)??"Y"),[d,f]=j.useState(((e==null?void 0:e.values)??[]).map(b=>({codeVal:b.codeVal,codeNm:b.codeNm,sortOrd:b.sortOrd??0,useYn:b.useYn??"Y"}))),[h,p]=j.useState(""),g=(b,w)=>f(S=>S.map((A,O)=>O===b?{...A,...w}:A)),m=()=>f(b=>[...b,{codeVal:"",codeNm:"",sortOrd:b.length,useYn:"Y"}]),v=b=>f(w=>w.filter((S,A)=>A!==b)),y=async()=>{if(p(""),!r&&!a.trim()){p("그룹코드는 필수입니다.");return}if(!s.trim()){p("그룹명은 필수입니다.");return}for(const b of d){if(!b.codeVal.trim()){p("코드값은 비어 있을 수 없습니다.");return}if(!b.codeNm.trim()){p("코드명은 비어 있을 수 없습니다.");return}}try{const b={grpCd:a,grpNm:s,useYn:c,values:d.map(w=>({grpCd:a,codeVal:w.codeVal,codeNm:w.codeNm,sortOrd:Number(w.sortOrd)||0,useYn:w.useYn}))};r?await NZ(a,b):await OZ(b),n(a)}catch(b){p(Gu(b))}},x={width:"100%",padding:"6px 8px",borderRadius:6,fontSize:12,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"};return l.jsxs(Gr,{title:r?"코드그룹 수정":"코드그룹 등록",onClose:t,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:t,children:"취소"}),l.jsx(se,{onClick:y,children:"저장"})]}),children:[l.jsx(Me,{label:"그룹코드",children:l.jsx(Ee,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),l.jsx(Me,{label:"그룹명",children:l.jsx(Ee,{value:s,onChange:o,style:{width:"100%"}})}),l.jsx(Me,{label:"사용 여부",children:l.jsx(eM,{value:c,onChange:u})}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"8px 0 6px"},children:[l.jsxs("div",{style:{fontSize:12,color:"var(--uiws-text-muted)"},children:["코드값 (",d.length,")"]}),l.jsx(se,{variant:"ghost",onClick:m,children:"+ 행 추가"})]}),l.jsx("div",{style:{border:"1px solid var(--uiws-border)",borderRadius:8,overflow:"hidden"},children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12,color:"var(--uiws-text)"},children:[l.jsx("thead",{children:l.jsxs("tr",{style:{background:"var(--uiws-surface-2)"},children:[l.jsx("th",{style:{padding:"7px 8px",textAlign:"left",fontSize:11,color:"var(--uiws-text-muted)"},children:"코드값"}),l.jsx("th",{style:{padding:"7px 8px",textAlign:"left",fontSize:11,color:"var(--uiws-text-muted)"},children:"코드명"}),l.jsx("th",{style:{padding:"7px 8px",width:64,fontSize:11,color:"var(--uiws-text-muted)"},children:"정렬"}),l.jsx("th",{style:{padding:"7px 8px",width:80,fontSize:11,color:"var(--uiws-text-muted)"},children:"사용"}),l.jsx("th",{style:{padding:"7px 8px",width:44}})]})}),l.jsx("tbody",{children:d.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:5,style:{padding:16,textAlign:"center",color:"var(--uiws-text-faint)"},children:"코드값을 추가하세요."})}):d.map((b,w)=>l.jsxs("tr",{style:{borderTop:"1px solid var(--uiws-border)"},children:[l.jsx("td",{style:{padding:"5px 8px"},children:l.jsx("input",{value:b.codeVal,onChange:S=>g(w,{codeVal:S.target.value}),style:x})}),l.jsx("td",{style:{padding:"5px 8px"},children:l.jsx("input",{value:b.codeNm,onChange:S=>g(w,{codeNm:S.target.value}),style:x})}),l.jsx("td",{style:{padding:"5px 8px"},children:l.jsx("input",{type:"number",value:String(b.sortOrd),onChange:S=>g(w,{sortOrd:Number(S.target.value)||0}),style:x})}),l.jsx("td",{style:{padding:"5px 8px"},children:l.jsx(eM,{value:b.useYn,onChange:S=>g(w,{useYn:S}),style:{padding:"6px 8px",fontSize:12}})}),l.jsx("td",{style:{padding:"5px 8px",textAlign:"center"},children:l.jsx("button",{onClick:()=>v(w),title:"행 삭제",style:{background:"none",border:"none",color:"var(--uiws-danger)",cursor:"pointer",fontSize:16},children:"×"})})]},w))})]})}),h&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginTop:10},children:h})]})}function kS(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (관리자 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 메뉴ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function IOe(){const[e,t]=j.useState([]),[n,r]=j.useState(""),[a,i]=j.useState(!1),[s,o]=j.useState(""),[c,u]=j.useState({open:!1,edit:null}),d=async()=>{var m;i(!0),o("");try{const v=await TZ();t(((m=v.data.data)==null?void 0:m.content)??[])}catch(v){o(kS(v))}finally{i(!1)}};j.useEffect(()=>{d()},[]);const f=j.useMemo(()=>{const m=n.trim().toLowerCase();if(!m)return e;const v=x=>x.menuNm.toLowerCase().includes(m)||x.menuId.toLowerCase().includes(m),y=new Set(e.filter(v).map(x=>x.menuId));return e.forEach(x=>{y.has(x.menuId)&&x.parentMenuId&&y.add(x.parentMenuId)}),e.filter(x=>y.has(x.menuId))},[e,n]),h=j.useMemo(()=>{const m=f.filter(x=>!x.parentMenuId).sort((x,b)=>(x.sortOrd??0)-(b.sortOrd??0)),v=[];for(const x of m)v.push({menu:x,depth:0}),f.filter(b=>b.parentMenuId===x.menuId).sort((b,w)=>(b.sortOrd??0)-(w.sortOrd??0)).forEach(b=>v.push({menu:b,depth:1}));const y=new Set(v.map(x=>x.menu.menuId));return f.filter(x=>!y.has(x.menuId)).forEach(x=>v.push({menu:x,depth:0})),v.map(x=>({...x.menu,_depth:x.depth}))},[f]),p=async m=>{if(window.confirm(`메뉴 '${m.menuNm}' 를 삭제하시겠습니까?`))try{await PZ([m.menuId]),await d()}catch(v){o(kS(v))}},g=[{key:"menuNm",header:"메뉴명",render:m=>l.jsxs("span",{style:{paddingLeft:m._depth*22},children:[m._depth>0&&l.jsx("span",{style:{color:"var(--uiws-text-faint)"},children:"└ "}),m.menuNm," ",l.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",m.menuId,")"]})]})},{key:"menuUrl",header:"URL",width:220,render:m=>m.menuUrl??"-"},{key:"programId",header:"프로그램",width:140,render:m=>m.programId??"-"},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:m=>l.jsx(Lo,{yn:m.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:m=>l.jsx(se,{variant:"ghost",onClick:()=>p(m),children:"삭제"})}];return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"메뉴 관리",subtitle:"시스템관리(권한) · 메뉴 트리(2-depth) 등록/수정/삭제",actions:l.jsx(se,{onClick:()=>u({open:!0,edit:null}),children:"+ 메뉴 등록"})}),s&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:s}),l.jsxs(gs,{children:[l.jsx(Ee,{value:n,onChange:r,placeholder:"메뉴명 검색",style:{minWidth:220}}),l.jsx(se,{variant:"ghost",onClick:()=>{},children:"검색"})]}),a?l.jsx(Nr,{}):l.jsx($o,{columns:g,rows:h,rowKey:m=>m.menuId,onRowClick:m=>u({open:!0,edit:m}),empty:"등록된 메뉴가 없습니다."}),c.open&&l.jsx(zOe,{menu:c.edit,parents:e.filter(m=>!m.parentMenuId),onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),d()}})]})}function zOe({menu:e,parents:t,onClose:n,onSaved:r}){const a=!!e,[i,s]=j.useState((e==null?void 0:e.menuId)??""),[o,c]=j.useState((e==null?void 0:e.menuNm)??""),[u,d]=j.useState((e==null?void 0:e.parentMenuId)??""),[f,h]=j.useState((e==null?void 0:e.programId)??""),[p,g]=j.useState((e==null?void 0:e.menuUrl)??""),[m,v]=j.useState(String((e==null?void 0:e.sortOrd)??0)),[y,x]=j.useState((e==null?void 0:e.useYn)??"Y"),[b,w]=j.useState(""),S=async()=>{if(w(""),!a&&!i.trim()){w("메뉴ID는 필수입니다.");return}if(!o.trim()){w("메뉴명은 필수입니다.");return}try{const O={menuId:i,menuNm:o,parentMenuId:u||null,programId:f||null,menuUrl:p||null,sortOrd:Number(m)||0,useYn:y};a?await _Z(i,O):await CZ(O),r()}catch(O){w(kS(O))}},A={width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"};return l.jsxs(Gr,{title:a?"메뉴 수정":"메뉴 등록",onClose:n,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:n,children:"취소"}),l.jsx(se,{onClick:S,children:"저장"})]}),children:[l.jsx(Me,{label:"메뉴ID",children:l.jsx(Ee,{value:i,onChange:s,style:{width:"100%",opacity:a?.6:1}})}),l.jsx(Me,{label:"메뉴명",children:l.jsx(Ee,{value:o,onChange:c,style:{width:"100%"}})}),l.jsx(Me,{label:"상위 메뉴",children:l.jsxs("select",{value:u??"",onChange:O=>d(O.target.value),style:A,children:[l.jsx("option",{value:"",children:"(최상위)"}),t.filter(O=>O.menuId!==i).map(O=>l.jsxs("option",{value:O.menuId,children:[O.menuNm," (",O.menuId,")"]},O.menuId))]})}),l.jsx(Me,{label:"프로그램ID",children:l.jsx(Ee,{value:f??"",onChange:h,style:{width:"100%"}})}),l.jsx(Me,{label:"메뉴 URL",children:l.jsx(Ee,{value:p??"",onChange:g,style:{width:"100%"}})}),l.jsx(Me,{label:"정렬순서",children:l.jsx(Ee,{type:"number",value:m,onChange:v,style:{width:"100%"}})}),l.jsx(Me,{label:"사용 여부",children:l.jsxs("select",{value:y,onChange:O=>x(O.target.value),style:A,children:[l.jsx("option",{value:"Y",children:"사용"}),l.jsx("option",{value:"N",children:"미사용"})]})}),b&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:b})]})}function RS(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (관리자 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 부서ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function BOe(){const[e,t]=j.useState([]),[n,r]=j.useState(""),[a,i]=j.useState(!1),[s,o]=j.useState(""),[c,u]=j.useState({open:!1,edit:null}),d=async(g="")=>{var m;i(!0),o("");try{const v=await MZ(g||void 0);t(((m=v.data.data)==null?void 0:m.content)??[])}catch(v){o(RS(v))}finally{i(!1)}};j.useEffect(()=>{d("")},[]);const f=j.useMemo(()=>{const g=e.filter(y=>!y.parentDeptId).sort((y,x)=>(y.sortOrd??0)-(x.sortOrd??0)),m=[];for(const y of g)m.push({...y,_depth:0}),e.filter(x=>x.parentDeptId===y.deptId).sort((x,b)=>(x.sortOrd??0)-(b.sortOrd??0)).forEach(x=>m.push({...x,_depth:1}));const v=new Set(m.map(y=>y.deptId));return e.filter(y=>!v.has(y.deptId)).forEach(y=>m.push({...y,_depth:0})),m},[e]),h=async g=>{if(window.confirm(`부서 '${g.deptNm}' 를 삭제하시겠습니까?`))try{await DZ(g.deptId),await d()}catch(m){o(RS(m))}},p=[{key:"deptNm",header:"부서명",render:g=>l.jsxs("span",{style:{paddingLeft:g._depth*22},children:[g._depth>0&&l.jsx("span",{style:{color:"var(--uiws-text-faint)"},children:"└ "}),g.deptNm," ",l.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",g.deptId,")"]})]})},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:g=>l.jsx(Lo,{yn:g.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:g=>l.jsx(se,{variant:"ghost",onClick:()=>h(g),children:"삭제"})}];return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"부서 관리",subtitle:"시스템관리(권한) · 부서 트리(2-depth) 등록/수정/삭제",actions:l.jsx(se,{onClick:()=>u({open:!0,edit:null}),children:"+ 부서 등록"})}),s&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:s}),l.jsxs(gs,{children:[l.jsx(Ee,{value:n,onChange:r,placeholder:"부서명 검색",style:{minWidth:220}}),l.jsx(se,{variant:"ghost",onClick:()=>d(n),children:"검색"})]}),a?l.jsx(Nr,{}):l.jsx($o,{columns:p,rows:f,rowKey:g=>g.deptId,onRowClick:g=>u({open:!0,edit:g}),empty:"등록된 부서가 없습니다."}),c.open&&l.jsx(UOe,{dept:c.edit,parents:e.filter(g=>!g.parentDeptId),onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),d(n)}})]})}function UOe({dept:e,parents:t,onClose:n,onSaved:r}){const a=!!e,[i,s]=j.useState((e==null?void 0:e.deptId)??""),[o,c]=j.useState((e==null?void 0:e.deptNm)??""),[u,d]=j.useState((e==null?void 0:e.parentDeptId)??""),[f,h]=j.useState(String((e==null?void 0:e.sortOrd)??0)),[p,g]=j.useState((e==null?void 0:e.useYn)??"Y"),[m,v]=j.useState(""),y={width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},x=async()=>{if(v(""),!a&&!i.trim()){v("부서ID는 필수입니다.");return}if(!o.trim()){v("부서명은 필수입니다.");return}try{const b={deptId:i,deptNm:o,parentDeptId:u||null,sortOrd:Number(f)||0,useYn:p};a?await RZ(i,b):await kZ(b),r()}catch(b){v(RS(b))}};return l.jsxs(Gr,{title:a?"부서 수정":"부서 등록",onClose:n,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:n,children:"취소"}),l.jsx(se,{onClick:x,children:"저장"})]}),children:[l.jsx(Me,{label:"부서ID",children:l.jsx(Ee,{value:i,onChange:s,style:{width:"100%",opacity:a?.6:1}})}),l.jsx(Me,{label:"부서명",children:l.jsx(Ee,{value:o,onChange:c,style:{width:"100%"}})}),l.jsx(Me,{label:"상위 부서",children:l.jsxs("select",{value:u??"",onChange:b=>d(b.target.value),style:y,children:[l.jsx("option",{value:"",children:"(최상위)"}),t.filter(b=>b.deptId!==i).map(b=>l.jsxs("option",{value:b.deptId,children:[b.deptNm," (",b.deptId,")"]},b.deptId))]})}),l.jsx(Me,{label:"정렬순서",children:l.jsx(Ee,{type:"number",value:f,onChange:h,style:{width:"100%"}})}),l.jsx(Me,{label:"사용 여부",children:l.jsxs("select",{value:p,onChange:b=>g(b.target.value),style:y,children:[l.jsx("option",{value:"Y",children:"사용"}),l.jsx("option",{value:"N",children:"미사용"})]})}),m&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:m})]})}function DS(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (관리자 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 거래처ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function FOe(){const[e,t]=j.useState([]),[n,r]=j.useState(""),[a,i]=j.useState(!1),[s,o]=j.useState(""),[c,u]=j.useState(new Set),[d,f]=j.useState({open:!1,edit:null}),h=async(v="")=>{var y;i(!0),o("");try{const x=await $Z(v||void 0);t(((y=x.data.data)==null?void 0:y.content)??[]),u(new Set)}catch(x){o(DS(x))}finally{i(!1)}};j.useEffect(()=>{h("")},[]);const p=v=>u(y=>{const x=new Set(y);return x.has(v)?x.delete(v):x.add(v),x}),g=async()=>{if(c.size!==0&&window.confirm(`선택한 거래처 ${c.size}건을 삭제하시겠습니까?`))try{await zZ([...c]),await h()}catch(v){o(DS(v))}},m=[{key:"sel",header:"",width:44,align:"center",render:v=>l.jsx("input",{type:"checkbox",checked:c.has(v.companyId),onClick:y=>y.stopPropagation(),onChange:()=>p(v.companyId)})},{key:"companyId",header:"거래처ID",width:180},{key:"companyNm",header:"거래처명"},{key:"bizNo",header:"사업자번호",width:180,render:v=>v.bizNo??"-"},{key:"useYn",header:"사용",width:80,align:"center",render:v=>l.jsx(Lo,{yn:v.useYn,yes:"사용",no:"미사용"})}];return l.jsxs("div",{className:"uiws-scope",children:[l.jsx(ba,{title:"거래처 관리",subtitle:"시스템관리(권한) · 거래처(근무처) 등록/수정/삭제",actions:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"danger",onClick:g,disabled:c.size===0,children:"선택 삭제"}),l.jsx(se,{onClick:()=>f({open:!0,edit:null}),children:"+ 거래처 등록"})]})}),s&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:s}),l.jsxs(gs,{children:[l.jsx(Ee,{value:n,onChange:r,placeholder:"거래처명 검색",style:{minWidth:220}}),l.jsx(se,{variant:"ghost",onClick:()=>h(n),children:"검색"})]}),a?l.jsx(Nr,{}):l.jsx($o,{columns:m,rows:e,rowKey:v=>v.companyId,onRowClick:v=>f({open:!0,edit:v}),empty:"등록된 거래처가 없습니다."}),d.open&&l.jsx(VOe,{company:d.edit,onClose:()=>f({open:!1,edit:null}),onSaved:()=>{f({open:!1,edit:null}),h(n)}})]})}function VOe({company:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=j.useState((e==null?void 0:e.companyId)??""),[s,o]=j.useState((e==null?void 0:e.companyNm)??""),[c,u]=j.useState((e==null?void 0:e.bizNo)??""),[d,f]=j.useState((e==null?void 0:e.useYn)??"Y"),[h,p]=j.useState(""),g=async()=>{if(p(""),!r&&!a.trim()){p("거래처ID는 필수입니다.");return}if(!s.trim()){p("거래처명은 필수입니다.");return}try{const m={companyId:a,companyNm:s,bizNo:c||null,useYn:d};r?await IZ(a,m):await LZ(m),n()}catch(m){p(DS(m))}};return l.jsxs(Gr,{title:r?"거래처 수정":"거래처 등록",onClose:t,footer:l.jsxs(l.Fragment,{children:[l.jsx(se,{variant:"ghost",onClick:t,children:"취소"}),l.jsx(se,{onClick:g,children:"저장"})]}),children:[l.jsx(Me,{label:"거래처ID",children:l.jsx(Ee,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),l.jsx(Me,{label:"거래처명",children:l.jsx(Ee,{value:s,onChange:o,style:{width:"100%"}})}),l.jsx(Me,{label:"사업자번호",children:l.jsx(Ee,{value:c??"",onChange:u,style:{width:"100%"}})}),l.jsx(Me,{label:"사용 여부",children:l.jsxs("select",{value:d,onChange:m=>f(m.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[l.jsx("option",{value:"Y",children:"사용"}),l.jsx("option",{value:"N",children:"미사용"})]})}),h&&l.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}const HOe=new gU({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:3e4}}});function qOe(){return l.jsx(yU,{client:HOe,children:l.jsx(l9,{children:l.jsx(J7,{children:l.jsxs(T7,{children:[l.jsx(de,{path:"/",element:l.jsx(iQ,{})}),l.jsx(de,{path:"/account",element:l.jsx(qQ,{})}),l.jsxs(de,{element:l.jsx(jQ,{}),children:[l.jsx(de,{path:"/home",element:l.jsx(EQ,{})}),l.jsx(de,{path:"/category",element:l.jsx(CQ,{})}),l.jsx(de,{path:"/search",element:l.jsx(_Q,{})}),l.jsx(de,{path:"/product/:id",element:l.jsx(PQ,{})}),l.jsx(de,{path:"/cart",element:l.jsx(MQ,{})}),l.jsx(de,{path:"/checkout",element:l.jsx(RQ,{})}),l.jsx(de,{path:"/subscription",element:l.jsx(LQ,{})}),l.jsx(de,{path:"/daily-standard",element:l.jsx(IQ,{})}),l.jsx(de,{path:"/events",element:l.jsx(BQ,{})}),l.jsx(de,{path:"/wishlist",element:l.jsx(UQ,{})}),l.jsx(de,{path:"/mypage",element:l.jsx(FQ,{})}),l.jsx(de,{path:"/orders",element:l.jsx(VQ,{})}),l.jsx(de,{path:"/review/:productId",element:l.jsx(HQ,{})}),l.jsx(de,{path:"/cs",element:l.jsx(GQ,{})}),l.jsx(de,{path:"/app",element:l.jsx(YQ,{})})]}),l.jsx(de,{path:"/admin/login",element:l.jsx(BZ,{})}),l.jsxs(de,{path:"/admin",element:l.jsx(GZ,{}),children:[l.jsx(de,{index:!0,element:l.jsx(bm,{to:"/admin/dashboard",replace:!0})}),l.jsx(de,{path:"dashboard",element:l.jsx(UAe,{})}),l.jsx(de,{path:"mypage",element:l.jsx(yOe,{})}),l.jsx(de,{path:"stores",element:l.jsx(FAe,{})}),l.jsx(de,{path:"products",element:l.jsx(KAe,{})}),l.jsx(de,{path:"inventory",element:l.jsx(GAe,{})}),l.jsx(de,{path:"orders",element:l.jsx(YAe,{})}),l.jsx(de,{path:"transfers",element:l.jsx(WAe,{})}),l.jsx(de,{path:"members",element:l.jsx(QAe,{})}),l.jsx(de,{path:"loyalty",element:l.jsx(ZAe,{})}),l.jsx(de,{path:"events",element:l.jsx(eOe,{})}),l.jsx(de,{path:"subscriptions",element:l.jsx(tOe,{})}),l.jsx(de,{path:"schedule",element:l.jsx(rOe,{})}),l.jsx(de,{path:"analytics",element:l.jsx(aOe,{})}),l.jsx(de,{path:"users",element:l.jsx(iOe,{})}),l.jsx(de,{path:"audit",element:l.jsx(sOe,{})}),l.jsx(de,{path:"settings",element:l.jsx(oOe,{})}),l.jsx(de,{path:"ai-techniques",element:l.jsx(cOe,{})}),l.jsx(de,{path:"ai-platform",element:l.jsx(gOe,{})}),l.jsx(de,{path:"app",element:l.jsx(lOe,{})}),l.jsx(de,{path:"uiws/worklog",element:l.jsx(Wr,{children:l.jsx(wOe,{})})}),l.jsx(de,{path:"uiws/schedule",element:l.jsx(Wr,{children:l.jsx(NOe,{})})}),l.jsx(de,{path:"uiws/message",element:l.jsx(Wr,{children:l.jsx(COe,{})})}),l.jsx(de,{path:"uiws/stats",element:l.jsx(Wr,{children:l.jsx(MOe,{})})}),l.jsx(de,{path:"uiws/system/roles",element:l.jsx(Wr,{children:l.jsx(kOe,{})})}),l.jsx(de,{path:"uiws/system/role-menus",element:l.jsx(Wr,{children:l.jsx(DOe,{})})}),l.jsx(de,{path:"uiws/system/codes",element:l.jsx(Wr,{children:l.jsx($Oe,{})})}),l.jsx(de,{path:"uiws/system/menus",element:l.jsx(Wr,{children:l.jsx(IOe,{})})}),l.jsx(de,{path:"uiws/system/depts",element:l.jsx(Wr,{children:l.jsx(BOe,{})})}),l.jsx(de,{path:"uiws/system/companies",element:l.jsx(Wr,{children:l.jsx(FOe,{})})})]}),l.jsx(de,{path:"*",element:l.jsx(bm,{to:"/",replace:!0})})]})})})})}const{slice:KOe,forEach:GOe}=[];function YOe(e){return GOe.call(KOe.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function WOe(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const tM=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,XOe=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},a=encodeURIComponent(t);let i=`${e}=${a}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!tM.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!tM.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},nM={create(e,t,n,r){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+n*60*1e3)),r&&(a.domain=r),document.cookie=XOe(e,t,a)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let a=n[r];for(;a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var QOe={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return nM.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:a,cookieOptions:i}=t;n&&typeof document<"u"&&nM.create(n,e,r,a,i)}},ZOe={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:a}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(a=window.location.hash.substring(window.location.hash.indexOf("?")));const s=a.substring(1).split("&");for(let o=0;o<s.length;o++){const c=s[o].indexOf("=");c>0&&s[o].substring(0,c)===t&&(n=s[o].substring(c+1))}}return n}},JOe={name:"hash",lookup(e){var a;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const s=i.substring(1);if(t){const o=s.split("&");for(let c=0;c<o.length;c++){const u=o[c].indexOf("=");u>0&&o[c].substring(0,u)===t&&(r=o[c].substring(u+1))}}if(r)return r;if(!r&&n>-1){const o=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(o)?(a=o[typeof n=="number"?n:0])==null?void 0:a.replace("/",""):void 0}}}return r}};let Yo=null;const rM=()=>{if(Yo!==null)return Yo;try{if(Yo=typeof window<"u"&&window.localStorage!==null,!Yo)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Yo=!1}return Yo};var eNe={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&rM())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&rM()&&window.localStorage.setItem(n,e)}};let Wo=null;const aM=()=>{if(Wo!==null)return Wo;try{if(Wo=typeof window<"u"&&window.sessionStorage!==null,!Wo)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Wo=!1}return Wo};var tNe={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&aM())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&aM()&&window.sessionStorage.setItem(n,e)}},nNe={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:a}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),a&&t.push(a)}return t.length>0?t:void 0}},rNe={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},aNe={name:"path",lookup(e){var a;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(a=n[typeof t=="number"?t:0])==null?void 0:a.replace("/",""):void 0}},iNe={name:"subdomain",lookup(e){var a,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(a=window.location)==null?void 0:a.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let FI=!1;try{document.cookie,FI=!0}catch{}const VI=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];FI||VI.splice(1,1);const sNe=()=>({order:VI,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class HI{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=YOe(n,this.options||{},sNe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=a=>a.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(QOe),this.addDetector(ZOe),this.addDetector(eNe),this.addDetector(tNe),this.addDetector(nNe),this.addDetector(rNe),this.addDetector(aNe),this.addDetector(iNe),this.addDetector(JOe)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let a=this.detectors[r].lookup(this.options);a&&typeof a=="string"&&(a=[a]),a&&(n=n.concat(a))}}),n=n.filter(r=>r!=null&&!WOe(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}HI.type="languageDetector";const oNe={search:"Search",searchPlaceholder:"Search bouquets, roses, occasions…",loading:"Loading…",noData:"No data",save:"Save",cancel:"Cancel",close:"Close",edit:"Edit",delete:"Delete",add:"Add",create:"Create",confirm:"Confirm",submit:"Submit",back:"Back",next:"Next",continue:"Continue",apply:"Apply",viewAll:"View All",yes:"Yes",no:"No",actions:"Actions",status:"Status",all:"All",language:"Language"},lNe={topbar:{reviews:"{{n}} reviews"},nav:{home:"Home",shopAll:"Shop All",loveRomance:"Love & Romance",birthday:"Birthday",sympathy:"Sympathy",todaysBouquet:"Today's Bouquet",subscriptions:"Subscriptions",offers:"Offers"},header:{zip:"ZIP",wishlist:"Wishlist",cart:"Cart",account:"Account"},footer:{since:"Since {{year}}",visitUs:"Visit Us",hours:"Hours",customerCare:"Customer Care",contactAiHelp:"Contact / AI Help",orderStatus:"Order Status",subscriptions:"Subscriptions",getApp:"Get the App (QR)",weAccept:"We accept",rights:"© 2026 Montvale Florist"}},cNe={since:"Since {{year}}",lead:"Tell us where you're sending flowers — we'll show what's available nearby.",enterZip:"Enter Delivery ZIP Code",placeholder:"e.g. 07645",go:"Go",availableStores:"Available stores",radiusSameDay:"{{radius}}mi radius · same-day by {{cutoff}} ({{tz}})",reviews:"{{n}} reviews",browsePickup:"Browse with store pickup →",errInvalid:"Please enter a 5-digit ZIP code.",errNotDeliverable:"Sorry, we don't deliver to that area yet. Try store pickup or another ZIP.",errFailed:"Lookup failed. Please try again in a moment."},uNe={title:"Cart",signInPrompt:"Please sign in to view your cart.",signInRegister:"Sign In / Register",empty:"Your cart is empty.",startShopping:"Start Shopping →",card:"Card",subtotal:"Subtotal",shippingTax:"Shipping/Tax",calcAtCheckout:"Calculated at checkout",total:"Total",checkout:"Checkout"},dNe={title:"Checkout",recipient:"Recipient",recipientName:"Recipient Name",deliveryAddress:"Delivery Address",deliveryDate:"Delivery Date",timeSlot:"Time Slot",cardMessage:"Card Message",cardMessagePlaceholder:"Write a heartfelt message…",aiSuggest:"AI Card Message",payment:"Payment",placeOrder:"Place Order",orderSummary:"Order Summary",contactPhone:"Contact Phone",sameDay:"Same-day delivery",processing:"Processing…",success:"Your order has been placed!"},fNe={title:"Flower Subscriptions",subtitle:"Fresh, florist-designed blooms delivered on your schedule.",weekly:"Weekly",biweekly:"Bi-weekly",monthly:"Monthly",subscribe:"Subscribe",manage:"Manage Subscription",frequency:"Frequency",nextDelivery:"Next Delivery"},hNe={resultsFor:'Search Results for "{{query}}"',aiUnderstood:"AI understood:",searching:"AI is searching…",noResults:"No results found."},pNe={title:"Wishlist",empty:"Your wishlist is empty.",startShopping:"Start Shopping →"},mNe={title:"My Page",hello:"Hello",myOrders:"My Orders",mySubscriptions:"My Subscriptions",wishlist:"Wishlist",points:"Points",tier:"Tier",addresses:"Addresses",signOut:"Sign Out",memberSince:"Member since"},gNe={addToCart:"Add to Cart",buyNow:"Buy Now",size:"Size",options:"Options",reviews:"Reviews",description:"Description",writeReview:"Write a Review",inStock:"In stock",outOfStock:"Out of stock",share:"Share",sizeStandard:"Standard",sizeDeluxe:"Deluxe",sizePremium:"Premium"},yNe={title:"Write a Review",rating:"Rating",comment:"Your Review",commentPlaceholder:"Share your experience…",submit:"Submit Review",thanks:"Thank you for your review!"},vNe={title:"Offers & Events",subtitle:"Seasonal deals and special campaigns.",endsIn:"Ends in",shopNow:"Shop Now"},xNe={signIn:"Sign In",signUp:"Sign Up",email:"Email",password:"Password",name:"Name",phone:"Phone",createAccount:"Create Account",haveAccount:"Already have an account?",noAccount:"Don't have an account?",guestCheckout:"Continue as Guest"},bNe={title:"Customer Support",subtitle:"We're here to help — ask our AI assistant or reach out directly.",askAi:"Ask AI Assistant",placeholder:"Type your question…",send:"Send",contactUs:"Contact Us"},SNe={title:"Get the Montvale App",subtitle:"Scan the QR code to install on your phone.",ios:"iOS",android:"Android"},wNe={console:"Admin Console",header:"US Multi-Store Florist Omnichannel E-Commerce · AI Demand Forecasting · BI",onPremiseTag:"Ollama On-Premise · Omnichannel",signOut:"Sign Out",system:"System",login:{title:"GUARDiA Mall Console",subtitle:"Store & Corporate Admin Sign In",username:"Username",password:"Password",signIn:"Sign In",storefrontHere:"Customer storefront is",here:"here",errNoPriv:"You do not have admin privileges.",errFailed:"Sign-in failed — please check your username and password."},nav:{dashboard:"Dashboard",stores:"Stores",products:"Products",inventory:"Store Inventory",orders:"Orders (Live)",transfers:"Inventory Transfers",members:"Members (CRM)",loyalty:"Tier & Points",events:"Events & Campaigns",subscriptions:"Subscriptions",schedule:"Schedule & Surge",analytics:"Revenue Analytics (BI)",users:"User Management",audit:"Audit Log",settings:"Gateway Settings",appInstall:"Admin App Install"},dashboard:{title:"Dashboard",todaysRevenue:"Today's Revenue",todaysOrders:"Today's Orders",stores:"Stores",storesSub:"Active store revenue ranking",largeOrders:"Large Orders",largeOrdersSub:"$500+ high-value orders",revenueByStore:"Revenue by Store (Last 7 Days)",revenueTrend:"Revenue Trend (14 Days)",bestSellers:"Best Sellers",storeRanking:"Store Revenue Ranking",store:"Store",revenue:"Revenue",orders:"Orders",unitsSold:"Units Sold"},common:{name:"Name",code:"Code",price:"Price",stock:"Stock",category:"Category",store:"Store",date:"Date",amount:"Amount",status:"Status",actions:"Actions",search:"Search",total:"Total",active:"Active",inactive:"Inactive"}},jNe={common:oNe,shop:lNe,zip:cNe,cart:uNe,checkout:dNe,subscription:fNe,search:hNe,wishlist:pNe,mypage:mNe,product:gNe,review:yNe,events:vNe,account:xNe,cs:bNe,app:SNe,admin:wNe},ANe={search:"검색",searchPlaceholder:"부케, 장미, 상황별로 검색하세요…",loading:"불러오는 중…",noData:"데이터 없음",save:"저장",cancel:"취소",close:"닫기",edit:"수정",delete:"삭제",add:"추가",create:"생성",confirm:"확인",submit:"제출",back:"뒤로",next:"다음",continue:"계속",apply:"적용",viewAll:"전체 보기",yes:"예",no:"아니오",actions:"작업",status:"상태",all:"전체",language:"언어"},ONe={topbar:{reviews:"리뷰 {{n}}개"},nav:{home:"홈",shopAll:"전체 상품",loveRomance:"사랑 & 로맨스",birthday:"생일",sympathy:"추모",todaysBouquet:"오늘의 부케",subscriptions:"정기 구독",offers:"이벤트"},header:{zip:"우편번호",wishlist:"찜",cart:"장바구니",account:"내 계정"},footer:{since:"{{year}}년부터",visitUs:"매장 안내",hours:"영업 시간",customerCare:"고객 지원",contactAiHelp:"문의 / AI 도움",orderStatus:"주문 조회",subscriptions:"정기 구독",getApp:"앱 다운로드 (QR)",weAccept:"결제 수단",rights:"© 2026 Montvale Florist"}},NNe={since:"{{year}}년부터",lead:"어디로 꽃을 보내실지 알려주시면 근처에서 가능한 상품을 보여드립니다.",enterZip:"배송 우편번호 입력",placeholder:"예: 07645",go:"확인",availableStores:"배송 가능 매장",radiusSameDay:"반경 {{radius}}마일 · {{cutoff}}까지 당일 배송 ({{tz}})",reviews:"리뷰 {{n}}개",browsePickup:"매장 픽업으로 둘러보기 →",errInvalid:"5자리 우편번호를 입력해 주세요.",errNotDeliverable:"죄송합니다. 아직 해당 지역은 배송이 어렵습니다. 매장 픽업 또는 다른 우편번호를 시도해 보세요.",errFailed:"조회에 실패했습니다. 잠시 후 다시 시도해 주세요."},ENe={title:"장바구니",signInPrompt:"장바구니를 보려면 로그인해 주세요.",signInRegister:"로그인 / 회원가입",empty:"장바구니가 비어 있습니다.",startShopping:"쇼핑 시작하기 →",card:"카드",subtotal:"상품 합계",shippingTax:"배송비/세금",calcAtCheckout:"결제 시 계산",total:"총 결제금액",checkout:"결제하기"},TNe={title:"결제",recipient:"받는 분",recipientName:"받는 분 성함",deliveryAddress:"배송 주소",deliveryDate:"배송 날짜",timeSlot:"배송 시간대",cardMessage:"카드 메시지",cardMessagePlaceholder:"진심 어린 메시지를 적어 주세요…",aiSuggest:"AI 카드 메시지",payment:"결제 수단",placeOrder:"주문하기",orderSummary:"주문 요약",contactPhone:"연락처",sameDay:"당일 배송",processing:"처리 중…",success:"주문이 완료되었습니다!"},CNe={title:"꽃 정기 구독",subtitle:"플로리스트가 디자인한 신선한 꽃을 원하는 주기로 받아보세요.",weekly:"매주",biweekly:"격주",monthly:"매월",subscribe:"구독하기",manage:"구독 관리",frequency:"배송 주기",nextDelivery:"다음 배송"},_Ne={resultsFor:'"{{query}}" 검색 결과',aiUnderstood:"AI가 이해한 내용:",searching:"AI가 검색 중입니다…",noResults:"검색 결과가 없습니다."},PNe={title:"찜한 상품",empty:"찜한 상품이 없습니다.",startShopping:"쇼핑 시작하기 →"},MNe={title:"마이페이지",hello:"안녕하세요",myOrders:"내 주문",mySubscriptions:"내 구독",wishlist:"찜한 상품",points:"포인트",tier:"등급",addresses:"배송지 관리",signOut:"로그아웃",memberSince:"가입일"},kNe={addToCart:"장바구니 담기",buyNow:"바로 구매",size:"사이즈",options:"옵션",reviews:"리뷰",description:"상품 설명",writeReview:"리뷰 작성",inStock:"재고 있음",outOfStock:"품절",share:"공유",sizeStandard:"스탠다드",sizeDeluxe:"디럭스",sizePremium:"프리미엄"},RNe={title:"리뷰 작성",rating:"별점",comment:"리뷰 내용",commentPlaceholder:"이용 후기를 남겨 주세요…",submit:"리뷰 등록",thanks:"소중한 리뷰 감사합니다!"},DNe={title:"이벤트 & 혜택",subtitle:"시즌 특가와 특별 캠페인을 만나보세요.",endsIn:"종료까지",shopNow:"쇼핑하기"},$Ne={signIn:"로그인",signUp:"회원가입",email:"이메일",password:"비밀번호",name:"이름",phone:"전화번호",createAccount:"계정 만들기",haveAccount:"이미 계정이 있으신가요?",noAccount:"계정이 없으신가요?",guestCheckout:"비회원으로 계속하기"},LNe={title:"고객 지원",subtitle:"도와드리겠습니다 — AI 어시스턴트에게 묻거나 직접 문의하세요.",askAi:"AI 어시스턴트에게 문의",placeholder:"궁금한 점을 입력하세요…",send:"보내기",contactUs:"문의하기"},INe={title:"Montvale 앱 받기",subtitle:"QR 코드를 스캔하여 휴대폰에 설치하세요.",ios:"iOS",android:"안드로이드"},zNe={console:"관리자 콘솔",header:"미국 다지점 꽃집 옴니채널 e-커머스 · AI 수요 예측 · BI",onPremiseTag:"Ollama 온프레미스 · 옴니채널",signOut:"로그아웃",system:"시스템",login:{title:"GUARDiA Mall 콘솔",subtitle:"매장 및 본사 관리자 로그인",username:"아이디",password:"비밀번호",signIn:"로그인",storefrontHere:"고객 스토어프론트는",here:"여기",errNoPriv:"관리자 권한이 없습니다.",errFailed:"로그인에 실패했습니다 — 아이디와 비밀번호를 확인해 주세요."},nav:{dashboard:"대시보드",stores:"매장 관리",products:"상품 관리",inventory:"매장 재고",orders:"주문 (실시간)",transfers:"재고 이양",members:"회원 (CRM)",loyalty:"등급 & 포인트",events:"이벤트 & 캠페인",subscriptions:"정기 구독",schedule:"스케줄 & 서지",analytics:"매출 분석 (BI)",users:"사용자 관리",audit:"감사 로그",settings:"게이트웨이 설정",appInstall:"관리자 앱 설치"},dashboard:{title:"대시보드",todaysRevenue:"오늘의 매출",todaysOrders:"오늘의 주문",stores:"매장 수",storesSub:"활성 매장 매출 순위",largeOrders:"대형 주문",largeOrdersSub:"$500 이상 고액 주문",revenueByStore:"매장별 매출 (최근 7일)",revenueTrend:"매출 추이 (14일)",bestSellers:"베스트셀러",storeRanking:"매장 매출 순위",store:"매장",revenue:"매출",orders:"주문",unitsSold:"판매 수량"},common:{name:"이름",code:"코드",price:"가격",stock:"재고",category:"카테고리",store:"매장",date:"날짜",amount:"금액",status:"상태",actions:"작업",search:"검색",total:"합계",active:"활성",inactive:"비활성"}},BNe={common:ANe,shop:ONe,zip:NNe,cart:ENe,checkout:TNe,subscription:CNe,search:_Ne,wishlist:PNe,mypage:MNe,product:kNe,review:RNe,events:DNe,account:$Ne,cs:LNe,app:INe,admin:zNe},qI=["en","ko"],UNe="mall_lang";function KI(e){const t=(e||"en").split("-")[0],n=qI.includes(t)?t:"en",r=document.documentElement;r.setAttribute("lang",n),r.classList.toggle("lang-ko",n==="ko")}on.use(HI).use(BK).init({resources:{en:{translation:jNe},ko:{translation:BNe}},fallbackLng:"en",supportedLngs:qI,nonExplicitSupportedLngs:!0,load:"languageOnly",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator","htmlTag"],lookupLocalStorage:UNe,caches:["localStorage"]}});KI(on.language);on.on("languageChanged",KI);HB.createRoot(document.getElementById("root")).render(l.jsx(P.StrictMode,{children:l.jsx(qOe,{})}));
