bmj-ui 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -1
- package/dist/index.js +75 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/index.ts +9 -5
- package/src/index.ts +7 -0
- package/tsconfig.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
import*as e from"react";import t,{createElement as n,useLayoutEffect as r,useContext as i,createContext as o,forwardRef as a,useRef as s,useEffect as l,useId as c,useInsertionEffect as u,useMemo as d,useCallback as f,Children as p,isValidElement as h,useState as m,Fragment as v,Component as y,useImperativeHandle as g,cloneElement as b,memo as x,PureComponent as w}from"react";import*as E from"react-dom";import{createPortal as O}from"react-dom";function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k,P={exports:{}},A={};var j,T,M={};
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.development.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/function C(){return j||(j=1,"production"!==process.env.NODE_ENV&&function(){function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===k?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case h:return"Fragment";case v:return"Profiler";case m:return"StrictMode";case x:return"Suspense";case w:return"SuspenseList";case S:return"Activity"}if("object"==typeof t)switch("number"==typeof t.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case p:return"Portal";case g:return t.displayName||"Context";case y:return(t._context.displayName||"Context")+".Consumer";case b:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case E:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case O:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,i="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",i),n(e)}}function i(t){if(t===h)return"<>";if("object"==typeof t&&null!==t&&t.$$typeof===O)return"<...>";try{var n=e(t);return n?"<"+n+">":"<...>"}catch(e){return"<...>"}}function o(){return Error("react-stack-top-frame")}function a(){var t=e(this.type);return C[t]||(C[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(t=this.props.ref)?t:null}function s(t,n,i,o,s,c){var d,p=n.children;if(void 0!==p)if(o)if(j(p)){for(o=0;o<p.length;o++)l(p[o]);Object.freeze&&Object.freeze(p)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(p);if(A.call(n,"key")){p=e(t);var h=Object.keys(n).filter(function(e){return"key"!==e});o=0<h.length?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}",D[p+o]||(h=0<h.length?"{"+h.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',o,p,h,p),D[p+o]=!0)}if(p=null,void 0!==i&&(r(i),p=""+i),function(e){if(A.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),p=""+n.key),"key"in n)for(var m in i={},n)"key"!==m&&(i[m]=n[m]);else i=n;return p&&function(e,t){function n(){u||(u=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,"function"==typeof t?t.displayName||t.name||"Unknown":t),function(e,t,n,r,i,o){var s=n.ref;return e={$$typeof:f,type:e,key:t,props:n,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:a}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(t,p,i,null===(d=P.A)?null:d.getOwner(),s,c)}function l(e){c(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===O&&("fulfilled"===e._payload.status?c(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===f}var u,d=t,f=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),g=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),P=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,T=console.createTask?console.createTask:function(){return null},C={},N=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,o)(),I=T(i(o)),D={};M.Fragment=h,M.jsx=function(e,t,n){var r=1e4>P.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,r?Error("react-stack-top-frame"):N,r?T(i(e)):I)},M.jsxs=function(e,t,n){var r=1e4>P.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,r?Error("react-stack-top-frame"):N,r?T(i(e)):I)}}()),M}var N=(T||(T=1,"production"===process.env.NODE_ENV?P.exports=function(){if(k)return A;k=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:void 0!==n?n:null,props:r}}return A.Fragment=t,A.jsx=n,A.jsxs=n,A}():P.exports=C()),P.exports),I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},I.apply(this,arguments)};function D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function _(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}"function"==typeof SuppressedError&&SuppressedError;const R={};function L(e,t,n,r,i){let o={...F(e,R)};return t&&(o=z(o,t)),n&&(o=z(o,n)),r&&(o=z(o,r)),o}function z(e,t){return B(t)?t(e):function(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":e[n]=_(e.style,r);break;case"className":e[n]=W(e.className,r);break;default:V(n,r)?e[n]=$(e[n],r):e[n]=r}}return e}(e,t)}function V(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return 111===n&&110===r&&i>=65&&i<=90&&("function"==typeof t||void 0===t)}function B(e){return"function"==typeof e}function F(e,t){return B(e)?e(t):e??R}function $(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const r=n;U(r);const i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}const r=t(n);return e?.(n),r}:t:e}function U(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function W(e,t){return t?e?t+" "+e:t:e}const K=function(e,t){return function(n,...r){const i=new URL(e);return i.searchParams.set("code",n.toString()),r.forEach(e=>i.searchParams.append("args[]",e)),`${t} error #${n}; visit ${i} for the full message.`}}("https://base-ui.com/production-error","Base UI"),H={};function Y(t,n){const r=e.useRef(H);return r.current===H&&(r.current=t(n)),r}function q(e,t,n,r){const i=Y(G).current;return function(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}(i,e,t,n,r)&&X(i,[e,t,n,r]),i.callback}function G(){return{callback:null,cleanup:null,refs:[]}}function X(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const i=t[e];if(null!=i)switch(typeof i){case"function":{const t=i(n);"function"==typeof t&&(r[e]=t);break}case"object":i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const Z=parseInt(e.version,10);function J(e){return Z>=e}function Q(t){if(!e.isValidElement(t))return null;const n=t,r=n.props;return(J(19)?r?.ref:n.ref)??null}let ee;function te(){}"production"!==process.env.NODE_ENV&&(ee=new Set);const ne=Object.freeze([]),re=Object.freeze({}),ie={style:{transition:"none"}},oe={fallbackAxisSide:"none"},ae={fallbackAxisSide:"end"},se={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function le(t,r,i={}){const o=r.render,a=function(e,t={}){const{className:n,style:r,render:i}=e,{state:o=re,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?function(e,t){return"function"==typeof e?e(t):e}(n,o):void 0,d=c?function(e,t){return"function"==typeof e?e(t):e}(r,o):void 0,f=c?function(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const e=t[r](i);null!=e&&Object.assign(n,e);continue}!0===i?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}(o,l):re,p=c?_(f,Array.isArray(s)?function(e){if(0===e.length)return R;if(1===e.length)return F(e[0],R);let t={...F(e[0],R)};for(let n=1;n<e.length;n+=1)t=z(t,e[n]);return t}(s):s)??re:re;"undefined"!=typeof document&&(c?Array.isArray(a)?p.ref=function(e){const t=Y(G).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&X(t,e),t.callback}([p.ref,Q(i),...a]):p.ref=q(p.ref,Q(i),a):q(null,null));if(!c)return re;void 0!==u&&(p.className=W(p.className,u));void 0!==d&&(p.style=_(p.style,d));return p}(r,i);if(!1===i.enabled)return null;return function(t,r,i,o){if(r){if("function"==typeof r)return"production"!==process.env.NODE_ENV&&function(e){const t=e.name;if(0===t.length)return;const n=t.charCodeAt(0);if(n<65||n>90)return;!function(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");ee.has(t)||(ee.add(t),console.warn(`Base UI: ${t}`))}}(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}(r),r(i,o);const t=L(i,r.props);t.ref=i.ref;let n=r;if(n?.$$typeof===ce){n=e.Children.toArray(r)[0]}if("production"!==process.env.NODE_ENV&&!e.isValidElement(n))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join("\n"));return e.cloneElement(n,t)}if(t&&"string"==typeof t)return function(t,r){if("button"===t)return n("button",{type:"button",...r,key:r.key});if("img"===t)return n("img",{alt:"",...r,key:r.key});return e.createElement(t,r)}(t,i);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":K(8))}(t,o,a,i.state??re)}const ce=Symbol.for("react.lazy");function ue(e){return le(e.defaultTagName??"div",e,e)}function de(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=de(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=de(e))&&(r&&(r+=" "),r+=t);return r}const pe=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,he=fe,me=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return he(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;const a=pe(t)||pe(r);return i[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...s}[t]):{...o,...s}[t]===n})?[...e,n,r]:e},[]);return he(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};const ve=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ye="-",ge=[],be=e=>{const t=Ee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return we(e);const n=e.split(ye),r=""===n[0]&&n.length>1?1:0;return xe(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],i=n[e];return t?i?((e,t)=>{const n=new Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(i,t):t:i||ge}return n[e]||ge}}},xe=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const n=xe(e,t+1,i);if(n)return n}const o=n.validators;if(null===o)return;const a=0===t?e.join(ye):e.slice(t).join(ye),s=o.length;for(let e=0;e<s;e++){const t=o[e];if(t.validator(a))return t.classGroupId}},we=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),Ee=e=>{const{theme:t,classGroups:n}=e;return Oe(n,t)},Oe=(e,t)=>{const n=ve();for(const r in e){const i=e[r];Se(i,n,r,t)}return n},Se=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const i=e[o];ke(i,t,n,r)}},ke=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?je(e,t,n,r):Ae(e,t,n,r):Pe(e,t,n)},Pe=(e,t,n)=>{(""===e?t:Te(t,e)).classGroupId=n},Ae=(e,t,n,r)=>{Me(e)?Se(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},je=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let e=0;e<o;e++){const[o,a]=i[e];Se(a,Te(t,o),n,r)}},Te=(e,t)=>{let n=e;const r=t.split(ye),i=r.length;for(let e=0;e<i;e++){const t=r[e];let i=n.nextPart.get(t);i||(i=ve(),n.nextPart.set(t,i)),n=i}return n},Me=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ce=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(i,o)=>{n[i]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}},Ne=[],Ie=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),De=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,o=0;const a=e.length;for(let s=0;s<a;s++){const a=e[s];if(0===r&&0===i){if(":"===a){t.push(e.slice(o,s)),o=s+1;continue}if("/"===a){n=s;continue}}"["===a?r++:"]"===a?r--:"("===a?i++:")"===a&&i--}const s=0===t.length?e:e.slice(o);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return Ie(t,c,l,n&&n>o?n-o:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ie(Ne,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},_e=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let i=0;i<e.length;i++){const o=e[i],a="["===o[0],s=t.has(o);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(o)):r.push(o)}return r.length>0&&(r.sort(),n.push(...r)),n}},Re=/\s+/,Le=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Le(e[r]))&&(n&&(n+=" "),n+=t);return n},ze=(e,...t)=>{let n,r,i,o;const a=e=>{const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split(Re);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let h=!!p,m=r(h?f.substring(0,p):f);if(!m){if(!h){l=t+(l.length>0?" "+l:l);continue}if(m=r(f),!m){l=t+(l.length>0?" "+l:l);continue}h=!1}const v=0===u.length?"":1===u.length?u[0]:o(u).join(":"),y=d?v+"!":v,g=y+m;if(a.indexOf(g)>-1)continue;a.push(g);const b=i(m,h);for(let e=0;e<b.length;++e){const t=b[e];a.push(y+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return i(e,o),o};return o=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Ce(e.cacheSize),parseClassName:De(e),sortModifiers:_e(e),...be(e)}))(l),r=n.cache.get,i=n.cache.set,o=a,a(s)},(...e)=>o(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=Le(t))&&(i&&(i+=" "),i+=n);return i})(...e))},Ve=[],Be=e=>{const t=t=>t[e]||Ve;return t.isThemeGetter=!0,t},Fe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$e=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ue=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,We=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ke=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,He=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ge=e=>Ue.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Ze=e=>!!e&&Number.isInteger(Number(e)),Je=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),Qe=e=>We.test(e),et=()=>!0,tt=e=>Ke.test(e)&&!He.test(e),nt=()=>!1,rt=e=>Ye.test(e),it=e=>qe.test(e),ot=e=>!st(e)&&!mt(e),at=e=>Ot(e,At,nt),st=e=>Fe.test(e),lt=e=>Ot(e,jt,tt),ct=e=>Ot(e,Tt,Xe),ut=e=>Ot(e,Ct,et),dt=e=>Ot(e,Mt,nt),ft=e=>Ot(e,kt,nt),pt=e=>Ot(e,Pt,it),ht=e=>Ot(e,Nt,rt),mt=e=>$e.test(e),vt=e=>St(e,jt),yt=e=>St(e,Mt),gt=e=>St(e,kt),bt=e=>St(e,At),xt=e=>St(e,Pt),wt=e=>St(e,Nt,!0),Et=e=>St(e,Ct,!0),Ot=(e,t,n)=>{const r=Fe.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},St=(e,t,n=!1)=>{const r=$e.exec(e);return!!r&&(r[1]?t(r[1]):n)},kt=e=>"position"===e||"percentage"===e,Pt=e=>"image"===e||"url"===e,At=e=>"length"===e||"size"===e||"bg-size"===e,jt=e=>"length"===e,Tt=e=>"number"===e,Mt=e=>"family-name"===e,Ct=e=>"number"===e||"weight"===e,Nt=e=>"shadow"===e,It=ze(()=>{const e=Be("color"),t=Be("font"),n=Be("text"),r=Be("font-weight"),i=Be("tracking"),o=Be("leading"),a=Be("breakpoint"),s=Be("container"),l=Be("spacing"),c=Be("radius"),u=Be("shadow"),d=Be("inset-shadow"),f=Be("text-shadow"),p=Be("drop-shadow"),h=Be("blur"),m=Be("perspective"),v=Be("aspect"),y=Be("ease"),g=Be("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",mt,st],x=()=>[mt,st,l],w=()=>[Ge,"full","auto",...x()],E=()=>[Ze,"none","subgrid",mt,st],O=()=>["auto",{span:["full",Ze,mt,st]},Ze,mt,st],S=()=>[Ze,"auto",mt,st],k=()=>["auto","min","max","fr",mt,st],P=()=>["auto",...x()],A=()=>[Ge,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],j=()=>[Ge,"screen","full","dvw","lvw","svw","min","max","fit",...x()],T=()=>[Ge,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],M=()=>[e,mt,st],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",gt,ft,{position:[mt,st]}],N=()=>["auto","cover","contain",bt,at,{size:[mt,st]}],I=()=>[Je,vt,lt],D=()=>["","none","full",c,mt,st],_=()=>["",Xe,vt,lt],R=()=>[Xe,Je,gt,ft],L=()=>["","none",h,mt,st],z=()=>["none",Xe,mt,st],V=()=>["none",Xe,mt,st],B=()=>[Xe,mt,st],F=()=>[Ge,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qe],breakpoint:[Qe],color:[et],container:[Qe],"drop-shadow":[Qe],ease:["in","out","in-out"],font:[ot],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qe],shadow:[Qe],spacing:["px",Xe],text:[Qe],"text-shadow":[Qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ge,st,mt,v]}],container:["container"],columns:[{columns:[Xe,st,mt,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Ze,"auto",mt,st]}],basis:[{basis:[Ge,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Ge,"auto","initial","none",st]}],grow:[{grow:["",Xe,mt,st]}],shrink:[{shrink:["",Xe,mt,st]}],order:[{order:[Ze,"first","last","none",mt,st]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...j()]}],"min-inline-size":[{"min-inline":["auto",...j()]}],"max-inline-size":[{"max-inline":["none",...j()]}],"block-size":[{block:["auto",...T()]}],"min-block-size":[{"min-block":["auto",...T()]}],"max-block-size":[{"max-block":["none",...T()]}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,vt,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Et,ut]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Je,st]}],"font-family":[{font:[yt,dt,t]}],"font-features":[{"font-features":[st]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,mt,st]}],"line-clamp":[{"line-clamp":[Xe,"none",mt,ct]}],leading:[{leading:[o,...x()]}],"list-image":[{"list-image":["none",mt,st]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",mt,st]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",mt,lt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Xe,"auto",mt,st]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mt,st]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mt,st]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ze,mt,st],radial:["",mt,st],conic:[Ze,mt,st]},xt,pt]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:_()}],"border-w-x":[{"border-x":_()}],"border-w-y":[{"border-y":_()}],"border-w-s":[{"border-s":_()}],"border-w-e":[{"border-e":_()}],"border-w-bs":[{"border-bs":_()}],"border-w-be":[{"border-be":_()}],"border-w-t":[{"border-t":_()}],"border-w-r":[{"border-r":_()}],"border-w-b":[{"border-b":_()}],"border-w-l":[{"border-l":_()}],"divide-x":[{"divide-x":_()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,mt,st]}],"outline-w":[{outline:["",Xe,vt,lt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,wt,ht]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",d,wt,ht]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Xe,lt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":_()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",f,wt,ht]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Xe,mt,st]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[mt,st]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",mt,st]}],filter:[{filter:["","none",mt,st]}],blur:[{blur:L()}],brightness:[{brightness:[Xe,mt,st]}],contrast:[{contrast:[Xe,mt,st]}],"drop-shadow":[{"drop-shadow":["","none",p,wt,ht]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Xe,mt,st]}],"hue-rotate":[{"hue-rotate":[Xe,mt,st]}],invert:[{invert:["",Xe,mt,st]}],saturate:[{saturate:[Xe,mt,st]}],sepia:[{sepia:["",Xe,mt,st]}],"backdrop-filter":[{"backdrop-filter":["","none",mt,st]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,mt,st]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,mt,st]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,mt,st]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,mt,st]}],"backdrop-invert":[{"backdrop-invert":["",Xe,mt,st]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,mt,st]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,mt,st]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,mt,st]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",mt,st]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",mt,st]}],ease:[{ease:["linear","initial",y,mt,st]}],delay:[{delay:[Xe,mt,st]}],animate:[{animate:["none",g,mt,st]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,mt,st]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:B()}],"skew-x":[{"skew-x":B()}],"skew-y":[{"skew-y":B()}],transform:[{transform:[mt,st,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mt,st]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",mt,st]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Xe,vt,lt,ct]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Dt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return It(fe(e))}function _t(){return"undefined"!=typeof window}function Rt(e){return Vt(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function zt(e){var t;return null==(t=(Vt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Vt(e){return!!_t()&&(e instanceof Node||e instanceof Lt(e).Node)}function Bt(e){return!!_t()&&(e instanceof Element||e instanceof Lt(e).Element)}function Ft(e){return!!_t()&&(e instanceof HTMLElement||e instanceof Lt(e).HTMLElement)}function $t(e){return!(!_t()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot)}function Ut(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function Wt(e){return/^(table|td|th)$/.test(Rt(e))}function Kt(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Ht=/transform|translate|scale|rotate|perspective|filter/,Yt=/paint|layout|strict|content/,qt=e=>!!e&&"none"!==e;let Gt;function Xt(e){const t=Bt(e)?Qt(e):e;return qt(t.transform)||qt(t.translate)||qt(t.scale)||qt(t.rotate)||qt(t.perspective)||!Zt()&&(qt(t.backdropFilter)||qt(t.filter))||Ht.test(t.willChange||"")||Yt.test(t.contain||"")}function Zt(){return null==Gt&&(Gt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Gt}function Jt(e){return/^(html|body|#document)$/.test(Rt(e))}function Qt(e){return Lt(e).getComputedStyle(e)}function en(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tn(e){if("html"===Rt(e))return e;const t=e.assignedSlot||e.parentNode||$t(e)&&e.host||zt(e);return $t(t)?t.host:t}function nn(e){const t=tn(e);return Jt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ft(t)&&Ut(t)?t:nn(t)}function rn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=nn(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=Lt(i);if(o){const e=on(a);return t.concat(a,a.visualViewport||[],Ut(i)?i:[],e&&n?rn(e):[])}return t.concat(i,rn(i,[],n))}function on(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const an=e[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],sn=an&&an!==e.useLayoutEffect?an:e=>e();function ln(e){const t=Y(cn).current;return t.next=e,sn(t.effect),t.trampoline}function cn(){const e={next:void 0,callback:un,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function un(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}let dn;function fn(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");dn.has(t)||(dn.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(dn=new Set);const pn={...e},hn="undefined"!=typeof document?e.useLayoutEffect:()=>{},mn=e.createContext(void 0);function vn(t=!1){const n=e.useContext(mn);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":K(16));return n}function yn(t={}){const{disabled:n=!1,focusableWhenDisabled:r,tabIndex:i=0,native:o=!0,composite:a}=t,s=e.useRef(null),l=vn(!0),c=a??void 0!==l,{props:u}=function(t){const{focusableWhenDisabled:n,disabled:r,composite:i=!1,tabIndex:o=0,isNativeButton:a}=t,s=i&&!1!==n,l=i&&!1===n;return{props:e.useMemo(()=>{const e={onKeyDown(e){r&&n&&"Tab"!==e.key&&e.preventDefault()}};return i||(e.tabIndex=o,!a&&r&&(e.tabIndex=n?o:-1)),(a&&(n||s)||!a&&r)&&(e["aria-disabled"]=r),!a||n&&!l||(e.disabled=r),e},[i,r,n,s,l,a,o])}}({focusableWhenDisabled:r,disabled:n,composite:c,tabIndex:i,isNativeButton:o});"production"!==process.env.NODE_ENV&&e.useEffect(()=>{if(!s.current)return;const e=gn(s.current);if(o){if(!e){fn(`${"A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`."}${pn.captureOwnerStack?.()||""}`)}}else if(e){fn(`${"A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`."}${pn.captureOwnerStack?.()||""}`)}},[o]);const d=e.useCallback(()=>{const e=s.current;gn(e)&&c&&n&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[n,u.disabled,c]);hn(d,[d]);return{getButtonProps:e.useCallback((e={})=>{const{onClick:t,onMouseDown:r,onKeyUp:i,onKeyDown:a,onPointerDown:s,...l}=e;return L({type:o?"button":void 0,onClick(e){n?e.preventDefault():t?.(e)},onMouseDown(e){n||r?.(e)},onKeyDown(e){if(n)return;if(U(e),a?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,i=e.currentTarget,s=gn(i),l=!o&&(u=i,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(o?s:!l),f="Enter"===e.key,p=" "===e.key,h=i.getAttribute("role"),m=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&c&&p){if(e.defaultPrevented&&m)return;return e.preventDefault(),void(l||o&&s?(i.click(),e.preventBaseUIHandler()):d&&(t?.(e),e.preventBaseUIHandler()))}d&&(o||!p&&!f||e.preventDefault(),!o&&f&&t?.(e))},onKeyUp(e){n||(U(e),i?.(e),e.target===e.currentTarget&&o&&c&&gn(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||o||c||" "!==e.key||t?.(e))},onPointerDown(e){n?e.preventDefault():s?.(e)}},o?void 0:{role:"button"},u,l)},[n,u,c,o]),buttonRef:ln(e=>{s.current=e,d()})}}function gn(e){return Ft(e)&&"BUTTON"===e.tagName}"production"!==process.env.NODE_ENV&&(mn.displayName="CompositeRootContext");const bn=e.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...s}=e,{getButtonProps:l,buttonRef:c}=yn({disabled:i,focusableWhenDisabled:o,native:a});return le("button",e,{state:{disabled:i},ref:[t,c],props:[s,l]})});"production"!==process.env.NODE_ENV&&(bn.displayName="Button");var xn=me("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function wn(e){var t=e.className,n=e.variant,r=void 0===n?"default":n,i=e.size,o=void 0===i?"default":i,a=D(e,["className","variant","size"]);return N.jsx(bn,I({"data-slot":"button",className:Dt(xn({variant:r,size:o,className:t}))},a))}let En=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const On={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Sn={disabled:!1,...On},kn={valid:e=>null===e?null:e?{[En.valid]:""}:{[En.invalid]:""}},Pn=e.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:te,disabled:void 0,touched:On.touched,setTouched:te,dirty:On.dirty,setDirty:te,filled:On.filled,setFilled:te,focused:On.focused,setFocused:te,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Sn,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=re)=>e,getInputValidationProps:(e=re)=>e,inputRef:{current:null},commit:async()=>{}}});function An(t=!0){const n=e.useContext(Pn);if(n.setValidityData===te&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":K(28));return n}"production"!==process.env.NODE_ENV&&(Pn.displayName="FieldRootContext");const jn=e.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:te,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});"production"!==process.env.NODE_ENV&&(jn.displayName="FormContext");let Tn=0;const Mn=pn.useId;function Cn(t,n){if(void 0!==Mn){const e=Mn();return t??(n?`${n}-${e}`:e)}return function(t,n="mui"){const[r,i]=e.useState(t),o=t||r;return e.useEffect(()=>{null==r&&(Tn+=1,i(`${n}-${Tn}`))},[r,n]),o}(t,n)}function Nn(e){return Cn(e,"base-ui")}const In=e.createContext({controlId:void 0,registerControlId:te,labelId:void 0,setLabelId:te,messageIds:[],setMessageIds:te,getDescriptionProps:e=>e});function Dn(){return e.useContext(In)}"production"!==process.env.NODE_ENV&&(In.displayName="LabelableContext");const _n=[];function Rn(t){e.useEffect(t,_n)}class Ln{static create(){return new Ln}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function zn(){const e=Y(Ln.create).current;return Rn(e.disposeEffect),e}function Vn(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Bn(e){return e?.ownerDocument||document}const Fn="undefined"!=typeof navigator,$n=function(){if(!Fn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;if(e?.platform)return{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints};return{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),Un=function(){if(!Fn)return"";const e=navigator.userAgentData;if(e?.platform)return e.platform;return navigator.platform??""}(),Wn=function(){if(!Fn)return"";const e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" ");return navigator.userAgent}(),Kn=!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter:none"),Hn="MacIntel"===$n.platform&&$n.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test($n.platform),Yn=Fn&&/apple/i.test(navigator.vendor),qn=Fn&&/android/i.test(Un)||/android/i.test(Wn),Gn=Fn&&Un.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Xn=Wn.includes("jsdom/");const Zn="data-base-ui-focusable",Jn="active",Qn="selected",er="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",tr="ArrowLeft",nr="ArrowRight",rr="ArrowUp",ir="ArrowDown";function or(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function ar(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&$t(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function sr(e,t){if(!Bt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,e]of t.entries())if(ar(e,n))return!e.hasAttribute("data-trigger-disabled");return!1}function lr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function cr(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function ur(e){return Ft(e)&&e.matches(er)}function dr(e){return!!e&&("combobox"===e.getAttribute("role")&&ur(e))}function fr(e){return e?e.hasAttribute(Zn)?e:e.querySelector(`[${Zn}]`)||e:null}function pr(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...pr(e,t.id,n)])}function hr(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){const t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function mr(e){e.preventDefault(),e.stopPropagation()}function vr(e){return!(""!==e.pointerType||!e.isTrusted)||(qn&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function yr(e){return!Xn&&(!qn&&0===e.width&&0===e.height||qn&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function gr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function br(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}const xr=["top","right","bottom","left"],wr=Math.min,Er=Math.max,Or=Math.round,Sr=Math.floor,kr=e=>({x:e,y:e}),Pr={left:"right",right:"left",bottom:"top",top:"bottom"};function Ar(e,t,n){return Er(e,wr(t,n))}function jr(e,t){return"function"==typeof e?e(t):e}function Tr(e){return e.split("-")[0]}function Mr(e){return e.split("-")[1]}function Cr(e){return"x"===e?"y":"x"}function Nr(e){return"y"===e?"height":"width"}function Ir(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Dr(e){return Cr(Ir(e))}function _r(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Rr=["left","right"],Lr=["right","left"],zr=["top","bottom"],Vr=["bottom","top"];function Br(e,t,n,r){const i=Mr(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Lr:Rr:t?Rr:Lr;case"left":case"right":return t?zr:Vr;default:return[]}}(Tr(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(_r)))),o}function Fr(e){const t=Tr(e);return Pr[t]+e.slice(t.length)}function $r(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ur(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Wr(e,t,n){return Math.floor(e/t)!==n}function Kr(e,t){return t<0||t>=e.current.length}function Hr(e,t){return qr(e,{disabledIndices:t})}function Yr(e,t){return qr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function qr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do{o+=n?-i:i}while(o>=0&&o<=e.current.length-1&&Zr(e,o,r));return o}function Gr(e,t,n,r,i){if(-1===e)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function Xr(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Zr(e,t,n){if("function"==typeof n?n(t):n?.includes(t)??!1)return!0;const r=e.current[t];return!!r&&(!Jr(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function Jr(e){return"none"!==Qt(e).display}
|
|
11
|
+
/*!
|
|
12
|
+
* tabbable 6.4.0
|
|
13
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
14
|
+
*/var Qr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),ei="undefined"==typeof Element,ti=ei?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ni=!ei&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ri=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):ri(e.parentNode))},ii=function(e,t,n){if(ri(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Qr));return t&&ti.call(e,Qr)&&r.unshift(e),r=r.filter(n)},oi=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!ri(o,!1))if("SLOT"===o.tagName){var a=o.assignedElements(),s=a.length?a:o.children,l=oi(s,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{ti.call(o,Qr)&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var c=o.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(o),u=!ri(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&u){var d=oi(!0===c?o.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},ai=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},si=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!ai(e)?0:e.tabIndex},li=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ci=function(e){return"INPUT"===e.tagName},ui=function(e){return function(e){return ci(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ni(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)},di=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},fi=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var i=ti.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ti.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return di(e)}else{if("function"==typeof r){for(var o=e;e;){var a=e.parentElement,s=ni(e);if(a&&!a.shadowRoot&&!0===r(a))return di(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=o}if(function(e){var t,n,r,i,o=e&&ni(e),a=null===(t=o)||void 0===t?void 0:t.host,s=!1;if(o&&o!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=o=ni(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},pi=function(e,t){return!(t.disabled||function(e){return ci(e)&&"hidden"===e.type}(t)||fi(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ti.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},hi=function(e,t){return!(ui(t)||si(t)<0||!pi(e,t))},mi=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},vi=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,o=i?e.scopeParent:e,a=function(e,t){var n=si(e);return n<0&&t&&!ai(e)?0:n}(o,i),s=i?vi(e.candidates):o;0===a?i?t.push.apply(t,s):t.push(o):n.push({documentOrder:r,tabIndex:a,item:e,isScope:i,content:s})}),n.sort(li).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},yi=function(e,t){var n;return n=(t=t||{}).getShadowRoot?oi([e],t.includeContainer,{filter:hi.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mi}):ii(e,t.includeContainer,hi.bind(null,t)),vi(n)},gi=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ti.call(e,Qr)&&hi(t,e)};const bi=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function xi(e,t){const n=yi(e,bi()),r=n.length;if(0===r)return;const i=or(Bn(e)),o=n.indexOf(i);return n[-1===o?1===t?0:r-1:o+t]}function wi(e){return xi(Bn(e).body,1)||e}function Ei(e){return xi(Bn(e).body,-1)||e}function Oi(e,t){if(!e)return null;const n=yi(Bn(e).body,bi()),r=n.length;if(0===r)return null;const i=n.indexOf(e);if(-1===i)return null;return n[(i+t+r)%r]}function Si(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ar(n,r)}function ki(e){yi(e,bi()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Pi(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Ai=null;let ji=globalThis.requestAnimationFrame;const Ti=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){const t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const n="production"!==process.env.NODE_ENV&&ji!==requestAnimationFrame&&(ji=requestAnimationFrame,!0);return this.isScheduled&&!n||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Mi{static create(){return new Mi}static request(e){return Ti.request(e)}static cancel(e){return Ti.cancel(e)}currentId=Ai;request(e){this.cancel(),this.currentId=Ti.request(()=>{this.currentId=Ai,e()})}cancel=()=>{this.currentId!==Ai&&(Ti.cancel(this.currentId),this.currentId=Ai)};disposeEffect=()=>this.cancel}function Ci(){const e=Y(Mi.create).current;return Rn(e.disposeEffect),e}function Ni(e){return null==e?e:"current"in e?e.current:e}let Ii=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const Di={[Ii.startingStyle]:""},_i={[Ii.endingStyle]:""},Ri={transitionStatus:e=>"starting"===e?Di:"ending"===e?_i:null};function Li(e,t=!1,n=!0){const r=Ci();return ln((i,o=null)=>{function a(){E.flushSync(i)}r.cancel();const s=Ni(e);if(null==s)return;const l=s;if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function c(){const e=Ii.startingStyle;if(!l.hasAttribute(e))return void r.request(u);const t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),u())});t.observe(l,{attributes:!0,attributeFilter:[e]}),o?.addEventListener("abort",()=>t.disconnect(),{once:!0})}function u(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{o?.aborted||a()}).catch(()=>{const e=l.getAnimations();if(n){if(o?.aborted)return;a()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&u()})}if(t)return void c();r.request(u)}})}function zi(t){const{enabled:n=!0,open:r,ref:i,onComplete:o}=t,a=ln(o),s=Li(i,r,!1);e.useEffect(()=>{if(!n)return;const e=new AbortController;return s(a,e.signal),()=>{e.abort()}},[n,r,a,s])}function Vi(t){const{enabled:n=!0,value:r,id:i,name:o,controlRef:a,commit:s}=t,{formRef:l}=e.useContext(jn),{invalid:c,markedDirtyRef:u,validityData:d,setValidityData:f}=An(),p=ln(t.getValue);hn(()=>{if(!n)return;let e=r;void 0===e&&(e=p()),null===d.initialValue&&null!==e&&f(t=>({...t,initialValue:e}))},[n,f,r,d.initialValue,p]),hn(()=>{n&&i&&l.current.fields.set(i,{getValue:p,name:o,controlRef:a,validityData:Vn(d,c),validate(e=!0){let t=r;void 0===t&&(t=p()),u.current=!0,e?E.flushSync(()=>s(t)):s(t)}})},[s,a,n,l,p,i,c,u,o,d,r]),hn(()=>{const e=l.current.fields;return()=>{i&&e.delete(i)}},[l,i])}const Bi="none",Fi="trigger-press",$i="trigger-hover",Ui="trigger-focus",Wi="outside-press",Ki="item-press",Hi="focus-out",Yi="escape-key",qi="list-navigation",Gi="sibling-open",Xi="imperative-action";function Zi(e,t,n,r){let i=!1,o=!1;const a=re;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const Ji=e.forwardRef(function(t,n){const{render:r,className:i,id:o,name:a,value:s,disabled:l=!1,onValueChange:c,defaultValue:u,autoFocus:d=!1,...f}=t,{state:p,name:h,disabled:m,setTouched:v,setDirty:y,validityData:g,setFocused:b,setFilled:x,validationMode:w,validation:E}=An(),O=m||l,S=h??a,k={...p,disabled:O},{labelId:P}=Dn(),A=function(t={}){const{id:n,implicit:r=!1,controlRef:i}=t,{controlId:o,registerControlId:a}=Dn(),s=Nn(n),l=r?o:void 0,c=Y(()=>Symbol("labelable-control")),u=e.useRef(!1),d=e.useRef(null!=n),f=ln(()=>{u.current&&a!==te&&(u.current=!1,a(c.current,void 0))});return hn(()=>{if(a===te)return;let e;if(r){const t=i?.current;e=Bt(t)&&null!=t.closest("label")?n??null:l??s}else if(null!=n)d.current=!0,e=n;else{if(!d.current)return void f();e=s}void 0!==e?(u.current=!0,a(c.current,e)):f()},[n,i,l,a,r,s,c,f]),e.useEffect(()=>f,[f]),o??s}({id:o});hn(()=>{const e=null!=s;E.inputRef.current?.value||e&&""!==s?x(!0):e&&""===s&&x(!1)},[E.inputRef,x,s]);const j=e.useRef(null);hn(()=>{d&&j.current===or(Bn(j.current))&&b(!0)},[d,b]);const[T]=function({controlled:t,default:n,name:r,state:i="value"}){const{current:o}=e.useRef(void 0!==t),[a,s]=e.useState(n),l=o?t:a;if("production"!==process.env.NODE_ENV){e.useEffect(()=>{o!==(void 0!==t)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${i} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))},[i,r,t]);const{current:a}=e.useRef(n);e.useEffect(()=>{o||JSON.stringify(a)===JSON.stringify(n)||console.error([`Base UI: A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join("\n"))},[JSON.stringify(n)])}return[l,e.useCallback(e=>{o||s(e)},[])]}({controlled:s,default:u,name:"FieldControl",state:"value"}),M=void 0!==s,C=M?T:void 0;Vi({id:A,name:S,commit:E.commit,value:C,getValue:()=>E.inputRef.current?.value,controlRef:E.inputRef});return le("input",t,{ref:[n,j],state:k,props:[{id:A,disabled:O,name:S,ref:E.inputRef,"aria-labelledby":P,autoFocus:d,...M?{value:C}:{defaultValue:u},onChange(e){const t=e.currentTarget.value;c?.(t,Zi(Bi,e.nativeEvent)),y(t!==g.initialValue),x(""!==t)},onFocus(){b(!0)},onBlur(e){v(!0),b(!1),"onBlur"===w&&E.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(v(!0),E.commit(e.currentTarget.value))}},E.getInputValidationProps(),f],stateAttributesMapping:kn})});"production"!==process.env.NODE_ENV&&(Ji.displayName="FieldControl");const Qi=e.forwardRef(function(e,t){return N.jsx(Ji,{ref:t,...e})});function eo(e){var t=e.className,n=e.type,r=D(e,["className","type"]);return N.jsx(Qi,I({type:n,"data-slot":"input",className:Dt("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t)},r))}"production"!==process.env.NODE_ENV&&(Qi.displayName="Input");const to=e.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return le("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})});"production"!==process.env.NODE_ENV&&(to.displayName="Separator");const no=e.createContext(void 0);function ro(t){const n=e.useContext(no);if(!1===t&&void 0===n)throw new Error("production"!==process.env.NODE_ENV?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":K(27));return n}"production"!==process.env.NODE_ENV&&(no.displayName="DialogRootContext");let io=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ii.startingStyle]="startingStyle",e[e.endingStyle=Ii.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),oo=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const ao={[oo.popupOpen]:""},so={[oo.popupOpen]:"",[oo.pressed]:""},lo={[io.open]:""},co={[io.closed]:""},uo={[io.anchorHidden]:""},fo={open:e=>e?ao:null},po={open:e=>e?so:null},ho={open:e=>e?lo:co,anchorHidden:e=>e?uo:null},mo={...ho,...Ri},vo=e.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=ro(),s=a.useState("open"),l=a.useState("nested"),c=a.useState("mounted");return le("div",e,{state:{open:s,transitionStatus:a.useState("transitionStatus")},ref:[a.context.backdropRef,t],stateAttributesMapping:mo,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!l})});"production"!==process.env.NODE_ENV&&(vo.displayName="DialogBackdrop");const yo=e.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,...a}=e,{store:s}=ro(),l=s.useState("open");const{getButtonProps:c,buttonRef:u}=yn({disabled:i,native:o});return le("button",e,{state:{disabled:i},ref:[t,u],props:[{onClick:function(e){l&&s.setOpen(!1,Zi("close-press",e.nativeEvent))}},a,c]})});"production"!==process.env.NODE_ENV&&(yo.displayName="DialogClose");const go=e.forwardRef(function(e,t){const{render:n,className:r,id:i,...o}=e,{store:a}=ro(),s=Nn(i);return a.useSyncedValueWithCleanup("descriptionElementId",s),le("p",e,{ref:t,props:[{id:s},o]})});function bo(e,t,n){const r=function(e,t){return null==t||gr(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function xo(e){return"function"==typeof e?e():e}function wo(e,t){return t||"click"===e||"mousedown"===e}"production"!==process.env.NODE_ENV&&(go.displayName="DialogDescription");const Eo=e.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ln,currentIdRef:{current:null},currentContextRef:{current:null}});function Oo(e){const t=Y(So,e).current;return t.next=e,hn(t.effect),t}function So(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}"production"!==process.env.NODE_ENV&&(Eo.displayName="FloatingDelayGroupContext");const ko={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1,position:"fixed",top:0,left:0},Po=e.forwardRef(function(t,n){const[r,i]=e.useState();hn(()=>{Yn&&i("button")},[]);const o={tabIndex:0,role:r};return N.jsx("span",{...t,ref:n,style:ko,"aria-hidden":!r||void 0,...o,"data-base-ui-focus-guard":""})});function Ao(e){return`data-base-ui-${e}`}"production"!==process.env.NODE_ENV&&(Po.displayName="FocusGuard");let jo=0;function To(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(jo);const o=()=>e?.focus({preventScroll:n});i?o():jo=requestAnimationFrame(o)}const Mo={inert:new WeakMap,"aria-hidden":new WeakMap},Co="data-base-ui-inert",No={inert:new WeakSet,"aria-hidden":new WeakSet};let Io=new WeakMap,Do=0;function _o(e){return e?$t(e)?e.host:_o(e.parentNode):null}const Ro=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=_o(t);return e.contains(n)?n:null}).filter(e=>null!=e),Lo=e=>{const t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},zo=(e,t,n)=>{const r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{"script"!==Rt(e)&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Vo(e,t,n,r,{mark:i=!0,markerIgnoreElements:o=[]}){const a=r?"inert":n?"aria-hidden":null;let s=null,l=null;const c=Ro(t,e),u=i?Ro(t,o):[],d=new Set(u),f=i?zo(t,Lo(c),new Set(c)).filter(e=>!d.has(e)):[],p=[],h=[];if(a){const e=Mo[a],n=function(e){return No[e]}(a);l=n,s=e;const r=Ro(t,Array.from(t.querySelectorAll("[aria-live]"))),i=c.concat(r);zo(t,Lo(i),new Set(i)).forEach(t=>{const r=t.getAttribute(a),i=null!==r&&"false"!==r,o=(e.get(t)||0)+1;e.set(t,o),p.push(t),1===o&&i&&n.add(t),i||t.setAttribute(a,"inert"===a?"":"true")})}return i&&f.forEach(e=>{const t=(Io.get(e)||0)+1;Io.set(e,t),h.push(e),1===t&&e.setAttribute(Co,"")}),Do+=1,()=>{s&&p.forEach(e=>{const t=(s.get(e)||0)-1;s.set(e,t),t||(!l?.has(e)&&a&&e.removeAttribute(a),l?.delete(e))}),i&&h.forEach(e=>{const t=(Io.get(e)||0)-1;Io.set(e,t),t||e.removeAttribute(Co)}),Do-=1,Do||(Mo.inert=new WeakMap,Mo["aria-hidden"]=new WeakMap,No.inert=new WeakSet,No["aria-hidden"]=new WeakSet,Io=new WeakMap)}}function Bo(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:o=[]}=t;return Vo(e,Bn(e[0]).body,n,r,{mark:i,markerIgnoreElements:o})}const Fo=e.createContext(null);"production"!==process.env.NODE_ENV&&(Fo.displayName="PortalContext");const $o=()=>e.useContext(Fo),Uo=Ao("portal");function Wo(t={}){const{ref:n,container:r,componentProps:i=re,elementProps:o}=t,a=Cn(),s=$o(),l=s?.portalNode,[c,u]=e.useState(null),[d,f]=e.useState(null),p=ln(e=>{null!==e&&f(e)}),h=e.useRef(null);hn(()=>{if(null===r)return void(h.current&&(h.current=null,f(null),u(null)));if(null==a)return;const e=(r&&(Vt(r)?r:r.current))??l??document.body;null!=e?h.current!==e&&(h.current=e,f(null),u(e)):h.current&&(h.current=null,f(null),u(null))},[r,l,a]);const m=le("div",i,{ref:[n,p],props:[{id:a,[Uo]:""},o]});return{portalNode:d,portalSubtree:c&&m?E.createPortal(m,c):null}}const Ko=e.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=Wo({container:i,ref:n,componentProps:t,elementProps:l}),d=e.useRef(null),f=e.useRef(null),p=e.useRef(null),h=e.useRef(null),[m,v]=e.useState(null),y=m?.modal,g=m?.open,b="boolean"==typeof s?s:!!m&&!m.modal&&m.open&&!!c;e.useEffect(()=>{if(c&&!y)return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){if(c&&e.relatedTarget&&Si(e)){("focusin"===e.type?Pi:ki)(c)}}},[c,y]),e.useEffect(()=>{c&&!g&&Pi(c)},[g,c]);const x=e.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:c,setFocusManagerState:v}),[c]);return N.jsxs(e.Fragment,{children:[u,N.jsxs(Fo.Provider,{value:x,children:[b&&c&&N.jsx(Po,{"data-type":"outside",ref:d,onFocus:e=>{if(Si(e,c))p.current?.focus();else{const e=Ei(m?m.domReference:null);e?.focus()}}}),b&&c&&N.jsx("span",{"aria-owns":c.id,style:se}),c&&E.createPortal(r,c),b&&c&&N.jsx(Po,{"data-type":"outside",ref:f,onFocus:e=>{if(Si(e,c))h.current?.focus();else{const t=wi(m?m.domReference:null);t?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,Zi(Hi,e.nativeEvent))}}})]})]})});function Ho(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}"production"!==process.env.NODE_ENV&&(Ko.displayName="FloatingPortal");class Yo{nodesRef={current:[]};events=Ho();addNode(e){this.nodesRef.current.push(e)}removeNode(e){const t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}}const qo=e.createContext(null);"production"!==process.env.NODE_ENV&&(qo.displayName="FloatingNodeContext");const Go=e.createContext(null);"production"!==process.env.NODE_ENV&&(Go.displayName="FloatingTreeContext");const Xo=()=>e.useContext(qo)?.id||null,Zo=t=>{const n=e.useContext(Go);return t??n};function Jo(e){const t=Cn(),n=Zo(e),r=Xo();return hn(()=>{if(!t)return;const e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Qo(t){const{children:n,id:r}=t,i=Xo();return N.jsx(qo.Provider,{value:e.useMemo(()=>({id:r,parentId:i}),[r,i]),children:n})}function ea(e){const{children:t,externalTree:n}=e,r=Y(()=>n??new Yo).current;return N.jsx(Go.Provider,{value:r,children:t})}let ta=[];function na(){ta=ta.filter(e=>e.deref()?.isConnected)}function ra(){return na(),ta[ta.length-1]?.deref()}function ia(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=bi(),r=function(e,t){return(t=t||{}).getShadowRoot?oi([e],t.includeContainer,{filter:pi.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):ii(e,t.includeContainer,pi.bind(null,t))}(e,n),i=r.filter(e=>{const t=e.getAttribute("data-tabindex")||"";return gi(e,n)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||0===i.length?"0"!==o&&e.setAttribute("tabindex","0"):("-1"!==o||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function oa(t){const{context:n,children:r,disabled:i=!1,initialFocus:o=!0,returnFocus:a=!0,restoreFocus:s=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:h,getInsideElements:m}=t,v="rootStore"in n?n.rootStore:n,y=v.useState("open"),g=v.useState("domReferenceElement"),b=v.useState("floatingElement"),{events:x,dataRef:w}=v.context,E=ln(()=>w.current.floatingContext?.nodeId),O=!1===o,S=dr(g)&&O,k=e.useRef(["content"]),P=Oo(o),A=Oo(a),j=Oo(u),T=Zo(h),M=$o(),C=e.useRef(!1),I=e.useRef(!1),D=e.useRef(!1),_=e.useRef(-1),R=e.useRef(""),L=e.useRef(""),z=e.useRef(null),V=e.useRef(null),B=q(z,p,M?.beforeInsideRef),F=q(V,M?.afterInsideRef),$=zn(),U=zn(),W=Ci(),K=null!=M,H=fr(b),Y=ln((e=H)=>e?yi(e,bi()):[]),G=ln(()=>m?.().filter(e=>null!=e)??[]),X=ln(e=>{const t=Y(e);return k.current.map(()=>t).filter(Boolean).flat()});e.useEffect(()=>{if(i||!l)return;function e(e){"Tab"===e.key&&ar(H,or(Bn(H)))&&0===Y().length&&!S&&mr(e)}const t=Bn(H);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[i,g,H,l,k,S,Y,X]),e.useEffect(()=>{if(i||!y)return;const e=Bn(H);function t(){D.current=!1}function n(e){const t=lr(e),n=G(),r=ar(b,t)||ar(g,t)||ar(M?.portalNode,t)||n.some(e=>e===t||ar(e,t));D.current=!r,L.current=e.pointerType||"keyboard",t?.closest("[data-base-ui-click-trigger]")&&(I.current=!0)}function r(){L.current="keyboard"}return e.addEventListener("pointerdown",n,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("pointerdown",n,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",r,!0)}},[i,b,g,H,y,M,G]),e.useEffect(()=>{if(i||!c)return;const e=Bn(H);function t(){I.current=!0,U.start(0,()=>{I.current=!1})}function n(e){const t=lr(e),n=Y().indexOf(t);-1!==n&&(_.current=n)}function r(t){const n=t.relatedTarget,r=t.currentTarget,i=lr(t);queueMicrotask(()=>{const o=E(),a=v.context.triggerElements,c=G(),u=n?.hasAttribute(Ao("focus-guard"))&&[z.current,V.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,Ni(f),Ni(d)].includes(n),p=!(ar(g,n)||ar(b,n)||ar(n,b)||ar(M?.portalNode,n)||c.some(e=>e===n||ar(e,n))||null!=n&&a.hasElement(n)||a.hasMatchingElement(e=>ar(e,n))||u||T&&(pr(T.nodesRef.current,o).find(e=>ar(e.context?.elements.floating,n)||ar(e.context?.elements.domReference,n))||hr(T.nodesRef.current,o).find(e=>[e.context?.elements.floating,fr(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===g&&H&&ia(H,k),s&&r!==g&&!((h=i)&&h.isConnected&&("function"==typeof h.checkVisibility?h.checkVisibility():Jr(h)))&&or(e)===e.body){if(Ft(H)&&(H.focus(),"popup"===s))return void W.request(()=>{H.focus()});const e=_.current,t=Y(),n=t[e]||t[t.length-1]||H;Ft(n)&&n.focus()}var h;w.current.insideReactTree?w.current.insideReactTree=!1:!S&&l||!n||!p||I.current||!S&&n===ra()||(C.current=!0,v.setOpen(!1,Zi(Hi,t)))})}function o(){D.current||(w.current.insideReactTree=!0,$.start(0,()=>{w.current.insideReactTree=!1}))}const a=Ft(g)?g:null,u=[];return b||a?(a&&(a.addEventListener("focusout",r),a.addEventListener("pointerdown",t),u.push(()=>{a.removeEventListener("focusout",r),a.removeEventListener("pointerdown",t)})),b&&(b.addEventListener("focusin",n),b.addEventListener("focusout",r),M&&(b.addEventListener("focusout",o,!0),u.push(()=>{b.removeEventListener("focusout",o,!0)})),u.push(()=>{b.removeEventListener("focusin",n),b.removeEventListener("focusout",r)})),()=>{u.forEach(e=>{e()})}):void 0},[i,g,b,H,l,T,M,v,c,s,Y,S,E,k,w,$,U,W,d,f,G]),e.useEffect(()=>{if(i||!b||!y)return;const e=Array.from(M?.portalNode?.querySelectorAll(`[${Ao("portal")}]`)||[]),t=T?hr(T.nodesRef.current,E()):[],n=t.find(e=>dr(e.context?.elements.domReference||null))?.context?.elements.domReference,r=[...[b,...e,z.current,V.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,...G()],n,Ni(f),Ni(d),S?g:null].filter(e=>null!=e),o=Bo(r,{ariaHidden:l||S,mark:!1}),a=[b,...e].filter(e=>null!=e),s=Bo(a);return()=>{s(),o()}},[y,i,g,b,l,k,M,S,T,E,d,f,G]),hn(()=>{if(!y||i||!Ft(H))return;const e=or(Bn(H));queueMicrotask(()=>{const t=X(H),n=P.current,r="function"==typeof n?n(j.current||""):n;if(void 0===r||!1===r)return;let i;i=!0===r||null===r?t[0]||H:Ni(r),i=i||t[0]||H;ar(H,e)||To(i,{preventScroll:i===H})})},[i,y,H,O,X,P,j]),hn(()=>{if(i||!H)return;const e=Bn(H),t=or(e);var n;function r(e){if(e.open||(R.current=function(e,t){const n=Lt(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,L.current)),e.reason===$i&&"mouseleave"===e.nativeEvent.type&&(C.current=!0),e.reason===Wi)if(e.nested)C.current=!1;else if(vr(e.nativeEvent)||yr(e.nativeEvent))C.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),C.current=!e}}return n=t,na(),n&&"body"!==Rt(n)&&(ta.push(new WeakRef(n)),ta.length>20&&(ta=ta.slice(-20))),x.on("openchange",r),()=>{x.off("openchange",r);const t=or(e),n=G(),i=ar(b,t)||n.some(e=>e===t||ar(e,t))||T&&pr(T.nodesRef.current,E(),!1).some(e=>ar(e.context?.elements.floating,t)),o=function(){const e=A.current;let t="function"==typeof e?e(R.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){const e=g||ra();return e&&e.isConnected?e:null}const n=g||ra();return Ni(t)||n||null}();queueMicrotask(()=>{const n=function(e){if(!e)return null;const t=bi();return gi(e,t)?e:yi(e,t)[0]||e}(o),r="boolean"!=typeof A.current;A.current&&!C.current&&Ft(n)&&(r||n===t||t===e.body||i)&&n.focus({preventScroll:!0}),C.current=!1})}},[i,b,H,A,w,x,T,g,E,G]),hn(()=>{if(!Kn||y||!b)return;const e=or(Bn(b));Ft(e)&&ur(e)&&ar(b,e)&&e.blur()},[y,b]),hn(()=>{if(!i&&M)return M.setFocusManagerState({modal:l,closeOnFocusOut:c,open:y,onOpenChange:v.setOpen,domReference:g}),()=>{M.setFocusManagerState(null)}},[i,M,l,y,v,c,g]),hn(()=>{if(!i&&H)return ia(H,k),()=>{queueMicrotask(na)}},[i,H,k]);const Z=!i&&(!l||!S)&&(K||l);return N.jsxs(e.Fragment,{children:[Z&&N.jsx(Po,{"data-type":"inside",ref:B,onFocus:e=>{if(l){const e=X();To(e[e.length-1])}else if(M?.portalNode)if(C.current=!1,Si(e,M.portalNode)){const e=wi(g);e?.focus()}else Ni(f??M.beforeOutsideRef)?.focus()}}),r,Z&&N.jsx(Po,{"data-type":"inside",ref:F,onFocus:e=>{if(l)To(X()[0]);else if(M?.portalNode)if(c&&(C.current=!0),Si(e,M.portalNode)){const e=Ei(g);e?.focus()}else Ni(d??M.afterOutsideRef)?.focus()}})]})}function aa(e){return null!=e&&null!=e.clientX}const sa={intentional:"onClick",sloppy:"onPointerDown"};function la(){return!1}function ca(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),{dataRef:a}=r.context,{enabled:s=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="sloppy",referencePress:d=la,referencePressEvent:f="sloppy",bubbles:p,externalTree:h}=n,m=Zo(h),v=ln("function"==typeof c?c:()=>!1),y="function"==typeof c?v:c,g=!1!==y,b=ln(()=>u),x=e.useRef(!1),w=e.useRef(!1),E=e.useRef(!1),{escapeKey:O,outsidePress:S}={escapeKey:"boolean"==typeof(k=p)?k:k?.escapeKey??!1,outsidePress:"boolean"==typeof k?k:k?.outsidePress??!0};var k;const P=e.useRef(null),A=zn(),j=zn(),T=ln(()=>{j.clear(),a.current.insideReactTree=!1}),M=e.useRef(!1),C=e.useRef(""),N=ln(d),I=ln(e=>{if(!i||!s||!l||"Escape"!==e.key)return;if(M.current)return;const t=a.current.floatingContext?.nodeId,n=m?pr(m.nodesRef.current,t):[];if(!O&&n.length>0){let e=!0;if(n.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}const o=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,c=Zi(Yi,o);r.setOpen(!1,c),O||c.isPropagationAllowed||e.stopPropagation()}),D=ln(()=>{a.current.insideReactTree=!0,j.start(0,T)});e.useEffect(()=>{if(!i||!s)return;a.current.__escapeKeyBubbles=O,a.current.__outsidePressBubbles=S;const e=new Ln,t=new Ln;function n(){e.clear(),M.current=!0}function c(){e.start(Zt()?5:0,()=>{M.current=!1})}function u(){E.current=!0,t.start(0,()=>{E.current=!1})}function d(){x.current=!1,w.current=!1}function f(){const e=C.current,t="pen"!==e&&e?e:"mouse",n=b(),r="function"==typeof n?n():n;return"string"==typeof r?r:r[t]}function p(e){const t=a.current.floatingContext?.nodeId,n=m&&pr(m.nodesRef.current,t).some(t=>cr(e,t.context?.elements.floating));return cr(e,r.select("floatingElement"))||cr(e,r.select("domReferenceElement"))||n}function h(e){if(function(e){const t=f();return"intentional"===t&&"click"!==e.type||"sloppy"===t&&"click"===e.type}(e))return void T();if(a.current.insideReactTree)return void T();const n=lr(e),i=`[${Ao("inert")}]`;let o=Array.from(Bn(r.select("floatingElement")).querySelectorAll(i));const s=Bt(n)?n.getRootNode():null;$t(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));const l=r.context.triggerElements;if(n&&(l.hasElement(n)||l.hasMatchingElement(e=>ar(e,n))))return;let c=Bt(n)?n:null;for(;c&&!Jt(c);){const e=tn(c);if(Jt(e)||!Bt(e))break;c=e}if(o.length&&Bt(n)&&!n.matches("html,body")&&!ar(n,r.select("floatingElement"))&&o.every(e=>!ar(c,e)))return;if(Ft(n)&&!("touches"in e)){const t=Jt(n),r=Qt(n),i=/auto|scroll/,o=t||i.test(r.overflowX),a=t||i.test(r.overflowY),s=o&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,l=a&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,c="rtl"===r.direction,u=l&&(c?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(p(e))return;if("intentional"===f()&&E.current)return t.clear(),void(E.current=!1);if("function"==typeof y&&!y(e))return;const u=a.current.floatingContext?.nodeId,d=m?pr(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r.setOpen(!1,Zi(Wi,e)),T()}function v(e){C.current="touch";const t=lr(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!r.select("open")||!s||cr(e,r.select("floatingElement"))||cr(e,r.select("domReferenceElement")))return;const t=e.touches[0];t&&(P.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,n)})}function k(e){if(A.clear(),"pointerdown"===e.type&&(C.current=e.pointerType),"mousedown"===e.type&&P.current&&!P.current.dismissOnMouseDown)return;const t=lr(e);t?.addEventListener(e.type,function n(){"pointerdown"===e.type?function(e){"sloppy"===f()&&"touch"!==e.pointerType&&r.select("open")&&s&&!cr(e,r.select("floatingElement"))&&!cr(e,r.select("domReferenceElement"))&&h(e)}(e):h(e),t?.removeEventListener(e.type,n)})}function j(e){if(!x.current)return;const n=w.current;d(),"intentional"===f()&&("pointercancel"!==e.type?p(e)||(n?u():("function"!=typeof y||y(e))&&(t.clear(),E.current=!0,T())):n&&u())}function N(e){const t=lr(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!P.current||cr(e,r.select("floatingElement"))||cr(e,r.select("domReferenceElement")))return;const t=e.touches[0];if(!t)return;const n=Math.abs(t.clientX-P.current.startX),i=Math.abs(t.clientY-P.current.startY),o=Math.sqrt(n*n+i*i);o>5&&(P.current.dismissOnTouchEnd=!0),o>10&&(h(e),A.clear(),P.current=null)}(e),t?.removeEventListener(e.type,n)})}function D(e){const t=lr(e);t?.addEventListener(e.type,function n(){!function(e){"sloppy"!==f()||!P.current||cr(e,r.select("floatingElement"))||cr(e,r.select("domReferenceElement"))||(P.current.dismissOnTouchEnd&&h(e),A.clear(),P.current=null)}(e),t?.removeEventListener(e.type,n)})}const _=Bn(o);return l&&(_.addEventListener("keydown",I),_.addEventListener("compositionstart",n),_.addEventListener("compositionend",c)),g&&(_.addEventListener("click",k,!0),_.addEventListener("pointerdown",k,!0),_.addEventListener("pointerup",j,!0),_.addEventListener("pointercancel",j,!0),_.addEventListener("mousedown",k,!0),_.addEventListener("mouseup",j,!0),_.addEventListener("touchstart",v,!0),_.addEventListener("touchmove",N,!0),_.addEventListener("touchend",D,!0)),()=>{l&&(_.removeEventListener("keydown",I),_.removeEventListener("compositionstart",n),_.removeEventListener("compositionend",c)),g&&(_.removeEventListener("click",k,!0),_.removeEventListener("pointerdown",k,!0),_.removeEventListener("pointerup",j,!0),_.removeEventListener("pointercancel",j,!0),_.removeEventListener("mousedown",k,!0),_.removeEventListener("mouseup",j,!0),_.removeEventListener("touchstart",v,!0),_.removeEventListener("touchmove",N,!0),_.removeEventListener("touchend",D,!0)),e.clear(),t.clear(),d(),E.current=!1}},[a,o,l,g,y,i,s,O,S,I,T,b,m,r,A]),e.useEffect(T,[y,T]);const _=e.useMemo(()=>({onKeyDown:I,[sa[f]]:e=>{N()&&r.setOpen(!1,Zi(Fi,e.nativeEvent))},..."intentional"!==f&&{onClick(e){N()&&r.setOpen(!1,Zi(Fi,e.nativeEvent))}}}),[I,r,f,N]),R=ln(e=>{if(!i||!s||0!==e.button)return;const t=lr(e.nativeEvent);ar(r.select("floatingElement"),t)&&(x.current||(x.current=!0,w.current=!1))}),L=ln(e=>{i&&s&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(w.current=!0)}),z=e.useMemo(()=>({onKeyDown:I,onPointerDown:L,onMouseDown:L,onClickCapture:D,onMouseDownCapture(e){D(),R(e)},onPointerDownCapture(e){D(),R(e)},onMouseUpCapture:D,onTouchEndCapture:D,onTouchMoveCapture:D}),[I,D,R,L]);return e.useMemo(()=>s?{reference:_,floating:z,trigger:_}:{},[s,_,z])}function ua(e,t,n){let{reference:r,floating:i}=e;const o=Ir(t),a=Dr(t),s=Nr(a),l=Tr(t),c="y"===o,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Mr(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function da(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=jr(t,e),h=$r(p),m=s[f?"floating"===d?"reference":"floating":d],v=Ur(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},x=Ur(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-x.top+h.top)/b.y,bottom:(x.bottom-v.bottom+h.bottom)/b.y,left:(v.left-x.left+h.left)/b.x,right:(x.right-v.right+h.right)/b.x}}function fa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pa(e){return xr.some(t=>e[t]>=0)}const ha=new Set(["left","top"]);function ma(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ft(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Or(n)!==o||Or(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function va(e){return Bt(e)?e:e.contextElement}function ya(e){const t=va(e);if(!Ft(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ma(t);let a=(o?Or(n.width):n.width)/r,s=(o?Or(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ga=kr(0);function ba(e){const t=Lt(e);return Zt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ga}function xa(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=va(e);let a=kr(1);t&&(r?Bt(r)&&(a=ya(r)):a=ya(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Lt(e))&&t}(o,n,r)?ba(o):kr(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const e=Lt(o),t=r&&Bt(r)?Lt(r):r;let n=e,i=on(n);for(;i&&r&&t!==n;){const e=ya(i),t=i.getBoundingClientRect(),r=Qt(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=a,n=Lt(i),i=on(n)}}return Ur({width:u,height:d,x:l,y:c})}function wa(e,t){const n=en(e).scrollLeft;return t?t.left+n:xa(zt(e)).left+n}function Ea(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-wa(e,n),y:n.top+t.scrollTop}}function Oa(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Lt(e),r=zt(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=Zt();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}const c=wa(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else c<=25&&(o+=c);return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=zt(e),n=en(e),r=e.ownerDocument.body,i=Er(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Er(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+wa(e);const s=-n.scrollTop;return"rtl"===Qt(r).direction&&(a+=Er(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(zt(e));else if(Bt(t))r=function(e,t){const n=xa(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ft(e)?ya(e):kr(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=ba(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ur(r)}function Sa(e,t){const n=tn(e);return!(n===t||!Bt(n)||Jt(n))&&("fixed"===Qt(n).position||Sa(n,t))}function ka(e,t,n){const r=Ft(t),i=zt(t),o="fixed"===n,a=xa(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=kr(0);function c(){l.x=wa(i)}if(r||!r&&!o)if(("body"!==Rt(t)||Ut(i))&&(s=en(t)),r){const e=xa(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=!i||r||o?kr(0):Ea(i,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Pa(e){return"static"===Qt(e).position}function Aa(e,t){if(!Ft(e)||"fixed"===Qt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return zt(e)===n&&(n=n.ownerDocument.body),n}function ja(e,t){const n=Lt(e);if(Kt(e))return n;if(!Ft(e)){let t=tn(e);for(;t&&!Jt(t);){if(Bt(t)&&!Pa(t))return t;t=tn(t)}return n}let r=Aa(e,t);for(;r&&Wt(r)&&Pa(r);)r=Aa(r,t);return r&&Jt(r)&&Pa(r)&&!Xt(r)?n:r||function(e){let t=tn(e);for(;Ft(t)&&!Jt(t);){if(Xt(t))return t;if(Kt(t))return null;t=tn(t)}return null}(e)||n}const Ta={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=zt(r),s=!!t&&Kt(t.floating);if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=kr(1);const u=kr(0),d=Ft(r);if((d||!d&&!o)&&(("body"!==Rt(r)||Ut(a))&&(l=en(r)),d)){const e=xa(r);c=ya(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||o?kr(0):Ea(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:zt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?Kt(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=rn(e,[],!1).filter(e=>Bt(e)&&"body"!==Rt(e)),i=null;const o="fixed"===Qt(e).position;let a=o?tn(e):e;for(;Bt(a)&&!Jt(a);){const t=Qt(a),n=Xt(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||Ut(a)&&!n&&Sa(e,a))?r=r.filter(e=>e!==a):i=t,a=tn(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=Oa(t,o[0],i);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let e=1;e<o.length;e++){const n=Oa(t,o[e],i);s=Er(n.top,s),l=wr(n.right,l),c=wr(n.bottom,c),u=Er(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:ja,getElementRects:async function(e){const t=this.getOffsetParent||ja,n=this.getDimensions,r=await n(e.floating);return{reference:ka(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ma(e);return{width:t,height:n}},getScale:ya,isElement:Bt,isRTL:function(e){return"rtl"===Qt(e).direction}};function Ma(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ca(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=va(e),u=i||o?[...c?rn(c):[],...t?rn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const i=zt(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-Sr(d)+"px "+-Sr(i.clientWidth-(u+f))+"px "+-Sr(i.clientHeight-(d+p))+"px "+-Sr(u)+"px",threshold:Er(0,wr(1,l))||1};let m=!0;function v(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Ma(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(v,{...h,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(v,h)}r.observe(e)}(!0),o}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?xa(e):null;return l&&function t(){const r=xa(e);m&&!Ma(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Na=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=Tr(n),s=Mr(n),l="y"===Ir(n),c=ha.has(a)?-1:1,u=o&&l?-1:1,d=jr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Ia=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=jr(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),f=Ir(Tr(i)),p=Cr(f);let h=u[p],m=u[f];if(a){const e="y"===p?"bottom":"right";h=Ar(h+d["y"===p?"top":"left"],h,h-d[e])}if(s){const e="y"===f?"bottom":"right";m=Ar(m+d["y"===f?"top":"left"],m,m-d[e])}const v=l.fn({...t,[p]:h,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[f]:s}}}}}},Da=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=jr(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=Tr(i),g=Ir(s),b=Tr(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[Fr(s)]:function(e){const t=Fr(e);return[_r(e),t,_r(t)]}(s)),E="none"!==h;!f&&E&&w.push(...Br(s,m,h,x));const O=[s,...w],S=await l.detectOverflow(t,v),k=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&k.push(S[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Mr(e),i=Dr(e),o=Nr(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Fr(a)),[a,Fr(a)]}(i,a,x);k.push(S[e[0]],S[e[1]])}if(P=[...P,{placement:i,overflows:k}],!k.every(e=>e<=0)){var A,j;const e=((null==(A=o.flip)?void 0:A.index)||0)+1,t=O[e];if(t){if(!("alignment"===d&&g!==Ir(t))||P.every(e=>Ir(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:P},reset:{placement:t}}}let n=null==(j=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=P.filter(e=>{if(E){const t=Ir(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}},_a=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=jr(e,t),u=await a.detectOverflow(t,c),d=Tr(i),f=Mr(i),p="y"===Ir(i),{width:h,height:m}=o.floating;let v,y;"top"===d||"bottom"===d?(v=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,v="end"===f?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,x=wr(m-u[v],g),w=wr(h-u[y],b),E=!t.middlewareData.shift;let O=x,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(O=g),E&&!f){const e=Er(u.left,0),t=Er(u.right,0),n=Er(u.top,0),r=Er(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:Er(u.left,u.right)):O=m-2*(0!==n||0!==r?n+r:Er(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:O});const k=await a.getDimensions(s.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}},Ra=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=jr(e,t);switch(i){case"referenceHidden":{const e=fa(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:pa(e)}}}case"escaped":{const e=fa(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:pa(e)}}}default:return{}}}}},La=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=jr(e,t),u={x:n,y:r},d=Ir(i),f=Cr(d);let p=u[f],h=u[d];const m=jr(s,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+v.mainAxis,n=o.reference[f]+o.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,g;const e="y"===f?"width":"height",t=ha.has(Tr(i)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:v.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},za=(e,t,n)=>{const r=new Map,i={platform:Ta,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:da},l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ua(c,r,l),f=r,p=0;const h={};for(let n=0;n<o.length;n++){const m=o[n];if(!m)continue;const{name:v,fn:y}=m,{x:g,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=b?b:d,h[v]={...h[v],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):w.rects),({x:u,y:d}=ua(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var Va="undefined"!=typeof document?r:function(){};function Ba(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Ba(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!==r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Ba(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Fa(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $a(e,t){const n=Fa(e);return Math.round(t*n)/n}function Ua(t){const n=e.useRef(t);return Va(()=>{n.current=t}),n}const Wa=(e,t)=>{const n=Na(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ka=(e,t,n)=>{if(1===t.length&&t[0]===n){let t=!1;try{const n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},Ha=(e,t,n)=>{const{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:o,inputSelectorResultsCopy:a}=e,s=r(()=>({}),...i);if(!(s.apply(null,o)===s.apply(null,a))){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:n,firstInputs:o,secondInputs:a,stack:e})}},Ya={inputStabilityCheck:"once",identityFunctionCheck:"once"},qa=Symbol("NOT_FOUND");var Ga=e=>Array.isArray(e)?e:[e];function Xa(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Za(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Ja=(e,t)=>e===t;var Qa="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function es(){return{s:0,v:void 0,o:null,p:null}}function ts(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let i,o=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=es(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=es(),e.set(n,t)):t=r}}const s=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),o++,r){const e=i?.deref?.()??i;null!=e&&r(e,l)&&(l=e,0!==o&&o--);i="object"==typeof l&&null!==l||"function"==typeof l?new Qa(l):l}return s.s=1,s.v=l,l}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ns(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,i=0,o={},a=e.pop();"object"==typeof a&&(o=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...o},{memoize:l,memoizeOptions:c=[],argsMemoize:u=ts,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=Ga(c),h=Ga(d),m=Xa(e),v=l(function(){return r++,a.apply(null,arguments)},...p);let y=!0;const g=u(function(){i++;const e=Za(m,arguments);if(t=v.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:n,inputStabilityCheck:r}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Ya,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:Ka},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:Ha}}})(y,f);if(n.shouldRun&&n.run(a,e,t),r.shouldRun){const t=Za(m,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:p},arguments)}y&&(y=!1)}return t},...h);return Object.assign(g,{resultFunc:a,memoizedResultFunc:v,dependencies:m,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var rs=ns(ts),is=Object.assign((e,t=rs)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e),r=t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}));return r},{withTypes:()=>is});ns({memoize:function(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Ja,maxSize:i=1,resultEqualityCheck:o}=n,a=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}(r);let s=0;const l=i<=1?function(e){let t;return{get:n=>t&&e(t.key,n)?t.value:qa,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let n=[];function r(e){const r=n.findIndex(n=>t(e,n.key));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return qa}return{get:r,put:function(t,i){r(t)===qa&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(i,a);function c(){let t=l.get(arguments);if(t===qa){if(t=e.apply(null,arguments),s++,o){const e=l.getEntries().find(e=>o(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c},memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const os=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error("production"!==process.env.NODE_ENV?"Unsupported number of selectors":K(1));let s;if(!e)throw new Error("Missing arguments");return s=e,s};var as,ss={exports:{}},ls={};var cs,us,ds={};
|
|
15
|
+
/**
|
|
16
|
+
* @license React
|
|
17
|
+
* use-sync-external-store-shim.development.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/function fs(){return us||(us=1,"production"===process.env.NODE_ENV?ss.exports=function(){if(as)return ls;as=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=r({inst:{value:n,getSnapshot:t}}),c=l[0].inst,u=l[1];return o(function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})},[e,n,t]),i(function(){return s(c)&&u({inst:c}),e(function(){s(c)&&u({inst:c})})},[e]),a(n),n};return ls.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,ls}():ss.exports=(cs||(cs=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,o=n.useEffect,a=n.useLayoutEffect,s=n.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===n.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var f=u();r(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var p=(f=i({inst:{value:d,getSnapshot:u}}))[0].inst,h=f[1];return a(function(){p.value=d,p.getSnapshot=u,e(p)&&h({inst:p})},[t,d,u]),o(function(){return e(p)&&h({inst:p}),t(function(){e(p)&&h({inst:p})})},[t]),s(d),d};ds.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ds)),ss.exports}var ps,hs=fs(),ms={exports:{}},vs={};var ys,gs,bs={};
|
|
24
|
+
/**
|
|
25
|
+
* @license React
|
|
26
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var xs=(gs||(gs=1,"production"===process.env.NODE_ENV?ms.exports=function(){if(ps)return vs;ps=1;var e=t,n=fs(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return vs.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!a){if(a=!0,i=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(i,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,o=n)}var i,o,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=i(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},vs}():ms.exports=(ys||(ys=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n=fs(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;bs.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!a){if(a=!0,i=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(i,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,o=n)}var i,o,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=i(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),bs)),ms.exports);const ws=[];let Es;function Os(e){const t=(t,n)=>{const r=Y(ks).current;let i;try{Es=r;for(const e of ws)e.before(r);i=e(t,n);for(const e of ws)e.after(r);r.didInitialize=!0}finally{Es=void 0}return i};return t.displayName=e.displayName||e.name,t}function Ss(t){return e.forwardRef(Os(t))}function ks(){return{didInitialize:!1}}const Ps=J(19)?function(t,n,r,i,o){const a=Es;if(!a)return function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return hs.useSyncExternalStore(t.subscribe,a,a)}(t,n,r,i,o);const s=a.syncIndex;let l;a.syncIndex+=1,a.didInitialize?(l=a.syncHooks[s],l.store===t&&l.selector===n&&Object.is(l.a1,r)&&Object.is(l.a2,i)&&Object.is(l.a3,o)||(l.store!==t&&(a.didChangeStore=!0),l.store=t,l.selector=n,l.a1=r,l.a2=i,l.a3=o,l.didChange=!0)):(l={store:t,selector:n,a1:r,a2:i,a3:o,value:n(t.getSnapshot(),r,i,o),didChange:!1},a.syncHooks.push(l));return l.value}:function(e,t,n,r,i){return xs.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};function As(e,t,n,r,i){return Ps(e,t,n,r,i)}var js;js={before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);!r.didChange&&Object.is(r.value,i)||(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const t of e.syncHooks)n.add(t.store);const r=[];for(const e of n)r.push(e.subscribe(t));return()=>{for(const e of r)e()}}),hs.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}},ws.push(js);class Ts{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const t=this.updateTick;for(const n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){const e={...this.state};this.setState(e)}use(e,t,n,r){return As(this,e,t,n,r)}}class Ms extends Ts{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(t,n){e.useDebugValue(t),hn(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(e,t){const n=this;hn(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(t){const n=this;if("production"!==process.env.NODE_ENV){e.useDebugValue(t,e=>Object.keys(e));const n=e.useRef(Object.keys(t)).current,r=Object.keys(t);(n.length!==r.length||n.some((e,t)=>e!==r[t]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);hn(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){e.useDebugValue(t);const r=void 0!==n;if(hn(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),"production"!==process.env.NODE_ENV){const e=this.controlledValues??=new Map;e.has(t)||e.set(t,r);const n=e.get(t);void 0!==n&&n!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(t,n,r,i){return e.useDebugValue(t),As(this,this.selectors[t],n,r,i)}useContextCallback(t,n){e.useDebugValue(t);const r=ln(n??te);this.context[t]=r}useStateSetter(t){const n=e.useRef(void 0);return void 0===n.current&&(n.current=e=>{this.set(t,e)}),n.current}observe(e,t){let n;n="function"==typeof e?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{const i=n(e);if(!Object.is(r,i)){const e=r;r=i,t(i,e,this)}})}}const Cs={open:os(e=>e.open),domReferenceElement:os(e=>e.domReferenceElement),referenceElement:os(e=>e.positionReference??e.referenceElement),floatingElement:os(e=>e.floatingElement),floatingId:os(e=>e.floatingId)};class Ns extends Ms{constructor(e){const{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...o}=e;super({...o,positionReference:o.referenceElement,domReferenceElement:o.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ho(),nested:t,noEmit:n,triggerElements:i},Cs)}setOpen=(e,t)=>{if(e&&this.state.open&&!br(t.event)||(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){const n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)}this.context.onOpenChange?.(e,t)}}function Is(t,n,r,i){const o=r.useState("isMountedByTrigger",t),a=function(t,n){const r=e.useRef(null),i=e.useRef(null);return e.useCallback(e=>{if(void 0!==t){if(null!==r.current){const e=r.current,t=i.current,o=n.context.triggerElements.getById(e);t&&o===t&&n.context.triggerElements.delete(e),r.current=null,i.current=null}null!==e&&(r.current=t,i.current=e,n.context.triggerElements.add(t,e))}},[n,t])}(t,r),s=ln(e=>{if(a(e),!e||!r.select("open"))return;const n=r.select("activeTriggerId");n!==t?null==n&&r.update({activeTriggerId:t,activeTriggerElement:e,...i}):r.update({activeTriggerElement:e,...i})});return hn(()=>{o&&r.update({activeTriggerElement:n.current,...i})},[o,r,n,...Object.values(i)]),{registerTrigger:s,isMountedByThisTrigger:o}}function Ds(e){const t=e.useState("open");hn(()=>{if(t&&!e.select("activeTriggerId")&&1===e.context.triggerElements.size){const t=e.context.triggerElements.entries().next();if(!t.done){const[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function _s(t,n,r){const{mounted:i,setMounted:o,transitionStatus:a}=function(t,n=!1,r=!1){const[i,o]=e.useState(t&&n?"idle":void 0),[a,s]=e.useState(t);return t&&!a&&(s(!0),o("starting")),t||!a||"ending"===i||r||o("ending"),t||a||"ending"!==i||o(void 0),hn(()=>{if(!t&&a&&"ending"!==i&&r){const e=Mi.request(()=>{o("ending")});return()=>{Mi.cancel(e)}}},[t,a,i,r]),hn(()=>{if(!t||n)return;const e=Mi.request(()=>{o(void 0)});return()=>{Mi.cancel(e)}},[n,t]),hn(()=>{if(!t||!n)return;t&&a&&"idle"!==i&&o("starting");const e=Mi.request(()=>{o("idle")});return()=>{Mi.cancel(e)}},[n,t,a,o,i]),e.useMemo(()=>({mounted:a,setMounted:s,transitionStatus:i}),[a,i])}(t);n.useSyncedValues({mounted:i,transitionStatus:a});const s=ln(()=>{o(!1),n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),n.context.onOpenChangeComplete?.(!1)});return zi({enabled:!n.useState("preventUnmountingOnClose"),open:t,ref:n.context.popupRef,onComplete(){t||s()}}),{forceUnmount:s,transitionStatus:a}}class Rs{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){const n=this.idMap.get(e);if(n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t),"production"!==process.env.NODE_ENV&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(e){const t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(const t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function Ls(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new Ns({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Rs,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0}),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:re,inactiveTriggerProps:re,popupProps:re}}const zs=os(e=>e.triggerIdProp??e.activeTriggerId),Vs={open:os(e=>e.openProp??e.open),mounted:os(e=>e.mounted),transitionStatus:os(e=>e.transitionStatus),floatingRootContext:os(e=>e.floatingRootContext),preventUnmountingOnClose:os(e=>e.preventUnmountingOnClose),payload:os(e=>e.payload),activeTriggerId:zs,activeTriggerElement:os(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:os((e,t)=>void 0!==t&&zs(e)===t),isOpenedByTrigger:os((e,t)=>void 0!==t&&zs(e)===t&&e.open),isMountedByTrigger:os((e,t)=>void 0!==t&&zs(e)===t&&e.mounted),triggerProps:os((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:os(e=>e.popupProps),popupElement:os(e=>e.popupElement),positionerElement:os(e=>e.positionerElement)};function Bs(t={}){const{nodeId:n,externalTree:r}=t,i=function(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Cn(),o=null!=Xo();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Bt(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const a=Y(()=>new Ns({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Rs,floatingId:i,nested:o,noEmit:!1})).current;return hn(()=>{const e={open:t,floatingId:i};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=Bt(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}(t),o=t.rootContext||i,a={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,l]=e.useState(null),c=e.useRef(null),u=Zo(r);hn(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);const d=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=e.useState(i);Ba(p,i)||h(i);const[m,v]=e.useState(null),[y,g]=e.useState(null),b=e.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),x=e.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),w=a||m,O=s||y,S=e.useRef(null),k=e.useRef(null),P=e.useRef(d),A=null!=c,j=Ua(c),T=Ua(o),M=Ua(u),C=e.useCallback(()=>{if(!S.current||!k.current)return;const e={placement:n,strategy:r,middleware:p};T.current&&(e.platform=T.current),za(S.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==M.current};N.current&&!Ba(P.current,t)&&(P.current=t,E.flushSync(()=>{f(t)}))})},[p,n,r,T,M]);Va(()=>{!1===u&&P.current.isPositioned&&(P.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const N=e.useRef(!1);Va(()=>(N.current=!0,()=>{N.current=!1}),[]),Va(()=>{if(w&&(S.current=w),O&&(k.current=O),w&&O){if(j.current)return j.current(w,O,C);C()}},[w,O,C,j,A]);const I=e.useMemo(()=>({reference:S,floating:k,setReference:b,setFloating:x}),[b,x]),D=e.useMemo(()=>({reference:w,floating:O}),[w,O]),_=e.useMemo(()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=$a(D.floating,d.x),n=$a(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Fa(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,d.x,d.y]);return e.useMemo(()=>({...d,update:C,refs:I,elements:D,floatingStyles:_}),[d,C,I,D,_])}({...t,elements:{...a,...s&&{reference:s}}}),f=e.useCallback(e=>{const t=Bt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),d.refs.setReference(t)},[d.refs]),[p,h]=e.useState(null),[m,v]=e.useState(null);o.useSyncedValue("referenceElement",p),o.useSyncedValue("domReferenceElement",Bt(p)?p:null),o.useSyncedValue("floatingElement",m);const y=e.useCallback(e=>{(Bt(e)||null===e)&&(c.current=e,h(e)),(Bt(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!Bt(e))&&d.refs.setReference(e)},[d.refs,h]),g=e.useCallback(e=>{v(e),d.refs.setFloating(e)},[d.refs]),b=e.useMemo(()=>({...d.refs,setReference:y,setFloating:g,setPositionReference:f,domReference:c}),[d.refs,y,g,f]),x=e.useMemo(()=>({...d.elements,domReference:a.domReference}),[d.elements,a.domReference]),w=o.useState("open"),O=o.useState("floatingId"),S=e.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:O,refs:b,elements:x,nodeId:n,rootStore:o}),[d,b,x,n,o,w,O]);return hn(()=>{o.context.dataRef.current.floatingContext=S;const e=u?.nodesRef.current.find(e=>e.id===n);e&&(e.context=S)}),e.useMemo(()=>({...d,context:S,refs:b,elements:x,rootStore:o}),[d,b,x,S,o])}function Fs(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Cn(),a=null!=Xo(),s=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=Y(()=>new Ns({open:s,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return hn(()=>{const e={open:s,floatingId:o,referenceElement:l,floatingElement:c};Bt(l)&&(e.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(e.positionReference=l),d.update(e)},[s,o,l,c,d]),d.context.onOpenChange=i,d.context.nested=a,d.context.noEmit=n,d}const $s=Gn&&Yn;function Us(t,n={}){const r="rootStore"in t?t.rootStore:t,{events:i,dataRef:o}=r.context,{enabled:a=!0,delay:s}=n,l=e.useRef(!1),c=e.useRef(null),u=zn(),d=e.useRef(!0);e.useEffect(()=>{const e=r.select("domReferenceElement");if(!a)return;const t=Lt(e);function n(){const e=r.select("domReferenceElement");!r.select("open")&&Ft(e)&&e===or(Bn(e))&&(l.current=!0)}function i(){d.current=!0}function o(){d.current=!1}return t.addEventListener("blur",n),$s&&(t.addEventListener("keydown",i,!0),t.addEventListener("pointerdown",o,!0)),()=>{t.removeEventListener("blur",n),$s&&(t.removeEventListener("keydown",i,!0),t.removeEventListener("pointerdown",o,!0))}},[r,a]),e.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){if(e.reason===Fi||e.reason===Yi){const e=r.select("domReferenceElement");Bt(e)&&(c.current=e,l.current=!0)}}},[i,a,r]);const f=e.useMemo(()=>({onMouseLeave(){l.current=!1,c.current=null},onFocus(e){const t=e.currentTarget;if(l.current){if(c.current===t)return;l.current=!1,c.current=null}const n=lr(e.nativeEvent);if(Bt(n))if($s&&!e.relatedTarget){if(!d.current&&!ur(n))return}else if(!function(e){if(!e||Xn)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(n))return;const i=sr(e.relatedTarget,r.context.triggerElements),{nativeEvent:o,currentTarget:a}=e,f="function"==typeof s?s():s;r.select("open")&&i||0===f||void 0===f?r.setOpen(!0,Zi(Ui,o,a)):u.start(f,()=>{l.current||r.setOpen(!0,Zi(Ui,o,a))})},onBlur(e){l.current=!1,c.current=null;const t=e.relatedTarget,n=e.nativeEvent,i=Bt(t)&&t.hasAttribute(Ao("focus-guard"))&&"outside"===t.getAttribute("data-type");u.start(0,()=>{const e=r.select("domReferenceElement"),a=or(e?e.ownerDocument:document);if(!t&&a===e)return;if(ar(o.current.floatingContext?.refs.floating.current,a)||ar(e,a)||i)return;sr(t??a,r.context.triggerElements)||r.setOpen(!1,Zi(Ui,n))})}}),[o,r,u,s]);return e.useMemo(()=>a?{reference:f,trigger:f}:{},[a,f])}const Ws=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${er}`;class Ks{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ln,this.restTimeout=new Ln,this.handleCloseOptions=void 0}static create(){return new Ks}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function Hs(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function Ys(e){const t=Y(Ks.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Rn(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function qs(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),a=r.useState("domReferenceElement"),{dataRef:s}=r.context,{enabled:l=!0,closeDelay:c=0}=n,u=Ys(r),d=Zo(),f=Xo(),p=ln(()=>wo(s.current.openEvent?.type,u.interactedInside)),h=ln(()=>{const e=s.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=ln(e=>sr(e,r.context.triggerElements)),v=e.useCallback(e=>{const t=bo(c,"close",u.pointerType),n=()=>{r.setOpen(!1,Zi($i,e)),d?.events.emit("floating.closed",e)};t?u.openChangeTimeout.start(t,n):(u.openChangeTimeout.clear(),n())},[c,r,u,d]),y=ln(()=>{Hs(u)}),g=ln(e=>{const t=lr(e);var n;(n=t)&&Boolean(n.closest(Ws))?u.interactedInside=null!=t?.closest("[aria-haspopup]"):u.interactedInside=!1});hn(()=>{i||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,y())},[i,u,y]),e.useEffect(()=>y,[y]),hn(()=>{if(l&&i&&u.handleCloseOptions?.blockPointerEvents&&h()&&Bt(a)&&o){const e=a,t=o,n=Bn(o),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;r&&(r.style.pointerEvents="");const i=u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??r??e.closest("[data-rootownerid]")??n.body;return function(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t;Hs(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}(u,{scopeElement:i,referenceElement:e,floatingElement:t}),()=>{y()}}},[l,i,a,o,u,h,d,f,y]);const b=zn();e.useEffect(()=>{if(!l)return;function e(){u.openChangeTimeout.clear(),b.clear(),d?.events.off("floating.closed",n),y()}function t(e){d&&f&&pr(d.nodesRef.current,f).length>0?d.events.on("floating.closed",n):m(e.relatedTarget)||(u.handler?u.handler(e):(y(),p()||v(e)))}function n(e){!d||!f||pr(d.nodesRef.current,f).length>0||b.start(0,()=>{d.events.off("floating.closed",n),r.setOpen(!1,Zi($i,e)),d.events.emit("floating.closed",e)})}const i=o;return i&&(i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",t),i.addEventListener("pointerdown",g,!0)),()=>{i&&(i.removeEventListener("mouseenter",e),i.removeEventListener("mouseleave",t),i.removeEventListener("pointerdown",g,!0)),d?.events.off("floating.closed",n)}},[l,o,r,s,p,m,v,y,g,u,d,f,b])}const Gs={current:null};function Xs(t,n={}){const r="rootStore"in t?t.rootStore:t,{dataRef:i,events:o}=r.context,{enabled:a=!0,delay:s=0,handleClose:l=null,mouseOnly:c=!1,restMs:u=0,move:d=!0,triggerElementRef:f=Gs,externalTree:p,isActiveTrigger:h=!0,getHandleCloseContext:m}=n,v=Zo(p),y=Ys(r),g=Oo(l),b=Oo(s),x=Oo(u),w=Oo(a);h&&(y.handleCloseOptions=g.current?.__options);const O=ln(()=>wo(i.current.openEvent?.type,y.interactedInside)),S=ln(e=>sr(e,r.context.triggerElements)),k=ln((e,t,n)=>{const i=r.context.triggerElements;if(i.hasElement(t))return!e||!ar(e,t);if(!Bt(n))return!1;const o=n;return i.hasMatchingElement(e=>ar(e,o))&&(!e||!ar(e,o))}),P=e.useCallback((e,t=!0)=>{const n=bo(b.current,"close",y.pointerType);n?y.openChangeTimeout.start(n,()=>{r.setOpen(!1,Zi($i,e)),v?.events.emit("floating.closed",e)}):t&&(y.openChangeTimeout.clear(),r.setOpen(!1,Zi($i,e)),v?.events.emit("floating.closed",e))},[b,r,y,v]),A=ln(()=>{if(!y.handler)return;Bn(r.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0});e.useEffect(()=>A,[A]);const j=ln(()=>{Hs(y)});return e.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open||(A(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}},[a,o,y,A]),e.useEffect(()=>{if(!a)return;const e=f.current??(h?r.select("domReferenceElement"):null);if(Bt(e))return d&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),()=>{d&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",n)};function t(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,c&&!gr(y.pointerType))return;if(xo(x.current)>0&&!bo(b.current,"open"))return;const t=bo(b.current,"open",y.pointerType),n=e.currentTarget??null,i=r.select("domReferenceElement"),o=null!=n&&k(i,n,e.target),a=r.select("open"),s=!a||o;o&&a?r.setOpen(!0,Zi($i,e,n)):t?y.openChangeTimeout.start(t,()=>{s&&r.setOpen(!0,Zi($i,e,n))}):s&&r.setOpen(!0,Zi($i,e,n))}function n(e){if(O())return void j();A();const t=Bn(r.select("domReferenceElement"));y.restTimeout.clear(),y.restTimeoutPending=!1;const n=i.current.floatingContext??m?.();if(S(e.relatedTarget))return;if(g.current&&n){r.select("open")||y.openChangeTimeout.clear();const i=f.current;return y.handler=g.current({...n,tree:v,x:e.clientX,y:e.clientY,onClose(){j(),A(),w.current&&!O()&&i===r.select("domReferenceElement")&&P(e,!0)}}),t.addEventListener("mousemove",y.handler),void y.handler(e)}("touch"!==y.pointerType||!ar(r.select("floatingElement"),e.relatedTarget))&&P(e)}},[A,j,i,b,P,r,a,g,y,h,k,O,S,c,d,x,f,v,w,m]),e.useMemo(()=>{if(a)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,n=e.currentTarget,i=r.select("domReferenceElement"),o=r.select("open"),a=k(i,n,e.target);if(c&&!gr(y.pointerType))return;const s=xo(x.current);function l(){if(y.restTimeoutPending=!1,O())return;const e=r.select("open");y.blockMouseMove||e&&!a||r.setOpen(!0,Zi($i,t,n))}o&&!a||0===s||!a&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(y.restTimeout.clear(),"touch"===y.pointerType?E.flushSync(()=>{l()}):a&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(s,l)))}};function e(e){y.pointerType=e.pointerType}},[a,y,O,k,c,r,x])}function Zs(t=[]){const n=t.map(e=>e?.reference),r=t.map(e=>e?.floating),i=t.map(e=>e?.item),o=t.map(e=>e?.trigger),a=e.useCallback(e=>Js(e,t,"reference"),n),s=e.useCallback(e=>Js(e,t,"floating"),r),l=e.useCallback(e=>Js(e,t,"item"),i),c=e.useCallback(e=>Js(e,t,"trigger"),o);return e.useMemo(()=>({getReferenceProps:a,getFloatingProps:s,getItemProps:l,getTriggerProps:c}),[a,s,l,c])}function Js(e,t,n){const r=new Map,i="item"===n,o={};"floating"===n&&(o.tabIndex=-1,o[Zn]="");for(const t in e)i&&e&&(t===Jn||t===Qn)||(o[t]=e[t]);for(let a=0;a<t.length;a+=1){let s;const l=t[a]?.[n];s="function"==typeof l?e?l(e):null:l,s&&Qs(o,s,i,r)}return Qs(o,e,i,r),o}function Qs(e,t,n,r){for(const i in t){const o=t[i];(!n||i!==Jn&&i!==Qn)&&(i.startsWith("on")?(r.has(i)||r.set(i,[]),"function"==typeof o&&(r.get(i)?.push(o),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>void 0!==e))):e[i]=o)}}function el(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function tl(e,t){return el(t,e===rr||e===ir,e===tr||e===nr)}function nl(e,t,n){return el(t,e===ir,n?e===tr:e===nr)||"Enter"===e||" "===e||""===e}function rl(t,n){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),a=r.useState("domReferenceElement"),s=r.context.dataRef,{listRef:l,activeIndex:c,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:h=!1,nested:m=!1,rtl:v=!1,virtual:y=!1,focusItemOnOpen:g="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:x=!0,disabledIndices:w,orientation:E="vertical",parentOrientation:O,cols:S=1,id:k,resetOnPointerLeave:P=!0,externalTree:A}=n;"production"!==process.env.NODE_ENV&&(p&&(h||console.warn("`useListNavigation` looping must be enabled to allow escaping."),y||console.warn("`useListNavigation` must be virtual to allow escaping.")),"vertical"===E&&S>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const j=Oo(fr(o)),T=Xo(),M=Zo(A);hn(()=>{s.current.orientation=E},[s,E]);const C=dr(a),N=e.useRef(g),I=e.useRef(f??-1),D=e.useRef(null),_=e.useRef(!0),R=ln(e=>{u(-1===I.current?null:I.current,e)}),L=e.useRef(R),z=e.useRef(!!o),V=e.useRef(i),B=e.useRef(!1),F=e.useRef(!1),$=Oo(w),U=Oo(i),W=Oo(f),K=Oo(P),H=ln(()=>{function e(e){y?M?.events.emit("virtualfocus",e):To(e,{sync:B.current,preventScroll:!0})}const t=l.current[I.current],n=F.current;t&&e(t);(B.current?e=>e():requestAnimationFrame)(()=>{const r=l.current[I.current]||t;if(!r)return;t||e(r);q&&(n||!_.current)&&r.scrollIntoView?.({block:"nearest",inline:"nearest"})})});hn(()=>{d&&(i&&o?(I.current=f??-1,N.current&&null!=f&&(F.current=!0,R())):z.current&&(I.current=-1,L.current()))},[d,i,o,f,R]),hn(()=>{if(d)if(i){if(o)if(null==c){if(B.current=!1,null!=W.current)return;if(z.current&&(I.current=-1,H()),(!V.current||!z.current)&&N.current&&(null!=D.current||!0===N.current&&null==D.current)){let e=0;const t=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e+=1}else I.current=null==D.current||nl(D.current,E,v)||m?Hr(l):Yr(l),D.current=null,R()};t()}}else Kr(l,c)||(I.current=c,H(),F.current=!1)}else B.current=!1},[d,i,o,c,W,m,l,E,v,R,H,$]),hn(()=>{if(!d||o||!M||y||!z.current)return;const e=M.nodesRef.current,t=e.find(e=>e.id===T)?.context?.elements.floating,n=or(Bn(o)),r=e.some(e=>e.context&&ar(e.context.elements.floating,n));t&&!r&&_.current&&t.focus({preventScroll:!0})},[d,o,M,T,y]),hn(()=>{L.current=R,V.current=i,z.current=!!o}),hn(()=>{i||(D.current=null,N.current=g)},[i,g]);const Y=null!=c,q=e.useMemo(()=>{function e(e){if(!U.current)return;const t=l.current.indexOf(e.currentTarget);-1!==t&&I.current!==t&&(I.current=t,R(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,F.current=!1,b&&e(t)},onPointerLeave(e){if(!U.current||!_.current||"touch"===e.pointerType)return;B.current=!0;const t=e.relatedTarget;if(b&&!l.current.includes(t)&&K.current&&(To(null,{sync:!0}),I.current=-1,R(e),!y)){const e=j.current,t=or(Bn(e));e&&ar(e,t)&&e.focus({preventScroll:!0})}}}},[U,j,b,l,R,K,y]),G=e.useCallback(()=>O??M?.nodesRef.current.find(e=>e.id===T)?.context?.dataRef?.current.orientation,[T,M,O]),X=ln(e=>{if(_.current=!1,B.current=!0,229===e.which)return;if(!U.current&&e.currentTarget===j.current)return;if(m&&function(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:el(t,n?e===nr:e===tr,e===rr)}(e.key,E,v,S))return tl(e.key,G())||mr(e),r.setOpen(!1,Zi(qi,e.nativeEvent)),void(Ft(a)&&(y?M?.events.emit("virtualfocus",a):a.focus()));const t=I.current,n=Hr(l,w),o=Yr(l,w);if(C||("Home"===e.key&&(mr(e),I.current=n,R(e)),"End"===e.key&&(mr(e),I.current=o,R(e))),S>1){const t=Array.from({length:l.current.length},()=>({width:1,height:1})),r=function(e,t){const n=[];let r=0;return e.forEach(({width:e,height:i},o)=>{if(e>t&&"production"!==process.env.NODE_ENV)throw new Error(`[Floating UI]: Invalid grid - item width at index ${o} is greater than grid columns`);let a=!1;for(;!a;){const s=[];for(let n=0;n<e;n+=1)for(let e=0;e<i;e+=1)s.push(r+n+e*t);r%t+e<=t&&s.every(e=>null==n[e])?(s.forEach(e=>{n[e]=o}),a=!0):r+=1}}),[...n]}(t,S),i=r.findIndex(e=>null!=e&&!Zr(l,e,w)),a=r.reduce((e,t,n)=>null==t||Zr(l,t,w)?e:n,-1),s=r[function(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}){let d,f=c;if(t.key===rr?d="up":t.key===ir&&(d="down"),d){const n=[],i=[];let p=!1,h=0;{let t=null,r=-1;e.current.forEach((e,o)=>{if(null==e)return;h+=1;const a=e.closest('[role="row"]');a&&(p=!0),a===t&&-1!==r||(t=a,r+=1,n[r]=[]),n[r].push(o),i[o]=r})}let m=!1,v=0;if(p)for(const e of n){const t=e.length;t>v&&(v=t),t!==o&&(m=!0)}const y=m&&h<e.current.length,g=v||o,b=t=>{if(!m||-1===c)return;const o=i[c];if(null==o)return;const s=n[o].indexOf(c),l="up"===t?-1:1;for(let t=o+l,i=0;i<n.length;i+=1,t+=l){if(t<0||t>=n.length){if(!r||y)return;t=t<0?n.length-1:0}const i=n[t];for(let t=Math.min(s,i.length-1);t>=0;t-=1){const n=i[t];if(!Zr(e,n,a))return n}}},x=t=>{if(!y||-1===c)return;const n=c%g,i="up"===t?-g:g,o=l-l%g,s=Sr(l/g)+1;for(let t=c-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?o:0}const i=Math.min(t+g-1,l);for(let r=Math.min(t+n,i);r>=t;r-=1)if(!Zr(e,r,a))return r}};u&&mr(t);const w=b(d)??x(d);if(void 0!==w)f=w;else if(-1===c)f="up"===d?l:s;else if(f=qr(e,{startingIndex:c,amount:g,decrement:"up"===d,disabledIndices:a}),r){if("up"===d&&(c-g<s||f<0)){const e=c%g,t=l%g,n=l-(t-e);f=t===e?l:t>e?n:n-g}"down"===d&&c+g>l&&(f=qr(e,{startingIndex:c%g-g,amount:g,disabledIndices:a}))}Kr(e,f)&&(f=c)}if("both"===n){const n=Sr(c/o);t.key===(i?tr:nr)&&(u&&mr(t),c%o!==o-1?(f=qr(e,{startingIndex:c,disabledIndices:a}),r&&Wr(f,o,n)&&(f=qr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):r&&(f=qr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Wr(f,o,n)&&(f=c)),t.key===(i?nr:tr)&&(u&&mr(t),c%o!==0?(f=qr(e,{startingIndex:c,decrement:!0,disabledIndices:a}),r&&Wr(f,o,n)&&(f=qr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):r&&(f=qr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Wr(f,o,n)&&(f=c));const s=Sr(l/o)===n;Kr(e,f)&&(f=r&&s?t.key===(i?nr:tr)?l:qr(e,{startingIndex:c-c%o-1,disabledIndices:a}):c)}return f}({current:r.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:E,loopFocus:h,rtl:v,cols:S,disabledIndices:Xr([...("function"!=typeof w?w:null)||l.current.map((e,t)=>Zr(l,t,w)?t:void 0),void 0],r),minIndex:i,maxIndex:a,prevIndex:Gr(I.current>o?n:I.current,t,r,S,e.key===ir?"bl":e.key===(v?tr:nr)?"tr":"tl"),stopEvent:!0})];if(null!=s&&(I.current=s,R(e)),"both"===E)return}if(tl(e.key,E)){if(mr(e),i&&!y&&or(e.currentTarget.ownerDocument)===e.currentTarget)return I.current=nl(e.key,E,v)?n:o,void R(e);nl(e.key,E,v)?h?t>=o?p&&t!==l.current.length?I.current=-1:(B.current=!1,I.current=n):I.current=qr(l,{startingIndex:t,disabledIndices:w}):I.current=Math.min(o,qr(l,{startingIndex:t,disabledIndices:w})):h?t<=n?p&&-1!==t?I.current=l.current.length:(B.current=!1,I.current=o):I.current=qr(l,{startingIndex:t,decrement:!0,disabledIndices:w}):I.current=Math.max(n,qr(l,{startingIndex:t,decrement:!0,disabledIndices:w})),Kr(l,I.current)&&(I.current=-1),R(e)}}),Z=e.useMemo(()=>y&&i&&Y&&{"aria-activedescendant":`${k}-${c}`},[y,i,Y,k,c]),J=e.useMemo(()=>({"aria-orientation":"both"===E?void 0:E,...C?{}:Z,onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&i&&!y){const t=lr(e.nativeEvent);if(t&&!ar(j.current,t))return;return mr(e),r.setOpen(!1,Zi(Hi,e.nativeEvent)),void(Ft(a)&&a.focus())}X(e)},onPointerMove(){_.current=!0}}),[Z,X,j,E,C,r,i,y,a]),Q=e.useMemo(()=>{function e(e){"auto"===g&&vr(e.nativeEvent)&&(N.current=!y)}function t(e){N.current=g,"auto"===g&&yr(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(e){const t=r.select("open");_.current=!1;const n=e.key.startsWith("Arrow"),i=function(e,t,n){return el(t,n?e===tr:e===nr,e===ir)}(e.key,G(),v),o=tl(e.key,E),a=(m?i:o)||"Enter"===e.key||""===e.key.trim();if(y&&t)return X(e);if(t||x||!n){if(a){const t=tl(e.key,G());D.current=m&&t?null:e.key}m?i&&(mr(e),t?(I.current=Hr(l,$.current),R(e)):r.setOpen(!0,Zi(qi,e.nativeEvent,e.currentTarget))):o&&(null!=W.current&&(I.current=W.current),mr(e),!t&&x?r.setOpen(!0,Zi(qi,e.nativeEvent,e.currentTarget)):X(e),t&&R(e))}},onFocus(e){r.select("open")&&!y&&(I.current=-1,R(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[X,$,g,l,m,R,r,x,E,G,v,W,y]),ee=e.useMemo(()=>({...Z,...Q}),[Z,Q]);return e.useMemo(()=>d?{reference:ee,floating:J,item:q,trigger:Q}:{},[d,ee,J,Q,q])}const il=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ol(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingId"),a=r.useState("domReferenceElement"),s=r.useState("floatingElement"),{role:l="dialog"}=n,c=Cn(),u=a?.id||c,d=e.useMemo(()=>fr(s)?.id||o,[s,o]),f=il.get(l)??l,p=null!=Xo(),h=e.useMemo(()=>"tooltip"===f||"label"===l?re:{"aria-haspopup":"alertdialog"===f?"dialog":f,"aria-expanded":"false",..."listbox"===f&&{role:"combobox"},..."menu"===f&&p&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},[f,p,l]),m=e.useMemo(()=>{if("tooltip"===f||"label"===l)return{["aria-"+("label"===l?"labelledby":"describedby")]:i?d:void 0};return{...h,"aria-expanded":i?"true":"false","aria-controls":i?d:void 0,..."menu"===f&&{id:u}}},[f,d,i,u,l,h]),v=e.useMemo(()=>{const e={id:d,...f&&{role:f}};return"tooltip"===f||"label"===l?e:{...e,..."menu"===f&&{"aria-labelledby":u}}},[f,d,u,l]),y=e.useCallback(({active:e,selected:t})=>{const n={role:"option",...e&&{id:`${d}-fui-option`}};switch(l){case"select":case"combobox":return{...n,"aria-selected":t}}return{}},[d,l]);return e.useMemo(()=>({reference:m,floating:v,item:y,trigger:h}),[m,v,h,y])}const al=.1*.1,sl=.5;function ll(e,t,n,r,i,o){return r>=t!=o>=t&&e<=(i-n)*(t-r)/(o-r)+n}function cl(e,t,n,r,i,o,a,s,l,c){let u=!1;return ll(e,t,n,r,i,o)&&(u=!u),ll(e,t,i,o,a,s)&&(u=!u),ll(e,t,a,s,l,c)&&(u=!u),ll(e,t,l,c,n,r)&&(u=!u),u}function ul(e,t,n,r,i,o){const a=Math.min(n,i),s=Math.max(n,i),l=Math.min(r,o),c=Math.max(r,o);return e>=a&&e<=s&&t>=l&&t<=c}function dl(e={}){const{blockPointerEvents:t=!1}=e,n=new Ln,r=({x:e,y:t,placement:r,elements:i,onClose:o,nodeId:a,tree:s})=>{const l=r?.split("-")[0];let c=!1,u=null,d=null,f="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const p=i.domReference,h=i.floating;if(!p||!h||null==l||null==e||null==t)return;const{clientX:m,clientY:v}=r,y=lr(r),g="mouseleave"===r.type,b=ar(h,y),x=ar(p,y);if(b&&(c=!0,!g))return;if(x&&(c=!1,!g))return void(c=!0);if(g&&Bt(r.relatedTarget)&&ar(h,r.relatedTarget))return;function w(){return Boolean(s&&pr(s.nodesRef.current,a).length>0)}function E(){w()||(n.clear(),o())}if(w())return;const O=p.getBoundingClientRect(),S=h.getBoundingClientRect(),k=e>S.right-S.width/2,P=t>S.bottom-S.height/2,A=S.width>O.width,j=S.height>O.height,T=(A?O:S).left,M=(A?O:S).right,C=(j?O:S).top,N=(j?O:S).bottom;if("top"===l&&t>=O.bottom-1||"bottom"===l&&t<=O.top+1||"left"===l&&e>=O.right-1||"right"===l&&e<=O.left+1)return void E();let I=!1;switch(l){case"top":I=ul(m,v,T,O.top+1,M,S.bottom-1);break;case"bottom":I=ul(m,v,T,S.top+1,M,O.bottom-1);break;case"left":I=ul(m,v,S.right-1,N,O.left+1,C);break;case"right":I=ul(m,v,O.right-1,N,S.left+1,C)}if(I)return;if(c&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(m,v,O))return void E();if(!g&&function(e,t){const n=performance.now(),r=n-f;if(null===u||null===d||0===r)return u=e,d=t,f=n,!1;const i=e-u,o=t-d;return u=e,d=t,f=n,i*i+o*o<r*r*al}(m,v))return void E();let D=!1;switch(l){case"top":{const n=A?.25:2,r=A||k?e+n:e-n,i=A?e-n:k?e+n:e-n,o=t+sl+1,a=k||A?S.bottom-sl:S.top,s=k?A?S.bottom-sl:S.top:S.bottom-sl;D=cl(m,v,r,o,i,o,S.left,a,S.right,s);break}case"bottom":{const n=A?.25:2,r=A||k?e+n:e-n,i=A?e-n:k?e+n:e-n,o=t-sl,a=k||A?S.top+sl:S.bottom,s=k?A?S.top+sl:S.bottom:S.top+sl;D=cl(m,v,r,o,i,o,S.left,a,S.right,s);break}case"left":{const n=j?.25:2,r=j||P?t+n:t-n,i=j?t-n:P?t+n:t-n,o=e+sl+1,a=P||j?S.right-sl:S.left,s=P?j?S.right-sl:S.left:S.right-sl;D=cl(m,v,a,S.top,s,S.bottom,o,r,o,i);break}case"right":{const n=j?.25:2,r=j||P?t+n:t-n,i=j?t-n:P?t+n:t-n,o=e-sl,a=P||j?S.left+sl:S.right,s=P?j?S.left+sl:S.right:S.left+sl;D=cl(m,v,o,r,o,i,a,S.top,s,S.bottom);break}}D?c||n.start(40,E):E()}};return r.__options={blockPointerEvents:t},r}let fl=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),pl=function(e){return e[e.open=io.open]="open",e[e.closed=io.closed]="closed",e[e.startingStyle=io.startingStyle]="startingStyle",e[e.endingStyle=io.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const hl=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(hl.displayName="DialogPortalContext");const ml="ArrowUp",vl="ArrowDown",yl="ArrowLeft",gl="ArrowRight",bl="Home",xl=new Set([yl,gl]),wl=new Set([ml,vl]),El=new Set([...xl,...wl]);new Set([...El,bl,"End"]);const Ol=new Set([ml,vl,yl,gl,bl,"End"]),Sl={...ho,...Ri,nestedDialogOpen:e=>e?{[pl.nestedDialogOpen]:""}:null},kl=e.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:o,render:a,...s}=t,{store:l}=ro(),c=l.useState("descriptionElementId"),u=l.useState("disablePointerDismissal"),d=l.useState("floatingRootContext"),f=l.useState("popupProps"),p=l.useState("modal"),h=l.useState("mounted"),m=l.useState("nested"),v=l.useState("nestedOpenDialogCount"),y=l.useState("open"),g=l.useState("openMethod"),b=l.useState("titleElementId"),x=l.useState("transitionStatus"),w=l.useState("role");!function(){const t=e.useContext(hl);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Dialog.Portal> is missing.":K(26))}(),zi({open:y,ref:l.context.popupRef,onComplete(){y&&l.context.onOpenChangeComplete?.(!0)}});const E=void 0===o?function(e){return"touch"!==e||l.context.popupRef.current}:o,O=le("div",t,{state:{open:y,nested:m,transitionStatus:x,nestedDialogOpen:v>0},props:[f,{"aria-labelledby":b??void 0,"aria-describedby":c??void 0,role:w,tabIndex:-1,hidden:!h,onKeyDown(e){Ol.has(e.key)&&e.stopPropagation()},style:{[fl.nestedDialogs]:v}},s],ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:Sl});return N.jsx(oa,{context:d,openInteractionType:g,disabled:!h,closeOnFocusOut:!u,initialFocus:E,returnFocus:i,modal:!1!==p,restoreFocus:"popup",children:O})});function Pl(e){return J(19)?e:e?"true":void 0}"production"!==process.env.NODE_ENV&&(kl.displayName="DialogPopup");const Al=e.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const e=n?.getBoundingClientRect();i=`polygon(\n 0% 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%,\n 0% 0%,\n ${e.left}px ${e.top}px,\n ${e.left}px ${e.bottom}px,\n ${e.right}px ${e.bottom}px,\n ${e.right}px ${e.top}px,\n ${e.left}px ${e.top}px\n )`}return N.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});"production"!==process.env.NODE_ENV&&(Al.displayName="InternalBackdrop");const jl=e.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=ro(),o=i.useState("mounted"),a=i.useState("modal"),s=i.useState("open");return o||n?N.jsx(hl.Provider,{value:n,children:N.jsxs(Ko,{ref:t,...r,children:[o&&!0===a&&N.jsx(Al,{ref:i.context.internalBackdropRef,inert:Pl(!s)}),e.children]})}):null});function Tl(t){const n=e.useRef(!0);n.current&&(n.current=!1,t())}"production"!==process.env.NODE_ENV&&(jl.displayName="DialogPortal");let Ml={},Cl={},Nl="";function Il(e){const t=Bn(e),n=t.documentElement,r=t.body,i=Lt(n);let o=0,a=0,s=!1;const l=Mi.create();if(Kn&&1!==(i.visualViewport?.scale??1))return()=>{};function c(){const t=i.getComputedStyle(n),l=i.getComputedStyle(r),c=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,Ml={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Nl=n.style.scrollBehavior,Cl={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===l.overflowY,p="scroll"===t.overflowX||"scroll"===l.overflowX,h=Math.max(0,i.innerWidth-r.clientWidth),m=Math.max(0,i.innerHeight-r.clientHeight),v=parseFloat(l.marginTop)+parseFloat(l.marginBottom),y=parseFloat(l.marginLeft)+parseFloat(l.marginRight),g=Ut(n)?n:r;if(s=function(e){if("undefined"==typeof CSS||!CSS.supports||!CSS.supports("scrollbar-gutter","stable")||"undefined"==typeof document)return!1;const t=Bn(e),n=t.documentElement,r=t.body,i=Ut(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const s=i.offsetWidth;i.style.overflowY="hidden";const l=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,s===l}(e),s)return n.style.scrollbarGutter=c,g.style.overflowY="hidden",void(g.style.overflowX="hidden");Object.assign(n.style,{scrollbarGutter:c,overflowY:"hidden",overflowX:"hidden"}),(u||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:v||m?`calc(100dvh - ${v+m}px)`:"100dvh",width:y||h?`calc(100vw - ${y+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,Ml),Object.assign(r.style,Cl),s||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Nl)}function d(){u(),l.request(c)}return c(),i.addEventListener("resize",d),()=>{l.cancel(),u(),"function"==typeof i.removeEventListener&&i.removeEventListener("resize",d)}}const Dl=new class{lockCount=0;restore=null;timeoutLock=Ln.create();timeoutUnlock=Ln.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(0===this.lockCount||null!==this.restore)return;const t=Bn(e).documentElement,n=Lt(t).getComputedStyle(t).overflowY;if("hidden"===n||"clip"===n)return void(this.restore=te);const r=Hn||!function(e){if("undefined"==typeof document)return!1;const t=Bn(e);return Lt(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=r?function(e){const t=Bn(e),n=t.documentElement,r=t.body,i=Ut(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}(e):Il(e)}};function _l(e=!0,t=null){hn(()=>{if(e)return Dl.acquire(t)},[e,t])}function Rl(t){const[n,r]=e.useState(null),i=ln((e,n)=>{t||r(n||(Hn?"touch":""))});!function(t,n){const r=e.useRef(t),i=ln(n);hn(()=>{r.current!==t&&i(r.current)},[t,i]),hn(()=>{r.current=t},[t])}(t,e=>{e&&!t&&r(null)});const{onClick:o,onPointerDown:a}=function(t){const n=e.useRef(""),r=e.useCallback(e=>{e.defaultPrevented||(n.current=e.pointerType,t(e,e.pointerType))},[t]);return{onClick:e.useCallback(e=>{0!==e.detail?(t(e,"pointerType"in e?e.pointerType:n.current),n.current=""):t(e,"keyboard")},[t]),onPointerDown:r}}(i);return e.useMemo(()=>({openMethod:n,triggerProps:{onClick:o,onPointerDown:a}}),[n,o,a])}const Ll={...Vs,modal:os(e=>e.modal),nested:os(e=>e.nested),nestedOpenDialogCount:os(e=>e.nestedOpenDialogCount),disablePointerDismissal:os(e=>e.disablePointerDismissal),openMethod:os(e=>e.openMethod),descriptionElementId:os(e=>e.descriptionElementId),titleElementId:os(e=>e.titleElementId),viewportElement:os(e=>e.viewportElement),role:os(e=>e.role)};class zl extends Ms{constructor(t){super(function(e={}){return{...Ls(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}(t),{popupRef:e.createRef(),backdropRef:e.createRef(),internalBackdropRef:e.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Rs,onOpenChange:void 0,onOpenChangeComplete:void 0},Ll)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;const n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",n);const r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}}function Vl(t){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:o,onOpenChangeComplete:a,disablePointerDismissal:s=!1,modal:l=!0,actionsRef:c,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=ro(!0),h=Boolean(p),m=Y(()=>u?.store??new zl({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,modal:l,disablePointerDismissal:s,nested:h})).current;Tl(()=>{void 0===r&&!1===m.state.open&&!0===i&&m.update({open:!0,activeTriggerId:f})}),m.useControlledProp("openProp",r),m.useControlledProp("triggerIdProp",d),m.useSyncedValues({disablePointerDismissal:s,nested:h,modal:l}),m.useContextCallback("onOpenChange",o),m.useContextCallback("onOpenChangeComplete",a);const v=m.useState("payload");!function(t){const{store:n,parentContext:r,actionsRef:i}=t,o=n.useState("open"),a=n.useState("disablePointerDismissal"),s=n.useState("modal"),l=n.useState("popupElement"),{openMethod:c,triggerProps:u}=Rl(o);Ds(n);const{forceUnmount:d}=_s(o,n),f=ln(e=>{const t=Zi(e);return t.preventUnmountOnClose=()=>{n.set("preventUnmountingOnClose",!0)},t}),p=e.useCallback(()=>{n.setOpen(!1,f(Xi))},[n,f]);e.useImperativeHandle(i,()=>({unmount:d,close:p}),[d,p]);const h=Fs({popupStore:n,onOpenChange:n.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,v]=e.useState(0),y=0===m,g=ol(h),b=ca(h,{outsidePressEvent:()=>n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(e){if(!n.context.outsidePressEnabledRef.current)return!1;if("button"in e&&0!==e.button)return!1;if("touches"in e&&1!==e.touches.length)return!1;const t=lr(e);if(y&&!a){const e=t;return!s||!n.context.internalBackdropRef.current&&!n.context.backdropRef.current||n.context.internalBackdropRef.current===e||n.context.backdropRef.current===e||ar(e,l)&&!e?.hasAttribute("data-base-ui-portal")}return!1},escapeKey:y});_l(o&&!0===s,l);const{getReferenceProps:x,getFloatingProps:w,getTriggerProps:E}=Zs([g,b]);n.useContextCallback("onNestedDialogOpen",e=>{v(e+1)}),n.useContextCallback("onNestedDialogClose",()=>{v(0)}),e.useEffect(()=>(r?.onNestedDialogOpen&&o&&r.onNestedDialogOpen(m),r?.onNestedDialogClose&&!o&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&o&&r.onNestedDialogClose()}),[o,r,m]);const O=e.useMemo(()=>x(u),[x,u]),S=e.useMemo(()=>E(u),[E,u]),k=e.useMemo(()=>w(),[w]);n.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:S,popupProps:k,floatingRootContext:h,nestedOpenDialogCount:m})}({store:m,actionsRef:c,parentContext:p?.store.context});const y=e.useMemo(()=>({store:m}),[m]);return N.jsx(no.Provider,{value:y,children:"function"==typeof n?n({payload:v}):n})}const Bl=e.forwardRef(function(e,t){const{render:n,className:r,id:i,...o}=e,{store:a}=ro(),s=Nn(i);return a.useSyncedValueWithCleanup("titleElementId",s),le("h2",e,{ref:t,props:[{id:s},o]})});"production"!==process.env.NODE_ENV&&(Bl.displayName="DialogTitle")
|
|
33
|
+
/**
|
|
34
|
+
* @license lucide-react v1.8.0 - ISC
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the ISC license.
|
|
37
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/;const Fl=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),$l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ul=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
39
|
+
/**
|
|
40
|
+
* @license lucide-react v1.8.0 - ISC
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the ISC license.
|
|
43
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* @license lucide-react v1.8.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/
|
|
51
|
+
var Wl={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"};
|
|
52
|
+
/**
|
|
53
|
+
* @license lucide-react v1.8.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/const Kl=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Hl=o({}),Yl=a(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:o,className:a="",children:s,iconNode:l,...c},u)=>{const{size:d=24,strokeWidth:f=2,absoluteStrokeWidth:p=!1,color:h="currentColor",className:m=""}=i(Hl)??{},v=o??p?24*Number(r??f)/Number(t??d):r??f;return n("svg",{ref:u,...Wl,width:t??d??Wl.width,height:t??d??Wl.height,stroke:e??h,strokeWidth:v,className:Fl("lucide",m,a),...!s&&!Kl(c)&&{"aria-hidden":"true"},...c},[...l.map(([e,t])=>n(e,t)),...Array.isArray(s)?s:[s]])}),ql=(e,t)=>{const r=a(({className:r,...i},o)=>n(Yl,{ref:o,iconNode:t,className:Fl(`lucide-${$l(Ul(e))}`,`lucide-${e}`,r),...i}));return r.displayName=Ul(e),r},Gl=ql("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),Xl=ql("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),Zl=ql("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Jl=ql("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),Ql=ql("layout-dashboard",[["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"}]]),ec=ql("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]),tc=ql("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),nc=ql("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),rc=ql("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),ic=ql("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),oc=ql("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),ac=ql("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),sc=ql("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"}]]),lc=ql("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),cc=ql("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),uc=ql("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"}]]),dc=ql("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),fc=ql("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),pc=ql("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function hc(e){var t=D(e,[]);return N.jsx(Vl,I({"data-slot":"sheet"},t))}function mc(e){var t=D(e,[]);return N.jsx(jl,I({"data-slot":"sheet-portal"},t))}function vc(e){var t=e.className,n=D(e,["className"]);return N.jsx(vo,I({"data-slot":"sheet-overlay",className:Dt("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t)},n))}function yc(e){var t=e.className,n=e.children,r=e.side,i=void 0===r?"right":r,o=e.showCloseButton,a=void 0===o||o,s=D(e,["className","children","side","showCloseButton"]);return N.jsxs(mc,{children:[N.jsx(vc,{}),N.jsxs(kl,I({"data-slot":"sheet-content","data-side":i,className:Dt("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t)},s,{children:[n,a&&N.jsxs(yo,{"data-slot":"sheet-close",render:N.jsx(wn,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[N.jsx(fc,{}),N.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})}function gc(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"sheet-header",className:Dt("flex flex-col gap-0.5 p-4",t)},n))}function bc(e){var t=e.className,n=D(e,["className"]);return N.jsx(Bl,I({"data-slot":"sheet-title",className:Dt("font-heading text-base font-medium text-foreground",t)},n))}function xc(e){var t=e.className,n=D(e,["className"]);return N.jsx(go,I({"data-slot":"sheet-description",className:Dt("text-sm text-muted-foreground",t)},n))}function wc(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"skeleton",className:Dt("animate-pulse rounded-md bg-muted",t)},n))}const Ec=e.createContext(void 0);function Oc(t){const n=e.useContext(Ec);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.":K(72));return n}"production"!==process.env.NODE_ENV&&(Ec.displayName="TooltipRootContext");const Sc={...Vs,disabled:os(e=>e.disabled),instantType:os(e=>e.instantType),isInstantPhase:os(e=>e.isInstantPhase),trackCursorAxis:os(e=>e.trackCursorAxis),disableHoverablePopup:os(e=>e.disableHoverablePopup),lastOpenChangeReason:os(e=>e.openChangeReason),closeOnClick:os(e=>e.closeOnClick),closeDelay:os(e=>e.closeDelay),hasViewport:os(e=>e.hasViewport)};class kc extends Ms{constructor(t){super({...{...Ls(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1},...t},{popupRef:e.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Rs},Sc)}setOpen=(e,t)=>{const n=t.reason,r=n===$i,i=e&&n===Ui,o=!e&&(n===Fi||n===Yi);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const a=()=>{const r={open:e,openChangeReason:n};i?r.instantType="focus":o?r.instantType="dismiss":n===$i&&(r.instantType=void 0);const a=t.trigger?.id??null;(a||e)&&(r.activeTriggerId=a,r.activeTriggerElement=t.trigger??null),this.update(r)};r?E.flushSync(a):a()};static useStore(e,t){const n=Y(()=>new kc(t)).current,r=e??n,i=Fs({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=i,r}}const Pc=Os(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:o=!1,trackCursorAxis:a="none",actionsRef:s,onOpenChange:l,onOpenChangeComplete:c,handle:u,triggerId:d,defaultTriggerId:f=null,children:p}=t,h=kc.useStore(u?.store,{open:r,openProp:i,activeTriggerId:f,triggerIdProp:d});Tl(()=>{void 0===i&&!1===h.state.open&&!0===r&&h.update({open:!0,activeTriggerId:f})}),h.useControlledProp("openProp",i),h.useControlledProp("triggerIdProp",d),h.useContextCallback("onOpenChange",l),h.useContextCallback("onOpenChangeComplete",c);const m=h.useState("open"),v=!n&&m,y=h.useState("activeTriggerId"),g=h.useState("payload");h.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:o}),hn(()=>{m&&n&&h.setOpen(!1,Zi("disabled"))},[m,n,h]),h.useSyncedValue("disabled",n),Ds(h);const{forceUnmount:b,transitionStatus:x}=_s(v,h),w=h.useState("isInstantPhase"),E=h.useState("instantType"),O=h.useState("lastOpenChangeReason"),S=e.useRef(null);hn(()=>{"ending"===x&&O===Bi||"ending"!==x&&w?("delay"!==E&&(S.current=E),h.set("instantType","delay")):null!==S.current&&(h.set("instantType",S.current),S.current=null)},[x,w,O,E,h]),hn(()=>{v&&null==y&&h.set("payload",void 0)},[h,y,v]);const k=e.useCallback(()=>{h.setOpen(!1,function(e,t){const n=Zi(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}(h,Xi))},[h]);e.useImperativeHandle(s,()=>({unmount:b,close:k}),[b,k]);const P=h.useState("floatingRootContext"),A=ca(P,{enabled:!n,referencePress:()=>h.select("closeOnClick")}),j=function(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),a=r.useState("domReferenceElement"),s=r.context.dataRef,{enabled:l=!0,axis:c="both"}=n,u=e.useRef(!1),d=e.useRef(null),[f,p]=e.useState(),[h,m]=e.useState([]),v=ln((e,t,n)=>{u.current||s.current.openEvent&&!aa(s.current.openEvent)||r.set("positionReference",function(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const o=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a="x"===t.axis||"both"===t.axis,s="y"===t.axis||"both"===t.axis,l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&"touch"!==t.pointerType;let c=o.width,u=o.height,d=o.x,f=o.y;return null==n&&t.x&&a&&(n=o.x-t.x),null==r&&t.y&&s&&(r=o.y-t.y),d-=n||0,f-=r||0,c=0,u=0,!i||l?(c="y"===t.axis?o.width:0,u="x"===t.axis?o.height:0,d=a&&null!=t.x?t.x:d,f=s&&null!=t.y?t.y:f):i&&!l&&(u="x"===t.axis?o.height:u,c="y"===t.axis?o.width:c),i=!0,{width:c,height:u,x:d,y:f,top:f,right:d+c,bottom:f+u,left:d}}}}(n??a,{x:e,y:t,axis:c,dataRef:s,pointerType:f}))}),y=ln(e=>{i?d.current||m([]):v(e.clientX,e.clientY,e.currentTarget)}),g=gr(f)?o:i,b=e.useCallback(()=>{if(!g||!l)return;const e=Lt(o);function t(n){const r=lr(n);ar(o,r)?(e.removeEventListener("mousemove",t),d.current=null):v(n.clientX,n.clientY)}if(!s.current.openEvent||aa(s.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),d.current=null};return d.current=n,n}r.set("positionReference",a)},[g,l,o,s,a,r,v]);e.useEffect(()=>b(),[b,h]),e.useEffect(()=>{l&&!o&&(u.current=!1)},[l,o]),e.useEffect(()=>{!l&&i&&(u.current=!0)},[l,i]);const x=e.useMemo(()=>{function e(e){p(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:y,onMouseEnter:y}},[y]);return e.useMemo(()=>l?{reference:x,trigger:x}:{},[l,x])}(P,{enabled:!n&&"none"!==a,axis:"none"===a?void 0:a}),{getReferenceProps:T,getFloatingProps:M,getTriggerProps:C}=Zs([A,j]),I=e.useMemo(()=>T(),[T]),D=e.useMemo(()=>C(),[C]),_=e.useMemo(()=>M(),[M]);return h.useSyncedValues({activeTriggerProps:I,inactiveTriggerProps:D,popupProps:_}),N.jsx(Ec.Provider,{value:h,children:"function"==typeof p?p({payload:g}):p})});"production"!==process.env.NODE_ENV&&(Pc.displayName="TooltipRoot");const Ac=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(Ac.displayName="TooltipProviderContext");let jc=function(e){return e[e.popupOpen=oo.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e}({});const Tc=Ss(function(t,n){const{className:r,render:i,handle:o,payload:a,disabled:s,delay:l,closeOnClick:c=!0,closeDelay:u,id:d,...f}=t,p=Oc(!0),h=o?.store??p;if(!h)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.":K(82));const m=Nn(d),v=h.useState("isTriggerActive",m),y=h.useState("isOpenedByTrigger",m),g=h.useState("floatingRootContext"),b=e.useRef(null),x=l??600,w=u??0,{registerTrigger:E,isMountedByThisTrigger:O}=Is(m,b,h,{payload:a,closeOnClick:c,closeDelay:w}),S=e.useContext(Ac),{delayRef:k,isInstantPhase:P,hasProvider:A}=function(t,n={open:!1}){const r="rootStore"in t?t.rootStore:t,i=r.useState("floatingId"),{open:o}=n,a=e.useContext(Eo),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:p}=a,[h,m]=e.useState(!1);return hn(()=>{function e(){m(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current}if(s.current&&!o&&s.current===i){if(m(!1),c){const t=i;return p.start(c,()=>{r.select("open")||s.current&&s.current!==t||e()}),()=>{p.clear()}}e()}},[o,i,s,l,c,u,d,p,r]),hn(()=>{if(!o)return;const e=d.current,t=s.current;p.clear(),d.current={onOpenChange:r.setOpen,setIsInstantPhase:m},s.current=i,l.current={open:0,close:bo(u.current,"close")},null!==t&&t!==i?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Zi(Bi))):(m(!1),e?.setIsInstantPhase(!1))},[o,i,r,s,l,c,u,d,p]),hn(()=>()=>{d.current=null},[d]),e.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}(g,{open:y});h.useSyncedValue("isInstantPhase",P);const j=h.useState("disabled"),T=s??j,M=h.useState("trackCursorAxis");return le("button",t,{state:{open:y},ref:[n,E,b],props:[Xs(g,{enabled:!T,mouseOnly:!0,move:!1,handleClose:h.useState("disableHoverablePopup")||"both"===M?null:dl(),restMs(){const e=S?.delay,t="object"==typeof k.current?k.current.open:void 0;let n=x;return A&&(n=0!==t?l??e??x:0),n},delay(){const e="object"==typeof k.current?k.current.close:void 0;let t=w;return null==u&&A&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:v}),Us(g,{enabled:!T}).reference,h.useState("triggerProps",O),{onPointerDown(){h.set("closeOnClick",c)},id:m,[jc.triggerDisabled]:T?"":void 0},f],stateAttributesMapping:fo})});"production"!==process.env.NODE_ENV&&(Tc.displayName="TooltipTrigger");const Mc=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(Mc.displayName="TooltipPortalContext");const Cc=e.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,...s}=t,{portalNode:l,portalSubtree:c}=Wo({container:i,ref:n,componentProps:t,elementProps:s});return c||l?N.jsxs(e.Fragment,{children:[c,l&&E.createPortal(r,l)]}):null});"production"!==process.env.NODE_ENV&&(Cc.displayName="FloatingPortalLite");const Nc=e.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return Oc().useState("mounted")||n?N.jsx(Mc.Provider,{value:n,children:N.jsx(Cc,{ref:t,...r})}):null});"production"!==process.env.NODE_ENV&&(Nc.displayName="TooltipPortal");const Ic=e.createContext(void 0);function Dc(){const t=e.useContext(Ic);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.":K(71));return t}"production"!==process.env.NODE_ENV&&(Ic.displayName="TooltipPositionerContext");const _c=e.createContext(void 0);function Rc(){const t=e.useContext(_c);return t?.direction??"ltr"}"production"!==process.env.NODE_ENV&&(_c.displayName="DirectionContext");const Lc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0,offsetParent:d="real"}=jr(e,t)||{};if(null==c)return{};const f=$r(u),p={x:n,y:r},h=Dr(i),m=Nr(h),v=await a.getDimensions(c),y="y"===h,g=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=o.reference[m]+o.reference[h]-p[h]-o.floating[m],E=p[h]-o.reference[h],O="real"===d?await(a.getOffsetParent?.(c)):s.floating;let S=s.floating[x]||o.floating[m];S&&await(a.isElement?.(O))||(S=s.floating[x]||o.floating[m]);const k=w/2-E/2,P=S/2-v[m]/2-1,A=Math.min(f[g],P),j=Math.min(f[b],P),T=A,M=S-v[m]-j,C=S/2-v[m]/2+k,N=Ar(T,C,M),I=!l.arrow&&null!=Mr(i)&&C!==N&&o.reference[m]/2-(C<T?A:j)-v[m]/2<0,D=I?C<T?C-T:C-M:0;return{[h]:p[h]+D,data:{[h]:N,centerOffset:C-N-D,...I&&{alignmentOffset:D}},reset:I}}}),zc={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,o=0===t&&0===n&&0===r&&0===i,a=await((e,t)=>{const n=Ra(e);return{name:n.name,fn:n.fn,options:[e,t]}})().fn(e);return{data:{referenceHidden:a.data?.referenceHidden||o}}}},Vc={sideX:"left",sideY:"top"},Bc={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:s}=e,l=Lt(i),c=l.getComputedStyle(i);if(!("0s"!==c.transitionDuration&&""!==c.transitionDuration))return{x:t,y:n,data:Vc};const u=await(o.getOffsetParent?.(i));let d={width:0,height:0};if("fixed"===a&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(u===l){const e=Bn(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(o.isElement?.(u))&&(d=await o.getDimensions(u));const f=Tr(s);let p=t,h=n;"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height));return{x:p,y:h,data:{sideX:"left"===f?"right":Vc.sideX,sideY:"top"===f?"bottom":Vc.sideY}}}};function Fc(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function $c(e,t,n){const{rects:r,placement:i}=e;return{side:Fc(t,Tr(i),n),align:Mr(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Uc(t){const{anchor:n,positionMethod:r="absolute",side:i="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:c=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:h,mounted:m,collisionAvoidance:v,shiftCrossAxis:y=!1,nodeId:g,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:w}=t,[E,O]=e.useState(null);m||null===E||O(null);const S=v.side||"flip",k=v.align||"flip",P=v.fallbackAxisSide||"end",A="function"==typeof n?n:void 0,j=ln(A),T=A?j:n,M=Oo(n),C="rtl"===Rc(),N=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":C?"left":"right","inline-start":C?"right":"left"}[i],I="center"===a?N:`${N}-${a}`;let D=c;const _="bottom"===i?1:0,R="top"===i?1:0,L="right"===i?1:0,z="left"===i?1:0;"number"==typeof D?D={top:D+_,right:D+z,bottom:D+R,left:D+L}:D&&(D={top:(D.top||0)+_,right:(D.right||0)+z,bottom:(D.bottom||0)+R,left:(D.left||0)+L});const V={boundary:"clipping-ancestors"===l?"clippingAncestors":l,padding:D},B=e.useRef(null),F=Oo(o),$=Oo(s),U=[Wa(e=>{const t=$c(e,i,C),n="function"==typeof F.current?F.current(t):F.current,r="function"==typeof $.current?$.current(t):$.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},["function"!=typeof o?o:0,"function"!=typeof s?s:0,C,i])],W="none"===k&&"shift"!==S,K=!W&&(u||y||"shift"===S),H="none"===S?null:((e,t)=>{const n=Da(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,padding:{top:D.top+1,right:D.right+1,bottom:D.bottom+1,left:D.left+1},mainAxis:!y&&"flip"===S,crossAxis:"flip"===k&&"alignment",fallbackAxisSideDirection:P}),Y=W?null:((e,t)=>{const n=Ia(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=Bn(e.elements.floating).documentElement;return{...V,rootBoundary:y?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==k,crossAxis:K,limiter:u||y?void 0:(n=e=>{if(!B.current)return{};const{width:t,height:n}=B.current.getBoundingClientRect(),r=Ir(Tr(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?D.left+D.right:D.top+D.bottom)/2}},{fn:La(n).fn,options:[n,r]})};var n,r},[V,u,y,D,k]);var q,G;"shift"===S||"shift"===k||"center"===a?U.push(Y,H):U.push(H,Y),U.push(((e,t)=>{const n=_a(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){const i=e.style;i.setProperty("--available-width",`${t}px`),i.setProperty("--available-height",`${n}px`);const o=window.devicePixelRatio||1,{x:a,y:s,width:l,height:c}=r.reference,u=(Math.round((a+l)*o)-Math.round(a*o))/o,d=(Math.round((s+c)*o)-Math.round(s*o))/o;i.setProperty("--anchor-width",`${u}px`),i.setProperty("--anchor-height",`${d}px`)}}),(G=[d],{...Lc(q=()=>({element:B.current||document.createElement("div"),padding:d,offsetParent:"floating"})),options:[q,G]}),{name:"transformOrigin",fn(e){const{elements:t,middlewareData:n,placement:r,rects:a,y:s}=e,l=Tr(r),c=Ir(l),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=d+(u?.clientWidth||0)/2,h=f+(u?.clientHeight||0)/2,m=Math.abs(n.shift?.y||0),v=a.reference.height/2,y="function"==typeof o?o($c(e,i,C)):o,g=m>y,b={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${h}px`,right:`${-y}px ${h}px`}[l],x=`${p}px ${a.reference.y+v-s}px`;return t.floating.style.setProperty("--transform-origin",K&&"y"===c&&g?x:b),{}}},zc,b),hn(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,h]);const X=e.useMemo(()=>({elementResize:!f&&"undefined"!=typeof ResizeObserver,layoutShift:!f&&"undefined"!=typeof IntersectionObserver}),[f]),{refs:Z,elements:J,x:Q,y:ee,middlewareData:te,update:ne,placement:re,context:ie,isPositioned:oe,floatingStyles:ae}=Bs({rootContext:h,placement:I,middleware:U,strategy:r,whileElementsMounted:p?void 0:(...e)=>Ca(...e,X),nodeId:g,externalTree:w}),{sideX:se,sideY:le}=te.adaptiveOrigin||Vc,ce=oe?r:"fixed",ue=e.useMemo(()=>{const e=b?{position:ce,[se]:Q,[le]:ee}:{position:ce,...ae};return oe||(e.opacity=0),e},[b,ce,se,Q,le,ee,ae,oe]),de=e.useRef(null);hn(()=>{if(!m)return;const e=M.current,t="function"==typeof e?e():e,n=(Wc(t)?t.current:t)||null||null;n!==de.current&&(Z.setPositionReference(n),de.current=n)},[m,Z,T,M]),e.useEffect(()=>{if(!m)return;const e=M.current;"function"!=typeof e&&Wc(e)&&e.current!==de.current&&(Z.setPositionReference(e.current),de.current=e.current)},[m,Z,T,M]),e.useEffect(()=>{if(p&&m&&J.domReference&&J.floating)return Ca(J.domReference,J.floating,ne,X)},[p,m,J,ne,X]);const fe=Tr(re),pe=Fc(i,fe,C),he=Mr(re)||"center",me=Boolean(te.hide?.referenceHidden);hn(()=>{x&&m&&oe&&O(fe)},[x,m,oe,fe]);const ve=e.useMemo(()=>({position:"absolute",top:te.arrow?.y,left:te.arrow?.x}),[te.arrow]),ye=0!==te.arrow?.centerOffset;return e.useMemo(()=>({positionerStyles:ue,arrowStyles:ve,arrowRef:B,arrowUncentered:ye,side:pe,align:he,physicalSide:fe,anchorHidden:me,refs:Z,context:ie,isPositioned:oe,update:ne}),[ue,ve,B,ye,pe,he,fe,me,Z,ie,oe,ne])}function Wc(e){return null!=e&&"current"in e}function Kc(e){return"starting"===e?ie:re}const Hc=e.forwardRef(function(t,n){const{render:r,className:i,anchor:o,positionMethod:a="absolute",side:s="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:m=!1,collisionAvoidance:v=ae,...y}=t,g=Oc(),b=function(){const t=e.useContext(Mc);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Tooltip.Portal> is missing.":K(70));return t}(),x=g.useState("open"),w=g.useState("mounted"),E=g.useState("trackCursorAxis"),O=g.useState("disableHoverablePopup"),S=g.useState("floatingRootContext"),k=g.useState("instantType"),P=g.useState("transitionStatus"),A=g.useState("hasViewport"),j=Uc({anchor:o,positionMethod:a,floatingRootContext:S,mounted:w,side:s,sideOffset:c,align:l,alignOffset:u,collisionBoundary:d,collisionPadding:f,sticky:h,arrowPadding:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:v,adaptiveOrigin:A?Bc:void 0}),T=e.useMemo(()=>{const e={};return x&&"both"!==E&&!O||(e.pointerEvents="none"),{role:"presentation",hidden:!w,style:{...j.positionerStyles,...e}}},[x,E,O,w,j.positionerStyles]),M=e.useMemo(()=>({open:x,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:"none"!==E?"tracking-cursor":k}),[x,j.side,j.align,j.anchorHidden,E,k]),C=e.useMemo(()=>({...M,arrowRef:j.arrowRef,arrowStyles:j.arrowStyles,arrowUncentered:j.arrowUncentered}),[M,j.arrowRef,j.arrowStyles,j.arrowUncentered]),I=le("div",t,{state:M,props:[T,Kc(P),y],ref:[n,g.useStateSetter("positionerElement")],stateAttributesMapping:ho});return N.jsx(Ic.Provider,{value:C,children:I})});"production"!==process.env.NODE_ENV&&(Hc.displayName="TooltipPositioner");const Yc={...ho,...Ri},qc=e.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=Oc(),{side:a,align:s}=Dc(),l=o.useState("open"),c=o.useState("instantType"),u=o.useState("transitionStatus"),d=o.useState("popupProps"),f=o.useState("floatingRootContext");zi({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}});qs(f,{enabled:!o.useState("disabled"),closeDelay:o.useState("closeDelay")});return le("div",e,{state:{open:l,side:a,align:s,instant:c,transitionStatus:u},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[d,Kc(u),i],stateAttributesMapping:Yc})});"production"!==process.env.NODE_ENV&&(qc.displayName="TooltipPopup");const Gc=e.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=Oc().useState("instantType"),{open:a,arrowRef:s,side:l,align:c,arrowUncentered:u,arrowStyles:d}=Dc();return le("div",e,{state:{open:a,side:l,align:c,uncentered:u,instant:o},ref:[t,s],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:ho})});function Xc(e){var t=D(e,[]);return N.jsx(Pc,I({"data-slot":"tooltip"},t))}function Zc(e){var t=D(e,[]);return N.jsx(Tc,I({"data-slot":"tooltip-trigger"},t))}function Jc(e){var t=e.className,n=e.side,r=void 0===n?"top":n,i=e.sideOffset,o=void 0===i?4:i,a=e.align,s=void 0===a?"center":a,l=e.alignOffset,c=void 0===l?0:l,u=e.children,d=D(e,["className","side","sideOffset","align","alignOffset","children"]);return N.jsx(Nc,{children:N.jsx(Hc,{align:s,alignOffset:c,side:r,sideOffset:o,className:"isolate z-50",children:N.jsxs(qc,I({"data-slot":"tooltip-content",className:Dt("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t)},d,{children:[u,N.jsx(Gc,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]}))})})}"production"!==process.env.NODE_ENV&&(Gc.displayName="TooltipArrow");var Qc=e.createContext(null);function eu(){var t=e.useContext(Qc);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function tu(t){var n=t.defaultOpen,r=void 0===n||n,i=t.open,o=t.onOpenChange,a=t.className,s=t.style,l=t.children,c=D(t,["defaultOpen","open","onOpenChange","className","style","children"]),u=function(){var t=e.useState(void 0),n=t[0],r=t[1];return e.useEffect(function(){var e=window.matchMedia("(max-width: ".concat(767,"px)")),t=function(){r(window.innerWidth<768)};return e.addEventListener("change",t),r(window.innerWidth<768),function(){return e.removeEventListener("change",t)}},[]),!!n}(),d=e.useState(!1),f=d[0],p=d[1],h=e.useState(r),m=h[0],v=h[1],y=null!=i?i:m,g=e.useCallback(function(e){var t="function"==typeof e?e(y):e;o?o(t):v(t),document.cookie="".concat("sidebar_state","=").concat(t,"; path=/; max-age=").concat(604800)},[o,y]),b=e.useCallback(function(){return u?p(function(e){return!e}):g(function(e){return!e})},[u,g,p]);e.useEffect(function(){var e=function(e){"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[b]);var x=y?"expanded":"collapsed",w=e.useMemo(function(){return{state:x,open:y,setOpen:g,isMobile:u,openMobile:f,setOpenMobile:p,toggleSidebar:b}},[x,y,g,u,f,p,b]);return N.jsx(Qc.Provider,{value:w,children:N.jsx("div",I({"data-slot":"sidebar-wrapper",style:I({"--sidebar-width":"16rem","--sidebar-width-icon":"3rem"},s),className:Dt("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a)},c,{children:l}))})}function nu(e){var t=e.side,n=void 0===t?"left":t,r=e.variant,i=void 0===r?"sidebar":r,o=e.collapsible,a=void 0===o?"offcanvas":o,s=e.className,l=e.children,c=e.dir,u=D(e,["side","variant","collapsible","className","children","dir"]),d=eu(),f=d.isMobile,p=d.state,h=d.openMobile,m=d.setOpenMobile;return"none"===a?N.jsx("div",I({"data-slot":"sidebar",className:Dt("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s)},u,{children:l})):f?N.jsx(hc,I({open:h,onOpenChange:m},u,{children:N.jsxs(yc,{dir:c,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:n,children:[N.jsxs(gc,{className:"sr-only",children:[N.jsx(bc,{children:"Sidebar"}),N.jsx(xc,{children:"Displays the mobile sidebar."})]}),N.jsx("div",{className:"flex h-full w-full flex-col",children:l})]})})):N.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":"collapsed"===p?a:"","data-variant":i,"data-side":n,"data-slot":"sidebar",children:[N.jsx("div",{"data-slot":"sidebar-gap",className:Dt("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===i||"inset"===i?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),N.jsx("div",I({"data-slot":"sidebar-container","data-side":n,className:Dt("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex","floating"===i||"inset"===i?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s)},u,{children:N.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:l})}))]})}function ru(e){var t=e.className,n=e.onClick,r=D(e,["className","onClick"]),i=eu().toggleSidebar;return N.jsxs(wn,I({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Dt(t),onClick:function(e){null==n||n(e),i()}},r,{children:[N.jsx(ic,{}),N.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]}))}function iu(e){var t=e.className,n=D(e,["className"]);return N.jsx("main",I({"data-slot":"sidebar-inset",className:Dt("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t)},n))}function ou(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"sidebar-header","data-sidebar":"header",className:Dt("flex flex-col gap-2 p-2",t)},n))}function au(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"sidebar-footer","data-sidebar":"footer",className:Dt("flex flex-col gap-2 p-2",t)},n))}function su(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"sidebar-content","data-sidebar":"content",className:Dt("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t)},n))}function lu(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"sidebar-group","data-sidebar":"group",className:Dt("relative flex w-full min-w-0 flex-col p-2",t)},n))}function cu(e){var t=e.className,n=e.render,r=D(e,["className","render"]);return ue({defaultTagName:"div",props:L({className:Dt("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",t)},r),render:n,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function uu(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Dt("w-full text-sm",t)},n))}function du(e){var t=e.className,n=D(e,["className"]);return N.jsx("ul",I({"data-slot":"sidebar-menu","data-sidebar":"menu",className:Dt("flex w-full min-w-0 flex-col gap-0",t)},n))}function fu(e){var t=e.className,n=D(e,["className"]);return N.jsx("li",I({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Dt("group/menu-item relative",t)},n))}var pu=me("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function hu(e){var t=e.render,n=e.isActive,r=void 0!==n&&n,i=e.variant,o=void 0===i?"default":i,a=e.size,s=void 0===a?"default":a,l=e.tooltip,c=e.className,u=D(e,["render","isActive","variant","size","tooltip","className"]),d=eu(),f=d.isMobile,p=d.state,h=ue({defaultTagName:"button",props:L({className:Dt(pu({variant:o,size:s}),c)},u),render:l?N.jsx(Zc,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:r}});return l?("string"==typeof l&&(l={children:l}),N.jsxs(Xc,{children:[h,N.jsx(Jc,I({side:"right",align:"center",hidden:"collapsed"!==p||f},l))]})):h}const mu=o({});function vu(e){const t=s(null);return null===t.current&&(t.current=e()),t.current}const yu="undefined"!=typeof window?r:l,gu=o(null);function bu(e,t){-1===e.indexOf(t)&&e.push(t)}function xu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const wu=(e,t,n)=>n>t?t:n<e?e:n;function Eu(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ou=()=>{},Su=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(Ou=(e,t,n)=>{e||"undefined"==typeof console||console.warn(Eu(t,n))},Su=(e,t,n)=>{if(!e)throw new Error(Eu(t,n))});const ku={},Pu=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Au(e){return"object"==typeof e&&null!==e}const ju=e=>/^0[^.\s]+$/u.test(e);function Tu(e){let t;return()=>(void 0===t&&(t=e()),t)}const Mu=e=>e,Cu=(e,t)=>n=>t(e(n)),Nu=(...e)=>e.reduce(Cu),Iu=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Du{constructor(){this.subscriptions=[]}add(e){return bu(this.subscriptions,e),()=>xu(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _u=e=>1e3*e,Ru=e=>e/1e3;function Lu(e,t){return t?e*(1e3/t):0}const zu=new Set;function Vu(e,t,n){e||zu.has(t)||(console.warn(Eu(t,n)),zu.add(t))}const Bu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Fu(e,t,n,r){if(e===t&&n===r)return Mu;const i=t=>function(e,t,n,r,i){let o,a,s=0;do{a=t+(n-t)/2,o=Bu(a,r,i)-e,o>0?n=a:t=a}while(Math.abs(o)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:Bu(i(e),t,r)}const $u=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Uu=e=>t=>1-e(1-t),Wu=Fu(.33,1.53,.69,.99),Ku=Uu(Wu),Hu=$u(Ku),Yu=e=>e>=1?1:(e*=2)<1?.5*Ku(e):.5*(2-Math.pow(2,-10*(e-1))),qu=e=>1-Math.sin(Math.acos(e)),Gu=Uu(qu),Xu=$u(qu),Zu=Fu(.42,0,1,1),Ju=Fu(0,0,.58,1),Qu=Fu(.42,0,.58,1),ed=e=>Array.isArray(e)&&"number"==typeof e[0],td={linear:Mu,easeIn:Zu,easeInOut:Qu,easeOut:Ju,circIn:qu,circInOut:Xu,circOut:Gu,backIn:Ku,backInOut:Hu,backOut:Wu,anticipate:Yu},nd=e=>{if(ed(e)){Su(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return Fu(t,n,r,i)}return"string"==typeof e?(Su(void 0!==td[e],`Invalid easing type '${e}'`,"invalid-easing-type"),td[e]):e},rd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function id(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=rd.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,i=!1,a=!1)=>{const s=a&&r?t:n;return i&&o.add(e),s.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(a=e,r)return void(i=!0);r=!0;const o=t;t=n,n=o,t.forEach(s),t.clear(),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=a,m=()=>{const o=ku.useManualTiming,a=o?i.timestamp:performance.now();n=!1,o||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),p.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:rd.reduce((t,o)=>{const s=a[o];return t[o]=(t,o=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(m)),s.schedule(t,o,a)),t},{}),cancel:e=>{for(let t=0;t<rd.length;t++)a[rd[t]].cancel(e)},state:i,steps:a}}const{schedule:od,cancel:ad,state:sd,steps:ld}=id("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Mu,!0);let cd;function ud(){cd=void 0}const dd={now:()=>(void 0===cd&&dd.set(sd.isProcessing||ku.useManualTiming?sd.timestamp:performance.now()),cd),set:e=>{cd=e,queueMicrotask(ud)}},fd=e=>t=>"string"==typeof t&&t.startsWith(e),pd=fd("--"),hd=fd("var(--"),md=e=>!!hd(e)&&vd.test(e.split("/*")[0].trim()),vd=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function yd(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const gd={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},bd={...gd,transform:e=>wu(0,1,e)},xd={...gd,default:1},wd=e=>Math.round(1e5*e)/1e5,Ed=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Od=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Sd=(e,t)=>n=>Boolean("string"==typeof n&&Od.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),kd=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,o,a,s]=r.match(Ed);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Pd={...gd,transform:e=>Math.round((e=>wu(0,255,e))(e))},Ad={test:Sd("rgb","red"),parse:kd("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pd.transform(e)+", "+Pd.transform(t)+", "+Pd.transform(n)+", "+wd(bd.transform(r))+")"};const jd={test:Sd("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:Ad.transform},Td=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Md=Td("deg"),Cd=Td("%"),Nd=Td("px"),Id=Td("vh"),Dd=Td("vw"),_d=(()=>({...Cd,parse:e=>Cd.parse(e)/100,transform:e=>Cd.transform(100*e)}))(),Rd={test:Sd("hsl","hue"),parse:kd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cd.transform(wd(t))+", "+Cd.transform(wd(n))+", "+wd(bd.transform(r))+")"},Ld={test:e=>Ad.test(e)||jd.test(e)||Rd.test(e),parse:e=>Ad.test(e)?Ad.parse(e):Rd.test(e)?Rd.parse(e):jd.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Ad.transform(e):Rd.transform(e),getAnimatableNone:e=>{const t=Ld.parse(e);return t.alpha=0,Ld.transform(t)}},zd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Vd="number",Bd="color",Fd=/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 $d(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(Fd,e=>(Ld.test(e)?(r.color.push(o),i.push(Bd),n.push(Ld.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(Vd),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:a,indexes:r,types:i}}function Ud({split:e,types:t}){const n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],void 0!==r[o]){const e=t[o];i+=e===Vd?wd(r[o]):e===Bd?Ld.transform(r[o]):r[o]}return i}}const Wd=(e,t)=>{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:Ld.test(n)?Ld.getAnimatableNone(n):n;var n};const Kd={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Ed)?.length||0)+(e.match(zd)?.length||0)>0},parse:function(e){return $d(e).values},createTransformer:function(e){return Ud($d(e))},getAnimatableNone:function(e){const t=$d(e);return Ud(t)(t.values.map((e,n)=>Wd(e,t.split[n])))}};function Hd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Yd(e,t){return n=>n>0?t:e}const qd=(e,t,n)=>e+(t-e)*n,Gd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Xd=[jd,Ad,Rd];function Zd(e){const t=(n=e,Xd.find(e=>e.test(n)));var n;if(Ou(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let r=t.parse(e);return t===Rd&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Hd(s,r,e+1/3),o=Hd(s,r,e),a=Hd(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}(r)),r}const Jd=(e,t)=>{const n=Zd(e),r=Zd(t);if(!n||!r)return Yd(e,t);const i={...n};return e=>(i.red=Gd(n.red,r.red,e),i.green=Gd(n.green,r.green,e),i.blue=Gd(n.blue,r.blue,e),i.alpha=qd(n.alpha,r.alpha,e),Ad.transform(i))},Qd=new Set(["none","hidden"]);function ef(e,t){return n=>qd(e,t,n)}function tf(e){return"number"==typeof e?ef:"string"==typeof e?md(e)?Yd:Ld.test(e)?Jd:of:Array.isArray(e)?nf:"object"==typeof e?Ld.test(e)?Jd:rf:Yd}function nf(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>tf(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function rf(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=tf(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const of=(e,t)=>{const n=Kd.createTransformer(t),r=$d(e),i=$d(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Qd.has(e)&&!i.values.length||Qd.has(t)&&!r.values.length?function(e,t){return Qd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Nu(nf(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}(r,i),i.values),n):(Ou(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Yd(e,t))};function af(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return qd(e,t,n);return tf(e)(e,t)}const sf=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>od.update(t,e),stop:()=>ad(t),now:()=>sd.isProcessing?sd.timestamp:dd.now()}},lf=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(1e4*e(t/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},cf=2e4;function uf(e){let t=0;let n=e.next(t);for(;!n.done&&t<cf;)t+=50,n=e.next(t);return t>=cf?1/0:t}const df=100,ff=10,pf=1,hf=0,mf=800,vf=.3,yf=.3,gf={granular:.01,default:2},bf={granular:.005,default:.5},xf=.01,wf=10,Ef=.05,Of=1;function Sf(e,t){return e*Math.sqrt(1-t*t)}const kf=.001;const Pf=["duration","bounce"],Af=["stiffness","damping","mass"];function jf(e,t){return t.some(t=>void 0!==e[t])}function Tf(e){let t={velocity:hf,stiffness:df,damping:ff,mass:pf,isResolvedFromDuration:!1,...e};if(!jf(e,Af)&&jf(e,Pf))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*wu(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:pf,stiffness:i,damping:o}}else{const n=function({duration:e=mf,bounce:t=vf,velocity:n=hf,mass:r=pf}){let i,o;Ou(e<=_u(wf),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=wu(Ef,Of,a),e=wu(xf,wf,Ru(e)),a<1?(i=t=>{const r=t*a,i=r*e,o=r-n,s=Sf(t,a),l=Math.exp(-i);return kf-o/s*l},o=t=>{const r=t*a*e,o=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Sf(Math.pow(t,2),a);return(-i(t)+kf>0?-1:1)*((o-s)*l)/c}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=_u(e),isNaN(s))return{stiffness:df,damping:ff,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:pf},t.isResolvedFromDuration=!0}return t}function Mf(e=yf,t=vf){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Tf({...n,velocity:-Ru(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),v=a-o,y=Ru(Math.sqrt(l/u)),g=Math.abs(v)<5;let b,x,w,E,O,S;if(r||(r=g?gf.granular:gf.default),i||(i=g?bf.granular:bf.default),m<1)w=Sf(y,m),E=(h+m*y*v)/w,b=e=>{const t=Math.exp(-m*y*e);return a-t*(E*Math.sin(w*e)+v*Math.cos(w*e))},O=m*y*E+v*w,S=m*y*v-E*w,x=e=>Math.exp(-m*y*e)*(O*Math.sin(w*e)+S*Math.cos(w*e));else if(1===m){b=e=>a-Math.exp(-y*e)*(v+(h+y*v)*e);const e=h+y*v;x=t=>Math.exp(-y*t)*(y*e*t-h)}else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return a-n*((h+m*y*v)*Math.sinh(r)+e*v*Math.cosh(r))/e};const t=(h+m*y*v)/e,n=m*y*t-v*e,r=m*y*v-t*e;x=t=>{const i=Math.exp(-m*y*t),o=Math.min(e*t,300);return i*(n*Math.sinh(o)+r*Math.cosh(o))}}const k={calculatedDuration:p&&d||null,velocity:e=>_u(x(e)),next:e=>{if(!p&&m<1){const t=Math.exp(-m*y*e),n=Math.sin(w*e),o=Math.cos(w*e),l=a-t*(E*n+v*o),c=_u(t*(O*n+S*o));return s.done=Math.abs(c)<=r&&Math.abs(a-l)<=i,s.value=s.done?a:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=_u(x(e));s.done=Math.abs(n)<=r&&Math.abs(a-t)<=i}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(uf(k),cf),t=lf(t=>k.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return k}Mf.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(uf(r),cf);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:Ru(i)}}(e,100,Mf);return e.ease=t.ease,e.duration=_u(t.duration),e.type="keyframes",e};function Cf(e,t,n){const r=Math.max(t-5,0);return Lu(n-e(r),t-r)}function Nf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,v=void 0===a?m:a(m);v!==m&&(h=v-d);const y=e=>-h*Math.exp(-e/r),g=e=>v+y(e),b=e=>{const t=y(e),n=g(e);f.done=Math.abs(t)<=c,f.value=f.done?v:n};let x,w;const E=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=Mf({keyframes:[f.value,p(f.value)],velocity:Cf(g,e,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),E(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function If(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Su(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||ku.mix||af,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Mu:t;o=Nu(e,o)}r.push(o)}return r}(t,r,i),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=Iu(e[r],e[r+1],n);return s[r](i)};return n?t=>c(wu(e[0],e[o-1],t)):c}function Df(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Iu(0,t,r);e.push(qd(n,1,i))}}(t,e.length-1),t}function _f({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(nd):nd(r),o={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Df(t),e),s=If(a,t,{ease:Array.isArray(i)?i:(l=t,c=i,l.map(()=>c||Qu).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}const Rf=e=>null!==e;function Lf(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(Rf),a=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return a&&void 0!==r?r:o[a]}const zf={decay:Nf,inertia:Nf,tween:_f,keyframes:_f,spring:Mf};function Vf(e){"string"==typeof e.type&&(e.type=zf[e.type])}class Bf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Ff=e=>e/100;class $f extends Bf{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==dd.now()&&this.tick(dd.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Vf(e);const{type:t=_f,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const s=t||_f;"production"!==process.env.NODE_ENV&&s!==_f&&Su(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==_f&&"number"!=typeof a[0]&&(this.mixKeyframes=Nu(Ff,af(a[0],a[1])),a=[0,100]);const l=s({...e,keyframes:a});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...a].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=uf(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let g,b=this.currentTime,x=n;if(u){const e=Math.min(this.currentTime,r)/a;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/a)):"mirror"===d&&(x=o)),b=wu(0,1,n)*a}y?(this.delayState.value=c[0],g=this.delayState):g=x.next(b),i&&!y&&(g.value=i(g.value));let{done:w}=g;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&p!==Nf&&(g.value=Lf(c,this.options,m,this.speed)),h&&h(g.value),E&&this.finish(),g}then(e,t){return this.finished.then(e,t)}get duration(){return Ru(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ru(e)}get time(){return Ru(this.currentTime)}set time(e){e=_u(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return Cf(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(dd.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Ru(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=sf,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dd.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const Uf=e=>180*e/Math.PI,Wf=e=>{const t=Uf(Math.atan2(e[1],e[0]));return Hf(t)},Kf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wf,rotateZ:Wf,skewX:e=>Uf(Math.atan(e[1])),skewY:e=>Uf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hf=e=>((e%=360)<0&&(e+=360),e),Yf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qf=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Gf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yf,scaleY:qf,scale:e=>(Yf(e)+qf(e))/2,rotateX:e=>Hf(Uf(Math.atan2(e[6],e[5]))),rotateY:e=>Hf(Uf(Math.atan2(-e[2],e[0]))),rotateZ:Wf,rotate:Wf,skewX:e=>Uf(Math.atan(e[4])),skewY:e=>Uf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xf(e){return e.includes("scale")?1:0}function Zf(e,t){if(!e||"none"===e)return Xf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Gf,i=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Kf,i=t}if(!i)return Xf(t);const o=r[t],a=i[1].split(",").map(Jf);return"function"==typeof o?o(a):a[o]}function Jf(e){return parseFloat(e.trim())}const Qf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ep=(()=>new Set(Qf))(),tp=e=>e===gd||e===Nd,np=new Set(["x","y","z"]),rp=Qf.filter(e=>!np.has(e));const ip={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Zf(t,"x"),y:(e,{transform:t})=>Zf(t,"y")};ip.translateX=ip.x,ip.translateY=ip.y;const op=new Set;let ap=!1,sp=!1,lp=!1;function cp(){if(sp){const e=Array.from(op).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return rp.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}sp=!1,ap=!1,op.forEach(e=>e.complete(lp)),op.clear()}function up(){op.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sp=!0)})}class dp{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(op.add(this),ap||(ap=!0,od.read(up),od.resolveKeyframes(cp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=r?.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),op.delete(this)}cancel(){"scheduled"===this.state&&(op.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function fp(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}const pp={};function hp(e,t){const n=Tu(e);return()=>pp[t]??n()}const mp=hp(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),vp=hp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),yp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yp([0,.65,.55,1]),circOut:yp([.55,0,1,.45]),backIn:yp([.31,.01,.66,-.59]),backOut:yp([.33,1.53,.69,.99])};function bp(e,t){return e?"function"==typeof e?vp()?lf(e,t):"ease-out":ed(e)?yp(e):Array.isArray(e)?e.map(e=>bp(e,t)||gp.easeOut):gp[e]:void 0}function xp(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=bp(s,i);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function wp(e){return"function"==typeof e&&"applyToOptions"in e}class Ep extends Bf{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=o,this.options=e,Su("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return wp(e)&&vp()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=xp(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=Lf(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),fp(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Ru(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ru(e)}get time(){return Ru(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_u(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&mp()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Mu):r(this)}}const Op={anticipate:Yu,backInOut:Hu,circInOut:Xu};function Sp(e){"string"==typeof e.ease&&e.ease in Op&&(e.ease=Op[e.ease])}class kp extends Ep{constructor(e){Sp(e),Vf(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const a=new $f({...o,autoplay:!1}),s=Math.max(10,dd.now()-this.startTime),l=wu(0,10,s-10),c=a.sample(s).value,{name:u}=this.options;i&&u&&fp(i,u,c),t.setWithVelocity(a.sample(Math.max(0,s-l)).value,c,l),a.stop()}}const Pp=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Kd.test(e)&&"0"!==e||e.startsWith("url(")));function Ap(e){e.duration=0,e.type="keyframes"}const jp=new Set(["opacity","clipPath","filter","transform"]),Tp=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Mp=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Cp=Tu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Np(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Cp()&&n&&(jp.has(n)||Mp.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&Tp.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!u)&&!c&&!r&&"mirror"!==i&&0!==o&&"inertia"!==a}class Ip extends Bf{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dd.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:s,motionValue:l,element:c,...u},f=c?.KeyframeResolver||dp;this.keyframeResolver=new f(a,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=dd.now();let u=!0;(function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],a=Pp(i,t),s=Pp(o,t);return Ou(a===s,`You are trying to animate ${t} from "${i}" to "${o}". "${a?o:i}" is not an animatable value.`,"value-not-animatable"),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||wp(n))&&r)})(e,i,o,a)||(u=!1,!ku.instantAnimations&&s||c?.(Lf(e,n,t)),e[0]=e[e.length-1],Ap(n),n.repeat=0);const d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!l&&Np(d),p=d.motionValue?.owner?.current;let h;if(f)try{h=new kp({...d,element:p})}catch{h=new $f(d)}else h=new $f(d);h.finished.then(()=>{this.notifyFinished()}).catch(Mu),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),lp=!0,up(),cp(),lp=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Dp(e,t,n,r=0,i=1){const o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,s=(a-1)*r;return"function"==typeof n?n(o,a):1===i?o*r:s-o*r}const _p=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Rp(e,t,n=1){Su(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=function(e){const t=_p.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return Pu(e)?parseFloat(e):e}return md(i)?Rp(i,t,n+1):i}const Lp={type:"spring",stiffness:500,damping:25,restSpeed:10},zp={type:"keyframes",duration:.8},Vp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Bp=(e,{keyframes:t})=>t.length>2?zp:ep.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Lp:Vp;function Fp(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function $p(e,t){const n=e?.[t]??e?.default??e;return n!==e?Fp(n,e):n}const Up=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const Wp=(e,t,n,r={},i,o)=>a=>{const s=$p(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=_u(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};(function(e){for(const t in e)if(!Up.has(t))return!0;return!1})(s)||Object.assign(u,Bp(e,u)),u.duration&&(u.duration=_u(u.duration)),u.repeatDelay&&(u.repeatDelay=_u(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Ap(u),0===u.delay&&(d=!0)),(ku.instantAnimations||ku.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Ap(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){const e=Lf(u.keyframes,s);if(void 0!==e)return void od.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new $f(u):new Ip(u)};function Kp(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Hp(e,t,n,r){if("function"==typeof t){const[i,o]=Kp(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=Kp(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function Yp(e,t,n){const r=e.getProps();return Hp(r,t,void 0!==n?n:r.custom,e)}const qp=new Set(["width","height","top","left","right","bottom",...Qf]);class Gp{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=dd.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=dd.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&Vu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Du);const n=this.events[e].add(t);return"change"===e?()=>{n(),od.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=dd.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Lu(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xp(e,t){return new Gp(e,t)}const Zp=e=>Array.isArray(e);function Jp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xp(n))}function Qp(e){return Zp(e)?e[e.length-1]||0:e}const eh=e=>Boolean(e&&e.getVelocity);function th(e,t){const n=e.getValue("willChange");if(r=n,Boolean(eh(r)&&r.add))return n.add(t);if(!n&&ku.WillChange){const n=new ku.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function nh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const rh="data-"+nh("framerAppearId");function ih(e){return e.props[rh]}function oh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function ah(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:a,...s}=t;const l=e.getDefaultTransition();o=o?Fp(o,l):l;const c=o?.reduceMotion;r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const t in s){const r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(void 0===i||d&&oh(d,t))continue;const a={delay:n,...$p(o||{},t)},l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!a.velocity){od.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){const n=ih(e);if(n){const e=window.MotionHandoffAnimation(n,t,od);null!==e&&(a.startTime=e,f=!0)}}th(e,t);const p=c??e.shouldReduceMotion;r.start(Wp(t,r,i,p&&qp.has(t)?{type:!1}:a,e,f));const h=r.animation;h&&u.push(h)}if(a){const t=()=>od.update(()=>{a&&function(e,t){const n=Yp(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const t in o)Jp(e,t,Qp(o[t]))}(e,a)});u.length?Promise.all(u).then(t):t()}return u}function sh(e,t,n={}){const r=Yp(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(ah(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(sh(l,t,{...a,delay:n+("function"==typeof r?0:r)+Dp(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,a,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[e,t]="beforeChildren"===s?[o,a]:[a,o];return e().then(()=>t())}return Promise.all([o(),a(n.delay)])}const lh=e=>t=>t.test(e),ch=[gd,Nd,Cd,Md,Dd,Id,{test:e=>"auto"===e,parse:e=>e}],uh=e=>ch.find(lh(e));function dh(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||ju(e))}const fh=new Set(["brightness","contrast","saturate","opacity"]);function ph(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ed)||[];if(!r)return e;const i=n.replace(r,"");let o=fh.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const hh=/\b([a-z-]*)\(.*?\)/gu,mh={...Kd,getAnimatableNone:e=>{const t=e.match(hh);return t?t.map(ph).join(" "):e}},vh={...Kd,getAnimatableNone:e=>{const t=Kd.parse(e);return Kd.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},yh={...gd,transform:Math.round},gh={borderWidth:Nd,borderTopWidth:Nd,borderRightWidth:Nd,borderBottomWidth:Nd,borderLeftWidth:Nd,borderRadius:Nd,borderTopLeftRadius:Nd,borderTopRightRadius:Nd,borderBottomRightRadius:Nd,borderBottomLeftRadius:Nd,width:Nd,maxWidth:Nd,height:Nd,maxHeight:Nd,top:Nd,right:Nd,bottom:Nd,left:Nd,inset:Nd,insetBlock:Nd,insetBlockStart:Nd,insetBlockEnd:Nd,insetInline:Nd,insetInlineStart:Nd,insetInlineEnd:Nd,padding:Nd,paddingTop:Nd,paddingRight:Nd,paddingBottom:Nd,paddingLeft:Nd,paddingBlock:Nd,paddingBlockStart:Nd,paddingBlockEnd:Nd,paddingInline:Nd,paddingInlineStart:Nd,paddingInlineEnd:Nd,margin:Nd,marginTop:Nd,marginRight:Nd,marginBottom:Nd,marginLeft:Nd,marginBlock:Nd,marginBlockStart:Nd,marginBlockEnd:Nd,marginInline:Nd,marginInlineStart:Nd,marginInlineEnd:Nd,fontSize:Nd,backgroundPositionX:Nd,backgroundPositionY:Nd,...{rotate:Md,rotateX:Md,rotateY:Md,rotateZ:Md,scale:xd,scaleX:xd,scaleY:xd,scaleZ:xd,skew:Md,skewX:Md,skewY:Md,distance:Nd,translateX:Nd,translateY:Nd,translateZ:Nd,x:Nd,y:Nd,z:Nd,perspective:Nd,transformPerspective:Nd,opacity:bd,originX:_d,originY:_d,originZ:Nd},zIndex:yh,fillOpacity:bd,strokeOpacity:bd,numOctaves:yh},bh={...gh,color:Ld,backgroundColor:Ld,outlineColor:Ld,fill:Ld,stroke:Ld,borderColor:Ld,borderTopColor:Ld,borderRightColor:Ld,borderBottomColor:Ld,borderLeftColor:Ld,filter:mh,WebkitFilter:mh,mask:vh,WebkitMask:vh},xh=e=>bh[e],wh=new Set([mh,vh]);function Eh(e,t){let n=xh(e);return wh.has(n)||(n=Kd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Oh=new Set(["auto","none","0"]);class Sh extends dp{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),md(r))){const i=Rp(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!qp.has(n)||2!==e.length)return;const[r,i]=e,o=uh(r),a=uh(i);if(yd(r)!==yd(i)&&ip[n])this.needsMeasurement=!0;else if(o!==a)if(tp(o)&&tp(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else ip[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||dh(e[t]))&&n.push(t);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!Oh.has(t)&&$d(t).values.length&&(r=e[i]),i++}if(r&&n)for(const i of t)e[i]=Eh(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ip[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,o=n[i];n[i]=ip[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function kh(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Ph=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Ah(e){return Au(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:jh}=id(queueMicrotask,!1),Th={x:!1,y:!1};function Mh(){return Th.x||Th.y}function Ch(e,t){const n=kh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Nh(e,t,n={}){const[r,i,o]=Ch(e,n);return r.forEach(e=>{let n,r=!1,o=!1;const a=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,a(e))},l=e=>{"touch"!==e.pointerType&&(r?o=!0:a(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Mh())return;o=!1;const a=t(e,r);"function"==typeof a&&(n=a,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",s,i)},i)}),o}const Ih=(e,t)=>!!t&&(e===t||Ih(e,t.parentElement)),Dh=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,_h=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Rh=new Set(["INPUT","SELECT","TEXTAREA"]);const Lh=new WeakSet;function zh(e){return t=>{"Enter"===t.key&&e(t)}}function Vh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Bh(e){return Dh(e)&&!Mh()}const Fh=new WeakSet;function $h(e,t,n={}){const[r,i,o]=Ch(e,n),a=e=>{const r=e.currentTarget;if(!Bh(e))return;if(Fh.has(e))return;Lh.add(r),n.stopPropagation&&Fh.add(e);const o=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Lh.has(r)&&Lh.delete(r),Bh(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{a(e,r===window||r===document||n.useGlobalTarget||Ih(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,i),Ah(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=zh(()=>{if(Lh.has(n))return;Vh(n,"down");const e=zh(()=>{Vh(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Vh(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,_h.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function Uh(e){return Au(e)&&"ownerSVGElement"in e}const Wh=new WeakMap;let Kh;const Hh=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Uh(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Yh=Hh("inline","width","offsetWidth"),qh=Hh("block","height","offsetHeight");function Gh({target:e,borderBoxSize:t}){Wh.get(e)?.forEach(n=>{n(e,{get width(){return Yh(e,t)},get height(){return qh(e,t)}})})}function Xh(e){e.forEach(Gh)}function Zh(e,t){Kh||"undefined"!=typeof ResizeObserver&&(Kh=new ResizeObserver(Xh));const n=kh(e);return n.forEach(e=>{let n=Wh.get(e);n||(n=new Set,Wh.set(e,n)),n.add(t),Kh?.observe(e)}),()=>{n.forEach(e=>{const n=Wh.get(e);n?.delete(t),n?.size||Kh?.unobserve(e)})}}const Jh=new Set;let Qh;function em(e){return Jh.add(e),Qh||(Qh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Jh.forEach(t=>t(e))},window.addEventListener("resize",Qh)),()=>{Jh.delete(e),Jh.size||"function"!=typeof Qh||(window.removeEventListener("resize",Qh),Qh=void 0)}}function tm(e,t){return"function"==typeof e?em(e):Zh(e,t)}const nm=[...ch,Ld,Kd],rm=()=>({x:{min:0,max:0},y:{min:0,max:0}}),im=new WeakMap;function om(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function am(e){return"string"==typeof e||Array.isArray(e)}const sm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lm=["initial",...sm];function cm(e){return om(e.animate)||lm.some(t=>am(e[t]))}function um(e){return Boolean(cm(e)||e.variants)}const dm={current:null},fm={current:!1},pm="undefined"!=typeof window;const hm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let mm={};function vm(e){mm=e}class ym{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=dp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=dd.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,od.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=cm(t),this.isVariantNode=um(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&eh(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,im.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(fm.current||function(){if(fm.current=!0,pm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dm.current=e.matches;e.addEventListener("change",t),t()}else dm.current=!1}(),this.shouldReduceMotion=dm.current),"production"!==process.env.NODE_ENV&&Vu(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ad(this.notifyUpdate),ad(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&jp.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:i,ease:o,duration:a}=t.accelerate,s=new Ep({element:this.current,name:e,keyframes:r,times:i,ease:o,duration:_u(a)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=ep.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&od.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in mm){const t=mm[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<hm.length;t++){const n=hm[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(eh(i))e.addValue(r,i);else if(eh(o))e.addValue(r,Xp(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,Xp(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Xp(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(Pu(n)||ju(n))?n=parseFloat(n):(r=n,!nm.find(lh(r))&&Kd.test(t)&&(n=Eh(e,t))),this.setBaseTarget(e,eh(n)?n.get():n)),eh(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=Hp(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||eh(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new Du),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){jh.render(this.render)}}class gm extends ym{constructor(){super(...arguments),this.KeyframeResolver=Sh}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;eh(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class bm{constructor(e){this.isMounted=!1,this.node=e}update(){}}function xm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wm(e){return void 0===e||1===e}function Em({scale:e,scaleX:t,scaleY:n}){return!wm(e)||!wm(t)||!wm(n)}function Om(e){return Em(e)||Sm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Sm(e){return km(e.x)||km(e.y)}function km(e){return e&&"0%"!==e}function Pm(e,t,n){return n+t*(e-n)}function Am(e,t,n,r,i){return void 0!==i&&(e=Pm(e,i,r)),Pm(e,n,r)+t}function jm(e,t=0,n=1,r,i){e.min=Am(e.min,t,n,r,i),e.max=Am(e.max,t,n,r,i)}function Tm(e,{x:t,y:n}){jm(e.x,t.translate,t.scale,t.originPoint),jm(e.y,n.translate,n.scale,n.originPoint)}const Mm=.999999999999,Cm=1.0000000000001;function Nm(e,t){e.min+=t,e.max+=t}function Im(e,t,n,r,i=.5){jm(e,t,n,qd(e.min,e.max,i),r)}function Dm(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function _m(e,t,n){const r=n??e;Im(e.x,Dm(t.x,r.x),t.scaleX,t.scale,t.originX),Im(e.y,Dm(t.y,r.y),t.scaleY,t.scale,t.originY)}function Rm(e,t){return xm(function(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}}(e.getBoundingClientRect(),t))}const Lm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zm=Qf.length;function Vm(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(ep.has(e))a=!0;else if(pd(e))i[e]=n;else{const t=Ph(n,gh[e]);e.startsWith("origin")?(s=!0,o[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<zm;o++){const a=Qf[o],s=e[a];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(a.startsWith("scale")?1:0);else{const e=parseFloat(s);l=a.startsWith("scale")?1===e:0===e}if(!l||n){const e=Ph(s,gh[a]);l||(i=!1,r+=`${Lm[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function Bm(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];for(a in i?.applyProjectionStyles(o,r),n)o.setProperty(a,n[a])}function Fm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $m={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Nd.test(e))return e;e=parseFloat(e)}return`${Fm(e,t.target.x)}% ${Fm(e,t.target.y)}%`}},Um={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Kd.parse(e);if(i.length>5)return r;const o=Kd.createTransformer(e),a="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const c=qd(s,l,.5);return"number"==typeof i[2+a]&&(i[2+a]/=c),"number"==typeof i[3+a]&&(i[3+a]/=c),o(i)}},Wm={borderRadius:{...$m,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$m,borderTopRightRadius:$m,borderBottomLeftRadius:$m,borderBottomRightRadius:$m,boxShadow:Um};function Km(e,{layout:t,layoutId:n}){return ep.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Wm[e]||"opacity"===e)}function Hm(e,t,n){const r=e.style,i=t?.style,o={};if(!r)return o;for(const t in r)(eh(r[t])||i&&eh(i[t])||Km(t,e)||void 0!==n?.getValue(t)?.liveStyle)&&(o[t]=r[t]);return o}class Ym extends gm{constructor(){super(...arguments),this.type="html",this.renderInstance=Bm}readValueFromInstance(e,t){if(ep.has(t))return this.projection?.isProjecting?Xf(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zf(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(pd(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Rm(e,t)}build(e,t,n){Vm(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Hm(e,t,n)}}const qm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gm={offset:"strokeDashoffset",array:"strokeDasharray"};const Xm=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zm(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},l,c,u){if(Vm(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const e of Xm)void 0!==d[e]&&(f[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?qm:Gm;e[o.offset]=""+-r,e[o.array]=`${t} ${n}`}(d,i,o,a,!1)}const Jm=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"]),Qm=e=>"string"==typeof e&&"svg"===e.toLowerCase();function ev(e,t,n){const r=Hm(e,t,n);for(const n in e)if(eh(e[n])||eh(t[n])){r[-1!==Qf.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}class tv extends gm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rm}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ep.has(t)){const e=xh(t);return e&&e.default||0}return t=Jm.has(t)?t:nh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ev(e,t,n)}build(e,t,n){Zm(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Bm(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Jm.has(n)?n:nh(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Qm(e.tagName),super.mount(e)}}const nv=lm.length;function rv(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&rv(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<nv;n++){const r=lm[n],i=e.props[r];(am(i)||!1===i)&&(t[r]=i)}return t}function iv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const ov=[...sm].reverse(),av=sm.length;function sv(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>sh(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=sh(e,t,n);else{const i="function"==typeof t?Yp(e,t,n.custom):t;r=Promise.all(ah(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function lv(e){let t=sv(e),n=dv(),r=!0,i=!1;const o=t=>(n,r)=>{const i=Yp(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(a){const{props:s}=e,l=rv(e.parent)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<av;t++){const p=ov[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],v=am(m),y=p===a?h.isActive:null;!1===y&&(f=t);let g=m===l[p]&&m!==s[p]&&v;if(g&&(r||i)&&e.manuallyAnimateOnMount&&(g=!1),h.protectedKeys={...d},!h.isActive&&null===y||!m&&!h.prevProp||om(m)||"boolean"==typeof m)continue;if("exit"===p&&h.isActive&&!0!==y){h.prevResolvedValues&&(d={...d,...h.prevResolvedValues});continue}const b=cv(h.prevProp,m);let x=b||p===a&&h.isActive&&!g&&v||t>f&&v,w=!1;const E=Array.isArray(m)?m:[m];let O=E.reduce(o(p),{});!1===y&&(O={});const{prevResolvedValues:S={}}=h,k={...S,...O},P=t=>{x=!0,u.has(t)&&(w=!0,u.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=O[e],n=S[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Zp(t)&&Zp(n)?!iv(t,n):t!==n,r?null!=t?P(e):u.add(e):void 0!==t&&u.has(e)?P(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=O,h.isActive&&(d={...d,...O}),(r||i)&&e.blockInitialAnimation&&(x=!1);const A=g&&b;x&&(!A||w)&&c.push(...E.map(t=>{const n={type:p};if("string"==typeof t&&(r||i)&&!A&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Yp(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=Dp(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=Yp(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let p=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,i=!1,p?t(c):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const i=a(t);for(const e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=dv(),i=!0}}}function cv(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!iv(t,e)}function uv(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dv(){return{animate:uv(!0),whileInView:uv(),whileHover:uv(),whileTap:uv(),whileDrag:uv(),whileFocus:uv(),exit:uv()}}function fv(e,t){e.min=t.min,e.max=t.max}function pv(e,t){fv(e.x,t.x),fv(e.y,t.y)}function hv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function mv(e){return e.max-e.min}function vv(e,t,n,r=.5){e.origin=r,e.originPoint=qd(t.min,t.max,e.origin),e.scale=mv(n)/mv(t),e.translate=qd(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function yv(e,t,n,r){vv(e.x,t.x,n.x,r?r.originX:void 0),vv(e.y,t.y,n.y,r?r.originY:void 0)}function gv(e,t,n,r=0){const i=r?qd(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+mv(t)}function bv(e,t,n,r=0){const i=r?qd(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+mv(t)}function xv(e,t,n,r){bv(e.x,t.x,n.x,r?.x),bv(e.y,t.y,n.y,r?.y)}function wv(e,t,n,r,i){return e=Pm(e-=t,1/n,r),void 0!==i&&(e=Pm(e,1/i,r)),e}function Ev(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){Cd.test(t)&&(t=parseFloat(t),t=qd(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=qd(o.min,o.max,r);e===o&&(s-=t),e.min=wv(e.min,t,n,s,i),e.max=wv(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}const Ov=["x","scaleX","originX"],Sv=["y","scaleY","originY"];function kv(e,t,n,r){Ev(e.x,t,Ov,n?n.x:void 0,r?r.x:void 0),Ev(e.y,t,Sv,n?n.y:void 0,r?r.y:void 0)}function Pv(e){return 0===e.translate&&1===e.scale}function Av(e){return Pv(e.x)&&Pv(e.y)}function jv(e,t){return e.min===t.min&&e.max===t.max}function Tv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mv(e,t){return Tv(e.x,t.x)&&Tv(e.y,t.y)}function Cv(e){return mv(e.x)/mv(e.y)}function Nv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Iv(e){return[e("x"),e("y")]}const Dv=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],_v=Dv.length,Rv=e=>"string"==typeof e?parseFloat(e):e,Lv=e=>"number"==typeof e||Nd.test(e);function zv(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Vv=Fv(0,.5,Gu),Bv=Fv(.5,.95,Mu);function Fv(e,t,n){return r=>r<e?0:r>t?1:n(Iu(e,t,r))}function $v(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Uv=(e,t)=>e.depth-t.depth;class Wv{constructor(){this.children=[],this.isDirty=!1}add(e){bu(this.children,e),this.isDirty=!0}remove(e){xu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Uv),this.isDirty=!1,this.children.forEach(e)}}function Kv(e){return eh(e)?e.get():e}class Hv{constructor(){this.members=[]}add(e){bu(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(xu(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(xu(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;void 0!==r&&r===i||(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Yv={hasAnimatedSinceResize:!0,hasEverUpdated:!1},qv=["","X","Y","Z"];let Gv=0;function Xv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Zv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ih(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",od,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Zv(r)}function Jv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Gv++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ty),this.nodes.forEach(uy),this.nodes.forEach(dy),this.nodes.forEach(ny)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wv)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Du),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=Uh(t)&&!(Uh(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const i=()=>this.root.updateBlockedByResize=!1;od.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=dd.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ad(r),e(o-t))};return od.setup(r,!0),()=>ad(r)}(i,250),Yv.hasAnimatedSinceResize&&(Yv.hasAnimatedSinceResize=!1,this.nodes.forEach(cy)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||yy,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!Mv(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...$p(i,"layout"),onPlay:a,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||cy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ad(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(fy),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Zv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,"string"!=typeof t.latestValues.x&&"string"!=typeof t.latestValues.y||(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(oy),void this.nodes.forEach(iy)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(ay);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sy),this.nodes.forEach(ly),this.nodes.forEach(Qv),this.nodes.forEach(ey)):this.nodes.forEach(ay),this.clearAllSnapshots();const e=dd.now();sd.delta=wu(0,1e3/60,e-sd.timestamp),sd.timestamp=e,sd.isProcessing=!0,ld.update.process(sd),ld.preRender.process(sd),ld.render.process(sd),sd.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ry),this.sharedNodes.forEach(py)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,od.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){od.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||mv(this.snapshot.measuredBox.x)||mv(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Av(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Om(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),xy((r=n).x),xy(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ey))){const{scroll:e}=this.root;e&&(Nm(t.x,e.offset.x),Nm(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(pv(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&pv(t,e),Nm(t.x,i.offset.x),Nm(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};pv(r,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Nm(r.x,-n.scroll.offset.x),Nm(r.y,-n.scroll.offset.y)),Om(n.latestValues)&&_m(r,n.latestValues,n.layout?.layoutBox)}return Om(this.latestValues)&&_m(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};pv(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!Om(n.latestValues))continue;let r;n.instance&&(Em(n.latestValues)&&n.updateSnapshot(),r=rm(),pv(r,n.measurePageBox())),kv(t,n.latestValues,n.snapshot?.layoutBox,r)}return Om(this.latestValues)&&kv(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==sd.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:i}=this.options;if(!this.layout||!r&&!i)return;this.resolvedRelativeTargetAt=sd.timestamp;const o=this.getClosestProjectingParent();var a,s,l,c;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,gv(a.x,s.x,l.x,c?.x),gv(a.y,s.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):pv(this.target,this.layout.layoutBox),Tm(this.target,this.targetDelta)):pv(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Em(this.parent.latestValues)&&!Sm(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},xv(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),pv(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===sd.timestamp&&(n=!1),n)return;const{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!i)return;pv(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,a;t.x=t.y=1;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Nm(e.x,-o.scroll.offset.x),Nm(e.y,-o.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Tm(e,a)),r&&Om(o.latestValues)&&_m(e,o.latestValues,o.layout?.layoutBox))}t.x<Cm&&t.x>Mm&&(t.x=1),t.y<Cm&&t.y>Mm&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(hv(this.prevProjectionDelta.x,this.projectionDelta.x),hv(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),yv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&Nv(this.projectionDelta.x,this.prevProjectionDelta.x)&&Nv(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(vy));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;hy(o.x,e.x,n),hy(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xv(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(e,t,n,r){my(e.x,t.x,n.x,r),my(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return jv(e.x,t.x)&&jv(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),pv(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=qd(0,n.opacity??1,Vv(r)),e.opacityExit=qd(t.opacity??1,0,Bv(r))):o&&(e.opacity=qd(t.opacity??1,n.opacity??1,r));for(let i=0;i<_v;i++){const o=Dv[i];let a=zv(t,o),s=zv(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Lv(a)===Lv(s)?(e[o]=Math.max(qd(Rv(a),Rv(s),r),0),(Cd.test(s)||Cd.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=qd(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ad(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=od.update(()=>{Yv.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xp(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=eh(e)?e:Xp(e);return r.start(Wp("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&wy(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=mv(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=mv(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}pv(t,n),_m(t,i),yv(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Hv);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Xv("z",e,r,this.animationValues);for(let t=0;t<qv.length;t++)Xv(`rotate${qv[t]}`,e,r,this.animationValues),Xv(`skew${qv[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Kv(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Kv(t?.pointerEvents)||""),void(this.hasProjected&&!Om(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;const{x:a,y:s}=this.projectionDelta;e.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const t in Wm){if(void 0===i[t])continue;const{correct:n,applyTo:a,isCSSVariable:s}=Wm[t],l="none"===o?i[t]:n(i[t],r);if(a){const t=a.length;for(let n=0;n<t;n++)e[a[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?Kv(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(iy),this.root.sharedNodes.clear()}}}function Qv(e){e.updateLayout()}function ey(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if("size"===i)Iv(e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],i=mv(r);r.min=n[e].min,r.max=r.min+i});else if("x"===i||"y"===i){const e="x"===i?"y":"x";fv(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else wy(i,t.layoutBox,n)&&Iv(r=>{const i=o?t.measuredBox[r]:t.layoutBox[r],a=mv(n[r]);i.max=i.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};yv(a,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?yv(s,e.applyTransform(r,!0),t.measuredBox):yv(s,n,t.layoutBox);const l=!Av(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const a=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};xv(s,t.layoutBox,i.layoutBox,a);const l={x:{min:0,max:0},y:{min:0,max:0}};xv(l,n,o.layoutBox,a),Mv(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ty(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ny(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ry(e){e.clearSnapshot()}function iy(e){e.clearMeasurements()}function oy(e){e.isLayoutDirty=!0,e.updateLayout()}function ay(e){e.isLayoutDirty=!1}function sy(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ly(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uy(e){e.resolveTargetDelta()}function dy(e){e.calcProjection()}function fy(e){e.resetSkewAndRotation()}function py(e){e.removeLeadSnapshot()}function hy(e,t,n){e.translate=qd(t.translate,0,n),e.scale=qd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function my(e,t,n,r){e.min=qd(t.min,n.min,r),e.max=qd(t.max,n.max,r)}function vy(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const yy={duration:.45,ease:[.4,0,.1,1]},gy=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),by=gy("applewebkit/")&&!gy("chrome/")?Math.round:Mu;function xy(e){e.min=by(e.min),e.max=by(e.max)}function wy(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Cv(t),i=Cv(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Ey(e){return e!==e.root&&e.scroll?.wasRoot}const Oy=Jv({attachResizeListener:(e,t)=>$v(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Sy={current:void 0},ky=Jv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sy.current){const e=new Oy({});e.mount(window),e.setOptions({layoutScroll:!0}),Sy.current=e}return Sy.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Py=o({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ay(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function jy(...t){return e.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Ay(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Ay(e[t],null)}}}}(...t),t)}class Ty extends e.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Ah(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Ah(e)&&e.offsetWidth||0,r=Ah(e)&&e.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function My({children:t,isPresent:n,anchorX:r,anchorY:o,root:a,pop:l}){const d=c(),f=s(null),p=s({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=i(Py),m=t.props?.ref??t?.ref,v=jy(f,m);return u(()=>{const{width:e,height:t,top:i,left:s,right:c,bottom:u}=p.current;if(n||!1===l||!f.current||!e||!t)return;const m="left"===r?`left: ${s}`:`right: ${c}`,v="bottom"===o?`bottom: ${u}`:`top: ${i}`;f.current.dataset.motionPopId=d;const y=document.createElement("style");h&&(y.nonce=h);const g=a??document.head;return g.appendChild(y),y.sheet&&y.sheet.insertRule(`\n [data-motion-pop-id="${d}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${m}px !important;\n ${v}px !important;\n }\n `),()=>{f.current?.removeAttribute("data-motion-pop-id"),g.contains(y)&&g.removeChild(y)}},[n]),N.jsx(Ty,{isPresent:n,childRef:f,sizeRef:p,pop:l,children:!1===l?t:e.cloneElement(t,{ref:v})})}const Cy=({children:t,initial:n,isPresent:r,onExitComplete:i,custom:o,presenceAffectsLayout:a,mode:s,anchorX:l,anchorY:u,root:f})=>{const p=vu(Ny),h=c();let m=!0,v=d(()=>(m=!1,{id:h,initial:n,isPresent:r,custom:o,onExitComplete:e=>{p.set(e,!0);for(const e of p.values())if(!e)return;i&&i()},register:e=>(p.set(e,!1),()=>p.delete(e))}),[r,p,i]);return a&&m&&(v={...v}),d(()=>{p.forEach((e,t)=>p.set(t,!1))},[r]),e.useEffect(()=>{!r&&!p.size&&i&&i()},[r]),t=N.jsx(My,{pop:"popLayout"===s,isPresent:r,anchorX:l,anchorY:u,root:f,children:t}),N.jsx(gu.Provider,{value:v,children:t})};function Ny(){return new Map}function Iy(e=!0){const t=i(gu);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=c();l(()=>{if(e)return o(a)},[e]);const s=f(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}const Dy=e=>e.key||"";function _y(e){const t=[];return p.forEach(e,e=>{h(e)&&t.push(e)}),t}const Ry=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:l=!1,anchorX:c="left",anchorY:u="top",root:f})=>{const[p,h]=Iy(l),v=d(()=>_y(e),[e]),y=l&&!p?[]:v.map(Dy),g=s(!0),b=s(v),x=vu(()=>new Map),w=s(new Set),[E,O]=m(v),[S,k]=m(v);yu(()=>{g.current=!1,b.current=v;for(let e=0;e<S.length;e++){const t=Dy(S[e]);y.includes(t)?(x.delete(t),w.current.delete(t)):!0!==x.get(t)&&x.set(t,!1)}},[S,y.length,y.join("-")]);const P=[];if(v!==E){let e=[...v];for(let t=0;t<S.length;t++){const n=S[t],r=Dy(n);y.includes(r)||(e.splice(t,0,n),P.push(n))}return"wait"===a&&P.length&&(e=P),k(_y(e)),O(v),null}"production"!==process.env.NODE_ENV&&"wait"===a&&S.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:A}=i(mu);return N.jsx(N.Fragment,{children:S.map(e=>{const i=Dy(e),s=!(l&&!p)&&(v===S||y.includes(i));return N.jsx(Cy,{isPresent:s,initial:!(g.current&&!n)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:f,onExitComplete:s?void 0:()=>{if(w.current.has(i))return;if(!x.has(i))return;w.current.add(i),x.set(i,!0);let e=!0;x.forEach(t=>{t||(e=!1)}),e&&(A?.(),k(b.current),l&&h?.(),r&&r())},anchorX:c,anchorY:u,children:e},i)})})},Ly=o({strict:!1}),zy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Vy=!1;function By(){return function(){if(Vy)return;const e={};for(const t in zy)e[t]={isEnabled:e=>zy[t].some(t=>!!e[t])};vm(e),Vy=!0}(),mm}const Fy=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function $y(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Fy.has(e)}let Uy=e=>!$y(e);try{"function"==typeof(Wy=require("@emotion/is-prop-valid").default)&&(Uy=e=>e.startsWith("on")?!$y(e):Wy(e))}catch{}var Wy;const Ky=o({});function Hy(e){const{initial:t,animate:n}=function(e,t){if(cm(e)){const{initial:t,animate:n}=e;return{initial:!1===t||am(t)?t:void 0,animate:am(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,i(Ky));return d(()=>({initial:t,animate:n}),[Yy(t),Yy(n)])}function Yy(e){return Array.isArray(e)?e.join(" "):e}const qy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Gy(e,t,n){for(const r in t)eh(t[r])||Km(r,n)||(e[r]=t[r])}function Xy(e,t){const n={};return Gy(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Vm(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Zy(e,t){const n={},r=Xy(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Jy=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Qy(e,t,n,r){const i=d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Zm(n,t,Qm(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Gy(t,e.style,e),i.style={...t,...i.style}}return i}const eg=["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 tg(e){return"string"==typeof e&&!e.includes("-")&&!!(eg.indexOf(e)>-1||/[A-Z]/u.test(e))}function ng(e,t,r,{latestValues:i},o,a=!1,s){const l=(s??tg(e)?Qy:Zy)(t,i,o,e),c=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||eh(e[i])||(Uy(i)||!0===n&&$y(i)||!t&&!$y(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),u=e!==v?{...c,...l,ref:r}:{},{children:f}=t,p=d(()=>eh(f)?f.get():f,[f]);return n(e,{...u,children:p})}function rg(e,t,n,r){const i={},o=r(e,{});for(const e in o)i[e]=Kv(o[e]);let{initial:a,animate:s}=e;const l=cm(e),c=um(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!om(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Hp(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(i[e]=t)}for(const t in e)i[t]=e[t]}}}return i}const ig=e=>(t,n)=>{const r=i(Ky),o=i(gu),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:rg(n,r,i,e),renderState:t()}}(e,t,r,o);return n?a():vu(a)},og=ig({scrapeMotionValuesFromProps:Hm,createRenderState:qy}),ag=ig({scrapeMotionValuesFromProps:ev,createRenderState:Jy}),sg=Symbol.for("motionComponentSymbol");function lg(e,t,n){const r=s(n);u(()=>{r.current=n});const i=s(null);return f(n=>{n&&e.onMount?.(n);const o=r.current;if("function"==typeof o)if(n){const e=o(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):o(n);else o&&(o.current=n);t&&(n?t.mount(n):t.unmount())},[t])}const cg=o({});function ug(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function dg(e,t,n,r,o,a){const{visualElement:c}=i(Ky),d=i(Ly),f=i(gu),p=i(Py),h=p.reducedMotion,m=p.skipAnimations,v=s(null),y=s(!1);r=r||d.renderer,!v.current&&r&&(v.current=r(e,{visualState:t,parent:c,props:n,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:h,skipAnimations:m,isSVG:a}),y.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const g=v.current,b=i(cg);!g||g.projection||!o||"html"!==g.type&&"svg"!==g.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fg(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(a)||s&&ug(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(v.current,n,o,b);const x=s(!1);u(()=>{g&&x.current&&g.update(n,f)});const w=n[rh],E=s(Boolean(w)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return yu(()=>{y.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),E.current&&g.animationState&&g.animationState.animateChanges())}),l(()=>{g&&(!E.current&&g.animationState&&g.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),E.current=!1),g.enteringChildren=void 0)}),g}function fg(e){if(e)return!1!==e.options.allowProjection?e.projection:fg(e.parent)}function pg(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&function(e){const t=By();for(const n in e)t[n]={...t[n],...e[n]};vm(t)}(r);const s=n?"svg"===n:tg(e),l=s?ag:og;function c(n,a){let c;const u={...i(Py),...n,layoutId:hg(n)},{isStatic:d}=u,f=Hy(n),p=l(n,d);if(!d&&"undefined"!=typeof window){!function(e,t){const n=i(Ly).strict;if("production"!==process.env.NODE_ENV&&t&&n){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ou(!1,t,"lazy-strict-mode"):Su(!1,t,"lazy-strict-mode")}}(u,r);const t=function(e){const t=By(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);c=t.MeasureLayout,f.visualElement=dg(e,p,u,o,t.ProjectionNode,s)}return N.jsxs(Ky.Provider,{value:f,children:[c&&f.visualElement?N.jsx(c,{visualElement:f.visualElement,...u}):null,ng(e,n,lg(p,f.visualElement,a),p,d,t,s)]})}c.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const u=a(c);return u[sg]=e,u}function hg({layoutId:e}){const t=i(mu).id;return t&&void 0!==e?t+"-"+e:e}function mg(e,t){if("undefined"==typeof Proxy)return pg;const n=new Map,r=(n,r)=>pg(n,r,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&Vu(!1,"motion() is deprecated. Use motion.create() instead."),r(e,t)),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,pg(o,void 0,e,t)),n.get(o))})}const vg=(e,t)=>t.isSVG??tg(e)?new tv(t):new Ym(t,{allowProjection:e!==v});let yg=0;const gg={animation:{Feature:class extends bm{constructor(e){super(e),e.animationState||(e.animationState=lv(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();om(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends bm{constructor(){super(...arguments),this.id=yg++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){const n=Yp(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function bg(e){return{point:{x:e.pageX,y:e.pageY}}}function xg(e,t,n,r){return $v(e,t,(e=>t=>Dh(t)&&e(t,bg(t)))(n),r)}const wg=({current:e})=>e?e.ownerDocument.defaultView:null,Eg=(e,t)=>Math.abs(e-t);const Og=new Set(["auto","scroll"]);class Sg{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=kg(this.lastRawMoveEventInfo,this.transformPagePoint));const e=Ag(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Eg(e.x,t.x),r=Eg(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=sd;this.history.push({...r,timestamp:i});const{onStart:o,onMove:a}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=kg(t,this.transformPagePoint),od.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ag("pointercancel"===e.type?this.lastMoveEventInfo:kg(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Dh(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const s=kg(bg(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=sd;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,Ag(s,this.history)),this.removeListeners=Nu(xg(this.contextWindow,"pointermove",this.handlePointerMove),xg(this.contextWindow,"pointerup",this.handlePointerUp),xg(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Og.has(e.overflowX)||Og.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i=r.x-t.x,o=r.y-t.y;0===i&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=i,this.history[0].y-=o),this.scrollPositions.set(e,r),od.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ad(this.updatePoint)}}function kg(e,t){return t?{point:t(e.point)}:e}function Pg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ag({point:e},t){return{point:e,delta:Pg(e,Tg(t)),offset:Pg(e,jg(t)),velocity:Mg(t,.1)}}function jg(e){return e[0]}function Tg(e){return e[e.length-1]}function Mg(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Tg(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>_u(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*_u(t)&&(r=e[1]);const o=Ru(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Cg(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Ng(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}}const Ig=.35;function Dg(e,t,n){return{min:_g(e,t),max:_g(e,n)}}function _g(e,t){return"number"==typeof e?e:e[t]||0}const Rg=new WeakMap;class Lg{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Sg(e,{onSessionStart:e=>{t&&this.snapToCursor(bg(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Th[o]?null:(Th[o]=!0,()=>{Th[o]=!1}):Th.x||Th.y?null:(Th.x=Th.y=!0,()=>{Th.x=Th.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Iv(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Cd.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=mv(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&od.update(()=>i(e,t),!1,!0),th(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),o&&od.update(()=>o(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:wg(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&od.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Vg(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?qd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?qd(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&ug(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Cg(e.x,n,i),y:Cg(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Ig){return!1===e?e=0:!0===e&&(e=Ig),{x:Dg(e,"left","right"),y:Dg(e,"top","bottom")}}(t),r!==this.constraints&&!ug(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Iv(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ug(e))return!1;const n=e.current;Su(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Rm(e,n),{scroll:i}=t;return i&&(Nm(r.x,i.offset.x),Nm(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Ng(e.x,t.x),y:Ng(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=xm(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=Iv(a=>{if(!Vg(a,t,this.currentDirection))return;let l=s&&s[a]||{};!0!==o&&o!==a||(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(a,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return th(this.visualElement,e),n.start(Wp(e,n,0,t,this.visualElement,!1))}stopAnimation(){Iv(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Iv(t=>{const{drag:n}=this.getProps();if(!Vg(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t],a=i.get()||0;i.set(e[t]-qd(n,o,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ug(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Iv(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=mv(e),i=mv(t);return i>r?n=Iu(t.min,t.max-r,e.min):r>i&&(n=Iu(e.min,e.max-i,t.min)),wu(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Iv(t=>{if(!Vg(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(qd(i,o,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Rg.set(this.visualElement,this);const e=this.visualElement.current,t=xg(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,o=i!==e&&function(e){return Rh.has(e.tagName)||!0===e.isContentEditable}(i);n&&r&&!o&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();ug(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=tm(e,zg(n)),i=tm(t,zg(n));return()=>{r(),i()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),od.read(r);const a=$v(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Iv(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),t(),o(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Ig,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function zg(e){let t=!0;return()=>{t?t=!1:e()}}function Vg(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Bg=e=>(t,n)=>{e&&od.update(()=>e(t,n),!1,!0)};let Fg=!1;class $g extends y{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Fg&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o?(o.isPresent=i,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),Fg=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||od.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),jh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Fg=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ug(e){const[t,n]=Iy(),r=i(mu);return N.jsx($g,{...e,layoutGroup:r,switchLayoutGroup:i(cg),isPresent:t,safeToRemove:n})}const Wg={pan:{Feature:class extends bm{constructor(){super(...arguments),this.removePointerDownListener=Mu}onPointerDown(e){this.session=new Sg(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wg(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Bg(e),onStart:Bg(t),onMove:Bg(n),onEnd:(e,t)=>{delete this.session,r&&od.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=xg(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends bm{constructor(e){super(e),this.removeGroupControls=Mu,this.removeListeners=Mu,this.controls=new Lg(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Mu}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:ky,MeasureLayout:Ug}};function Kg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&od.postRender(()=>i(t,bg(t)))}function Hg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&od.postRender(()=>i(t,bg(t)))}const Yg=new WeakMap,qg=new WeakMap,Gg=e=>{const t=Yg.get(e.target);t&&t(e)},Xg=e=>{e.forEach(Gg)};function Zg(e,t,n){const r=function({root:e,...t}){const n=e||document;qg.has(n)||qg.set(n,{});const r=qg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Xg,{root:e,...t})),r[i]}(t);return Yg.set(e,n),r.observe(e),()=>{Yg.delete(e),r.unobserve(e)}}const Jg={some:0,all:1};const Qg={inView:{Feature:class extends bm{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Jg[r]};this.stopObserver=Zg(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends bm{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=$h(e,(e,t)=>(Hg(this.node,t,"Start"),(e,{success:t})=>Hg(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends bm{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=Nu($v(this.node.current,"focus",()=>this.onFocus()),$v(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends bm{mount(){const{current:e}=this.node;e&&(this.unmount=Nh(e,(e,t)=>(Kg(this.node,t,"Start"),e=>Kg(this.node,e,"End"))))}unmount(){}}}},eb=mg({...gg,...Qg,...Wg,...{layout:{ProjectionNode:ky,MeasureLayout:Ug}}},vg);var tb=[{title:"Dashboard",icon:Ql,url:"#"},{title:"Analytics",icon:Xl,url:"#"},{title:"Products",icon:rc,url:"#"},{title:"Customers",icon:dc,url:"#"},{title:"Tasks",icon:ec,url:"#"},{title:"Settings",icon:ac,url:"#"},{title:"Help",icon:Zl,url:"#"}];function nb(e){var t=e.items,n=void 0===t?tb:t,r=e.onItemClick,i=e.activeItem,o="collapsed"===eu().state;return N.jsxs(nu,{variant:"inset",collapsible:"icon",children:[N.jsx(ou,{className:"h-16 flex items-center px-6 border-b border-border/50",children:N.jsxs("div",{className:"flex items-center gap-2 font-bold text-xl tracking-tight",children:[N.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground shrink-0",children:"B"}),N.jsx(Ry,{mode:"wait",children:!o&&N.jsx(eb.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2},className:"whitespace-nowrap",children:"BMJ UI"})})]})}),N.jsx(su,{children:N.jsxs(lu,{children:[N.jsx(cu,{children:N.jsx(Ry,{mode:"wait",children:!o&&N.jsx(eb.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:"Main Menu"})})}),N.jsx(uu,{children:N.jsx(du,{children:n.map(function(e){return N.jsx(fu,{children:N.jsx(hu,{tooltip:e.title,isActive:i===e.title,onClick:function(){return null==r?void 0:r(e.title)},className:"transition-all duration-200 hover:bg-primary/5 hover:text-primary",render:N.jsxs("button",{type:"button",className:"flex items-center w-full",children:[N.jsx(e.icon,{className:"shrink-0"}),N.jsx(Ry,{mode:"wait",children:!o&&N.jsx(eb.span,{initial:{opacity:0,width:0,marginLeft:0},animate:{opacity:1,width:"auto",marginLeft:8},exit:{opacity:0,width:0,marginLeft:0},transition:{duration:.2},className:"overflow-hidden whitespace-nowrap",children:e.title})})]})})},e.title)})})})]})}),N.jsx(au,{className:"p-4 border-t border-border/50",children:N.jsxs("div",{className:"flex items-center gap-3 min-h-10",children:[N.jsx("div",{className:"w-8 h-8 rounded-full bg-muted shrink-0"}),N.jsx(Ry,{mode:"wait",children:!o&&N.jsxs(eb.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2},className:"flex flex-col overflow-hidden whitespace-nowrap",children:[N.jsx("span",{className:"text-sm font-medium",children:"Bahry Jarbou"}),N.jsx("span",{className:"text-xs text-muted-foreground",children:"Admin"})]})})]})})]})}function rb(t){var n=t.className,r=e.useState(function(){if("undefined"!=typeof window){var e=localStorage.getItem("bmj-ui-theme");return"light"===e||"dark"===e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return"light"}),i=r[0],o=r[1];e.useEffect(function(){var e=window.document.documentElement;e.classList.remove("light","dark"),e.classList.add(i),localStorage.setItem("bmj-ui-theme",i)},[i]);return N.jsx(wn,{variant:"ghost",size:"icon",onClick:function(){o(function(e){return"light"===e?"dark":"light"})},className:n,"aria-label":"Toggle theme",children:"light"===i?N.jsx(nc,{className:"w-5 h-5 transition-all"}):N.jsx(sc,{className:"w-5 h-5 transition-all"})})}Array(12).fill(0);let ib=1;const ob=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:ib++,o=this.toasts.find(e=>e.id===i),a=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:a,title:n}):t):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let o,a=void 0!==r;const s=i.then(async e=>{o=["resolve",e];if(t.isValidElement(e))a=!1,this.create({id:r,type:"default",message:e});else if(ab(e)&&!e.ok){a=!1;const i="function"==typeof n.error?await n.error(`HTTP error! status: ${e.status}`):n.error,o="function"==typeof n.description?await n.description(`HTTP error! status: ${e.status}`):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"error",description:o,...s})}else if(e instanceof Error){a=!1;const i="function"==typeof n.error?await n.error(e):n.error,o="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"error",description:o,...s})}else if(void 0!==n.success){a=!1;const i="function"==typeof n.success?await n.success(e):n.success,o="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"success",description:o,...s})}}).catch(async e=>{if(o=["reject",e],void 0!==n.error){a=!1;const i="function"==typeof n.error?await n.error(e):n.error,o="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"error",description:o,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),null==n.finally||n.finally.call(n)}),l=()=>new Promise((e,t)=>s.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||ib++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ab=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,sb=(e,t)=>{const n=(null==t?void 0:t.id)||ib++;return ob.addToast({title:e,...t,id:n}),n},lb=Object.assign(sb,{success:ob.success,info:ob.info,warning:ob.warning,error:ob.error,custom:ob.custom,message:ob.message,promise:ob.promise,dismiss:ob.dismiss,loading:ob.loading},{getHistory:()=>ob.toasts,getToasts:()=>ob.getActiveToasts()});!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const cb=e.createContext(void 0);function ub(t){const n=e.useContext(cb);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.":K(33));return n}"production"!==process.env.NODE_ENV&&(cb.displayName="MenuPositionerContext");const db=e.createContext(void 0);function fb(t){const n=e.useContext(db);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.":K(36));return n}"production"!==process.env.NODE_ENV&&(db.displayName="MenuRootContext");const pb=e.createContext(void 0);function hb(t=!0){const n=e.useContext(pb);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.":K(25));return n}"production"!==process.env.NODE_ENV&&(pb.displayName="ContextMenuRootContext");const mb={type:"regular-item"};function vb(t){const{closeOnClick:n,disabled:r=!1,highlighted:i,id:o,store:a,typingRef:s=a.context.typingRef,nativeButton:l,itemMetadata:c,nodeId:u}=t,d=e.useRef(null),{getButtonProps:f,buttonRef:p}=yn({disabled:r,focusableWhenDisabled:!0,native:l,composite:!0}),h=function(t){const{closeOnClick:n,highlighted:r,id:i,nodeId:o,store:a,typingRef:s,itemRef:l,itemMetadata:c}=t,{events:u}=a.useState("floatingTreeRoot"),d=hb(!0),f=void 0!==d;return e.useMemo(()=>({id:i,role:"menuitem",tabIndex:r?0:-1,onKeyDown(e){" "===e.key&&s?.current&&e.preventDefault()},onMouseMove(e){o&&u.emit("itemhover",{nodeId:o,target:e.currentTarget})},onClick(e){n&&u.emit("close",{domEvent:e,reason:Ki})},onMouseUp(e){if(d){const t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1)return;if(f&&!Gn&&2===e.button)return}!l.current||!a.context.allowMouseUpTriggerRef.current||f&&2!==e.button||c&&"regular-item"!==c.type||l.current.click()}}),[n,r,i,u,o,a,s,l,d,f,c])}({closeOnClick:n,highlighted:i,id:o,nodeId:u,store:a,typingRef:s,itemRef:d,itemMetadata:c}),m=e.useCallback(e=>L(h,{onMouseEnter(){"submenu-trigger"===c.type&&c.setActive()}},e,f),[h,f,c]),v=q(d,p);return e.useMemo(()=>({getItemProps:m,itemRef:v}),[m,v])}const yb=e.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});"production"!==process.env.NODE_ENV&&(yb.displayName="CompositeListContext");let gb=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function bb(t={}){const{label:n,metadata:r,textRef:i,indexGuessBehavior:o,index:a}=t,{register:s,unregister:l,subscribeMapChange:c,elementsRef:u,labelsRef:d,nextIndexRef:f}=e.useContext(yb),p=e.useRef(-1),[h,m]=e.useState(a??(o===gb.GuessFromOrder?()=>{if(-1===p.current){const e=f.current;f.current+=1,p.current=e}return p.current}:-1)),v=e.useRef(null),y=e.useCallback(e=>{if(v.current=e,-1!==h&&null!==e&&(u.current[h]=e,d)){const t=void 0!==n;d.current[h]=t?n:i?.current?.textContent??e.textContent}},[h,u,d,n,i]);return hn(()=>{if(null!=a)return;const e=v.current;return e?(s(e,r),()=>{l(e)}):void 0},[a,s,l,r]),hn(()=>{if(null==a)return c(e=>{const t=v.current?e.get(v.current)?.index:null;null!=t&&m(t)})},[a,c,m]),e.useMemo(()=>({ref:y,index:h}),[h,y])}const xb=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(xb.displayName="MenuGroupContext");const wb=e.forwardRef(function(t,n){const{render:r,className:i,...o}=t,[a,s]=e.useState(void 0),l=e.useMemo(()=>({setLabelId:s}),[s]),c=le("div",t,{ref:n,props:{role:"group","aria-labelledby":a,...o}});return N.jsx(xb.Provider,{value:l,children:c})});"production"!==process.env.NODE_ENV&&(wb.displayName="MenuGroup");const Eb=e.forwardRef(function(t,n){const{className:r,render:i,id:o,...a}=t,s=Nn(o),{setLabelId:l}=function(){const t=e.useContext(xb);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.":K(31));return t}();return hn(()=>(l(s),()=>{l(void 0)}),[l,s]),le("div",t,{ref:n,props:{id:s,role:"presentation",...a}})});"production"!==process.env.NODE_ENV&&(Eb.displayName="MenuGroupLabel");const Ob=e.forwardRef(function(e,t){const{render:n,className:r,id:i,label:o,nativeButton:a=!1,disabled:s=!1,closeOnClick:l=!0,...c}=e,u=bb({label:o}),d=ub(!0),f=Nn(i),{store:p}=fb(),h=p.useState("isActive",u.index),m=p.useState("itemProps"),{getItemProps:v,itemRef:y}=vb({closeOnClick:l,disabled:s,highlighted:h,id:f,store:p,nativeButton:a,nodeId:d?.nodeId,itemMetadata:mb});return le("div",e,{state:{disabled:s,highlighted:h},props:[m,c,v],ref:[y,t,u.ref]})});"production"!==process.env.NODE_ENV&&(Ob.displayName="MenuItem");const Sb=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(Sb.displayName="ToolbarRootContext");const kb={...ho,...Ri},Pb=e.forwardRef(function(t,n){const{render:r,className:i,finalFocus:o,...a}=t,{store:s}=fb(),{side:l,align:c}=ub(),u=null!=e.useContext(Sb),d=s.useState("open"),f=s.useState("transitionStatus"),p=s.useState("popupProps"),h=s.useState("mounted"),m=s.useState("instantType"),v=s.useState("activeTriggerElement"),y=s.useState("parent"),g=s.useState("lastOpenChangeReason"),b=s.useState("rootId"),x=s.useState("floatingRootContext"),w=s.useState("floatingTreeRoot"),E=s.useState("closeDelay"),O=s.useState("activeTriggerElement"),S="context-menu"===y.type;zi({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),e.useEffect(()=>{function e(e){s.setOpen(!1,Zi(e.reason,e.domEvent))}return w.events.on("close",e),()=>{w.events.off("close",e)}},[w.events,s]);const k=s.useState("hoverEnabled"),P=s.useState("disabled");qs(x,{enabled:k&&!P&&!S&&"menubar"!==y.type,closeDelay:E});const A={transitionStatus:f,side:l,align:c,open:d,nested:"menu"===y.type,instant:m},j=e.useCallback(e=>{s.set("popupElement",e)},[s]),T=le("div",t,{state:A,ref:[n,s.context.popupRef,j],stateAttributesMapping:kb,props:[p,{onKeyDown(e){u&&Ol.has(e.key)&&e.stopPropagation()}},Kc(f),a,{"data-rootownerid":b}]});let M=void 0===y.type||S;return(v||"menubar"===y.type&&g!==Wi)&&(M=!0),N.jsx(oa,{context:x,modal:S,disabled:!h,returnFocus:void 0===o?M:o,initialFocus:"menu"!==y.type,restoreFocus:!0,externalTree:"menubar"!==y.type?w:void 0,previousFocusableElement:O,nextFocusableElement:void 0===y.type?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===y.type?s.context.beforeContentFocusGuardRef:void 0,children:T})});"production"!==process.env.NODE_ENV&&(Pb.displayName="MenuPopup");const Ab=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(Ab.displayName="MenuPortalContext");const jb=e.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=fb();return i.useState("mounted")||n?N.jsx(Ab.Provider,{value:n,children:N.jsx(Ko,{ref:t,...r})}):null});function Tb(t){const{children:n,elementsRef:r,labelsRef:i,onMapChange:o}=t,a=ln(o),s=e.useRef(0),l=Y(Cb).current,c=Y(Mb).current,[u,d]=e.useState(0),f=e.useRef(u),p=ln((e,t)=>{c.set(e,t??null),f.current+=1,d(f.current)}),h=ln(e=>{c.delete(e),f.current+=1,d(f.current)}),m=e.useMemo(()=>{const e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Nb).forEach((t,n)=>{const r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,u]);hn(()=>{if("function"!=typeof MutationObserver||0===m.size)return;const e=new MutationObserver(e=>{const t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(f.current+=1,d(f.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),hn(()=>{f.current===u&&(r.current.length!==m.size&&(r.current.length=m.size),i&&i.current.length!==m.size&&(i.current.length=m.size),s.current=m.size),a(m)},[a,m,r,i,u]),hn(()=>()=>{r.current=[]},[r]),hn(()=>()=>{i&&(i.current=[])},[i]);const v=ln(e=>(l.add(e),()=>{l.delete(e)}));hn(()=>{l.forEach(e=>e(m))},[l,m]);const y=e.useMemo(()=>({register:p,unregister:h,subscribeMapChange:v,elementsRef:r,labelsRef:i,nextIndexRef:s}),[p,h,v,r,i,s]);return N.jsx(yb.Provider,{value:y,children:n})}function Mb(){return new Map}function Cb(){return new Set}function Nb(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}"production"!==process.env.NODE_ENV&&(jb.displayName="MenuPortal");const Ib=e.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:o,render:a,side:s,align:l,sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:m=!1,collisionAvoidance:v=oe,...y}=t,{store:g}=fb(),b=function(){const t=e.useContext(Ab);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Menu.Portal> is missing.":K(32));return t}(),x=hb(!0),w=g.useState("parent"),E=g.useState("floatingRootContext"),O=g.useState("floatingTreeRoot"),S=g.useState("mounted"),k=g.useState("open"),P=g.useState("modal"),A=g.useState("activeTriggerElement"),j=g.useState("transitionStatus"),T=g.useState("positionerElement"),M=g.useState("instantType"),C=g.useState("hasViewport"),I=g.useState("lastOpenChangeReason"),D=g.useState("floatingNodeId"),_=g.useState("floatingParentNodeId"),R=E.useState("domReferenceElement"),L=e.useRef(null),z=Li(T,!1,!1);let V=r,B=c,F=u,$=l,U=v;"context-menu"===w.type&&(V=r??w.context?.anchor,$=$??"start",s||"center"===$||(F=t.alignOffset??2,B=t.sideOffset??-5));let W=s,H=$;"menu"===w.type?(W=W??"inline-end",H=H??"start",U=t.collisionAvoidance??ae):"menubar"===w.type&&(W=W??"bottom",H=H??"start");const Y="context-menu"===w.type,q=Uc({anchor:V,floatingRootContext:E,positionMethod:x?"fixed":i,mounted:S,side:W,sideOffset:B,align:H,alignOffset:F,arrowPadding:Y?0:p,collisionBoundary:d,collisionPadding:f,sticky:h,nodeId:D,keepMounted:b,disableAnchorTracking:m,collisionAvoidance:U,shiftCrossAxis:Y&&!("side"in U&&"flip"===U.side),externalTree:O,adaptiveOrigin:C?Bc:void 0}),G=e.useMemo(()=>{const e={};return k||(e.pointerEvents="none"),{role:"presentation",hidden:!S,style:{...q.positionerStyles,...e}}},[k,S,q.positionerStyles]);e.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===D&&g.set("hoverEnabled",!1),e.nodeId!==D&&e.parentNodeId===g.select("floatingParentNodeId")&&g.setOpen(!1,Zi(Gi)))}return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)}},[g,O.events,D]),e.useEffect(()=>{if(null!=g.select("floatingParentNodeId"))return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==g.select("floatingParentNodeId"))return;const t=e.reason??Gi;g.setOpen(!1,Zi(t))}},[O.events,g]);const X=zn();e.useEffect(()=>{k||X.clear()},[k,X]),e.useEffect(()=>{function e(e){if(k&&e.nodeId===g.select("floatingParentNodeId"))if(e.target&&A&&A!==e.target){const e=g.select("closeDelay");e>0?X.isStarted()||X.start(e,()=>{g.setOpen(!1,Zi(Gi))}):g.setOpen(!1,Zi(Gi))}else X.clear()}return O.events.on("itemhover",e),()=>{O.events.off("itemhover",e)}},[O.events,k,A,g,X]),e.useEffect(()=>{const e={open:k,nodeId:D,parentNodeId:_,reason:g.select("lastOpenChangeReason")};O.events.emit("menuopenchange",e)},[O.events,k,g,D,_]),hn(()=>{const e=R,t=L.current;if(e&&(L.current=e),t&&e&&e!==t){g.set("instantType",void 0);const e=new AbortController;return z(()=>{g.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[R,z,g]);const Z={open:k,side:q.side,align:q.align,anchorHidden:q.anchorHidden,nested:"menu"===w.type,instant:M},J=e.useMemo(()=>({side:q.side,align:q.align,arrowRef:q.arrowRef,arrowUncentered:q.arrowUncentered,arrowStyles:q.arrowStyles,nodeId:q.context.nodeId}),[q.side,q.align,q.arrowRef,q.arrowUncentered,q.arrowStyles,q.context.nodeId]),Q=le("div",t,{state:Z,stateAttributesMapping:ho,ref:[n,g.useStateSetter("positionerElement")],props:[G,Kc(j),y]}),ee=S&&"menu"!==w.type&&("menubar"!==w.type&&P&&I!==$i||"menubar"===w.type&&w.context.modal);let te=null;return"menubar"===w.type?te=w.context.contentElement:void 0===w.type&&(te=A),N.jsxs(cb.Provider,{value:J,children:[ee&&N.jsx(Al,{ref:"context-menu"===w.type||"nested-context-menu"===w.type?w.context.internalBackdropRef:null,inert:Pl(!k),cutout:te}),N.jsx(Qo,{id:D,children:N.jsx(Tb,{elementsRef:g.context.itemDomElements,labelsRef:g.context.itemLabels,children:Q})})]})});"production"!==process.env.NODE_ENV&&(Ib.displayName="MenuPositioner");const Db=e.createContext(null);function _b(t){return e.useContext(Db)}"production"!==process.env.NODE_ENV&&(Db.displayName="MenubarContext");const Rb={...Vs,disabled:os(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:os(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),allowMouseEnter:os(e=>e.allowMouseEnter),stickIfOpen:os(e=>e.stickIfOpen),parent:os(e=>e.parent),rootId:os(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:os(e=>e.activeIndex),isActive:os((e,t)=>e.activeIndex===t),hoverEnabled:os(e=>e.hoverEnabled),instantType:os(e=>e.instantType),lastOpenChangeReason:os(e=>e.openChangeReason),floatingTreeRoot:os(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:os(e=>e.floatingNodeId),floatingParentNodeId:os(e=>e.floatingParentNodeId),itemProps:os(e=>e.itemProps),closeDelay:os(e=>e.closeDelay),hasViewport:os(e=>e.hasViewport),keyboardEventRelay:os(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class Lb extends Ms{constructor(t){super({...{...Ls(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Yo,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:re,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...t},{positionerRef:e.createRef(),popupRef:e.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:e.createRef(),beforeContentFocusGuardRef:e.createRef(),onOpenChangeComplete:void 0,triggerElements:new Rs},Rb),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");return this.unsubscribeParentListener=e.store.subscribe(()=>{const i=e.store.select("rootId"),o=e.store.select("floatingTreeRoot"),a=e.store.select("keyboardEventRelay");t===i&&n===o&&r===a||(t=i,n=o,r=a,this.notifyAll())}),void(this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef)}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){const n=Y(()=>new Lb(t)).current;return e??n}unsubscribeParentListener=null}const zb=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(zb.displayName="MenuSubmenuRootContext");const Vb=Os(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:o,defaultOpen:a=!1,disabled:s=!1,modal:l,loopFocus:c=!0,orientation:u="vertical",actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:h,defaultTriggerId:m=null,highlightItemOnHover:v=!0}=t,y=hb(!0),g=fb(!0),b=_b(),x=e.useContext(zb),w=e.useMemo(()=>x&&g?{type:"menu",store:g.store}:b?{type:"menubar",context:b}:y&&!g?{type:"context-menu",context:y}:{type:void 0},[y,g,b,x]),E=Lb.useStore(p?.store,{open:a,openProp:r,activeTriggerId:m,triggerIdProp:h,parent:w});Tl(()=>{void 0===r&&!1===E.state.open&&!0===a&&E.update({open:!0,activeTriggerId:m})}),E.useControlledProp("openProp",r),E.useControlledProp("triggerIdProp",h),E.useContextCallback("onOpenChangeComplete",o);const O=E.useState("floatingTreeRoot"),S=Jo(O),k=Xo();hn(()=>{y&&!g?E.update({parent:{type:"context-menu",context:y},floatingNodeId:S,floatingParentNodeId:k}):g&&E.update({floatingNodeId:S,floatingParentNodeId:k})},[y,g,S,k,E]);const P=E.useState("open"),A=E.useState("activeTriggerElement"),j=E.useState("positionerElement"),T=E.useState("hoverEnabled"),M=E.useState("modal"),C=E.useState("disabled"),I=E.useState("lastOpenChangeReason"),D=E.useState("parent"),_=E.useState("activeIndex"),R=E.useState("payload"),z=E.useState("floatingParentNodeId"),V=e.useRef(null),B=null!=z;let F;"production"!==process.env.NODE_ENV&&void 0!==D.type&&void 0!==l&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."),E.useSyncedValues({disabled:s,modal:void 0===D.type?l:void 0,rootId:Cn()});const{openMethod:$,triggerProps:U}=Rl(P);Ds(E);const{forceUnmount:W}=_s(P,E,()=>{E.update({allowMouseEnter:!1,stickIfOpen:!0})}),K=e.useRef("context-menu"!==D.type),H=zn();e.useEffect(()=>{if(P||(V.current=null),"context-menu"===D.type)return P?void H.start(500,()=>{K.current=!0}):(H.clear(),void(K.current=!1))},[H,P,D.type]),_l(P&&M&&I!==$i&&"touch"!==$,j),hn(()=>{P||T||E.set("hoverEnabled",!0)},[P,T,E]);const Y=e.useRef(!0),q=zn(),G=ln((e,t)=>{const n=t.reason;if(P===e&&t.trigger===A&&I===n)return;if(t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||(t.trigger=A??void 0),i?.(e,t),t.isCanceled)return;const r={open:e,nativeEvent:t.event,reason:t.reason,nested:B};F?.emit("openchange",r);const o=t.event;if(!1===e&&"click"===o?.type&&"touch"===o.pointerType&&!Y.current)return;if(!e&&null!==_){const e=E.context.itemDomElements.current[_];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}e&&n===Ui?(Y.current=!1,q.start(300,()=>{Y.current=!0})):(Y.current=!0,q.clear());const a=(n===Fi||n===Ki)&&0===o.detail&&o?.isTrusted,s=!e&&(n===Yi||null==n),l={open:e,openChangeReason:n};V.current=t.event??null;const c=t.trigger?.id??null;(c||e)&&(l.activeTriggerId=c,l.activeTriggerElement=t.trigger??null),E.update(l),"menubar"!==D.type||n!==Ui&&n!==Hi&&n!==$i&&n!==qi&&n!==Gi?a||s?E.set("instantType",a?"click":"dismiss"):E.set("instantType",void 0):E.set("instantType","group")}),X=e.useCallback(e=>{const t=Zi(e);return t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},t},[E]),Z=e.useCallback(()=>{E.setOpen(!1,X(Xi))},[E,X]);let J;e.useImperativeHandle(d,()=>({unmount:W,close:Z}),[W,Z]),"context-menu"===D.type&&(J=D.context),e.useImperativeHandle(J?.positionerRef,()=>j,[j]),e.useImperativeHandle(J?.actionsRef,()=>({setOpen:G}),[G]);const Q=Fs({popupStore:E,onOpenChange:G});F=Q.context.events,e.useEffect(()=>{const e=({open:e,eventDetails:t})=>G(e,t);return F.on("setOpen",e),()=>{F?.off("setOpen",e)}},[F,G]);const ee=ca(Q,{enabled:!C,bubbles:{escapeKey:f&&"menu"===D.type},outsidePress:()=>"context-menu"!==D.type||"contextmenu"===V.current?.type||K.current,externalTree:B?O:void 0}),te=ol(Q,{role:"menu"}),re=Rc(),ie=e.useCallback(e=>{E.select("activeIndex")!==e&&E.set("activeIndex",e)},[E]),oe=rl(Q,{enabled:!C,listRef:E.context.itemDomElements,activeIndex:_,nested:void 0!==D.type,loopFocus:c,orientation:u,parentOrientation:"menubar"===D.type?D.context.orientation:void 0,rtl:"rtl"===re,disabledIndices:ne,onNavigate:ie,openOnArrowKeyDown:"context-menu"!==D.type,externalTree:B?O:void 0,focusItemOnHover:v}),ae=e.useCallback(e=>{E.context.typingRef.current=e},[E]),se=function(t,n){const r="rootStore"in t?t.rootStore:t,i=r.context.dataRef,o=r.useState("open"),{listRef:a,elementsRef:s,activeIndex:l,onMatch:c,onTypingChange:u,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=n,h=zn(),m=e.useRef(""),v=e.useRef(p??l??-1),y=e.useRef(null);hn(()=>{(o||null===p)&&(h.clear(),y.current=null,""!==m.current&&(m.current=""))},[o,p,h]),hn(()=>{o&&""===m.current&&(v.current=p??l??-1)},[o,p,l]);const g=ln(e=>{e?i.current.typing||(i.current.typing=e,u?.(e)):i.current.typing&&(i.current.typing=e,u?.(e))}),b=ln(e=>{function t(e){const t=s?.current[e];return!t||Jr(t)}function n(e,n,r=0){if(0===e.length)return-1;const i=(r%e.length+e.length)%e.length,o=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){const r=(i+n)%e.length,a=e[r];if(a?.toLocaleLowerCase().startsWith(o)&&t(r))return r}return-1}const r=a.current;if(m.current.length>0&&" "===e.key&&(mr(e),g(!0)),m.current.length>0&&" "!==m.current[0]&&-1===n(r,m.current)&&" "!==e.key&&g(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;o&&" "!==e.key&&(mr(e),g(!0));const i=""===m.current;i&&(v.current=p??l??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&m.current===e.key&&(m.current="",v.current=y.current),m.current+=e.key,h.start(f,()=>{m.current="",v.current=y.current,g(!1)});const u=((i?p??l??-1:v.current)??0)+1,d=n(r,m.current,u);-1!==d?(c?.(d),y.current=d):" "!==e.key&&(m.current="",g(!1))}),x=ln(e=>{const t=e.relatedTarget,n=r.select("domReferenceElement"),i=r.select("floatingElement"),o=ar(n,t),a=ar(i,t);o||a||(h.clear(),m.current="",v.current=y.current,g(!1))}),w=e.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]),E=e.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return e.useMemo(()=>d?{reference:w,floating:E}:{},[d,w,E])}(Q,{listRef:E.context.itemLabels,elementsRef:E.context.itemDomElements,activeIndex:_,resetMs:500,onMatch:e=>{P&&e!==_&&E.set("activeIndex",e)},onTypingChange:ae}),{getReferenceProps:le,getFloatingProps:ce,getItemProps:ue,getTriggerProps:de}=Zs([ee,te,oe,se]),fe=e.useMemo(()=>{const e=L(le(),{onMouseMove(){E.set("allowMouseEnter",!0)}},U);return delete e.role,e},[le,E,U]),pe=e.useMemo(()=>{const e=de();if(!e)return e;const t=L(e,U);return delete t.role,delete t["aria-controls"],t},[de,U]),he=e.useMemo(()=>ce({onMouseMove(){E.set("allowMouseEnter",!0),"menu"===D.type&&E.set("hoverEnabled",!1)},onClick(){E.select("hoverEnabled")&&E.set("hoverEnabled",!1)},onKeyDown(e){const t=E.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}}),[ce,D.type,E]),me=e.useMemo(()=>ue(),[ue]);E.useSyncedValues({floatingRootContext:Q,activeTriggerProps:fe,inactiveTriggerProps:pe,popupProps:he,itemProps:me});const ve=e.useMemo(()=>({store:E,parent:w}),[E,w]),ye=N.jsx(db.Provider,{value:ve,children:"function"==typeof n?n({payload:R}):n});return void 0===D.type||"context-menu"===D.type?N.jsx(ea,{externalTree:O,children:ye}):ye});function Bb(t){const{render:n,className:r,state:i=re,props:o=ne,refs:a=ne,metadata:s,stateAttributesMapping:l,tag:c="div",...u}=t,{compositeProps:d,compositeRef:f}=function(t={}){const{highlightItemOnHover:n,highlightedIndex:r,onHighlightedIndexChange:i}=vn(),{ref:o,index:a}=bb(t),s=r===a,l=e.useRef(null),c=q(o,l),u=e.useMemo(()=>({tabIndex:s?0:-1,onFocus(){i(a)},onMouseMove(){const e=l.current;if(!n||!e)return;const t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;s||t||e.focus()}}),[s,i,a,n]);return{compositeProps:u,compositeRef:c,index:a}}({metadata:s});return le(c,t,{state:i,ref:[...a,f],props:[d,...o,u],stateAttributesMapping:l})}function Fb(e){return Ft(e)&&e.hasAttribute("data-rootownerid")?e.getAttribute("data-rootownerid")??void 0:Jt(e)?void 0:Fb(tn(e))}"production"!==process.env.NODE_ENV&&(Vb.displayName="MenuRoot");const $b=Ss(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,id:s,openOnHover:l,delay:c=100,closeDelay:u=0,handle:d,payload:f,...p}=t,h=fb(!0),m=d?.store??h?.store;if(!m)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.":K(85));const v=Nn(s),y=m.useState("isTriggerActive",v),g=m.useState("floatingRootContext"),b=m.useState("isOpenedByTrigger",v),x=e.useRef(null),w=function(){const t=hb(!0),n=fb(!0),r=_b(),i=e.useMemo(()=>r?{type:"menubar",context:r}:t&&!n?{type:"context-menu",context:t}:{type:void 0},[t,n,r]);return i}(),O=vn(!0),S=Zo(),k=e.useMemo(()=>S??new Yo,[S]),P=Jo(k),A=Xo(),{registerTrigger:j,isMountedByThisTrigger:T}=Is(v,x,m,{payload:f,closeDelay:u,parent:w,floatingTreeRoot:k,floatingNodeId:P,floatingParentNodeId:A,keyboardEventRelay:O?.relayKeyboardEvent}),M="menubar"===w.type,C=m.useState("disabled"),I=o||C||M&&w.context.disabled,{getButtonProps:D,buttonRef:_}=yn({disabled:I,native:a});e.useEffect(()=>{b||void 0!==w.type||(m.context.allowMouseUpTriggerRef.current=!1)},[m,b,w.type]);const R=e.useRef(null),L=zn(),z=ln(e=>{if(!R.current)return;L.clear(),m.context.allowMouseUpTriggerRef.current=!1;const t=e.target;if(ar(R.current,t)||ar(m.select("positionerElement"),t)||t===R.current)return;if(null!=t&&Fb(t)===m.select("rootId"))return;const n=function(e){const t=e.getBoundingClientRect();if("production"!==process.env.NODE_ENV)return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if("none"===n.content&&"none"===r.content)return t;const i=parseFloat(n.width)||0,o=parseFloat(n.height)||0,a=parseFloat(r.width)||0,s=parseFloat(r.height)||0,l=Math.max(t.width,i,a),c=Math.max(t.height,o,s),u=l-t.width,d=c-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}(R.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||k.events.emit("close",{domEvent:e,reason:"cancel-open"})});e.useEffect(()=>{if(b&&m.select("lastOpenChangeReason")===$i){Bn(R.current).addEventListener("mouseup",z,{once:!0})}},[b,z,m]);const V=M&&w.context.hasSubmenuOpen,B=Xs(g,{enabled:(l??V)&&!I&&"context-menu"!==w.type&&(!M||V&&!T),handleClose:dl({blockPointerEvents:!M}),mouseOnly:!0,move:!1,restMs:void 0===w.type?c:void 0,delay:{close:u},triggerElementRef:x,externalTree:k,isActiveTrigger:y}),F=function(t,n){const r=zn(),[i,o]=e.useState(!1);return hn(()=>{t&&"trigger-hover"===n?(o(!0),r.start(500,()=>{o(!1)})):t||(r.clear(),o(!1))},[t,n,r]),i}(b,m.select("lastOpenChangeReason")),$=function(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.context.dataRef,{enabled:o=!0,event:a="click",toggle:s=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:u=0,reason:d=Fi}=n,f=e.useRef(void 0),p=Ci(),h=zn(),m=e.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current,n=e.nativeEvent,o=r.select("open");if(0!==e.button||"click"===a||gr(t,!0)&&l)return;const m=i.current.openEvent,v=m?.type,y=r.select("domReferenceElement")!==e.currentTarget,g=o&&y||!(o&&s&&(!m||!c||"click"===v||"mousedown"===v));if(ur(n.target)){const e=Zi(d,n,n.target);return void(g&&"touch"===t&&u>0?h.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(g,e))}const b=e.currentTarget;p.request(()=>{const e=Zi(d,n,b);g&&"touch"===t&&u>0?h.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(g,e)})},onClick(e){if("mousedown-only"===a)return;const t=f.current;if("mousedown"===a&&t)return void(f.current=void 0);if(gr(t,!0)&&l)return;const n=r.select("open"),o=i.current.openEvent,p=r.select("domReferenceElement")!==e.currentTarget,m=n&&p||!(n&&s&&(!o||!c||br(o))),v=Zi(d,e.nativeEvent,e.currentTarget);m&&"touch"===t&&u>0?h.start(u,()=>{r.setOpen(!0,v)}):r.setOpen(m,v)},onKeyDown(){f.current=void 0}}),[i,a,l,r,c,s,p,h,u,d]);return e.useMemo(()=>o?{reference:m}:re,[o,m])}(g,{enabled:!I&&"context-menu"!==w.type,event:b&&M?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===w.type&&F}),U=Us(g,{enabled:!I&&V}),W=function(t){const{enabled:n=!0,mouseDownAction:r,open:i}=t,o=e.useRef(!1);return e.useMemo(()=>n?{onMouseDown:e=>{("open"===r&&!i||"close"===r&&i)&&(o.current=!0,Bn(e.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:e=>{o.current&&(o.current=!1,e.preventBaseUIHandler())}}:re,[n,r,i])}({open:b,enabled:M,mouseDownAction:"open"}),H=Zs([$,U]),Y={disabled:I,open:b},q=m.useState("triggerProps",T),G=[R,n,_,j,x],X=[H.getReferenceProps(),B??re,q,{"aria-haspopup":"menu",id:v,onMouseDown:e=>{if(m.select("open"))return;L.start(200,()=>{m.context.allowMouseUpTriggerRef.current=!0});Bn(e.currentTarget).addEventListener("mouseup",z,{once:!0})}},M?{role:"menuitem"}:{},W,p,D],Z=e.useRef(null),J=ln(e=>{E.flushSync(()=>{m.setOpen(!1,Zi(Hi,e.nativeEvent,e.currentTarget))});const t=Oi(Z.current,-1);t?.focus()}),Q=ln(e=>{const t=m.select("positionerElement");if(t&&Si(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{E.flushSync(()=>{m.setOpen(!1,Zi(Hi,e.nativeEvent,e.currentTarget))});let n=Oi(m.context.triggerFocusTargetRef.current||x.current,1);for(;null!==n&&ar(t,n);){const e=n;if(n=wi(n),n===e)break}n?.focus()}}),ee=le("button",t,{enabled:!M,stateAttributesMapping:po,state:Y,ref:G,props:X});return M?N.jsx(Bb,{tag:"button",render:r,className:i,state:Y,refs:G,props:X,stateAttributesMapping:po}):b?N.jsxs(e.Fragment,{children:[N.jsx(Po,{ref:Z,onFocus:J},`${v}-pre-focus-guard`),N.jsx(e.Fragment,{children:ee},v),N.jsx(Po,{ref:m.context.triggerFocusTargetRef,onFocus:Q},`${v}-post-focus-guard`)]}):N.jsx(e.Fragment,{children:ee},v)});function Ub(e){var t=D(e,[]);return N.jsx(Vb,I({"data-slot":"dropdown-menu"},t))}function Wb(e){var t=D(e,[]);return N.jsx($b,I({"data-slot":"dropdown-menu-trigger"},t))}function Kb(e){var t=e.align,n=void 0===t?"start":t,r=e.alignOffset,i=void 0===r?0:r,o=e.side,a=void 0===o?"bottom":o,s=e.sideOffset,l=void 0===s?4:s,c=e.className,u=D(e,["align","alignOffset","side","sideOffset","className"]);return N.jsx(jb,{children:N.jsx(Ib,{className:"isolate z-50 outline-none",align:n,alignOffset:i,side:a,sideOffset:l,children:N.jsx(Pb,I({"data-slot":"dropdown-menu-content",className:Dt("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",c)},u))})})}function Hb(e){var t=D(e,[]);return N.jsx(wb,I({"data-slot":"dropdown-menu-group"},t))}function Yb(e){var t=e.className,n=e.inset,r=D(e,["className","inset"]);return N.jsx(Eb,I({"data-slot":"dropdown-menu-label","data-inset":n,className:Dt("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",t)},r))}function qb(e){var t=e.className,n=e.inset,r=e.variant,i=void 0===r?"default":r,o=D(e,["className","inset","variant"]);return N.jsx(Ob,I({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":i,className:Dt("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",t)},o))}function Gb(e){var t=e.className,n=D(e,["className"]);return N.jsx(to,I({"data-slot":"dropdown-menu-separator",className:Dt("-mx-1 my-1 h-px bg-border",t)},n))}function Xb(){var e=function(e){lb.info("".concat(e," clicked"),{description:"This feature will be implemented soon."})};return N.jsxs("header",{className:"h-16 border-b border-border/50 flex items-center justify-between px-4 sm:px-6 bg-background/80 backdrop-blur-md sticky top-0 z-30",children:[N.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 flex-1",children:[N.jsx(ru,{}),N.jsxs("div",{className:"relative w-full max-w-md hidden md:block",children:[N.jsx(oc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),N.jsx(eo,{placeholder:"Search dashboard...",className:"pl-10 bg-muted/50 border-none focus-visible:ring-1 focus-visible:ring-primary/20"})]}),N.jsx(wn,{variant:"ghost",size:"icon",className:"md:hidden",children:N.jsx(oc,{className:"w-5 h-5"})})]}),N.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[N.jsx("div",{className:"hidden xs:block",children:N.jsx(rb,{})}),N.jsxs(wn,{variant:"ghost",size:"icon",className:"relative",children:[N.jsx(Gl,{className:"w-5 h-5"}),N.jsx("span",{className:"absolute top-2 right-2 w-2 h-2 bg-primary rounded-full border-2 border-background"})]}),N.jsxs(Ub,{children:[N.jsx(Wb,{render:N.jsx(wn,{variant:"ghost",size:"icon",className:"rounded-full"}),children:N.jsx(uc,{className:"w-5 h-5"})}),N.jsx(Kb,{align:"end",className:"w-56",children:N.jsxs(Hb,{children:[N.jsx(Yb,{children:"My Account"}),N.jsx(Gb,{}),N.jsxs(qb,{onClick:function(){return e("Profile")},children:[N.jsx(uc,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Profile"})]}),N.jsxs(qb,{onClick:function(){return e("Billing")},children:[N.jsx(Jl,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Billing"})]}),N.jsxs(qb,{onClick:function(){return e("Team")},children:[N.jsx(dc,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Team"})]}),N.jsxs(qb,{onClick:function(){return e("Subscription")},children:[N.jsx(pc,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Subscription"})]}),N.jsx(Gb,{}),N.jsxs(qb,{variant:"destructive",onClick:function(){return e("Log out")},children:[N.jsx(tc,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Log out"})]})]})})]})]})]})}function Zb(e){var t=e.children,n=e.sidebarItems,r=e.onSidebarItemClick,i=e.activeSidebarItem;return N.jsxs(tu,{children:[N.jsx(nb,{items:n,onItemClick:r,activeItem:i}),N.jsxs(iu,{className:"flex flex-col",children:[N.jsx(Xb,{}),N.jsx("main",{className:"flex-1 p-6 overflow-y-auto",children:t})]})]})}function Jb(e){var t=e.className,n=e.size,r=void 0===n?"default":n,i=D(e,["className","size"]);return N.jsx("div",I({"data-slot":"card","data-size":r,className:Dt("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",t)},i))}function Qb(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"card-header",className:Dt("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",t)},n))}function ex(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"card-title",className:Dt("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",t)},n))}function tx(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"card-description",className:Dt("text-sm text-muted-foreground",t)},n))}function nx(e){var t=e.className,n=D(e,["className"]);return N.jsx("div",I({"data-slot":"card-content",className:Dt("px-4 group-data-[size=sm]/card:px-3",t)},n))}function rx(e){var t=e.title,n=e.value,r=e.description,i=e.trend,o=e.icon,a=e.className;return e.loading?N.jsxs(Jb,{className:Dt("overflow-hidden",a),children:[N.jsxs(Qb,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[N.jsx(wc,{className:"h-4 w-24"}),N.jsx(wc,{className:"h-4 w-4 rounded-full"})]}),N.jsxs(nx,{className:"space-y-2",children:[N.jsx(wc,{className:"h-8 w-32"}),N.jsx(wc,{className:"h-3 w-40"})]})]}):N.jsx(eb.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},children:N.jsxs(Jb,{className:Dt("bmj-card-hover overflow-hidden",a),children:[N.jsxs(Qb,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[N.jsx(ex,{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:t}),o&&N.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]}),N.jsxs(nx,{children:[N.jsx("div",{className:"text-2xl font-bold tracking-tight",children:n}),(r||i)&&N.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[i&&N.jsxs("span",{className:Dt("flex items-center text-xs font-medium",i.isPositive?"text-emerald-500":"text-rose-500"),children:[i.isPositive?N.jsx(cc,{className:"w-3 h-3 mr-1"}):N.jsx(lc,{className:"w-3 h-3 mr-1"}),i.value,"%"]}),r&&N.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})]})})}"production"!==process.env.NODE_ENV&&($b.displayName="MenuTrigger");var ix=["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"];function ox(e){return"string"==typeof e&&ix.includes(e)}var ax=new Set(["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"]);function sx(e){return"string"==typeof e&&ax.has(e)}function lx(e){return"string"==typeof e&&e.startsWith("data-")}function cx(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sx(n)||lx(n))&&(t[n]=e[n]);return t}function ux(e){return null==e?null:h(e)&&"object"==typeof e.props&&null!==e.props?cx(e.props):"object"!=typeof e||Array.isArray(e)?null:cx(e)}function dx(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sx(n)||lx(n)||ox(n))&&(t[n]=e[n]);return t}var fx=["children","width","height","viewBox","className","style","title","desc"];function px(){return px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},px.apply(null,arguments)}var hx=a((t,n)=>{var{children:r,width:i,height:o,viewBox:a,className:s,style:l,title:c,desc:u}=t,d=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,fx),f=a||{width:i,height:o,x:0,y:0},p=fe("recharts-surface",s);return e.createElement("svg",px({},dx(d),{className:p,width:i,height:o,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:n}),e.createElement("title",null,c),e.createElement("desc",null,u),r)}),mx=["children","className"];function vx(){return vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vx.apply(null,arguments)}var yx=e.forwardRef((t,n)=>{var{children:r,className:i}=t,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,mx),a=fe("recharts-layer",i);return e.createElement("g",vx({className:a},dx(o),{ref:n}),r)}),gx=o(null);function bx(e){return function(){return e}}const xx=Math.cos,wx=Math.sin,Ex=Math.sqrt,Ox=Math.PI,Sx=2*Ox,kx=Math.PI,Px=2*kx,Ax=1e-6,jx=Px-Ax;function Tx(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class Mx{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Tx:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Tx;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Ax)if(Math.abs(u*s-l*c)>Ax&&i){let f=n-o,p=r-a,h=s*s+l*l,m=f*f+p*p,v=Math.sqrt(h),y=Math.sqrt(d),g=i*Math.tan((kx-Math.acos((h+d-m)/(2*v*y)))/2),b=g/y,x=g/v;Math.abs(b-1)>Ax&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ax||Math.abs(this._y1-c)>Ax)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Px+Px),d>jx?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Ax&&this._append`A${n},${n},0,${+(d>=kx)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Cx(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Mx(t)}function Nx(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Ix(e){this._context=e}function Dx(e){return new Ix(e)}function _x(e){return e[0]}function Rx(e){return e[1]}function Lx(e,t){var n=bx(!0),r=null,i=Dx,o=null,a=Cx(s);function s(s){var l,c,u,d=(s=Nx(s)).length,f=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?_x:bx(e),t="function"==typeof t?t:void 0===t?Rx:bx(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:bx(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:bx(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:bx(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function zx(e,t,n){var r=null,i=bx(!0),o=null,a=Dx,s=null,l=Cx(c);function c(c){var u,d,f,p,h,m=(c=Nx(c)).length,v=!1,y=new Array(m),g=new Array(m);for(null==o&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&i(p=c[u],u,c))===v)if(v=!v)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],g[f]);s.lineEnd(),s.areaEnd()}v&&(y[u]=+e(p,u,c),g[u]=+t(p,u,c),s.point(r?+r(p,u,c):y[u],n?+n(p,u,c):g[u]))}if(h)return s=null,h+""||null}function u(){return Lx().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?_x:bx(+e),t="function"==typeof t?t:bx(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Rx:bx(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:bx(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:bx(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:bx(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:bx(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:bx(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:bx(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:bx(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}Ix.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}};class Vx{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}var Bx={draw(e,t){const n=Ex(t/Ox);e.moveTo(n,0),e.arc(0,0,n,0,Sx)}},Fx={draw(e,t){const n=Ex(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()}};const $x=Ex(1/3),Ux=2*$x;var Wx={draw(e,t){const n=Ex(t/Ux),r=n*$x;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Kx={draw(e,t){const n=Ex(t),r=-n/2;e.rect(r,r,n,n)}};const Hx=wx(Ox/10)/wx(7*Ox/10),Yx=wx(Sx/10)*Hx,qx=-xx(Sx/10)*Hx;var Gx={draw(e,t){const n=Ex(.8908130915292852*t),r=Yx*n,i=qx*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){const o=Sx*t/5,a=xx(o),s=wx(o);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*i,s*r+a*i)}e.closePath()}};const Xx=Ex(3);var Zx={draw(e,t){const n=-Ex(t/(3*Xx));e.moveTo(0,2*n),e.lineTo(-Xx*n,-n),e.lineTo(Xx*n,-n),e.closePath()}};const Jx=-.5,Qx=Ex(3)/2,ew=1/Ex(12),tw=3*(ew/2+1);var nw={draw(e,t){const n=Ex(t/tw),r=n/2,i=n*ew,o=r,a=n*ew+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Jx*r-Qx*i,Qx*r+Jx*i),e.lineTo(Jx*o-Qx*a,Qx*o+Jx*a),e.lineTo(Jx*s-Qx*l,Qx*s+Jx*l),e.lineTo(Jx*r+Qx*i,Jx*i-Qx*r),e.lineTo(Jx*o+Qx*a,Jx*a-Qx*o),e.lineTo(Jx*s+Qx*l,Jx*l-Qx*s),e.closePath()}};function rw(){}function iw(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 ow(e){this._context=e}function aw(e){this._context=e}function sw(e){this._context=e}function lw(e){this._context=e}function cw(e){return e<0?-1:1}function uw(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(cw(o)+cw(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function dw(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function fw(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function pw(e){this._context=e}function hw(e){this._context=new mw(e)}function mw(e){this._context=e}function vw(e){this._context=e}function yw(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function gw(e,t){this._context=e,this._t=t}function bw(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function xw(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function ww(e,t){return e[t]}function Ew(e){const t=[];return t.key=e,t}ow.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:iw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:iw(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},aw.prototype={areaStart:rw,areaEnd:rw,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)}},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:iw(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},sw.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||0!==this._line&&3===this._point)&&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:iw(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},lw.prototype={areaStart:rw,areaEnd:rw,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))}},pw.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:fw(this,this._t0,dw(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+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,fw(this,dw(this,n=uw(this,e,t)),n);break;default:fw(this,this._t0,n=uw(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(hw.prototype=Object.create(pw.prototype)).point=function(e,t){pw.prototype.point.call(this,t,e)},mw.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},vw.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]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=yw(e),i=yw(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&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)}},gw.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&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)}}this._x=e,this._y=t}};var Ow,Sw={},kw={};function Pw(){return Ow||(Ow=1,e=kw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),kw;var e}var Aw,jw={};function Tw(){return Aw||(Aw=1,e=jw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}),jw;var e}var Mw,Cw={};function Nw(){return Mw||(Mw=1,e=Cw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toKey=function(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}),Cw;var e}var Iw,Dw,_w,Rw,Lw,zw={},Vw={};function Bw(){return Iw||(Iw=1,e=Vw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const n=String(t);return"0"===n&&Object.is(Number(t),-0)?"-0":n}),Vw;var e}function Fw(){return Dw||(Dw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bw(),n=Nw();e.toPath=function(e){if(Array.isArray(e))return e.map(n.toKey);if("symbol"==typeof e)return[e];const r=[],i=(e=t.toString(e)).length;if(0===i)return r;let o=0,a="",s="",l=!1;for(46===e.charCodeAt(0)&&(r.push(""),o++);o<i;){const t=e[o];s?"\\"===t&&o+1<i?(o++,a+=e[o]):t===s?s="":a+=t:l?'"'===t||"'"===t?s=t:"]"===t?(l=!1,r.push(a),a=""):a+=t:"["===t?(l=!0,a&&(r.push(a),a="")):"."===t?a&&(r.push(a),a=""):a+=t,o++}return a&&r.push(a),r}}(zw)),zw}function $w(){return _w||(_w=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Pw(),n=Tw(),r=Nw(),i=Fw();e.get=function e(o,a,s){if(null==o)return s;switch(typeof a){case"string":{if(t.isUnsafeProperty(a))return s;const r=o[a];return void 0===r?n.isDeepKey(a)?e(o,i.toPath(a),s):s:r}case"number":case"symbol":{"number"==typeof a&&(a=r.toKey(a));const e=o[a];return void 0===e?s:e}default:{if(Array.isArray(a))return function(e,n,r){if(0===n.length)return r;let i=e;for(let e=0;e<n.length;e++){if(null==i)return r;if(t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}if(void 0===i)return r;return i}(o,a,s);if(a=Object.is(a?.valueOf(),-0)?"-0":String(a),t.isUnsafeProperty(a))return s;const e=o[a];return void 0===e?s:e}}}}(Sw)),Sw}function Uw(){return Lw?Rw:(Lw=1,Rw=$w().get)}var Ww=S(Uw());function Kw(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function Hw(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var i=n[r-1];return"string"==typeof i?e+i+t:void 0!==i?e+Kw(i)+t:e+t},"")}var Yw=e=>0===e?0:e>0?1:-1,qw=e=>"number"==typeof e&&e!=+e,Gw=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,Xw=e=>("number"==typeof e||e instanceof Number)&&!qw(e),Zw=e=>Xw(e)||"string"==typeof e,Jw=0,Qw=e=>{var t=++Jw;return"".concat(e||"").concat(t)},eE=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Xw(e)&&"string"!=typeof e)return r;if(Gw(e)){if(null==t)return r;var o=e.indexOf("%");n=t*parseFloat(e.slice(0,o))/100}else n=+e;return qw(n)&&(n=r),i&&null!=t&&n>t&&(n=t),n},tE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[String(e[r])])return!0;n[String(e[r])]=!0}return!1};function nE(e,t,n){return Xw(e)&&Xw(t)?Kw(e+n*(t-e)):t}function rE(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):Ww(e,t))===n)}var iE=e=>null==e,oE=e=>iE(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function aE(e){return null!=e}function sE(){}var lE=["type","size","sizeType"];function cE(){return cE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cE.apply(null,arguments)}function uE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uE(Object(n),!0).forEach(function(t){fE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pE={symbolCircle:Bx,symbolCross:Fx,symbolDiamond:Wx,symbolSquare:Kx,symbolStar:Gx,symbolTriangle:Zx,symbolWye:nw},hE=Math.PI/180,mE=t=>{var{type:n="circle",size:r=64,sizeType:i="area"}=t,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,lE),a=dE(dE({},o),{},{type:n,size:r,sizeType:i}),s="circle";"string"==typeof n&&(s=n);var{className:l,cx:c,cy:u}=a,d=dx(a);return Xw(c)&&Xw(u)&&Xw(r)?e.createElement("path",cE({},d,{className:fe("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(oE(e));return pE[t]||Bx})(s),t=function(e,t){let n=null,r=Cx(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:bx(e||Bx),t="function"==typeof t?t:bx(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:bx(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:bx(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*hE;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(r,i,s)),n=t();if(null!==n)return n})()})):null};mE.registerSymbol=(e,t)=>{pE["symbol".concat(oE(e))]=t};var vE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,yE=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if(h(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(e=>{ox(e)&&"function"==typeof n[e]&&(r[e]=t=>n[e](n,t))}),r},gE=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];ox(i)&&"function"==typeof o&&(r||(r={}),r[i]=((e,t,n)=>r=>(e(t,n,r),null))(o,t,n))}),r};function bE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wE(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bE(Object(n),!0).forEach(function(t){xE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}var EE,OE={},SE={};function kE(){return EE||(EE=1,e=SE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.uniqBy=function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const i=e[r],o=t(i,r,e);n.has(o)||n.set(o,i)}return Array.from(n.values())}),SE;var e}var PE,AE={};function jE(){return PE||(PE=1,e=AE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.ary=function(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}),AE;var e}var TE,ME={};function CE(){return TE||(TE=1,e=ME,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),ME;var e}var NE,IE,DE={},_E={},RE={};function LE(){return NE||(NE=1,e=RE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),RE;var e}function zE(){return IE||(IE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LE();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(_E)),_E}var VE,BE,FE={};function $E(){return VE||(VE=1,e=FE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),FE;var e}function UE(){return BE||(BE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zE(),n=$E();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(DE)),DE}var WE,KE={},HE={};function YE(){return WE||(WE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$w();e.property=function(e){return function(n){return t.get(n,e)}}}(HE)),HE}var qE,GE={},XE={},ZE={},JE={};function QE(){return qE||(qE=1,e=JE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),JE;var e}var eO,tO={};function nO(){return eO||(eO=1,e=tO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),tO;var e}var rO,iO,oO,aO={};function sO(){return rO||(rO=1,e=aO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),aO;var e}function lO(){return iO||(iO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QE(),n=nO(),r=sO();function i(e,s,l,c){if(s===e)return!0;switch(typeof s){case"object":return function(e,t,r,i){if(null==t)return!0;if(Array.isArray(t))return o(e,t,r,i);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries()){if(!1===n(e.get(i),o,i,e,t,r))return!1}return!0}(e,t,r,i);if(t instanceof Set)return a(e,t,r,i);const s=Object.keys(t);if(null==e||n.isPrimitive(e))return 0===s.length;if(0===s.length)return!0;if(i?.has(t))return i.get(t)===e;i?.set(t,e);try{for(let o=0;o<s.length;o++){const a=s[o];if(!n.isPrimitive(e)&&!(a in e))return!1;if(void 0===t[a]&&void 0!==e[a])return!1;if(null===t[a]&&null!==e[a])return!1;if(!r(e[a],t[a],a,e,t,i))return!1}return!0}finally{i?.delete(t)}}(e,s,l,c);case"function":return Object.keys(s).length>0?i(e,{...s},l,c):r.isEqualsSameValueZero(e,s);default:return t.isObject(e)?"string"!=typeof s||""===s:r.isEqualsSameValueZero(e,s)}}function o(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const a=t[o];let s=!1;for(let l=0;l<e.length;l++){if(i.has(l))continue;let c=!1;if(n(e[l],a,o,e,t,r)&&(c=!0),c){i.add(l),s=!0;break}}if(!s)return!1}return!0}function a(e,t,n,r){return 0===t.size||e instanceof Set&&o([...e],[...t],n,r)}e.isMatchWith=function e(t,n,r){return"function"!=typeof r?e(t,n,()=>{}):i(t,n,function e(t,n,o,a,s,l){const c=r(t,n,o,a,s,l);return void 0!==c?Boolean(c):i(t,n,e,l)},new Map)},e.isSetMatch=a}(ZE)),ZE}function cO(){return oO||(oO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lO();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(XE)),XE}var uO,dO={},fO={},pO={};function hO(){return uO||(uO=1,e=pO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),pO;var e}var mO,vO={};function yO(){return mO||(mO=1,e=vO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}),vO;var e}var gO,bO={};function xO(){return gO||(gO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.argumentsTag="[object Arguments]",e.arrayBufferTag="[object ArrayBuffer]",e.arrayTag="[object Array]",e.bigInt64ArrayTag="[object BigInt64Array]",e.bigUint64ArrayTag="[object BigUint64Array]",e.booleanTag="[object Boolean]",e.dataViewTag="[object DataView]",e.dateTag="[object Date]",e.errorTag="[object Error]",e.float32ArrayTag="[object Float32Array]",e.float64ArrayTag="[object Float64Array]",e.functionTag="[object Function]",e.int16ArrayTag="[object Int16Array]",e.int32ArrayTag="[object Int32Array]",e.int8ArrayTag="[object Int8Array]",e.mapTag="[object Map]",e.numberTag="[object Number]",e.objectTag="[object Object]",e.regexpTag="[object RegExp]",e.setTag="[object Set]",e.stringTag="[object String]",e.symbolTag="[object Symbol]",e.uint16ArrayTag="[object Uint16Array]",e.uint32ArrayTag="[object Uint32Array]",e.uint8ArrayTag="[object Uint8Array]",e.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(bO)),bO}var wO,EO,OO,SO,kO={};function PO(){return wO||(wO=1,e=kO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),kO;var e}function AO(){return EO||(EO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hO(),n=yO(),r=xO(),i=nO(),o=PO();function a(e,t,l,c=new Map,u=void 0){const d=u?.(e,t,l,c);if(void 0!==d)return d;if(i.isPrimitive(e))return e;if(c.has(e))return c.get(e);if(Array.isArray(e)){const t=new Array(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=a(e[n],n,l,c,u);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;c.set(e,t);for(const[n,r]of e)t.set(n,a(r,n,l,c,u));return t}if(e instanceof Set){const t=new Set;c.set(e,t);for(const n of e)t.add(a(n,void 0,l,c,u));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(o.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=a(e[n],n,l,c,u);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Error){const t=structuredClone(e);return c.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,s(t,e,l,c,u),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Number){const t=new Number(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof String){const t=new String(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if("object"==typeof e&&function(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return c.set(e,t),s(t,e,l,c,u),t}return e}function s(e,n,r=e,i,o){const s=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<s.length;t++){const l=s[t],c=Object.getOwnPropertyDescriptor(e,l);(null==c||c.writable)&&(e[l]=a(n[l],l,r,i,o))}}e.cloneDeepWith=function(e,t){return a(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=a,e.copyProperties=s}(fO)),fO}function jO(){return OO||(OO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AO();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(dO)),dO}function TO(){return SO||(SO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cO(),n=jO();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(GE)),GE}var MO,CO,NO={},IO={},DO={};function _O(){return MO||(MO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AO(),n=yO(),r=xO();e.cloneDeepWith=function(e,i){return t.cloneDeepWith(e,(o,a,s,l)=>{const c=i?.(o,a,s,l);if(void 0!==c)return c;if("object"==typeof e){if(n.getTag(e)===r.objectTag&&"function"!=typeof e.constructor){const n={};return l.set(e,n),t.copyProperties(n,e,s,l),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{const n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{const n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}}(DO)),DO}function RO(){return CO||(CO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_O();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(IO)),IO}var LO,zO={},VO={};function BO(){return LO||(LO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;e.isIndex=function(e,n=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<n;case"symbol":return!1;case"string":return t.test(e)}}}(VO)),VO}var FO,$O,UO,WO,KO,HO,YO,qO={};function GO(){return FO||(FO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yO();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(qO)),qO}function XO(){return $O||($O=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tw(),n=BO(),r=GO(),i=Fw();e.has=function(e,o){let a;if(a=Array.isArray(o)?o:"string"==typeof o&&t.isDeepKey(o)&&null==e?.[o]?i.toPath(o):[o],0===a.length)return!1;let s=e;for(let e=0;e<a.length;e++){const t=a[e];if(null==s||!Object.hasOwn(s,t)){if(!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1}s=s[t]}return!0}}(zO)),zO}function ZO(){return UO||(UO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cO(),n=Nw(),r=RO(),i=$w(),o=XO();e.matchesProperty=function(e,a){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=n.toKey(e)}return a=r.cloneDeep(a),function(n){const r=i.get(n,e);return void 0===r?o.has(n,e):void 0===a?void 0===r:t.isMatch(r,a)}}}(NO)),NO}function JO(){return WO||(WO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CE(),n=YE(),r=TO(),i=ZO();e.iteratee=function(e){if(null==e)return t.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?i.matchesProperty(e[0],e[1]):r.matches(e);case"string":case"symbol":case"number":return n.property(e)}}}(KE)),KE}function QO(){return KO||(KO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kE(),n=jE(),r=CE(),i=UE(),o=JO();e.uniqBy=function(e,a=r.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(o.iteratee(a),1)):[]}}(OE)),OE}function eS(){return YO?HO:(YO=1,HO=QO().uniqBy)}var tS=S(eS());var nS=o(null),rS=e=>e,iS=()=>{var e=i(nS);return e?e.store.dispatch:rS},oS=()=>{},aS=()=>oS,sS=(e,t)=>e===t;function lS(e){var t=i(nS),n=d(()=>t?t=>{if(null!=t)return e(t)}:oS,[t,e]);return xs.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:aS,t?t.store.getState:oS,t?t.store.getState:oS,n,sS)}var cS,uS={},dS={},fS={};function pS(){return cS||(cS=1,function(e){function t(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.compareValues=(e,n,r)=>{if(e!==n){const i=t(e),o=t(n);if(i===o&&0===i){if(e<n)return"desc"===r?1:-1;if(e>n)return"desc"===r?-1:1}return"desc"===r?o-i:i-o}return 0}}(fS)),fS}var hS,mS,vS,yS={},gS={};function bS(){return hS||(hS=1,e=gS,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),gS;var e}function xS(){return mS||(mS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bS(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.isKey=function(e,i){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!t.isSymbol(e))||("string"==typeof e&&(r.test(e)||!n.test(e))||null!=i&&Object.hasOwn(i,e)))}}(yS)),yS}function wS(){return vS||(vS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pS(),n=xS(),r=Fw();e.orderBy=function(e,i,o,a){if(null==e)return[];o=a?void 0:o,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=null==i?[null]:[i]),0===i.length&&(i=[null]),Array.isArray(o)||(o=null==o?[]:[o]),o=o.map(e=>String(e));const s=(e,t)=>{let n=e;for(let e=0;e<t.length&&null!=n;++e)n=n[t[e]];return n},l=i.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)})),c=e.map(e=>({original:e,criteria:l.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?s(t,e):"object"==typeof t?t[e]:t)(t,e))}));return c.slice().sort((e,n)=>{for(let r=0;r<l.length;r++){const i=t.compareValues(e.criteria[r],n.criteria[r],o[r]);if(0!==i)return i}return 0}).map(e=>e.original)}}(dS)),dS}var ES,OS={};function SS(){return ES||(ES=1,e=OS,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const n=[],r=Math.floor(t),i=(e,t)=>{for(let o=0;o<e.length;o++){const a=e[o];Array.isArray(a)&&t<r?i(a,t+1):n.push(a)}};return i(e,0),n}),OS;var e}var kS,PS,AS,jS,TS={};function MS(){return kS||(kS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BO(),n=zE(),r=QE(),i=sO();e.isIterateeCall=function(e,o,a){return!!r.isObject(a)&&(!!("number"==typeof o&&n.isArrayLike(a)&&t.isIndex(o)&&o<a.length||"string"==typeof o&&o in a)&&i.isEqualsSameValueZero(a[o],e))}}(TS)),TS}function CS(){return PS||(PS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wS(),n=SS(),r=MS();e.sortBy=function(e,...i){const o=i.length;return o>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:o>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),["asc"])}}(uS)),uS}function NS(){return jS?AS:(jS=1,AS=CS().sortBy)}var IS=S(NS()),DS=e=>e.legend.settings;rs([e=>e.legend.payload,DS],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?IS(r,n):r});function _S(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var RS=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),LS=()=>Math.random().toString(36).substring(7).split("").join("."),zS={INIT:`@@redux/INIT${LS()}`,REPLACE:`@@redux/REPLACE${LS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${LS()}`};function VS(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function BS(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function FS(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=BS(e)),t}function $S(e,t,n){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?_S(2):`Expected the root reducer to be a function. Instead, received: '${FS(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?_S(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?_S(1):`Expected the enhancer to be a function. Instead, received: '${FS(n)}'`);return n($S)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,l=!1;function c(){a===o&&(a=new Map,o.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error("production"===process.env.NODE_ENV?_S(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?_S(4):`Expected the listener to be a function. Instead, received: '${FS(e)}'`);if(l)throw new Error("production"===process.env.NODE_ENV?_S(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error("production"===process.env.NODE_ENV?_S(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,c(),a.delete(n),o=null}}}function f(e){if(!VS(e))throw new Error("production"===process.env.NODE_ENV?_S(7):`Actions must be plain objects. Instead, the actual type was: '${FS(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?_S(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error("production"===process.env.NODE_ENV?_S(17):`Action "type" property must be a string. Instead, the actual type was: '${FS(e.type)}'. Value was: '${e.type}' (stringified)`);if(l)throw new Error("production"===process.env.NODE_ENV?_S(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,e)}finally{l=!1}return(o=a).forEach(e=>{e()}),e}f({type:zS.INIT});const p={dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?_S(10):`Expected the nextReducer to be a function. Instead, received: '${FS(e)}`);r=e,f({type:zS.REPLACE})},[RS]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?_S(11):`Expected the observer to be an object. Instead, received: '${FS(t)}'`);function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[RS](){return this}}}};return p}function US(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function WS(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const i=t[r];"production"!==process.env.NODE_ENV&&void 0===e[i]&&US(`No reducer provided for key "${i}"`),"function"==typeof e[i]&&(n[i]=e[i])}const r=Object.keys(n);let i,o;"production"!==process.env.NODE_ENV&&(i={});try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:zS.INIT}))throw new Error("production"===process.env.NODE_ENV?_S(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===n(void 0,{type:zS.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?_S(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${zS.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;if("production"!==process.env.NODE_ENV){const r=function(e,t,n,r){const i=Object.keys(t),o=n&&n.type===zS.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===i.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!VS(e))return`The ${o} has unexpected type of "${FS(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!r[e]);return a.forEach(e=>{r[e]=!0}),n&&n.type===zS.REPLACE?void 0:a.length>0?`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,n,t,i);r&&US(r)}let a=!1;const s={};for(let i=0;i<r.length;i++){const o=r[i],l=n[o],c=e[o],u=l(c,t);if(void 0===u){const e=t&&t.type;throw new Error("production"===process.env.NODE_ENV?_S(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${o}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}s[o]=u,a=a||u!==c}return a=a||r.length!==Object.keys(e).length,a?s:e}}function KS(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function HS(e){return VS(e)&&"type"in e&&"string"==typeof e.type}var YS=Symbol.for("immer-nothing"),qS=Symbol.for("immer-draftable"),GS=Symbol.for("immer-state"),XS="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ZS(e,...t){if("production"!==process.env.NODE_ENV){const n=XS[e],r=xk(n)?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var JS=Object,QS=JS.getPrototypeOf,ek="constructor",tk="prototype",nk="configurable",rk="enumerable",ik="writable",ok="value",ak=e=>!!e&&!!e[GS];function sk(e){return!!e&&(uk(e)||vk(e)||!!e[qS]||!!e[ek]?.[qS]||yk(e)||gk(e))}var lk=JS[tk][ek].toString(),ck=new WeakMap;function uk(e){if(!e||!bk(e))return!1;const t=QS(e);if(null===t||t===JS[tk])return!0;const n=JS.hasOwnProperty.call(t,ek)&&t[ek];if(n===Object)return!0;if(!xk(n))return!1;let r=ck.get(n);return void 0===r&&(r=Function.toString.call(n),ck.set(n,r)),r===lk}function dk(e,t,n=!0){if(0===fk(e)){(n?Reflect.ownKeys(e):JS.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function fk(e){const t=e[GS];return t?t.type_:vk(e)?1:yk(e)?2:gk(e)?3:0}var pk=(e,t,n=fk(e))=>2===n?e.has(t):JS[tk].hasOwnProperty.call(e,t),hk=(e,t,n=fk(e))=>2===n?e.get(t):e[t],mk=(e,t,n,r=fk(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var vk=Array.isArray,yk=e=>e instanceof Map,gk=e=>e instanceof Set,bk=e=>"object"==typeof e,xk=e=>"function"==typeof e,wk=e=>"boolean"==typeof e;var Ek=e=>e.copy_||e.base_,Ok=e=>e.modified_?e.copy_:e.base_;function Sk(e,t){if(yk(e))return new Map(e);if(gk(e))return new Set(e);if(vk(e))return Array[tk].slice.call(e);const n=uk(e);if(!0===t||"class_only"===t&&!n){const t=JS.getOwnPropertyDescriptors(e);delete t[GS];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o[ik]&&(o[ik]=!0,o[nk]=!0),(o.get||o.set)&&(t[i]={[nk]:!0,[ik]:!0,[rk]:o[rk],[ok]:e[i]})}return JS.create(QS(e),t)}{const t=QS(e);if(null!==t&&n)return{...e};const r=JS.create(t);return JS.assign(r,e)}}function kk(e,t=!1){return Ak(e)||ak(e)||!sk(e)||(fk(e)>1&&JS.defineProperties(e,{set:Pk,add:Pk,clear:Pk,delete:Pk}),JS.freeze(e),t&&dk(e,(e,t)=>{kk(t,!0)},!1)),e}var Pk={[ok]:function(){ZS(2)}};function Ak(e){return null===e||!bk(e)||JS.isFrozen(e)}var jk="MapSet",Tk="Patches",Mk="ArrayMethods",Ck={};function Nk(e){const t=Ck[e];return t||ZS(0,e),t}var Ik,Dk=e=>!!Ck[e],_k=()=>Ik;function Rk(e,t){t&&(e.patchPlugin_=Nk(Tk),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Lk(e){zk(e),e.drafts_.forEach(Bk),e.drafts_=null}function zk(e){e===Ik&&(Ik=e.parent_)}var Vk=e=>Ik={drafts_:[],parent_:Ik,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Dk(jk)?Nk(jk):void 0,arrayMethodsPlugin_:Dk(Mk)?Nk(Mk):void 0};function Bk(e){const t=e[GS];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Fk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[GS].modified_&&(Lk(t),ZS(4)),sk(e)&&(e=$k(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[GS].base_,e,t)}else e=$k(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kk(t,n)}(t,e,!0),Lk(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==YS?e:void 0}function $k(e,t){if(Ak(t))return t;const n=t[GS];if(!n){return qk(t,e.handledSet_,e)}if(!Wk(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}Yk(n,e)}return n.copy_}function Uk(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Wk=(e,t)=>e.scope_===t,Kk=[];function Hk(e,t,n,r){const i=Ek(e),o=e.type_;if(void 0!==r){if(hk(i,r,o)===t)return void mk(i,r,n,o)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;dk(i,(e,n)=>{if(ak(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??Kk;for(const e of a)mk(i,e,n,o)}function Yk(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Uk(e)}}function qk(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ak(e)||t.has(e)||!sk(e)||Ak(e)||(t.add(e),dk(e,(r,i)=>{if(ak(i)){const t=i[GS];if(Wk(t,n)){const n=Ok(t);mk(e,r,n,e.type_),Uk(t)}}else sk(i)&&qk(i,t,n)})),e}var Gk={get(e,t){if(t===GS)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Ek(e);if(!pk(i,t,e.type_))return function(e,t,n){const r=Jk(t,n);return r?ok in r?r[ok]:r.get?.call(e.draft_):void 0}(e,i,t);const o=i[t];if(e.finalized_||!sk(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===Zk(e.base_,t)){eP(e);const n=1===e.type_?+t:t,r=tP(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in Ek(e),ownKeys:e=>Reflect.ownKeys(Ek(e)),set(e,t,n){const r=Jk(Ek(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Zk(Ek(e),t),i=r?.[GS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||pk(e.base_,t,e.type_)))return!0;eP(e),Qk(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(ak(n)){const i=n[GS];Wk(i,r)&&i.callbacks_.push(function(){eP(e);const r=Ok(i);Hk(e,n,r,t)})}else sk(n)&&e.callbacks_.push(function(){const i=Ek(e);3===e.type_?i.has(n)&&qk(n,r.handledSet_,r):hk(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&qk(hk(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(eP(e),void 0!==Zk(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Qk(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Ek(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[ik]:!0,[nk]:1!==e.type_||"length"!==t,[rk]:r[rk],[ok]:n[t]}:r},defineProperty(){ZS(11)},getPrototypeOf:e=>QS(e.base_),setPrototypeOf(){ZS(12)}},Xk={};for(let e in Gk){let t=Gk[e];Xk[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function Zk(e,t){const n=e[GS];return(n?Ek(n):e)[t]}function Jk(e,t){if(!(t in e))return;let n=QS(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=QS(n)}}function Qk(e){e.modified_||(e.modified_=!0,e.parent_&&Qk(e.parent_))}function eP(e){e.copy_||(e.assigned_=new Map,e.copy_=Sk(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Xk.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&ZS(13),Xk.set.call(this,e,t,void 0)},Xk.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&ZS(14),Gk.set.call(this,e[0],t,n,e[0])};function tP(e,t,n,r){const[i,o]=yk(t)?Nk(jk).proxyMap_(t,n):gk(t)?Nk(jk).proxySet_(t,n):function(e,t){const n=vk(e),r={type_:n?1:0,scope_:t?t.scope_:_k(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Gk;n&&(i=[r],o=Xk);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??_k()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Wk(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=Ok(i);Hk(e,i.draft_??i,o,n),Yk(i,r)})}(n,o,r):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function nP(e){return ak(e)||ZS(10,e),rP(e)}function rP(e){if(!sk(e)||Ak(e))return e;const t=e[GS];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Sk(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Sk(e,!0);return dk(n,(e,t)=>{mk(n,e,rP(t))},r),t&&(t.finalized_=!1),n}var iP=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(xk(e)&&!xk(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(xk(t)||ZS(6),void 0===n||xk(n)||ZS(7),sk(e)){const i=Vk(this),o=tP(i,e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?Lk(i):zk(i)}return Rk(i,n),Fk(r,i)}if(!e||!bk(e)){if(r=t(e),void 0===r&&(r=e),r===YS&&(r=void 0),this.autoFreeze_&&kk(r,!0),n){const t=[],i=[];Nk(Tk).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}ZS(1,e)},this.produceWithPatches=(e,t)=>{if(xk(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},wk(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),wk(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),wk(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){sk(e)||ZS(8),ak(e)&&(e=nP(e));const t=Vk(this),n=tP(t,e,void 0);return n[GS].isManual_=!0,zk(t),n}finishDraft(e,t){const n=e&&e[GS];n&&n.isManual_||ZS(9);const{scope_:r}=n;return Rk(r,t),Fk(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Nk(Tk).applyPatches_;return ak(e)?r(e,t):this.produce(e,e=>r(e,t))}},oP=iP.produce;function aP(e){return({dispatch:t,getState:n})=>r=>i=>"function"==typeof i?i(t,n,e):r(i)}var sP=aP(),lP=aP,cP="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?KS:KS.apply(null,arguments)};function uP(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("production"===process.env.NODE_ENV?mA(0):"prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>HS(t)&&t.type===e,n}function dP(e){return"function"==typeof e&&"type"in e&&((t=e)&&"function"==typeof t.match);var t}function fP(e,t){let n=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();n+=e-t}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var pP=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function hP(e){return sk(e)?oP(e,()=>{}):e}function mP(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function vP(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function yP(e,t,n){const r=gP(e,t,n);return{detectMutations:()=>bP(e,t,r,n)}}function gP(e,t=[],n,r="",i=new Set){const o={value:n};if(!e(n)&&!i.has(n)){i.add(n),o.children={};const a=t.length>0;for(const i in n){const s=r?r+"."+i:i;if(a){if(t.some(e=>e instanceof RegExp?e.test(s):s===e))continue}o.children[i]=gP(e,t,n[i],s)}}return o}function bP(e,t=[],n,r,i=!1,o=""){const a=n?n.value:void 0,s=a===r;if(i&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:o};if(e(a)||e(r))return{wasMutated:!1};const l={};for(let e in n.children)l[e]=!0;for(let e in r)l[e]=!0;const c=t.length>0;for(let i in l){const a=o?o+"."+i:i;if(c){if(t.some(e=>e instanceof RegExp?e.test(a):a===e))continue}const l=bP(e,t,n.children[i],r[i],s,a);if(l.wasMutated)return l}return{wasMutated:!1}}function xP(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||VS(e)}function wP(e,t="",n=xP,r,i=[],o){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(o?.has(e))return!1;const s=null!=r?r(e):Object.entries(e),l=i.length>0;for(const[e,c]of s){const s=t?t+"."+e:e;if(l){if(i.some(e=>e instanceof RegExp?e.test(s):s===e))continue}if(!n(c))return{keyPath:s,value:c};if("object"==typeof c&&(a=wP(c,s,n,r,i,o),a))return a}return o&&EP(e)&&o.add(e),!1}function EP(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!EP(t))return!1;return!0}function OP(e){return"boolean"==typeof e}var SP=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{};let o=new pP;if(t&&(OP(t)?o.push(sP):o.push(lP(t.extraArgument))),"production"!==process.env.NODE_ENV){if(n){let e={};OP(n)||(e=n),o.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{let t=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)},n=function(e,t){let n=[],r=[];return t||(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,o){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=t.call(this,i,o))}else n.push(o);return null==e?o:e.call(this,i,o)}},{isImmutable:r=vP,ignoredPaths:i,warnAfter:o=32}=e;const a=yP.bind(null,r,i);return({getState:e})=>{let n,r=e(),i=a(r);return s=>l=>{const c=fP(o,"ImmutableStateInvariantMiddleware");c.measureTime(()=>{if(r=e(),n=i.detectMutations(),i=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?mA(19):`A state mutation was detected between dispatches, in the path '${n.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const u=s(l);return c.measureTime(()=>{if(r=e(),n=i.detectMutations(),i=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?mA(20):`A state mutation was detected inside a dispatch, in the path: ${n.path||""}. Take a look at the reducer(s) handling the action ${t(l)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),c.warnIfExceeded(),u}}}}(e))}if(r){let e={};OP(r)||(e=r),o.push(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{const{isSerializable:t=xP,getEntries:n,ignoredActions:r=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:o=[],warnAfter:a=32,ignoreState:s=!1,ignoreActions:l=!1,disableCache:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return e=>c=>d=>{if(!HS(d))return c(d);const f=c(d),p=fP(a,"SerializableStateInvariantMiddleware");return l||r.length&&-1!==r.indexOf(d.type)||p.measureTime(()=>{const e=wP(d,"",t,n,i,u);if(e){const{keyPath:t,value:n}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,n,"\nTake a look at the logic that dispatched this action: ",d,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}}),s||(p.measureTime(()=>{const r=wP(e.getState(),"",t,n,o,u);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${d.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),f}}}(e))}if(i){let e={};OP(i)||(e=i),o.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);const{isActionCreator:t=dP}=e;return()=>e=>n=>(t(n)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}(n.type)),e(n))}(e))}}return o},kP="RTK_autoBatch",PP=()=>e=>({payload:e,meta:{[kP]:!0}}),AP=e=>t=>{setTimeout(t,e)},jP=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:AP(10):"callback"===e.type?e.queueNotification:AP(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[kP],o=!i,o&&(a||(a=!0,l(c))),r.dispatch(e)}finally{i=!0}}})};function TP(e){const t=SP(),{reducer:n,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!VS(n))throw new Error("production"===process.env.NODE_ENV?mA(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");l=WS(n)}if("production"!==process.env.NODE_ENV&&r&&"function"!=typeof r)throw new Error("production"===process.env.NODE_ENV?mA(2):"`middleware` field must be a callback");if("function"==typeof r){if(c=r(t),"production"!==process.env.NODE_ENV&&!Array.isArray(c))throw new Error("production"===process.env.NODE_ENV?mA(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if("production"!==process.env.NODE_ENV&&c.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?mA(4):"each middleware provided to configureStore must be a function");if("production"!==process.env.NODE_ENV&&o){let e=new Set;c.forEach(t=>{if(e.has(t))throw new Error("production"===process.env.NODE_ENV?mA(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)})}let u=KS;i&&(u=cP({trace:"production"!==process.env.NODE_ENV,..."object"==typeof i&&i}));const d=function(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error("production"===process.env.NODE_ENV?_S(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:i.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map(e=>e(a));return o=KS(...s)(i.dispatch),{...i,dispatch:o}}}(...c),f=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new pP(e);return n&&r.push(jP("object"==typeof n?n:void 0)),r})(d);if("production"!==process.env.NODE_ENV&&s&&"function"!=typeof s)throw new Error("production"===process.env.NODE_ENV?mA(5):"`enhancers` field must be a callback");let p="function"==typeof s?s(f):f();if("production"!==process.env.NODE_ENV&&!Array.isArray(p))throw new Error("production"===process.env.NODE_ENV?mA(6):"`enhancers` callback must return an array");if("production"!==process.env.NODE_ENV&&p.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?mA(7):"each enhancer provided to configureStore must be a function");"production"!==process.env.NODE_ENV&&c.length&&!p.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");return $S(l,a,u(...p))}function MP(e){const t={},n=[];let r;const i={addCase(e,o){if("production"!==process.env.NODE_ENV){if(n.length>0)throw new Error("production"===process.env.NODE_ENV?mA(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("production"===process.env.NODE_ENV?mA(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const a="string"==typeof e?e:e.type;if(!a)throw new Error("production"===process.env.NODE_ENV?mA(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("production"===process.env.NODE_ENV?mA(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=o,i},addAsyncThunk(e,o){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?mA(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return o.pending&&(t[e.pending.type]=o.pending),o.rejected&&(t[e.rejected.type]=o.rejected),o.fulfilled&&(t[e.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:e.settled,reducer:o.settled}),i},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?mA(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?mA(31):"`builder.addDefaultCase` can only be called once");return r=e,i}};return e(i),[t,n,r]}var CP=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},NP=Symbol.for("rtk-slice-createasyncthunk");function IP(e,t){return`${e}/${t}`}function DP({creators:e}={}){const t=e?.asyncThunk?.[NP];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("production"===process.env.NODE_ENV?mA(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},o=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error("production"===process.env.NODE_ENV?mA(12):"`context.addCase` cannot be called with an empty action type");if(n in a.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?mA(13):"`context.addCase` cannot be called with two reducers for the same action type: "+n);return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function l(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?mA(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},n=[],r]="function"==typeof e.extraReducers?MP(e.extraReducers):[e.extraReducers],i={...t,...a.sliceCaseReducersByType};return function(e,t){if("production"!==process.env.NODE_ENV&&"object"==typeof t)throw new Error("production"===process.env.NODE_ENV?mA(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let n,[r,i,o]=MP(t);if(function(e){return"function"==typeof e}(e))n=()=>hP(e());else{const t=hP(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===a.filter(e=>!!e).length&&(a=[o]),a.reduce((e,n)=>{if(n){if(ak(e)){const r=n(e,t);return void 0===r?e:r}if(sk(e))return oP(e,e=>n(e,t));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return a.getInitialState=n,a}(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}o.forEach(r=>{const o=i[r],a={reducerName:r,type:IP(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(o)?function({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("production"===process.env.NODE_ENV?mA(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?uP(e,a):uP(e))}(a,o,s):function({type:e,reducerName:t},n,r,i){if(!i)throw new Error("production"===process.env.NODE_ENV?mA(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a);s&&r.addCase(d.pending,s);l&&r.addCase(d.rejected,l);c&&r.addMatcher(d.settled,c);r.exposeCaseReducer(t,{fulfilled:a||LP,pending:s||LP,rejected:l||LP,settled:c||LP})}(a,o,s,t)});const c=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=l()),f(e,t)}function h(){return f||(f=l()),f.getInitialState()}function m(t,n=!1){function r(e){let i=e[t];if(void 0===i)if(n)i=mP(d,r,h);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?mA(15):"selectSlice returned undefined for an uninjected slice reducer");return i}function i(t=c){const r=mP(u,n,()=>new WeakMap);return mP(r,t,()=>{const r={};for(const[i,o]of Object.entries(e.selectors??{}))r[i]=_P(o,t,()=>mP(d,t,h),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const v={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...v,...m(i,!0)}}};return v}}function _P(e,t,n,r){function i(i,...o){let a=t(i);if(void 0===a)if(r)a=n();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?mA(16):"selectState returned undefined for an uninjected slice reducer");return e(a,...o)}return i.unwrapped=e,i}var RP=DP();function LP(){}var zP="listener",VP="completed",BP="cancelled",FP=`task-${BP}`,$P=`task-${VP}`,UP=`${zP}-${BP}`,WP=`${zP}-${VP}`,KP=class{constructor(e){this.code=e,this.message=`task ${BP} (reason: ${e})`}name="TaskAbortError";message},HP=(e,t)=>{if("function"!=typeof e)throw new TypeError("production"===process.env.NODE_ENV?mA(32):`${t} is not a function`)},YP=()=>{},qP=(e,t=YP)=>(e.catch(t),e),GP=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),XP=e=>{if(e.aborted)throw new KP(e.reason)};function ZP(e,t){let n=YP;return new Promise((r,i)=>{const o=()=>i(new KP(e.reason));e.aborted?o():(n=GP(e,o),t.finally(()=>n()).then(r,i))}).finally(()=>{n=YP})}var JP=e=>t=>qP(ZP(e,t).then(t=>(XP(e),t))),QP=e=>{const t=JP(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:eA}=Object,tA={},nA="listenerMiddleware",rA=(e,t)=>(n,r)=>{HP(n,"taskExecutor");const i=new AbortController;var o;o=i,GP(e,()=>o.abort(e.reason));const a=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(e){return{status:e instanceof KP?"cancelled":"rejected",error:e}}finally{t?.()}})(async()=>{XP(e),XP(i.signal);const t=await n({pause:JP(i.signal),delay:QP(i.signal),signal:i.signal});return XP(i.signal),t},()=>i.abort($P));return r?.autoJoin&&t.push(a.catch(YP)),{result:JP(e)(a),cancel(){i.abort(FP)}}},iA=(e,t)=>(n,r)=>qP((async(n,r)=>{XP(t);let i=()=>{};const o=[new Promise((t,r)=>{let o=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{o(),r()}})];null!=r&&o.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await ZP(t,Promise.race(o));return XP(t),e}finally{i()}})(n,r)),oA=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=uP(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error("production"===process.env.NODE_ENV?mA(21):"Creating or removing a listener requires one of the known fields for matching an action");return HP(o,"options.listener"),{predicate:i,type:t,effect:o}},aA=eA(e=>{const{type:t,predicate:n,effect:r}=oA(e);return{id:CP(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("production"===process.env.NODE_ENV?mA(22):"Unsubscribe not initialized")}}},{withTypes:()=>aA}),sA=(e,t)=>{const{type:n,effect:r,predicate:i}=oA(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===i)&&e.effect===r)},lA=e=>{e.pending.forEach(e=>{e.abort(UP)})},cA=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},uA=eA(uP(`${nA}/add`),{withTypes:()=>uA}),dA=uP(`${nA}/removeAll`),fA=eA(uP(`${nA}/remove`),{withTypes:()=>fA}),pA=(...e)=>{console.error(`${nA}/error`,...e)},hA=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:i=pA}=e;HP(i,"onError");const o=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&lA(e)}))(sA(t,e)??aA(e));eA(o,{withTypes:()=>o});const a=e=>{const n=sA(t,e);return n&&(n.unsubscribe(),e.cancelActive&&lA(n)),!!n};eA(a,{withTypes:()=>a});const s=async(e,a,s,l)=>{const c=new AbortController,u=iA(o,c.signal),d=[];try{e.pending.add(c),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(a,eA({},s,{getOriginalState:l,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:QP(c.signal),pause:JP(c.signal),extra:r,signal:c.signal,fork:rA(c.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==c&&(e.abort(UP),n.delete(e))})},cancel:()=>{c.abort(UP),e.pending.delete(c)},throwIfCancelled:()=>{XP(c.signal)}})))}catch(e){e instanceof KP||cA(i,e,{raisedBy:"effect"})}finally{await Promise.all(d),c.abort(WP),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(c)}},l=((e,t)=>()=>{for(const e of t.keys())lA(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!HS(r))return n(r);if(uA.match(r))return o(r.payload);if(dA.match(r))return void l();if(fA.match(r))return a(r.payload);let c=e.getState();const u=()=>{if(c===tA)throw new Error("production"===process.env.NODE_ENV?mA(23):`${nA}: getOriginalState can only be called synchronously`);return c};let d;try{if(d=n(r),t.size>0){const n=e.getState(),o=Array.from(t.values());for(const t of o){let o=!1;try{o=t.predicate(r,n,c)}catch(e){o=!1,cA(i,e,{raisedBy:"predicate"})}o&&s(t,r,e,u)}}}finally{c=tA}return d},startListening:o,stopListening:a,clearListeners:l}};function mA(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var vA=RP({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(i=t.payload.bottom)&&void 0!==i?i:0,e.margin.left=null!==(o=t.payload.left)&&void 0!==o?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:yA,setLayout:gA,setChartSize:bA,setScale:xA}=vA.actions,wA=vA.reducer;function EA(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function OA(e){return Number.isFinite(e)}function SA(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function kA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kA(Object(n),!0).forEach(function(t){AA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jA(e,t,n){return iE(e)||iE(t)?n:Zw(t)?Ww(e,t,n):"function"==typeof t?t(e):n}var TA=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,MA=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,o,a=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(o=!0),e.coordinate));return i||a.push(t),o||a.push(n),a},CA=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!a)return null;var h="scaleBand"===s&&a.bandwidth?a.bandwidth()/2:2,m="category"===i&&a.bandwidth?a.bandwidth()/h:0;if(m="angleAxis"===p&&o&&o.length>=2?2*Yw(o[0]-o[1])*m:m,d||f){var v=(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=a.map(n);return OA(i)?{coordinate:i+m,value:e,offset:m,index:t}:null}).filter(aE);return v}return l&&c?c.map((e,t)=>{var n=a.map(e);return OA(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(aE):a.ticks&&null!=u?a.ticks(u).map((e,t)=>{var n=a.map(e);return OA(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(aE):a.domain().map((e,t)=>{var n=a.map(e);return OA(n)?{coordinate:n+m,value:r?r[e]:e,index:t,offset:m}:null}).filter(aE)},NA={sign:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var o=0,a=0,s=0;s<n;++s){var l=e[s],c=null==l?void 0:l[i];if(null!=c){var u=c[1],d=c[0],f=qw(u)?d:u;f>=0?(c[0]=o,o+=f,c[1]=o):(c[0]=a,a+=f,c[1]=a)}}}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}bw(e,t)}},none:bw,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}bw(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,bw(e,t)}},positive:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var o=0,a=0;a<n;++a){var s=e[a],l=null==s?void 0:s[i];if(null!=l){var c=qw(l[1])?l[0]:l[1];c>=0?(l[0]=o,o+=c,l[1]=o):(l[0]=0,l[1]=0)}}}}},IA=(e,t,n)=>{var r,i=null!==(r=NA[n])&&void 0!==r?r:bw,o=function(){var e=bx([]),t=xw,n=bw,r=ww;function i(i){var o,a,s=Array.from(e.apply(this,arguments),Ew),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=Nx(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:bx(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:bx(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?xw:"function"==typeof e?e:bx(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?bw:e,i):n},i}().keys(t).value((e,t)=>Number(jA(e,t,0))).order(xw).offset(i),a=o(e);return a.forEach((n,r)=>{n.forEach((n,i)=>{var o=jA(e[i],t[r],0);Array.isArray(o)&&2===o.length&&Xw(o[0])&&Xw(o[1])&&(n[0]=o[0],n[1]=o[1])})}),a};function DA(e){return null==e?void 0:String(e)}function _A(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=e;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!iE(i[t.dataKey])){var s=rE(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return null!=n&&n[o]?n[o].coordinate+r/2:null}var l=jA(i,iE(a)?t.dataKey:a),c=t.scale.map(l);return Xw(c)?c:null}var RA=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:a}=e;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=jA(o,t.dataKey,t.scale.domain()[a]);if(iE(s))return null;var l=t.scale.map(s);return Xw(l)?l-i/2+r:null},LA=(e,t,n)=>{var r;if(null!=e)return r=Object.keys(e).reduce((r,i)=>{var o=e[i];if(!o)return r;var{stackedData:a}=o,s=a.reduce((e,r)=>{var i,o=EA(r,t,n),a=(i=o.flat(2).filter(Xw),[Math.min(...i),Math.max(...i)]);return OA(a[0])&&OA(a[1])?[Math.min(e[0],a[0]),Math.max(e[1],a[1])]:e},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},zA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,VA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,BA=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=IS(t,e=>e.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min(((null==l?void 0:l.coordinate)||0)-((null==c?void 0:c.coordinate)||0),o)}return o===1/0?0:o}return n?void 0:0};function FA(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return PA(PA({},t),{},{dataKey:n,payload:r,value:i,name:o})}function $A(e,t){return e?String(e):"string"==typeof t?t:void 0}var UA=e=>e.layout.width,WA=e=>e.layout.height,KA=e=>e.layout.scale,HA=e=>e.layout.margin,YA=rs(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),qA=rs(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),GA="data-recharts-item-id";function XA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XA(Object(n),!0).forEach(function(t){JA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QA,ej,tj,nj,rj,ij=rs([UA,WA,HA,e=>e.brush.height,function(e){return qA(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return qA(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return YA(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return YA(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},DS,e=>e.legend.size],(e,t,n,r,i,o,a,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},d=ZA(ZA({},{top:(n.top||0)+a,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=t;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==o&&Xw(e[o]))return PA(PA({},e),{},{[o]:e[o]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===o)&&"middle"!==a&&Xw(e[a]))return PA(PA({},e),{},{[a]:e[a]+(i||0)})}return e})(d,l,c);var p=e-d.left-d.right,h=t-d.top-d.bottom;return ZA(ZA({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(h,0)})}),oj=rs(ij,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),aj=rs(UA,WA,(e,t)=>({x:0,y:0,width:e,height:t})),sj=o(null),lj=()=>null!=i(sj),cj=e=>e.brush,uj=rs([cj,ij,HA],(e,t,n)=>({height:e.height,x:Xw(e.x)?e.x:t.left,y:Xw(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:Xw(e.width)?e.width:t.width})),dj={},fj={},pj={};function hj(){return QA||(QA=1,e=pj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:n,edges:r}={}){let i,o=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),l=()=>{null!==o&&(e.apply(i,o),i=void 0,o=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,s&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),i=void 0,o=null},f=function(...e){if(n?.aborted)return;i=this,o=e;const t=null==c;u(),a&&t&&l()};return f.schedule=u,f.cancel=d,f.flush=()=>{l()},n?.addEventListener("abort",d,{once:!0}),f}),pj;var e}function mj(){return ej||(ej=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hj();e.debounce=function(e,n=0,r={}){"object"!=typeof r&&(r={});const{leading:i=!1,trailing:o=!0,maxWait:a}=r,s=Array(2);let l;i&&(s[0]="leading"),o&&(s[1]="trailing");let c=null;const u=t.debounce(function(...t){l=e.apply(this,t),c=null},n,{edges:s}),d=function(...t){return null!=a&&(null===c&&(c=Date.now()),Date.now()-c>=a)?(l=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),l):(u.apply(this,t),l)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}}(fj)),fj}function vj(){return tj||(tj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mj();e.throttle=function(e,n=0,r={}){const{leading:i=!0,trailing:o=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:o})}}(dj)),dj}function yj(){return rj?nj:(rj=1,nj=vj().throttle)}var gj=S(yj()),bj=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if("undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(t.replace(/%s/g,()=>r[o++]))}},xj={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},wj=(e,t,n)=>{var{width:r=xj.width,height:i=xj.height,aspect:o,maxHeight:a}=n,s=Gw(r)?e:Number(r),l=Gw(i)?t:Number(i);return o&&o>0&&(s?l=s/o:l&&(s=l*o),a&&null!=l&&l>a&&(l=a)),{calculatedWidth:s,calculatedHeight:l}},Ej={width:0,height:0,overflow:"visible"},Oj={width:0,overflowX:"visible"},Sj={height:0,overflowY:"visible"},kj={},Pj=e=>{var{width:t,height:n}=e,r=Gw(t),i=Gw(n);return r&&i?Ej:r?Oj:i?Sj:kj};function Aj(){return Aj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Aj.apply(null,arguments)}function jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jj(Object(n),!0).forEach(function(t){Mj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cj=o(xj.initialDimension);function Nj(t){var{children:n,width:r,height:i}=t,o=d(()=>({width:r,height:i}),[r,i]);return function(e){return SA(e.width)&&SA(e.height)}(o)?e.createElement(Cj.Provider,{value:o},n):null}var Ij=()=>i(Cj),Dj=a((t,n)=>{var{aspect:r,initialDimension:i=xj.initialDimension,width:o,height:a,minWidth:c=xj.minWidth,minHeight:u,maxHeight:d,children:p,debounce:h=xj.debounce,id:v,className:y,onResize:b,style:x={}}=t,w=s(null),E=s();E.current=b,g(n,()=>w.current);var[O,S]=m({containerWidth:i.width,containerHeight:i.height}),k=f((e,t)=>{S(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);l(()=>{if(null==w.current||"undefined"==typeof ResizeObserver)return sE;var e=e=>{var t,n=e[0];if(null!=n){var{width:r,height:i}=n.contentRect;k(r,i),null===(t=E.current)||void 0===t||t.call(E,r,i)}};h>0&&(e=gj(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=w.current.getBoundingClientRect();return k(n,r),t.observe(w.current),()=>{t.disconnect()}},[k,h]);var{containerWidth:P,containerHeight:A}=O;bj(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:j,calculatedHeight:T}=wj(P,A,{width:o,height:a,aspect:r,maxHeight:d});return bj(null!=j&&j>0||null!=T&&T>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",j,T,o,a,c,u,r),e.createElement("div",{id:v?"".concat(v):void 0,className:fe("recharts-responsive-container",y),style:Tj(Tj({},x),{},{width:o,height:a,minWidth:c,minHeight:u,maxHeight:d}),ref:w},e.createElement("div",{style:Pj({width:o,height:a})},e.createElement(Nj,{width:j,height:T},p)))}),_j=a((t,n)=>{var r=Ij();if(SA(r.width)&&SA(r.height))return t.children;var{width:i,height:o}=function(e){var{width:t,height:n,aspect:r}=e,i=t,o=n;return void 0===i&&void 0===o?(i=xj.width,o=xj.height):void 0===i?i=r&&r>0?void 0:xj.width:void 0===o&&(o=r&&r>0?void 0:xj.height),{width:i,height:o}}({width:t.width,height:t.height,aspect:t.aspect}),{calculatedWidth:a,calculatedHeight:s}=wj(void 0,void 0,{width:i,height:o,aspect:t.aspect,maxHeight:t.maxHeight});return Xw(a)&&Xw(s)?e.createElement(Nj,{width:a,height:s},t.children):e.createElement(Dj,Aj({},t,{width:i,height:o,ref:n}))});function Rj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Lj=()=>{var e,t=lj(),n=lS(oj),r=lS(uj),i=null===(e=lS(cj))||void 0===e?void 0:e.padding;return t&&r&&i?{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}:n},zj={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Vj=()=>{var e;return null!==(e=lS(ij))&&void 0!==e?e:zj},Bj=()=>lS(UA),Fj=()=>lS(WA),$j=e=>e.layout.layoutType,Uj=()=>lS($j),Wj=()=>{var e=Uj();if("horizontal"===e||"vertical"===e)return e},Kj=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},Hj=e=>{var t=iS(),n=lj(),{width:r,height:i}=e,o=Ij(),a=r,s=i;return o&&(a=o.width>0?o.width:r,s=o.height>0?o.height:i),l(()=>{!n&&SA(a)&&SA(s)&&t(bA({width:a,height:s}))},[t,n,a,s]),null},Yj=Symbol.for("immer-nothing"),qj=Symbol.for("immer-draftable"),Gj=Symbol.for("immer-state"),Xj="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function Zj(e,...t){if("production"!==process.env.NODE_ENV){const n=Xj[e],r="function"==typeof n?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jj=Object.getPrototypeOf;function Qj(e){return!!e&&!!e[Gj]}function eT(e){return!!e&&(rT(e)||Array.isArray(e)||!!e[qj]||!!e.constructor?.[qj]||lT(e)||cT(e))}var tT=Object.prototype.constructor.toString(),nT=new WeakMap;function rT(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=nT.get(n);return void 0===r&&(r=Function.toString.call(n),nT.set(n,r)),r===tT}function iT(e,t,n=!0){if(0===oT(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function oT(e){const t=e[Gj];return t?t.type_:Array.isArray(e)?1:lT(e)?2:cT(e)?3:0}function aT(e,t){return 2===oT(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function sT(e,t,n){const r=oT(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function lT(e){return e instanceof Map}function cT(e){return e instanceof Set}function uT(e){return e.copy_||e.base_}function dT(e,t){if(lT(e))return new Map(e);if(cT(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=rT(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Gj];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Jj(e),t)}{const t=Jj(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function fT(e,t=!1){return hT(e)||Qj(e)||!eT(e)||(oT(e)>1&&Object.defineProperties(e,{set:pT,add:pT,clear:pT,delete:pT}),Object.freeze(e),t&&Object.values(e).forEach(e=>fT(e,!0))),e}var pT={value:function(){Zj(2)}};function hT(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var mT,vT={};function yT(e){const t=vT[e];return t||Zj(0,e),t}function gT(){return mT}function bT(e,t){t&&(yT("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function xT(e){wT(e),e.drafts_.forEach(OT),e.drafts_=null}function wT(e){e===mT&&(mT=e.parent_)}function ET(e){return mT={drafts_:[],parent_:mT,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function OT(e){const t=e[Gj];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function ST(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Gj].modified_&&(xT(t),Zj(4)),eT(e)&&(e=kT(t,e),t.parent_||AT(t,e)),t.patches_&&yT("Patches").generateReplacementPatches_(n[Gj].base_,e,t.patches_,t.inversePatches_)):e=kT(t,n,[]),xT(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Yj?e:void 0}function kT(e,t,n){if(hT(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Gj];if(!i)return iT(t,(r,o)=>PT(e,i,t,r,o,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return AT(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let o=t,a=!1;3===i.type_&&(o=new Set(t),t.clear(),a=!0),iT(o,(r,o)=>PT(e,i,t,r,o,n,a),r),AT(e,t,!1),n&&e.patches_&&yT("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function PT(e,t,n,r,i,o,a){if(null==i)return;if("object"!=typeof i&&!a)return;const s=hT(i);if(!s||a){if("production"!==process.env.NODE_ENV&&i===n&&Zj(5),Qj(i)){const a=kT(e,i,o&&t&&3!==t.type_&&!aT(t.assigned_,r)?o.concat(r):void 0);if(sT(n,r,a),!Qj(a))return;e.canAutoFreeze_=!1}else a&&n.add(i);if(eT(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===i&&s)return;kT(e,i),t&&t.scope_.parent_||"symbol"==typeof r||!(lT(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||AT(e,i)}}}function AT(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fT(t,n)}var jT={get(e,t){if(t===Gj)return e;const n=uT(e);if(!aT(n,t))return function(e,t,n){const r=CT(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!eT(r)?r:r===MT(e.base_,t)?(IT(e),e.copy_[t]=DT(r,e)):r},has:(e,t)=>t in uT(e),ownKeys:e=>Reflect.ownKeys(uT(e)),set(e,t,n){const r=CT(uT(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=MT(uT(e),t),i=r?.[Gj];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||aT(e.base_,t)))return!0;IT(e),NT(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==MT(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,IT(e),NT(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=uT(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Zj(11)},getPrototypeOf:e=>Jj(e.base_),setPrototypeOf(){Zj(12)}},TT={};function MT(e,t){const n=e[Gj];return(n?uT(n):e)[t]}function CT(e,t){if(!(t in e))return;let n=Jj(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Jj(n)}}function NT(e){e.modified_||(e.modified_=!0,e.parent_&&NT(e.parent_))}function IT(e){e.copy_||(e.copy_=dT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}iT(jT,(e,t)=>{TT[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),TT.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&Zj(13),TT.set.call(this,e,t,void 0)},TT.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&Zj(14),jT.set.call(this,e[0],t,n,e[0])};function DT(e,t){const n=lT(e)?yT("MapSet").proxyMap_(e,t):cT(e)?yT("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:gT(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=jT;n&&(i=[r],o=TT);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}(e,t);return(t?t.scope_:gT()).drafts_.push(n),n}function _T(e){if(!eT(e)||hT(e))return e;const t=e[Gj];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=dT(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=dT(e,!0);return iT(n,(e,t)=>{sT(n,e,_T(t))},r),t&&(t.finalized_=!1),n}var RT=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if("function"!=typeof t&&Zj(6),void 0!==n&&"function"!=typeof n&&Zj(7),eT(e)){const i=ET(this),o=DT(e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?xT(i):wT(i)}return bT(i,n),ST(r,i)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Yj&&(r=void 0),this.autoFreeze_&&fT(r,!0),n){const t=[],i=[];yT("Patches").generateReplacementPatches_(e,r,t,i),n(t,i)}return r}Zj(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){eT(e)||Zj(8),Qj(e)&&(e=function(e){Qj(e)||Zj(10,e);return _T(e)}(e));const t=ET(this),n=DT(e,void 0);return n[Gj].isManual_=!0,wT(t),n}finishDraft(e,t){const n=e&&e[Gj];n&&n.isManual_||Zj(9);const{scope_:r}=n;return bT(r,t),ST(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=yT("Patches").applyPatches_;return Qj(e)?r(e,t):this.produce(e,e=>r(e,t))}};RT.produce;var LT,zT=RP({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:PP()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=nP(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:PP()},removeLegendPayload:{reducer(e,t){var n=nP(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:PP()}}}),{setLegendSize:VT,setLegendSettings:BT,addLegendPayload:FT,replaceLegendPayload:$T,removeLegendPayload:UT}=zT.actions,WT=zT.reducer,KT={exports:{}},HT={};var YT,qT,GT={};
|
|
58
|
+
/**
|
|
59
|
+
* @license React
|
|
60
|
+
* use-sync-external-store-with-selector.development.js
|
|
61
|
+
*
|
|
62
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the MIT license found in the
|
|
65
|
+
* LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/qT||(qT=1,"production"===process.env.NODE_ENV?KT.exports=function(){if(LT)return HT;LT=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,s=e.useDebugValue;return HT.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a(function(){function e(e){if(!o){if(o=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,i=a)}var r,i,o=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,l,c,u]);var p=r(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),s(p),p},HT}():KT.exports=(YT||(YT=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,s=e.useDebugValue;GT.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a(function(){function e(e){if(!o){if(o=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,i=a)}var r,i,o=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,l,c,u]);var p=r(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),s(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),GT)),KT.exports;var XT={notify(){},get:()=>[]};var ZT=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),JT=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),QT=(()=>ZT||JT?e.useLayoutEffect:e.useEffect)();function eM(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function tM(e,t){if(eM(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!eM(e[n[r]],t[n[r]]))return!1;return!0}var nM=Symbol.for("react-redux-context"),rM="undefined"!=typeof globalThis?globalThis:{};function iM(){if(!e.createContext)return{};const t=rM[nM]??=new Map;let n=t.get(e.createContext);return n||(n=e.createContext(null),"production"!==process.env.NODE_ENV&&(n.displayName="ReactRedux"),t.set(e.createContext,n)),n}var oM=iM();var aM=function(t){const{children:n,context:r,serverState:i,store:o}=t,a=e.useMemo(()=>{const e=function(e){let t,n=XT,r=0,i=!1;function o(){l.onStateChange&&l.onStateChange()}function a(){r++,t||(t=e.subscribe(o),n=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){var t;t=()=>{let t=e;for(;t;)t.callback(),t=t.next},t()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}())}function s(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=XT)}const l={addNestedSub:function(e){a();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,a())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return l}(o),n={store:o,subscription:e,getServerState:i?()=>i:void 0};if("production"===process.env.NODE_ENV)return n;{const{identityFunctionCheck:e="once",stabilityCheck:r="once"}=t;return Object.assign(n,{stabilityCheck:r,identityFunctionCheck:e})}},[o,i]),s=e.useMemo(()=>o.getState(),[o]);QT(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==o.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=r||oM;return e.createElement(l.Provider,{value:a},n)},sM=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function lM(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function cM(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(sM.has(r)){if(null==e[r]&&null==t[r])continue;if(!tM(e[r],t[r]))return!1}else if(!lM(e[r],t[r]))return!1;return!0}function uM(){return uM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uM.apply(null,arguments)}function dM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dM(Object(n),!0).forEach(function(t){pM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hM(e){return Array.isArray(e)&&Zw(e[0])&&Zw(e[1])?e.join(" ~ "):e}var mM={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};var vM=t=>{var{separator:n=mM.separator,contentStyle:r,itemStyle:i,labelStyle:o=mM.labelStyle,payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=mM.accessibilityLayer}=t,h=fM(fM({},mM.contentStyle),r),m=fM({margin:0},o),v=!iE(d),y=v?d:"",g=fe("recharts-default-tooltip",c),b=fe("recharts-tooltip-label",u);v&&f&&null!=a&&(y=f(d,a));var x=p?{role:"status","aria-live":"assertive"}:{};return e.createElement("div",uM({className:g,style:h},x),e.createElement("p",{className:b,style:m},e.isValidElement(y)?y:"".concat(y)),(()=>{if(a&&a.length){var t=function(e,t){return null==t?e:IS(e,t)}(a,l),r=t.map((t,r)=>{if(!t||"none"===t.type)return null;var o=t.formatter||s||hM,{value:l,name:c}=t,u=l,d=c;if(o){var f=o(l,c,t,r,a);if(Array.isArray(f))[u,d]=f;else{if(null==f)return null;u=f}}var p=fM(fM({},mM.itemStyle),{},{color:t.color||mM.itemStyle.color},i);return e.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:p},Zw(d)?e.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Zw(d)?e.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,e.createElement("span",{className:"recharts-tooltip-item-value"},u),e.createElement("span",{className:"recharts-tooltip-item-unit"},t.unit||""))});return e.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},r)}return null})())},yM="recharts-tooltip-wrapper",gM={visibility:"hidden"};function bM(e){var{coordinate:t,translateX:n,translateY:r}=e;return fe(yM,{["".concat(yM,"-right")]:Xw(n)&&t&&Xw(t.x)&&n>=t.x,["".concat(yM,"-left")]:Xw(n)&&t&&Xw(t.x)&&n<t.x,["".concat(yM,"-bottom")]:Xw(r)&&t&&Xw(t.y)&&r>=t.y,["".concat(yM,"-top")]:Xw(r)&&t&&Xw(t.y)&&r<t.y})}function xM(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(o&&Xw(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var f=l[r];return null==f?0:a[r]?u<f?Math.max(d,f):Math.max(u,f):null==c?0:d+s>f+c?Math.max(u,f):Math.max(d,f)}var wM=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function EM(){var[e,t]=m(()=>!wM&&(!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches));return l(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(e.matches)};return e.addEventListener("change",n),()=>{e.removeEventListener("change",n)}}},[]),e}function OM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OM(Object(n),!0).forEach(function(t){kM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PM(e){if(!e.prefersReducedMotion||"auto"!==e.isAnimationActive)return e.isAnimationActive&&e.active?"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing):void 0}function AM(t){var n,r,i,o,a,s,l=EM(),[c,u]=e.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));e.useEffect(()=>{var e=e=>{var n,r,i,o;"Escape"===e.key&&u({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(i=null===(o=t.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[null===(n=t.coordinate)||void 0===n?void 0:n.x,null===(r=t.coordinate)||void 0===r?void 0:r.y]),!c.dismissed||(null!==(i=null===(o=t.coordinate)||void 0===o?void 0:o.x)&&void 0!==i?i:0)===c.dismissedAtCoordinate.x&&(null!==(a=null===(s=t.coordinate)||void 0===s?void 0:s.y)&&void 0!==a?a:0)===c.dismissedAtCoordinate.y||u(SM(SM({},c),{},{dismissed:!1}));var{cssClasses:d,cssProperties:f}=function(e){var t,n,r,{allowEscapeViewBox:i,coordinate:o,offsetTop:a,offsetLeft:s,position:l,reverseDirection:c,tooltipBox:u,useTranslate3d:d,viewBox:f}=e;return t=u.height>0&&u.width>0&&o?function(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=xM({allowEscapeViewBox:i,coordinate:o,key:"x",offset:s,position:l,reverseDirection:c,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),translateY:r=xM({allowEscapeViewBox:i,coordinate:o,key:"y",offset:a,position:l,reverseDirection:c,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),useTranslate3d:d}):gM,{cssProperties:t,cssClasses:bM({translateX:n,translateY:r,coordinate:o})}}({allowEscapeViewBox:t.allowEscapeViewBox,coordinate:t.coordinate,offsetLeft:"number"==typeof t.offset?t.offset:t.offset.x,offsetTop:"number"==typeof t.offset?t.offset:t.offset.y,position:t.position,reverseDirection:t.reverseDirection,tooltipBox:{height:t.lastBoundingBox.height,width:t.lastBoundingBox.width},useTranslate3d:t.useTranslate3d,viewBox:t.viewBox}),p=t.hasPortalFromProps?{}:SM(SM({transition:PM({prefersReducedMotion:l,isAnimationActive:t.isAnimationActive,active:t.active,animationDuration:t.animationDuration,animationEasing:t.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=SM(SM({},p),{},{visibility:!c.dismissed&&t.active&&t.hasPayload?"visible":"hidden"},t.wrapperStyle);return e.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:d,style:h,ref:t.innerRef},t.children)}var jM=e.memo(AM),TM=()=>{var e;return null===(e=lS(e=>e.rootProps.accessibilityLayer))||void 0===e||e};function MM(){return MM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MM.apply(null,arguments)}function CM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CM(Object(n),!0).forEach(function(t){IM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DM={curveBasisClosed:function(e){return new aw(e)},curveBasisOpen:function(e){return new sw(e)},curveBasis:function(e){return new ow(e)},curveBumpX:function(e){return new Vx(e,!0)},curveBumpY:function(e){return new Vx(e,!1)},curveLinearClosed:function(e){return new lw(e)},curveLinear:Dx,curveMonotoneX:function(e){return new pw(e)},curveMonotoneY:function(e){return new hw(e)},curveNatural:function(e){return new vw(e)},curveStep:function(e){return new gw(e,.5)},curveStepAfter:function(e){return new gw(e,1)},curveStepBefore:function(e){return new gw(e,0)}},_M=e=>OA(e.x)&&OA(e.y),RM=e=>null!=e.base&&_M(e.base)&&_M(e),LM=e=>e.x,zM=e=>e.y,VM={connectNulls:!1,type:"linear"},BM=e=>{var{type:t=VM.type,points:n=[],baseLine:r,layout:i,connectNulls:o=VM.connectNulls}=e,a=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(oE(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=DM["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return DM[n]||Dx})(t,i),s=o?n.filter(_M):n;if(Array.isArray(r)){var l=n.map((e,t)=>NM(NM({},e),{},{base:r[t]}));return("vertical"===i?zx().y(zM).x1(LM).x0(e=>e.base.x):zx().x(LM).y1(zM).y0(e=>e.base.y)).defined(RM).curve(a)(o?l.filter(RM):l)}return("vertical"===i&&Xw(r)?zx().y(zM).x1(LM).x0(r):Xw(r)?zx().x(LM).y1(zM).y0(r):Lx().x(LM).y(zM)).defined(_M).curve(a)(s)},FM=t=>{var{className:n,points:r,path:i,pathRef:o}=t,a=Uj();if(!(r&&r.length||i))return null;var s={type:t.type,points:t.points,baseLine:t.baseLine,layout:t.layout||a,connectNulls:t.connectNulls},l=r&&r.length?BM(s):i;return e.createElement("path",MM({},cx(t),yE(t),{className:fe("recharts-curve",n),d:null===l?void 0:l,ref:o}))},$M=["x","y","top","left","width","height","className"];function UM(){return UM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UM.apply(null,arguments)}function WM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HM=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),YM=t=>{var{x:n=0,y:r=0,top:i=0,left:o=0,width:a=0,height:s=0,className:l}=t,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,$M),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WM(Object(n),!0).forEach(function(t){KM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:r,top:i,left:o,width:a,height:s},c);return Xw(n)&&Xw(r)&&Xw(a)&&Xw(s)&&Xw(i)&&Xw(o)?e.createElement("path",UM({},dx(u),{className:fe("recharts-cross",l),d:HM(n,r,a,s,i,o)})):null};function qM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qM(Object(n),!0).forEach(function(t){XM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZM=(e,t,n)=>e.map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","),JM=(e,t)=>Object.keys(t).reduce((n,r)=>GM(GM({},n),{},{[r]:e(r,t[r])}),{});function QM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QM(Object(n),!0).forEach(function(t){tC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nC=(e,t,n)=>e+(t-e)*n,rC=e=>{var{from:t,to:n}=e;return t!==n},iC=(e,t,n)=>{var r=JM((t,n)=>{if(rC(n)){var[r,i]=e(n.from,n.to,n.velocity);return eC(eC({},n),{},{from:r,velocity:i})}return n},t);return n<1?JM((e,t)=>rC(t)&&null!=r[e]?eC(eC({},t),{},{velocity:nC(t.velocity,r[e].velocity,n),from:nC(t.from,r[e].from,n)}):t,t):iC(e,r,n-1)};function oC(e,t,n,r,i,o){var a,s=r.reduce((n,r)=>eC(eC({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{a||(a=r);var u=(r-a)/n.dt;s=iC(n,s,u),i(eC(eC(eC({},e),t),JM((e,t)=>t.from,s))),a=r,Object.values(s).filter(rC).length&&(l=o.setTimeout(c))};return()=>(l=o.setTimeout(c),()=>{var e;null===(e=l)||void 0===e||e()})}var aC=(e,t,n,r,i,o)=>{var a,s,l=(a=e,s=t,[Object.keys(a),Object.keys(s)].reduce((e,t)=>e.filter(e=>t.includes(e))));return null==n?()=>(i(eC(eC({},e),t)),()=>{}):!0===n.isStepper?oC(e,t,n,l,i,o):function(e,t,n,r,i,o,a){var s,l=null,c=i.reduce((n,r)=>{var i=e[r],o=t[r];return null==i||null==o?n:eC(eC({},n),{},{[r]:[i,o]})},{}),u=i=>{s||(s=i);var d=(i-s)/r,f=JM((e,t)=>nC(...t,n(d)),c);if(o(eC(eC(eC({},e),t),f)),d<1)l=a.setTimeout(u);else{var p=JM((e,t)=>nC(...t,n(1)),c);o(eC(eC(eC({},e),t),p))}};return()=>(l=a.setTimeout(u),()=>{var e;null===(e=l)||void 0===e||e()})}(e,t,n,r,l,i,o)},sC=1e-4,lC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],cC=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),uC=(e,t)=>n=>{var r=lC(e,t);return cC(r,n)},dC=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var r=(e=>{var t,n=e.split("(");if(2!==n.length||"cubic-bezier"!==n[0])return null;var r=null===(t=n[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==r||4!==r.length)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]},fC=(e,t,n,r)=>{var i,o,a=uC(e,n),s=uC(t,r),l=(i=e,o=n,e=>{var t=[...lC(i,o).map((e,t)=>e*t).slice(1),0];return cC(t,e)}),c=e=>e>1?1:e<0?0:e,u=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=a(n)-t,o=l(n);if(Math.abs(i-t)<sC||o<sC)return s(n);n=c(n-i/o)}return s(n)};return u.isStepper=!1,u},pC=function(){return fC(...dC(...arguments))},hC=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return pC(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:n=8,dt:r=17}=e,i=(e,i,o)=>{var a=o+(-(e-i)*t-o*n)*r/1e3,s=o*r/1e3+e;return Math.abs(s-i)<sC&&Math.abs(a)<sC?[i,0]:[s,a]};return i.isStepper=!0,i.dt=r,i}();default:if("cubic-bezier"===e.split("(")[0])return pC(e)}return"function"==typeof e?e:null};class mC{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,i=o=>{o-n>=t?e(o):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{null!=r&&cancelAnimationFrame(r)}}}function vC(){return function(e){var t=()=>null,n=!1,r=null,i=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var a=o,[s,...l]=a;return"number"==typeof s?void(r=e.setTimeout(i.bind(null,l),s)):(i(s),void(r=e.setTimeout(i.bind(null,l))))}"string"==typeof o&&t(o),"object"==typeof o&&t(o),"function"==typeof o&&o()}};return{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),i(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}(new mC)}var yC=o(vC);var gC={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},bC={t:0},xC={t:1};function wC(e){var t,n,r,o=wE(e,gC),{isActive:a,canBegin:c,duration:u,easing:f,begin:p,onAnimationEnd:h,onAnimationStart:v,children:y}=o,g=EM(),b="auto"===a?!wM&&!g:a,x=(t=o.animationId,n=o.animationManager,r=i(yC),d(()=>null!=n?n:r(t),[t,n,r])),[w,E]=m(b?bC:xC),O=s(null);return l(()=>{b||E(xC)},[b]),l(()=>{if(!b||!c)return sE;var e=aC(bC,xC,hC(f),u,E,x.getTimeoutController());return x.start([v,p,()=>{O.current=e()},u,h]),()=>{x.stop(),O.current&&O.current(),h()}},[b,c,u,f,p,v,h,x]),y(w.t)}function EC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",n=s(Qw(t)),r=s(e);return r.current!==e&&(n.current=Qw(t),r.current=e),n.current}var OC,SC,kC,PC,AC,jC,TC,MC,CC,NC,IC=["radius"],DC=["radius"];function _C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_C(Object(n),!0).forEach(function(t){LC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zC(){return zC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zC.apply(null,arguments)}function VC(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function BC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var FC=(e,t,n,r,i)=>{var o,a=Kw(n),s=Kw(r),l=Math.min(Math.abs(a)/2,Math.abs(s)/2),c=s>=0?1:-1,u=a>=0?1:-1,d=s>=0&&a>=0||s<0&&a<0?1:0;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0;p<4;p++){var h,m=null!==(h=i[p])&&void 0!==h?h:0;f[p]=m>l?l:m}o=Hw(OC||(OC=BC(["M",",",""])),e,t+c*f[0]),f[0]>0&&(o+=Hw(SC||(SC=BC(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,e+u*f[0],t)),o+=Hw(kC||(kC=BC(["L ",",",""])),e+n-u*f[1],t),f[1]>0&&(o+=Hw(PC||(PC=BC(["A ",",",",0,0,",",\n ",",",""])),f[1],f[1],d,e+n,t+c*f[1])),o+=Hw(AC||(AC=BC(["L ",",",""])),e+n,t+r-c*f[2]),f[2]>0&&(o+=Hw(jC||(jC=BC(["A ",",",",0,0,",",\n ",",",""])),f[2],f[2],d,e+n-u*f[2],t+r)),o+=Hw(TC||(TC=BC(["L ",",",""])),e+u*f[3],t+r),f[3]>0&&(o+=Hw(MC||(MC=BC(["A ",",",",0,0,",",\n ",",",""])),f[3],f[3],d,e,t+r-c*f[3])),o+="Z"}else if(l>0&&i===+i&&i>0){var v=Math.min(l,i);o=Hw(CC||(CC=BC(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+c*v,v,v,d,e+u*v,t,e+n-u*v,t,v,v,d,e+n,t+c*v,e+n,t+r-c*v,v,v,d,e+n-u*v,t+r,e+u*v,t+r,v,v,d,e,t+r-c*v)}else o=Hw(NC||(NC=BC(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return o},$C={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},UC=t=>{var n=wE(t,$C),r=s(null),[i,o]=m(-1);l(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&o(e)}catch(e){}},[]);var{x:a,y:c,width:u,height:f,radius:p,className:h}=n,{animationEasing:v,animationDuration:y,animationBegin:g,isAnimationActive:b,isUpdateAnimationActive:x}=n,w=s(u),E=s(f),O=s(a),S=s(c),k=EC(d(()=>({x:a,y:c,width:u,height:f,radius:p}),[a,c,u,f,p]),"rectangle-");if(a!==+a||c!==+c||u!==+u||f!==+f||0===u||0===f)return null;var P=fe("recharts-rectangle",h);if(!x){var A=dx(n),{radius:j}=A,T=VC(A,IC);return e.createElement("path",zC({},T,{x:Kw(a),y:Kw(c),width:Kw(u),height:Kw(f),radius:"number"==typeof p?p:void 0,className:P,d:FC(a,c,u,f,p)}))}var M=w.current,C=E.current,N=O.current,I=S.current,D="0px ".concat(-1===i?1:i,"px"),_="".concat(i,"px ").concat(i,"px"),R=ZM(["strokeDasharray"],y,"string"==typeof v?v:$C.animationEasing);return e.createElement(wC,{animationId:k,key:k,canBegin:i>0,duration:y,easing:v,isActive:x,begin:g},t=>{var i,o=nE(M,u,t),s=nE(C,f,t),l=nE(N,a,t),d=nE(I,c,t);r.current&&(w.current=o,E.current=s,O.current=l,S.current=d),i=b?t>0?{transition:R,strokeDasharray:_}:{strokeDasharray:D}:{strokeDasharray:_};var h=dx(n),{radius:m}=h,v=VC(h,DC);return e.createElement("path",zC({},v,{radius:"number"==typeof p?p:void 0,className:P,d:FC(l,d,o,s,p),ref:r,style:RC(RC({},i),n.style)}))})};function WC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WC(Object(n),!0).forEach(function(t){HC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function HC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var YC,qC,GC,XC,ZC,JC,QC,eN=Math.PI/180,tN=e=>180*e/Math.PI,nN=(e,t,n,r)=>({x:e+Math.cos(-eN*r)*n,y:t+Math.sin(-eN*r)*n}),rN=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=((e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)})({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:tN(l),angleInRadian:l}},iN=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360);return e+360*Math.min(i,o)},oN=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:o}=rN({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s)return null;if(0===i)return null;var l,{startAngle:c,endAngle:u}=(e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-360*o,endAngle:n-360*o}})(t),d=o;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;l=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;l=d>=u&&d<=c}return l?KC(KC({},t),{},{radius:i,angle:iN(d,t)}):null};function aN(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e;return{points:[nN(t,n,r,i),nN(t,n,r,o)],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function sN(){return sN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sN.apply(null,arguments)}function lN(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var cN=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+r,u=Math.asin(s/c)/eN,d=l?i:i+o*u,f=l?i-o*u:i;return{center:nN(t,n,c,d),circleTangency:nN(t,n,r,d),lineTangency:nN(t,n,c*Math.cos(u*eN),f),theta:u}},uN=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=((e,t)=>Yw(t-e)*Math.min(Math.abs(t-e),359.999))(o,a),l=o+s,c=nN(t,n,i,o),u=nN(t,n,i,l),d=Hw(YC||(YC=lN(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),c.x,c.y,i,i,+(Math.abs(s)>180),+(o>l),u.x,u.y);if(r>0){var f=nN(t,n,r,o),p=nN(t,n,r,l);d+=Hw(qC||(qC=lN(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),p.x,p.y,r,r,+(Math.abs(s)>180),+(o<=l),f.x,f.y)}else d+=Hw(GC||(GC=lN(["L ",","," Z"])),t,n);return d},dN={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},fN=t=>{var n=wE(t,dN),{cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=n;if(a<o||u===d)return null;var p,h=fe("recharts-sector",f),m=a-o,v=eE(s,m,0,!0);return p=v>0&&Math.abs(u-d)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=Yw(c-l),{circleTangency:d,lineTangency:f,theta:p}=cN({cx:t,cy:n,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:h,lineTangency:m,theta:v}=cN({cx:t,cy:n,radius:i,angle:c,sign:-u,cornerRadius:o,cornerIsExternal:s}),y=s?Math.abs(l-c):Math.abs(l-c)-p-v;if(y<0)return a?Hw(XC||(XC=lN(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),f.x,f.y,o,o,2*o,o,o,2*-o):uN({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:c});var g=Hw(ZC||(ZC=lN(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),f.x,f.y,o,o,+(u<0),d.x,d.y,i,i,+(y>180),+(u<0),h.x,h.y,o,o,+(u<0),m.x,m.y);if(r>0){var{circleTangency:b,lineTangency:x,theta:w}=cN({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:E,lineTangency:O,theta:S}=cN({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),k=s?Math.abs(l-c):Math.abs(l-c)-w-S;if(k<0&&0===o)return"".concat(g,"L").concat(t,",").concat(n,"Z");g+=Hw(JC||(JC=lN(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),O.x,O.y,o,o,+(u<0),E.x,E.y,r,r,+(k>180),+(u>0),b.x,b.y,o,o,+(u<0),x.x,x.y)}else g+=Hw(QC||(QC=lN(["L",",","Z"])),t,n);return g})({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):uN({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:u,endAngle:d}),e.createElement("path",sN({},dx(n),{className:h,d:p}))};function pN(e,t,n){if("horizontal"===e)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if("vertical"===e)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(vE(t)){if("centric"===e){var{cx:r,cy:i,innerRadius:o,outerRadius:a,angle:s}=t,l=nN(r,i,o,s),c=nN(r,i,a,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return aN(t)}}var hN,mN,vN,yN,gN,bN={},xN={},wN={};function EN(){return hN||(hN=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bS();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(wN)),wN}function ON(){return mN||(mN=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EN();e.toFinite=function(e){if(!e)return 0===e?e:0;if((e=t.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}}(xN)),xN}function SN(){return vN||(vN=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MS(),n=ON();e.range=function(e,r,i){i&&"number"!=typeof i&&t.isIterateeCall(e,r,i)&&(r=i=void 0),e=n.toFinite(e),void 0===r?(r=e,e=0):r=n.toFinite(r),i=void 0===i?e<r?1:-1:n.toFinite(i);const o=Math.max(Math.ceil((r-e)/(i||1)),0),a=new Array(o);for(let t=0;t<o;t++)a[t]=e,e+=i;return a}}(bN)),bN}function kN(){return gN?yN:(gN=1,yN=SN().range)}var PN=S(kN()),AN=e=>e.chartData,jN=rs([AN],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),TN=(e,t,n,r)=>r?jN(e):AN(e),MN=(e,t,n)=>n?jN(e):AN(e),CN=rs([TN],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});rs([jN],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});var NN=rs([AN],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});function IN(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(OA(t)&&OA(n))return!0}return!1}function DN(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function _N(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[i,o]=e;if(OA(i))n=i;else if("function"==typeof i)return;if(OA(o))r=o;else if("function"==typeof o)return;var a=[n,r];if(IN(a))return a}}var RN,LN=1e9,zN=!0,VN="[DecimalError] ",BN=VN+"Invalid argument: ",FN=VN+"Exponent out of range: ",$N=Math.floor,UN=Math.pow,WN=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,KN=1e7,HN=9007199254740991,YN=$N(1286742750677284.5),qN={};function GN(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),zN?oI(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),o>(s=(a=Math.ceil(d/7))>s?a+1:s+1)&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((s=l.length)-(o=c.length)<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/KN|0,l[o]%=KN;for(n&&(l.unshift(n),++i),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=i,zN?oI(t,d):t}function XN(e,t,n){if(e!==~~e||e<t||e>n)throw Error(BN+e)}function ZN(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=nI(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=nI(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}qN.absoluteValue=qN.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},qN.comparedTo=qN.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(t=0,n=(r=o.d.length)<(i=e.d.length)?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},qN.decimalPlaces=qN.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},qN.dividedBy=qN.div=function(e){return JN(this,new this.constructor(e))},qN.dividedToIntegerBy=qN.idiv=function(e){var t=this.constructor;return oI(JN(this,new t(e),0,1),t.precision)},qN.equals=qN.eq=function(e){return!this.cmp(e)},qN.exponent=function(){return eI(this)},qN.greaterThan=qN.gt=function(e){return this.cmp(e)>0},qN.greaterThanOrEqualTo=qN.gte=function(e){return this.cmp(e)>=0},qN.isInteger=qN.isint=function(){return this.e>this.d.length-2},qN.isNegative=qN.isneg=function(){return this.s<0},qN.isPositive=qN.ispos=function(){return this.s>0},qN.isZero=function(){return 0===this.s},qN.lessThan=qN.lt=function(e){return this.cmp(e)<0},qN.lessThanOrEqualTo=qN.lte=function(e){return this.cmp(e)<1},qN.logarithm=qN.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(RN))throw Error(VN+"NaN");if(n.s<1)throw Error(VN+(n.s?"NaN":"-Infinity"));return n.eq(RN)?new r(0):(zN=!1,t=JN(rI(n,o),rI(e,o),o),zN=!0,oI(t,i))},qN.minus=qN.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?aI(t,e):GN(t,(e.s=-e.s,e))},qN.modulo=qN.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(VN+"NaN");return n.s?(zN=!1,t=JN(n,e,0,1).times(e),zN=!0,n.minus(t)):oI(new r(n),i)},qN.naturalExponential=qN.exp=function(){return QN(this)},qN.naturalLogarithm=qN.ln=function(){return rI(this)},qN.negated=qN.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},qN.plus=qN.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?GN(t,e):aI(t,(e.s=-e.s,e))},qN.precision=qN.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(BN+e);if(t=eI(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},qN.squareRoot=qN.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(VN+"NaN")}for(e=eI(s),zN=!1,0==(i=Math.sqrt(+s))||i==1/0?(((t=ZN(s.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=$N((e+1)/2)-(e<0||e%2),r=new l(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(i.toString()),i=a=(n=l.precision)+3;;)if(r=(o=r).plus(JN(s,o,a+2)).times(.5),ZN(o.d).slice(0,a)===(t=ZN(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(oI(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if("9999"!=t)break;a+=4}return zN=!0,oI(r,n)},qN.times=qN.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,(l=f.length)<(c=p.length)&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],r=a=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%KN|0,t=s/KN|0;o[i]=(o[i]+t)%KN|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,zN?oI(e,d.precision):e},qN.toDecimalPlaces=qN.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(XN(e,0,LN),void 0===t?t=r.rounding:XN(t,0,8),oI(n,e+eI(n)+1,t))},qN.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=sI(r,!0):(XN(e,0,LN),void 0===t?t=i.rounding:XN(t,0,8),n=sI(r=oI(new i(r),e+1,t),!0,e+1)),n},qN.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?sI(i):(XN(e,0,LN),void 0===t?t=o.rounding:XN(t,0,8),n=sI((r=oI(new o(i),e+eI(i)+1,t)).abs(),!1,e+eI(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},qN.toInteger=qN.toint=function(){var e=this,t=e.constructor;return oI(new t(e),eI(e)+1,t.rounding)},qN.toNumber=function(){return+this},qN.toPower=qN.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l(RN);if(!(s=new l(s)).s){if(e.s<1)throw Error(VN+"Infinity");return s}if(s.eq(RN))return s;if(r=l.precision,e.eq(RN))return oI(s,r);if(a=(t=e.e)>=(n=e.d.length-1),o=s.s,a){if((n=c<0?-c:c)<=HN){for(i=new l(RN),t=Math.ceil(r/7+4),zN=!1;n%2&&lI((i=i.times(s)).d,t),0!==(n=$N(n/2));)lI((s=s.times(s)).d,t);return zN=!0,e.s<0?new l(RN).div(i):oI(i,r)}}else if(o<0)throw Error(VN+"NaN");return o=o<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,zN=!1,i=e.times(rI(s,r+12)),zN=!0,(i=QN(i)).s=o,i},qN.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?r=sI(i,(n=eI(i))<=o.toExpNeg||n>=o.toExpPos):(XN(e,1,LN),void 0===t?t=o.rounding:XN(t,0,8),r=sI(i=oI(new o(i),e,t),e<=(n=eI(i))||n<=o.toExpNeg,e)),r},qN.toSignificantDigits=qN.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(XN(e,1,LN),void 0===t?t=n.rounding:XN(t,0,8)),oI(new n(this),e,t)},qN.toString=qN.valueOf=qN.val=qN.toJSON=qN[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=eI(e),n=e.constructor;return sI(e,t<=n.toExpNeg||t>=n.toExpPos)};var JN=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%KN|0,r=n/KN|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*KN+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,h,m,v,y,g,b,x,w,E,O,S,k=r.constructor,P=r.s==i.s?1:-1,A=r.d,j=i.d;if(!r.s)return new k(r);if(!i.s)throw Error(VN+"Division by zero");for(l=r.e-i.e,O=j.length,w=A.length,h=(p=new k(P)).d=[],c=0;j[c]==(A[c]||0);)++c;if(j[c]>(A[c]||0)&&--l,(g=null==o?o=k.precision:a?o+(eI(r)-eI(i))+1:o)<0)return new k(0);if(g=g/7+2|0,c=0,1==O)for(u=0,j=j[0],g++;(c<w||u)&&g--;c++)b=u*KN+(A[c]||0),h[c]=b/j|0,u=b%j|0;else{for((u=KN/(j[0]+1)|0)>1&&(j=e(j,u),A=e(A,u),O=j.length,w=A.length),x=O,v=(m=A.slice(0,O)).length;v<O;)m[v++]=0;(S=j.slice()).unshift(0),E=j[0],j[1]>=KN/2&&++E;do{u=0,(s=t(j,m,O,v))<0?(y=m[0],O!=v&&(y=y*KN+(m[1]||0)),(u=y/E|0)>1?(u>=KN&&(u=KN-1),1==(s=t(d=e(j,u),m,f=d.length,v=m.length))&&(u--,n(d,O<f?S:j,f))):(0==u&&(s=u=1),d=j.slice()),(f=d.length)<v&&d.unshift(0),n(m,d,v),-1==s&&(s=t(j,m,O,v=m.length))<1&&(u++,n(m,O<v?S:j,v)),v=m.length):0===s&&(u++,m=[0]),h[c++]=u,s&&m[0]?m[v++]=A[x]||0:(m=[A[x]],v=1)}while((x++<w||void 0!==m[0])&&g--)}return h[0]||h.shift(),p.e=l,oI(p,a?o+eI(p)+1:o)}}();function QN(e,t){var n,r,i,o,a,s=0,l=0,c=e.constructor,u=c.precision;if(eI(e)>16)throw Error(FN+eI(e));if(!e.s)return new c(RN);for(zN=!1,a=u,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),l+=5;for(a+=Math.log(UN(2,l))/Math.LN10*2+5|0,n=r=i=new c(RN),c.precision=a;;){if(r=oI(r.times(e),a),n=n.times(++s),ZN((o=i.plus(JN(r,n,a))).d).slice(0,a)===ZN(i.d).slice(0,a)){for(;l--;)i=oI(i.times(i),a);return c.precision=u,null==t?(zN=!0,oI(i,u)):i}i=o}}function eI(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function tI(e,t,n){if(t>e.LN10.sd())throw zN=!0,n&&(e.precision=n),Error(VN+"LN10 precision limit exceeded");return oI(new e(e.LN10),t)}function nI(e){for(var t="";e--;)t+="0";return t}function rI(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=e,p=f.d,h=f.constructor,m=h.precision;if(f.s<1)throw Error(VN+(f.s?"NaN":"-Infinity"));if(f.eq(RN))return new h(0);if(null==t?(zN=!1,c=m):c=t,f.eq(10))return null==t&&(zN=!0),tI(h,c);if(c+=10,h.precision=c,r=(n=ZN(p)).charAt(0),o=eI(f),!(Math.abs(o)<15e14))return l=tI(h,c+2,m).times(o+""),f=rI(new h(r+"."+n.slice(1)),c-10).plus(l),h.precision=m,null==t?(zN=!0,oI(f,m)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=ZN((f=f.times(e)).d)).charAt(0),d++;for(o=eI(f),r>1?(f=new h("0."+n),o++):f=new h(r+"."+n.slice(1)),s=a=f=JN(f.minus(RN),f.plus(RN),c),u=oI(f.times(f),c),i=3;;){if(a=oI(a.times(u),c),ZN((l=s.plus(JN(a,new h(i),c))).d).slice(0,c)===ZN(s.d).slice(0,c))return s=s.times(2),0!==o&&(s=s.plus(tI(h,c+2,m).times(o+""))),s=JN(s,new h(d),c),h.precision=m,null==t?(zN=!0,oI(s,m)):s;s=l,i+=2}}function iI(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=$N(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),zN&&(e.e>YN||e.e<-YN))throw Error(FN+n)}else e.s=0,e.e=0,e.d=[0];return e}function oI(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(o=d.length))return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(s=c/(o=UN(10,a-i-1))%10|0,l=t<0||void 0!==d[u+1]||c%o,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?i>0?c/UN(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=eI(e),d.length=1,t=t-o-1,d[0]=UN(10,(7-t%7)%7),e.e=$N(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,o=1,u--):(d.length=u+1,o=UN(10,7-r),d[u]=i>0?(c/UN(10,a-i)%UN(10,i)|0)*o:0),l)for(;;){if(0==u){(d[0]+=o)==KN&&(d[0]=1,++e.e);break}if(d[u]+=o,d[u]!=KN)break;d[u--]=0,o=1}for(r=d.length;0===d[--r];)d.pop();if(zN&&(e.e>YN||e.e<-YN))throw Error(FN+eI(e));return e}function aI(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),zN?oI(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r){for((u=a<0)?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),a>(i=Math.max(Math.ceil(p/7),s)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((u=(i=l.length)<(s=d.length))&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&0===l[--o];)l[o]=KN-1;--l[o],l[i]+=KN}l[i]-=d[i]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,zN?oI(t,p):t):new f(0)}function sI(e,t,n){var r,i=eI(e),o=ZN(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+nI(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+nI(-i-1)+o,n&&(r=n-a)>0&&(o+=nI(r))):i>=a?(o+=nI(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+nI(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=nI(r))),e.s<0?"-"+o:o}function lI(e,t){if(e.length>t)return e.length=t,!0}function cI(e){if(!e||"object"!=typeof e)throw Error(VN+"Object expected");var t,n,r,i=["precision",1,LN,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!($N(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(BN+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(BN+n+": "+r);this[n]=new this(r)}return this}var uI=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(BN+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):iI(t,e.toString())}if("string"!=typeof e)throw Error(BN+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!WN.test(e))throw Error(BN+e);iI(t,e)}if(o.prototype=qN,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=cI,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});RN=new uI(1);var dI=uI;function fI(e){return 0===e?1:Math.floor(new dI(e).abs().log(10).toNumber())+1}function pI(e,t,n){for(var r=new dI(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var hI=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},mI=(e,t,n)=>{if(e.lte(0))return new dI(0);var r=fI(e.toNumber()),i=new dI(10).pow(r),o=e.div(i),a=1!==r?.05:.1,s=new dI(Math.ceil(o.div(a).toNumber())).add(n).mul(a).mul(i);return new dI(t?s.toNumber():Math.ceil(s.toNumber()))},vI=(e,t,n)=>{var r;if(e.lte(0))return new dI(0);var i=[1,2,2.5,5],o=e.toNumber(),a=Math.floor(new dI(o).abs().log(10).toNumber()),s=new dI(10).pow(a),l=e.div(s).toNumber(),c=i.findIndex(e=>e>=l-1e-10);if(-1===c&&(s=s.mul(10),c=0),(c+=n)>=i.length){var u=Math.floor(c/i.length);c%=i.length,s=s.mul(new dI(10).pow(u))}var d=null!==(r=i[c])&&void 0!==r?r:1,f=new dI(d).mul(s);return t?f:new dI(Math.ceil(f.toNumber()))},yI=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:mI;if(!Number.isFinite((t-e)/(n-1)))return{step:new dI(0),tickMin:new dI(0),tickMax:new dI(0)};var a,s=o(new dI(t).sub(e).div(n-1),r,i);a=e<=0&&t>=0?new dI(0):(a=new dI(e).add(t).div(2)).sub(new dI(a).mod(s));var l=Math.ceil(a.sub(e).div(s).toNumber()),c=Math.ceil(new dI(t).sub(a).div(s).toNumber()),u=l+c+1;return u>n?yI(e,t,n,r,i+1,o):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:s,tickMin:a.sub(new dI(l).mul(s)),tickMax:a.add(new dI(c).mul(s))})},gI=function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",a=Math.max(r,2),[s,l]=hI([t,n]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...Array(r-1).fill(1/0)]:[...Array(r-1).fill(-1/0),l];return t>n?c.reverse():c}if(s===l)return((e,t,n)=>{var r=new dI(1),i=new dI(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new dI(10).pow(fI(e)-1),i=new dI(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new dI(Math.floor(e)))}else 0===e?i=new dI(Math.floor((t-1)/2)):n||(i=new dI(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(i.add(new dI(l-a).mul(r)).toNumber());return s})(s,r,i);var u="snap125"===o?vI:mI,{step:d,tickMin:f,tickMax:p}=yI(s,l,a,i,0,u),h=pI(f,p.add(new dI(.1).mul(d)),d);return t>n?h.reverse():h},bI=function(e,t){var[n,r]=e,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",[a,s]=hI([n,r]);if(a===-1/0||s===1/0)return[n,r];if(a===s)return[a];var l="snap125"===o?vI:mI,c=Math.max(t,2),u=l(new dI(s).sub(a).div(c-1),i,0),d=[...pI(new dI(a),new dI(s),u),s];return!1===i&&(d=d.map(e=>Math.round(e))),n>r?d.reverse():d},xI=e=>e.rootProps.maxBarSize,wI=e=>e.rootProps.barCategoryGap,EI=e=>e.rootProps.stackOffset,OI=e=>e.rootProps.reverseStackOrder,SI=e=>e.options.chartName,kI=e=>e.rootProps.syncId,PI=e=>e.rootProps.syncMethod,AI=e=>e.options.eventEmitter,jI={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},TI=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function MI(e,t,n){return"auto"!==n?n:null!=e?TA(e,t)?"category":"number":void 0}function CI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CI(Object(n),!0).forEach(function(t){II(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function II(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},_I={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},RI=rs([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},Kj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=MI(t,"angleAxis",DI.type))&&void 0!==n?n:"category";return NI(NI({},DI),{},{type:r})}),LI=rs([(e,t)=>e.polarAxis.radiusAxis[t],Kj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=MI(t,"radiusAxis",_I.type))&&void 0!==n?n:"category";return NI(NI({},_I),{},{type:r})}),zI=e=>e.polarOptions,VI=rs([UA,WA,ij],function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2}),BI=rs([zI,VI],(e,t)=>{if(null!=e)return eE(e.innerRadius,t,0)}),FI=rs([zI,VI],(e,t)=>{if(null!=e)return eE(e.outerRadius,t,.8*t)}),$I=rs([zI],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});rs([RI,$I],TI);var UI=rs([VI,BI,FI],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});rs([LI,UI],TI);var WI=rs([$j,zI,BI,FI,UA,WA],(e,t,n,r,i,o)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:eE(a,i,i/2),cy:eE(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),KI=(e,t)=>t,HI=(e,t,n)=>n;function YI(e){return null==e?void 0:e.id}function qI(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:r;if(null!=n&&0!==n.length){var s=YI(e);n.forEach((t,n)=>{var r,l=null==o||i?n:String(jA(t,o,null)),c=jA(t,e.dataKey,0);r=a.has(l)?a.get(l):{},Object.assign(r,{[s]:c}),a.set(l,r)})}}),Array.from(a.values())}function GI(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var XI=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function ZI(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var JI=e=>{var t=$j(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},QI=e=>e.tooltip.settings.axisId;function eD(e){if(null!=e){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(null!=r){if(e.bandwidth&&null!=n&&n.position){var i=e.bandwidth();switch(n.position){case"middle":r+=i/2;break;case"end":r+=i}}return r}}}}}function tD(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function nD(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rD(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=tD,n=(t,n)=>tD(e(t),n),r=(t,n)=>e(t)-n):(t=e===tD||e===nD?e:iD,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function iD(){return 0}function oD(e){return null===e?NaN:+e}const aD=rD(tD).right;rD(oD).center;class sD extends Map{constructor(e,t=cD){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(lD(this,e))}has(e){return super.has(lD(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function lD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function cD(e){return null!==e&&"object"==typeof e?e.valueOf():e}function uD(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const dD=Math.sqrt(50),fD=Math.sqrt(10),pD=Math.sqrt(2);function hD(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=dD?10:o>=fD?5:o>=pD?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?hD(e,t,2*n):[s,l,c]}function mD(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?hD(t,e,n):hD(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}function vD(e,t,n){return hD(e=+e,t=+t,n=+n)[2]}function yD(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?vD(t,e,n):vD(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function gD(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function bD(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function xD(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?uD:function(e=tD){if(e===tD)return uD;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(i);r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);xD(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}const o=e[t];let a=n,s=r;for(wD(e,n,t),i(e[r],o)>0&&wD(e,n,r);a<s;){for(wD(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}0===i(e[n],o)?wD(e,n,s):(++s,wD(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function wD(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ED(e,t,n=oD){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function OD(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function SD(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const kD=Symbol("implicit");function PD(){var e=new sD,t=[],n=[],r=kD;function i(i){let o=e.get(i);if(void 0===o){if(r!==kD)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new sD;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return PD(t,n).unknown(r)},OD.apply(i,arguments),i}function AD(){var e,t,n=PD().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return f+e*t});return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return AD(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},OD.apply(d(),arguments)}function jD(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return jD(t())},e}function TD(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function MD(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function CD(){}var ND=.7,ID=1/ND,DD="\\s*([+-]?\\d+)\\s*",_D="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",RD="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",LD=/^#([0-9a-f]{3,8})$/,zD=new RegExp(`^rgb\\(${DD},${DD},${DD}\\)$`),VD=new RegExp(`^rgb\\(${RD},${RD},${RD}\\)$`),BD=new RegExp(`^rgba\\(${DD},${DD},${DD},${_D}\\)$`),FD=new RegExp(`^rgba\\(${RD},${RD},${RD},${_D}\\)$`),$D=new RegExp(`^hsl\\(${_D},${RD},${RD}\\)$`),UD=new RegExp(`^hsla\\(${_D},${RD},${RD},${_D}\\)$`),WD={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};function KD(){return this.rgb().formatHex()}function HD(){return this.rgb().formatRgb()}function YD(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=LD.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?qD(t):3===n?new ZD(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?GD(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?GD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=zD.exec(e))?new ZD(t[1],t[2],t[3],1):(t=VD.exec(e))?new ZD(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=BD.exec(e))?GD(t[1],t[2],t[3],t[4]):(t=FD.exec(e))?GD(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=$D.exec(e))?r_(t[1],t[2]/100,t[3]/100,1):(t=UD.exec(e))?r_(t[1],t[2]/100,t[3]/100,t[4]):WD.hasOwnProperty(e)?qD(WD[e]):"transparent"===e?new ZD(NaN,NaN,NaN,0):null}function qD(e){return new ZD(e>>16&255,e>>8&255,255&e,1)}function GD(e,t,n,r){return r<=0&&(e=t=n=NaN),new ZD(e,t,n,r)}function XD(e,t,n,r){return 1===arguments.length?((i=e)instanceof CD||(i=YD(i)),i?new ZD((i=i.rgb()).r,i.g,i.b,i.opacity):new ZD):new ZD(e,t,n,null==r?1:r);var i}function ZD(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function JD(){return`#${n_(this.r)}${n_(this.g)}${n_(this.b)}`}function QD(){const e=e_(this.opacity);return`${1===e?"rgb(":"rgba("}${t_(this.r)}, ${t_(this.g)}, ${t_(this.b)}${1===e?")":`, ${e})`}`}function e_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function t_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function n_(e){return((e=t_(e))<16?"0":"")+e.toString(16)}function r_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new o_(e,t,n,r)}function i_(e){if(e instanceof o_)return new o_(e.h,e.s,e.l,e.opacity);if(e instanceof CD||(e=YD(e)),!e)return new o_;if(e instanceof o_)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new o_(a,s,l,e.opacity)}function o_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function a_(e){return(e=(e||0)%360)<0?e+360:e}function s_(e){return Math.max(0,Math.min(1,e||0))}function l_(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}TD(CD,YD,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KD,formatHex:KD,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return i_(this).formatHsl()},formatRgb:HD,toString:HD}),TD(ZD,XD,MD(CD,{brighter(e){return e=null==e?ID:Math.pow(ID,e),new ZD(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ND:Math.pow(ND,e),new ZD(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ZD(t_(this.r),t_(this.g),t_(this.b),e_(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:JD,formatHex:JD,formatHex8:function(){return`#${n_(this.r)}${n_(this.g)}${n_(this.b)}${n_(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:QD,toString:QD})),TD(o_,function(e,t,n,r){return 1===arguments.length?i_(e):new o_(e,t,n,null==r?1:r)},MD(CD,{brighter(e){return e=null==e?ID:Math.pow(ID,e),new o_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ND:Math.pow(ND,e),new o_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ZD(l_(e>=240?e-240:e+120,i,r),l_(e,i,r),l_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new o_(a_(this.h),s_(this.s),s_(this.l),e_(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=e_(this.opacity);return`${1===e?"hsl(":"hsla("}${a_(this.h)}, ${100*s_(this.s)}%, ${100*s_(this.l)}%${1===e?")":`, ${e})`}`}}));var c_=e=>()=>e;function u_(e){return 1===(e=+e)?d_:function(t,n){return n-t?function(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)}}(t,n,e):c_(isNaN(t)?n:t)}}function d_(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):c_(isNaN(e)?t:e)}var f_=function e(t){var n=u_(t);function r(e,t){var r=n((e=XD(e)).r,(t=XD(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=d_(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function p_(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function h_(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=w_(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function m_(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function v_(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function y_(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=w_(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var g_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,b_=new RegExp(g_.source,"g");function x_(e,t){var n,r,i,o=g_.lastIndex=b_.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=g_.exec(e))&&(r=b_.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:v_(n,r)})),o=b_.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function w_(e,t){var n,r=typeof t;return null==t||"boolean"===r?c_(t):("number"===r?v_:"string"===r?(n=YD(t))?(t=n,f_):x_:t instanceof YD?f_:t instanceof Date?m_:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?p_:Array.isArray(t)?h_:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?y_:v_)(e,t)}function E_(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function O_(e,t){void 0===t&&(t=e,e=w_);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}}function S_(e){return+e}var k_=[0,1];function P_(e){return e}function A_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function j_(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=A_(i,r),o=n(a,o)):(r=A_(r,i),o=n(o,a)),function(e){return o(r(e))}}function T_(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=A_(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=aD(e,t,1,r)-1;return o[n](i[n](t))}}function M_(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function C_(){var e,t,n,r,i,o,a=k_,s=k_,l=w_,c=P_;function u(){var e=Math.min(a.length,s.length);return c!==P_&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?T_:j_,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),v_)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,S_),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=E_,u()},d.clamp=function(e){return arguments.length?(c=!!e||P_,u()):c!==P_},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function N_(){return C_()(P_,P_)}function I_(e,t){if(!isFinite(e)||0===e)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 D_(e){return(e=I_(Math.abs(e)))?e[1]:NaN}var __,R_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function L_(e){if(!(t=R_.exec(e)))throw new Error("invalid format: "+e);var t;return new z_({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]})}function z_(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function V_(e,t){var n=I_(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}L_.prototype=z_.prototype,z_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var B_={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},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)=>V_(100*e,t),r:V_,s:function(e,t){var n=I_(e,t);if(!n)return __=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(__=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+I_(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function F_(e){return e}var $_,U_,W_,K_=Array.prototype.map,H_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Y_(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?F_:(t=K_.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?F_:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(K_.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var n=(e=L_(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,v=e.comma,y=e.precision,g=e.trim,b=e.type;"n"===b?(v=!0,b="g"):B_[b]||(void 0===y&&(y=12),g=!0,b="g"),(h||"0"===n&&"="===d)&&(h=!0,n="0",d="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?i:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?o:/[%p]/.test(b)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),E=B_[b],O=/[defgprs%]/.test(b);function S(e){var t,i,o,l=x,p=w;if("c"===b)p=E(e)+p,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:E(Math.abs(e),y),g&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==f&&(S=!1),l=(S?"("===f?f:c:"-"===f||"("===f?"":f)+l,p=("s"!==b||isNaN(e)||void 0===__?"":H_[8+__/3])+p+(S&&"("===f?")":""),O)for(t=-1,i=e.length;++t<i;)if(48>(o=e.charCodeAt(t))||o>57){p=(46===o?a+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}v&&!h&&(e=r(e,1/0));var k=l.length+e.length+p.length,P=k<m?new Array(m-k+1).join(n):"";switch(v&&h&&(e=r(P+e,P.length?m-p.length:1/0),P=""),d){case"<":e=l+e+p+P;break;case"=":e=l+P+e+p;break;case"^":e=P.slice(0,k=P.length>>1)+l+e+p+P.slice(k);break;default:e=P+l+e+p}return s(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(D_(t)/3))),r=Math.pow(10,-n),i=d(((e=L_(e)).type="f",e),{suffix:H_[8+n/3]});return function(e){return i(r*e)}}}}function q_(e,t,n,r){var i,o=yD(e,t,n);switch((r=L_(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(D_(t)/3)))-D_(Math.abs(e)))}(o,a))||(r.precision=i),W_(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,D_(t)-D_(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-D_(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return U_(r)}function G_(e){var t=e.domain;return e.ticks=function(e){var n=t();return mD(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return q_(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=vD(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function X_(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Z_(e){return Math.log(e)}function J_(e){return Math.exp(e)}function Q_(e){return-Math.log(-e)}function eR(e){return-Math.exp(-e)}function tR(e){return isFinite(e)?+("1e"+e):e<0?0:e}function nR(e){return(t,n)=>-e(-t,n)}function rR(e){const t=e(Z_,J_),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?tR:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=nR(r),i=nR(i),e(Q_,eR)):e(Z_,J_),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(o%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<o;++c)if(u=d<0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=mD(a,s,p))}else h=mD(d,f,Math.min(f-d,p)).map(i);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=L_(n)).precision||(n.trim=!0),n=U_(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(X_(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function iR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function oR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function aR(e){var t=1,n=e(iR(t),oR(t));return n.constant=function(n){return arguments.length?e(iR(t=+n),oR(t)):t},G_(n)}function sR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function lR(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function cR(e){return e<0?-e*e:e*e}function uR(e){var t=e(P_,P_),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(P_,P_):.5===n?e(lR,cR):e(sR(n),sR(1/n)):n},G_(t)}function dR(){var e=uR(C_());return e.copy=function(){return M_(e,dR()).exponent(e.exponent())},OD.apply(e,arguments),e}function fR(e){return Math.sign(e)*e*e}$_=Y_({thousands:",",grouping:[3],currency:["$",""]}),U_=$_.format,W_=$_.formatPrefix;const pR=new Date,hR=new Date;function mR(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>mR(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(pR.setTime(+t),hR.setTime(+r),e(pR),e(hR),Math.floor(n(pR,hR))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const vR=mR(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);vR.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?mR(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):vR:null),vR.range;const yR=1e3,gR=6e4,bR=36e5,xR=864e5,wR=6048e5,ER=2592e6,OR=31536e6,SR=mR(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*yR)},(e,t)=>(t-e)/yR,e=>e.getUTCSeconds());SR.range;const kR=mR(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yR)},(e,t)=>{e.setTime(+e+t*gR)},(e,t)=>(t-e)/gR,e=>e.getMinutes());kR.range;const PR=mR(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*gR)},(e,t)=>(t-e)/gR,e=>e.getUTCMinutes());PR.range;const AR=mR(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yR-e.getMinutes()*gR)},(e,t)=>{e.setTime(+e+t*bR)},(e,t)=>(t-e)/bR,e=>e.getHours());AR.range;const jR=mR(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*bR)},(e,t)=>(t-e)/bR,e=>e.getUTCHours());jR.range;const TR=mR(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gR)/xR,e=>e.getDate()-1);TR.range;const MR=mR(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xR,e=>e.getUTCDate()-1);MR.range;const CR=mR(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xR,e=>Math.floor(e/xR));function NR(e){return mR(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gR)/wR)}CR.range;const IR=NR(0),DR=NR(1),_R=NR(2),RR=NR(3),LR=NR(4),zR=NR(5),VR=NR(6);function BR(e){return mR(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/wR)}IR.range,DR.range,_R.range,RR.range,LR.range,zR.range,VR.range;const FR=BR(0),$R=BR(1),UR=BR(2),WR=BR(3),KR=BR(4),HR=BR(5),YR=BR(6);FR.range,$R.range,UR.range,WR.range,KR.range,HR.range,YR.range;const qR=mR(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());qR.range;const GR=mR(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());GR.range;const XR=mR(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());XR.every=e=>isFinite(e=Math.floor(e))&&e>0?mR(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)}):null,XR.range;const ZR=mR(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());function JR(e,t,n,r,i,o){const a=[[SR,1,yR],[SR,5,5e3],[SR,15,15e3],[SR,30,3e4],[o,1,gR],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,bR],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,xR],[r,2,1728e5],[n,1,wR],[t,1,ER],[t,3,7776e6],[e,1,OR]];function s(t,n,r){const i=Math.abs(n-t)/r,o=rD(([,,e])=>e).right(a,i);if(o===a.length)return e.every(yD(t/OR,n/OR,r));if(0===o)return vR.every(Math.max(yD(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}ZR.every=e=>isFinite(e=Math.floor(e))&&e>0?mR(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)}):null,ZR.range;const[QR,eL]=JR(ZR,GR,FR,CR,jR,PR),[tL,nL]=JR(XR,qR,IR,TR,AR,kR);function rL(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 iL(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 oL(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var aL,sL,lL,cL={"-":"",_:" ",0:"0"},uL=/^\s*\d+/,dL=/^%/,fL=/[\\^$*+?|[\]().{}]/g;function pL(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function hL(e){return e.replace(fL,"\\$&")}function mL(e){return new RegExp("^(?:"+e.map(hL).join("|")+")","i")}function vL(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function yL(e,t,n){var r=uL.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function gL(e,t,n){var r=uL.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function wL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function EL(e,t,n){var r=uL.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function OL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function SL(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 kL(e,t,n){var r=uL.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function PL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function AL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function jL(e,t,n){var r=uL.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function TL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ML(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function CL(e,t,n){var r=uL.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function NL(e,t,n){var r=uL.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function IL(e,t,n){var r=uL.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function DL(e,t,n){var r=dL.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function _L(e,t,n){var r=uL.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function RL(e,t,n){var r=uL.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function LL(e,t){return pL(e.getDate(),t,2)}function zL(e,t){return pL(e.getHours(),t,2)}function VL(e,t){return pL(e.getHours()%12||12,t,2)}function BL(e,t){return pL(1+TR.count(XR(e),e),t,3)}function FL(e,t){return pL(e.getMilliseconds(),t,3)}function $L(e,t){return FL(e,t)+"000"}function UL(e,t){return pL(e.getMonth()+1,t,2)}function WL(e,t){return pL(e.getMinutes(),t,2)}function KL(e,t){return pL(e.getSeconds(),t,2)}function HL(e){var t=e.getDay();return 0===t?7:t}function YL(e,t){return pL(IR.count(XR(e)-1,e),t,2)}function qL(e){var t=e.getDay();return t>=4||0===t?LR(e):LR.ceil(e)}function GL(e,t){return e=qL(e),pL(LR.count(XR(e),e)+(4===XR(e).getDay()),t,2)}function XL(e){return e.getDay()}function ZL(e,t){return pL(DR.count(XR(e)-1,e),t,2)}function JL(e,t){return pL(e.getFullYear()%100,t,2)}function QL(e,t){return pL((e=qL(e)).getFullYear()%100,t,2)}function ez(e,t){return pL(e.getFullYear()%1e4,t,4)}function tz(e,t){var n=e.getDay();return pL((e=n>=4||0===n?LR(e):LR.ceil(e)).getFullYear()%1e4,t,4)}function nz(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pL(t/60|0,"0",2)+pL(t%60,"0",2)}function rz(e,t){return pL(e.getUTCDate(),t,2)}function iz(e,t){return pL(e.getUTCHours(),t,2)}function oz(e,t){return pL(e.getUTCHours()%12||12,t,2)}function az(e,t){return pL(1+MR.count(ZR(e),e),t,3)}function sz(e,t){return pL(e.getUTCMilliseconds(),t,3)}function lz(e,t){return sz(e,t)+"000"}function cz(e,t){return pL(e.getUTCMonth()+1,t,2)}function uz(e,t){return pL(e.getUTCMinutes(),t,2)}function dz(e,t){return pL(e.getUTCSeconds(),t,2)}function fz(e){var t=e.getUTCDay();return 0===t?7:t}function pz(e,t){return pL(FR.count(ZR(e)-1,e),t,2)}function hz(e){var t=e.getUTCDay();return t>=4||0===t?KR(e):KR.ceil(e)}function mz(e,t){return e=hz(e),pL(KR.count(ZR(e),e)+(4===ZR(e).getUTCDay()),t,2)}function vz(e){return e.getUTCDay()}function yz(e,t){return pL($R.count(ZR(e)-1,e),t,2)}function gz(e,t){return pL(e.getUTCFullYear()%100,t,2)}function bz(e,t){return pL((e=hz(e)).getUTCFullYear()%100,t,2)}function xz(e,t){return pL(e.getUTCFullYear()%1e4,t,4)}function wz(e,t){var n=e.getUTCDay();return pL((e=n>=4||0===n?KR(e):KR.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ez(){return"+0000"}function Oz(){return"%"}function Sz(e){return+e}function kz(e){return Math.floor(+e/1e3)}function Pz(e){return new Date(e)}function Az(e){return e instanceof Date?+e:+new Date(+e)}function jz(e,t,n,r,i,o,a,s,l,c){var u=N_(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),v=c("%I %p"),y=c("%a %d"),g=c("%b %d"),b=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:o(e)<e?v:r(e)<e?i(e)<e?y:g:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Az)):f().map(Pz)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(X_(n,e)):u},u.copy=function(){return M_(u,jz(e,t,n,r,i,o,a,s,l,c))},u}function Tz(){var e,t,n,r,i,o=0,a=1,s=P_,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(w_),c.rangeRound=u(E_),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}function Mz(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Cz(){var e=uR(Tz());return e.copy=function(){return Mz(e,Cz()).exponent(e.exponent())},SD.apply(e,arguments)}function Nz(){var e,t,n,r,i,o,a,s=0,l=.5,c=1,u=1,d=P_,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+o(e))-t)*(u*e<u*t?r:i),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,d=O_(e,[n,r,i]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=o(s=+s),t=o(l=+l),n=o(c=+c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(w_),p.rangeRound=h(E_),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return o=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function Iz(){var e=uR(Nz());return e.copy=function(){return Mz(e,Iz()).exponent(e.exponent())},SD.apply(e,arguments)}!function(e){aL=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=mL(i),u=vL(i),d=mL(o),f=vL(o),p=mL(a),h=vL(a),m=mL(s),v=vL(s),y=mL(l),g=vL(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:LL,e:LL,f:$L,g:QL,G:tz,H:zL,I:VL,j:BL,L:FL,m:UL,M:WL,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Sz,s:kz,S:KL,u:HL,U:YL,V:GL,w:XL,W:ZL,x:null,X:null,y:JL,Y:ez,Z:nz,"%":Oz},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:rz,e:rz,f:lz,g:bz,G:wz,H:iz,I:oz,j:az,L:sz,m:cz,M:uz,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Sz,s:kz,S:dz,u:fz,U:pz,V:mz,w:vz,W:yz,x:null,X:null,y:gz,Y:xz,Z:Ez,"%":Oz},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:AL,e:AL,f:IL,g:OL,G:EL,H:TL,I:TL,j:jL,L:NL,m:PL,M:ML,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:kL,Q:_L,s:RL,S:CL,u:gL,U:bL,V:xL,w:yL,W:wL,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:OL,Y:EL,Z:SL,"%":DL};function E(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=cL[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function O(e,t){return function(n){var r,i,o=oL(1900,void 0,1);if(S(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=iL(oL(o.y,0,1))).getUTCDay(),r=i>4||0===i?$R.ceil(r):$R(r),r=MR.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=rL(oL(o.y,0,1))).getDay(),r=i>4||0===i?DR.ceil(r):DR(r),r=TR.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?iL(oL(o.y,0,1)).getUTCDay():rL(oL(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,iL(o)):rL(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in cL?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=O(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=O(e+="",!0);return t.toString=function(){return e},t}}}(e),sL=aL.format,aL.parse,lL=aL.utcFormat,aL.utcParse}({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"]});var Dz=Object.freeze({__proto__:null,scaleBand:AD,scaleDiverging:function e(){var t=G_(Nz()(P_));return t.copy=function(){return Mz(t,e())},SD.apply(t,arguments)},scaleDivergingLog:function e(){var t=rR(Nz()).domain([.1,1,10]);return t.copy=function(){return Mz(t,e()).base(t.base())},SD.apply(t,arguments)},scaleDivergingPow:Iz,scaleDivergingSqrt:function(){return Iz.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=aR(Nz());return t.copy=function(){return Mz(t,e()).constant(t.constant())},SD.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,S_),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,S_):[0,1],G_(r)},scaleImplicit:kD,scaleLinear:function e(){var t=N_();return t.copy=function(){return M_(t,e())},OD.apply(t,arguments),G_(t)},scaleLog:function e(){const t=rR(C_()).domain([1,10]);return t.copy=()=>M_(t,e()).base(t.base()),OD.apply(t,arguments),t},scaleOrdinal:PD,scalePoint:function(){return jD(AD.apply(null,arguments).paddingInner(1))},scalePow:dR,scaleQuantile:function e(){var t,n=[],r=[],i=[];function o(){var e=0,t=Math.max(1,r.length);for(i=new Array(t-1);++e<t;)i[e-1]=ED(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[aD(i,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:n[0],t<i.length?i[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(tD),o()},a.range=function(e){return arguments.length?(r=Array.from(e),o()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return i.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},OD.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,i=1,o=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[aD(o,e,0,i)]:t}function l(){var e=-1;for(o=new Array(i);++e<i;)o[e]=((e+1)*r-(e-i)*n)/(i+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(i=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,o[0]]:t>=i?[o[i-1],r]:[o[t-1],o[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},OD.apply(G_(s),arguments)},scaleRadial:function e(){var t,n=N_(),r=[0,1],i=!1;function o(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:i?Math.round(r):r}return o.invert=function(e){return n.invert(fR(e))},o.domain=function(e){return arguments.length?(n.domain(e),o):n.domain()},o.range=function(e){return arguments.length?(n.range((r=Array.from(e,S_)).map(fR)),o):r.slice()},o.rangeRound=function(e){return o.range(e).round(!0)},o.round=function(e){return arguments.length?(i=!!e,o):i},o.clamp=function(e){return arguments.length?(n.clamp(e),o):n.clamp()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e(n.domain(),r).round(i).clamp(n.clamp()).unknown(t)},OD.apply(o,arguments),G_(o)},scaleSequential:function e(){var t=G_(Tz()(P_));return t.copy=function(){return Mz(t,e())},SD.apply(t,arguments)},scaleSequentialLog:function e(){var t=rR(Tz()).domain([1,10]);return t.copy=function(){return Mz(t,e()).base(t.base())},SD.apply(t,arguments)},scaleSequentialPow:Cz,scaleSequentialQuantile:function e(){var t=[],n=P_;function r(e){if(null!=e&&!isNaN(e=+e))return n((aD(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(tD),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>function(e,t){if((n=(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e))).length)&&!isNaN(t=+t)){if(t<=0||n<2)return bD(e);if(t>=1)return gD(e);var n,r=(n-1)*t,i=Math.floor(r),o=gD(xD(e,i).subarray(0,i+1));return o+(bD(e.subarray(i+1))-o)*(r-i)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},SD.apply(r,arguments)},scaleSequentialSqrt:function(){return Cz.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=aR(Tz());return t.copy=function(){return Mz(t,e()).constant(t.constant())},SD.apply(t,arguments)},scaleSqrt:function(){return dR.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=aR(C_());return t.copy=function(){return M_(t,e()).constant(t.constant())},OD.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],i=1;function o(e){return null!=e&&e<=e?r[aD(n,e,0,i)]:t}return o.domain=function(e){return arguments.length?(n=Array.from(e),i=Math.min(n.length,r.length-1),o):n.slice()},o.range=function(e){return arguments.length?(r=Array.from(e),i=Math.min(n.length,r.length-1),o):r.slice()},o.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e().domain(n).range(r).unknown(t)},OD.apply(o,arguments)},scaleTime:function(){return OD.apply(jz(tL,nL,XR,qR,IR,TR,AR,kR,SR,sL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return OD.apply(jz(QR,eL,ZR,GR,FR,MR,jR,PR,SR,lL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:q_});function _z(e,t,n){if("function"==typeof e)return e.copy().domain(t).range(n);if(null!=e){var r=function(e){var t=Dz;if(e in t&&"function"==typeof t[e])return t[e]();var n="scale".concat(oE(e));return n in t&&"function"==typeof t[n]?t[n]():void 0}(e);if(null!=r)return r.domain(t).range(n),r}}function Rz(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?_z(e.scale,n,r):_z(t,n,r)}function Lz(e){return function(e){return"scale".concat(oE(e))}(e)in Dz}var zz=(e,t,n)=>{if(null!=e){var{scale:r,type:i}=e;return"auto"===r?"category"===i&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear":"string"==typeof r?Lz(r)?r:"point":void 0}};function Vz(e,t){if(e){var n=null!=t?t:e.domain(),r=n.map(t=>{var n;return null!==(n=e(t))&&void 0!==n?n:0}),i=e.range();if(!(0===n.length||i.length<2))return e=>{var t,i,o=function(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var o=Math.floor((n+r)/2);(i?e[o]<t:e[o]>t)?n=o+1:r=o}return n}(r,e);if(o<=0)return n[0];if(o>=n.length)return n[n.length-1];var a=null!==(t=r[o-1])&&void 0!==t?t:0,s=null!==(i=r[o])&&void 0!==i?i:0;return Math.abs(e-a)<=Math.abs(e-s)?n[o-1]:n[o]}}}function Bz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bz(Object(n),!0).forEach(function(t){$z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $z(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uz=[0,"auto"],Wz={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},Kz=(e,t)=>e.cartesianAxis.xAxis[t],Hz=(e,t)=>{var n=Kz(e,t);return null==n?Wz:n},Yz={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Uz,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:60},qz=(e,t)=>e.cartesianAxis.yAxis[t],Gz=(e,t)=>{var n=qz(e,t);return null==n?Yz:n},Xz={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Zz=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?Xz:n},Jz=(e,t,n)=>{switch(t){case"xAxis":return Hz(e,n);case"yAxis":return Gz(e,n);case"zAxis":return Zz(e,n);case"angleAxis":return RI(e,n);case"radiusAxis":return LI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Qz=(e,t,n)=>{switch(t){case"xAxis":return Hz(e,n);case"yAxis":return Gz(e,n);case"angleAxis":return RI(e,n);case"radiusAxis":return LI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},eV=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function tV(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var nV=e=>e.graphicalItems.cartesianItems,rV=rs([KI,HI],tV),iV=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),oV=rs([nV,Jz,rV],iV,{memoizeOptions:{resultEqualityCheck:ZI}}),aV=rs([oV],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(GI)),sV=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),lV=rs([oV],sV),cV=e=>e.map(e=>e.data).filter(Boolean).flat(1),uV=rs([oV],e=>e.some(e=>!e.data)),dV=rs([oV],cV,{memoizeOptions:{resultEqualityCheck:ZI}}),fV=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},pV=rs([dV,TN],fV),hV=(e,t,n,r,i,o)=>{var{chartData:a=[],dataStartIndex:s,dataEndIndex:l}=r,c=((e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:jA(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:jA(e,t)}))):e.map(e=>({value:e})))(e,t,n);return i&&null!=(null==t?void 0:t.dataKey)&&o.length>0?[...a.slice(s,l+1).map(e=>({value:jA(e,t.dataKey)})).filter(e=>null!=e.value),...c]:c},mV=rs([pV,Jz,oV,TN,uV,dV],hV);function vV(e){if(Zw(e)||e instanceof Date){var t=Number(e);if(OA(t))return t}}function yV(e){if(Array.isArray(e)){var t=[vV(e[0]),vV(e[1])];return IN(t)?t:void 0}var n=vV(e);if(null!=n)return[n,n]}function gV(e){return e.map(vV).filter(aE)}function bV(e,t){var n=vV(e),r=vV(t);return null==n&&null==r?0:null==n?-1:null==r?1:n-r}var xV=rs([mV],e=>null==e?void 0:e.map(e=>e.value).sort(bV));function wV(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var EV=e=>{var t=JI(e),n=QI(e);return Qz(e,t,n)},OV=rs([EV],e=>null==e?void 0:e.dataKey),SV=rs([aV,TN,EV],qI),kV=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(null==t.stackId)return e;var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var[i,o]=t,a=r?[...o].reverse():o,s=a.map(YI);return[i,{stackedData:IA(e,s,n),graphicalItems:a}]}))},PV=rs([SV,aV,EI,OI],kV),AV=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(null==r&&"zAxis"!==n){var a=LA(e,i,o);if(null==a||0!==a[0]||0!==a[1])return a}},jV=rs([Jz],e=>e.allowDataOverflow),TV=e=>{var t;if(null==e||!("domain"in e))return Uz;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=gV(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:Uz},MV=rs([Jz],TV),CV=rs([MV,jV],_N),NV=rs([PV,AN,KI,CV],AV,{memoizeOptions:{resultEqualityCheck:XI}}),IV=e=>e.errorBars,DV=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},_V=function(e,t,n,r,i){var o,a,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];if(n.length>0&&n.forEach(e=>{var n,l=null!=e.data?[...e.data]:s,c=null===(n=r[e.id])||void 0===n?void 0:n.filter(e=>wV(i,e));l.forEach(n=>{var r,i=jA(n,null!==(r=t.dataKey)&&void 0!==r?r:e.dataKey),s=function(e,t,n){if(!n)return[];if(!n.length)return[];var r;if("number"!=typeof t||qw(t)){if(Array.isArray(t)){var i=gV(t);i.length>0&&(r=Math.max(...i))}}else r=t;return null==r?[]:gV(n.flatMap(t=>{var n,i,o=jA(e,t.dataKey);if(Array.isArray(o)?[n,i]=o:n=i=o,OA(n)&&OA(i))return[r-n,r+i]}))}(n,i,c);if(s.length>=2){var l=Math.min(...s),u=Math.max(...s);(null==o||l<o)&&(o=l),(null==a||u>a)&&(a=u)}var d=yV(i);null!=d&&(o=null==o?d[0]:Math.min(o,d[0]),a=null==a?d[1]:Math.max(a,d[1]))})}),null!=(null==t?void 0:t.dataKey)&&0===n.length&&e.forEach(e=>{var n=yV(jA(e,t.dataKey));null!=n&&(o=null==o?n[0]:Math.min(o,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),OA(o)&&OA(a))return[o,a]},RV=rs([pV,Jz,lV,IV,KI,CN],_V,{memoizeOptions:{resultEqualityCheck:XI}});function LV(e){var{value:t}=e;if(Zw(t)||t instanceof Date)return t}var zV=e=>e.referenceElements.dots,VV=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),BV=rs([zV,KI,HI],VV),FV=e=>e.referenceElements.areas,$V=rs([FV,KI,HI],VV),UV=e=>e.referenceElements.lines,WV=rs([UV,KI,HI],VV),KV=(e,t)=>{if(null!=e){var n=gV(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},HV=rs(BV,KI,KV),YV=(e,t)=>{if(null!=e){var n=gV(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},qV=rs([$V,KI],YV);var GV=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return gV([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:gV(n)}(e):function(e){var t;if(null!=e.y)return gV([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:gV(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},XV=rs([WV,KI],GV),ZV=rs(HV,XV,qV,(e,t,n)=>DV(e,n,t)),JV=(e,t,n,r,i,o,a,s)=>null!=n?n:function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(IN(r))return DN(r,t,n)}catch(e){}if(Array.isArray(e)&&2===e.length){var i,o,[a,s]=e;if("auto"===a)null!=t&&(i=Math.min(...t));else if(Xw(a))i=a;else if("function"==typeof a)try{null!=t&&(i=a(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof a&&zA.test(a)){var l=zA.exec(a);if(null==l||null==l[1]||null==t)i=void 0;else{var c=+l[1];i=t[0]-c}}else i=null==t?void 0:t[0];if("auto"===s)null!=t&&(o=Math.max(...t));else if(Xw(s))o=s;else if("function"==typeof s)try{null!=t&&(o=s(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof s&&VA.test(s)){var u=VA.exec(s);if(null==u||null==u[1]||null==t)o=void 0;else{var d=+u[1];o=t[1]+d}}else o=null==t?void 0:t[1];var f=[i,o];if(IN(f))return null==t?f:DN(f,t,n)}}}(t,"vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?DV(r,o,i):DV(o,i),e.allowDataOverflow),QV=rs([Jz,MV,CV,NV,RV,ZV,$j,KI],JV,{memoizeOptions:{resultEqualityCheck:XI}}),eB=[0,1],tB=(e,t,n,r,i,o,a)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==a){var s,{dataKey:l,type:c}=e,u=TA(t,o);return u&&null==l?PN(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===c?((e,t,n)=>{var r=e.map(LV).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&tE(r))?PN(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,u):"expand"!==i||u?a:eB}},nB=rs([Jz,$j,pV,mV,EI,KI,QV],tB),rB=rs([Jz,eV,SI],zz),iB=(e,t,n)=>{var{niceTicks:r}=t;if("none"!==r){var i=TV(t),o=Array.isArray(i)&&("auto"===i[0]||"auto"===i[1]);if(("snap125"===r||"adaptive"===r)&&null!=t&&t.tickCount&&IN(e)){if(o)return gI(e,t.tickCount,t.allowDecimals,r);if("number"===t.type)return bI(e,t.tickCount,t.allowDecimals,r)}if("auto"===r&&"linear"===n&&null!=t&&t.tickCount){if(o&&IN(e))return gI(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&IN(e))return bI(e,t.tickCount,t.allowDecimals,"adaptive")}}},oB=rs([nB,Qz,rB],iB),aB=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&IN(t)&&Array.isArray(n)&&n.length>0){var i,o,a=t[0],s=null!==(i=n[0])&&void 0!==i?i:0,l=t[1],c=null!==(o=n[n.length-1])&&void 0!==o?o:0;return[Math.min(a,s),Math.max(l,c)]}return t},sB=rs([Jz,nB,oB,KI],aB),lB=rs(mV,Jz,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(gV(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],o=r[r.length-1];if(null==i||null==o)return 1/0;var a=o-i;if(0===a)return 1/0;for(var s=0;s<r.length-1;s++){var l=r[s],c=r[s+1];if(null!=l&&null!=c){var u=c-l;n=Math.min(n,u)}}return n/a}}),cB=rs(lB,$j,wI,ij,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!OA(e))return 0;var o="vertical"===t?r.height:r.width;if("gap"===i)return e*o/2;if("no-gap"===i){var a=eE(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),uB=rs(Hz,(e,t,n)=>{var r=Hz(e,t);return null==r||"string"!=typeof r.padding?0:cB(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:i}=e;return"string"==typeof i?{left:t,right:t}:{left:(null!==(n=i.left)&&void 0!==n?n:0)+t,right:(null!==(r=i.right)&&void 0!==r?r:0)+t}}),dB=rs(Gz,(e,t,n)=>{var r=Gz(e,t);return null==r||"string"!=typeof r.padding?0:cB(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:i}=e;return"string"==typeof i?{top:t,bottom:t}:{top:(null!==(n=i.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=i.bottom)&&void 0!==r?r:0)+t}}),fB=rs([ij,uB,uj,cj,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),pB=rs([ij,$j,dB,uj,cj,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),hB=(e,t,n,r)=>{var i;switch(t){case"xAxis":return fB(e,n,r);case"yAxis":return pB(e,n,r);case"zAxis":return null===(i=Zz(e,n))||void 0===i?void 0:i.range;case"angleAxis":return $I(e);case"radiusAxis":return UI(e,n);default:return}},mB=rs([Jz,hB],TI),vB=rs([rB,sB],(e,t)=>{if(null!=t){if("linear"===e){if(!IN(t)){for(var n,r,i=0;i<t.length;i++){var o=t[i];OA(o)&&((void 0===n||o<n)&&(n=o),(void 0===r||o>r)&&(r=o))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}}),yB=rs([Jz,rB,vB,mB],Rz),gB=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:i,scale:o}=n;return!TA(e,r)||"number"!==i&&"auto"===o?void 0:t.map(e=>e.value)}},bB=rs([$j,mV,Qz,KI],gB),xB=rs([yB],eD);function wB(e,t){return e.id<t.id?-1:e.id>t.id?1:0}rs([yB],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):Vz(e,void 0)}),rs([yB,xV],Vz),rs([oV,IV,KI],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>wV(n,e)));var EB=(e,t)=>t,OB=(e,t,n)=>n,SB=rs(YA,EB,OB,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(wB)),kB=rs(qA,EB,OB,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(wB)),PB=(e,t)=>({width:e.width,height:t.height}),AB=rs(ij,Hz,PB),jB=rs(WA,ij,SB,EB,OB,(e,t,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=PB(t,n);null==o&&(o=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var l="top"===r&&!i||"bottom"===r&&i;a[n.id]=o-Number(l)*s.height,o+=(l?-1:1)*s.height}),a}),TB=rs(UA,ij,kB,EB,OB,(e,t,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==o&&(o=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var l="left"===r&&!i||"right"===r&&i;a[n.id]=o-Number(l)*s.width,o+=(l?-1:1)*s.width}),a}),MB=rs([ij,Hz,(e,t)=>{var n=Hz(e,t);if(null!=n)return jB(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),CB=rs([ij,Gz,(e,t)=>{var n=Gz(e,t);if(null!=n)return TB(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),NB=rs(ij,Gz,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),IB=(e,t,n)=>{switch(t){case"xAxis":return AB(e,n).width;case"yAxis":return NB(e,n).height;default:return}},DB=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=TA(e,r),l=t.map(e=>e.value),c=l.filter(e=>null!=e);return a&&s&&"category"===o&&i&&tE(c)?l:void 0}},_B=rs([$j,mV,Jz,KI],DB),RB=rs([$j,(e,t,n)=>{switch(t){case"xAxis":return Hz(e,n);case"yAxis":return Gz(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},rB,xB,_B,bB,hB,oB,KI],(e,t,n,r,i,o,a,s,l)=>{if(null!=t){var c=TA(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}}),LB=rs([$j,Qz,rB,xB,oB,hB,_B,bB,KI],(e,t,n,r,i,o,a,s,l)=>{if(null!=t&&null!=r){var c=TA(e,l),{type:u,ticks:d,tickCount:f}=t,p="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,h="category"===u&&r.bandwidth?r.bandwidth()/p:0;h="angleAxis"===l&&null!=o&&o.length>=2?2*Yw(o[0]-o[1])*h:h;var m=d||i;return m?m.map((e,t)=>{var n=a?a.indexOf(e):e,i=r.map(n);return OA(i)?{index:t,coordinate:i+h,value:e,offset:h}:null}).filter(aE):c&&s?s.map((e,t)=>{var n=r.map(e);return OA(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(aE):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return OA(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(aE):r.domain().map((e,t)=>{var n=r.map(e);return OA(n)?{coordinate:n+h,value:a?a[e]:e,index:t,offset:h}:null}).filter(aE)}}),zB=rs([$j,Qz,xB,hB,_B,bB,KI],(e,t,n,r,i,o,a)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=TA(e,a),{tickCount:l}=t,c=0;return c="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*Yw(r[0]-r[1])*c:c,s&&o?o.map((e,t)=>{var r=n.map(e);return OA(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(aE):n.ticks?n.ticks(l).map((e,t)=>{var r=n.map(e);return OA(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(aE):n.domain().map((e,t)=>{var r=n.map(e);return OA(r)?{coordinate:r+c,value:i?i[e]:e,index:t,offset:c}:null}).filter(aE)}}),VB=rs(Jz,xB,(e,t)=>{if(null!=e&&null!=t)return Fz(Fz({},e),{},{scale:t})}),BB=rs([Jz,rB,nB,mB],Rz),FB=rs([BB],eD),$B=rs((e,t,n)=>Zz(e,n),FB,(e,t)=>{if(null!=e&&null!=t)return Fz(Fz({},e),{},{scale:t})}),UB=rs([$j,YA,qA],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}});rs([(e,t,n)=>{var r;return null===(r=e.renderedTicks[t])||void 0===r?void 0:r[n]}],e=>{if(e&&0!==e.length)return t=>{var n,r=1/0,i=e[0];for(var o of e){var a=Math.abs(o.coordinate-t);a<r&&(r=a,i=o)}return null===(n=i)||void 0===n?void 0:n.value}});var WB=e=>e.options.defaultTooltipEventType,KB=e=>e.options.validateTooltipEventTypes;function HB(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function YB(e,t){return HB(t,WB(e),KB(e))}var qB=(e,t)=>{var n,r=Number(t);if(!qw(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},GB={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},XB=RP({name:"tooltip",initialState:{itemInteraction:{click:GB,hover:GB},axisInteraction:{click:GB,hover:GB},keyboardInteraction:GB,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:PP()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=nP(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:PP()},removeTooltipEntrySettings:{reducer(e,t){var n=nP(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:PP()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:ZB,replaceTooltipEntrySettings:JB,removeTooltipEntrySettings:QB,setTooltipSettingsState:eF,setActiveMouseOverItemIndex:tF,mouseLeaveItem:nF,mouseLeaveChart:rF,setActiveClickItemIndex:iF,setMouseOverAxisIndex:oF,setMouseClickAxisIndex:aF,setSyncInteraction:sF,setKeyboardInteraction:lF}=XB.actions,cF=XB.reducer;function uF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uF(Object(n),!0).forEach(function(t){fF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pF=(e,t,n,r)=>{if(null==t)return GB;var i=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==i)return GB;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var o=!0===e.settings.active;if(null!=i.index){if(o)return dF(dF({},i),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return dF(dF({},GB),{},{coordinate:i.coordinate})};function hF(e,t){var n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}(e),r=t[0],i=t[1];if(void 0===n)return!1;var o=Math.min(r,i),a=Math.max(r,i);return n>=o&&n<=a}var mF=(e,t,n,r)=>{var i=null==e?void 0:e.index;if(null==i)return null;var o=Number(i);if(!OA(o))return i;var a=1/0;t.length>0&&(a=t.length-1);var s=Math.max(0,Math.min(o,a)),l=t[s];return null==l||function(e,t,n){if(null==n||null==t)return!0;var r=jA(e,t);return null==r||!IN(n)||hF(r,n)}(l,n,r)?String(s):null},vF=(e,t,n,r,i,o,a)=>{if(null!=o){var s=a[0],l=null==s?void 0:s.getPosition(o);if(null!=l)return l;var c=null==i?void 0:i[Number(o)];if(c)return"horizontal"===n?{x:c.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:c.coordinate}}},yF=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var i;if(i="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==i)return e.tooltipItemPayloads;if(null==i&&(null!=r||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return null!=o?[o]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===i})},gF=e=>e.options.tooltipPayloadSearcher,bF=e=>e.tooltip;function xF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xF(Object(n),!0).forEach(function(t){EF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OF(e){if("string"==typeof e)return e}var SF=(e,t,n,r,i,o,a)=>{if(null!=t&&null!=o){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n;return e.reduce((e,n)=>{var d,f,p,{dataDefinedOnItem:h,settings:m}=n,v=function(e,t){return null!=e?e:t}(h,s),y=Array.isArray(v)?EA(v,c,u):v,g=null!==(d=null==m?void 0:m.dataKey)&&void 0!==d?d:r,b=null==m?void 0:m.nameKey;(f=r&&Array.isArray(y)&&!Array.isArray(y[0])&&"axis"===a?rE(y,r,i):o(y,t,l,b),Array.isArray(f))?f.forEach(t=>{var n,r,i=function(e){if(null!=e&&"object"==typeof e){var t,n="name"in e?function(e){if("string"==typeof e||"number"==typeof e)return e}(e.name):void 0,r="unit"in e?function(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e}(e.unit):void 0;return{name:n,unit:r,dataKey:"dataKey"in e?"string"==typeof(t=e.dataKey)||"number"==typeof t?t:"function"==typeof t?e=>t(e):void 0:void 0,payload:"payload"in e?e.payload:void 0,color:"color"in e?OF(e.color):void 0,fill:"fill"in e?OF(e.fill):void 0}}}(t),o=null==i?void 0:i.name,a=null==i?void 0:i.dataKey,s=null==i?void 0:i.payload,l=wF(wF({},m),{},{name:o,unit:null==i?void 0:i.unit,color:null!==(n=null==i?void 0:i.color)&&void 0!==n?n:null==m?void 0:m.color,fill:null!==(r=null==i?void 0:i.fill)&&void 0!==r?r:null==m?void 0:m.fill});e.push(FA({tooltipEntrySettings:l,dataKey:a,payload:s,value:jA(s,a),name:null==o?void 0:String(o)}))}):e.push(FA({tooltipEntrySettings:m,dataKey:g,payload:f,value:jA(f,g),name:null!==(p=jA(f,b))&&void 0!==p?p:null==m?void 0:m.name}));return e},[])}},kF=rs([EV,eV,SI],zz),PF=rs([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),AF=rs([JI,QI],tV),jF=rs([PF,EV,AF],iV,{memoizeOptions:{resultEqualityCheck:ZI}}),TF=rs([jF],e=>e.filter(GI)),MF=rs([jF],cV,{memoizeOptions:{resultEqualityCheck:ZI}}),CF=rs([jF],e=>e.some(e=>!e.data)),NF=rs([MF,AN],fV),IF=rs([TF,AN,EV],qI),DF=rs([NF,EV,jF,AN,CF,MF],hV),_F=rs([EV],TV),RF=rs([EV],e=>e.allowDataOverflow),LF=rs([_F,RF],_N),zF=rs([jF],e=>e.filter(GI)),VF=rs([IF,zF,EI,OI],kV),BF=rs([VF,AN,JI,LF],AV),FF=rs([jF],sV),$F=rs([NF,EV,FF,IV,JI,NN],_V,{memoizeOptions:{resultEqualityCheck:XI}}),UF=rs([zV,JI,QI],VV),WF=rs([UF,JI],KV),KF=rs([FV,JI,QI],VV),HF=rs([KF,JI],YV),YF=rs([UV,JI,QI],VV),qF=rs([YF,JI],GV),GF=rs([WF,qF,HF],DV),XF=rs([EV,_F,LF,BF,$F,GF,$j,JI],JV),ZF=rs([EV,$j,NF,DF,EI,JI,XF],tB),JF=rs([ZF,EV,kF],iB),QF=rs([EV,ZF,JF,JI],aB),e$=e=>{var t=JI(e),n=QI(e);return hB(e,t,n,!1)},t$=rs([EV,e$],TI),n$=rs([EV,kF,QF,t$],Rz),r$=rs([n$],eD),i$=rs([$j,DF,EV,JI],DB),o$=rs([$j,DF,EV,JI],gB),a$=rs([$j,EV,kF,r$,e$,i$,o$,JI],(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=TA(e,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===l&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===s&&null!=i&&(null==i?void 0:i.length)>=2?2*Yw(i[0]-i[1])*d:d,c&&a?a.map((e,t)=>{var n=r.map(e);return OA(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(aE):r.domain().map((e,t)=>{var n=r.map(e);return OA(n)?{coordinate:n+d,value:o?o[e]:e,index:t,offset:d}:null}).filter(aE)}}}),s$=rs([WB,KB,e=>e.tooltip.settings],(e,t,n)=>HB(n.shared,e,t)),l$=e=>e.tooltip.settings.trigger,c$=e=>e.tooltip.settings.defaultIndex,u$=rs([bF,s$,l$,c$],pF),d$=rs([u$,NF,OV,ZF],mF),f$=rs([a$,d$],qB),p$=rs([u$],e=>{if(e)return e.dataKey}),h$=rs([u$],e=>{if(e)return e.graphicalItemId}),m$=rs([bF,s$,l$,c$],yF),v$=rs([UA,WA,$j,ij,a$,c$,m$],vF),y$=rs([u$,v$],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),g$=rs([u$],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),b$=rs([m$,d$,AN,OV,f$,gF,s$],SF),x$=rs([b$],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function w$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w$(Object(n),!0).forEach(function(t){O$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S$=()=>{var e=lS(EV),t=lS(a$),n=lS(r$);return BA(e&&n?E$(E$({},e),{},{scale:n}):void 0,t)};function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(t){A$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function A$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j$=(e,t,n,r,i)=>{var o,a=null!==(o=null==t?void 0:t.length)&&void 0!==o?o:0;if(a<=1||null==e)return 0;if("angleAxis"===r&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<a;s++){var l,c,u,d,f,p=s>0?null===(l=n[s-1])||void 0===l?void 0:l.coordinate:null===(c=n[a-1])||void 0===c?void 0:c.coordinate,h=null===(u=n[s])||void 0===u?void 0:u.coordinate,m=s>=a-1?null===(d=n[0])||void 0===d?void 0:d.coordinate:null===(f=n[s+1])||void 0===f?void 0:f.coordinate,v=void 0;if(null!=p&&null!=h&&null!=m)if(Yw(h-p)!==Yw(m-h)){var y=[];if(Yw(m-h)===Yw(i[1]-i[0])){v=m;var g=h+i[1]-i[0];y[0]=Math.min(g,(g+p)/2),y[1]=Math.max(g,(g+p)/2)}else{v=p;var b=m+i[1]-i[0];y[0]=Math.min(h,(b+h)/2),y[1]=Math.max(h,(b+h)/2)}var x,w=[Math.min(h,(v+h)/2),Math.max(h,(v+h)/2)];if(e>w[0]&&e<=w[1]||e>=y[0]&&e<=y[1])return null===(x=n[s])||void 0===x?void 0:x.index}else{var E,O=Math.min(p,m),S=Math.max(p,m);if(e>(O+h)/2&&e<=(S+h)/2)return null===(E=n[s])||void 0===E?void 0:E.index}}else if(t)for(var k=0;k<a;k++){var P=t[k];if(null!=P){var A=t[k+1],j=t[k-1];if(0===k&&null!=A&&e<=(P.coordinate+A.coordinate)/2)return P.index;if(k===a-1&&null!=j&&e>(P.coordinate+j.coordinate)/2)return P.index;if(k>0&&k<a-1&&null!=j&&null!=A&&e>(P.coordinate+j.coordinate)/2&&e<=(P.coordinate+A.coordinate)/2)return P.index}}return-1},T$=()=>lS(SI),M$=(e,t)=>t,C$=(e,t,n)=>n,N$=(e,t,n,r)=>r,I$=rs(a$,e=>IS(e,e=>e.coordinate)),D$=rs([bF,M$,C$,N$],pF),_$=rs([D$,NF,OV,ZF],mF),R$=rs([bF,M$,C$,N$],yF),L$=rs([UA,WA,$j,ij,a$,N$,R$],vF),z$=rs([D$,L$],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),V$=rs([a$,_$],qB),B$=rs([R$,_$,AN,OV,V$,gF,M$],SF),F$=rs([D$,_$],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),$$=(e,t,n,r,i,o,a)=>{if(e&&r&&i&&o&&n){var s=oN(e,n);if(s){var l=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),c=j$(l,a,o,r,i),u=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("centric"===e){var o=i.coordinate,{radius:a}=r;return P$(P$(P$({},r),nN(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return P$(P$(P$({},r),nN(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,o,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},U$=rs(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(null!=t){var r=e[t];if(null!=r)return n?r.panoramaElement:r.element}}),W$=rs(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(jI));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}}});function K$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K$(Object(n),!0).forEach(function(t){Y$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q$={zIndexMap:Object.values(jI).reduce((e,t)=>H$(H$({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},G$=new Set(Object.values(jI));var X$=RP({name:"zIndex",initialState:q$,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:PP()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!function(e){return G$.has(e)}(n)&&delete e.zIndexMap[n])},prepare:PP()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:PP()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:PP()}}}),{registerZIndexPortal:Z$,unregisterZIndexPortal:J$,registerZIndexPortalElement:Q$,unregisterZIndexPortalElement:eU}=X$.actions,tU=X$.reducer;function nU(e){var{zIndex:t,children:n}=e,i=void 0!==Uj()&&void 0!==t&&0!==t,o=lj(),a=s(void 0),l=s(new Set),c=iS(),u=lS(e=>U$(e,t,o));if(r(()=>{if(!i){var e=l.current;return e.forEach(e=>{c(J$({zIndex:e}))}),e.clear(),void(a.current=void 0)}if(l.current.has(t)||(c(Z$({zIndex:t})),l.current.add(t)),u){a.current=u;var n=l.current;n.forEach(e=>{e!==t&&(c(J$({zIndex:e})),n.delete(e))})}},[c,t,i,u]),r(()=>{var e=l.current;return()=>{e.forEach(e=>{c(J$({zIndex:e}))}),e.clear()}},[c]),!i)return n;var d=null!=u?u:a.current;return d?O(n,d):null}function rU(){return rU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rU.apply(null,arguments)}function iU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iU(Object(n),!0).forEach(function(t){aU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sU(e){var{cursor:t,cursorComp:r,cursorProps:i}=e;return h(t)?b(t,i):n(r,i)}function lU(t){var n,r,i,o,{coordinate:a,payload:s,index:l,offset:c,tooltipAxisBandSize:u,layout:d,cursor:f,tooltipEventType:p,chartName:h}=t,m=a,v=s,y=l;if(!f||!m||"ScatterChart"!==h&&"axis"!==p)return null;if("ScatterChart"===h)r=m,i=YM,o=jI.cursorLine;else if("BarChart"===h)r=function(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-i,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,m,c,u),i=UC,o=jI.cursorRectangle;else if("radial"===d&&vE(m)){var{cx:g,cy:b,radius:x,startAngle:w,endAngle:E}=aN(m);r={cx:g,cy:b,startAngle:w,endAngle:E,innerRadius:x,outerRadius:x},i=fN,o=jI.cursorLine}else r={points:pN(d,m,c)},i=FM,o=jI.cursorLine;var O="object"==typeof f&&"className"in f?f.className:void 0,S=oU(oU(oU(oU({stroke:"#ccc",pointerEvents:"none"},c),r),ux(f)),{},{payload:v,payloadIndex:y,className:fe("recharts-tooltip-cursor",O)});return e.createElement(nU,{zIndex:null!==(n=t.zIndex)&&void 0!==n?n:o},e.createElement(sU,{cursor:f,cursorComp:i,cursorProps:S}))}function cU(t){var n=S$(),r=Vj(),i=Uj(),o=T$();return null==n||null==r||null==i||null==o?null:e.createElement(lU,rU({},t,{offset:r,layout:i,tooltipAxisBandSize:n,chartName:o}))}var uU,dU=o(null),fU={exports:{}};var pU=(uU||(uU=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(fU)),fU.exports),hU=new(S(pU)),mU="recharts.syncEvent.tooltip",vU="recharts.syncEvent.brush",yU=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!qw(n))return e[n]}},gU=RP({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),bU=gU.reducer,{createEventEmitter:xU}=gU.actions;function wU(e){return e.tooltip.syncInteraction}var EU=RP({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;null!=n&&(e.dataStartIndex=n),null!=r&&(e.dataEndIndex=r)}}}),{setChartData:OU,setDataStartEndIndexes:SU,setComputedData:kU}=EU.actions,PU=EU.reducer,AU=["x","y"];function jU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jU(Object(n),!0).forEach(function(t){MU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CU(){var e=lS(kI),t=lS(AI),n=iS(),r=lS(PI),i=lS(a$),o=Uj(),a=Lj(),s=lS(e=>e.rootProps.className);l(()=>{if(null==e)return sE;var s=(s,l,c)=>{var u;if(t!==c&&e===s)if(!1!==l.payload.active)if("index"!==r){if(null!=i){var d;if("function"==typeof r){var f={activeTooltipIndex:null==l.payload.index?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:null==l.payload.index?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate},p=r(i,f);d=i[p]}else"value"===r&&(d=i.find(e=>String(e.value)===l.payload.label));var{coordinate:h}=l.payload;if(null!=h&&null!=a)if(null!=d){var{x:m,y:v}=h,y=Math.min(m,a.x+a.width),g=Math.min(v,a.y+a.height),b={x:"horizontal"===o?d.coordinate:y,y:"horizontal"===o?g:d.coordinate},x=sF({active:l.payload.active,coordinate:b,dataKey:l.payload.dataKey,index:String(d.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:l.payload.graphicalItemId});n(x)}else n(sF({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:void 0}));else n(sF({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(a&&null!=l&&null!==(u=l.payload)&&void 0!==u&&u.coordinate&&l.payload.sourceViewBox){var w=l.payload.coordinate,{x:E,y:O}=w,S=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(w,AU),{x:k,y:P,width:A,height:j}=l.payload.sourceViewBox,T=TU(TU({},S),{},{x:a.x+(A?(E-k)/A:0)*a.width,y:a.y+(j?(O-P)/j:0)*a.height});n(TU(TU({},l),{},{payload:TU(TU({},l.payload),{},{coordinate:T})}))}else n(l);else n(sF({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))};return hU.on(mU,s),()=>{hU.off(mU,s)}},[s,n,t,e,r,i,o,a])}function NU(){var e=iS();l(()=>{e(xU())},[e]),CU(),function(){var e=lS(kI),t=lS(AI),n=iS();l(()=>{if(null==e)return sE;var r=(r,i,o)=>{t!==o&&e===r&&n(SU(i))};return hU.on(vU,r),()=>{hU.off(vU,r)}},[n,t,e])}()}function IU(e,t,n,r,i,o){var a=lS(n=>((e,t,n)=>{if(null!=t){var r=bF(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(n,e,t)),s=lS(h$),c=lS(AI),u=lS(kI),d=lS(PI),f=lS(wU),p=null!=(null==f?void 0:f.sourceViewBox),h=Lj();l(()=>{if(!p&&null!=u&&null!=c){var e=sF({active:o,coordinate:n,dataKey:a,index:i,label:"number"==typeof r?String(r):r,sourceViewBox:h,graphicalItemId:s});hU.emit(mU,u,e,c)}},[p,n,a,s,i,r,c,u,d,o,h])}function DU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DU(Object(n),!0).forEach(function(t){RU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LU(e){return e.dataKey}var zU=[],VU={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function BU(t){var n,r,o=wE(t,VU),{active:a,allowEscapeViewBox:s,animationDuration:c,animationEasing:u,content:d,filterNull:p,isAnimationActive:h,offset:v,payloadUniqBy:y,position:g,reverseDirection:b,useTranslate3d:x,wrapperStyle:w,cursor:E,shared:S,trigger:k,defaultIndex:P,portal:A,axisId:j}=o,T=iS(),M="number"==typeof P?String(P):P;l(()=>{T(eF({shared:S,trigger:k,axisId:j,active:a,defaultIndex:M}))},[T,S,k,j,a,M]);var C=Lj(),N=TM(),I=function(e){return lS(t=>YB(t,e))}(S),{activeIndex:D,isActive:_}=null!==(n=lS(e=>F$(e,I,k,M)))&&void 0!==n?n:{},R=lS(e=>B$(e,I,k,M)),L=lS(e=>V$(e,I,k,M)),z=lS(e=>z$(e,I,k,M)),V=R,B=i(dU),F=null!==(r=null!=a?a:_)&&void 0!==r&&r,[$,U]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,n]=m({height:0,left:0,top:0,width:0}),r=f(e=>{if(null!=e){var r=e.getBoundingClientRect(),i={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(i.height-t.height)>1||Math.abs(i.left-t.left)>1||Math.abs(i.top-t.top)>1||Math.abs(i.width-t.width)>1)&&n({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}([V,F]),W="axis"===I?L:void 0;IU(I,k,z,W,D,F);var K=null!=A?A:B;if(null==K||null==C||null==I)return null;var H=null!=V?V:zU;F||(H=zU),p&&H.length&&(H=function(e,t,n){return!0===t?tS(e,n):"function"==typeof t?tS(e,t):e}(H.filter(e=>null!=e.value&&(!0!==e.hide||o.includeHidden)),y,LU));var Y=H.length>0,q=_U(_U({},o),{},{payload:H,label:W,active:F,activeIndex:D,coordinate:z,accessibilityLayer:N}),G=e.createElement(jM,{allowEscapeViewBox:s,animationDuration:c,animationEasing:u,isAnimationActive:h,active:F,coordinate:z,hasPayload:Y,offset:v,position:g,reverseDirection:b,useTranslate3d:x,viewBox:C,wrapperStyle:w,lastBoundingBox:$,innerRef:U,hasPortalFromProps:Boolean(A)},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):"function"==typeof t?e.createElement(t,n):e.createElement(vM,n)}(d,q));return e.createElement(e.Fragment,null,O(G,K),F&&e.createElement(cU,{cursor:E,tooltipEventType:I,coordinate:z,payload:H,index:D}))}var FU=e=>null;function $U(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}FU.displayName="Cell";function UU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var KU=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UU(Object(n),!0).forEach(function(t){WU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),HU=new class{constructor(e){$U(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;null!=n&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(KU.cacheSize),YU={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},qU="recharts_measurement_span";var GU=(e,t)=>{try{var n=document.getElementById(qU);n||((n=document.createElement("span")).setAttribute("id",qU),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,YU,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(e){return{width:0,height:0}}},XU=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||wM)return{width:0,height:0};if(!KU.enableCache)return GU(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}(e,t),r=HU.get(n);if(r)return r;var i=GU(e,t);return HU.set(n,i),i};var ZU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,JU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,QU=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,eW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,tW={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},nW=["cm","mm","pt","pc","in","Q","px"];var rW="NaN";class iW{static parse(e){var t,[,n,r]=null!==(t=eW.exec(e))&&void 0!==t?t:[];return null==n?iW.NaN:new iW(parseFloat(n),null!=r?r:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,qw(e)&&(this.unit=""),""===t||QU.test(t)||(this.num=NaN,this.unit=""),function(e){return nW.includes(e)}(t)&&(this.num=function(e,t){return e*tW[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new iW(NaN,""):new iW(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new iW(NaN,""):new iW(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new iW(NaN,""):new iW(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new iW(NaN,""):new iW(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return qw(this.num)}}function oW(e){if(null==e||e.includes(rW))return rW;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=null!==(n=ZU.exec(t))&&void 0!==n?n:[],a=iW.parse(null!=r?r:""),s=iW.parse(null!=o?o:""),l="*"===i?a.multiply(s):a.divide(s);if(l.isNaN())return rW;t=t.replace(ZU,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=null!==(c=JU.exec(t))&&void 0!==c?c:[],p=iW.parse(null!=u?u:""),h=iW.parse(null!=f?f:""),m="+"===d?p.add(h):p.subtract(h);if(m.isNaN())return rW;t=t.replace(JU,m.toString())}return t}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(iW,"NaN",new iW(NaN,""));var aW=/\(([^()]*)\)/;function sW(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=aW.exec(n));){var[,r]=t;n=n.replace(aW,oW(r))}return n}(t),t=oW(t)}function lW(e){var t=function(e){try{return sW(e)}catch(e){return rW}}(e.slice(5,-1));return t===rW?"":t}var cW=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],uW=["dx","dy","angle","className","breakAll"];function dW(){return dW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dW.apply(null,arguments)}function fW(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var pW=/[ \f\n\r\t\v\u2028\u2029]+/,hW=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];return iE(t)||(i=n?t.toString().split(""):t.toString().split(pW)),{wordsWithComputedWidth:i.map(e=>({word:e,width:XU(e,r).width})),spaceWidth:n?0:XU(" ",r).width}}catch(e){return null}};function mW(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var vW=(e,t,n,r)=>e.reduce((e,i)=>{var{word:o,width:a}=i,s=e[e.length-1];if(s&&null!=a&&(null==t||r||s.width+a+n<Number(t)))s.words.push(o),s.width+=a+n;else{var l={words:[o],width:a};e.push(l)}return e},[]),yW=e=>e.reduce((e,t)=>e.width>t.width?e:t),gW=(e,t,n,r,i,o,a,s)=>{var l=e.slice(0,t),c=hW({breakAll:n,style:r,children:l+"…"});if(!c)return[!1,[]];var u=vW(c.wordsWithComputedWidth,o,a,s);return[u.length>i||yW(u).width>Number(o),u]},bW=e=>[{words:iE(e)?[]:e.toString().split(pW),width:void 0}],xW=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!wM){var s=hW({breakAll:o,children:r,style:i});if(!s)return bW(r);var{wordsWithComputedWidth:l,spaceWidth:c}=s;return((e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=e,c=Xw(o),u=String(a),d=vW(t,r,n,i);if(!c||i)return d;if(!(d.length>o||yW(d).width>Number(r)))return d;for(var f,p=0,h=u.length-1,m=0;p<=h&&m<=u.length-1;){var v=Math.floor((p+h)/2),y=v-1,[g,b]=gW(u,y,l,s,o,r,n,i),[x]=gW(u,v,l,s,o,r,n,i);if(g||x||(p=v+1),g&&x&&(h=v-1),!g&&x){f=b;break}m++}return f||d})({breakAll:o,children:r,maxLines:a,style:i},l,c,t,Boolean(n))}return bW(r)},wW="#808080",EW={angle:0,breakAll:!1,capHeight:"0.71em",fill:wW,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},OW=a((t,n)=>{var r=wE(t,EW),{x:i,y:o,lineHeight:a,capHeight:s,fill:l,scaleToFit:c,textAnchor:u,verticalAnchor:f}=r,p=fW(r,cW),h=d(()=>xW({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:c,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,c,p.style,p.width]),{dx:m,dy:v,angle:y,className:g,breakAll:b}=p,x=fW(p,uW);if(!Zw(i)||!Zw(o)||0===h.length)return null;var w,E=Number(i)+(Xw(m)?m:0),O=Number(o)+(Xw(v)?v:0);if(!OA(E)||!OA(O))return null;switch(f){case"start":w=lW("calc(".concat(s,")"));break;case"middle":w=lW("calc(".concat((h.length-1)/2," * -").concat(a," + (").concat(s," / 2))"));break;default:w=lW("calc(".concat(h.length-1," * -").concat(a,")"))}var S=[],k=h[0];if(c&&null!=k){var P=k.width,{width:A}=p;S.push("scale(".concat(Xw(A)&&Xw(P)?A/P:1,")"))}return y&&S.push("rotate(".concat(y,", ").concat(E,", ").concat(O,")")),S.length&&(x.transform=S.join(" ")),e.createElement("text",dW({},dx(x),{ref:n,x:E,y:O,className:fe("recharts-text",g),textAnchor:u,fill:l.includes("url")?wW:l}),h.map((t,n)=>{var r=t.words.join(b?"":" ");return e.createElement("tspan",{x:E,dy:0===n?w:a,key:"".concat(r,"-").concat(n)},r)}))});function SW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SW(Object(n),!0).forEach(function(t){PW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}OW.displayName="Text";var AW=["labelRef"],jW=["content"];function TW(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function MW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MW(Object(n),!0).forEach(function(t){NW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IW(){return IW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IW.apply(null,arguments)}var DW=o(null),_W=t=>{var{x:n,y:r,upperWidth:i,lowerWidth:o,width:a,height:s,children:l}=t,c=d(()=>({x:n,y:r,upperWidth:i,lowerWidth:o,width:a,height:s}),[n,r,i,o,a,s]);return e.createElement(DW.Provider,{value:c},l)},RW=()=>{var e=i(DW),t=Lj();return e||(t?Rj(t):void 0)},LW=o(null),zW=e=>null!=e&&"function"==typeof e,VW=(t,n,r,i,o)=>{var a,s,{offset:l,className:c}=t,{cx:u,cy:d,innerRadius:f,outerRadius:p,startAngle:h,endAngle:m,clockWise:v}=o,y=(f+p)/2,g=((e,t)=>Yw(t-e)*Math.min(Math.abs(t-e),360))(h,m),b=g>=0?1:-1;switch(n){case"insideStart":a=h+b*l,s=v;break;case"insideEnd":a=m-b*l,s=!v;break;case"end":a=m+b*l,s=v;break;default:throw new Error("Unsupported position ".concat(n))}s=g<=0?s:!s;var x=nN(u,d,y,a),w=nN(u,d,y,a+359*(s?1:-1)),E="M".concat(x.x,",").concat(x.y,"\n A").concat(y,",").concat(y,",0,1,").concat(s?0:1,",\n ").concat(w.x,",").concat(w.y),O=iE(t.id)?Qw("recharts-radial-line-"):t.id;return e.createElement("text",IW({},i,{dominantBaseline:"central",className:fe("recharts-radial-bar-label",c)}),e.createElement("defs",null,e.createElement("path",{id:O,d:E})),e.createElement("textPath",{xlinkHref:"#".concat(O)},r))},BW=e=>null!=e&&"cx"in e&&Xw(e.cx),FW={angle:0,offset:5,zIndex:jI.label,position:"middle",textBreakAll:!1};function $W(t){var r,o,a,s,l,c=wE(t,FW),{viewBox:u,parentViewBox:d,position:f,value:p,children:m,content:v,className:y="",textBreakAll:g,labelRef:x}=c,w=(r=i(LW),o=lS(WI),r||o),E=RW(),O=function(e){if(!BW(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=2*r;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}(a=null==u?"center"===f?E:null!=w?w:E:BW(u)?u:Rj(u));if(!a||iE(p)&&iE(m)&&!h(v)&&"function"!=typeof v)return null;var S=CW(CW({},c),{},{viewBox:a});if(h(v)){var{labelRef:k}=S,P=TW(S,AW);return b(v,P)}if("function"==typeof v){var{content:A}=S,j=TW(S,jW);if(h(s=n(v,j)))return s}else s=(e=>{var{value:t,formatter:n}=e,r=iE(e.children)?t:e.children;return"function"==typeof n?n(r):r})(c);var T=dx(c);if(BW(a)){if("insideStart"===f||"insideEnd"===f||"end"===f)return VW(c,f,s,T,a);l=((e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if("outside"===n){var{x:u,y:d}=nN(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:h}=nN(r,i,f,c);return{x:p,y:h,textAnchor:"middle",verticalAnchor:"middle"}})(a,c.offset,c.position)}else{if(!O)return null;var M=(e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:o,y:a,height:s,upperWidth:l,lowerWidth:c}=Rj(t),u=o,d=o+(l-c)/2,f=(u+d)/2,p=(l+c)/2,h=u+l/2,m=s>=0?1:-1,v=m*r,y=m>0?"end":"start",g=m>0?"start":"end",b=l>=0?1:-1,x=b*r,w=b>0?"end":"start",E=b>0?"start":"end",O=i;if("top"===n){var S={x:u+l/2,y:a-v,horizontalAnchor:"middle",verticalAnchor:y};return O&&(S.height=Math.max(a-O.y,0),S.width=l),S}if("bottom"===n){var k={x:d+c/2,y:a+s+v,horizontalAnchor:"middle",verticalAnchor:g};return O&&(k.height=Math.max(O.y+O.height-(a+s),0),k.width=c),k}if("left"===n){var P={x:f-x,y:a+s/2,horizontalAnchor:w,verticalAnchor:"middle"};return O&&(P.width=Math.max(P.x-O.x,0),P.height=s),P}if("right"===n){var A={x:f+p+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"};return O&&(A.width=Math.max(O.x+O.width-A.x,0),A.height=s),A}var j=O?{width:p,height:s}:{};return"insideLeft"===n?kW({x:f+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"},j):"insideRight"===n?kW({x:f+p-x,y:a+s/2,horizontalAnchor:w,verticalAnchor:"middle"},j):"insideTop"===n?kW({x:u+l/2,y:a+v,horizontalAnchor:"middle",verticalAnchor:g},j):"insideBottom"===n?kW({x:d+c/2,y:a+s-v,horizontalAnchor:"middle",verticalAnchor:y},j):"insideTopLeft"===n?kW({x:u+x,y:a+v,horizontalAnchor:E,verticalAnchor:g},j):"insideTopRight"===n?kW({x:u+l-x,y:a+v,horizontalAnchor:w,verticalAnchor:g},j):"insideBottomLeft"===n?kW({x:d+x,y:a+s-v,horizontalAnchor:E,verticalAnchor:y},j):"insideBottomRight"===n?kW({x:d+c-x,y:a+s-v,horizontalAnchor:w,verticalAnchor:y},j):n&&"object"==typeof n&&(Xw(n.x)||Gw(n.x))&&(Xw(n.y)||Gw(n.y))?kW({x:o+eE(n.x,p),y:a+eE(n.y,s),horizontalAnchor:"end",verticalAnchor:"end"},j):kW({x:h,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},j)})({viewBox:O,position:f,offset:c.offset,parentViewBox:BW(d)?void 0:d});l=CW(CW({x:M.x,y:M.y,textAnchor:M.horizontalAnchor,verticalAnchor:M.verticalAnchor},void 0!==M.width?{width:M.width}:{}),void 0!==M.height?{height:M.height}:{})}return e.createElement(nU,{zIndex:c.zIndex},e.createElement(OW,IW({ref:x,className:fe("recharts-label",y)},T,l,{textAnchor:mW(T.textAnchor)?T.textAnchor:l.textAnchor,breakAll:g}),s))}$W.displayName="Label";function UW(t){var{label:n,labelRef:r}=t;return((t,n,r)=>{if(!t)return null;var i={viewBox:n,labelRef:r};return!0===t?e.createElement($W,IW({key:"label-implicit"},i)):Zw(t)?e.createElement($W,IW({key:"label-implicit",value:t},i)):h(t)?t.type===$W?b(t,CW({key:"label-implicit"},i)):e.createElement($W,IW({key:"label-implicit",content:t},i)):zW(t)?e.createElement($W,IW({key:"label-implicit",content:t},i)):t&&"object"==typeof t?e.createElement($W,IW({},t,{key:"label-implicit"},i)):null})(n,RW(),r)||null}var WW=["valueAccessor"],KW=["dataKey","clockWise","id","textBreakAll","zIndex"];function HW(){return HW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HW.apply(null,arguments)}function YW(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var qW=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(function(e){return iE(e)||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}(t))return t},GW=o(void 0),XW=GW.Provider,ZW=o(void 0);function JW(t){var{valueAccessor:n=qW}=t,r=YW(t,WW),{dataKey:o,clockWise:a,id:s,textBreakAll:l,zIndex:c}=r,u=YW(r,KW),d=i(GW),f=i(ZW),p=d||f;return p&&p.length?e.createElement(nU,{zIndex:null!=c?c:jI.label},e.createElement(yx,{className:"recharts-label-list"},p.map((t,i)=>{var a,c=iE(o)?n(t,i):jA(t.payload,o),d=iE(s)?{}:{id:"".concat(s,"-").concat(i)};return e.createElement($W,HW({key:"label-".concat(i)},dx(t),u,d,{fill:null!==(a=r.fill)&&void 0!==a?a:t.fill,parentViewBox:t.parentViewBox,value:c,textBreakAll:l,viewBox:t.viewBox,index:i,zIndex:0}))}))):null}function QW(t){var{label:n}=t;return n?!0===n?e.createElement(JW,{key:"labelList-implicit"}):e.isValidElement(n)||zW(n)?e.createElement(JW,{key:"labelList-implicit",content:n}):"object"==typeof n?e.createElement(JW,HW({key:"labelList-implicit"},n,{type:String(n.type)})):null:null}function eK(){return eK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eK.apply(null,arguments)}ZW.Provider,JW.displayName="LabelList";var tK=t=>{var{cx:n,cy:r,r:i,className:o}=t,a=fe("recharts-dot",o);return Xw(n)&&Xw(r)&&Xw(i)?e.createElement("circle",eK({},cx(t),yE(t),{className:a,cx:n,cy:r,r:i})):null},nK=RP({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:rK,removeRadiusAxis:iK,addAngleAxis:oK,removeAngleAxis:aK}=nK.actions,sK=nK.reducer;var lK,cK={exports:{}},uK={};function dK(){if(lK)return uK;lK=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case i:case r:case l:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case o:return p;default:return h}}case t:return h}}}return uK.ContextConsumer=o,uK.ContextProvider=a,uK.Element=e,uK.ForwardRef=s,uK.Fragment=n,uK.Lazy=d,uK.Memo=u,uK.Portal=t,uK.Profiler=i,uK.StrictMode=r,uK.Suspense=l,uK.SuspenseList=c,uK.isContextConsumer=function(e){return h(e)===o},uK.isContextProvider=function(e){return h(e)===a},uK.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},uK.isForwardRef=function(e){return h(e)===s},uK.isFragment=function(e){return h(e)===n},uK.isLazy=function(e){return h(e)===d},uK.isMemo=function(e){return h(e)===u},uK.isPortal=function(e){return h(e)===t},uK.isProfiler=function(e){return h(e)===i},uK.isStrictMode=function(e){return h(e)===r},uK.isSuspense=function(e){return h(e)===l},uK.isSuspenseList=function(e){return h(e)===c},uK.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},uK.typeOf=h,uK}var fK,pK,hK={};
|
|
67
|
+
/**
|
|
68
|
+
* @license React
|
|
69
|
+
* react-is.development.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/function mK(){return fK||(fK=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case o:case i:case c:case u:case p:return e;default:switch(e=e&&e.$$typeof){case s:case l:case f:case d:case a:return e;default:return h}}case n:return h}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");hK.ContextConsumer=a,hK.ContextProvider=s,hK.Element=t,hK.ForwardRef=l,hK.Fragment=r,hK.Lazy=f,hK.Memo=d,hK.Portal=n,hK.Profiler=o,hK.StrictMode=i,hK.Suspense=c,hK.SuspenseList=u,hK.isContextConsumer=function(t){return e(t)===a},hK.isContextProvider=function(t){return e(t)===s},hK.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},hK.isForwardRef=function(t){return e(t)===l},hK.isFragment=function(t){return e(t)===r},hK.isLazy=function(t){return e(t)===f},hK.isMemo=function(t){return e(t)===d},hK.isPortal=function(t){return e(t)===n},hK.isProfiler=function(t){return e(t)===o},hK.isStrictMode=function(t){return e(t)===i},hK.isSuspense=function(t){return e(t)===c},hK.isSuspenseList=function(t){return e(t)===u},hK.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===o||e===i||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===h||void 0!==e.getModuleId)},hK.typeOf=e}()),hK}function vK(){return pK||(pK=1,"production"===process.env.NODE_ENV?cK.exports=dK():cK.exports=mK()),cK.exports}var yK=vK(),gK=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",bK=null,xK=null,wK=e=>{if(e===bK&&Array.isArray(xK))return xK;var t=[];return p.forEach(e,e=>{iE(e)||(yK.isFragment(e)?t=t.concat(wK(e.props.children)):t.push(e))}),xK=t,bK=e,t};function EK(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>gK(e)):[gK(t)],wK(e).forEach(e=>{var t=Ww(e,"type.displayName")||Ww(e,"type.name");t&&-1!==r.indexOf(t)&&n.push(e)}),n}var OK,SK,kK,PK=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot),AK={};function jK(){return OK||(OK=1,e=AK,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPlainObject=function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}),AK;var e}function TK(){return kK?SK:(kK=1,SK=jK().isPlainObject)}var MK,CK,NK,IK,DK,_K=S(TK());function RK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RK(Object(n),!0).forEach(function(t){zK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VK(){return VK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VK.apply(null,arguments)}function BK(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var FK=(e,t,n,r,i)=>{var o,a=n-r;return o=Hw(MK||(MK=BK(["M ",",",""])),e,t),o+=Hw(CK||(CK=BK(["L ",",",""])),e+n,t),o+=Hw(NK||(NK=BK(["L ",",",""])),e+n-a/2,t+i),o+=Hw(IK||(IK=BK(["L ",",",""])),e+n-a/2-r,t+i),o+=Hw(DK||(DK=BK(["L ",","," Z"])),e,t)},$K={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},UK=t=>{var n=wE(t,$K),{x:r,y:i,upperWidth:o,lowerWidth:a,height:c,className:u}=n,{animationEasing:d,animationDuration:f,animationBegin:p,isUpdateAnimationActive:h}=n,v=s(null),[y,g]=m(-1),b=s(o),x=s(a),w=s(c),E=s(r),O=s(i),S=EC(t,"trapezoid-");if(l(()=>{if(v.current&&v.current.getTotalLength)try{var e=v.current.getTotalLength();e&&g(e)}catch(e){}},[]),r!==+r||i!==+i||o!==+o||a!==+a||c!==+c||0===o&&0===a||0===c)return null;var k=fe("recharts-trapezoid",u);if(!h)return e.createElement("g",null,e.createElement("path",VK({},dx(n),{className:k,d:FK(r,i,o,a,c)})));var P=b.current,A=x.current,j=w.current,T=E.current,M=O.current,C="0px ".concat(-1===y?1:y,"px"),N="".concat(y,"px ").concat(y,"px"),I=ZM(["strokeDasharray"],f,d);return e.createElement(wC,{animationId:S,key:S,canBegin:y>0,duration:f,easing:d,isActive:h,begin:p},t=>{var s=nE(P,o,t),l=nE(A,a,t),u=nE(j,c,t),d=nE(T,r,t),f=nE(M,i,t);v.current&&(b.current=s,x.current=l,w.current=u,E.current=d,O.current=f);var p=t>0?{transition:I,strokeDasharray:N}:{strokeDasharray:C};return e.createElement("path",VK({},dx(n),{className:k,d:FK(d,f,s,l,u),ref:v,style:LK(LK({},p),n.style)}))})},WK=["option","shapeType","activeClassName","inActiveClassName"];function KK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KK(Object(n),!0).forEach(function(t){YK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qK(t){var{shapeType:n,elementProps:r}=t;switch(n){case"rectangle":return e.createElement(UC,r);case"trapezoid":return e.createElement(UK,r);case"sector":return e.createElement(fN,r);case"symbols":if(function(e){return"symbols"===e}(n))return e.createElement(mE,r);break;case"curve":return e.createElement(FM,r);default:return null}}function GK(t){var n,{option:r,shapeType:i,activeClassName:o="recharts-active-shape",inActiveClassName:a="recharts-shape"}=t,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,WK);if(h(r))n=b(r,HK(HK({},s),function(e){return h(e)?e.props:e}(r)));else if("function"==typeof r)n=r(s,s.index);else if(_K(r)&&"boolean"!=typeof r){var l=function(e,t){return HK(HK({},t),e)}(r,s);n=e.createElement(qK,{shapeType:i,elementProps:l})}else{var c=s;n=e.createElement(qK,{shapeType:i,elementProps:c})}return s.isActive?e.createElement(yx,{className:o},n):e.createElement(yx,{className:a},n)}var XK,ZK=(e,t,n)=>{var r=iS();return(i,o)=>a=>{null==e||e(i,o,a),r(tF({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},JK=e=>{var t=iS();return(n,r)=>i=>{null==e||e(n,r,i),t(nF())}},QK=(e,t,n)=>{var r=iS();return(i,o)=>a=>{null==e||e(i,o,a),r(iF({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function eH(e){var{tooltipEntrySettings:t}=e,n=iS(),i=lj(),o=s(null);return r(()=>{i||(null===o.current?n(ZB(t)):o.current!==t&&n(JB({prev:o.current,next:t})),o.current=t)},[t,n,i]),r(()=>()=>{o.current&&(n(QB(o.current)),o.current=null)},[n]),null}function tH(e){var{legendPayload:t}=e,n=iS(),i=lj(),o=s(null);return r(()=>{i||(null===o.current?n(FT(t)):o.current!==t&&n($T({prev:o.current,next:t})),o.current=t)},[n,i,t]),r(()=>()=>{o.current&&(n(UT(o.current)),o.current=null)},[n]),null}var nH=null!==(XK=e["useId".toString()])&&void 0!==XK?XK:()=>{var[t]=e.useState(()=>Qw("uid-"));return t};var rH=o(void 0),iH=t=>{var{id:n,type:r,children:i}=t,o=function(e,t){var n=nH();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(r),n);return e.createElement(rH.Provider,{value:o},i(o))},oH=RP({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:PP()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=nP(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:PP()},removeCartesianGraphicalItem:{reducer(e,t){var n=nP(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:PP()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:PP()},removePolarGraphicalItem:{reducer(e,t){var n=nP(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:PP()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=nP(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=r)},prepare:PP()}}}),{addCartesianGraphicalItem:aH,replaceCartesianGraphicalItem:sH,removeCartesianGraphicalItem:lH,addPolarGraphicalItem:cH,removePolarGraphicalItem:uH,replacePolarGraphicalItem:dH}=oH.actions,fH=oH.reducer,pH=x(e=>{var t=iS(),n=s(null);return r(()=>{null===n.current?t(aH(e)):n.current!==e&&t(sH({prev:n.current,next:e})),n.current=e},[t,e]),r(()=>()=>{n.current&&(t(lH(n.current)),n.current=null)},[t]),null}),hH=["points"];function mH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mH(Object(n),!0).forEach(function(t){yH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gH(){return gH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gH.apply(null,arguments)}function bH(t){var{option:n,dotProps:r,className:i}=t;if(h(n))return b(n,r);if("function"==typeof n)return n(r);var o=fe(i,"boolean"!=typeof n?n.className:""),a=null!=r?r:{},{points:s}=a,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(a,hH);return e.createElement(tK,gH({},l,{className:o}))}function xH(t){var{points:n,dot:r,className:i,dotClassName:o,dataKey:a,baseProps:s,needClip:l,clipPathId:c,zIndex:u=jI.scatter}=t;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(n,r))return null;var d,f=PK(r),p=null==(d=r)?null:h(d)?dx(d.props):"object"!=typeof d||Array.isArray(d)?null:dx(d),m=n.map((t,i)=>{var l,c,u=vH(vH(vH({r:3},s),p),{},{index:i,cx:null!==(l=t.x)&&void 0!==l?l:void 0,cy:null!==(c=t.y)&&void 0!==c?c:void 0,dataKey:a,value:t.value,payload:t.payload,points:n});return e.createElement(bH,{key:"dot-".concat(i),option:r,dotProps:u,className:o})}),v={};return l&&null!=c&&(v.clipPath="url(#clipPath-".concat(f?"":"dots-").concat(c,")")),e.createElement(nU,{zIndex:u},e.createElement(yx,gH({className:i},v),m))}function wH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wH(Object(n),!0).forEach(function(t){OH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function OH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SH=RP({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:PP()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.xAxis[n.id]&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:PP()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:PP()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:PP()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.yAxis[n.id]&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:PP()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:PP()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:PP()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.zAxis[n.id]&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:PP()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:PP()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var o,a=i.widthHistory||[];if(3===a.length&&a[0]===a[2]&&r===a[1]&&r!==i.width&&Math.abs(r-(null!==(o=a[0])&&void 0!==o?o:0))<=1)return;var s=[...a,r].slice(-3);e.yAxis[n]=EH(EH({},i),{},{width:r,widthHistory:s})}}}}),{addXAxis:kH,replaceXAxis:PH,removeXAxis:AH,addYAxis:jH,replaceYAxis:TH,removeYAxis:MH,addZAxis:CH,replaceZAxis:NH,removeZAxis:IH,updateYAxisWidth:DH}=SH.actions,_H=SH.reducer,RH=rs([ij],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),LH=rs([RH,UA,WA],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),zH=()=>lS(LH);function VH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VH(Object(n),!0).forEach(function(t){FH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $H=t=>{var{point:n,childIndex:r,mainColor:i,activeDot:o,dataKey:a,clipPath:s}=t;if(!1===o||null==n.x||null==n.y)return null;var l,c=BH(BH(BH({},{index:r,dataKey:a,cx:n.x,cy:n.y,r:4,fill:null!=i?i:"none",strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value}),ux(o)),yE(o));return l=h(o)?b(o,c):"function"==typeof o?o(c):e.createElement(tK,c),e.createElement(yx,{className:"recharts-active-dot",clipPath:s},l)};function UH(t){var{points:n,mainColor:r,activeDot:i,itemDataKey:o,clipPath:a,zIndex:s=jI.activeDot}=t,l=lS(d$),c=lS(x$);if(null==n||null==c)return null;var u=n.find(e=>c.includes(e.payload));return iE(u)?null:e.createElement(nU,{zIndex:s},e.createElement($H,{point:u,childIndex:Number(l),mainColor:r,dataKey:o,activeDot:i,clipPath:a}))}var WH=(e,t,n)=>{var r=null!=n?n:e;if(!iE(r))return eE(r,t,0)};function KH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KH(Object(n),!0).forEach(function(t){YH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qH=e=>{var{chartData:t}=e,n=iS(),r=lj();return l(()=>r?()=>{}:(n(OU(t)),()=>{n(OU(void 0))}),[t,n,r]),null},GH={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},XH=RP({name:"brush",initialState:GH,reducers:{setBrushSettings:(e,t)=>null==t.payload?GH:t.payload}}),{setBrushSettings:ZH}=XH.actions,JH=XH.reducer;var QH=RP({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=nP(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=nP(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=nP(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),{addDot:eY,removeDot:tY,addArea:nY,removeArea:rY,addLine:iY,removeLine:oY}=QH.actions,aY=QH.reducer,sY=o(void 0),lY=t=>{var{children:n}=t,[r]=m("".concat(Qw("recharts"),"-clip")),i=zH();if(null==i)return null;var{x:o,y:a,width:s,height:l}=i;return e.createElement(sY.Provider,{value:r},e.createElement("defs",null,e.createElement("clipPath",{id:r},e.createElement("rect",{x:o,y:a,height:l,width:s}))),n)};function cY(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];void 0!==i&&n.push(i)}return n}function uY(e,t,n){return function(e){var{width:t,height:n}=e,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),i=r*Math.PI/180,o=Math.atan(n/t),a=i>o&&i<Math.PI-o?n/Math.sin(i):t/Math.cos(i);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}function dY(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function fY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fY(Object(n),!0).forEach(function(t){hY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mY(e,t,n){var r,{tick:i,ticks:o,viewBox:a,minTickGap:s,orientation:l,interval:c,tickFormatter:u,unit:d,angle:f}=e;if(!o||!o.length||!i)return[];if(Xw(c)||wM)return null!==(r=function(e,t){return cY(e,t+1)}(o,Xw(c)?c:0))&&void 0!==r?r:[];var p=[],h="top"===l||"bottom"===l?"width":"height",m=d&&"width"===h?XU(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=(e,r)=>{var i="function"==typeof u?u(e.value,r):e.value;return"width"===h?uY(XU(i,{fontSize:t,letterSpacing:n}),m,f):XU(i,{fontSize:t,letterSpacing:n})[h]},y=o[0],g=o[1],b=o.length>=2&&null!=y&&null!=g?Yw(g.coordinate-y.coordinate):1,x=function(e,t,n){var r="width"===n,{x:i,y:o,width:a,height:s}=e;return 1===t?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}(a,b,h);return"equidistantPreserveStart"===c?function(e,t,n,r,i){for(var o,a=(r||[]).slice(),{start:s,end:l}=t,c=0,u=1,d=s,f=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:cY(r,u)};var o,a=c,f=()=>(void 0===o&&(o=n(t,a)),o),p=t.coordinate,h=0===c||dY(e,p,f,d,l);h||(c=0,d=s,u+=1),h&&(d=p+e*(f()/2+i),c+=u)};u<=a.length;)if(o=f())return o.v;return[]}(b,x,v,o,s):"equidistantPreserveEnd"===c?function(e,t,n,r,i){var o=(r||[]).slice().length;if(0===o)return[];for(var{start:a,end:s}=t,l=1;l<=o;l++){for(var c,u=(o-1)%l,d=a,f=!0,p=function(){var t=r[h];if(null==t)return 0;var o,a=h,l=()=>(void 0===o&&(o=n(t,a)),o),c=t.coordinate,p=h===u||dY(e,c,l,d,s);if(!p)return f=!1,1;p&&(d=c+e*(l()/2+i))},h=u;h<o&&(0===(c=p())||1!==c);h+=l);if(f){for(var m=[],v=u;v<o;v+=l){var y=r[v];null!=y&&m.push(y)}return m}}return[]}(b,x,v,o,s):(p="preserveStart"===c||"preserveStartEnd"===c?function(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1];if(null!=u){var d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=pY(pY({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),null!=u.tickCoord&&dY(e,u.tickCoord,()=>d,l,c)&&(c=u.tickCoord-e*(d/2+i),a[s-1]=pY(pY({},u),{},{isShow:!0}))}}for(var p=o?s-1:s,h=function(t){var r=a[t];if(null==r)return 1;var o,s=r,u=()=>(void 0===o&&(o=n(r,t)),o);if(0===t){var d=e*(s.coordinate-e*u()/2-l);a[t]=s=pY(pY({},s),{},{tickCoord:d<0?s.coordinate-d*e:s.coordinate})}else a[t]=s=pY(pY({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&dY(e,s.tickCoord,u,l,c)&&(l=s.tickCoord+e*(u()/2+i),a[t]=pY(pY({},s),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(b,x,v,o,s,"preserveStartEnd"===c):function(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(t){var r=o[t];if(null==r)return 1;var c,u=r,d=()=>(void 0===c&&(c=n(r,t)),c);if(t===a-1){var f=e*(u.coordinate+e*d()/2-l);o[t]=u=pY(pY({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate})}else o[t]=u=pY(pY({},u),{},{tickCoord:u.coordinate});null!=u.tickCoord&&dY(e,u.tickCoord,d,s,l)&&(l=u.tickCoord-e*(d()/2+i),o[t]=pY(pY({},u),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}(b,x,v,o,s),p.filter(e=>e.isShow))}var vY=RP({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:i}=t.payload;e[n][r]=i},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:yY,removeRenderedTicks:gY}=vY.actions,bY=vY.reducer,xY=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function wY(){return wY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wY.apply(null,arguments)}function EY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EY(Object(n),!0).forEach(function(t){SY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kY={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",zIndex:jI.axis};function PY(t){var{x:n,y:r,width:i,height:o,orientation:a,mirror:s,axisLine:l,otherSvgProps:c}=t;if(!l)return null;var u=OY(OY(OY({},c),cx(l)),{},{fill:"none"});if("top"===a||"bottom"===a){var d=+("top"===a&&!s||"bottom"===a&&s);u=OY(OY({},u),{},{x1:n,y1:r+d*o,x2:n+i,y2:r+d*o})}else{var f=+("left"===a&&!s||"right"===a&&s);u=OY(OY({},u),{},{x1:n+f*i,y1:r,x2:n+f*i,y2:r+o})}return e.createElement("line",wY({},u,{className:fe("recharts-cartesian-axis-line",Ww(l,"className"))}))}function AY(t){var n,r,{option:i,tickProps:o,value:a}=t,s=fe(o.className,"recharts-cartesian-axis-tick-value");if(e.isValidElement(i))n=e.cloneElement(i,OY(OY({},o),{},{className:s}));else if("function"==typeof i)n=i(OY(OY({},o),{},{className:s}));else{var l="recharts-cartesian-axis-tick-value";"boolean"!=typeof i&&(l=fe(l,(r=i)&&"object"==typeof r&&"className"in r&&"string"==typeof r.className?r.className:"")),n=e.createElement(OW,wY({},o,{className:l}),a)}return n}function jY(e){var{ticks:t,axisType:n,axisId:r}=e,i=iS();return l(()=>{if(null==r||null==n)return sE;var e=t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index}));return i(yY({ticks:e,axisId:r,axisType:n})),()=>{i(gY({axisId:r,axisType:n}))}},[i,t,r,n]),null}var TY=a((t,n)=>{var{ticks:r=[],tick:i,tickLine:o,stroke:a,tickFormatter:s,unit:l,padding:c,tickTextProps:u,orientation:d,mirror:f,x:p,y:h,width:m,height:v,tickSize:y,tickMargin:g,fontSize:b,letterSpacing:x,getTicksConfig:w,events:E,axisType:O,axisId:S}=t,k=mY(OY(OY({},w),{},{ticks:r}),b,x),P=cx(w),A=ux(i),j=mW(P.textAnchor)?P.textAnchor:function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(d,f),T=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(d,f),M={};"object"==typeof o&&(M=o);var C=OY(OY({},P),{},{fill:"none"},M),N=k.map(e=>OY({entry:e},function(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,h,m=s?-1:1,v=e.tickSize||a,y=Xw(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,h=(d=(f=n+ +!s*i)-m*v)-m*l,p=y;break;case"left":d=f=e.coordinate,p=(c=(u=t+ +!s*r)-m*v)-m*l,h=y;break;case"right":d=f=e.coordinate,p=(c=(u=t+ +s*r)+m*v)+m*l,h=y;break;default:c=u=e.coordinate,h=(d=(f=n+ +s*i)+m*v)+m*l,p=y}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:h}}}(e,p,h,m,v,d,y,f,g))),I=N.map(t=>{var{entry:n,line:r}=t;return e.createElement(yx,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(n.value,"-").concat(n.coordinate,"-").concat(n.tickCoord)},o&&e.createElement("line",wY({},C,r,{className:fe("recharts-cartesian-axis-tick-line",Ww(o,"className"))})))}),D=N.map((t,n)=>{var r,o,{entry:d,tick:f}=t,p=OY(OY(OY(OY({verticalAnchor:T},P),{},{textAnchor:j,stroke:"none",fill:a},f),{},{index:n,payload:d,visibleTicksCount:k.length,tickFormatter:s,padding:c},u),{},{angle:null!==(r=null!==(o=null==u?void 0:u.angle)&&void 0!==o?o:P.angle)&&void 0!==r?r:0}),h=OY(OY({},p),A);return e.createElement(yx,wY({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(d.value,"-").concat(d.coordinate,"-").concat(d.tickCoord)},gE(E,d,n)),i&&e.createElement(AY,{option:i,tickProps:h,value:"".concat("function"==typeof s?s(d.value,n):d.value).concat(l||"")}))});return e.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(O,"-ticks")},e.createElement(jY,{ticks:k,axisId:S,axisType:O}),D.length>0&&e.createElement(nU,{zIndex:jI.label},e.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(O,"-tick-labels"),ref:n},D)),I.length>0&&e.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(O,"-tick-lines")},I))}),MY=a((t,n)=>{var{axisLine:r,width:i,height:o,className:a,hide:l,ticks:c,axisType:u,axisId:d}=t,p=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,xY),[h,v]=m(""),[y,b]=m(""),x=s(null);g(n,()=>({getCalculatedWidth:()=>{var e;return(e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>a&&(a=t.width)}});var s=n?n.getBoundingClientRect().width:0,l=a+(i+o)+s+(n?r:0);return Math.round(l)}return 0})({ticks:x.current,label:null===(e=t.labelRef)||void 0===e?void 0:e.current,labelGapWithTick:5,tickSize:t.tickSize,tickMargin:t.tickMargin})}}));var w=f(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");x.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),i=r.fontSize,o=r.letterSpacing;i===h&&o===y||(v(i),b(o))}}},[h,y]);return l||null!=i&&i<=0||null!=o&&o<=0?null:e.createElement(nU,{zIndex:t.zIndex},e.createElement(yx,{className:fe("recharts-cartesian-axis",a)},e.createElement(PY,{x:t.x,y:t.y,width:i,height:o,orientation:t.orientation,mirror:t.mirror,axisLine:r,otherSvgProps:cx(t)}),e.createElement(TY,{ref:w,axisType:u,events:p,fontSize:h,getTicksConfig:t,height:t.height,letterSpacing:y,mirror:t.mirror,orientation:t.orientation,padding:t.padding,stroke:t.stroke,tick:t.tick,tickFormatter:t.tickFormatter,tickLine:t.tickLine,tickMargin:t.tickMargin,tickSize:t.tickSize,tickTextProps:t.tickTextProps,ticks:c,unit:t.unit,width:t.width,x:t.x,y:t.y,axisId:d}),e.createElement(_W,{x:t.x,y:t.y,width:t.width,height:t.height,lowerWidth:t.width,upperWidth:t.width},e.createElement(UW,{label:t.label,labelRef:t.labelRef}),t.children)))}),CY=e.forwardRef((t,n)=>{var r=wE(t,kY);return e.createElement(MY,wY({},r,{ref:n}))});CY.displayName="CartesianAxis";var NY=["x1","y1","x2","y2","key"],IY=["offset"],DY=["xAxisId","yAxisId"],_Y=["xAxisId","yAxisId"];function RY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RY(Object(n),!0).forEach(function(t){zY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VY(){return VY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VY.apply(null,arguments)}function BY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var FY=t=>{var{fill:n}=t;if(!n||"none"===n)return null;var{fillOpacity:r,x:i,y:o,width:a,height:s,ry:l}=t;return e.createElement("rect",{x:i,y:o,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function $Y(t){var n,{option:r,lineItemProps:i}=t;if(e.isValidElement(r))n=e.cloneElement(r,i);else if("function"==typeof r)n=r(i);else{var o,{x1:a,y1:s,x2:l,y2:c,key:u}=i,d=null!==(o=cx(BY(i,NY)))&&void 0!==o?o:{},{offset:f}=d,p=BY(d,IY);n=e.createElement("line",VY({},p,{x1:a,y1:s,x2:l,y2:c,fill:"none",key:u}))}return n}function UY(t){var{x:n,width:r,horizontal:i=!0,horizontalPoints:o}=t;if(!i||!o||!o.length)return null;var{xAxisId:a,yAxisId:s}=t,l=BY(t,DY),c=o.map((t,o)=>{var a=LY(LY({},l),{},{x1:n,y1:t,x2:n+r,y2:t,key:"line-".concat(o),index:o});return e.createElement($Y,{key:"line-".concat(o),option:i,lineItemProps:a})});return e.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function WY(t){var{y:n,height:r,vertical:i=!0,verticalPoints:o}=t;if(!i||!o||!o.length)return null;var{xAxisId:a,yAxisId:s}=t,l=BY(t,_Y),c=o.map((t,o)=>{var a=LY(LY({},l),{},{x1:t,y1:n,x2:t,y2:n+r,key:"line-".concat(o),index:o});return e.createElement($Y,{option:i,lineItemProps:a,key:"line-".concat(o)})});return e.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function KY(t){var{horizontalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,horizontalPoints:l,horizontal:c=!0}=t;if(!c||!n||!n.length||null==l)return null;var u=l.map(e=>Math.round(e+o-o)).sort((e,t)=>e-t);o!==u[0]&&u.unshift(0);var d=u.map((t,l)=>{var c=u[l+1],d=null==c?o+s-t:c-t;if(d<=0)return null;var f=l%n.length;return e.createElement("rect",{key:"react-".concat(l),y:t,x:i,height:d,width:a,stroke:"none",fill:n[f],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function HY(t){var{vertical:n=!0,verticalFill:r,fillOpacity:i,x:o,y:a,width:s,height:l,verticalPoints:c}=t;if(!n||!r||!r.length)return null;var u=c.map(e=>Math.round(e+o-o)).sort((e,t)=>e-t);o!==u[0]&&u.unshift(0);var d=u.map((t,n)=>{var c=u[n+1],d=null==c?o+s-t:c-t;if(d<=0)return null;var f=n%r.length;return e.createElement("rect",{key:"react-".concat(n),x:t,y:a,width:d,height:l,stroke:"none",fill:r[f],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var YY=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return MA(mY(LY(LY(LY({},kY),n),{},{ticks:CA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},qY=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return MA(mY(LY(LY(LY({},kY),n),{},{ticks:CA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},GY={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:jI.grid};function XY(t){var n=Bj(),r=Fj(),i=Vj(),o=LY(LY({},wE(t,GY)),{},{x:Xw(t.x)?t.x:i.left,y:Xw(t.y)?t.y:i.top,width:Xw(t.width)?t.width:i.width,height:Xw(t.height)?t.height:i.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:u,height:d,syncWithTicks:f,horizontalValues:p,verticalValues:h}=o,m=lj(),v=lS(e=>RB(e,"xAxis",a,m)),y=lS(e=>RB(e,"yAxis",s,m));if(!(SA(u)&&SA(d)&&Xw(l)&&Xw(c)))return null;var g=o.verticalCoordinatesGenerator||YY,b=o.horizontalCoordinatesGenerator||qY,{horizontalPoints:x,verticalPoints:w}=o;if(!(x&&x.length||"function"!=typeof b)){var E=p&&p.length,O=b({yAxis:y?LY(LY({},y),{},{ticks:E?p:y.ticks}):void 0,width:null!=n?n:u,height:null!=r?r:d,offset:i},!!E||f);bj(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(x=O)}if(!(w&&w.length||"function"!=typeof g)){var S=h&&h.length,k=g({xAxis:v?LY(LY({},v),{},{ticks:S?h:v.ticks}):void 0,width:null!=n?n:u,height:null!=r?r:d,offset:i},!!S||f);bj(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(w=k)}return e.createElement(nU,{zIndex:o.zIndex},e.createElement("g",{className:"recharts-cartesian-grid"},e.createElement(FY,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),e.createElement(KY,VY({},o,{horizontalPoints:x})),e.createElement(HY,VY({},o,{verticalPoints:w})),e.createElement(UY,VY({},o,{offset:i,horizontalPoints:x,xAxis:v,yAxis:y})),e.createElement(WY,VY({},o,{offset:i,verticalPoints:w,xAxis:v,yAxis:y}))))}XY.displayName="CartesianGrid";var ZY=RP({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(e=>e.dataKey===r.dataKey&&e.direction===r.direction?i:e))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(e=>e.dataKey!==r.dataKey||e.direction!==r.direction))}}}),{addErrorBar:JY,replaceErrorBar:QY,removeErrorBar:eq}=ZY.actions,tq=ZY.reducer,nq=["children"];var rq=o({data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function iq(t){var{children:n}=t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,nq);return e.createElement(rq.Provider,{value:r},n)}function oq(e,t){var n,r,i=lS(t=>Hz(t,e)),o=lS(e=>Gz(e,t)),a=null!==(n=null==i?void 0:i.allowDataOverflow)&&void 0!==n?n:Wz.allowDataOverflow,s=null!==(r=null==o?void 0:o.allowDataOverflow)&&void 0!==r?r:Yz.allowDataOverflow;return{needClip:a||s,needClipX:a,needClipY:s}}function aq(t){var{xAxisId:n,yAxisId:r,clipPathId:i}=t,o=zH(),{needClipX:a,needClipY:s,needClip:l}=oq(n,r);if(!l||!o)return null;var{x:c,y:u,width:d,height:f}=o;return e.createElement("clipPath",{id:"clipPath-".concat(i)},e.createElement("rect",{x:a?c:c-d/2,y:s?u:u-f/2,width:a?d:2*d,height:s?f:2*f}))}var sq=(e,t,n,r)=>VB(e,"xAxis",t,r),lq=(e,t,n,r)=>zB(e,"xAxis",t,r),cq=(e,t,n,r)=>VB(e,"yAxis",n,r),uq=(e,t,n,r)=>zB(e,"yAxis",n,r),dq=rs([$j,sq,cq,lq,uq],(e,t,n,r,i)=>TA(e,"xAxis")?BA(t,r,!1):BA(n,i,!1));function fq(e){return"line"===e.type}var pq=rs([nV,(e,t,n,r,i)=>i],(e,t)=>e.filter(fq).find(e=>e.id===t)),hq=rs([$j,sq,cq,lq,uq,pq,dq,TN],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(null!=o&&null!=t&&null!=n&&null!=r&&null!=i&&0!==r.length&&0!==i.length&&null!=a&&("horizontal"===e||"vertical"===e)){var d,{dataKey:f,data:p}=o;if(null!=(d=null!=p&&p.length>0?p:null==l?void 0:l.slice(c,u+1)))return function(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((e,l)=>{var c=jA(e,a);if("horizontal"===t){var u=_A({axis:n,ticks:i,bandSize:s,entry:e,index:l}),d=iE(c)?null:r.scale.map(c);return{x:u,y:null!=d?d:null,value:c,payload:e}}var f=iE(c)?null:n.scale.map(c),p=_A({axis:r,ticks:o,bandSize:s,entry:e,index:l});return null==f||null==p?null:{x:f,y:p,value:c,payload:e}}).filter(Boolean)}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:f,bandSize:a,displayedData:d})}});function mq(e){var t=ux(e);if(null!=t){var{r:n,strokeWidth:r}=t,i=Number(n),o=Number(r);return(Number.isNaN(i)||i<0)&&(i=3),(Number.isNaN(o)||o<0)&&(o=2),{r:i,strokeWidth:o}}return{r:3,strokeWidth:2}}var vq=["id"],yq=["type","layout","connectNulls","needClip","shape"],gq=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function bq(){return bq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bq.apply(null,arguments)}function xq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xq(Object(n),!0).forEach(function(t){Eq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Eq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oq(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Sq=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:$A(n,t),payload:e}]},kq=e.memo(t=>{var{dataKey:n,data:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=t,f={dataDefinedOnItem:r,getPosition:sE,settings:{stroke:i,strokeWidth:o,fill:a,dataKey:n,nameKey:void 0,name:$A(s,n),hide:l,type:u,color:i,unit:c,graphicalItemId:d}};return e.createElement(eH,{tooltipEntrySettings:f})}),Pq=(e,t)=>"".concat(t,"px ").concat(e,"px");function Aq(e,t){for(var n=e.length%2!=0?[...e,0]:e,r=[],i=0;i<t;++i)r.push(...n);return r}function jq(t){var{clipPathId:n,points:r,props:i}=t,{dot:o,dataKey:a,needClip:s}=i,{id:l}=i,c=cx(Oq(i,vq));return e.createElement(xH,{points:r,dot:o,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:c,needClip:s,clipPathId:n})}function Tq(t){var{showLabels:n,children:r,points:i}=t,o=d(()=>null==i?void 0:i.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return wq(wq({},r),{},{value:e.value,payload:e.payload,viewBox:r,parentViewBox:void 0,fill:void 0})}),[i]);return e.createElement(XW,{value:n?o:void 0},r)}function Mq(t){var{clipPathId:n,pathRef:r,points:i,strokeDasharray:o,props:a}=t,{type:s,layout:l,connectNulls:c,needClip:u,shape:d}=a,f=wq(wq({},dx(Oq(a,yq))),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(n,")"):void 0,points:i,type:s,layout:l,connectNulls:c,strokeDasharray:null!=o?o:a.strokeDasharray});return e.createElement(e.Fragment,null,(null==i?void 0:i.length)>1&&e.createElement(GK,bq({shapeType:"curve",option:d},f,{pathRef:r})),e.createElement(jq,{points:i,clipPathId:n,props:a}))}function Cq(t){var{clipPathId:n,props:r,pathRef:i,previousPointsRef:o,longestAnimatedLengthRef:a}=t,{points:l,strokeDasharray:c,isAnimationActive:u,animationBegin:d,animationDuration:p,animationEasing:h,animateNewValues:v,width:y,height:g,onAnimationEnd:b,onAnimationStart:x}=r,w=o.current,E=EC(l,"recharts-line-"),O=s(E),[S,k]=m(!1),P=!S,A=f(()=>{"function"==typeof b&&b(),k(!1)},[b]),j=f(()=>{"function"==typeof x&&x(),k(!0)},[x]),T=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(i.current),M=s(0);O.current!==E&&(M.current=a.current,O.current=E);var C=M.current;return e.createElement(Tq,{points:l,showLabels:P},r.children,e.createElement(wC,{animationId:E,begin:d,duration:p,isActive:u,easing:h,onAnimationEnd:A,onAnimationStart:j,key:E},t=>{var s,d=nE(C,T+C,t),f=Math.min(d,T);if(u)if(c){var p="".concat(c).split(/[,\s]+/gim).map(e=>parseFloat(e));s=((e,t,n)=>{var r=n.reduce((e,t)=>e+t,0);if(!r)return Pq(t,e);for(var i=Math.floor(e/r),o=e%r,a=[],s=0,l=0;s<n.length;l+=null!==(c=n[s])&&void 0!==c?c:0,++s){var c,u=n[s];if(null!=u&&l+u>o){a=[...n.slice(0,s),o-l];break}}var d=a.length%2==0?[0,t]:[t];return[...Aq(n,i),...a,...d].map(e=>"".concat(e,"px")).join(", ")})(f,T,p)}else s=Pq(T,f);else s=null==c?void 0:String(c);if(t>0&&T>0&&(o.current=l,a.current=Math.max(a.current,f)),w){var h=w.length/l.length,m=1===t?l:l.map((e,n)=>{var r=Math.floor(n*h);if(w[r]){var i=w[r];return wq(wq({},e),{},{x:nE(i.x,e.x,t),y:nE(i.y,e.y,t)})}return wq(wq({},e),{},v?{x:nE(2*y,e.x,t),y:nE(g/2,e.y,t)}:{x:e.x,y:e.y})});return o.current=m,e.createElement(Mq,{props:r,points:m,clipPathId:n,pathRef:i,strokeDasharray:s})}return e.createElement(Mq,{props:r,points:l,clipPathId:n,pathRef:i,strokeDasharray:s})}),e.createElement(QW,{label:r.label}))}function Nq(t){var{clipPathId:n,props:r}=t,i=s(null),o=s(0),a=s(null);return e.createElement(Cq,{props:r,clipPathId:n,previousPointsRef:i,longestAnimatedLengthRef:o,pathRef:a})}var Iq=(e,t)=>{var n,r;return{x:null!==(n=e.x)&&void 0!==n?n:void 0,y:null!==(r=e.y)&&void 0!==r?r:void 0,value:e.value,errorVal:jA(e.payload,t)}};class Dq extends y{render(){var{hide:t,dot:n,points:r,className:i,xAxisId:o,yAxisId:a,top:s,left:l,width:c,height:u,id:d,needClip:f,zIndex:p}=this.props;if(t)return null;var h=fe("recharts-line",i),m=d,{r:v,strokeWidth:y}=mq(n),g=PK(n),b=2*v+y,x=f?"url(#clipPath-".concat(g?"":"dots-").concat(m,")"):void 0;return e.createElement(nU,{zIndex:p},e.createElement(yx,{className:h},f&&e.createElement("defs",null,e.createElement(aq,{clipPathId:m,xAxisId:o,yAxisId:a}),!g&&e.createElement("clipPath",{id:"clipPath-dots-".concat(m)},e.createElement("rect",{x:l-b/2,y:s-b/2,width:c+b,height:u+b}))),e.createElement(iq,{xAxisId:o,yAxisId:a,data:r,dataPointFormatter:Iq,errorBarOffset:0},e.createElement(Nq,{props:this.props,clipPathId:m}))),e.createElement(UH,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var _q={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:jI.line,type:"linear"};function Rq(t){var n=wE(t,_q),{activeDot:r,animateNewValues:i,animationBegin:o,animationDuration:a,animationEasing:s,connectNulls:l,dot:c,hide:u,isAnimationActive:d,label:f,legendType:p,xAxisId:h,yAxisId:m,id:v}=n,y=Oq(n,gq),{needClip:g}=oq(h,m),b=zH(),x=Uj(),w=lj(),E=lS(e=>hq(e,h,m,w,v));if("horizontal"!==x&&"vertical"!==x||null==E||null==b)return null;var{height:O,width:S,x:k,y:P}=b;return e.createElement(Dq,bq({},y,{id:v,connectNulls:l,dot:c,activeDot:r,animateNewValues:i,animationBegin:o,animationDuration:a,animationEasing:s,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:h,yAxisId:m,points:E,layout:x,height:O,width:S,left:k,top:P,needClip:g}))}function Lq(t){var n=wE(t,_q),r=lj();return e.createElement(iH,{id:n.id,type:"line"},t=>e.createElement(e.Fragment,null,e.createElement(tH,{legendPayload:Sq(n)}),e.createElement(kq,{dataKey:n.dataKey,data:n.data,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,hide:n.hide,unit:n.unit,tooltipType:n.tooltipType,id:t}),e.createElement(pH,{type:"line",id:t,data:n.data,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:0,dataKey:n.dataKey,hide:n.hide,isPanorama:r}),e.createElement(Rq,bq({},n,{id:t}))))}var zq=e.memo(Lq,cM);function Vq(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.xAxisId)&&void 0!==n?n:0}function Bq(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.yAxisId)&&void 0!==n?n:0}zq.displayName="Line";var Fq=(e,t,n)=>VB(e,"xAxis",Vq(e,t),n),$q=(e,t,n)=>zB(e,"xAxis",Vq(e,t),n),Uq=(e,t,n)=>VB(e,"yAxis",Bq(e,t),n),Wq=(e,t,n)=>zB(e,"yAxis",Bq(e,t),n),Kq=rs([$j,Fq,Uq,$q,Wq],(e,t,n,r,i)=>TA(e,"xAxis")?BA(t,r,!1):BA(n,i,!1)),Hq=rs([nV,(e,t)=>t],(e,t)=>e.filter(e=>"area"===e.type).find(e=>e.id===t)),Yq=e=>{var t=$j(e);return TA(t,"xAxis")?"yAxis":"xAxis"},qq=rs([Hq,(e,t,n)=>PV(e,Yq(e),((e,t)=>"yAxis"===Yq(e)?Bq(e,t):Vq(e,t))(e,t),n)],(e,t)=>{var n;if(null!=e&&null!=t){var{stackId:r}=e,i=YI(e);if(null!=r&&null!=i){var o=null===(n=t[r])||void 0===n?void 0:n.stackedData,a=null==o?void 0:o.find(e=>e.key===i);if(null!=a)return a.map(e=>[e[0],e[1]])}}}),Gq=rs([$j,Fq,Uq,$q,Wq,qq,MN,Kq,Hq,e=>e.rootProps.baseValue],(e,t,n,r,i,o,a,s,l,c)=>{var{chartData:u,dataStartIndex:d,dataEndIndex:f}=a;if(null!=l&&("horizontal"===e||"vertical"===e)&&null!=t&&null!=n&&null!=r&&null!=i&&0!==r.length&&0!==i.length&&null!=s){var p,{data:h}=l;if(null!=(p=h&&h.length>0?h:null==u?void 0:u.slice(d,f+1)))return function(e){var t,{areaSettings:{connectNulls:n,baseValue:r,dataKey:i},stackedData:o,layout:a,chartBaseValue:s,xAxis:l,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:f,yAxisTicks:p,bandSize:h}=e,m=o&&o.length,v=yG(a,s,r,l,c),y="horizontal"===a,g=!1,b=u.map((e,t)=>{var r,a,s,u;if(m)u=o[d+t];else{var b=jA(e,i);Array.isArray(b)?(u=b,g=!0):u=[v,b]}var x,w=null!==(r=null===(a=u)||void 0===a?void 0:a[1])&&void 0!==r?r:null,E=null==w||m&&!n&&null==jA(e,i);return y?{x:_A({axis:l,ticks:f,bandSize:h,entry:e,index:t}),y:E?null:null!==(x=c.scale.map(w))&&void 0!==x?x:null,value:u,payload:e}:{x:E?null:null!==(s=l.scale.map(w))&&void 0!==s?s:null,y:_A({axis:c,ticks:p,bandSize:h,entry:e,index:t}),value:u,payload:e}});t=m||g?b.map(e=>{var t,n,r=Array.isArray(e.value)?e.value[0]:null;return y?{x:e.x,y:null!=r&&null!=e.y&&null!==(n=c.scale.map(r))&&void 0!==n?n:null,payload:e.payload}:{x:null!=r&&null!==(t=l.scale.map(r))&&void 0!==t?t:null,y:e.y,payload:e.payload}}):y?c.scale.map(v):l.scale.map(v);return{points:b,baseLine:null!=t?t:0,isRange:g}}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:c,bandSize:s})}}),Xq=["id"],Zq=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Jq(){return Jq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jq.apply(null,arguments)}function Qq(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function eG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eG(Object(n),!0).forEach(function(t){nG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rG(e,t){return e&&"none"!==e?e:t}var iG=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:rG(r,i),value:$A(n,t),payload:e}]},oG=e.memo(t=>{var{dataKey:n,data:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=t,f={dataDefinedOnItem:r,getPosition:sE,settings:{stroke:i,strokeWidth:o,fill:a,dataKey:n,nameKey:void 0,name:$A(s,n),hide:l,type:u,color:rG(i,a),unit:c,graphicalItemId:d}};return e.createElement(eH,{tooltipEntrySettings:f})});function aG(t){var{clipPathId:n,points:r,props:i}=t,{needClip:o,dot:a,dataKey:s}=i,l=cx(i);return e.createElement(xH,{points:r,dot:a,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:l,needClip:o,clipPathId:n})}function sG(t){var{showLabels:n,children:r,points:i}=t,o=i.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return tG(tG({},r),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:r,fill:void 0})});return e.createElement(XW,{value:n?o:void 0},r)}function lG(t){var{points:n,baseLine:r,needClip:i,clipPathId:o,props:a}=t,{layout:s,type:l,stroke:c,connectNulls:u,isRange:d}=a,{id:f}=a,p=Qq(a,Xq),h=cx(p),m=dx(p);return e.createElement(e.Fragment,null,(null==n?void 0:n.length)>1&&e.createElement(yx,{clipPath:i?"url(#clipPath-".concat(o,")"):void 0},e.createElement(FM,Jq({},m,{id:f,points:n,connectNulls:u,type:l,baseLine:r,layout:s,stroke:"none",className:"recharts-area-area"})),"none"!==c&&e.createElement(FM,Jq({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:n})),"none"!==c&&d&&Array.isArray(r)&&e.createElement(FM,Jq({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:r}))),e.createElement(aG,{points:n,props:p,clipPathId:o}))}function cG(t){var n,r,{alpha:i,baseLine:o,points:a,strokeWidth:s}=t,l=null===(n=a[0])||void 0===n?void 0:n.y,c=null===(r=a[a.length-1])||void 0===r?void 0:r.y;if(!OA(l)||!OA(c))return null;var u=i*Math.abs(l-c),d=Math.max(...a.map(e=>e.x||0));return Xw(o)?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(...o.map(e=>e.x||0),d)),Xw(d)?e.createElement("rect",{x:0,y:l<c?l:l-u,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}function uG(t){var n,r,{alpha:i,baseLine:o,points:a,strokeWidth:s}=t,l=null===(n=a[0])||void 0===n?void 0:n.x,c=null===(r=a[a.length-1])||void 0===r?void 0:r.x;if(!OA(l)||!OA(c))return null;var u=i*Math.abs(l-c),d=Math.max(...a.map(e=>e.y||0));return Xw(o)?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(...o.map(e=>e.y||0),d)),Xw(d)?e.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}function dG(t){var{alpha:n,layout:r,points:i,baseLine:o,strokeWidth:a}=t;return"vertical"===r?e.createElement(cG,{alpha:n,points:i,baseLine:o,strokeWidth:a}):e.createElement(uG,{alpha:n,points:i,baseLine:o,strokeWidth:a})}function fG(t){var{needClip:n,clipPathId:r,props:i,previousPointsRef:o,previousBaselineRef:a}=t,{points:s,baseLine:l,isAnimationActive:c,animationBegin:u,animationDuration:p,animationEasing:h,onAnimationStart:v,onAnimationEnd:y}=i,g=EC(d(()=>({points:s,baseLine:l}),[s,l]),"recharts-area-"),b=Wj(),[x,w]=m(!1),E=!x,O=f(()=>{"function"==typeof y&&y(),w(!1)},[y]),S=f(()=>{"function"==typeof v&&v(),w(!0)},[v]);if(null==b)return null;var k=o.current,P=a.current;return e.createElement(sG,{showLabels:E,points:s},i.children,e.createElement(wC,{animationId:g,begin:u,duration:p,isActive:c,easing:h,onAnimationEnd:O,onAnimationStart:S,key:g},t=>{if(k){var u,d=k.length/s.length,f=1===t?s:s.map((e,n)=>{var r=Math.floor(n*d);if(k[r]){var i=k[r];return tG(tG({},e),{},{x:nE(i.x,e.x,t),y:nE(i.y,e.y,t)})}return e});return u=Xw(l)?nE(P,l,t):iE(l)||qw(l)?nE(P,0,t):l.map((e,n)=>{var r=Math.floor(n*d);if(Array.isArray(P)&&P[r]){var i=P[r];return tG(tG({},e),{},{x:nE(i.x,e.x,t),y:nE(i.y,e.y,t)})}return e}),t>0&&(o.current=f,a.current=u),e.createElement(lG,{points:f,baseLine:u,needClip:n,clipPathId:r,props:i})}return t>0&&(o.current=s,a.current=l),e.createElement(yx,null,c&&e.createElement("defs",null,e.createElement("clipPath",{id:"animationClipPath-".concat(r)},e.createElement(dG,{alpha:t,points:s,baseLine:l,layout:b,strokeWidth:i.strokeWidth}))),e.createElement(yx,{clipPath:"url(#animationClipPath-".concat(r,")")},e.createElement(lG,{points:s,baseLine:l,needClip:n,clipPathId:r,props:i})))}),e.createElement(QW,{label:i.label}))}function pG(t){var{needClip:n,clipPathId:r,props:i}=t,o=s(null),a=s();return e.createElement(fG,{needClip:n,clipPathId:r,props:i,previousPointsRef:o,previousBaselineRef:a})}class hG extends w{render(){var{hide:t,dot:n,points:r,className:i,top:o,left:a,needClip:s,xAxisId:l,yAxisId:c,width:u,height:d,id:f,baseLine:p,zIndex:h}=this.props;if(t)return null;var m=fe("recharts-area",i),v=f,{r:y,strokeWidth:g}=mq(n),b=PK(n),x=2*y+g,w=s?"url(#clipPath-".concat(b?"":"dots-").concat(v,")"):void 0;return e.createElement(nU,{zIndex:h},e.createElement(yx,{className:m},s&&e.createElement("defs",null,e.createElement(aq,{clipPathId:v,xAxisId:l,yAxisId:c}),!b&&e.createElement("clipPath",{id:"clipPath-dots-".concat(v)},e.createElement("rect",{x:a-x/2,y:o-x/2,width:u+x,height:d+x}))),e.createElement(pG,{needClip:s,clipPathId:v,props:this.props})),e.createElement(UH,{points:r,mainColor:rG(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}),this.props.isRange&&Array.isArray(p)&&e.createElement(UH,{points:p,mainColor:rG(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}))}}var mG={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:jI.area};function vG(t){var n,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:h,xAxisId:m,yAxisId:v}=t,y=Qq(t,Zq),g=Uj(),b=T$(),{needClip:x}=oq(m,v),w=lj(),{points:E,isRange:O,baseLine:S}=null!==(n=lS(e=>Gq(e,t.id,w)))&&void 0!==n?n:{},k=zH();if("horizontal"!==g&&"vertical"!==g||null==k)return null;if("AreaChart"!==b&&"ComposedChart"!==b)return null;var{height:P,width:A,x:j,y:T}=k;return E&&E.length?e.createElement(hG,Jq({},y,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:S,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:P,hide:d,layout:g,isAnimationActive:f,isRange:O,legendType:p,needClip:x,points:E,stroke:h,width:A,left:j,top:T,xAxisId:m,yAxisId:v})):null}var yG=(e,t,n,r,i)=>{var o=null!=n?n:t;if(Xw(o))return o;var a="horizontal"===e?i:r,s=a.scale.domain();if("number"===a.type){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return"dataMin"===o?c:"dataMax"===o||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===o?s[0]:"dataMax"===o?s[1]:s[0]};function gG(t){var n=wE(t,mG),r=lj();return e.createElement(iH,{id:n.id,type:"area"},t=>e.createElement(e.Fragment,null,e.createElement(tH,{legendPayload:iG(n)}),e.createElement(oG,{dataKey:n.dataKey,data:n.data,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,hide:n.hide,unit:n.unit,tooltipType:n.tooltipType,id:t}),e.createElement(pH,{type:"area",id:t,data:n.data,dataKey:n.dataKey,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:0,stackId:DA(n.stackId),hide:n.hide,barSize:void 0,baseValue:n.baseValue,isPanorama:r,connectNulls:n.connectNulls}),e.createElement(vG,Jq({},n,{id:t}))))}var bG=e.memo(gG,cM);bG.displayName="Area";var xG="production"===process.env.NODE_ENV,wG="Invariant failed";function EG(){return EG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EG.apply(null,arguments)}function OG(t){return e.createElement(GK,EG({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},t))}var SG=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(n,r)=>{if(Xw(e))return e;var i=Xw(n)||iE(n);return i?e(n,r):(i||function(e,t){if(xG)throw new Error(wG);var n="function"==typeof t?t():t,r=n?"".concat(wG,": ").concat(n):wG;throw new Error(r)}(0,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")),t)}},kG=rs([nV,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),PG=rs([kG],e=>null==e?void 0:e.maxBarSize),AG=rs([$j,nV,Vq,Bq,(e,t,n)=>n],(e,t,n,r,i)=>t.filter(t=>"horizontal"===e?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===i).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),jG=rs([AG,e=>e.rootProps.barSize,(e,t)=>{var n=$j(e),r=Vq(e,t),i=Bq(e,t);if(null!=r&&null!=i)return"horizontal"===n?IB(e,"xAxis",r):IB(e,"yAxis",i)}],(e,t,n)=>{var r=e.filter(GI),i=e.filter(e=>null==e.stackId),o=r.reduce((e,t)=>{var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{}),a=Object.entries(o).map(e=>{var r,[i,o]=e;return{stackId:i,dataKeys:o.map(e=>e.dataKey),barSize:WH(t,n,null===(r=o[0])||void 0===r?void 0:r.barSize)}});return[...a,...i.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:WH(t,n,e.barSize)}))]}),TG=(e,t,n)=>{var r,i,o=$j(e),a=Vq(e,t),s=Bq(e,t);if(null!=a&&null!=s)return"horizontal"===o?(r=VB(e,"xAxis",a,n),i=zB(e,"xAxis",a,n)):(r=VB(e,"yAxis",s,n),i=zB(e,"yAxis",s,n)),BA(r,i)},MG=rs([jG,xI,e=>e.rootProps.barGap,wI,(e,t,n)=>{var r,i,o=kG(e,t);if(null==o)return 0;var a=Vq(e,t),s=Bq(e,t);if(null==a||null==s)return 0;var l,c,u=$j(e),d=xI(e),{maxBarSize:f}=o,p=iE(f)?d:f;return"horizontal"===u?(l=VB(e,"xAxis",a,n),c=zB(e,"xAxis",a,n)):(l=VB(e,"yAxis",s,n),c=zB(e,"yAxis",s,n)),null!==(r=null!==(i=BA(l,c,!0))&&void 0!==i?i:p)&&void 0!==r?r:0},TG,PG],(e,t,n,r,i,o,a)=>{var s=iE(a)?t:a,l=function(e,t,n,r,i){var o,a=r.length;if(!(a<1)){var s,l=eE(e,n,0,!0),c=[];if(OA(null===(o=r[0])||void 0===o?void 0:o.barSize)){var u=!1,d=n/a,f=r.reduce((e,t)=>e+(t.barSize||0),0);(f+=(a-1)*l)>=n&&(f-=(a-1)*l,l=0),f>=n&&d>0&&(u=!0,f=a*(d*=.9));var p={offset:((n-f)/2|0)-l,size:0};s=r.reduce((e,t)=>{var n,r={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p.offset+p.size+l,size:u?d:null!==(n=t.barSize)&&void 0!==n?n:0}},i=[...e,r];return p=r.position,i},c)}else{var h=eE(t,n,0,!0);n-2*h-(a-1)*l<=0&&(l=0);var m=(n-2*h-(a-1)*l)/a;m>1&&(m>>=0);var v=OA(i)?Math.min(m,i):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h+(m+l)*n+(m-v)/2,size:v}}],c)}return s}}(n,r,i!==o?i:o,e,s);return i!==o&&null!=l&&(l=l.map(e=>HH(HH({},e),{},{position:HH(HH({},e.position),{},{offset:e.position.offset-i/2})}))),l}),CG=rs([MG,kG],(e,t)=>{if(null!=e&&null!=t){var n=e.find(e=>e.stackId===t.stackId&&null!=t.dataKey&&e.dataKeys.includes(t.dataKey));if(null!=n)return n.position}}),NG=rs([(e,t,n)=>{var r=$j(e),i=Vq(e,t),o=Bq(e,t);if(null!=i&&null!=o)return"horizontal"===r?PV(e,"yAxis",o,n):PV(e,"xAxis",i,n)},kG],(e,t)=>{var n=YI(t);if(e&&null!=n&&null!=t){var{stackId:r}=t;if(null!=r){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(e=>e.key===n)}}}}),IG=rs([ij,aj,(e,t,n)=>{var r=Vq(e,t);if(null!=r)return VB(e,"xAxis",r,n)},(e,t,n)=>{var r=Bq(e,t);if(null!=r)return VB(e,"yAxis",r,n)},(e,t,n)=>{var r=Vq(e,t);if(null!=r)return zB(e,"xAxis",r,n)},(e,t,n)=>{var r=Bq(e,t);if(null!=r)return zB(e,"yAxis",r,n)},CG,$j,MN,TG,NG,kG,(e,t,n,r)=>r],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:h,dataEndIndex:m}=l;if(null!=d&&null!=a&&null!=t&&("horizontal"===s||"vertical"===s)&&null!=n&&null!=r&&null!=i&&null!=o&&null!=c){var v,{data:y}=d;if(null!=(v=null!=y&&y.length>0?y:null==p?void 0:p.slice(h,m+1)))return function(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:i},pos:o,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:f,offset:p,cells:h,parentViewBox:m,dataStartIndex:v}=e,y="horizontal"===t?l:s,g=d?y.scale.domain():null,b=(e=>{var{numericAxis:t}=e,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]})({numericAxis:y}),x=y.scale.map(b);return f.map((e,f)=>{var y,w,E,O,S,k;if(d){var P=d[f+v];if(null==P)return null;y=((e,t)=>{if(!t||2!==t.length||!Xw(t[0])||!Xw(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Xw(e[0])||e[0]<n)&&(i[0]=n),(!Xw(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i})(P,g)}else y=jA(e,n),Array.isArray(y)||(y=[b,y]);var A=SG(r,nX)(y[1],f);if("horizontal"===t){var j,T=l.scale.map(y[0]),M=l.scale.map(y[1]);if(null==T||null==M)return null;w=RA({axis:s,ticks:c,bandSize:a,offset:o.offset,entry:e,index:f}),E=null!==(j=null!=M?M:T)&&void 0!==j?j:void 0,O=o.size;var C=T-M;if(S=qw(C)?0:C,k={x:w,y:p.top,width:O,height:p.height},Math.abs(A)>0&&Math.abs(S)<Math.abs(A)){var N=Yw(S||A)*(Math.abs(A)-Math.abs(S));E-=N,S+=N}}else{var I=s.scale.map(y[0]),D=s.scale.map(y[1]);if(null==I||null==D)return null;if(w=I,E=RA({axis:l,ticks:u,bandSize:a,offset:o.offset,entry:e,index:f}),O=D-I,S=o.size,k={x:p.left,y:E,width:p.width,height:S},Math.abs(A)>0&&Math.abs(O)<Math.abs(A))O+=Yw(O||A)*(Math.abs(A)-Math.abs(O))}return null!=w&&null!=E&&null!=O&&null!=S&&(i||0!==O&&0!==S)?WG(WG({},e),{},{stackedBarStart:x,x:w,y:E,width:O,height:S,value:d?y:y[1],payload:e,background:k,tooltipPosition:{x:w+O/2,y:E+S/2},parentViewBox:m,originalDataIndex:f},h&&h[f]&&h[f].props):null}).filter(Boolean)}({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:v,offset:e,cells:f,dataStartIndex:h})}}),DG=["index"];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)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_G.apply(null,arguments)}var RG=o(void 0),LG=t=>{var{index:n}=t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,DG),o=(e=>{var t=i(RG);if(null!=t){var{stackId:n}=t;return"url(#".concat(((e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t))(n,e),")")}})(n);return e.createElement(yx,_G({className:"recharts-bar-stack-layer",clipPath:o},r))},zG=["onMouseEnter","onMouseLeave","onClick"],VG=["value","background","tooltipPosition"],BG=["id"],FG=["onMouseEnter","onClick","onMouseLeave"];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)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$G.apply(null,arguments)}function UG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UG(Object(n),!0).forEach(function(t){KG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HG(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var YG=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:$A(n,t),payload:e}]},qG=e.memo(t=>{var{dataKey:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l,tooltipType:c,id:u}=t,d={dataDefinedOnItem:void 0,getPosition:sE,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:n,nameKey:void 0,name:$A(a,n),hide:s,type:c,color:o,unit:l,graphicalItemId:u}};return e.createElement(eH,{tooltipEntrySettings:d})});function GG(t){var n=lS(d$),{data:r,dataKey:i,background:o,allOtherBarProps:a}=t,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,u=HG(a,zG),d=ZK(s,i,a.id),f=JK(l),p=QK(c,i,a.id);if(!o||null==r)return null;var h,m,v=ux(o);return e.createElement(nU,{zIndex:(h=o,m=jI.barBackground,h&&"object"==typeof h&&"zIndex"in h&&"number"==typeof h.zIndex&&OA(h.zIndex)?h.zIndex:m)},r.map((t,r)=>{var{value:a,background:s,tooltipPosition:l}=t,c=HG(t,VG);if(!s)return null;var h=d(t,r),m=f(t,r),y=p(t,r),g=WG(WG(WG(WG(WG({option:o,isActive:String(r)===n},c),{},{fill:"#eee"},s),v),gE(u,t,r)),{},{onMouseEnter:h,onMouseLeave:m,onClick:y,dataKey:i,index:r,className:"recharts-bar-background-rectangle"});return e.createElement(OG,$G({key:"background-bar-".concat(r)},g))}))}function XG(t){var{showLabels:n,children:r,rects:i}=t,o=null==i?void 0:i.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return WG(WG({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return e.createElement(XW,{value:n?o:void 0},r)}function ZG(t){var{shape:n,activeBar:r,baseProps:i,entry:o,index:a,dataKey:s}=t,c=lS(d$),u=lS(p$),d=r&&String(o.originalDataIndex)===c&&(null==u||s===u),[p,h]=m(!1),[v,y]=m(!1);l(()=>{var e;return d?(h(!0),e=requestAnimationFrame(()=>{y(!0)})):y(!1),()=>{cancelAnimationFrame(e)}},[d]);var g,b=f(()=>{d||h(!1)},[d]),x=d&&v,w=d||p;g=d?!0===r?n:r:n;var E=e.createElement(OG,$G({},i,{name:String(i.name)},o,{isActive:x,option:g,index:a,dataKey:s,onTransitionEnd:b}));return w?e.createElement(nU,{zIndex:jI.activeBar},e.createElement(LG,{index:o.originalDataIndex},E)):E}function JG(t){var{shape:n,baseProps:r,entry:i,index:o,dataKey:a}=t;return e.createElement(OG,$G({},r,{name:String(r.name)},i,{isActive:!1,option:n,index:o,dataKey:a}))}function QG(t){var n,{data:r,props:i}=t,o=null!==(n=cx(i))&&void 0!==n?n:{},{id:a}=o,s=HG(o,BG),{shape:l,dataKey:c,activeBar:u}=i,{onMouseEnter:d,onClick:f,onMouseLeave:p}=i,h=HG(i,FG),m=ZK(d,c,a),v=JK(p),y=QK(f,c,a);return r?e.createElement(e.Fragment,null,r.map((t,n)=>e.createElement(LG,$G({index:t.originalDataIndex,key:"rectangle-".concat(null==t?void 0:t.x,"-").concat(null==t?void 0:t.y,"-").concat(null==t?void 0:t.value,"-").concat(n),className:"recharts-bar-rectangle"},gE(h,t,n),{onMouseEnter:m(t,n),onMouseLeave:v(t,n),onClick:y(t,n)}),u?e.createElement(ZG,{shape:l,activeBar:u,baseProps:s,entry:t,index:n,dataKey:c}):e.createElement(JG,{shape:l,baseProps:s,entry:t,index:n,dataKey:c})))):null}function eX(t){var{props:n,previousRectanglesRef:r}=t,{data:i,layout:o,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c,onAnimationEnd:u,onAnimationStart:d}=n,p=r.current,h=EC(n,"recharts-bar-"),[v,y]=m(!1),g=!v,b=f(()=>{"function"==typeof u&&u(),y(!1)},[u]),x=f(()=>{"function"==typeof d&&d(),y(!0)},[d]);return e.createElement(XG,{showLabels:g,rects:i},e.createElement(wC,{animationId:h,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:b,onAnimationStart:x,key:h},t=>{var a=1===t?i:null==i?void 0:i.map((e,n)=>{var r=p&&p[n];if(r)return WG(WG({},e),{},{x:nE(r.x,e.x,t),y:nE(r.y,e.y,t),width:nE(r.width,e.width,t),height:nE(r.height,e.height,t)});if("horizontal"===o){var i=nE(0,e.height,t),a=nE(e.stackedBarStart,e.y,t);return WG(WG({},e),{},{y:a,height:i})}var s=nE(0,e.width,t),l=nE(e.stackedBarStart,e.x,t);return WG(WG({},e),{},{width:s,x:l})});return t>0&&(r.current=null!=a?a:null),null==a?null:e.createElement(yx,null,e.createElement(QG,{props:n,data:a}))}),e.createElement(QW,{label:n.label}),n.children)}function tX(t){var n=s(null);return e.createElement(eX,{previousRectanglesRef:n,props:t})}var nX=0,rX=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:jA(e,t)}};class iX extends w{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||null==n)return null;var u=fe("recharts-bar",i),d=c;return e.createElement(yx,{className:u,id:c},s&&e.createElement("defs",null,e.createElement(aq,{clipPathId:d,xAxisId:o,yAxisId:a})),e.createElement(yx,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},e.createElement(GG,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),e.createElement(tX,this.props)))}}var oX={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:nX,xAxisId:0,yAxisId:0,zIndex:jI.bar};function aX(t){var n,{xAxisId:r,yAxisId:i,hide:o,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f}=t,{needClip:p}=oq(r,i),h=Uj(),m=lj(),v=EK(t.children,FU),y=lS(e=>IG(e,t.id,m,v));if("vertical"!==h&&"horizontal"!==h)return null;var g=null==y?void 0:y[0];return n=null==g||null==g.height||null==g.width?0:"vertical"===h?g.height/2:g.width/2,e.createElement(iq,{xAxisId:r,yAxisId:i,data:y,dataPointFormatter:rX,errorBarOffset:n},e.createElement(iX,$G({},t,{layout:h,needClip:p,data:y,xAxisId:r,yAxisId:i,hide:o,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f})))}function sX(t){var n,r,o=wE(t,oX),a=(n=o.stackId,null!=(r=i(RG))?r.stackId:null!=n?DA(n):void 0),s=lj();return e.createElement(iH,{id:o.id,type:"bar"},t=>e.createElement(e.Fragment,null,e.createElement(tH,{legendPayload:YG(o)}),e.createElement(qG,{dataKey:o.dataKey,stroke:o.stroke,strokeWidth:o.strokeWidth,fill:o.fill,name:o.name,hide:o.hide,unit:o.unit,tooltipType:o.tooltipType,id:t}),e.createElement(pH,{type:"bar",id:t,data:void 0,xAxisId:o.xAxisId,yAxisId:o.yAxisId,zAxisId:0,dataKey:o.dataKey,stackId:a,hide:o.hide,barSize:o.barSize,minPointSize:o.minPointSize,maxBarSize:o.maxBarSize,isPanorama:s,hasCustomShape:null!=o.shape}),e.createElement(nU,{zIndex:o.zIndex},e.createElement(aX,$G({},o,{id:t})))))}var lX=e.memo(sX,cM);lX.displayName="Bar";var cX=["option","isActive"];function uX(){return uX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uX.apply(null,arguments)}function dX(t){var{option:n,isActive:r}=t,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,cX);return"string"==typeof n?e.createElement(GK,uX({option:e.createElement(mE,uX({type:n},i)),isActive:r,shapeType:"symbols"},i)):e.createElement(GK,uX({option:n,isActive:r,shapeType:"symbols"},i))}var fX=rs([nV,(e,t,n,r,i)=>i],(e,t)=>e.filter(e=>"scatter"===e.type).find(e=>e.id===t)),pX=rs([(e,t,n,r,i,o,a)=>TN(e,0,0,a),(e,t,n,r,i,o,a)=>VB(e,"xAxis",t,a),(e,t,n,r,i,o,a)=>zB(e,"xAxis",t,a),(e,t,n,r,i,o,a)=>VB(e,"yAxis",n,a),(e,t,n,r,i,o,a)=>zB(e,"yAxis",n,a),(e,t,n,r)=>$B(e,"zAxis",r,!1),fX,(e,t,n,r,i,o)=>o],(e,t,n,r,i,o,a,s)=>{var l,{chartData:c,dataStartIndex:u,dataEndIndex:d}=e;if(null!=a&&(null!=(l=null!=(null==a?void 0:a.data)&&a.data.length>0?a.data:null==c?void 0:c.slice(u,d+1))&&null!=t&&null!=r&&null!=n&&null!=i&&0!==(null==n?void 0:n.length)&&0!==(null==i?void 0:i.length)))return function(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:i,scatterSettings:o,xAxisTicks:a,yAxisTicks:s,cells:l}=e,c=iE(n.dataKey)?o.dataKey:n.dataKey,u=iE(r.dataKey)?o.dataKey:r.dataKey,d=i&&i.dataKey,f=i?i.range:Xz.range,p=f&&f[0],h=n.scale.bandwidth?n.scale.bandwidth():0,m=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((e,t)=>{var f=jA(e,c),v=jA(e,u),y=!iE(d)&&jA(e,d)||"-",g=[{name:iE(n.dataKey)?o.name:n.name||String(n.dataKey),unit:n.unit||"",value:f,payload:e,dataKey:c,type:o.tooltipType,graphicalItemId:o.id},{name:iE(r.dataKey)?o.name:r.name||String(r.dataKey),unit:r.unit||"",value:v,payload:e,dataKey:u,type:o.tooltipType,graphicalItemId:o.id}];"-"!==y&&null!=i&&g.push({name:i.name||i.dataKey,unit:i.unit||"",value:y,payload:e,dataKey:d,type:o.tooltipType,graphicalItemId:o.id});var b=_A({axis:n,ticks:a,bandSize:h,entry:e,index:t,dataKey:c}),x=_A({axis:r,ticks:s,bandSize:m,entry:e,index:t,dataKey:u}),w="-"!==y&&null!=i?i.scale.map(y):p,E=null==w?0:Math.sqrt(Math.max(w,0)/Math.PI);return xX(xX({},e),{},{cx:b,cy:x,x:null==b?void 0:b-E,y:null==x?void 0:x-E,width:2*E,height:2*E,size:w,node:{x:f,y:v,z:y},tooltipPayload:g,tooltipPosition:{x:b,y:x},payload:e},l&&l[t]&&l[t].props)})}({displayedData:l,xAxis:t,yAxis:r,zAxis:o,scatterSettings:a,xAxisTicks:n,yAxisTicks:i,cells:s})}),hX=["id"],mX=["onMouseEnter","onClick","onMouseLeave"],vX=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function yX(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gX(){return gX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gX.apply(null,arguments)}function bX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bX(Object(n),!0).forEach(function(t){wX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EX=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:$A(n,t),payload:e}]},OX=e.memo(t=>{var{dataKey:n,points:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c,id:u}=t,d={dataDefinedOnItem:null==r?void 0:r.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null==r||null===(t=r[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:o,fill:a,nameKey:void 0,dataKey:n,name:$A(s,n),hide:l,type:c,color:a,unit:"",graphicalItemId:u}};return e.createElement(eH,{tooltipEntrySettings:d})});function SX(t){var{points:n,props:r}=t,{line:i,lineType:o,lineJointType:a}=r;if(!i)return null;var s,l,c=cx(r),u=ux(i);if("joint"===o)s=n.map(e=>{var t,n;return{x:null!==(t=e.cx)&&void 0!==t?t:null,y:null!==(n=e.cy)&&void 0!==n?n:null}});else if("fitting"===o){var{xmin:d,xmax:f,a:p,b:h}=(e=>{for(var t=e.length,n=0,r=0,i=0,o=0,a=1/0,s=-1/0,l=0,c=0,u=0;u<t;u++){var d,f;n+=l=(null===(d=e[u])||void 0===d?void 0:d.cx)||0,r+=c=(null===(f=e[u])||void 0===f?void 0:f.cy)||0,i+=l*c,o+=l*l,a=Math.min(a,l),s=Math.max(s,l)}var p=t*o!==n*n?(t*i-n*r)/(t*o-n*n):0;return{xmin:a,xmax:s,a:p,b:(r-p*n)/t}})(n),m=e=>p*e+h;s=[{x:d,y:m(d)},{x:f,y:m(f)}]}var v=xX(xX(xX({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:s});return l=e.isValidElement(i)?e.cloneElement(i,v):"function"==typeof i?i(v):e.createElement(FM,gX({},v,{type:a})),e.createElement(yx,{className:"recharts-scatter-line",key:"recharts-scatter-line"},l)}function kX(t){var{showLabels:n,points:r,children:i}=t,o=Lj(),a=d(()=>null==r?void 0:r.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width};return xX(xX({},r),{},{value:void 0,payload:e.payload,viewBox:r,parentViewBox:o,fill:void 0})}),[o,r]);return e.createElement(XW,{value:n?a:void 0},i)}function PX(t){var n,{points:r,allOtherScatterProps:i}=t,{shape:o,activeShape:a,dataKey:s}=i,{id:l}=i,c=yX(i,hX),u=lS(d$),{onMouseEnter:d,onClick:f,onMouseLeave:p}=i,h=yX(i,mX),m=ZK(d,s,l),v=JK(p),y=QK(f,s,l);if(n=r,!(Array.isArray(n)&&n.length>0))return null;var g=cx(c);return e.createElement(e.Fragment,null,e.createElement(SX,{points:r,props:c}),r.map((t,n)=>{var r=null!=a&&!1!==a,i=r&&u===String(n),s=r&&i?a:o,c=xX(xX(xX({},g),t),{},{index:n,[GA]:String(l)});return e.createElement(nU,{key:"symbol-".concat(null==t?void 0:t.cx,"-").concat(null==t?void 0:t.cy,"-").concat(null==t?void 0:t.size,"-").concat(n),zIndex:i?jI.activeDot:void 0},e.createElement(yx,gX({className:"recharts-scatter-symbol"},gE(h,t,n),{onMouseEnter:m(t,n),onMouseLeave:v(t,n),onClick:y(t,n)}),e.createElement(dX,gX({option:s,isActive:i},c))))}))}function AX(t){var{previousPointsRef:n,props:r}=t,{points:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l}=r,c=n.current,u=EC(r,"recharts-scatter-"),[d,p]=m(!1),h=f(()=>{p(!1)},[]),v=f(()=>{p(!0)},[]),y=!d;return e.createElement(kX,{showLabels:y,points:i},r.children,e.createElement(wC,{animationId:u,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:h,onAnimationStart:v,key:u},t=>{var o=1===t?i:null==i?void 0:i.map((e,n)=>{var r=c&&c[n];return xX(xX({},e),{},r?{cx:null==e.cx?void 0:nE(r.cx,e.cx,t),cy:null==e.cy?void 0:nE(r.cy,e.cy,t),size:nE(r.size,e.size,t)}:{size:nE(0,e.size,t)})});return t>0&&(n.current=o),e.createElement(yx,null,e.createElement(PX,{points:o,allOtherScatterProps:r,showLabels:y}))}),e.createElement(QW,{label:r.label}))}var jX=(e,t,n)=>({x:e.cx,y:e.cy,value:Number("x"===n?e.node.x:e.node.y),errorVal:jA(e,t)});function TX(t){var{hide:n,points:r,className:i,needClip:o,xAxisId:a,yAxisId:l,id:c}=t,u=s(null);if(n)return null;var d=fe("recharts-scatter",i),f=c;return e.createElement(nU,{zIndex:t.zIndex},e.createElement(yx,{className:d,clipPath:o?"url(#clipPath-".concat(f,")"):void 0,id:c},o&&e.createElement("defs",null,e.createElement(aq,{clipPathId:f,xAxisId:a,yAxisId:l})),e.createElement(iq,{xAxisId:a,yAxisId:l,data:r,dataPointFormatter:jX,errorBarOffset:0},e.createElement(yx,{key:"recharts-scatter-symbols"},e.createElement(AX,{props:t,previousPointsRef:u})))))}var MX={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:jI.scatter};function CX(t){var n=wE(t,MX),{animationBegin:r,animationDuration:i,animationEasing:o,hide:a,isAnimationActive:s,legendType:l,lineJointType:c,lineType:u,shape:f,xAxisId:p,yAxisId:h,zAxisId:m}=n,v=yX(n,vX),{needClip:y}=oq(p,h),g=d(()=>EK(t.children,FU),[t.children]),b=lj(),x=lS(e=>pX(e,p,h,m,t.id,g,b));return null==y||null==x?null:e.createElement(e.Fragment,null,e.createElement(OX,{dataKey:t.dataKey,points:x,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,tooltipType:t.tooltipType,id:t.id}),e.createElement(TX,gX({},v,{xAxisId:p,yAxisId:h,zAxisId:m,lineType:u,lineJointType:c,legendType:l,shape:f,hide:a,isAnimationActive:s,animationBegin:r,animationDuration:i,animationEasing:o,points:x,needClip:y})))}function NX(t){var n=wE(t,MX),r=lj();return e.createElement(iH,{id:n.id,type:"scatter"},t=>e.createElement(e.Fragment,null,e.createElement(tH,{legendPayload:EX(n)}),e.createElement(pH,{type:"scatter",id:t,data:n.data,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:n.zAxisId,dataKey:n.dataKey,hide:n.hide,name:n.name,tooltipType:n.tooltipType,isPanorama:r}),e.createElement(CX,gX({},n,{id:t}))))}var IX=e.memo(NX,cM);IX.displayName="Scatter";var DX=["domain","range"],_X=["domain","range"];function RX(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function LX(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&(e[0]===t[0]&&e[1]===t[1])}function zX(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=RX(e,DX),{domain:o,range:a}=t,s=RX(t,_X);return!!LX(n,o)&&(!!LX(r,a)&&cM(i,s))}var VX=["type"],BX=["dangerouslySetInnerHTML","ticks","scale"],FX=["id","scale"];function $X(){return $X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$X.apply(null,arguments)}function UX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UX(Object(n),!0).forEach(function(t){KX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HX(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function YX(e){var t=iS(),n=s(null),i=Wj(),{type:o}=e,a=HX(e,VX),l=MI(i,"xAxis",o),c=d(()=>{if(null!=l)return WX(WX({},a),{},{type:l})},[a,l]);return r(()=>{null!=c&&(null===n.current?t(kH(c)):n.current!==c&&t(PH({prev:n.current,next:c})),n.current=c)},[c,t]),r(()=>()=>{n.current&&(t(AH(n.current)),n.current=null)},[t]),null}var qX=t=>{var{xAxisId:n,className:r}=t,i=lS(aj),o=lj(),a="xAxis",s=lS(e=>LB(e,a,n,o)),l=lS(e=>AB(e,n)),c=lS(e=>MB(e,n)),u=lS(e=>Kz(e,n));if(null==l||null==c||null==u)return null;var{dangerouslySetInnerHTML:d,ticks:f,scale:p}=t,h=HX(t,BX),{id:m,scale:v}=u,y=HX(u,FX);return e.createElement(CY,$X({},h,y,{x:c.x,y:c.y,width:l.width,height:l.height,className:fe("recharts-".concat(a," ").concat(a),r),viewBox:i,ticks:s,axisType:a,axisId:n}))},GX={allowDataOverflow:Wz.allowDataOverflow,allowDecimals:Wz.allowDecimals,allowDuplicatedCategory:Wz.allowDuplicatedCategory,angle:Wz.angle,axisLine:kY.axisLine,height:Wz.height,hide:!1,includeHidden:Wz.includeHidden,interval:Wz.interval,label:!1,minTickGap:Wz.minTickGap,mirror:Wz.mirror,orientation:Wz.orientation,padding:Wz.padding,reversed:Wz.reversed,scale:Wz.scale,tick:Wz.tick,tickCount:Wz.tickCount,tickLine:kY.tickLine,tickSize:kY.tickSize,type:Wz.type,niceTicks:Wz.niceTicks,xAxisId:0},XX=t=>{var n=wE(t,GX);return e.createElement(e.Fragment,null,e.createElement(YX,{allowDataOverflow:n.allowDataOverflow,allowDecimals:n.allowDecimals,allowDuplicatedCategory:n.allowDuplicatedCategory,angle:n.angle,dataKey:n.dataKey,domain:n.domain,height:n.height,hide:n.hide,id:n.xAxisId,includeHidden:n.includeHidden,interval:n.interval,minTickGap:n.minTickGap,mirror:n.mirror,name:n.name,orientation:n.orientation,padding:n.padding,reversed:n.reversed,scale:n.scale,tick:n.tick,tickCount:n.tickCount,tickFormatter:n.tickFormatter,ticks:n.ticks,type:n.type,unit:n.unit,niceTicks:n.niceTicks}),e.createElement(qX,n))},ZX=e.memo(XX,zX);ZX.displayName="XAxis";var JX=["type"],QX=["dangerouslySetInnerHTML","ticks","scale"],eZ=["id","scale"];function tZ(){return tZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tZ.apply(null,arguments)}function nZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nZ(Object(n),!0).forEach(function(t){iZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oZ(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aZ(e){var t=iS(),n=s(null),i=Wj(),{type:o}=e,a=oZ(e,JX),l=MI(i,"yAxis",o),c=d(()=>{if(null!=l)return rZ(rZ({},a),{},{type:l})},[l,a]);return r(()=>{null!=c&&(null===n.current?t(jH(c)):n.current!==c&&t(TH({prev:n.current,next:c})),n.current=c)},[c,t]),r(()=>()=>{n.current&&(t(MH(n.current)),n.current=null)},[t]),null}function sZ(t){var{yAxisId:n,className:i,width:o,label:a}=t,l=s(null),c=s(null),u=lS(aj),d=lj(),f=iS(),p="yAxis",m=lS(e=>NB(e,n)),v=lS(e=>CB(e,n)),y=lS(e=>LB(e,p,n,d)),g=lS(e=>qz(e,n));if(r(()=>{if("auto"===o&&m&&!zW(a)&&!h(a)&&null!=g){var e=l.current;if(e){var t=e.getCalculatedWidth();Math.round(m.width)!==Math.round(t)&&f(DH({id:n,width:t}))}}},[y,m,f,a,n,o,g]),null==m||null==v||null==g)return null;var{dangerouslySetInnerHTML:b,ticks:x,scale:w}=t,E=oZ(t,QX),{id:O,scale:S}=g,k=oZ(g,eZ);return e.createElement(CY,tZ({},E,k,{ref:l,labelRef:c,x:v.x,y:v.y,tickTextProps:"auto"===o?{width:void 0}:{width:o},width:m.width,height:m.height,className:fe("recharts-".concat(p," ").concat(p),i),viewBox:u,ticks:y,axisType:p,axisId:n}))}var lZ={allowDataOverflow:Yz.allowDataOverflow,allowDecimals:Yz.allowDecimals,allowDuplicatedCategory:Yz.allowDuplicatedCategory,angle:Yz.angle,axisLine:kY.axisLine,hide:!1,includeHidden:Yz.includeHidden,interval:Yz.interval,label:!1,minTickGap:Yz.minTickGap,mirror:Yz.mirror,orientation:Yz.orientation,padding:Yz.padding,reversed:Yz.reversed,scale:Yz.scale,tick:Yz.tick,tickCount:Yz.tickCount,tickLine:kY.tickLine,tickSize:kY.tickSize,type:Yz.type,niceTicks:Yz.niceTicks,width:Yz.width,yAxisId:0},cZ=t=>{var n=wE(t,lZ);return e.createElement(e.Fragment,null,e.createElement(aZ,{interval:n.interval,id:n.yAxisId,scale:n.scale,type:n.type,domain:n.domain,allowDataOverflow:n.allowDataOverflow,dataKey:n.dataKey,allowDuplicatedCategory:n.allowDuplicatedCategory,allowDecimals:n.allowDecimals,tickCount:n.tickCount,padding:n.padding,includeHidden:n.includeHidden,reversed:n.reversed,ticks:n.ticks,width:n.width,orientation:n.orientation,mirror:n.mirror,hide:n.hide,unit:n.unit,name:n.name,angle:n.angle,minTickGap:n.minTickGap,tick:n.tick,tickFormatter:n.tickFormatter,niceTicks:n.niceTicks}),e.createElement(sZ,n))},uZ=e.memo(cZ,zX);uZ.displayName="YAxis";var dZ=rs([(e,t)=>t,$j,WI,JI,t$,a$,I$,ij],(e,t,n,r,i,o,a,s)=>{if(e&&t&&r&&i&&o)return"horizontal"===t||"vertical"===t?((e,t,n,r,i,o,a)=>{if(e&&n&&r&&i&&function(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}(e,a)){var s=((e,t)=>"horizontal"===t?e.relativeX:"vertical"===t?e.relativeY:void 0)(e,t),l=j$(s,o,i,n,r),c=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("horizontal"===e)return{x:i.coordinate,y:r.relativeY};if("vertical"===e)return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}})(t,i,l,e);return{activeIndex:String(l),activeCoordinate:c}}})(e,t,r,i,o,a,s):$$(e,t,n,r,i,o,a)});function fZ(e){var t,n,r,i=e.currentTarget.getBoundingClientRect();if("getBBox"in(r=e).currentTarget&&"function"==typeof r.currentTarget.getBBox){var o=e.currentTarget.getBBox();t=o.width>0?i.width/o.width:1,n=o.height>0?i.height/o.height:1}else{var a=e.currentTarget;t=a.offsetWidth>0?i.width/a.offsetWidth:1,n=a.offsetHeight>0?i.height/a.offsetHeight:1}var s=(e,r)=>({relativeX:Math.round((e-i.left)/t),relativeY:Math.round((r-i.top)/n)});return"touches"in e?Array.from(e.touches).map(e=>s(e.clientX,e.clientY)):s(e.clientX,e.clientY)}var pZ=uP("mouseClick"),hZ=hA();hZ.startListening({actionCreator:pZ,effect:(e,t)=>{var n=e.payload,r=dZ(t.getState(),fZ(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(aF({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var mZ=uP("mouseMove"),vZ=hA(),yZ=null,gZ=null,bZ=null;function xZ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}vZ.startListening({actionCreator:mZ,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,a="all"===o||(null==o?void 0:o.includes("mousemove"));null!==yZ&&(cancelAnimationFrame(yZ),yZ=null),null===gZ||"number"==typeof i&&a||(clearTimeout(gZ),gZ=null),bZ=fZ(n);var s=()=>{var e=t.getState(),n=YB(e,e.tooltip.settings.shared);if(!bZ)return yZ=null,void(gZ=null);if("axis"===n){var r=dZ(e,bZ);null!=(null==r?void 0:r.activeIndex)?t.dispatch(oF({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(rF())}yZ=null,gZ=null};a?"raf"===i?yZ=requestAnimationFrame(s):"number"==typeof i&&null===gZ&&(gZ=setTimeout(s,i)):s()}});var wZ={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},EZ=RP({name:"rootProps",initialState:wZ,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:wZ.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),OZ=EZ.reducer,{updateOptions:SZ}=EZ.actions,kZ=RP({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>null===e?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),{updatePolarOptions:PZ}=kZ.actions,AZ=kZ.reducer,jZ=uP("keyDown"),TZ=uP("focus"),MZ=uP("blur"),CZ=hA(),NZ=null,IZ=null,DZ=null;function _Z(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(e,n)=>{if("currentTarget"===n)return t;var r=Reflect.get(e,n);return"function"==typeof r?r.bind(e):r}})}CZ.startListening({actionCreator:jZ,effect:(e,t)=>{DZ=e.payload,null!==NZ&&(cancelAnimationFrame(NZ),NZ=null);var n=t.getState(),{throttleDelay:r,throttledEvents:i}=n.eventSettings,o="all"===i||i.includes("keydown");null===IZ||"number"==typeof r&&o||(clearTimeout(IZ),IZ=null);var a=()=>{try{var e=t.getState();if(!(!1!==e.rootProps.accessibilityLayer))return;var{keyboardInteraction:n}=e.tooltip,r=DZ;if("ArrowRight"!==r&&"ArrowLeft"!==r&&"Enter"!==r)return;var i=mF(n,NF(e),OV(e),ZF(e)),o=null==i?-1:Number(i),a=!Number.isFinite(o)||o<0,s=a$(e),l=NF(e),c=YB(e,e.tooltip.settings.shared);if("Enter"===r){if(a)return;var u=L$(e,c,"hover",String(n.index));return void t.dispatch(lF({active:!n.active,activeIndex:n.index,activeCoordinate:u}))}var d,f="left-to-right"===UB(e)?1:-1,p="ArrowRight"===r?1:-1;if(a){var h=OV(e),m=ZF(e),v=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(d=-1,p*f>0){for(var y=0;y<l.length;y++)if(null!=mF(v(y),l,h,m)){d=y;break}}else for(var g=l.length-1;g>=0;g--)if(null!=mF(v(g),l,h,m)){d=g;break}if(d<0)return}else{d=o+p*f;var b=(null==s?void 0:s.length)||l.length;if(0===b||d>=b||d<0)return}var x=L$(e,c,"hover",String(d));t.dispatch(lF({active:!0,activeIndex:d.toString(),activeCoordinate:x}))}finally{NZ=null,IZ=null}};o?"raf"===r?NZ=requestAnimationFrame(a):"number"==typeof r&&null===IZ&&(a(),DZ=null,IZ=setTimeout(()=>{DZ?a():(IZ=null,NZ=null)},r)):a()}}),CZ.startListening({actionCreator:TZ,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var i=YB(n,n.tooltip.settings.shared),o=L$(n,i,"hover",String("0"));t.dispatch(lF({active:!0,activeIndex:"0",activeCoordinate:o}))}}}}),CZ.startListening({actionCreator:MZ,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;r.active&&t.dispatch(lF({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});var RZ=uP("externalEvent"),LZ=hA(),zZ=new Map,VZ=new Map,BZ=new Map;LZ.startListening({actionCreator:RZ,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(null!=n){var i=r.type,o=_Z(r);BZ.set(i,{handler:n,reactEvent:o});var a=zZ.get(i);void 0!==a&&(cancelAnimationFrame(a),zZ.delete(i));var s=t.getState(),{throttleDelay:l,throttledEvents:c}=s.eventSettings,u=c,d="all"===u||(null==u?void 0:u.includes(i)),f=VZ.get(i);void 0===f||"number"==typeof l&&d||(clearTimeout(f),VZ.delete(i));var p=()=>{var e=BZ.get(i);try{if(!e)return;var{handler:n,reactEvent:r}=e,o=t.getState(),a={activeCoordinate:y$(o),activeDataKey:p$(o),activeIndex:d$(o),activeLabel:f$(o),activeTooltipIndex:d$(o),isTooltipActive:g$(o)};n&&n(a,r)}finally{zZ.delete(i),VZ.delete(i),BZ.delete(i)}};if(d)if("raf"===l){var h=requestAnimationFrame(p);zZ.set(i,h)}else if("number"==typeof l){if(!VZ.has(i)){p();var m=setTimeout(p,l);VZ.set(i,m)}}else p();else p()}}});var FZ=rs([bF],e=>e.tooltipItemPayloads),$Z=rs([FZ,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(null!=t){var r=e.find(e=>e.settings.graphicalItemId===n);if(null!=r){var{getPosition:i}=r;if(null!=i)return i(t)}}}),UZ=uP("touchMove"),WZ=hA(),KZ=null,HZ=null,YZ=null,qZ=null;WZ.startListening({actionCreator:UZ,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){qZ=_Z(n);var r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,a="all"===o||o.includes("touchmove");null!==KZ&&(cancelAnimationFrame(KZ),KZ=null),null===HZ||"number"==typeof i&&a||(clearTimeout(HZ),HZ=null),YZ=Array.from(n.touches).map(e=>fZ({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(null!=qZ){var e=t.getState(),n=YB(e,e.tooltip.settings.shared);if("axis"===n){var r,i=null===(r=YZ)||void 0===r?void 0:r[0];if(null==i)return KZ=null,void(HZ=null);var o=dZ(e,i);null!=(null==o?void 0:o.activeIndex)&&t.dispatch(oF({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===n){var a,s=qZ.touches[0];if(null==document.elementFromPoint||null==s)return;var l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute("data-recharts-item-index"),u=null!==(a=l.getAttribute(GA))&&void 0!==a?a:void 0,d=jF(e).find(e=>e.id===u);if(null==c||null==d||null==u)return;var{dataKey:f}=d,p=$Z(e,c,u);t.dispatch(tF({activeDataKey:f,activeIndex:c,activeCoordinate:p,activeGraphicalItemId:u}))}KZ=null,HZ=null}};a?"raf"===i?KZ=requestAnimationFrame(s):"number"==typeof i&&null===HZ&&(s(),qZ=null,HZ=setTimeout(()=>{qZ?s():(HZ=null,KZ=null)},i)):s()}}});var GZ={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},XZ=RP({name:"eventSettings",initialState:GZ,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:ZZ}=XZ.actions,JZ=WS({brush:JH,cartesianAxis:_H,chartData:PU,errorBars:tq,eventSettings:XZ.reducer,graphicalItems:fH,layout:wA,legend:WT,options:bU,polarAxis:sK,polarOptions:AZ,referenceElements:aY,renderedTicks:bY,rootProps:OZ,tooltip:cF,zIndex:tU});function QZ(t){var{preloadedState:n,children:r,reduxStoreName:i}=t,o=lj(),a=s(null);if(o)return r;null==a.current&&(a.current=function(e){return TP({reducer:JZ,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([hZ.middleware,vZ.middleware,CZ.middleware,LZ.middleware,WZ.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(jP({type:"raf"}))},devTools:{serialize:{replacer:xZ},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(n,i));var l=nS;return e.createElement(aM,{context:l,store:a.current},r)}function eJ(e){var{layout:t,margin:n}=e,r=iS(),i=lj();return l(()=>{i||(r(gA(t)),r(yA(n)))},[r,i,t,n]),null}var tJ=x(eJ,cM);function nJ(e){var t=iS();return l(()=>{t(SZ(e))},[t,e]),null}var rJ=x(e=>{var t=iS();return l(()=>{t(ZZ(e))},[t,e]),null},cM);function iJ(t){var{zIndex:n,isPanorama:i}=t,o=s(null),a=iS();return r(()=>(o.current&&a(Q$({zIndex:n,element:o.current,isPanorama:i})),()=>{a(eU({zIndex:n,isPanorama:i}))}),[a,n,i]),e.createElement("g",{tabIndex:-1,ref:o,className:"recharts-zIndex-layer_".concat(n)})}function oJ(t){var{children:n,isPanorama:r}=t,i=lS(W$);if(!i||0===i.length)return n;var o=i.filter(e=>e<0),a=i.filter(e=>e>0);return e.createElement(e.Fragment,null,o.map(t=>e.createElement(iJ,{key:t,zIndex:t,isPanorama:r})),n,a.map(t=>e.createElement(iJ,{key:t,zIndex:t,isPanorama:r})))}var aJ=["children"];function sJ(){return sJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sJ.apply(null,arguments)}var lJ={width:"100%",height:"100%",display:"block"},cJ=a((t,n)=>{var r=Bj(),i=Fj(),o=TM();if(!SA(r)||!SA(i))return null;var a,s,{children:l,otherAttributes:c,title:u,desc:d}=t;return null!=c&&(a="number"==typeof c.tabIndex?c.tabIndex:o?0:void 0,s="string"==typeof c.role?c.role:o?"application":void 0),e.createElement(hx,sJ({},c,{title:u,desc:d,role:s,tabIndex:a,width:r,height:i,style:lJ,ref:n}),l)}),uJ=t=>{var{children:n}=t,r=lS(uj);if(!r)return null;var{width:i,height:o,y:a,x:s}=r;return e.createElement(hx,{width:i,height:o,x:s,y:a},n)},dJ=a((t,n)=>{var{children:r}=t,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,aJ);return lj()?e.createElement(uJ,null,e.createElement(oJ,{isPanorama:!0},r)):e.createElement(cJ,sJ({ref:n},i),e.createElement(oJ,{isPanorama:!1},r))});function fJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fJ(Object(n),!0).forEach(function(t){hJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mJ(){return mJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mJ.apply(null,arguments)}var vJ=()=>(NU(),null);function yJ(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var gJ=a((t,n)=>{var r,i,o=s(null),[a,c]=m({containerWidth:yJ(null===(r=t.style)||void 0===r?void 0:r.width),containerHeight:yJ(null===(i=t.style)||void 0===i?void 0:i.height)}),u=f((e,t)=>{c(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),d=f(e=>{if("function"==typeof n&&n(e),null!=o.current&&(o.current.disconnect(),o.current=null),null!=e&&"undefined"!=typeof ResizeObserver){var{width:t,height:r}=e.getBoundingClientRect();u(t,r);var i=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:n,height:r}=t.contentRect;u(n,r)}});i.observe(e),o.current=i}},[n,u]);return l(()=>()=>{var e=o.current;null!=e&&e.disconnect()},[u]),e.createElement(e.Fragment,null,e.createElement(Hj,{width:a.containerWidth,height:a.containerHeight}),e.createElement("div",mJ({ref:d},t)))}),bJ=a((t,n)=>{var{width:r,height:i}=t,[o,a]=m({containerWidth:yJ(r),containerHeight:yJ(i)}),s=f((e,t)=>{a(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),l=f(e=>{if("function"==typeof n&&n(e),null!=e){var{width:t,height:r}=e.getBoundingClientRect();s(t,r)}},[n,s]);return e.createElement(e.Fragment,null,e.createElement(Hj,{width:o.containerWidth,height:o.containerHeight}),e.createElement("div",mJ({ref:l},t)))}),xJ=a((t,n)=>{var{width:r,height:i}=t;return e.createElement(e.Fragment,null,e.createElement(Hj,{width:r,height:i}),e.createElement("div",mJ({ref:n},t)))}),wJ=a((t,n)=>{var{width:r,height:i}=t;return"string"==typeof r||"string"==typeof i?e.createElement(bJ,mJ({},t,{ref:n})):"number"==typeof r&&"number"==typeof i?e.createElement(xJ,mJ({},t,{width:r,height:i,ref:n})):e.createElement(e.Fragment,null,e.createElement(Hj,{width:r,height:i}),e.createElement("div",mJ({ref:n},t)))});var EJ=a((t,n)=>{var{children:r,className:i,height:o,onClick:a,onContextMenu:c,onDoubleClick:u,onMouseDown:d,onMouseEnter:p,onMouseLeave:h,onMouseMove:v,onMouseUp:y,onTouchEnd:g,onTouchMove:b,onTouchStart:x,style:w,width:E,responsive:O,dispatchTouchEvents:S=!0}=t,k=s(null),P=iS(),[A,j]=m(null),[T,M]=m(null),C=function(){var e=iS(),[t,n]=m(null),r=lS(KA);return l(()=>{if(null!=t){var n=t.getBoundingClientRect().width/t.offsetWidth;OA(n)&&n!==r&&e(xA(n))}},[t,e,r]),n}(),N=Ij(),I=(null==N?void 0:N.width)>0?N.width:E,D=(null==N?void 0:N.height)>0?N.height:o,_=f(e=>{C(e),"function"==typeof n&&n(e),j(e),M(e),null!=e&&(k.current=e)},[C,n,j,M]),R=f(e=>{P(pZ(e)),P(RZ({handler:a,reactEvent:e}))},[P,a]),L=f(e=>{P(mZ(e)),P(RZ({handler:p,reactEvent:e}))},[P,p]),z=f(e=>{P(rF()),P(RZ({handler:h,reactEvent:e}))},[P,h]),V=f(e=>{P(mZ(e)),P(RZ({handler:v,reactEvent:e}))},[P,v]),B=f(()=>{P(TZ())},[P]),F=f(()=>{P(MZ())},[P]),$=f(e=>{P(jZ(e.key))},[P]),U=f(e=>{P(RZ({handler:c,reactEvent:e}))},[P,c]),W=f(e=>{P(RZ({handler:u,reactEvent:e}))},[P,u]),K=f(e=>{P(RZ({handler:d,reactEvent:e}))},[P,d]),H=f(e=>{P(RZ({handler:y,reactEvent:e}))},[P,y]),Y=f(e=>{P(RZ({handler:x,reactEvent:e}))},[P,x]),q=f(e=>{S&&P(UZ(e)),P(RZ({handler:b,reactEvent:e}))},[P,S,b]),G=f(e=>{P(RZ({handler:g,reactEvent:e}))},[P,g]),X=function(e){return e?gJ:wJ}(O);return e.createElement(dU.Provider,{value:A},e.createElement(gx.Provider,{value:T},e.createElement(X,{width:null!=I?I:null==w?void 0:w.width,height:null!=D?D:null==w?void 0:w.height,className:fe("recharts-wrapper",i),style:pJ({position:"relative",cursor:"default",width:I,height:D},w),onClick:R,onContextMenu:U,onDoubleClick:W,onFocus:B,onBlur:F,onKeyDown:$,onMouseDown:K,onMouseEnter:L,onMouseLeave:z,onMouseMove:V,onMouseUp:H,onTouchEnd:G,onTouchMove:q,onTouchStart:Y,ref:_},e.createElement(vJ,null),r)))}),OJ=["width","height","responsive","children","className","style","compact","title","desc"];var SJ=a((t,n)=>{var{width:r,height:i,responsive:o,children:a,className:s,style:l,compact:c,title:u,desc:d}=t,f=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,OJ),p=cx(f);return c?e.createElement(e.Fragment,null,e.createElement(Hj,{width:r,height:i}),e.createElement(dJ,{otherAttributes:p,title:u,desc:d},a)):e.createElement(EJ,{className:s,style:l,width:r,height:i,responsive:null!=o&&o,onClick:t.onClick,onMouseLeave:t.onMouseLeave,onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onContextMenu:t.onContextMenu,onDoubleClick:t.onDoubleClick,onTouchStart:t.onTouchStart,onTouchMove:t.onTouchMove,onTouchEnd:t.onTouchEnd},e.createElement(dJ,{otherAttributes:p,title:u,desc:d,ref:n},e.createElement(lY,null,a)))});function kJ(){return kJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kJ.apply(null,arguments)}function PJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jJ=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PJ(Object(n),!0).forEach(function(t){AJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},GZ),TJ=a(function(t,n){var r,i=wE(t.categoricalChartProps,jJ),{chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=t,u={chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return e.createElement(QZ,{preloadedState:{options:u},reduxStoreName:null!==(r=c.id)&&void 0!==r?r:o},e.createElement(qH,{chartData:c.data}),e.createElement(tJ,{layout:i.layout,margin:i.margin}),e.createElement(rJ,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),e.createElement(nJ,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),e.createElement(SJ,kJ({},i,{ref:n})))}),MJ=["axis"],CJ=a((t,n)=>e.createElement(TJ,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:MJ,tooltipPayloadSearcher:yU,categoricalChartProps:t,ref:n})),NJ=["axis","item"],IJ=a((t,n)=>e.createElement(TJ,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:NJ,tooltipPayloadSearcher:yU,categoricalChartProps:t,ref:n})),DJ=["item"],_J=a((t,n)=>e.createElement(TJ,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:DJ,tooltipPayloadSearcher:yU,categoricalChartProps:t,ref:n})),RJ=["axis"],LJ=a((t,n)=>e.createElement(TJ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:RJ,tooltipPayloadSearcher:yU,categoricalChartProps:t,ref:n}));function zJ(e){var t=e.title,n=e.description,r=e.data,i=e.dataKey,o=e.categoryKey,a=e.color,s=void 0===a?"var(--primary)":a,l=e.className,c=e.loading,u=e.type,d=void 0===u?"area":u;if(c)return N.jsxs(Jb,{className:Dt("col-span-full lg:col-span-2",l),children:[N.jsxs(Qb,{children:[N.jsx(wc,{className:"h-6 w-40 mb-2"}),N.jsx(wc,{className:"h-4 w-64"})]}),N.jsx(nx,{className:"h-75 w-full pt-4",children:N.jsx(wc,{className:"h-full w-full rounded-lg"})})]});return N.jsxs(Jb,{className:Dt("bmj-card-hover col-span-full lg:col-span-2",l),children:[N.jsxs(Qb,{children:[N.jsx(ex,{className:"text-lg font-semibold",children:t}),n&&N.jsx(tx,{children:n})]}),N.jsx(nx,{className:"h-75 w-full pt-4",children:N.jsx(_j,{width:"100%",height:"100%",children:function(){var e={data:r,margin:{top:10,right:10,left:-20,bottom:0}},n={xAxis:N.jsx(ZX,{dataKey:o,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},dy:10,type:"scatter"===d?"number":"category"}),yAxis:N.jsx(uZ,{dataKey:"scatter"===d?i:void 0,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},type:"number"}),grid:N.jsx(XY,{strokeDasharray:"3 3",vertical:!1,stroke:"var(--border)",opacity:.5}),tooltip:N.jsx(BU,{cursor:"scatter"===d?{strokeDasharray:"3 3"}:void 0,contentStyle:{backgroundColor:"var(--card)",borderRadius:"8px",border:"1px solid var(--border)",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",color:"var(--card-foreground)"},itemStyle:{color:"var(--card-foreground)"}})};switch(d){case"bar":return N.jsxs(IJ,I({},e,{children:[n.grid,n.xAxis,n.yAxis,n.tooltip,N.jsx(lX,{dataKey:i,fill:s,radius:[4,4,0,0],barSize:32})]}));case"line":return N.jsxs(CJ,I({},e,{children:[n.grid,n.xAxis,n.yAxis,n.tooltip,N.jsx(zq,{type:"monotone",dataKey:i,stroke:s,strokeWidth:2,dot:{r:4,fill:s,strokeWidth:2,stroke:"var(--card)"},activeDot:{r:6,strokeWidth:0}})]}));case"scatter":return N.jsxs(_J,I({},e,{children:[n.grid,n.xAxis,n.yAxis,n.tooltip,N.jsx(IX,{name:t,data:r,fill:s,shape:"circle"})]}));default:return N.jsxs(LJ,I({},e,{children:[N.jsx("defs",{children:N.jsxs("linearGradient",{id:"colorValue-".concat(t.replace(/\s+/g,"-")),x1:"0",y1:"0",x2:"0",y2:"1",children:[N.jsx("stop",{offset:"5%",stopColor:s,stopOpacity:.1}),N.jsx("stop",{offset:"95%",stopColor:s,stopOpacity:0})]})}),n.grid,n.xAxis,n.yAxis,n.tooltip,N.jsx(bG,{type:"monotone",dataKey:i,stroke:s,strokeWidth:2,fillOpacity:1,fill:"url(#colorValue-".concat(t.replace(/\s+/g,"-"),")")})]}))}}()})})]})}export{nb as AppSidebar,zJ as ChartCard,Zb as DashboardLayout,rx as StatCard,Xb as Topbar};
|
|
2
76
|
//# sourceMappingURL=index.mjs.map
|