bmj-ui 1.0.2 → 1.0.4

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/dist/index.js CHANGED
@@ -1,2 +1,76 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Topbar=exports.StatCard=exports.DashboardLayout=exports.ChartCard=exports.AppSidebar=void 0;const e=require("./components/bmj-ui/AppSidebar");Object.defineProperty(exports,"AppSidebar",{enumerable:!0,get:function(){return e.AppSidebar}});const r=require("./components/bmj-ui/ChartCard");Object.defineProperty(exports,"ChartCard",{enumerable:!0,get:function(){return r.ChartCard}});const t=require("./components/bmj-ui/DashboardLayout");Object.defineProperty(exports,"DashboardLayout",{enumerable:!0,get:function(){return t.DashboardLayout}});const o=require("./components/bmj-ui/StatCard");Object.defineProperty(exports,"StatCard",{enumerable:!0,get:function(){return o.StatCard}});const a=require("./components/bmj-ui/Topbar");Object.defineProperty(exports,"Topbar",{enumerable:!0,get:function(){return a.Topbar}});
1
+ "use strict";var e=require("react"),t=require("react-dom");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var r=n(e),o=n(t);function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a,s={exports:{}},l={};var c,u,d={};
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 f(){return c||(c=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===P?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case m:return"Fragment";case v:return"Profiler";case y:return"StrictMode";case w:return"Suspense";case E:return"SuspenseList";case k:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case h:return"Portal";case b:return e.displayName||"Context";case g:return(e._context.displayName||"Context")+".Consumer";case x:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case S:n=e._payload,e=e._init;try{return t(e(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,o="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.",o),n(e)}}function o(e){if(e===m)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===S)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch(e){return"<...>"}}function i(){return Error("react-stack-top-frame")}function a(){var e=t(this.type);return M[e]||(M[e]=!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!==(e=this.props.ref)?e:null}function s(e,n,o,i,s,c){var d,f=n.children;if(void 0!==f)if(i)if(T(f)){for(i=0;i<f.length;i++)l(f[i]);Object.freeze&&Object.freeze(f)}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(f);if(A.call(n,"key")){f=t(e);var h=Object.keys(n).filter(function(e){return"key"!==e});i=0<h.length?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}",D[f+i]||(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} />',i,f,h,f),D[f+i]=!0)}if(f=null,void 0!==o&&(r(o),f=""+o),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),f=""+n.key),"key"in n)for(var m in o={},n)"key"!==m&&(o[m]=n[m]);else o=n;return f&&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})}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,t,n,r,o,i){var s=n.ref;return e={$$typeof:p,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:o}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,f,o,null===(d=j.A)?null:d.getOwner(),s,c)}function l(e){c(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===S&&("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===p}var u,f=e,p=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),b=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),j=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,T=Array.isArray,C=console.createTask?console.createTask:function(){return null},M={},N=(f={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(f,i)(),I=C(o(i)),D={};d.Fragment=m,d.jsx=function(e,t,n){var r=1e4>j.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,r?Error("react-stack-top-frame"):N,r?C(o(e)):I)},d.jsxs=function(e,t,n){var r=1e4>j.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,r?Error("react-stack-top-frame"):N,r?C(o(e)):I)}}()),d}var p=(u||(u=1,"production"===process.env.NODE_ENV?s.exports=function(){if(a)return l;a=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return l.Fragment=t,l.jsx=n,l.jsxs=n,l}():s.exports=f()),s.exports);function h(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function m(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}"function"==typeof SuppressedError&&SuppressedError;const y={};function v(e,t,n,r,o){let i={...w(e,y)};return t&&(i=g(i,t)),n&&(i=g(i,n)),r&&(i=g(i,r)),i}function g(e,t){return x(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]=m(e.style,r);break;case"className":e[n]=S(e.className,r);break;default:b(n,r)?e[n]=E(e[n],r):e[n]=r}}return e}(e,t)}function b(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return 111===n&&110===r&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}function x(e){return"function"==typeof e}function w(e,t){return x(e)?e(t):e??y}function E(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const r=n;O(r);const o=t(r);return r.baseUIHandlerPrevented||e?.(r),o}const r=t(n);return e?.(n),r}:t:e}function O(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function S(e,t){return t?e?t+" "+e:t:e}const k=function(e,t){return function(n,...r){const o=new URL(e);return o.searchParams.set("code",n.toString()),r.forEach(e=>o.searchParams.append("args[]",e)),`${t} error #${n}; visit ${o} for the full message.`}}("https://base-ui.com/production-error","Base UI"),P={};function j(e,t){const n=r.useRef(P);return n.current===P&&(n.current=e(t)),n}function A(e,t,n,r){const o=j(T).current;return function(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}(o,e,t,n,r)&&C(o,[e,t,n,r]),o.callback}function T(){return{callback:null,cleanup:null,refs:[]}}function C(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 o=t[e];if(null!=o)switch(typeof o){case"function":{const t=o(n);"function"==typeof t&&(r[e]=t);break}case"object":o.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 M=parseInt(r.version,10);function N(e){return M>=e}function I(e){if(!r.isValidElement(e))return null;const t=e,n=t.props;return(N(19)?n?.ref:t.ref)??null}let D;function _(){}"production"!==process.env.NODE_ENV&&(D=new Set);const R=Object.freeze([]),L=Object.freeze({}),z={style:{transition:"none"}},V={fallbackAxisSide:"none"},B={fallbackAxisSide:"end"},F={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function $(t,n,o={}){const i=n.render,a=function(e,t={}){const{className:n,style:r,render:o}=e,{state:i=L,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,d=c?function(e,t){return"function"==typeof e?e(t):e}(r,i):void 0,f=c?function(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const e=t[r](o);null!=e&&Object.assign(n,e);continue}!0===o?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}(i,l):L,p=c?m(f,Array.isArray(s)?function(e){if(0===e.length)return y;if(1===e.length)return w(e[0],y);let t={...w(e[0],y)};for(let n=1;n<e.length;n+=1)t=g(t,e[n]);return t}(s):s)??L:L;"undefined"!=typeof document&&(c?Array.isArray(a)?p.ref=function(e){const t=j(T).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&C(t,e),t.callback}([p.ref,I(o),...a]):p.ref=A(p.ref,I(o),a):A(null,null));if(!c)return L;void 0!==u&&(p.className=S(p.className,u));void 0!==d&&(p.style=m(p.style,d));return p}(n,o);if(!1===o.enabled)return null;return function(t,n,o,i){if(n){if("function"==typeof n)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(" ");D.has(t)||(D.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")}(n),n(o,i);const e=v(o,n.props);e.ref=o.ref;let t=n;if(t?.$$typeof===U){t=r.Children.toArray(n)[0]}if("production"!==process.env.NODE_ENV&&!r.isValidElement(t))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 r.cloneElement(t,e)}if(t&&"string"==typeof t)return function(t,n){if("button"===t)return e.createElement("button",{type:"button",...n,key:n.key});if("img"===t)return e.createElement("img",{alt:"",...n,key:n.key});return r.createElement(t,n)}(t,o);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":k(8))}(t,i,a,o.state??L)}const U=Symbol.for("react.lazy");function W(e){return $(e.defaultTagName??"div",e,e)}function K(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=K(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function H(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=K(e))&&(r&&(r+=" "),r+=t);return r}const Y=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,q=H,G=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return q(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=Y(t)||Y(r);return o[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,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n})?[...e,n,r]:e},[]);return q(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};const X=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Z="-",J=[],Q=e=>{const t=ne(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return te(e);const n=e.split(Z),r=""===n[0]&&n.length>1?1:0;return ee(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],o=n[e];return t?o?((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})(o,t):t:o||J}return n[e]||J}}},ee=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=ee(e,t+1,o);if(n)return n}const i=n.validators;if(null===i)return;const a=0===t?e.join(Z):e.slice(t).join(Z),s=i.length;for(let e=0;e<s;e++){const t=i[e];if(t.validator(a))return t.classGroupId}},te=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})(),ne=e=>{const{theme:t,classGroups:n}=e;return re(n,t)},re=(e,t)=>{const n=X();for(const r in e){const o=e[r];oe(o,n,r,t)}return n},oe=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const o=e[i];ie(o,t,n,r)}},ie=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?le(e,t,n,r):se(e,t,n,r):ae(e,t,n)},ae=(e,t,n)=>{(""===e?t:ce(t,e)).classGroupId=n},se=(e,t,n,r)=>{ue(e)?oe(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},le=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){const[i,a]=o[e];oe(a,ce(t,i),n,r)}},ce=(e,t)=>{let n=e;const r=t.split(Z),o=r.length;for(let e=0;e<o;e++){const t=r[e];let o=n.nextPart.get(t);o||(o=X(),n.nextPart.set(t,o)),n=o}return n},ue=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,de=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(o,i)=>{n[o]=i,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])?(o(e,t),t):void 0},set(e,t){e in n?n[e]=t:o(e,t)}}},fe=[],pe=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),he=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,i=0;const a=e.length;for(let s=0;s<a;s++){const a=e[s];if(0===r&&0===o){if(":"===a){t.push(e.slice(i,s)),i=s+1;continue}if("/"===a){n=s;continue}}"["===a?r++:"]"===a?r--:"("===a?o++:")"===a&&o--}const s=0===t.length?e:e.slice(i);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return pe(t,c,l,n&&n>i?n-i:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):pe(fe,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},me=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let o=0;o<e.length;o++){const i=e[o],a="["===i[0],s=t.has(i);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(i)):r.push(i)}return r.length>0&&(r.sort(),n.push(...r)),n}},ye=/\s+/,ve=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ve(e[r]))&&(n&&(n+=" "),n+=t);return n},ge=(e,...t)=>{let n,r,o,i;const a=e=>{const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(ye);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 y=0===u.length?"":1===u.length?u[0]:i(u).join(":"),v=d?y+"!":y,g=v+m;if(a.indexOf(g)>-1)continue;a.push(g);const b=o(m,h);for(let e=0;e<b.length;++e){const t=b[e];a.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,i),i};return i=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:de(e.cacheSize),parseClassName:he(e),sortModifiers:me(e),...Q(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)},(...e)=>i(((...e)=>{let t,n,r=0,o="";for(;r<e.length;)(t=e[r++])&&(n=ve(t))&&(o&&(o+=" "),o+=n);return o})(...e))},be=[],xe=e=>{const t=t=>t[e]||be;return t.isThemeGetter=!0,t},we=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ee=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Oe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Se=/^(\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$/,Pe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,je=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ae=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Te=e=>Oe.test(e),Ce=e=>!!e&&!Number.isNaN(Number(e)),Me=e=>!!e&&Number.isInteger(Number(e)),Ne=e=>e.endsWith("%")&&Ce(e.slice(0,-1)),Ie=e=>Se.test(e),De=()=>!0,_e=e=>ke.test(e)&&!Pe.test(e),Re=()=>!1,Le=e=>je.test(e),ze=e=>Ae.test(e),Ve=e=>!Fe(e)&&!Ge(e),Be=e=>rt(e,st,Re),Fe=e=>we.test(e),$e=e=>rt(e,lt,_e),Ue=e=>rt(e,ct,Ce),We=e=>rt(e,dt,De),Ke=e=>rt(e,ut,Re),He=e=>rt(e,it,Re),Ye=e=>rt(e,at,ze),qe=e=>rt(e,ft,Le),Ge=e=>Ee.test(e),Xe=e=>ot(e,lt),Ze=e=>ot(e,ut),Je=e=>ot(e,it),Qe=e=>ot(e,st),et=e=>ot(e,at),tt=e=>ot(e,ft,!0),nt=e=>ot(e,dt,!0),rt=(e,t,n)=>{const r=we.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},ot=(e,t,n=!1)=>{const r=Ee.exec(e);return!!r&&(r[1]?t(r[1]):n)},it=e=>"position"===e||"percentage"===e,at=e=>"image"===e||"url"===e,st=e=>"length"===e||"size"===e||"bg-size"===e,lt=e=>"length"===e,ct=e=>"number"===e,ut=e=>"family-name"===e,dt=e=>"number"===e||"weight"===e,ft=e=>"shadow"===e,pt=ge(()=>{const e=xe("color"),t=xe("font"),n=xe("text"),r=xe("font-weight"),o=xe("tracking"),i=xe("leading"),a=xe("breakpoint"),s=xe("container"),l=xe("spacing"),c=xe("radius"),u=xe("shadow"),d=xe("inset-shadow"),f=xe("text-shadow"),p=xe("drop-shadow"),h=xe("blur"),m=xe("perspective"),y=xe("aspect"),v=xe("ease"),g=xe("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ge,Fe],x=()=>[Ge,Fe,l],w=()=>[Te,"full","auto",...x()],E=()=>[Me,"none","subgrid",Ge,Fe],O=()=>["auto",{span:["full",Me,Ge,Fe]},Me,Ge,Fe],S=()=>[Me,"auto",Ge,Fe],k=()=>["auto","min","max","fr",Ge,Fe],P=()=>["auto",...x()],j=()=>[Te,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],A=()=>[Te,"screen","full","dvw","lvw","svw","min","max","fit",...x()],T=()=>[Te,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],C=()=>[e,Ge,Fe],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Je,He,{position:[Ge,Fe]}],N=()=>["auto","cover","contain",Qe,Be,{size:[Ge,Fe]}],I=()=>[Ne,Xe,$e],D=()=>["","none","full",c,Ge,Fe],_=()=>["",Ce,Xe,$e],R=()=>[Ce,Ne,Je,He],L=()=>["","none",h,Ge,Fe],z=()=>["none",Ce,Ge,Fe],V=()=>["none",Ce,Ge,Fe],B=()=>[Ce,Ge,Fe],F=()=>[Te,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ie],breakpoint:[Ie],color:[De],container:[Ie],"drop-shadow":[Ie],ease:["in","out","in-out"],font:[Ve],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ie],shadow:[Ie],spacing:["px",Ce],text:[Ie],"text-shadow":[Ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Te,Fe,Ge,y]}],container:["container"],columns:[{columns:[Ce,Fe,Ge,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:[Me,"auto",Ge,Fe]}],basis:[{basis:[Te,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Te,"auto","initial","none",Fe]}],grow:[{grow:["",Ce,Ge,Fe]}],shrink:[{shrink:["",Ce,Ge,Fe]}],order:[{order:[Me,"first","last","none",Ge,Fe]}],"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:j()}],"inline-size":[{inline:["auto",...A()]}],"min-inline-size":[{"min-inline":["auto",...A()]}],"max-inline-size":[{"max-inline":["none",...A()]}],"block-size":[{block:["auto",...T()]}],"min-block-size":[{"min-block":["auto",...T()]}],"max-block-size":[{"max-block":["none",...T()]}],w:[{w:[s,"screen",...j()]}],"min-w":[{"min-w":[s,"screen","none",...j()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,Xe,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,nt,We]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ne,Fe]}],"font-family":[{font:[Ze,Ke,t]}],"font-features":[{"font-features":[Fe]}],"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:[o,Ge,Fe]}],"line-clamp":[{"line-clamp":[Ce,"none",Ge,Ue]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",Ge,Fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ge,Fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",Ge,$e]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[Ce,"auto",Ge,Fe]}],"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",Ge,Fe]}],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",Ge,Fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"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"]},Me,Ge,Fe],radial:["",Ge,Fe],conic:[Me,Ge,Fe]},et,Ye]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],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:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,Ge,Fe]}],"outline-w":[{outline:["",Ce,Xe,$e]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,tt,qe]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,tt,qe]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[Ce,$e]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":_()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,tt,qe]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[Ce,Ge,Fe]}],"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":[Ce]}],"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":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"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":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"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":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"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":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"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":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"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":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"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":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Ge,Fe]}],"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":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":[Ce]}],"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":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ge,Fe]}],filter:[{filter:["","none",Ge,Fe]}],blur:[{blur:L()}],brightness:[{brightness:[Ce,Ge,Fe]}],contrast:[{contrast:[Ce,Ge,Fe]}],"drop-shadow":[{"drop-shadow":["","none",p,tt,qe]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",Ce,Ge,Fe]}],"hue-rotate":[{"hue-rotate":[Ce,Ge,Fe]}],invert:[{invert:["",Ce,Ge,Fe]}],saturate:[{saturate:[Ce,Ge,Fe]}],sepia:[{sepia:["",Ce,Ge,Fe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ge,Fe]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,Ge,Fe]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,Ge,Fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,Ge,Fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,Ge,Fe]}],"backdrop-invert":[{"backdrop-invert":["",Ce,Ge,Fe]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,Ge,Fe]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,Ge,Fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,Ge,Fe]}],"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",Ge,Fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",Ge,Fe]}],ease:[{ease:["linear","initial",v,Ge,Fe]}],delay:[{delay:[Ce,Ge,Fe]}],animate:[{animate:["none",g,Ge,Fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ge,Fe]}],"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:[Ge,Fe,"","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:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",Ge,Fe]}],"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",Ge,Fe]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[Ce,Xe,$e,Ue]}],stroke:[{stroke:["none",...C()]}],"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 ht(...e){return pt(H(e))}function mt(){return"undefined"!=typeof window}function yt(e){return bt(e)?(e.nodeName||"").toLowerCase():"#document"}function vt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function gt(e){var t;return null==(t=(bt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function bt(e){return!!mt()&&(e instanceof Node||e instanceof vt(e).Node)}function xt(e){return!!mt()&&(e instanceof Element||e instanceof vt(e).Element)}function wt(e){return!!mt()&&(e instanceof HTMLElement||e instanceof vt(e).HTMLElement)}function Et(e){return!(!mt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof vt(e).ShadowRoot)}function Ot(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=It(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function St(e){return/^(table|td|th)$/.test(yt(e))}function kt(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Pt=/transform|translate|scale|rotate|perspective|filter/,jt=/paint|layout|strict|content/,At=e=>!!e&&"none"!==e;let Tt;function Ct(e){const t=xt(e)?It(e):e;return At(t.transform)||At(t.translate)||At(t.scale)||At(t.rotate)||At(t.perspective)||!Mt()&&(At(t.backdropFilter)||At(t.filter))||Pt.test(t.willChange||"")||jt.test(t.contain||"")}function Mt(){return null==Tt&&(Tt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Tt}function Nt(e){return/^(html|body|#document)$/.test(yt(e))}function It(e){return vt(e).getComputedStyle(e)}function Dt(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if("html"===yt(e))return e;const t=e.assignedSlot||e.parentNode||Et(e)&&e.host||gt(e);return Et(t)?t.host:t}function Rt(e){const t=_t(e);return Nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&Ot(t)?t:Rt(t)}function Lt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Rt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=vt(o);if(i){const e=zt(a);return t.concat(a,a.visualViewport||[],Ot(o)?o:[],e&&n?Lt(e):[])}return t.concat(o,Lt(o,[],n))}function zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Vt=r[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Bt=Vt&&Vt!==r.useLayoutEffect?Vt:e=>e();function Ft(e){const t=j($t).current;return t.next=e,Bt(t.effect),t.trampoline}function $t(){const e={next:void 0,callback:Ut,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ut(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}let Wt;function Kt(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");Wt.has(t)||(Wt.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(Wt=new Set);const Ht={...r},Yt="undefined"!=typeof document?r.useLayoutEffect:()=>{},qt=r.createContext(void 0);function Gt(e=!1){const t=r.useContext(qt);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":k(16));return t}function Xt(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:i=!0,composite:a}=e,s=r.useRef(null),l=Gt(!0),c=a??void 0!==l,{props:u}=function(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:i=0,isNativeButton:a}=e,s=o&&!1!==t,l=o&&!1===t;return{props:r.useMemo(()=>{const e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return o||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||s)||!a&&n)&&(e["aria-disabled"]=n),!a||t&&!l||(e.disabled=n),e},[o,n,t,s,l,a,i])}}({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:o,isNativeButton:i});"production"!==process.env.NODE_ENV&&r.useEffect(()=>{if(!s.current)return;const e=Zt(s.current);if(i){if(!e){Kt(`${"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`."}${Ht.captureOwnerStack?.()||""}`)}}else if(e){Kt(`${"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`."}${Ht.captureOwnerStack?.()||""}`)}},[i]);const d=r.useCallback(()=>{const e=s.current;Zt(e)&&c&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,c]);Yt(d,[d]);return{getButtonProps:r.useCallback((e={})=>{const{onClick:n,onMouseDown:r,onKeyUp:o,onKeyDown:a,onPointerDown:s,...l}=e;return v({type:i?"button":void 0,onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t)return;if(O(e),a?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,o=e.currentTarget,s=Zt(o),l=!i&&(u=o,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(i?s:!l),f="Enter"===e.key,p=" "===e.key,h=o.getAttribute("role"),m=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&c&&p){if(e.defaultPrevented&&m)return;return e.preventDefault(),void(l||i&&s?(o.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler()))}d&&(i||!p&&!f||e.preventDefault(),!i&&f&&n?.(e))},onKeyUp(e){t||(O(e),o?.(e),e.target===e.currentTarget&&i&&c&&Zt(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||" "!==e.key||n?.(e))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?void 0:{role:"button"},u,l)},[t,u,c,i]),buttonRef:Ft(e=>{s.current=e,d()})}}function Zt(e){return wt(e)&&"BUTTON"===e.tagName}"production"!==process.env.NODE_ENV&&(qt.displayName="CompositeRootContext");const Jt=r.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,focusableWhenDisabled:i=!1,nativeButton:a=!0,...s}=e,{getButtonProps:l,buttonRef:c}=Xt({disabled:o,focusableWhenDisabled:i,native:a});return $("button",e,{state:{disabled:o},ref:[t,c],props:[s,l]})});"production"!==process.env.NODE_ENV&&(Jt.displayName="Button");const Qt=G("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 en(e){var{className:t,variant:n="default",size:r="default"}=e,o=h(e,["className","variant","size"]);return p.jsx(Jt,Object.assign({"data-slot":"button",className:ht(Qt({variant:n,size:r,className:t}))},o))}let tn=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 nn={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},rn={disabled:!1,...nn},on={valid:e=>null===e?null:e?{[tn.valid]:""}:{[tn.invalid]:""}},an=r.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:_,disabled:void 0,touched:nn.touched,setTouched:_,dirty:nn.dirty,setDirty:_,filled:nn.filled,setFilled:_,focused:nn.focused,setFocused:_,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:rn,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=L)=>e,getInputValidationProps:(e=L)=>e,inputRef:{current:null},commit:async()=>{}}});function sn(e=!0){const t=r.useContext(an);if(t.setValidityData===_&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":k(28));return t}"production"!==process.env.NODE_ENV&&(an.displayName="FieldRootContext");const ln=r.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:_,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});"production"!==process.env.NODE_ENV&&(ln.displayName="FormContext");let cn=0;const un=Ht.useId;function dn(e,t){if(void 0!==un){const n=un();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[n,o]=r.useState(e),i=e||n;return r.useEffect(()=>{null==n&&(cn+=1,o(`${t}-${cn}`))},[n,t]),i}(e,t)}function fn(e){return dn(e,"base-ui")}const pn=r.createContext({controlId:void 0,registerControlId:_,labelId:void 0,setLabelId:_,messageIds:[],setMessageIds:_,getDescriptionProps:e=>e});function hn(){return r.useContext(pn)}"production"!==process.env.NODE_ENV&&(pn.displayName="LabelableContext");const mn=[];function yn(e){r.useEffect(e,mn)}class vn{static create(){return new vn}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 gn(){const e=j(vn.create).current;return yn(e.disposeEffect),e}function bn(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function xn(e){return e?.ownerDocument||document}const wn="undefined"!=typeof navigator,En=function(){if(!wn)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}}(),On=function(){if(!wn)return"";const e=navigator.userAgentData;if(e?.platform)return e.platform;return navigator.platform??""}(),Sn=function(){if(!wn)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"),Pn="MacIntel"===En.platform&&En.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(En.platform),jn=wn&&/apple/i.test(navigator.vendor),An=wn&&/android/i.test(On)||/android/i.test(Sn),Tn=wn&&On.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Cn=Sn.includes("jsdom/");const Mn="data-base-ui-focusable",Nn="active",In="selected",Dn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",_n="ArrowLeft",Rn="ArrowRight",Ln="ArrowUp",zn="ArrowDown";function Vn(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function Bn(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Et(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Fn(e,t){if(!xt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,e]of t.entries())if(Bn(e,n))return!e.hasAttribute("data-trigger-disabled");return!1}function $n(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Un(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 Wn(e){return wt(e)&&e.matches(Dn)}function Kn(e){return!!e&&("combobox"===e.getAttribute("role")&&Wn(e))}function Hn(e){return e?e.hasAttribute(Mn)?e:e.querySelector(`[${Mn}]`)||e:null}function Yn(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Yn(e,t.id,n)])}function qn(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 Gn(e){e.preventDefault(),e.stopPropagation()}function Xn(e){return!(""!==e.pointerType||!e.isTrusted)||(An&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Zn(e){return!Cn&&(!An&&0===e.width&&0===e.height||An&&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 Jn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Qn(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}const er=["top","right","bottom","left"],tr=Math.min,nr=Math.max,rr=Math.round,or=Math.floor,ir=e=>({x:e,y:e}),ar={left:"right",right:"left",bottom:"top",top:"bottom"};function sr(e,t,n){return nr(e,tr(t,n))}function lr(e,t){return"function"==typeof e?e(t):e}function cr(e){return e.split("-")[0]}function ur(e){return e.split("-")[1]}function dr(e){return"x"===e?"y":"x"}function fr(e){return"y"===e?"height":"width"}function pr(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function hr(e){return dr(pr(e))}function mr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const yr=["left","right"],vr=["right","left"],gr=["top","bottom"],br=["bottom","top"];function xr(e,t,n,r){const o=ur(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?vr:yr:t?yr:vr;case"left":case"right":return t?gr:br;default:return[]}}(cr(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(mr)))),i}function wr(e){const t=cr(e);return ar[t]+e.slice(t.length)}function Er(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 Or(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Sr(e,t,n){return Math.floor(e/t)!==n}function kr(e,t){return t<0||t>=e.current.length}function Pr(e,t){return Ar(e,{disabledIndices:t})}function jr(e,t){return Ar(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ar(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do{i+=n?-o:o}while(i>=0&&i<=e.current.length-1&&Mr(e,i,r));return i}function Tr(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function Cr(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Mr(e,t,n){if("function"==typeof n?n(t):n?.includes(t)??!1)return!0;const r=e.current[t];return!!r&&(!Nr(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function Nr(e){return"none"!==It(e).display}
11
+ /*!
12
+ * tabbable 6.4.0
13
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
14
+ */var Ir=["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(","),Dr="undefined"==typeof Element,_r=Dr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rr=!Dr&&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},Lr=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]"):Lr(e.parentNode))},zr=function(e,t,n){if(Lr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ir));return t&&_r.call(e,Ir)&&r.unshift(e),r=r.filter(n)},Vr=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Lr(i,!1))if("SLOT"===i.tagName){var a=i.assignedElements(),s=a.length?a:i.children,l=Vr(s,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{_r.call(i,Ir)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!Lr(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=Vr(!0===c?i.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:i,candidates:d})}else o.unshift.apply(o,i.children)}}return r},Br=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Fr=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))&&!Br(e)?0:e.tabIndex},$r=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ur=function(e){return"INPUT"===e.tagName},Wr=function(e){return function(e){return Ur(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Rr(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 o=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!o||o===e}(e)},Kr=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Hr=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 o=_r.call(e,"details>summary:first-of-type")?e.parentElement:e;if(_r.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Kr(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=Rr(e);if(a&&!a.shadowRoot&&!0===r(a))return Kr(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&Rr(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=Rr(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},Yr=function(e,t){return!(t.disabled||function(e){return Ur(e)&&"hidden"===e.type}(t)||Hr(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!!_r.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},qr=function(e,t){return!(Wr(t)||Fr(t)<0||!Yr(e,t))},Gr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Xr=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,a=function(e,t){var n=Fr(e);return n<0&&t&&!Br(e)?0:n}(i,o),s=o?Xr(e.candidates):i;0===a?o?t.push.apply(t,s):t.push(i):n.push({documentOrder:r,tabIndex:a,item:e,isScope:o,content:s})}),n.sort($r).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Zr=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Vr([e],t.includeContainer,{filter:qr.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Gr}):zr(e,t.includeContainer,qr.bind(null,t)),Xr(n)},Jr=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==_r.call(e,Ir)&&qr(t,e)};const Qr=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eo(e,t){const n=Zr(e,Qr()),r=n.length;if(0===r)return;const o=Vn(xn(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function to(e){return eo(xn(e).body,1)||e}function no(e){return eo(xn(e).body,-1)||e}function ro(e,t){if(!e)return null;const n=Zr(xn(e).body,Qr()),r=n.length;if(0===r)return null;const o=n.indexOf(e);if(-1===o)return null;return n[(o+t+r)%r]}function oo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bn(n,r)}function io(e){Zr(e,Qr()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function ao(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 so=null;let lo=globalThis.requestAnimationFrame;const co=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&&lo!==requestAnimationFrame&&(lo=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 uo{static create(){return new uo}static request(e){return co.request(e)}static cancel(e){return co.cancel(e)}currentId=so;request(e){this.cancel(),this.currentId=co.request(()=>{this.currentId=so,e()})}cancel=()=>{this.currentId!==so&&(co.cancel(this.currentId),this.currentId=so)};disposeEffect=()=>this.cancel}function fo(){const e=j(uo.create).current;return yn(e.disposeEffect),e}function po(e){return null==e?e:"current"in e?e.current:e}let ho=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const mo={[ho.startingStyle]:""},yo={[ho.endingStyle]:""},vo={transitionStatus:e=>"starting"===e?mo:"ending"===e?yo:null};function go(e,t=!1,n=!0){const r=fo();return Ft((i,a=null)=>{function s(){o.flushSync(i)}r.cancel();const l=po(e);if(null==l)return;const c=l;if("function"!=typeof c.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function u(){const e=ho.startingStyle;if(!c.hasAttribute(e))return void r.request(d);const t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),d())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener("abort",()=>t.disconnect(),{once:!0})}function d(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||s()}).catch(()=>{const e=c.getAnimations();if(n){if(a?.aborted)return;s()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&d()})}if(t)return void u();r.request(d)}})}function bo(e){const{enabled:t=!0,open:n,ref:o,onComplete:i}=e,a=Ft(i),s=go(o,n,!1);r.useEffect(()=>{if(!t)return;const e=new AbortController;return s(a,e.signal),()=>{e.abort()}},[t,n,a,s])}function xo(e){const{enabled:t=!0,value:n,id:i,name:a,controlRef:s,commit:l}=e,{formRef:c}=r.useContext(ln),{invalid:u,markedDirtyRef:d,validityData:f,setValidityData:p}=sn(),h=Ft(e.getValue);Yt(()=>{if(!t)return;let e=n;void 0===e&&(e=h()),null===f.initialValue&&null!==e&&p(t=>({...t,initialValue:e}))},[t,p,n,f.initialValue,h]),Yt(()=>{t&&i&&c.current.fields.set(i,{getValue:h,name:a,controlRef:s,validityData:bn(f,u),validate(e=!0){let t=n;void 0===t&&(t=h()),d.current=!0,e?o.flushSync(()=>l(t)):l(t)}})},[l,s,t,c,h,i,u,d,a,f,n]),Yt(()=>{const e=c.current.fields;return()=>{i&&e.delete(i)}},[c,i])}const wo="none",Eo="trigger-press",Oo="trigger-hover",So="trigger-focus",ko="outside-press",Po="item-press",jo="focus-out",Ao="escape-key",To="list-navigation",Co="sibling-open",Mo="imperative-action";function No(e,t,n,r){let o=!1,i=!1;const a=L;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}const Io=r.forwardRef(function(e,t){const{render:n,className:o,id:i,name:a,value:s,disabled:l=!1,onValueChange:c,defaultValue:u,autoFocus:d=!1,...f}=e,{state:p,name:h,disabled:m,setTouched:y,setDirty:v,validityData:g,setFocused:b,setFilled:x,validationMode:w,validation:E}=sn(),O=m||l,S=h??a,k={...p,disabled:O},{labelId:P}=hn(),A=function(e={}){const{id:t,implicit:n=!1,controlRef:o}=e,{controlId:i,registerControlId:a}=hn(),s=fn(t),l=n?i:void 0,c=j(()=>Symbol("labelable-control")),u=r.useRef(!1),d=r.useRef(null!=t),f=Ft(()=>{u.current&&a!==_&&(u.current=!1,a(c.current,void 0))});return Yt(()=>{if(a===_)return;let e;if(n){const n=o?.current;e=xt(n)&&null!=n.closest("label")?t??null:l??s}else if(null!=t)d.current=!0,e=t;else{if(!d.current)return void f();e=s}void 0!==e?(u.current=!0,a(c.current,e)):f()},[t,o,l,a,n,s,c,f]),r.useEffect(()=>f,[f]),i??s}({id:i});Yt(()=>{const e=null!=s;E.inputRef.current?.value||e&&""!==s?x(!0):e&&""===s&&x(!1)},[E.inputRef,x,s]);const T=r.useRef(null);Yt(()=>{d&&T.current===Vn(xn(T.current))&&b(!0)},[d,b]);const[C]=function({controlled:e,default:t,name:n,state:o="value"}){const{current:i}=r.useRef(void 0!==e),[a,s]=r.useState(t),l=i?e:a;if("production"!==process.env.NODE_ENV){r.useEffect(()=>{i!==(void 0!==e)&&console.error([`Base UI: A component is changing the ${i?"":"un"}controlled ${o} state of ${n} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} 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"))},[o,n,e]);const{current:a}=r.useRef(t);r.useEffect(()=>{i||JSON.stringify(a)===JSON.stringify(t)||console.error([`Base UI: A component is changing the default ${o} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join("\n"))},[JSON.stringify(t)])}return[l,r.useCallback(e=>{i||s(e)},[])]}({controlled:s,default:u,name:"FieldControl",state:"value"}),M=void 0!==s,N=M?C:void 0;xo({id:A,name:S,commit:E.commit,value:N,getValue:()=>E.inputRef.current?.value,controlRef:E.inputRef});return $("input",e,{ref:[t,T],state:k,props:[{id:A,disabled:O,name:S,ref:E.inputRef,"aria-labelledby":P,autoFocus:d,...M?{value:N}:{defaultValue:u},onChange(e){const t=e.currentTarget.value;c?.(t,No(wo,e.nativeEvent)),v(t!==g.initialValue),x(""!==t)},onFocus(){b(!0)},onBlur(e){y(!0),b(!1),"onBlur"===w&&E.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(y(!0),E.commit(e.currentTarget.value))}},E.getInputValidationProps(),f],stateAttributesMapping:on})});"production"!==process.env.NODE_ENV&&(Io.displayName="FieldControl");const Do=r.forwardRef(function(e,t){return p.jsx(Io,{ref:t,...e})});function _o(e){var{className:t,type:n}=e,r=h(e,["className","type"]);return p.jsx(Do,Object.assign({type:n,"data-slot":"input",className:ht("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&&(Do.displayName="Input");const Ro=r.forwardRef(function(e,t){const{className:n,render:r,orientation:o="horizontal",...i}=e;return $("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});"production"!==process.env.NODE_ENV&&(Ro.displayName="Separator");const Lo=r.createContext(void 0);function zo(e){const t=r.useContext(Lo);if(!1===e&&void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":k(27));return t}"production"!==process.env.NODE_ENV&&(Lo.displayName="DialogRootContext");let Vo=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ho.startingStyle]="startingStyle",e[e.endingStyle=ho.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),Bo=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const Fo={[Bo.popupOpen]:""},$o={[Bo.popupOpen]:"",[Bo.pressed]:""},Uo={[Vo.open]:""},Wo={[Vo.closed]:""},Ko={[Vo.anchorHidden]:""},Ho={open:e=>e?Fo:null},Yo={open:e=>e?$o:null},qo={open:e=>e?Uo:Wo,anchorHidden:e=>e?Ko:null},Go={...qo,...vo},Xo=r.forwardRef(function(e,t){const{render:n,className:r,forceRender:o=!1,...i}=e,{store:a}=zo(),s=a.useState("open"),l=a.useState("nested"),c=a.useState("mounted");return $("div",e,{state:{open:s,transitionStatus:a.useState("transitionStatus")},ref:[a.context.backdropRef,t],stateAttributesMapping:Go,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:o||!l})});"production"!==process.env.NODE_ENV&&(Xo.displayName="DialogBackdrop");const Zo=r.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...a}=e,{store:s}=zo(),l=s.useState("open");const{getButtonProps:c,buttonRef:u}=Xt({disabled:o,native:i});return $("button",e,{state:{disabled:o},ref:[t,u],props:[{onClick:function(e){l&&s.setOpen(!1,No("close-press",e.nativeEvent))}},a,c]})});"production"!==process.env.NODE_ENV&&(Zo.displayName="DialogClose");const Jo=r.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{store:a}=zo(),s=fn(o);return a.useSyncedValueWithCleanup("descriptionElementId",s),$("p",e,{ref:t,props:[{id:s},i]})});function Qo(e,t,n){const r=function(e,t){return null==t||Jn(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function ei(e){return"function"==typeof e?e():e}function ti(e,t){return t||"click"===e||"mousedown"===e}"production"!==process.env.NODE_ENV&&(Jo.displayName="DialogDescription");const ni=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new vn,currentIdRef:{current:null},currentContextRef:{current:null}});function ri(e){const t=j(oi,e).current;return t.next=e,Yt(t.effect),t}function oi(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}"production"!==process.env.NODE_ENV&&(ni.displayName="FloatingDelayGroupContext");const ii={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1,position:"fixed",top:0,left:0},ai=r.forwardRef(function(e,t){const[n,o]=r.useState();Yt(()=>{jn&&o("button")},[]);const i={tabIndex:0,role:n};return p.jsx("span",{...e,ref:t,style:ii,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":""})});function si(e){return`data-base-ui-${e}`}"production"!==process.env.NODE_ENV&&(ai.displayName="FocusGuard");let li=0;function ci(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(li);const i=()=>e?.focus({preventScroll:n});o?i():li=requestAnimationFrame(i)}const ui={inert:new WeakMap,"aria-hidden":new WeakMap},di="data-base-ui-inert",fi={inert:new WeakSet,"aria-hidden":new WeakSet};let pi=new WeakMap,hi=0;function mi(e){return e?Et(e)?e.host:mi(e.parentNode):null}const yi=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=mi(t);return e.contains(n)?n:null}).filter(e=>null!=e),vi=e=>{const t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},gi=(e,t,n)=>{const r=[],o=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{"script"!==yt(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function bi(e,t,n,r,{mark:o=!0,markerIgnoreElements:i=[]}){const a=r?"inert":n?"aria-hidden":null;let s=null,l=null;const c=yi(t,e),u=o?yi(t,i):[],d=new Set(u),f=o?gi(t,vi(c),new Set(c)).filter(e=>!d.has(e)):[],p=[],h=[];if(a){const e=ui[a],n=function(e){return fi[e]}(a);l=n,s=e;const r=yi(t,Array.from(t.querySelectorAll("[aria-live]"))),o=c.concat(r);gi(t,vi(o),new Set(o)).forEach(t=>{const r=t.getAttribute(a),o=null!==r&&"false"!==r,i=(e.get(t)||0)+1;e.set(t,i),p.push(t),1===i&&o&&n.add(t),o||t.setAttribute(a,"inert"===a?"":"true")})}return o&&f.forEach(e=>{const t=(pi.get(e)||0)+1;pi.set(e,t),h.push(e),1===t&&e.setAttribute(di,"")}),hi+=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))}),o&&h.forEach(e=>{const t=(pi.get(e)||0)-1;pi.set(e,t),t||e.removeAttribute(di)}),hi-=1,hi||(ui.inert=new WeakMap,ui["aria-hidden"]=new WeakMap,fi.inert=new WeakSet,fi["aria-hidden"]=new WeakSet,pi=new WeakMap)}}function xi(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:i=[]}=t;return bi(e,xn(e[0]).body,n,r,{mark:o,markerIgnoreElements:i})}const wi=r.createContext(null);"production"!==process.env.NODE_ENV&&(wi.displayName="PortalContext");const Ei=()=>r.useContext(wi),Oi=si("portal");function Si(e={}){const{ref:t,container:n,componentProps:i=L,elementProps:a}=e,s=dn(),l=Ei(),c=l?.portalNode,[u,d]=r.useState(null),[f,p]=r.useState(null),h=Ft(e=>{null!==e&&p(e)}),m=r.useRef(null);Yt(()=>{if(null===n)return void(m.current&&(m.current=null,p(null),d(null)));if(null==s)return;const e=(n&&(bt(n)?n:n.current))??c??document.body;null!=e?m.current!==e&&(m.current=e,p(null),d(e)):m.current&&(m.current=null,p(null),d(null))},[n,c,s]);const y=$("div",i,{ref:[t,h],props:[{id:s,[Oi]:""},a]});return{portalNode:f,portalSubtree:u&&y?o.createPortal(y,u):null}}const ki=r.forwardRef(function(e,t){const{children:n,container:i,className:a,render:s,renderGuards:l,...c}=e,{portalNode:u,portalSubtree:d}=Si({container:i,ref:t,componentProps:e,elementProps:c}),f=r.useRef(null),h=r.useRef(null),m=r.useRef(null),y=r.useRef(null),[v,g]=r.useState(null),b=v?.modal,x=v?.open,w="boolean"==typeof l?l:!!v&&!v.modal&&v.open&&!!u;r.useEffect(()=>{if(u&&!b)return u.addEventListener("focusin",e,!0),u.addEventListener("focusout",e,!0),()=>{u.removeEventListener("focusin",e,!0),u.removeEventListener("focusout",e,!0)};function e(e){if(u&&e.relatedTarget&&oo(e)){("focusin"===e.type?ao:io)(u)}}},[u,b]),r.useEffect(()=>{u&&!x&&ao(u)},[x,u]);const E=r.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:h,beforeInsideRef:m,afterInsideRef:y,portalNode:u,setFocusManagerState:g}),[u]);return p.jsxs(r.Fragment,{children:[d,p.jsxs(wi.Provider,{value:E,children:[w&&u&&p.jsx(ai,{"data-type":"outside",ref:f,onFocus:e=>{if(oo(e,u))m.current?.focus();else{const e=no(v?v.domReference:null);e?.focus()}}}),w&&u&&p.jsx("span",{"aria-owns":u.id,style:F}),u&&o.createPortal(n,u),w&&u&&p.jsx(ai,{"data-type":"outside",ref:h,onFocus:e=>{if(oo(e,u))y.current?.focus();else{const t=to(v?v.domReference:null);t?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,No(jo,e.nativeEvent))}}})]})]})});function Pi(){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&&(ki.displayName="FloatingPortal");class ji{nodesRef={current:[]};events=Pi();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 Ai=r.createContext(null);"production"!==process.env.NODE_ENV&&(Ai.displayName="FloatingNodeContext");const Ti=r.createContext(null);"production"!==process.env.NODE_ENV&&(Ti.displayName="FloatingTreeContext");const Ci=()=>r.useContext(Ai)?.id||null,Mi=e=>{const t=r.useContext(Ti);return e??t};function Ni(e){const t=dn(),n=Mi(e),r=Ci();return Yt(()=>{if(!t)return;const e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Ii(e){const{children:t,id:n}=e,o=Ci();return p.jsx(Ai.Provider,{value:r.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function Di(e){const{children:t,externalTree:n}=e,r=j(()=>n??new ji).current;return p.jsx(Ti.Provider,{value:r,children:t})}let _i=[];function Ri(){_i=_i.filter(e=>e.deref()?.isConnected)}function Li(){return Ri(),_i[_i.length-1]?.deref()}function zi(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Qr(),r=function(e,t){return(t=t||{}).getShadowRoot?Vr([e],t.includeContainer,{filter:Yr.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):zr(e,t.includeContainer,Yr.bind(null,t))}(e,n),o=r.filter(e=>{const t=e.getAttribute("data-tabindex")||"";return Jr(e,n)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||0===o.length?"0"!==i&&e.setAttribute("tabindex","0"):("-1"!==i||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Vi(e){const{context:t,children:n,disabled:o=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:s=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:h,externalTree:m,getInsideElements:y}=e,v="rootStore"in t?t.rootStore:t,g=v.useState("open"),b=v.useState("domReferenceElement"),x=v.useState("floatingElement"),{events:w,dataRef:E}=v.context,O=Ft(()=>E.current.floatingContext?.nodeId),S=!1===i,k=Kn(b)&&S,P=r.useRef(["content"]),j=ri(i),T=ri(a),C=ri(u),M=Mi(m),N=Ei(),I=r.useRef(!1),D=r.useRef(!1),_=r.useRef(!1),R=r.useRef(-1),L=r.useRef(""),z=r.useRef(""),V=r.useRef(null),B=r.useRef(null),F=A(V,h,N?.beforeInsideRef),$=A(B,N?.afterInsideRef),U=gn(),W=gn(),K=fo(),H=null!=N,Y=Hn(x),q=Ft((e=Y)=>e?Zr(e,Qr()):[]),G=Ft(()=>y?.().filter(e=>null!=e)??[]),X=Ft(e=>{const t=q(e);return P.current.map(()=>t).filter(Boolean).flat()});r.useEffect(()=>{if(o||!l)return;function e(e){"Tab"===e.key&&Bn(Y,Vn(xn(Y)))&&0===q().length&&!k&&Gn(e)}const t=xn(Y);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,b,Y,l,P,k,q,X]),r.useEffect(()=>{if(o||!g)return;const e=xn(Y);function t(){_.current=!1}function n(e){const t=$n(e),n=G(),r=Bn(x,t)||Bn(b,t)||Bn(N?.portalNode,t)||n.some(e=>e===t||Bn(e,t));_.current=!r,z.current=e.pointerType||"keyboard",t?.closest("[data-base-ui-click-trigger]")&&(D.current=!0)}function r(){z.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)}},[o,x,b,Y,g,N,G]),r.useEffect(()=>{if(o||!c)return;const e=xn(Y);function t(){D.current=!0,W.start(0,()=>{D.current=!1})}function n(e){const t=$n(e),n=q().indexOf(t);-1!==n&&(R.current=n)}function r(t){const n=t.relatedTarget,r=t.currentTarget,o=$n(t);queueMicrotask(()=>{const i=O(),a=v.context.triggerElements,c=G(),u=n?.hasAttribute(si("focus-guard"))&&[V.current,B.current,N?.beforeInsideRef.current,N?.afterInsideRef.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,po(f),po(d)].includes(n),p=!(Bn(b,n)||Bn(x,n)||Bn(n,x)||Bn(N?.portalNode,n)||c.some(e=>e===n||Bn(e,n))||null!=n&&a.hasElement(n)||a.hasMatchingElement(e=>Bn(e,n))||u||M&&(Yn(M.nodesRef.current,i).find(e=>Bn(e.context?.elements.floating,n)||Bn(e.context?.elements.domReference,n))||qn(M.nodesRef.current,i).find(e=>[e.context?.elements.floating,Hn(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===b&&Y&&zi(Y,P),s&&r!==b&&!((h=o)&&h.isConnected&&("function"==typeof h.checkVisibility?h.checkVisibility():Nr(h)))&&Vn(e)===e.body){if(wt(Y)&&(Y.focus(),"popup"===s))return void K.request(()=>{Y.focus()});const e=R.current,t=q(),n=t[e]||t[t.length-1]||Y;wt(n)&&n.focus()}var h;E.current.insideReactTree?E.current.insideReactTree=!1:!k&&l||!n||!p||D.current||!k&&n===Li()||(I.current=!0,v.setOpen(!1,No(jo,t)))})}function i(){_.current||(E.current.insideReactTree=!0,U.start(0,()=>{E.current.insideReactTree=!1}))}const a=wt(b)?b:null,u=[];return x||a?(a&&(a.addEventListener("focusout",r),a.addEventListener("pointerdown",t),u.push(()=>{a.removeEventListener("focusout",r),a.removeEventListener("pointerdown",t)})),x&&(x.addEventListener("focusin",n),x.addEventListener("focusout",r),N&&(x.addEventListener("focusout",i,!0),u.push(()=>{x.removeEventListener("focusout",i,!0)})),u.push(()=>{x.removeEventListener("focusin",n),x.removeEventListener("focusout",r)})),()=>{u.forEach(e=>{e()})}):void 0},[o,b,x,Y,l,M,N,v,c,s,q,k,O,P,E,U,W,K,d,f,G]),r.useEffect(()=>{if(o||!x||!g)return;const e=Array.from(N?.portalNode?.querySelectorAll(`[${si("portal")}]`)||[]),t=M?qn(M.nodesRef.current,O()):[],n=t.find(e=>Kn(e.context?.elements.domReference||null))?.context?.elements.domReference,r=[...[x,...e,V.current,B.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,...G()],n,po(f),po(d),k?b:null].filter(e=>null!=e),i=xi(r,{ariaHidden:l||k,mark:!1}),a=[x,...e].filter(e=>null!=e),s=xi(a);return()=>{s(),i()}},[g,o,b,x,l,P,N,k,M,O,d,f,G]),Yt(()=>{if(!g||o||!wt(Y))return;const e=Vn(xn(Y));queueMicrotask(()=>{const t=X(Y),n=j.current,r="function"==typeof n?n(C.current||""):n;if(void 0===r||!1===r)return;let o;o=!0===r||null===r?t[0]||Y:po(r),o=o||t[0]||Y;Bn(Y,e)||ci(o,{preventScroll:o===Y})})},[o,g,Y,S,X,j,C]),Yt(()=>{if(o||!Y)return;const e=xn(Y),t=Vn(e);var n;function r(e){if(e.open||(L.current=function(e,t){const n=vt(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,z.current)),e.reason===Oo&&"mouseleave"===e.nativeEvent.type&&(I.current=!0),e.reason===ko)if(e.nested)I.current=!1;else if(Xn(e.nativeEvent)||Zn(e.nativeEvent))I.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),I.current=!e}}return n=t,Ri(),n&&"body"!==yt(n)&&(_i.push(new WeakRef(n)),_i.length>20&&(_i=_i.slice(-20))),w.on("openchange",r),()=>{w.off("openchange",r);const t=Vn(e),n=G(),o=Bn(x,t)||n.some(e=>e===t||Bn(e,t))||M&&Yn(M.nodesRef.current,O(),!1).some(e=>Bn(e.context?.elements.floating,t)),i=function(){const e=T.current;let t="function"==typeof e?e(L.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){const e=b||Li();return e&&e.isConnected?e:null}const n=b||Li();return po(t)||n||null}();queueMicrotask(()=>{const n=function(e){if(!e)return null;const t=Qr();return Jr(e,t)?e:Zr(e,t)[0]||e}(i),r="boolean"!=typeof T.current;T.current&&!I.current&&wt(n)&&(r||n===t||t===e.body||o)&&n.focus({preventScroll:!0}),I.current=!1})}},[o,x,Y,T,E,w,M,b,O,G]),Yt(()=>{if(!kn||g||!x)return;const e=Vn(xn(x));wt(e)&&Wn(e)&&Bn(x,e)&&e.blur()},[g,x]),Yt(()=>{if(!o&&N)return N.setFocusManagerState({modal:l,closeOnFocusOut:c,open:g,onOpenChange:v.setOpen,domReference:b}),()=>{N.setFocusManagerState(null)}},[o,N,l,g,v,c,b]),Yt(()=>{if(!o&&Y)return zi(Y,P),()=>{queueMicrotask(Ri)}},[o,Y,P]);const Z=!o&&(!l||!k)&&(H||l);return p.jsxs(r.Fragment,{children:[Z&&p.jsx(ai,{"data-type":"inside",ref:F,onFocus:e=>{if(l){const e=X();ci(e[e.length-1])}else if(N?.portalNode)if(I.current=!1,oo(e,N.portalNode)){const e=to(b);e?.focus()}else po(f??N.beforeOutsideRef)?.focus()}}),n,Z&&p.jsx(ai,{"data-type":"inside",ref:$,onFocus:e=>{if(l)ci(X()[0]);else if(N?.portalNode)if(c&&(I.current=!0),oo(e,N.portalNode)){const e=no(b);e?.focus()}else po(d??N.afterOutsideRef)?.focus()}})]})}function Bi(e){return null!=e&&null!=e.clientX}const Fi={intentional:"onClick",sloppy:"onPointerDown"};function $i(){return!1}function Ui(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),{dataRef:a}=n.context,{enabled:s=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="sloppy",referencePress:d=$i,referencePressEvent:f="sloppy",bubbles:p,externalTree:h}=t,m=Mi(h),y=Ft("function"==typeof c?c:()=>!1),v="function"==typeof c?y:c,g=!1!==v,b=Ft(()=>u),x=r.useRef(!1),w=r.useRef(!1),E=r.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=r.useRef(null),j=gn(),A=gn(),T=Ft(()=>{A.clear(),a.current.insideReactTree=!1}),C=r.useRef(!1),M=r.useRef(""),N=Ft(d),I=Ft(e=>{if(!o||!s||!l||"Escape"!==e.key)return;if(C.current)return;const t=a.current.floatingContext?.nodeId,r=m?Yn(m.nodesRef.current,t):[];if(!O&&r.length>0){let e=!0;if(r.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}const i=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,c=No(Ao,i);n.setOpen(!1,c),O||c.isPropagationAllowed||e.stopPropagation()}),D=Ft(()=>{a.current.insideReactTree=!0,A.start(0,T)});r.useEffect(()=>{if(!o||!s)return;a.current.__escapeKeyBubbles=O,a.current.__outsidePressBubbles=S;const e=new vn,t=new vn;function r(){e.clear(),C.current=!0}function c(){e.start(Mt()?5:0,()=>{C.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=M.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,r=m&&Yn(m.nodesRef.current,t).some(t=>Un(e,t.context?.elements.floating));return Un(e,n.select("floatingElement"))||Un(e,n.select("domReferenceElement"))||r}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 r=$n(e),o=`[${si("inert")}]`;let i=Array.from(xn(n.select("floatingElement")).querySelectorAll(o));const s=xt(r)?r.getRootNode():null;Et(s)&&(i=i.concat(Array.from(s.querySelectorAll(o))));const l=n.context.triggerElements;if(r&&(l.hasElement(r)||l.hasMatchingElement(e=>Bn(e,r))))return;let c=xt(r)?r:null;for(;c&&!Nt(c);){const e=_t(c);if(Nt(e)||!xt(e))break;c=e}if(i.length&&xt(r)&&!r.matches("html,body")&&!Bn(r,n.select("floatingElement"))&&i.every(e=>!Bn(c,e)))return;if(wt(r)&&!("touches"in e)){const t=Nt(r),n=It(r),o=/auto|scroll/,i=t||o.test(n.overflowX),a=t||o.test(n.overflowY),s=i&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,l=a&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(p(e))return;if("intentional"===f()&&E.current)return t.clear(),void(E.current=!1);if("function"==typeof v&&!v(e))return;const u=a.current.floatingContext?.nodeId,d=m?Yn(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}n.setOpen(!1,No(ko,e)),T()}function y(e){M.current="touch";const t=$n(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!n.select("open")||!s||Un(e,n.select("floatingElement"))||Un(e,n.select("domReferenceElement")))return;const t=e.touches[0];t&&(P.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},j.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,r)})}function k(e){if(j.clear(),"pointerdown"===e.type&&(M.current=e.pointerType),"mousedown"===e.type&&P.current&&!P.current.dismissOnMouseDown)return;const t=$n(e);t?.addEventListener(e.type,function r(){"pointerdown"===e.type?function(e){"sloppy"===f()&&"touch"!==e.pointerType&&n.select("open")&&s&&!Un(e,n.select("floatingElement"))&&!Un(e,n.select("domReferenceElement"))&&h(e)}(e):h(e),t?.removeEventListener(e.type,r)})}function A(e){if(!x.current)return;const n=w.current;d(),"intentional"===f()&&("pointercancel"!==e.type?p(e)||(n?u():("function"!=typeof v||v(e))&&(t.clear(),E.current=!0,T())):n&&u())}function N(e){const t=$n(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!P.current||Un(e,n.select("floatingElement"))||Un(e,n.select("domReferenceElement")))return;const t=e.touches[0];if(!t)return;const r=Math.abs(t.clientX-P.current.startX),o=Math.abs(t.clientY-P.current.startY),i=Math.sqrt(r*r+o*o);i>5&&(P.current.dismissOnTouchEnd=!0),i>10&&(h(e),j.clear(),P.current=null)}(e),t?.removeEventListener(e.type,r)})}function D(e){const t=$n(e);t?.addEventListener(e.type,function r(){!function(e){"sloppy"!==f()||!P.current||Un(e,n.select("floatingElement"))||Un(e,n.select("domReferenceElement"))||(P.current.dismissOnTouchEnd&&h(e),j.clear(),P.current=null)}(e),t?.removeEventListener(e.type,r)})}const _=xn(i);return l&&(_.addEventListener("keydown",I),_.addEventListener("compositionstart",r),_.addEventListener("compositionend",c)),g&&(_.addEventListener("click",k,!0),_.addEventListener("pointerdown",k,!0),_.addEventListener("pointerup",A,!0),_.addEventListener("pointercancel",A,!0),_.addEventListener("mousedown",k,!0),_.addEventListener("mouseup",A,!0),_.addEventListener("touchstart",y,!0),_.addEventListener("touchmove",N,!0),_.addEventListener("touchend",D,!0)),()=>{l&&(_.removeEventListener("keydown",I),_.removeEventListener("compositionstart",r),_.removeEventListener("compositionend",c)),g&&(_.removeEventListener("click",k,!0),_.removeEventListener("pointerdown",k,!0),_.removeEventListener("pointerup",A,!0),_.removeEventListener("pointercancel",A,!0),_.removeEventListener("mousedown",k,!0),_.removeEventListener("mouseup",A,!0),_.removeEventListener("touchstart",y,!0),_.removeEventListener("touchmove",N,!0),_.removeEventListener("touchend",D,!0)),e.clear(),t.clear(),d(),E.current=!1}},[a,i,l,g,v,o,s,O,S,I,T,b,m,n,j]),r.useEffect(T,[v,T]);const _=r.useMemo(()=>({onKeyDown:I,[Fi[f]]:e=>{N()&&n.setOpen(!1,No(Eo,e.nativeEvent))},..."intentional"!==f&&{onClick(e){N()&&n.setOpen(!1,No(Eo,e.nativeEvent))}}}),[I,n,f,N]),R=Ft(e=>{if(!o||!s||0!==e.button)return;const t=$n(e.nativeEvent);Bn(n.select("floatingElement"),t)&&(x.current||(x.current=!0,w.current=!1))}),L=Ft(e=>{o&&s&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(w.current=!0)}),z=r.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 r.useMemo(()=>s?{reference:_,floating:z,trigger:_}:{},[s,_,z])}function Wi(e,t,n){let{reference:r,floating:o}=e;const i=pr(t),a=hr(t),s=fr(a),l=cr(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.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-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ur(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Ki(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=lr(t,e),h=Er(p),m=s[f?"floating"===d?"reference":"floating":d],y=Or(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},x=Or(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:g,strategy:l}):v);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function Hi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yi(e){return er.some(t=>e[t]>=0)}const qi=new Set(["left","top"]);function Gi(e){const t=It(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=rr(n)!==i||rr(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Xi(e){return xt(e)?e:e.contextElement}function Zi(e){const t=Xi(e);if(!wt(t))return ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Gi(t);let a=(i?rr(n.width):n.width)/r,s=(i?rr(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Ji=ir(0);function Qi(e){const t=vt(e);return Mt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ji}function ea(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Xi(e);let a=ir(1);t&&(r?xt(r)&&(a=Zi(r)):a=Zi(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==vt(e))&&t}(i,n,r)?Qi(i):ir(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=vt(i),t=r&&xt(r)?vt(r):r;let n=e,o=zt(n);for(;o&&r&&t!==n;){const e=Zi(o),t=o.getBoundingClientRect(),r=It(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=vt(o),o=zt(n)}}return Or({width:u,height:d,x:l,y:c})}function ta(e,t){const n=Dt(e).scrollLeft;return t?t.left+n:ea(gt(e)).left+n}function na(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ta(e,n),y:n.top+t.scrollTop}}function ra(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=vt(e),r=gt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Mt();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=ta(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=gt(e),n=Dt(e),r=e.ownerDocument.body,o=nr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ta(e);const s=-n.scrollTop;return"rtl"===It(r).direction&&(a+=nr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(gt(e));else if(xt(t))r=function(e,t){const n=ea(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wt(e)?Zi(e):ir(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Qi(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Or(r)}function oa(e,t){const n=_t(e);return!(n===t||!xt(n)||Nt(n))&&("fixed"===It(n).position||oa(n,t))}function ia(e,t,n){const r=wt(t),o=gt(t),i="fixed"===n,a=ea(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ir(0);function c(){l.x=ta(o)}if(r||!r&&!i)if(("body"!==yt(t)||Ot(o))&&(s=Dt(t)),r){const e=ea(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?ir(0):na(o,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 aa(e){return"static"===It(e).position}function sa(e,t){if(!wt(e)||"fixed"===It(e).position)return null;if(t)return t(e);let n=e.offsetParent;return gt(e)===n&&(n=n.ownerDocument.body),n}function la(e,t){const n=vt(e);if(kt(e))return n;if(!wt(e)){let t=_t(e);for(;t&&!Nt(t);){if(xt(t)&&!aa(t))return t;t=_t(t)}return n}let r=sa(e,t);for(;r&&St(r)&&aa(r);)r=sa(r,t);return r&&Nt(r)&&aa(r)&&!Ct(r)?n:r||function(e){let t=_t(e);for(;wt(t)&&!Nt(t);){if(Ct(t))return t;if(kt(t))return null;t=_t(t)}return null}(e)||n}const ca={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=gt(r),s=!!t&&kt(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ir(1);const u=ir(0),d=wt(r);if((d||!d&&!i)&&(("body"!==yt(r)||Ot(a))&&(l=Dt(r)),d)){const e=ea(r);c=Zi(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?ir(0):na(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:gt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?kt(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Lt(e,[],!1).filter(e=>xt(e)&&"body"!==yt(e)),o=null;const i="fixed"===It(e).position;let a=i?_t(e):e;for(;xt(a)&&!Nt(a);){const t=It(a),n=Ct(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ot(a)&&!n&&oa(e,a))?r=r.filter(e=>e!==a):o=t,a=_t(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=ra(t,i[0],o);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let e=1;e<i.length;e++){const n=ra(t,i[e],o);s=nr(n.top,s),l=tr(n.right,l),c=tr(n.bottom,c),u=nr(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:la,getElementRects:async function(e){const t=this.getOffsetParent||la,n=this.getDimensions,r=await n(e.floating);return{reference:ia(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}=Gi(e);return{width:t,height:n}},getScale:Zi,isElement:xt,isRTL:function(e){return"rtl"===It(e).direction}};function ua(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function da(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Xi(e),u=o||i?[...c?Lt(c):[],...t?Lt(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=gt(e);function i(){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),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-or(d)+"px "+-or(o.clientWidth-(u+f))+"px "+-or(o.clientHeight-(d+p))+"px "+-or(u)+"px",threshold:nr(0,tr(1,l))||1};let m=!0;function y(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||ua(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,h)}r.observe(e)}(!0),i}(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?ea(e):null;return l&&function t(){const r=ea(e);m&&!ua(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const fa=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=cr(n),s=ur(n),l="y"===pr(n),c=qi.has(a)?-1:1,u=i&&l?-1:1,d=lr(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:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},pa=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=lr(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=pr(cr(o)),p=dr(f);let h=u[p],m=u[f];if(a){const e="y"===p?"bottom":"right";h=sr(h+d["y"===p?"top":"left"],h,h-d[e])}if(s){const e="y"===f?"bottom":"right";m=sr(m+d["y"===f?"top":"left"],m,m-d[e])}const y=l.fn({...t,[p]:h,[f]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:a,[f]:s}}}}}},ha=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,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,...y}=lr(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=cr(o),g=pr(s),b=cr(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[wr(s)]:function(e){const t=wr(e);return[mr(e),t,mr(t)]}(s)),E="none"!==h;!f&&E&&w.push(...xr(s,m,h,x));const O=[s,...w],S=await l.detectOverflow(t,y),k=[];let P=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=ur(e),o=hr(e),i=fr(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=wr(a)),[a,wr(a)]}(o,a,x);k.push(S[e[0]],S[e[1]])}if(P=[...P,{placement:o,overflows:k}],!k.every(e=>e<=0)){var j,A;const e=((null==(j=i.flip)?void 0:j.index)||0)+1,t=O[e];if(t){if(!("alignment"===d&&g!==pr(t))||P.every(e=>pr(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:P},reset:{placement:t}}}let n=null==(A=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=P.filter(e=>{if(E){const t=pr(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(o!==n)return{reset:{placement:n}}}return{}}}},ma=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=lr(e,t),u=await a.detectOverflow(t,c),d=cr(o),f=ur(o),p="y"===pr(o),{width:h,height:m}=i.floating;let y,v;"top"===d||"bottom"===d?(y=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,y="end"===f?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,x=tr(m-u[y],g),w=tr(h-u[v],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=nr(u.left,0),t=nr(u.right,0),n=nr(u.top,0),r=nr(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:nr(u.left,u.right)):O=m-2*(0!==n||0!==r?n+r:nr(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}}:{}}}},ya=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=lr(e,t);switch(o){case"referenceHidden":{const e=Hi(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Yi(e)}}}case"escaped":{const e=Hi(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Yi(e)}}}default:return{}}}}},va=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=lr(e,t),u={x:n,y:r},d=pr(o),f=dr(d);let p=u[f],h=u[d];const m=lr(s,t),y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+y.mainAxis,n=i.reference[f]+i.reference[e]-y.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,g;const e="y"===f?"width":"height",t=qi.has(cr(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:y.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?y.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},ga=(e,t,n)=>{const r=new Map,o={platform:ca,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Ki},l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Wi(c,r,l),f=r,p=0;const h={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:y,fn:v}=m,{x:g,y:b,data:x,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=b?b:d,h[y]={...h[y],...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:o}):w.rects),({x:u,y:d}=Wi(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var ba="undefined"!=typeof document?e.useLayoutEffect:function(){};function xa(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,o;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(!xa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!xa(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function wa(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ea(e,t){const n=wa(e);return Math.round(t*n)/n}function Oa(e){const t=r.useRef(e);return ba(()=>{t.current=e}),t}const Sa=(e,t)=>{const n=fa(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})}}},Pa=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:a}=e,s=r(()=>({}),...o);if(!(s.apply(null,i)===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:i,secondInputs:a,stack:e})}},ja={inputStabilityCheck:"once",identityFunctionCheck:"once"},Aa=Symbol("NOT_FOUND");var Ta=e=>Array.isArray(e)?e:[e];function Ca(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 Ma(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Na=(e,t)=>e===t;var Ia="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function Da(){return{s:0,v:void 0,o:null,p:null}}function _a(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,i=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=Da(),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=Da(),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),i++,r){const e=o?.deref?.()??o;null!=e&&r(e,l)&&(l=e,0!==i&&i--);o="object"==typeof l&&null!==l||"function"==typeof l?new Ia(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=()=>i,a.resetResultsCount=()=>{i=0},a}function Ra(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},a=e.pop();"object"==typeof a&&(i=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,...i},{memoize:l,memoizeOptions:c=[],argsMemoize:u=_a,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=Ta(c),h=Ta(d),m=Ca(e),y=l(function(){return r++,a.apply(null,arguments)},...p);let v=!0;const g=u(function(){o++;const e=Ma(m,arguments);if(t=y.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:n,inputStabilityCheck:r}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...ja,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:ka},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:Pa}}})(v,f);if(n.shouldRun&&n.run(a,e,t),r.shouldRun){const t=Ma(m,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:p},arguments)}v&&(v=!1)}return t},...h);return Object.assign(g,{resultFunc:a,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var La=Ra(_a),za=Object.assign((e,t=La)=>{!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:()=>za});Ra({memoize:function(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Na,maxSize:o=1,resultEqualityCheck:i}=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 o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(r);let s=0;const l=o<=1?function(e){let t;return{get:n=>t&&e(t.key,n)?t.value:Aa,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 Aa}return{get:r,put:function(t,o){r(t)===Aa&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(o,a);function c(){let t=l.get(arguments);if(t===Aa){if(t=e.apply(null,arguments),s++,i){const e=l.getEntries().find(e=>i(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 Va=(e,t,n,r,o,i,...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 Ba,Fa={exports:{}},$a={};var Ua,Wa,Ka={};
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 Ha(){return Wa||(Wa=1,"production"===process.env.NODE_ENV?Fa.exports=function(){if(Ba)return $a;Ba=1;var t=e,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useState,o=t.useEffect,i=t.useLayoutEffect,a=t.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 i(function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})},[e,n,t]),o(function(){return s(c)&&u({inst:c}),e(function(){s(c)&&u({inst:c})})},[e]),a(n),n};return $a.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:l,$a}():Fa.exports=(Ua||(Ua=1,"production"!==process.env.NODE_ENV&&function(){function t(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=e,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=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(e,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=o({inst:{value:d,getSnapshot:u}}))[0].inst,h=f[1];return a(function(){p.value=d,p.getSnapshot=u,t(p)&&h({inst:p})},[e,d,u]),i(function(){return t(p)&&h({inst:p}),e(function(){t(p)&&h({inst:p})})},[e]),s(d),d};Ka.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())}()),Ka)),Fa.exports}var Ya,qa=Ha(),Ga={exports:{}},Xa={};var Za,Ja,Qa={};
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 es=(Ja||(Ja=1,"production"===process.env.NODE_ENV?Ga.exports=function(){if(Ya)return Xa;Ya=1;var t=e,n=Ha(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;return Xa.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(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,o=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,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,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=o(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},Xa}():Ga.exports=(Za||(Za=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 t=e,n=Ha(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Qa.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(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,o=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,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,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=o(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())}()),Qa)),Ga.exports);const ts=[];let ns;function rs(e){const t=(t,n)=>{const r=j(is).current;let o;try{ns=r;for(const e of ts)e.before(r);o=e(t,n);for(const e of ts)e.after(r);r.didInitialize=!0}finally{ns=void 0}return o};return t.displayName=e.displayName||e.name,t}function os(e){return r.forwardRef(rs(e))}function is(){return{didInitialize:!1}}const as=N(19)?function(e,t,n,o,i){const a=ns;if(!a)return function(e,t,n,o,i){const a=r.useCallback(()=>t(e.getSnapshot(),n,o,i),[e,t,n,o,i]);return qa.useSyncExternalStore(e.subscribe,a,a)}(e,t,n,o,i);const s=a.syncIndex;let l;a.syncIndex+=1,a.didInitialize?(l=a.syncHooks[s],l.store===e&&l.selector===t&&Object.is(l.a1,n)&&Object.is(l.a2,o)&&Object.is(l.a3,i)||(l.store!==e&&(a.didChangeStore=!0),l.store=e,l.selector=t,l.a1=n,l.a2=o,l.a3=i,l.didChange=!0)):(l={store:e,selector:t,a1:n,a2:o,a3:i,value:t(e.getSnapshot(),n,o,i),didChange:!1},a.syncHooks.push(l));return l.value}:function(e,t,n,r,o){return es.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};function ss(e,t,n,r,o){return as(e,t,n,r,o)}var ls;ls={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],o=r.selector(r.store.state,r.a1,r.a2,r.a3);!r.didChange&&Object.is(r.value,o)||(t=!0,r.value=o,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()}}),qa.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}},ts.push(ls);class cs{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 ss(this,e,t,n,r)}}class us extends cs{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){r.useDebugValue(e),Yt(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){const n=this;Yt(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){const t=this;if("production"!==process.env.NODE_ENV){r.useDebugValue(e,e=>Object.keys(e));const t=r.useRef(Object.keys(e)).current,n=Object.keys(e);(t.length!==n.length||t.some((e,t)=>e!==n[t]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const n=Object.values(e);Yt(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){r.useDebugValue(e);const n=void 0!==t;if(Yt(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n]),"production"!==process.env.NODE_ENV){const t=this.controlledValues??=new Map;t.has(e)||t.set(e,n);const r=t.get(e);void 0!==r&&r!==n&&console.error(`A component is changing the ${n?"":"un"}controlled state of ${e.toString()} to be ${n?"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(e,t,n,o){return r.useDebugValue(e),ss(this,this.selectors[e],t,n,o)}useContextCallback(e,t){r.useDebugValue(e);const n=Ft(t??_);this.context[e]=n}useStateSetter(e){const t=r.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.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 o=n(e);if(!Object.is(r,o)){const e=r;r=o,t(o,e,this)}})}}const ds={open:Va(e=>e.open),domReferenceElement:Va(e=>e.domReferenceElement),referenceElement:Va(e=>e.positionReference??e.referenceElement),floatingElement:Va(e=>e.floatingElement),floatingId:Va(e=>e.floatingId)};class fs extends us{constructor(e){const{nested:t,noEmit:n,onOpenChange:r,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Pi(),nested:t,noEmit:n,triggerElements:o},ds)}setOpen=(e,t)=>{if(e&&this.state.open&&!Qn(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 ps(e,t,n,o){const i=n.useState("isMountedByTrigger",e),a=function(e,t){const n=r.useRef(null),o=r.useRef(null);return r.useCallback(r=>{if(void 0!==e){if(null!==n.current){const e=n.current,r=o.current,i=t.context.triggerElements.getById(e);r&&i===r&&t.context.triggerElements.delete(e),n.current=null,o.current=null}null!==r&&(n.current=e,o.current=r,t.context.triggerElements.add(e,r))}},[t,e])}(e,n),s=Ft(t=>{if(a(t),!t||!n.select("open"))return;const r=n.select("activeTriggerId");r!==e?null==r&&n.update({activeTriggerId:e,activeTriggerElement:t,...o}):n.update({activeTriggerElement:t,...o})});return Yt(()=>{i&&n.update({activeTriggerElement:t.current,...o})},[i,n,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:i}}function hs(e){const t=e.useState("open");Yt(()=>{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 ms(e,t,n){const{mounted:o,setMounted:i,transitionStatus:a}=function(e,t=!1,n=!1){const[o,i]=r.useState(e&&t?"idle":void 0),[a,s]=r.useState(e);return e&&!a&&(s(!0),i("starting")),e||!a||"ending"===o||n||i("ending"),e||a||"ending"!==o||i(void 0),Yt(()=>{if(!e&&a&&"ending"!==o&&n){const e=uo.request(()=>{i("ending")});return()=>{uo.cancel(e)}}},[e,a,o,n]),Yt(()=>{if(!e||t)return;const n=uo.request(()=>{i(void 0)});return()=>{uo.cancel(n)}},[t,e]),Yt(()=>{if(!e||!t)return;e&&a&&"idle"!==o&&i("starting");const n=uo.request(()=>{i("idle")});return()=>{uo.cancel(n)}},[t,e,a,i,o]),r.useMemo(()=>({mounted:a,setMounted:s,transitionStatus:o}),[a,o])}(e);t.useSyncedValues({mounted:o,transitionStatus:a});const s=Ft(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return bo({enabled:!t.useState("preventUnmountingOnClose"),open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:a}}class ys{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 vs(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new fs({open:!1,floatingElement:null,referenceElement:null,triggerElements:new ys,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:L,inactiveTriggerProps:L,popupProps:L}}const gs=Va(e=>e.triggerIdProp??e.activeTriggerId),bs={open:Va(e=>e.openProp??e.open),mounted:Va(e=>e.mounted),transitionStatus:Va(e=>e.transitionStatus),floatingRootContext:Va(e=>e.floatingRootContext),preventUnmountingOnClose:Va(e=>e.preventUnmountingOnClose),payload:Va(e=>e.payload),activeTriggerId:gs,activeTriggerElement:Va(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Va((e,t)=>void 0!==t&&gs(e)===t),isOpenedByTrigger:Va((e,t)=>void 0!==t&&gs(e)===t&&e.open),isMountedByTrigger:Va((e,t)=>void 0!==t&&gs(e)===t&&e.mounted),triggerProps:Va((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Va(e=>e.popupProps),popupElement:Va(e=>e.popupElement),positionerElement:Va(e=>e.positionerElement)};function xs(e={}){const{nodeId:t,externalTree:n}=e,i=function(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=dn(),i=null!=Ci();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!xt(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=j(()=>new fs({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ys,floatingId:o,nested:i,noEmit:!1})).current;return Yt(()=>{const e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=xt(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a.context.noEmit=!1,a}(e),a=e.rootContext||i,s={reference:a.useState("referenceElement"),floating:a.useState("floatingElement"),domReference:a.useState("domReferenceElement")},[l,c]=r.useState(null),u=r.useRef(null),d=Mi(n);Yt(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=r.useState(i);xa(h,i)||m(i);const[y,v]=r.useState(null),[g,b]=r.useState(null),x=r.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=r.useCallback(e=>{e!==k.current&&(k.current=e,b(e))},[]),E=s||y,O=l||g,S=r.useRef(null),k=r.useRef(null),P=r.useRef(f),j=null!=u,A=Oa(u),T=Oa(a),C=Oa(d),M=r.useCallback(()=>{if(!S.current||!k.current)return;const e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),ga(S.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==C.current};N.current&&!xa(P.current,t)&&(P.current=t,o.flushSync(()=>{p(t)}))})},[h,t,n,T,C]);ba(()=>{!1===d&&P.current.isPositioned&&(P.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const N=r.useRef(!1);ba(()=>(N.current=!0,()=>{N.current=!1}),[]),ba(()=>{if(E&&(S.current=E),O&&(k.current=O),E&&O){if(A.current)return A.current(E,O,M);M()}},[E,O,M,A,j]);const I=r.useMemo(()=>({reference:S,floating:k,setReference:x,setFloating:w}),[x,w]),D=r.useMemo(()=>({reference:E,floating:O}),[E,O]),_=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Ea(D.floating,f.x),r=Ea(D.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...wa(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,D.floating,f.x,f.y]);return r.useMemo(()=>({...f,update:M,refs:I,elements:D,floatingStyles:_}),[f,M,I,D,_])}({...e,elements:{...s,...l&&{reference:l}}}),p=r.useCallback(e=>{const t=xt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),[h,m]=r.useState(null),[y,v]=r.useState(null);a.useSyncedValue("referenceElement",h),a.useSyncedValue("domReferenceElement",xt(h)?h:null),a.useSyncedValue("floatingElement",y);const g=r.useCallback(e=>{(xt(e)||null===e)&&(u.current=e,m(e)),(xt(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!xt(e))&&f.refs.setReference(e)},[f.refs,m]),b=r.useCallback(e=>{v(e),f.refs.setFloating(e)},[f.refs]),x=r.useMemo(()=>({...f.refs,setReference:g,setFloating:b,setPositionReference:p,domReference:u}),[f.refs,g,b,p]),w=r.useMemo(()=>({...f.elements,domReference:s.domReference}),[f.elements,s.domReference]),E=a.useState("open"),O=a.useState("floatingId"),S=r.useMemo(()=>({...f,dataRef:a.context.dataRef,open:E,onOpenChange:a.setOpen,events:a.context.events,floatingId:O,refs:x,elements:w,nodeId:t,rootStore:a}),[f,x,w,t,a,E,O]);return Yt(()=>{a.context.dataRef.current.floatingContext=S;const e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=S)}),r.useMemo(()=>({...f,context:S,refs:x,elements:w,rootStore:a}),[f,x,w,S,a])}function ws(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=dn(),a=null!=Ci(),s=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=j(()=>new fs({open:s,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:i,nested:a,noEmit:n})).current;return Yt(()=>{const e={open:s,floatingId:i,referenceElement:l,floatingElement:c};xt(l)&&(e.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(e.positionReference=l),d.update(e)},[s,i,l,c,d]),d.context.onOpenChange=o,d.context.nested=a,d.context.noEmit=n,d}const Es=Tn&&jn;function Os(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:o,dataRef:i}=n.context,{enabled:a=!0,delay:s}=t,l=r.useRef(!1),c=r.useRef(null),u=gn(),d=r.useRef(!0);r.useEffect(()=>{const e=n.select("domReferenceElement");if(!a)return;const t=vt(e);function r(){const e=n.select("domReferenceElement");!n.select("open")&&wt(e)&&e===Vn(xn(e))&&(l.current=!0)}function o(){d.current=!0}function i(){d.current=!1}return t.addEventListener("blur",r),Es&&(t.addEventListener("keydown",o,!0),t.addEventListener("pointerdown",i,!0)),()=>{t.removeEventListener("blur",r),Es&&(t.removeEventListener("keydown",o,!0),t.removeEventListener("pointerdown",i,!0))}},[n,a]),r.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){if(e.reason===Eo||e.reason===Ao){const e=n.select("domReferenceElement");xt(e)&&(c.current=e,l.current=!0)}}},[o,a,n]);const f=r.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 r=$n(e.nativeEvent);if(xt(r))if(Es&&!e.relatedTarget){if(!d.current&&!Wn(r))return}else if(!function(e){if(!e||Cn)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(r))return;const o=Fn(e.relatedTarget,n.context.triggerElements),{nativeEvent:i,currentTarget:a}=e,f="function"==typeof s?s():s;n.select("open")&&o||0===f||void 0===f?n.setOpen(!0,No(So,i,a)):u.start(f,()=>{l.current||n.setOpen(!0,No(So,i,a))})},onBlur(e){l.current=!1,c.current=null;const t=e.relatedTarget,r=e.nativeEvent,o=xt(t)&&t.hasAttribute(si("focus-guard"))&&"outside"===t.getAttribute("data-type");u.start(0,()=>{const e=n.select("domReferenceElement"),a=Vn(e?e.ownerDocument:document);if(!t&&a===e)return;if(Bn(i.current.floatingContext?.refs.floating.current,a)||Bn(e,a)||o)return;Fn(t??a,n.context.triggerElements)||n.setOpen(!1,No(So,r))})}}),[i,n,u,s]);return r.useMemo(()=>a?{reference:f,trigger:f}:{},[a,f])}const Ss=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Dn}`;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 vn,this.restTimeout=new vn,this.handleCloseOptions=void 0}static create(){return new ks}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function Ps(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 js(e){const t=j(ks.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),yn(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function As(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:s}=n.context,{enabled:l=!0,closeDelay:c=0}=t,u=js(n),d=Mi(),f=Ci(),p=Ft(()=>ti(s.current.openEvent?.type,u.interactedInside)),h=Ft(()=>{const e=s.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=Ft(e=>Fn(e,n.context.triggerElements)),y=r.useCallback(e=>{const t=Qo(c,"close",u.pointerType),r=()=>{n.setOpen(!1,No(Oo,e)),d?.events.emit("floating.closed",e)};t?u.openChangeTimeout.start(t,r):(u.openChangeTimeout.clear(),r())},[c,n,u,d]),v=Ft(()=>{Ps(u)}),g=Ft(e=>{const t=$n(e);var n;(n=t)&&Boolean(n.closest(Ss))?u.interactedInside=null!=t?.closest("[aria-haspopup]"):u.interactedInside=!1});Yt(()=>{o||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,v())},[o,u,v]),r.useEffect(()=>v,[v]),Yt(()=>{if(l&&o&&u.handleCloseOptions?.blockPointerEvents&&h()&&xt(a)&&i){const e=a,t=i,n=xn(i),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;r&&(r.style.pointerEvents="");const o=u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??r??e.closest("[data-rootownerid]")??n.body;return function(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t;Ps(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}(u,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{v()}}},[l,o,a,i,u,h,d,f,v]);const b=gn();r.useEffect(()=>{if(!l)return;function e(){u.openChangeTimeout.clear(),b.clear(),d?.events.off("floating.closed",r),v()}function t(e){d&&f&&Yn(d.nodesRef.current,f).length>0?d.events.on("floating.closed",r):m(e.relatedTarget)||(u.handler?u.handler(e):(v(),p()||y(e)))}function r(e){!d||!f||Yn(d.nodesRef.current,f).length>0||b.start(0,()=>{d.events.off("floating.closed",r),n.setOpen(!1,No(Oo,e)),d.events.emit("floating.closed",e)})}const o=i;return o&&(o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),o.addEventListener("pointerdown",g,!0)),()=>{o&&(o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),o.removeEventListener("pointerdown",g,!0)),d?.events.off("floating.closed",r)}},[l,i,n,s,p,m,y,v,g,u,d,f,b])}const Ts={current:null};function Cs(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:i,events:a}=n.context,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0,triggerElementRef:p=Ts,externalTree:h,isActiveTrigger:m=!0,getHandleCloseContext:y}=t,v=Mi(h),g=js(n),b=ri(c),x=ri(l),w=ri(d),E=ri(s);m&&(g.handleCloseOptions=b.current?.__options);const O=Ft(()=>ti(i.current.openEvent?.type,g.interactedInside)),S=Ft(e=>Fn(e,n.context.triggerElements)),k=Ft((e,t,r)=>{const o=n.context.triggerElements;if(o.hasElement(t))return!e||!Bn(e,t);if(!xt(r))return!1;const i=r;return o.hasMatchingElement(e=>Bn(e,i))&&(!e||!Bn(e,i))}),P=r.useCallback((e,t=!0)=>{const r=Qo(x.current,"close",g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,No(Oo,e)),v?.events.emit("floating.closed",e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,No(Oo,e)),v?.events.emit("floating.closed",e))},[x,n,g,v]),j=Ft(()=>{if(!g.handler)return;xn(n.select("domReferenceElement")).removeEventListener("mousemove",g.handler),g.handler=void 0});r.useEffect(()=>j,[j]);const A=Ft(()=>{Ps(g)});return r.useEffect(()=>{if(s)return a.on("openchange",e),()=>{a.off("openchange",e)};function e(e){e.open||(j(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}},[s,a,g,j]),r.useEffect(()=>{if(!s)return;const e=p.current??(m?n.select("domReferenceElement"):null);if(xt(e))return f&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",r),()=>{f&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",r)};function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,u&&!Jn(g.pointerType))return;if(ei(w.current)>0&&!Qo(x.current,"open"))return;const t=Qo(x.current,"open",g.pointerType),r=e.currentTarget??null,o=n.select("domReferenceElement"),i=null!=r&&k(o,r,e.target),a=n.select("open"),s=!a||i;i&&a?n.setOpen(!0,No(Oo,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,No(Oo,e,r))}):s&&n.setOpen(!0,No(Oo,e,r))}function r(e){if(O())return void A();j();const t=xn(n.select("domReferenceElement"));g.restTimeout.clear(),g.restTimeoutPending=!1;const r=i.current.floatingContext??y?.();if(S(e.relatedTarget))return;if(b.current&&r){n.select("open")||g.openChangeTimeout.clear();const o=p.current;return g.handler=b.current({...r,tree:v,x:e.clientX,y:e.clientY,onClose(){A(),j(),E.current&&!O()&&o===n.select("domReferenceElement")&&P(e,!0)}}),t.addEventListener("mousemove",g.handler),void g.handler(e)}("touch"!==g.pointerType||!Bn(n.select("floatingElement"),e.relatedTarget))&&P(e)}},[j,A,i,x,P,n,s,b,g,m,k,O,S,u,f,w,p,v,E,y]),r.useMemo(()=>{if(s)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,r=e.currentTarget,i=n.select("domReferenceElement"),a=n.select("open"),s=k(i,r,e.target);if(u&&!Jn(g.pointerType))return;const l=ei(w.current);function c(){if(g.restTimeoutPending=!1,O())return;const e=n.select("open");g.blockMouseMove||e&&!s||n.setOpen(!0,No(Oo,t,r))}a&&!s||0===l||!s&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(g.restTimeout.clear(),"touch"===g.pointerType?o.flushSync(()=>{c()}):s&&a?c():(g.restTimeoutPending=!0,g.restTimeout.start(l,c)))}};function e(e){g.pointerType=e.pointerType}},[s,g,O,k,u,n,w])}function Ms(e=[]){const t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),o=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=r.useCallback(t=>Ns(t,e,"reference"),t),s=r.useCallback(t=>Ns(t,e,"floating"),n),l=r.useCallback(t=>Ns(t,e,"item"),o),c=r.useCallback(t=>Ns(t,e,"trigger"),i);return r.useMemo(()=>({getReferenceProps:a,getFloatingProps:s,getItemProps:l,getTriggerProps:c}),[a,s,l,c])}function Ns(e,t,n){const r=new Map,o="item"===n,i={};"floating"===n&&(i.tabIndex=-1,i[Mn]="");for(const t in e)o&&e&&(t===Nn||t===In)||(i[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&&Is(i,s,o,r)}return Is(i,e,o,r),i}function Is(e,t,n,r){for(const o in t){const i=t[o];(!n||o!==Nn&&o!==In)&&(o.startsWith("on")?(r.has(o)||r.set(o,[]),"function"==typeof i&&(r.get(o)?.push(i),e[o]=(...e)=>r.get(o)?.map(t=>t(...e)).find(e=>void 0!==e))):e[o]=i)}}function Ds(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function _s(e,t){return Ds(t,e===Ln||e===zn,e===_n||e===Rn)}function Rs(e,t,n){return Ds(t,e===zn,n?e===_n:e===Rn)||"Enter"===e||" "===e||""===e}function Ls(e,t){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),s=n.context.dataRef,{listRef:l,activeIndex:c,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:h=!1,nested:m=!1,rtl:y=!1,virtual:v=!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:j}=t;"production"!==process.env.NODE_ENV&&(p&&(h||console.warn("`useListNavigation` looping must be enabled to allow escaping."),v||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 A=ri(Hn(i)),T=Ci(),C=Mi(j);Yt(()=>{s.current.orientation=E},[s,E]);const M=Kn(a),N=r.useRef(g),I=r.useRef(f??-1),D=r.useRef(null),_=r.useRef(!0),R=Ft(e=>{u(-1===I.current?null:I.current,e)}),L=r.useRef(R),z=r.useRef(!!i),V=r.useRef(o),B=r.useRef(!1),F=r.useRef(!1),$=ri(w),U=ri(o),W=ri(f),K=ri(P),H=Ft(()=>{function e(e){v?C?.events.emit("virtualfocus",e):ci(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"})})});Yt(()=>{d&&(o&&i?(I.current=f??-1,N.current&&null!=f&&(F.current=!0,R())):z.current&&(I.current=-1,L.current()))},[d,o,i,f,R]),Yt(()=>{if(d)if(o){if(i)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||Rs(D.current,E,y)||m?Pr(l):jr(l),D.current=null,R()};t()}}else kr(l,c)||(I.current=c,H(),F.current=!1)}else B.current=!1},[d,o,i,c,W,m,l,E,y,R,H,$]),Yt(()=>{if(!d||i||!C||v||!z.current)return;const e=C.nodesRef.current,t=e.find(e=>e.id===T)?.context?.elements.floating,n=Vn(xn(i)),r=e.some(e=>e.context&&Bn(e.context.elements.floating,n));t&&!r&&_.current&&t.focus({preventScroll:!0})},[d,i,C,T,v]),Yt(()=>{L.current=R,V.current=o,z.current=!!i}),Yt(()=>{o||(D.current=null,N.current=g)},[o,g]);const Y=null!=c,q=r.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&&(ci(null,{sync:!0}),I.current=-1,R(e),!v)){const e=A.current,t=Vn(xn(e));e&&Bn(e,t)&&e.focus({preventScroll:!0})}}}},[U,A,b,l,R,K,v]),G=r.useCallback(()=>O??C?.nodesRef.current.find(e=>e.id===T)?.context?.dataRef?.current.orientation,[T,C,O]),X=Ft(e=>{if(_.current=!1,B.current=!0,229===e.which)return;if(!U.current&&e.currentTarget===A.current)return;if(m&&function(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:Ds(t,n?e===Rn:e===_n,e===Ln)}(e.key,E,y,S))return _s(e.key,G())||Gn(e),n.setOpen(!1,No(To,e.nativeEvent)),void(wt(a)&&(v?C?.events.emit("virtualfocus",a):a.focus()));const t=I.current,r=Pr(l,w),i=jr(l,w);if(M||("Home"===e.key&&(Gn(e),I.current=r,R(e)),"End"===e.key&&(Gn(e),I.current=i,R(e))),S>1){const t=Array.from({length:l.current.length},()=>({width:1,height:1})),n=function(e,t){const n=[];let r=0;return e.forEach(({width:e,height:o},i)=>{if(e>t&&"production"!==process.env.NODE_ENV)throw new Error(`[Floating UI]: Invalid grid - item width at index ${i} 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<o;e+=1)s.push(r+n+e*t);r%t+e<=t&&s.every(e=>null==n[e])?(s.forEach(e=>{n[e]=i}),a=!0):r+=1}}),[...n]}(t,S),o=n.findIndex(e=>null!=e&&!Mr(l,e,w)),a=n.reduce((e,t,n)=>null==t||Mr(l,t,w)?e:n,-1),s=n[function(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}){let d,f=c;if(t.key===Ln?d="up":t.key===zn&&(d="down"),d){const n=[],o=[];let p=!1,h=0;{let t=null,r=-1;e.current.forEach((e,i)=>{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(i),o[i]=r})}let m=!1,y=0;if(p)for(const e of n){const t=e.length;t>y&&(y=t),t!==i&&(m=!0)}const v=m&&h<e.current.length,g=y||i,b=t=>{if(!m||-1===c)return;const i=o[c];if(null==i)return;const s=n[i].indexOf(c),l="up"===t?-1:1;for(let t=i+l,o=0;o<n.length;o+=1,t+=l){if(t<0||t>=n.length){if(!r||v)return;t=t<0?n.length-1:0}const o=n[t];for(let t=Math.min(s,o.length-1);t>=0;t-=1){const n=o[t];if(!Mr(e,n,a))return n}}},x=t=>{if(!v||-1===c)return;const n=c%g,o="up"===t?-g:g,i=l-l%g,s=or(l/g)+1;for(let t=c-n+o,u=0;u<s;u+=1,t+=o){if(t<0||t>l){if(!r)return;t=t<0?i:0}const o=Math.min(t+g-1,l);for(let r=Math.min(t+n,o);r>=t;r-=1)if(!Mr(e,r,a))return r}};u&&Gn(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=Ar(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=Ar(e,{startingIndex:c%g-g,amount:g,disabledIndices:a}))}kr(e,f)&&(f=c)}if("both"===n){const n=or(c/i);t.key===(o?_n:Rn)&&(u&&Gn(t),c%i!==i-1?(f=Ar(e,{startingIndex:c,disabledIndices:a}),r&&Sr(f,i,n)&&(f=Ar(e,{startingIndex:c-c%i-1,disabledIndices:a}))):r&&(f=Ar(e,{startingIndex:c-c%i-1,disabledIndices:a})),Sr(f,i,n)&&(f=c)),t.key===(o?Rn:_n)&&(u&&Gn(t),c%i!==0?(f=Ar(e,{startingIndex:c,decrement:!0,disabledIndices:a}),r&&Sr(f,i,n)&&(f=Ar(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):r&&(f=Ar(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Sr(f,i,n)&&(f=c));const s=or(l/i)===n;kr(e,f)&&(f=r&&s?t.key===(o?Rn:_n)?l:Ar(e,{startingIndex:c-c%i-1,disabledIndices:a}):c)}return f}({current:n.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:E,loopFocus:h,rtl:y,cols:S,disabledIndices:Cr([...("function"!=typeof w?w:null)||l.current.map((e,t)=>Mr(l,t,w)?t:void 0),void 0],n),minIndex:o,maxIndex:a,prevIndex:Tr(I.current>i?r:I.current,t,n,S,e.key===zn?"bl":e.key===(y?_n:Rn)?"tr":"tl"),stopEvent:!0})];if(null!=s&&(I.current=s,R(e)),"both"===E)return}if(_s(e.key,E)){if(Gn(e),o&&!v&&Vn(e.currentTarget.ownerDocument)===e.currentTarget)return I.current=Rs(e.key,E,y)?r:i,void R(e);Rs(e.key,E,y)?h?t>=i?p&&t!==l.current.length?I.current=-1:(B.current=!1,I.current=r):I.current=Ar(l,{startingIndex:t,disabledIndices:w}):I.current=Math.min(i,Ar(l,{startingIndex:t,disabledIndices:w})):h?t<=r?p&&-1!==t?I.current=l.current.length:(B.current=!1,I.current=i):I.current=Ar(l,{startingIndex:t,decrement:!0,disabledIndices:w}):I.current=Math.max(r,Ar(l,{startingIndex:t,decrement:!0,disabledIndices:w})),kr(l,I.current)&&(I.current=-1),R(e)}}),Z=r.useMemo(()=>v&&o&&Y&&{"aria-activedescendant":`${k}-${c}`},[v,o,Y,k,c]),J=r.useMemo(()=>({"aria-orientation":"both"===E?void 0:E,...M?{}:Z,onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&o&&!v){const t=$n(e.nativeEvent);if(t&&!Bn(A.current,t))return;return Gn(e),n.setOpen(!1,No(jo,e.nativeEvent)),void(wt(a)&&a.focus())}X(e)},onPointerMove(){_.current=!0}}),[Z,X,A,E,M,n,o,v,a]),Q=r.useMemo(()=>{function e(e){"auto"===g&&Xn(e.nativeEvent)&&(N.current=!v)}function t(e){N.current=g,"auto"===g&&Zn(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(e){const t=n.select("open");_.current=!1;const r=e.key.startsWith("Arrow"),o=function(e,t,n){return Ds(t,n?e===_n:e===Rn,e===zn)}(e.key,G(),y),i=_s(e.key,E),a=(m?o:i)||"Enter"===e.key||""===e.key.trim();if(v&&t)return X(e);if(t||x||!r){if(a){const t=_s(e.key,G());D.current=m&&t?null:e.key}m?o&&(Gn(e),t?(I.current=Pr(l,$.current),R(e)):n.setOpen(!0,No(To,e.nativeEvent,e.currentTarget))):i&&(null!=W.current&&(I.current=W.current),Gn(e),!t&&x?n.setOpen(!0,No(To,e.nativeEvent,e.currentTarget)):X(e),t&&R(e))}},onFocus(e){n.select("open")&&!v&&(I.current=-1,R(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[X,$,g,l,m,R,n,x,E,G,y,W,v]),ee=r.useMemo(()=>({...Z,...Q}),[Z,Q]);return r.useMemo(()=>d?{reference:ee,floating:J,item:q,trigger:Q}:{},[d,ee,J,Q,q])}const zs=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Vs(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingId"),a=n.useState("domReferenceElement"),s=n.useState("floatingElement"),{role:l="dialog"}=t,c=dn(),u=a?.id||c,d=r.useMemo(()=>Hn(s)?.id||i,[s,i]),f=zs.get(l)??l,p=null!=Ci(),h=r.useMemo(()=>"tooltip"===f||"label"===l?L:{"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=r.useMemo(()=>{if("tooltip"===f||"label"===l)return{["aria-"+("label"===l?"labelledby":"describedby")]:o?d:void 0};return{...h,"aria-expanded":o?"true":"false","aria-controls":o?d:void 0,..."menu"===f&&{id:u}}},[f,d,o,u,l,h]),y=r.useMemo(()=>{const e={id:d,...f&&{role:f}};return"tooltip"===f||"label"===l?e:{...e,..."menu"===f&&{"aria-labelledby":u}}},[f,d,u,l]),v=r.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 r.useMemo(()=>({reference:m,floating:y,item:v,trigger:h}),[m,y,h,v])}const Bs=.1*.1,Fs=.5;function $s(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function Us(e,t,n,r,o,i,a,s,l,c){let u=!1;return $s(e,t,n,r,o,i)&&(u=!u),$s(e,t,o,i,a,s)&&(u=!u),$s(e,t,a,s,l,c)&&(u=!u),$s(e,t,l,c,n,r)&&(u=!u),u}function Ws(e,t,n,r,o,i){const a=Math.min(n,o),s=Math.max(n,o),l=Math.min(r,i),c=Math.max(r,i);return e>=a&&e<=s&&t>=l&&t<=c}function Ks(e={}){const{blockPointerEvents:t=!1}=e,n=new vn,r=({x:e,y:t,placement:r,elements:o,onClose:i,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=o.domReference,h=o.floating;if(!p||!h||null==l||null==e||null==t)return;const{clientX:m,clientY:y}=r,v=$n(r),g="mouseleave"===r.type,b=Bn(h,v),x=Bn(p,v);if(b&&(c=!0,!g))return;if(x&&(c=!1,!g))return void(c=!0);if(g&&xt(r.relatedTarget)&&Bn(h,r.relatedTarget))return;function w(){return Boolean(s&&Yn(s.nodesRef.current,a).length>0)}function E(){w()||(n.clear(),i())}if(w())return;const O=p.getBoundingClientRect(),S=h.getBoundingClientRect(),k=e>S.right-S.width/2,P=t>S.bottom-S.height/2,j=S.width>O.width,A=S.height>O.height,T=(j?O:S).left,C=(j?O:S).right,M=(A?O:S).top,N=(A?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=Ws(m,y,T,O.top+1,C,S.bottom-1);break;case"bottom":I=Ws(m,y,T,S.top+1,C,O.bottom-1);break;case"left":I=Ws(m,y,S.right-1,N,O.left+1,M);break;case"right":I=Ws(m,y,O.right-1,N,S.left+1,M)}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,y,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 o=e-u,i=t-d;return u=e,d=t,f=n,o*o+i*i<r*r*Bs}(m,y))return void E();let D=!1;switch(l){case"top":{const n=j?.25:2,r=j||k?e+n:e-n,o=j?e-n:k?e+n:e-n,i=t+Fs+1,a=k||j?S.bottom-Fs:S.top,s=k?j?S.bottom-Fs:S.top:S.bottom-Fs;D=Us(m,y,r,i,o,i,S.left,a,S.right,s);break}case"bottom":{const n=j?.25:2,r=j||k?e+n:e-n,o=j?e-n:k?e+n:e-n,i=t-Fs,a=k||j?S.top+Fs:S.bottom,s=k?j?S.top+Fs:S.bottom:S.top+Fs;D=Us(m,y,r,i,o,i,S.left,a,S.right,s);break}case"left":{const n=A?.25:2,r=A||P?t+n:t-n,o=A?t-n:P?t+n:t-n,i=e+Fs+1,a=P||A?S.right-Fs:S.left,s=P?A?S.right-Fs:S.left:S.right-Fs;D=Us(m,y,a,S.top,s,S.bottom,i,r,i,o);break}case"right":{const n=A?.25:2,r=A||P?t+n:t-n,o=A?t-n:P?t+n:t-n,i=e-Fs,a=P||A?S.left+Fs:S.right,s=P?A?S.left+Fs:S.right:S.left+Fs;D=Us(m,y,i,r,i,o,a,S.top,s,S.bottom);break}}D?c||n.start(40,E):E()}};return r.__options={blockPointerEvents:t},r}let Hs=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),Ys=function(e){return e[e.open=Vo.open]="open",e[e.closed=Vo.closed]="closed",e[e.startingStyle=Vo.startingStyle]="startingStyle",e[e.endingStyle=Vo.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const qs=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(qs.displayName="DialogPortalContext");const Gs="ArrowUp",Xs="ArrowDown",Zs="ArrowLeft",Js="ArrowRight",Qs="Home",el=new Set([Zs,Js]),tl=new Set([Gs,Xs]),nl=new Set([...el,...tl]);new Set([...nl,Qs,"End"]);const rl=new Set([Gs,Xs,Zs,Js,Qs,"End"]),ol={...qo,...vo,nestedDialogOpen:e=>e?{[Ys.nestedDialogOpen]:""}:null},il=r.forwardRef(function(e,t){const{className:n,finalFocus:o,initialFocus:i,render:a,...s}=e,{store:l}=zo(),c=l.useState("descriptionElementId"),u=l.useState("disablePointerDismissal"),d=l.useState("floatingRootContext"),f=l.useState("popupProps"),h=l.useState("modal"),m=l.useState("mounted"),y=l.useState("nested"),v=l.useState("nestedOpenDialogCount"),g=l.useState("open"),b=l.useState("openMethod"),x=l.useState("titleElementId"),w=l.useState("transitionStatus"),E=l.useState("role");!function(){const e=r.useContext(qs);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Dialog.Portal> is missing.":k(26))}(),bo({open:g,ref:l.context.popupRef,onComplete(){g&&l.context.onOpenChangeComplete?.(!0)}});const O=void 0===i?function(e){return"touch"!==e||l.context.popupRef.current}:i,S=$("div",e,{state:{open:g,nested:y,transitionStatus:w,nestedDialogOpen:v>0},props:[f,{"aria-labelledby":x??void 0,"aria-describedby":c??void 0,role:E,tabIndex:-1,hidden:!m,onKeyDown(e){rl.has(e.key)&&e.stopPropagation()},style:{[Hs.nestedDialogs]:v}},s],ref:[t,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:ol});return p.jsx(Vi,{context:d,openInteractionType:b,disabled:!m,closeOnFocusOut:!u,initialFocus:O,returnFocus:o,modal:!1!==h,restoreFocus:"popup",children:S})});function al(e){return N(19)?e:e?"true":void 0}"production"!==process.env.NODE_ENV&&(il.displayName="DialogPopup");const sl=r.forwardRef(function(e,t){const{cutout:n,...r}=e;let o;if(n){const e=n?.getBoundingClientRect();o=`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 p.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});"production"!==process.env.NODE_ENV&&(sl.displayName="InternalBackdrop");const ll=r.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=zo(),i=o.useState("mounted"),a=o.useState("modal"),s=o.useState("open");return i||n?p.jsx(qs.Provider,{value:n,children:p.jsxs(ki,{ref:t,...r,children:[i&&!0===a&&p.jsx(sl,{ref:o.context.internalBackdropRef,inert:al(!s)}),e.children]})}):null});function cl(e){const t=r.useRef(!0);t.current&&(t.current=!1,e())}"production"!==process.env.NODE_ENV&&(ll.displayName="DialogPortal");let ul={},dl={},fl="";function pl(e){const t=xn(e),n=t.documentElement,r=t.body,o=vt(n);let i=0,a=0,s=!1;const l=uo.create();if(kn&&1!==(o.visualViewport?.scale??1))return()=>{};function c(){const t=o.getComputedStyle(n),l=o.getComputedStyle(r),c=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,ul={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},fl=n.style.scrollBehavior,dl={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,o.innerWidth-r.clientWidth),m=Math.max(0,o.innerHeight-r.clientHeight),y=parseFloat(l.marginTop)+parseFloat(l.marginBottom),v=parseFloat(l.marginLeft)+parseFloat(l.marginRight),g=Ot(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=xn(e),n=t.documentElement,r=t.body,o=Ot(n)?n:r,i=o.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const s=o.offsetWidth;o.style.overflowY="hidden";const l=o.offsetWidth;return o.style.overflowY=i,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:y||m?`calc(100dvh - ${y+m}px)`:"100dvh",width:v||h?`calc(100vw - ${v+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,ul),Object.assign(r.style,dl),s||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=fl)}function d(){u(),l.request(c)}return c(),o.addEventListener("resize",d),()=>{l.cancel(),u(),"function"==typeof o.removeEventListener&&o.removeEventListener("resize",d)}}const hl=new class{lockCount=0;restore=null;timeoutLock=vn.create();timeoutUnlock=vn.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=xn(e).documentElement,n=vt(t).getComputedStyle(t).overflowY;if("hidden"===n||"clip"===n)return void(this.restore=_);const r=Pn||!function(e){if("undefined"==typeof document)return!1;const t=xn(e);return vt(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=r?function(e){const t=xn(e),n=t.documentElement,r=t.body,o=Ot(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}(e):pl(e)}};function ml(e=!0,t=null){Yt(()=>{if(e)return hl.acquire(t)},[e,t])}function yl(e){const[t,n]=r.useState(null),o=Ft((t,r)=>{e||n(r||(Pn?"touch":""))});!function(e,t){const n=r.useRef(e),o=Ft(t);Yt(()=>{n.current!==e&&o(n.current)},[e,o]),Yt(()=>{n.current=e},[e])}(e,t=>{t&&!e&&n(null)});const{onClick:i,onPointerDown:a}=function(e){const t=r.useRef(""),n=r.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:r.useCallback(n=>{0!==n.detail?(e(n,"pointerType"in n?n.pointerType:t.current),t.current=""):e(n,"keyboard")},[e]),onPointerDown:n}}(o);return r.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}const vl={...bs,modal:Va(e=>e.modal),nested:Va(e=>e.nested),nestedOpenDialogCount:Va(e=>e.nestedOpenDialogCount),disablePointerDismissal:Va(e=>e.disablePointerDismissal),openMethod:Va(e=>e.openMethod),descriptionElementId:Va(e=>e.descriptionElementId),titleElementId:Va(e=>e.titleElementId),viewportElement:Va(e=>e.viewportElement),role:Va(e=>e.role)};class gl extends us{constructor(e){super(function(e={}){return{...vs(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}(e),{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new ys,onOpenChange:void 0,onOpenChangeComplete:void 0},vl)}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},o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)}}function bl(e){const{children:t,open:n,defaultOpen:o=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:s=!1,modal:l=!0,actionsRef:c,handle:u,triggerId:d,defaultTriggerId:f=null}=e,h=zo(!0),m=Boolean(h),y=j(()=>u?.store??new gl({open:o,openProp:n,activeTriggerId:f,triggerIdProp:d,modal:l,disablePointerDismissal:s,nested:m})).current;cl(()=>{void 0===n&&!1===y.state.open&&!0===o&&y.update({open:!0,activeTriggerId:f})}),y.useControlledProp("openProp",n),y.useControlledProp("triggerIdProp",d),y.useSyncedValues({disablePointerDismissal:s,nested:m,modal:l}),y.useContextCallback("onOpenChange",i),y.useContextCallback("onOpenChangeComplete",a);const v=y.useState("payload");!function(e){const{store:t,parentContext:n,actionsRef:o}=e,i=t.useState("open"),a=t.useState("disablePointerDismissal"),s=t.useState("modal"),l=t.useState("popupElement"),{openMethod:c,triggerProps:u}=yl(i);hs(t);const{forceUnmount:d}=ms(i,t),f=Ft(e=>{const n=No(e);return n.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},n}),p=r.useCallback(()=>{t.setOpen(!1,f(Mo))},[t,f]);r.useImperativeHandle(o,()=>({unmount:d,close:p}),[d,p]);const h=ws({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,y]=r.useState(0),v=0===m,g=Vs(h),b=Ui(h,{outsidePressEvent:()=>t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(e){if(!t.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 n=$n(e);if(v&&!a){const e=n;return!s||!t.context.internalBackdropRef.current&&!t.context.backdropRef.current||t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||Bn(e,l)&&!e?.hasAttribute("data-base-ui-portal")}return!1},escapeKey:v});ml(i&&!0===s,l);const{getReferenceProps:x,getFloatingProps:w,getTriggerProps:E}=Ms([g,b]);t.useContextCallback("onNestedDialogOpen",e=>{y(e+1)}),t.useContextCallback("onNestedDialogClose",()=>{y(0)}),r.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,m]);const O=r.useMemo(()=>x(u),[x,u]),S=r.useMemo(()=>E(u),[E,u]),k=r.useMemo(()=>w(),[w]);t.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:S,popupProps:k,floatingRootContext:h,nestedOpenDialogCount:m})}({store:y,actionsRef:c,parentContext:h?.store.context});const g=r.useMemo(()=>({store:y}),[y]);return p.jsx(Lo.Provider,{value:g,children:"function"==typeof t?t({payload:v}):t})}const xl=r.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{store:a}=zo(),s=fn(o);return a.useSyncedValueWithCleanup("titleElementId",s),$("h2",e,{ref:t,props:[{id:s},i]})});"production"!==process.env.NODE_ENV&&(xl.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 wl=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),El=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ol=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 Sl={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},Pl=e.createContext({}),jl=e.forwardRef(({color:t,size:n,strokeWidth:r,absoluteStrokeWidth:o,className:i="",children:a,iconNode:s,...l},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:h=""}=e.useContext(Pl)??{},m=o??f?24*Number(r??d)/Number(n??u):r??d;return e.createElement("svg",{ref:c,...Sl,width:n??u??Sl.width,height:n??u??Sl.height,stroke:t??p,strokeWidth:m,className:wl("lucide",h,i),...!a&&!kl(l)&&{"aria-hidden":"true"},...l},[...s.map(([t,n])=>e.createElement(t,n)),...Array.isArray(a)?a:[a]])}),Al=(t,n)=>{const r=e.forwardRef(({className:r,...o},i)=>e.createElement(jl,{ref:i,iconNode:n,className:wl(`lucide-${El(Ol(t))}`,`lucide-${t}`,r),...o}));return r.displayName=Ol(t),r},Tl=Al("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"}]]),Cl=Al("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"}]]),Ml=Al("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"}]]),Nl=Al("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"}]]),Il=Al("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"}]]),Dl=Al("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"}]]),_l=Al("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"}]]),Rl=Al("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"}]]),Ll=Al("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"}]]),zl=Al("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Vl=Al("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Bl=Al("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"}]]),Fl=Al("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"}]]),$l=Al("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),Ul=Al("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),Wl=Al("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"}]]),Kl=Al("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"}]]),Hl=Al("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yl=Al("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 ql(e){var t=h(e,[]);return p.jsx(bl,Object.assign({"data-slot":"sheet"},t))}function Gl(e){var t=h(e,[]);return p.jsx(ll,Object.assign({"data-slot":"sheet-portal"},t))}function Xl(e){var{className:t}=e,n=h(e,["className"]);return p.jsx(Xo,Object.assign({"data-slot":"sheet-overlay",className:ht("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 Zl(e){var{className:t,children:n,side:r="right",showCloseButton:o=!0}=e,i=h(e,["className","children","side","showCloseButton"]);return p.jsxs(Gl,{children:[p.jsx(Xl,{}),p.jsxs(il,Object.assign({"data-slot":"sheet-content","data-side":r,className:ht("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)},i,{children:[n,o&&p.jsxs(Zo,{"data-slot":"sheet-close",render:p.jsx(en,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[p.jsx(Hl,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})}function Jl(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"sheet-header",className:ht("flex flex-col gap-0.5 p-4",t)},n))}function Ql(e){var{className:t}=e,n=h(e,["className"]);return p.jsx(xl,Object.assign({"data-slot":"sheet-title",className:ht("font-heading text-base font-medium text-foreground",t)},n))}function ec(e){var{className:t}=e,n=h(e,["className"]);return p.jsx(Jo,Object.assign({"data-slot":"sheet-description",className:ht("text-sm text-muted-foreground",t)},n))}function tc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"skeleton",className:ht("animate-pulse rounded-md bg-muted",t)},n))}const nc=r.createContext(void 0);function rc(e){const t=r.useContext(nc);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.":k(72));return t}"production"!==process.env.NODE_ENV&&(nc.displayName="TooltipRootContext");const oc={...bs,disabled:Va(e=>e.disabled),instantType:Va(e=>e.instantType),isInstantPhase:Va(e=>e.isInstantPhase),trackCursorAxis:Va(e=>e.trackCursorAxis),disableHoverablePopup:Va(e=>e.disableHoverablePopup),lastOpenChangeReason:Va(e=>e.openChangeReason),closeOnClick:Va(e=>e.closeOnClick),closeDelay:Va(e=>e.closeDelay),hasViewport:Va(e=>e.hasViewport)};class ic extends us{constructor(e){super({...{...vs(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1},...e},{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new ys},oc)}setOpen=(e,t)=>{const n=t.reason,r=n===Oo,i=e&&n===So,a=!e&&(n===Eo||n===Ao);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const s=()=>{const r={open:e,openChangeReason:n};i?r.instantType="focus":a?r.instantType="dismiss":n===Oo&&(r.instantType=void 0);const o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?o.flushSync(s):s()};static useStore(e,t){const n=j(()=>new ic(t)).current,r=e??n,o=ws({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=o,r}}const ac=rs(function(e){const{disabled:t=!1,defaultOpen:n=!1,open:o,disableHoverablePopup:i=!1,trackCursorAxis:a="none",actionsRef:s,onOpenChange:l,onOpenChangeComplete:c,handle:u,triggerId:d,defaultTriggerId:f=null,children:h}=e,m=ic.useStore(u?.store,{open:n,openProp:o,activeTriggerId:f,triggerIdProp:d});cl(()=>{void 0===o&&!1===m.state.open&&!0===n&&m.update({open:!0,activeTriggerId:f})}),m.useControlledProp("openProp",o),m.useControlledProp("triggerIdProp",d),m.useContextCallback("onOpenChange",l),m.useContextCallback("onOpenChangeComplete",c);const y=m.useState("open"),v=!t&&y,g=m.useState("activeTriggerId"),b=m.useState("payload");m.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),Yt(()=>{y&&t&&m.setOpen(!1,No("disabled"))},[y,t,m]),m.useSyncedValue("disabled",t),hs(m);const{forceUnmount:x,transitionStatus:w}=ms(v,m),E=m.useState("isInstantPhase"),O=m.useState("instantType"),S=m.useState("lastOpenChangeReason"),k=r.useRef(null);Yt(()=>{"ending"===w&&S===wo||"ending"!==w&&E?("delay"!==O&&(k.current=O),m.set("instantType","delay")):null!==k.current&&(m.set("instantType",k.current),k.current=null)},[w,E,S,O,m]),Yt(()=>{v&&null==g&&m.set("payload",void 0)},[m,g,v]);const P=r.useCallback(()=>{m.setOpen(!1,function(e,t){const n=No(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}(m,Mo))},[m]);r.useImperativeHandle(s,()=>({unmount:x,close:P}),[x,P]);const j=m.useState("floatingRootContext"),A=Ui(j,{enabled:!t,referencePress:()=>m.select("closeOnClick")}),T=function(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),s=n.context.dataRef,{enabled:l=!0,axis:c="both"}=t,u=r.useRef(!1),d=r.useRef(null),[f,p]=r.useState(),[h,m]=r.useState([]),y=Ft((e,t,r)=>{u.current||s.current.openEvent&&!Bi(s.current.openEvent)||n.set("positionReference",function(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const i=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=i.width,u=i.height,d=i.x,f=i.y;return null==n&&t.x&&a&&(n=i.x-t.x),null==r&&t.y&&s&&(r=i.y-t.y),d-=n||0,f-=r||0,c=0,u=0,!o||l?(c="y"===t.axis?i.width:0,u="x"===t.axis?i.height:0,d=a&&null!=t.x?t.x:d,f=s&&null!=t.y?t.y:f):o&&!l&&(u="x"===t.axis?i.height:u,c="y"===t.axis?i.width:c),o=!0,{width:c,height:u,x:d,y:f,top:f,right:d+c,bottom:f+u,left:d}}}}(r??a,{x:e,y:t,axis:c,dataRef:s,pointerType:f}))}),v=Ft(e=>{o?d.current||m([]):y(e.clientX,e.clientY,e.currentTarget)}),g=Jn(f)?i:o,b=r.useCallback(()=>{if(!g||!l)return;const e=vt(i);function t(n){const r=$n(n);Bn(i,r)?(e.removeEventListener("mousemove",t),d.current=null):y(n.clientX,n.clientY)}if(!s.current.openEvent||Bi(s.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),d.current=null};return d.current=n,n}n.set("positionReference",a)},[g,l,i,s,a,n,y]);r.useEffect(()=>b(),[b,h]),r.useEffect(()=>{l&&!i&&(u.current=!1)},[l,i]),r.useEffect(()=>{!l&&o&&(u.current=!0)},[l,o]);const x=r.useMemo(()=>{function e(e){p(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return r.useMemo(()=>l?{reference:x,trigger:x}:{},[l,x])}(j,{enabled:!t&&"none"!==a,axis:"none"===a?void 0:a}),{getReferenceProps:C,getFloatingProps:M,getTriggerProps:N}=Ms([A,T]),I=r.useMemo(()=>C(),[C]),D=r.useMemo(()=>N(),[N]),_=r.useMemo(()=>M(),[M]);return m.useSyncedValues({activeTriggerProps:I,inactiveTriggerProps:D,popupProps:_}),p.jsx(nc.Provider,{value:m,children:"function"==typeof h?h({payload:b}):h})});"production"!==process.env.NODE_ENV&&(ac.displayName="TooltipRoot");const sc=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(sc.displayName="TooltipProviderContext");let lc=function(e){return e[e.popupOpen=Bo.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e}({});const cc=os(function(e,t){const{className:n,render:o,handle:i,payload:a,disabled:s,delay:l,closeOnClick:c=!0,closeDelay:u,id:d,...f}=e,p=rc(!0),h=i?.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=fn(d),y=h.useState("isTriggerActive",m),v=h.useState("isOpenedByTrigger",m),g=h.useState("floatingRootContext"),b=r.useRef(null),x=l??600,w=u??0,{registerTrigger:E,isMountedByThisTrigger:O}=ps(m,b,h,{payload:a,closeOnClick:c,closeDelay:w}),S=r.useContext(sc),{delayRef:P,isInstantPhase:j,hasProvider:A}=function(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,o=n.useState("floatingId"),{open:i}=t,a=r.useContext(ni),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:p}=a,[h,m]=r.useState(!1);return Yt(()=>{function e(){m(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current}if(s.current&&!i&&s.current===o){if(m(!1),c){const t=o;return p.start(c,()=>{n.select("open")||s.current&&s.current!==t||e()}),()=>{p.clear()}}e()}},[i,o,s,l,c,u,d,p,n]),Yt(()=>{if(!i)return;const e=d.current,t=s.current;p.clear(),d.current={onOpenChange:n.setOpen,setIsInstantPhase:m},s.current=o,l.current={open:0,close:Qo(u.current,"close")},null!==t&&t!==o?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,No(wo))):(m(!1),e?.setIsInstantPhase(!1))},[i,o,n,s,l,c,u,d,p]),Yt(()=>()=>{d.current=null},[d]),r.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}(g,{open:v});h.useSyncedValue("isInstantPhase",j);const T=h.useState("disabled"),C=s??T,M=h.useState("trackCursorAxis");return $("button",e,{state:{open:v},ref:[t,E,b],props:[Cs(g,{enabled:!C,mouseOnly:!0,move:!1,handleClose:h.useState("disableHoverablePopup")||"both"===M?null:Ks(),restMs(){const e=S?.delay,t="object"==typeof P.current?P.current.open:void 0;let n=x;return A&&(n=0!==t?l??e??x:0),n},delay(){const e="object"==typeof P.current?P.current.close:void 0;let t=w;return null==u&&A&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:y}),Os(g,{enabled:!C}).reference,h.useState("triggerProps",O),{onPointerDown(){h.set("closeOnClick",c)},id:m,[lc.triggerDisabled]:C?"":void 0},f],stateAttributesMapping:Ho})});"production"!==process.env.NODE_ENV&&(cc.displayName="TooltipTrigger");const uc=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(uc.displayName="TooltipPortalContext");const dc=r.forwardRef(function(e,t){const{children:n,container:i,className:a,render:s,...l}=e,{portalNode:c,portalSubtree:u}=Si({container:i,ref:t,componentProps:e,elementProps:l});return u||c?p.jsxs(r.Fragment,{children:[u,c&&o.createPortal(n,c)]}):null});"production"!==process.env.NODE_ENV&&(dc.displayName="FloatingPortalLite");const fc=r.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return rc().useState("mounted")||n?p.jsx(uc.Provider,{value:n,children:p.jsx(dc,{ref:t,...r})}):null});"production"!==process.env.NODE_ENV&&(fc.displayName="TooltipPortal");const pc=r.createContext(void 0);function hc(){const e=r.useContext(pc);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.":k(71));return e}"production"!==process.env.NODE_ENV&&(pc.displayName="TooltipPositionerContext");const mc=r.createContext(void 0);function yc(){const e=r.useContext(mc);return e?.direction??"ltr"}"production"!==process.env.NODE_ENV&&(mc.displayName="DirectionContext");const vc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0,offsetParent:d="real"}=lr(e,t)||{};if(null==c)return{};const f=Er(u),p={x:n,y:r},h=hr(o),m=fr(h),y=await a.getDimensions(c),v="y"===h,g=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[h]-p[h]-i.floating[m],E=p[h]-i.reference[h],O="real"===d?await(a.getOffsetParent?.(c)):s.floating;let S=s.floating[x]||i.floating[m];S&&await(a.isElement?.(O))||(S=s.floating[x]||i.floating[m]);const k=w/2-E/2,P=S/2-y[m]/2-1,j=Math.min(f[g],P),A=Math.min(f[b],P),T=j,C=S-y[m]-A,M=S/2-y[m]/2+k,N=sr(T,M,C),I=!l.arrow&&null!=ur(o)&&M!==N&&i.reference[m]/2-(M<T?j:A)-y[m]/2<0,D=I?M<T?M-T:M-C:0;return{[h]:p[h]+D,data:{[h]:N,centerOffset:M-N-D,...I&&{alignmentOffset:D}},reset:I}}}),gc={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=0===t&&0===n&&0===r&&0===o,a=await((e,t)=>{const n=ya(e);return{name:n.name,fn:n.fn,options:[e,t]}})().fn(e);return{data:{referenceHidden:a.data?.referenceHidden||i}}}},bc={sideX:"left",sideY:"top"},xc={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:s}=e,l=vt(o),c=l.getComputedStyle(o);if(!("0s"!==c.transitionDuration&&""!==c.transitionDuration))return{x:t,y:n,data:bc};const u=await(i.getOffsetParent?.(o));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=xn(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(i.isElement?.(u))&&(d=await i.getDimensions(u));const f=cr(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":bc.sideX,sideY:"top"===f?"bottom":bc.sideY}}}};function wc(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 Ec(e,t,n){const{rects:r,placement:o}=e;return{side:wc(t,cr(o),n),align:ur(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Oc(e){const{anchor:t,positionMethod:n="absolute",side:o="bottom",sideOffset:i=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:y,shiftCrossAxis:v=!1,nodeId:g,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:w}=e,[E,O]=r.useState(null);m||null===E||O(null);const S=y.side||"flip",k=y.align||"flip",P=y.fallbackAxisSide||"end",j="function"==typeof t?t:void 0,A=Ft(j),T=j?A:t,C=ri(t),M="rtl"===yc(),N=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":M?"left":"right","inline-start":M?"right":"left"}[o],I="center"===a?N:`${N}-${a}`;let D=c;const _="bottom"===o?1:0,R="top"===o?1:0,L="right"===o?1:0,z="left"===o?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=r.useRef(null),F=ri(i),$=ri(s),U=[Sa(e=>{const t=Ec(e,o,M),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 i?i:0,"function"!=typeof s?s:0,M,o])],W="none"===k&&"shift"!==S,K=!W&&(u||v||"shift"===S),H="none"===S?null:((e,t)=>{const n=ha(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:!v&&"flip"===S,crossAxis:"flip"===k&&"alignment",fallbackAxisSideDirection:P}),Y=W?null:((e,t)=>{const n=pa(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=xn(e.elements.floating).documentElement;return{...V,rootBoundary:v?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==k,crossAxis:K,limiter:u||v?void 0:(n=e=>{if(!B.current)return{};const{width:t,height:n}=B.current.getBoundingClientRect(),r=pr(cr(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?D.left+D.right:D.top+D.bottom)/2}},{fn:va(n).fn,options:[n,r]})};var n,r},[V,u,v,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=ma(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){const o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);const i=window.devicePixelRatio||1,{x:a,y:s,width:l,height:c}=r.reference,u=(Math.round((a+l)*i)-Math.round(a*i))/i,d=(Math.round((s+c)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${u}px`),o.setProperty("--anchor-height",`${d}px`)}}),(G=[d],{...vc(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=cr(r),c=pr(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),y=a.reference.height/2,v="function"==typeof i?i(Ec(e,o,M)):i,g=m>v,b={top:`${p}px calc(100% + ${v}px)`,bottom:`${p}px ${-v}px`,left:`calc(100% + ${v}px) ${h}px`,right:`${-v}px ${h}px`}[l],x=`${p}px ${a.reference.y+y-s}px`;return t.floating.style.setProperty("--transform-origin",K&&"y"===c&&g?x:b),{}}},gc,b),Yt(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,h]);const X=r.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:oe,isPositioned:ie,floatingStyles:ae}=xs({rootContext:h,placement:I,middleware:U,strategy:n,whileElementsMounted:p?void 0:(...e)=>da(...e,X),nodeId:g,externalTree:w}),{sideX:se,sideY:le}=te.adaptiveOrigin||bc,ce=ie?n:"fixed",ue=r.useMemo(()=>{const e=b?{position:ce,[se]:Q,[le]:ee}:{position:ce,...ae};return ie||(e.opacity=0),e},[b,ce,se,Q,le,ee,ae,ie]),de=r.useRef(null);Yt(()=>{if(!m)return;const e=C.current,t="function"==typeof e?e():e,n=(Sc(t)?t.current:t)||null||null;n!==de.current&&(Z.setPositionReference(n),de.current=n)},[m,Z,T,C]),r.useEffect(()=>{if(!m)return;const e=C.current;"function"!=typeof e&&Sc(e)&&e.current!==de.current&&(Z.setPositionReference(e.current),de.current=e.current)},[m,Z,T,C]),r.useEffect(()=>{if(p&&m&&J.domReference&&J.floating)return da(J.domReference,J.floating,ne,X)},[p,m,J,ne,X]);const fe=cr(re),pe=wc(o,fe,M),he=ur(re)||"center",me=Boolean(te.hide?.referenceHidden);Yt(()=>{x&&m&&ie&&O(fe)},[x,m,ie,fe]);const ye=r.useMemo(()=>({position:"absolute",top:te.arrow?.y,left:te.arrow?.x}),[te.arrow]),ve=0!==te.arrow?.centerOffset;return r.useMemo(()=>({positionerStyles:ue,arrowStyles:ye,arrowRef:B,arrowUncentered:ve,side:pe,align:he,physicalSide:fe,anchorHidden:me,refs:Z,context:oe,isPositioned:ie,update:ne}),[ue,ye,B,ve,pe,he,fe,me,Z,oe,ie,ne])}function Sc(e){return null!=e&&"current"in e}function kc(e){return"starting"===e?z:L}const Pc=r.forwardRef(function(e,t){const{render:n,className:o,anchor:i,positionMethod:a="absolute",side:s="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:y=!1,collisionAvoidance:v=B,...g}=e,b=rc(),x=function(){const e=r.useContext(uc);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Tooltip.Portal> is missing.":k(70));return e}(),w=b.useState("open"),E=b.useState("mounted"),O=b.useState("trackCursorAxis"),S=b.useState("disableHoverablePopup"),P=b.useState("floatingRootContext"),j=b.useState("instantType"),A=b.useState("transitionStatus"),T=b.useState("hasViewport"),C=Oc({anchor:i,positionMethod:a,floatingRootContext:P,mounted:E,side:s,sideOffset:c,align:l,alignOffset:u,collisionBoundary:d,collisionPadding:f,sticky:m,arrowPadding:h,disableAnchorTracking:y,keepMounted:x,collisionAvoidance:v,adaptiveOrigin:T?xc:void 0}),M=r.useMemo(()=>{const e={};return w&&"both"!==O&&!S||(e.pointerEvents="none"),{role:"presentation",hidden:!E,style:{...C.positionerStyles,...e}}},[w,O,S,E,C.positionerStyles]),N=r.useMemo(()=>({open:w,side:C.side,align:C.align,anchorHidden:C.anchorHidden,instant:"none"!==O?"tracking-cursor":j}),[w,C.side,C.align,C.anchorHidden,O,j]),I=r.useMemo(()=>({...N,arrowRef:C.arrowRef,arrowStyles:C.arrowStyles,arrowUncentered:C.arrowUncentered}),[N,C.arrowRef,C.arrowStyles,C.arrowUncentered]),D=$("div",e,{state:N,props:[M,kc(A),g],ref:[t,b.useStateSetter("positionerElement")],stateAttributesMapping:qo});return p.jsx(pc.Provider,{value:I,children:D})});"production"!==process.env.NODE_ENV&&(Pc.displayName="TooltipPositioner");const jc={...qo,...vo},Ac=r.forwardRef(function(e,t){const{className:n,render:r,...o}=e,i=rc(),{side:a,align:s}=hc(),l=i.useState("open"),c=i.useState("instantType"),u=i.useState("transitionStatus"),d=i.useState("popupProps"),f=i.useState("floatingRootContext");bo({open:l,ref:i.context.popupRef,onComplete(){l&&i.context.onOpenChangeComplete?.(!0)}});As(f,{enabled:!i.useState("disabled"),closeDelay:i.useState("closeDelay")});return $("div",e,{state:{open:l,side:a,align:s,instant:c,transitionStatus:u},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[d,kc(u),o],stateAttributesMapping:jc})});"production"!==process.env.NODE_ENV&&(Ac.displayName="TooltipPopup");const Tc=r.forwardRef(function(e,t){const{className:n,render:r,...o}=e,i=rc().useState("instantType"),{open:a,arrowRef:s,side:l,align:c,arrowUncentered:u,arrowStyles:d}=hc();return $("div",e,{state:{open:a,side:l,align:c,uncentered:u,instant:i},ref:[t,s],props:[{style:d,"aria-hidden":!0},o],stateAttributesMapping:qo})});function Cc(e){var t=h(e,[]);return p.jsx(ac,Object.assign({"data-slot":"tooltip"},t))}function Mc(e){var t=h(e,[]);return p.jsx(cc,Object.assign({"data-slot":"tooltip-trigger"},t))}function Nc(e){var{className:t,side:n="top",sideOffset:r=4,align:o="center",alignOffset:i=0,children:a}=e,s=h(e,["className","side","sideOffset","align","alignOffset","children"]);return p.jsx(fc,{children:p.jsx(Pc,{align:o,alignOffset:i,side:n,sideOffset:r,className:"isolate z-50",children:p.jsxs(Ac,Object.assign({"data-slot":"tooltip-content",className:ht("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)},s,{children:[a,p.jsx(Tc,{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&&(Tc.displayName="TooltipArrow");const Ic=r.createContext(null);function Dc(){const e=r.useContext(Ic);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function _c(e){var{defaultOpen:t=!0,open:n,onOpenChange:o,className:i,style:a,children:s}=e,l=h(e,["defaultOpen","open","onOpenChange","className","style","children"]);const c=function(){const[e,t]=r.useState(void 0);return r.useEffect(()=>{const e=window.matchMedia("(max-width: 767px)"),n=()=>{t(window.innerWidth<768)};return e.addEventListener("change",n),t(window.innerWidth<768),()=>e.removeEventListener("change",n)},[]),!!e}(),[u,d]=r.useState(!1),[f,m]=r.useState(t),y=null!=n?n:f,v=r.useCallback(e=>{const t="function"==typeof e?e(y):e;o?o(t):m(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[o,y]),g=r.useCallback(()=>c?d(e=>!e):v(e=>!e),[c,v,d]);r.useEffect(()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]);const b=y?"expanded":"collapsed",x=r.useMemo(()=>({state:b,open:y,setOpen:v,isMobile:c,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[b,y,v,c,u,d,g]);return p.jsx(Ic.Provider,{value:x,children:p.jsx("div",Object.assign({"data-slot":"sidebar-wrapper",style:Object.assign({"--sidebar-width":"16rem","--sidebar-width-icon":"3rem"},a),className:ht("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i)},l,{children:s}))})}function Rc(e){var{side:t="left",variant:n="sidebar",collapsible:r="offcanvas",className:o,children:i,dir:a}=e,s=h(e,["side","variant","collapsible","className","children","dir"]);const{isMobile:l,state:c,openMobile:u,setOpenMobile:d}=Dc();return"none"===r?p.jsx("div",Object.assign({"data-slot":"sidebar",className:ht("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",o)},s,{children:i})):l?p.jsx(ql,Object.assign({open:u,onOpenChange:d},s,{children:p.jsxs(Zl,{dir:a,"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:t,children:[p.jsxs(Jl,{className:"sr-only",children:[p.jsx(Ql,{children:"Sidebar"}),p.jsx(ec,{children:"Displays the mobile sidebar."})]}),p.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})})):p.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":"collapsed"===c?r:"","data-variant":n,"data-side":t,"data-slot":"sidebar",children:[p.jsx("div",{"data-slot":"sidebar-gap",className:ht("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"===n||"inset"===n?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),p.jsx("div",Object.assign({"data-slot":"sidebar-container","data-side":t,className:ht("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"===n||"inset"===n?"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",o)},s,{children:p.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:i})}))]})}function Lc(e){var{className:t,onClick:n}=e,r=h(e,["className","onClick"]);const{toggleSidebar:o}=Dc();return p.jsxs(en,Object.assign({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:ht(t),onClick:e=>{null==n||n(e),o()}},r,{children:[p.jsx(zl,{}),p.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]}))}function zc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("main",Object.assign({"data-slot":"sidebar-inset",className:ht("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 Vc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"sidebar-header","data-sidebar":"header",className:ht("flex flex-col gap-2 p-2",t)},n))}function Bc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"sidebar-footer","data-sidebar":"footer",className:ht("flex flex-col gap-2 p-2",t)},n))}function Fc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"sidebar-content","data-sidebar":"content",className:ht("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t)},n))}function $c(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"sidebar-group","data-sidebar":"group",className:ht("relative flex w-full min-w-0 flex-col p-2",t)},n))}function Uc(e){var{className:t,render:n}=e,r=h(e,["className","render"]);return W({defaultTagName:"div",props:v({className:ht("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 Wc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ht("w-full text-sm",t)},n))}function Kc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("ul",Object.assign({"data-slot":"sidebar-menu","data-sidebar":"menu",className:ht("flex w-full min-w-0 flex-col gap-0",t)},n))}function Hc(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("li",Object.assign({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ht("group/menu-item relative",t)},n))}const Yc=G("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 qc(e){var{render:t,isActive:n=!1,variant:r="default",size:o="default",tooltip:i,className:a}=e,s=h(e,["render","isActive","variant","size","tooltip","className"]);const{isMobile:l,state:c}=Dc(),u=W({defaultTagName:"button",props:v({className:ht(Yc({variant:r,size:o}),a)},s),render:i?p.jsx(Mc,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:o,active:n}});return i?("string"==typeof i&&(i={children:i}),p.jsxs(Cc,{children:[u,p.jsx(Nc,Object.assign({side:"right",align:"center",hidden:"collapsed"!==c||l},i))]})):u}const Gc=e.createContext({});function Xc(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const Zc="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Jc=e.createContext(null);function Qc(e,t){-1===e.indexOf(t)&&e.push(t)}function eu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const tu=(e,t,n)=>n>t?t:n<e?e:n;function nu(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ru=()=>{},ou=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(ru=(e,t,n)=>{e||"undefined"==typeof console||console.warn(nu(t,n))},ou=(e,t,n)=>{if(!e)throw new Error(nu(t,n))});const iu={},au=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function su(e){return"object"==typeof e&&null!==e}const lu=e=>/^0[^.\s]+$/u.test(e);function cu(e){let t;return()=>(void 0===t&&(t=e()),t)}const uu=e=>e,du=(e,t)=>n=>t(e(n)),fu=(...e)=>e.reduce(du),pu=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class hu{constructor(){this.subscriptions=[]}add(e){return Qc(this.subscriptions,e),()=>eu(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 o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mu=e=>1e3*e,yu=e=>e/1e3;function vu(e,t){return t?e*(1e3/t):0}const gu=new Set;function bu(e,t,n){e||gu.has(t)||(console.warn(nu(t,n)),gu.add(t))}const xu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function wu(e,t,n,r){if(e===t&&n===r)return uu;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=xu(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:xu(o(e),t,r)}const Eu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ou=e=>t=>1-e(1-t),Su=wu(.33,1.53,.69,.99),ku=Ou(Su),Pu=Eu(ku),ju=e=>e>=1?1:(e*=2)<1?.5*ku(e):.5*(2-Math.pow(2,-10*(e-1))),Au=e=>1-Math.sin(Math.acos(e)),Tu=Ou(Au),Cu=Eu(Au),Mu=wu(.42,0,1,1),Nu=wu(0,0,.58,1),Iu=wu(.42,0,.58,1),Du=e=>Array.isArray(e)&&"number"==typeof e[0],_u={linear:uu,easeIn:Mu,easeInOut:Iu,easeOut:Nu,circIn:Au,circInOut:Cu,circOut:Tu,backIn:ku,backInOut:Pu,backOut:Su,anticipate:ju},Ru=e=>{if(Du(e)){ou(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return wu(t,n,r,o)}return"string"==typeof e?(ou(void 0!==_u[e],`Invalid easing type '${e}'`,"invalid-easing-type"),_u[e]):e},Lu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zu(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Lu.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{if(a=e,r)return void(o=!0);r=!0;const i=t;t=n,n=i,t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e))}};return l}(i),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=a,m=()=>{const i=iu.useManualTiming,a=i?o.timestamp:performance.now();n=!1,i||(o.delta=r?1e3/60:Math.max(Math.min(a-o.timestamp,40),1)),o.timestamp=a,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Lu.reduce((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,i,a)),t},{}),cancel:e=>{for(let t=0;t<Lu.length;t++)a[Lu[t]].cancel(e)},state:o,steps:a}}const{schedule:Vu,cancel:Bu,state:Fu,steps:$u}=zu("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:uu,!0);let Uu;function Wu(){Uu=void 0}const Ku={now:()=>(void 0===Uu&&Ku.set(Fu.isProcessing||iu.useManualTiming?Fu.timestamp:performance.now()),Uu),set:e=>{Uu=e,queueMicrotask(Wu)}},Hu=e=>t=>"string"==typeof t&&t.startsWith(e),Yu=Hu("--"),qu=Hu("var(--"),Gu=e=>!!qu(e)&&Xu.test(e.split("/*")[0].trim()),Xu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zu(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Ju={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Qu={...Ju,transform:e=>tu(0,1,e)},ed={...Ju,default:1},td=e=>Math.round(1e5*e)/1e5,nd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const rd=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,od=(e,t)=>n=>Boolean("string"==typeof n&&rd.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),id=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(nd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},ad={...Ju,transform:e=>Math.round((e=>tu(0,255,e))(e))},sd={test:od("rgb","red"),parse:id("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ad.transform(e)+", "+ad.transform(t)+", "+ad.transform(n)+", "+td(Qu.transform(r))+")"};const ld={test:od("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:sd.transform},cd=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),ud=cd("deg"),dd=cd("%"),fd=cd("px"),pd=cd("vh"),hd=cd("vw"),md=(()=>({...dd,parse:e=>dd.parse(e)/100,transform:e=>dd.transform(100*e)}))(),yd={test:od("hsl","hue"),parse:id("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dd.transform(td(t))+", "+dd.transform(td(n))+", "+td(Qu.transform(r))+")"},vd={test:e=>sd.test(e)||ld.test(e)||yd.test(e),parse:e=>sd.test(e)?sd.parse(e):yd.test(e)?yd.parse(e):ld.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?sd.transform(e):yd.transform(e),getAnimatableNone:e=>{const t=vd.parse(e);return t.alpha=0,vd.transform(t)}},gd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const bd="number",xd="color",wd=/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 Ed(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(wd,e=>(vd.test(e)?(r.color.push(i),o.push(xd),n.push(vd.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(bd),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:a,indexes:r,types:o}}function Od({split:e,types:t}){const n=e.length;return r=>{let o="";for(let i=0;i<n;i++)if(o+=e[i],void 0!==r[i]){const e=t[i];o+=e===bd?td(r[i]):e===xd?vd.transform(r[i]):r[i]}return o}}const Sd=(e,t)=>{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:vd.test(n)?vd.getAnimatableNone(n):n;var n};const kd={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(nd)?.length||0)+(e.match(gd)?.length||0)>0},parse:function(e){return Ed(e).values},createTransformer:function(e){return Od(Ed(e))},getAnimatableNone:function(e){const t=Ed(e);return Od(t)(t.values.map((e,n)=>Sd(e,t.split[n])))}};function Pd(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 jd(e,t){return n=>n>0?t:e}const Ad=(e,t,n)=>e+(t-e)*n,Td=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Cd=[ld,sd,yd];function Md(e){const t=(n=e,Cd.find(e=>e.test(n)));var n;if(ru(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===yd&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Pd(s,r,e+1/3),i=Pd(s,r,e),a=Pd(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const Nd=(e,t)=>{const n=Md(e),r=Md(t);if(!n||!r)return jd(e,t);const o={...n};return e=>(o.red=Td(n.red,r.red,e),o.green=Td(n.green,r.green,e),o.blue=Td(n.blue,r.blue,e),o.alpha=Ad(n.alpha,r.alpha,e),sd.transform(o))},Id=new Set(["none","hidden"]);function Dd(e,t){return n=>Ad(e,t,n)}function _d(e){return"number"==typeof e?Dd:"string"==typeof e?Gu(e)?jd:vd.test(e)?Nd:zd:Array.isArray(e)?Rd:"object"==typeof e?vd.test(e)?Nd:Ld:jd}function Rd(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>_d(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Ld(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=_d(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const zd=(e,t)=>{const n=kd.createTransformer(t),r=Ed(e),o=Ed(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Id.has(e)&&!o.values.length||Id.has(t)&&!r.values.length?function(e,t){return Id.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):fu(Rd(function(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}(r,o),o.values),n):(ru(!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"),jd(e,t))};function Vd(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Ad(e,t,n);return _d(e)(e,t)}const Bd=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Vu.update(t,e),stop:()=>Bu(t),now:()=>Fu.isProcessing?Fu.timestamp:Ku.now()}},Fd=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=Math.round(1e4*e(t/(o-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},$d=2e4;function Ud(e){let t=0;let n=e.next(t);for(;!n.done&&t<$d;)t+=50,n=e.next(t);return t>=$d?1/0:t}const Wd=100,Kd=10,Hd=1,Yd=0,qd=800,Gd=.3,Xd=.3,Zd={granular:.01,default:2},Jd={granular:.005,default:.5},Qd=.01,ef=10,tf=.05,nf=1;function rf(e,t){return e*Math.sqrt(1-t*t)}const of=.001;const af=["duration","bounce"],sf=["stiffness","damping","mass"];function lf(e,t){return t.some(t=>void 0!==e[t])}function cf(e){let t={velocity:Yd,stiffness:Wd,damping:Kd,mass:Hd,isResolvedFromDuration:!1,...e};if(!lf(e,sf)&&lf(e,af))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*tu(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Hd,stiffness:o,damping:i}}else{const n=function({duration:e=qd,bounce:t=Gd,velocity:n=Yd,mass:r=Hd}){let o,i;ru(e<=mu(ef),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=tu(tf,nf,a),e=tu(Qd,ef,yu(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=rf(t,a),l=Math.exp(-o);return of-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=rf(Math.pow(t,2),a);return(-o(t)+of>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=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}(o,i,5/e);if(e=mu(e),isNaN(s))return{stiffness:Wd,damping:Kd,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:Hd},t.isResolvedFromDuration=!0}return t}function uf(e=Xd,t=Gd){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=cf({...n,velocity:-yu(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),y=a-i,v=yu(Math.sqrt(l/u)),g=Math.abs(y)<5;let b,x,w,E,O,S;if(r||(r=g?Zd.granular:Zd.default),o||(o=g?Jd.granular:Jd.default),m<1)w=rf(v,m),E=(h+m*v*y)/w,b=e=>{const t=Math.exp(-m*v*e);return a-t*(E*Math.sin(w*e)+y*Math.cos(w*e))},O=m*v*E+y*w,S=m*v*y-E*w,x=e=>Math.exp(-m*v*e)*(O*Math.sin(w*e)+S*Math.cos(w*e));else if(1===m){b=e=>a-Math.exp(-v*e)*(y+(h+v*y)*e);const e=h+v*y;x=t=>Math.exp(-v*t)*(v*e*t-h)}else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return a-n*((h+m*v*y)*Math.sinh(r)+e*y*Math.cosh(r))/e};const t=(h+m*v*y)/e,n=m*v*t-y*e,r=m*v*y-t*e;x=t=>{const o=Math.exp(-m*v*t),i=Math.min(e*t,300);return o*(n*Math.sinh(i)+r*Math.cosh(i))}}const k={calculatedDuration:p&&d||null,velocity:e=>mu(x(e)),next:e=>{if(!p&&m<1){const t=Math.exp(-m*v*e),n=Math.sin(w*e),i=Math.cos(w*e),l=a-t*(E*n+y*i),c=mu(t*(O*n+S*i));return s.done=Math.abs(c)<=r&&Math.abs(a-l)<=o,s.value=s.done?a:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=mu(x(e));s.done=Math.abs(n)<=r&&Math.abs(a-t)<=o}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(Ud(k),$d),t=Fd(t=>k.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return k}uf.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Ud(r),$d);return{type:"keyframes",ease:e=>r.next(o*e).value/t,duration:yu(o)}}(e,100,uf);return e.ease=t.ease,e.duration=mu(t.duration),e.type="keyframes",e};function df(e,t,n){const r=Math.max(t-5,0);return vu(n-e(r),t-r)}function ff({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=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,y=void 0===a?m:a(m);y!==m&&(h=y-d);const v=e=>-h*Math.exp(-e/r),g=e=>y+v(e),b=e=>{const t=v(e),n=g(e);f.done=Math.abs(t)<=c,f.value=f.done?y: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=uf({keyframes:[f.value,p(f.value)],velocity:df(g,e,f.value),damping:o,stiffness:i,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 pf(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(ou(i===t.length,"Both input and output ranges must be the same length","range-length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||iu.mix||Vd,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||uu:t;i=fu(e,i)}r.push(i)}return r}(t,r,o),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 o=pu(e[r],e[r+1],n);return s[r](o)};return n?t=>c(tu(e[0],e[i-1],t)):c}function hf(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=pu(0,t,r);e.push(Ad(n,1,o))}}(t,e.length-1),t}function mf({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ru):Ru(r),i={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:hf(t),e),s=pf(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||Iu).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const yf=e=>null!==e;function vf(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(yf),a=o<0||t&&"loop"!==n&&t%2==1?0:i.length-1;return a&&void 0!==r?r:i[a]}const gf={decay:ff,inertia:ff,tween:mf,keyframes:mf,spring:uf};function bf(e){"string"==typeof e.type&&(e.type=gf[e.type])}class xf{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 wf=e=>e/100;class Ef extends xf{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!==Ku.now()&&this.tick(Ku.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;bf(e);const{type:t=mf,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=e;let{keyframes:a}=e;const s=t||mf;"production"!==process.env.NODE_ENV&&s!==mf&&ou(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==mf&&"number"!=typeof a[0]&&(this.mixKeyframes=fu(wf,Vd(a[0],a[1])),a=[0,100]);const l=s({...e,keyframes:a});"mirror"===o&&(this.mirroredGenerator=s({...e,keyframes:[...a].reverse(),velocity:-i})),null===l.calculatedDuration&&(l.calculatedDuration=Ud(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:o,mirroredGenerator:i,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 y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,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=i)),b=tu(0,1,n)*a}v?(this.delayState.value=c[0],g=this.delayState):g=x.next(b),o&&!v&&(g.value=o(g.value));let{done:w}=g;v||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!==ff&&(g.value=vf(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 yu(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+yu(e)}get time(){return yu(this.currentTime)}set time(e){e=mu(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 df(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(Ku.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=yu(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Bd,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(Ku.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 Of=e=>180*e/Math.PI,Sf=e=>{const t=Of(Math.atan2(e[1],e[0]));return Pf(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:Sf,rotateZ:Sf,skewX:e=>Of(Math.atan(e[1])),skewY:e=>Of(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Pf=e=>((e%=360)<0&&(e+=360),e),jf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Af=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Tf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jf,scaleY:Af,scale:e=>(jf(e)+Af(e))/2,rotateX:e=>Pf(Of(Math.atan2(e[6],e[5]))),rotateY:e=>Pf(Of(Math.atan2(-e[2],e[0]))),rotateZ:Sf,rotate:Sf,skewX:e=>Of(Math.atan(e[4])),skewY:e=>Of(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Cf(e){return e.includes("scale")?1:0}function Mf(e,t){if(!e||"none"===e)return Cf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Tf,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=kf,o=t}if(!o)return Cf(t);const i=r[t],a=o[1].split(",").map(Nf);return"function"==typeof i?i(a):a[i]}function Nf(e){return parseFloat(e.trim())}const If=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Df=(()=>new Set(If))(),_f=e=>e===Ju||e===fd,Rf=new Set(["x","y","z"]),Lf=If.filter(e=>!Rf.has(e));const zf={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-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})=>Mf(t,"x"),y:(e,{transform:t})=>Mf(t,"y")};zf.translateX=zf.x,zf.translateY=zf.y;const Vf=new Set;let Bf=!1,Ff=!1,$f=!1;function Uf(){if(Ff){const e=Array.from(Vf).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 Lf.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)})}Ff=!1,Bf=!1,Vf.forEach(e=>e.complete($f)),Vf.clear()}function Wf(){Vf.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ff=!0)})}class Kf{constructor(e,t,n,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Vf.add(this),Bf||(Bf=!0,Vu.read(Wf),Vu.resolveKeyframes(Uf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const o=r?.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&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),Vf.delete(this)}cancel(){"scheduled"===this.state&&(Vf.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function Hf(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}const Yf={};function qf(e,t){const n=cu(e);return()=>Yf[t]??n()}const Gf=qf(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Xf=qf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Zf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Jf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zf([0,.65,.55,1]),circOut:Zf([.55,0,1,.45]),backIn:Zf([.31,.01,.66,-.59]),backOut:Zf([.33,1.53,.69,.99])};function Qf(e,t){return e?"function"==typeof e?Xf()?Fd(e,t):"ease-out":Du(e)?Zf(e):Array.isArray(e)?e.map(e=>Qf(e,t)||Jf.easeOut):Jf[e]:void 0}function ep(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Qf(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function tp(e){return"function"==typeof e&&"applyToOptions"in e}class np extends xf{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:s}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=i,this.options=e,ou("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return tp(e)&&Xf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=ep(t,n,r,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=vf(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Hf(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 yu(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+yu(e)}get time(){return yu(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=mu(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&&Gf()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),uu):r(this)}}const rp={anticipate:ju,backInOut:Pu,circInOut:Cu};function op(e){"string"==typeof e.ease&&e.ease in rp&&(e.ease=rp[e.ease])}class ip extends np{constructor(e){op(e),bf(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:o,...i}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const a=new Ef({...i,autoplay:!1}),s=Math.max(10,Ku.now()-this.startTime),l=tu(0,10,s-10),c=a.sample(s).value,{name:u}=this.options;o&&u&&Hf(o,u,c),t.setWithVelocity(a.sample(Math.max(0,s-l)).value,c,l),a.stop()}}const ap=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!kd.test(e)&&"0"!==e||e.startsWith("url(")));function sp(e){e.duration=0,e.type="keyframes"}const lp=new Set(["opacity","clipPath","filter","transform"]),cp=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const up=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),dp=cu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function fp(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return dp()&&n&&(lp.has(n)||up.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&cp.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!u)&&!c&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}class pp extends xf{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="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=Ku.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,name:s,motionValue:l,element:c,...u},f=c?.KeyframeResolver||Kf;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:o,type:i,velocity:a,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Ku.now();let u=!0;(function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=ap(o,t),s=ap(i,t);return ru(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" 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||tp(n))&&r)})(e,o,i,a)||(u=!1,!iu.instantAnimations&&s||c?.(vf(e,n,t)),e[0]=e[e.length-1],sp(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&&fp(d),p=d.motionValue?.owner?.current;let h;if(f)try{h=new ip({...d,element:p})}catch{h=new Ef(d)}else h=new Ef(d);h.finished.then(()=>{this.notifyFinished()}).catch(uu),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(),$f=!0,Wf(),Uf(),$f=!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 hp(e,t,n,r=0,o=1){const i=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,s=(a-1)*r;return"function"==typeof n?n(i,a):1===o?i*r:s-i*r}const mp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yp(e,t,n=1){ou(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=function(e){const t=mp.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return au(e)?parseFloat(e):e}return Gu(o)?yp(o,t,n+1):o}const vp={type:"spring",stiffness:500,damping:25,restSpeed:10},gp={type:"keyframes",duration:.8},bp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xp=(e,{keyframes:t})=>t.length>2?gp:Df.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:vp:bp;function wp(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ep(e,t){const n=e?.[t]??e?.default??e;return n!==e?wp(n,e):n}const Op=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const Sp=(e,t,n,r={},o,i)=>a=>{const s=Ep(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=mu(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:i?void 0:o};(function(e){for(const t in e)if(!Op.has(t))return!0;return!1})(s)||Object.assign(u,xp(e,u)),u.duration&&(u.duration=mu(u.duration)),u.repeatDelay&&(u.repeatDelay=mu(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(sp(u),0===u.delay&&(d=!0)),(iu.instantAnimations||iu.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,sp(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&void 0!==t.get()){const e=vf(u.keyframes,s);if(void 0!==e)return void Vu.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new Ef(u):new pp(u)};function kp(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Pp(e,t,n,r){if("function"==typeof t){const[o,i]=kp(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=kp(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function jp(e,t,n){const r=e.getProps();return Pp(r,t,void 0!==n?n:r.custom,e)}const Ap=new Set(["width","height","top","left","right","bottom",...If]);class Tp{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Ku.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=Ku.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&&bu(!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 hu);const n=this.events[e].add(t);return"change"===e?()=>{n(),Vu.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=Ku.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return vu(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 Cp(e,t){return new Tp(e,t)}const Mp=e=>Array.isArray(e);function Np(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Cp(n))}function Ip(e){return Mp(e)?e[e.length-1]||0:e}const Dp=e=>Boolean(e&&e.getVelocity);function _p(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Dp(r)&&r.add))return n.add(t);if(!n&&iu.WillChange){const n=new iu.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function Rp(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Lp="data-"+Rp("framerAppearId");function zp(e){return e.props[Lp]}function Vp({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Bp(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:a,...s}=t;const l=e.getDefaultTransition();i=i?wp(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const t in s){const r=e.getValue(t,e.latestValues[t]??null),o=s[t];if(void 0===o||d&&Vp(d,t))continue;const a={delay:n,...Ep(i||{},t)},l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(o)&&o===l&&!a.velocity){Vu.update(()=>r.set(o));continue}let f=!1;if(window.MotionHandoffAnimation){const n=zp(e);if(n){const e=window.MotionHandoffAnimation(n,t,Vu);null!==e&&(a.startTime=e,f=!0)}}_p(e,t);const p=c??e.shouldReduceMotion;r.start(Sp(t,r,o,p&&Ap.has(t)?{type:!1}:a,e,f));const h=r.animation;h&&u.push(h)}if(a){const t=()=>Vu.update(()=>{a&&function(e,t){const n=jp(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Np(e,t,Ip(i[t]))}(e,a)});u.length?Promise.all(u).then(t):t()}return u}function Fp(e,t,n={}){const r=jp(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Bp(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Fp(l,t,{...a,delay:n+("function"==typeof r?0:r)+hp(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,i,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then(()=>t())}return Promise.all([i(),a(n.delay)])}const $p=e=>t=>t.test(e),Up=[Ju,fd,dd,ud,hd,pd,{test:e=>"auto"===e,parse:e=>e}],Wp=e=>Up.find($p(e));function Kp(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||lu(e))}const Hp=new Set(["brightness","contrast","saturate","opacity"]);function Yp(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(nd)||[];if(!r)return e;const o=n.replace(r,"");let i=Hp.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const qp=/\b([a-z-]*)\(.*?\)/gu,Gp={...kd,getAnimatableNone:e=>{const t=e.match(qp);return t?t.map(Yp).join(" "):e}},Xp={...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))}},Zp={...Ju,transform:Math.round},Jp={borderWidth:fd,borderTopWidth:fd,borderRightWidth:fd,borderBottomWidth:fd,borderLeftWidth:fd,borderRadius:fd,borderTopLeftRadius:fd,borderTopRightRadius:fd,borderBottomRightRadius:fd,borderBottomLeftRadius:fd,width:fd,maxWidth:fd,height:fd,maxHeight:fd,top:fd,right:fd,bottom:fd,left:fd,inset:fd,insetBlock:fd,insetBlockStart:fd,insetBlockEnd:fd,insetInline:fd,insetInlineStart:fd,insetInlineEnd:fd,padding:fd,paddingTop:fd,paddingRight:fd,paddingBottom:fd,paddingLeft:fd,paddingBlock:fd,paddingBlockStart:fd,paddingBlockEnd:fd,paddingInline:fd,paddingInlineStart:fd,paddingInlineEnd:fd,margin:fd,marginTop:fd,marginRight:fd,marginBottom:fd,marginLeft:fd,marginBlock:fd,marginBlockStart:fd,marginBlockEnd:fd,marginInline:fd,marginInlineStart:fd,marginInlineEnd:fd,fontSize:fd,backgroundPositionX:fd,backgroundPositionY:fd,...{rotate:ud,rotateX:ud,rotateY:ud,rotateZ:ud,scale:ed,scaleX:ed,scaleY:ed,scaleZ:ed,skew:ud,skewX:ud,skewY:ud,distance:fd,translateX:fd,translateY:fd,translateZ:fd,x:fd,y:fd,z:fd,perspective:fd,transformPerspective:fd,opacity:Qu,originX:md,originY:md,originZ:fd},zIndex:Zp,fillOpacity:Qu,strokeOpacity:Qu,numOctaves:Zp},Qp={...Jp,color:vd,backgroundColor:vd,outlineColor:vd,fill:vd,stroke:vd,borderColor:vd,borderTopColor:vd,borderRightColor:vd,borderBottomColor:vd,borderLeftColor:vd,filter:Gp,WebkitFilter:Gp,mask:Xp,WebkitMask:Xp},eh=e=>Qp[e],th=new Set([Gp,Xp]);function nh(e,t){let n=eh(e);return th.has(n)||(n=kd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rh=new Set(["auto","none","0"]);class oh extends Kf{constructor(e,t,n,r,o){super(e,t,n,r,o,!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(),Gu(r))){const o=yp(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Ap.has(n)||2!==e.length)return;const[r,o]=e,i=Wp(r),a=Wp(o);if(Zu(r)!==Zu(o)&&zf[n])this.needsMeasurement=!0;else if(i!==a)if(_f(i)&&_f(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else zf[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||Kp(e[t]))&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!rh.has(t)&&Ed(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=nh(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=zf[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 o=n.length-1,i=n[o];n[o]=zf[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function ih(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 ah=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function sh(e){return su(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:lh}=zu(queueMicrotask,!1),ch={x:!1,y:!1};function uh(){return ch.x||ch.y}function dh(e,t){const n=ih(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function fh(e,t,n={}){const[r,o,i]=dh(e,n);return r.forEach(e=>{let n,r=!1,i=!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),i&&(i=!1,a(e))},l=e=>{"touch"!==e.pointerType&&(r?i=!0:a(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||uh())return;i=!1;const a=t(e,r);"function"==typeof a&&(n=a,e.addEventListener("pointerleave",l,o))},o),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",s,o)},o)}),i}const ph=(e,t)=>!!t&&(e===t||ph(e,t.parentElement)),hh=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,mh=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const yh=new Set(["INPUT","SELECT","TEXTAREA"]);const vh=new WeakSet;function gh(e){return t=>{"Enter"===t.key&&e(t)}}function bh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function xh(e){return hh(e)&&!uh()}const wh=new WeakSet;function Eh(e,t,n={}){const[r,o,i]=dh(e,n),a=e=>{const r=e.currentTarget;if(!xh(e))return;if(wh.has(e))return;vh.add(r),n.stopPropagation&&wh.add(e);const i=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),vh.has(r)&&vh.delete(r),xh(e)&&"function"==typeof i&&i(e,{success:t})},s=e=>{a(e,r===window||r===document||n.useGlobalTarget||ph(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),sh(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=gh(()=>{if(vh.has(n))return;bh(n,"down");const e=gh(()=>{bh(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>bh(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o)),t=e,mh.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),i}function Oh(e){return su(e)&&"ownerSVGElement"in e}const Sh=new WeakMap;let kh;const Ph=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Oh(r)&&"getBBox"in r?r.getBBox()[t]:r[n],jh=Ph("inline","width","offsetWidth"),Ah=Ph("block","height","offsetHeight");function Th({target:e,borderBoxSize:t}){Sh.get(e)?.forEach(n=>{n(e,{get width(){return jh(e,t)},get height(){return Ah(e,t)}})})}function Ch(e){e.forEach(Th)}function Mh(e,t){kh||"undefined"!=typeof ResizeObserver&&(kh=new ResizeObserver(Ch));const n=ih(e);return n.forEach(e=>{let n=Sh.get(e);n||(n=new Set,Sh.set(e,n)),n.add(t),kh?.observe(e)}),()=>{n.forEach(e=>{const n=Sh.get(e);n?.delete(t),n?.size||kh?.unobserve(e)})}}const Nh=new Set;let Ih;function Dh(e){return Nh.add(e),Ih||(Ih=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Nh.forEach(t=>t(e))},window.addEventListener("resize",Ih)),()=>{Nh.delete(e),Nh.size||"function"!=typeof Ih||(window.removeEventListener("resize",Ih),Ih=void 0)}}function _h(e,t){return"function"==typeof e?Dh(e):Mh(e,t)}const Rh=[...Up,vd,kd],Lh=()=>({x:{min:0,max:0},y:{min:0,max:0}}),zh=new WeakMap;function Vh(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Bh(e){return"string"==typeof e||Array.isArray(e)}const Fh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$h=["initial",...Fh];function Uh(e){return Vh(e.animate)||$h.some(t=>Bh(e[t]))}function Wh(e){return Boolean(Uh(e)||e.variants)}const Kh={current:null},Hh={current:!1},Yh="undefined"!=typeof window;const qh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Gh={};function Xh(e){Gh=e}class Zh{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,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=Kf,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=Ku.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Vu.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=o,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Uh(t),this.isVariantNode=Wh(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]&&Dp(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,zh.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:(Hh.current||function(){if(Hh.current=!0,Yh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kh.current=e.matches;e.addEventListener("change",t),t()}else Kh.current=!1}(),this.shouldReduceMotion=Kh.current),"production"!==process.env.NODE_ENV&&bu(!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(),Bu(this.notifyUpdate),Bu(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&&lp.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:o,ease:i,duration:a}=t.accelerate,s=new np({element:this.current,name:e,keyframes:r,times:o,ease:i,duration:mu(a)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=Df.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Vu.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o(),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 Gh){const t=Gh[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<qh.length;t++){const n=qh[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 o=t[r],i=n[r];if(Dp(o))e.addValue(r,o);else if(Dp(i))e.addValue(r,Cp(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Cp(void 0!==t?t:o,{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=Cp(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&&(au(n)||lu(n))?n=parseFloat(n):(r=n,!Rh.find($p(r))&&kd.test(t)&&(n=nh(e,t))),this.setBaseTarget(e,Dp(n)?n.get():n)),Dp(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=Pp(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||Dp(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 hu),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){lh.render(this.render)}}class Jh extends Zh{constructor(){super(...arguments),this.KeyframeResolver=oh}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;Dp(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Qh{constructor(e){this.isMounted=!1,this.node=e}update(){}}function em({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tm(e){return void 0===e||1===e}function nm({scale:e,scaleX:t,scaleY:n}){return!tm(e)||!tm(t)||!tm(n)}function rm(e){return nm(e)||om(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function om(e){return im(e.x)||im(e.y)}function im(e){return e&&"0%"!==e}function am(e,t,n){return n+t*(e-n)}function sm(e,t,n,r,o){return void 0!==o&&(e=am(e,o,r)),am(e,n,r)+t}function lm(e,t=0,n=1,r,o){e.min=sm(e.min,t,n,r,o),e.max=sm(e.max,t,n,r,o)}function cm(e,{x:t,y:n}){lm(e.x,t.translate,t.scale,t.originPoint),lm(e.y,n.translate,n.scale,n.originPoint)}const um=.999999999999,dm=1.0000000000001;function fm(e,t){e.min+=t,e.max+=t}function pm(e,t,n,r,o=.5){lm(e,t,n,Ad(e.min,e.max,o),r)}function hm(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function mm(e,t,n){const r=n??e;pm(e.x,hm(t.x,r.x),t.scaleX,t.scale,t.originX),pm(e.y,hm(t.y,r.y),t.scaleY,t.scale,t.originY)}function ym(e,t){return em(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 vm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gm=If.length;function bm(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(Df.has(e))a=!0;else if(Yu(e))o[e]=n;else{const t=ah(n,Jp[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<gm;i++){const a=If[i],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=ah(s,Jp[a]);l||(o=!1,r+=`${vm[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function xm(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];for(a in o?.applyProjectionStyles(i,r),n)i.setProperty(a,n[a])}function wm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Em={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!fd.test(e))return e;e=parseFloat(e)}return`${wm(e,t.target.x)}% ${wm(e,t.target.y)}%`}},Om={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=kd.parse(e);if(o.length>5)return r;const i=kd.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Ad(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Sm={borderRadius:{...Em,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Em,borderTopRightRadius:Em,borderBottomLeftRadius:Em,borderBottomRightRadius:Em,boxShadow:Om};function km(e,{layout:t,layoutId:n}){return Df.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Sm[e]||"opacity"===e)}function Pm(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const t in r)(Dp(r[t])||o&&Dp(o[t])||km(t,e)||void 0!==n?.getValue(t)?.liveStyle)&&(i[t]=r[t]);return i}class jm extends Jh{constructor(){super(...arguments),this.type="html",this.renderInstance=xm}readValueFromInstance(e,t){if(Df.has(t))return this.projection?.isProjecting?Cf(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Mf(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),o=(Yu(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return ym(e,t)}build(e,t,n){bm(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Pm(e,t,n)}}const Am={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tm={offset:"strokeDashoffset",array:"strokeDasharray"};const Cm=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Mm(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(bm(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 Cm)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!==o&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Am:Tm;e[i.offset]=""+-r,e[i.array]=`${t} ${n}`}(d,o,i,a,!1)}const Nm=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"]),Im=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Dm(e,t,n){const r=Pm(e,t,n);for(const n in e)if(Dp(e[n])||Dp(t[n])){r[-1!==If.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}class _m extends Jh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lh}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Df.has(t)){const e=eh(t);return e&&e.default||0}return t=Nm.has(t)?t:Rp(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Dm(e,t,n)}build(e,t,n){Mm(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){xm(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Nm.has(n)?n:Rp(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Im(e.tagName),super.mount(e)}}const Rm=$h.length;function Lm(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Lm(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Rm;n++){const r=$h[n],o=e.props[r];(Bh(o)||!1===o)&&(t[r]=o)}return t}function zm(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 Vm=[...Fh].reverse(),Bm=Fh.length;function Fm(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 o=t.map(t=>Fp(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=Fp(e,t,n);else{const o="function"==typeof t?jp(e,t,n.custom):t;r=Promise.all(Bp(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function $m(e){let t=Fm(e),n=Km(),r=!0,o=!1;const i=t=>(n,r)=>{const o=jp(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function a(a){const{props:s}=e,l=Lm(e.parent)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<Bm;t++){const p=Vm[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],y=Bh(m),v=p===a?h.isActive:null;!1===v&&(f=t);let g=m===l[p]&&m!==s[p]&&y;if(g&&(r||o)&&e.manuallyAnimateOnMount&&(g=!1),h.protectedKeys={...d},!h.isActive&&null===v||!m&&!h.prevProp||Vh(m)||"boolean"==typeof m)continue;if("exit"===p&&h.isActive&&!0!==v){h.prevResolvedValues&&(d={...d,...h.prevResolvedValues});continue}const b=Um(h.prevProp,m);let x=b||p===a&&h.isActive&&!g&&y||t>f&&y,w=!1;const E=Array.isArray(m)?m:[m];let O=E.reduce(i(p),{});!1===v&&(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=Mp(t)&&Mp(n)?!zm(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||o)&&e.blockInitialAnimation&&(x=!1);const j=g&&b;x&&(!j||w)&&c.push(...E.map(t=>{const n={type:p};if("string"==typeof t&&(r||o)&&!j&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,o=jp(r,t);if(r.enteringChildren&&o){const{delayChildren:t}=o.transition||{};n.delay=hp(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=jp(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),o=e.getValue(n);o&&(o.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,o=!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 o=a(t);for(const e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Km(),o=!0}}}function Um(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!zm(t,e)}function Wm(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Km(){return{animate:Wm(!0),whileInView:Wm(),whileHover:Wm(),whileTap:Wm(),whileDrag:Wm(),whileFocus:Wm(),exit:Wm()}}function Hm(e,t){e.min=t.min,e.max=t.max}function Ym(e,t){Hm(e.x,t.x),Hm(e.y,t.y)}function qm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Gm(e){return e.max-e.min}function Xm(e,t,n,r=.5){e.origin=r,e.originPoint=Ad(t.min,t.max,e.origin),e.scale=Gm(n)/Gm(t),e.translate=Ad(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 Zm(e,t,n,r){Xm(e.x,t.x,n.x,r?r.originX:void 0),Xm(e.y,t.y,n.y,r?r.originY:void 0)}function Jm(e,t,n,r=0){const o=r?Ad(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+Gm(t)}function Qm(e,t,n,r=0){const o=r?Ad(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Gm(t)}function ey(e,t,n,r){Qm(e.x,t.x,n.x,r?.x),Qm(e.y,t.y,n.y,r?.y)}function ty(e,t,n,r,o){return e=am(e-=t,1/n,r),void 0!==o&&(e=am(e,1/o,r)),e}function ny(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){dd.test(t)&&(t=parseFloat(t),t=Ad(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=Ad(i.min,i.max,r);e===i&&(s-=t),e.min=ty(e.min,t,n,s,o),e.max=ty(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const ry=["x","scaleX","originX"],oy=["y","scaleY","originY"];function iy(e,t,n,r){ny(e.x,t,ry,n?n.x:void 0,r?r.x:void 0),ny(e.y,t,oy,n?n.y:void 0,r?r.y:void 0)}function ay(e){return 0===e.translate&&1===e.scale}function sy(e){return ay(e.x)&&ay(e.y)}function ly(e,t){return e.min===t.min&&e.max===t.max}function cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function uy(e,t){return cy(e.x,t.x)&&cy(e.y,t.y)}function dy(e){return Gm(e.x)/Gm(e.y)}function fy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function py(e){return[e("x"),e("y")]}const hy=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],my=hy.length,yy=e=>"string"==typeof e?parseFloat(e):e,vy=e=>"number"==typeof e||fd.test(e);function gy(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const by=wy(0,.5,Tu),xy=wy(.5,.95,uu);function wy(e,t,n){return r=>r<e?0:r>t?1:n(pu(e,t,r))}function Ey(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Oy=(e,t)=>e.depth-t.depth;class Sy{constructor(){this.children=[],this.isDirty=!1}add(e){Qc(this.children,e),this.isDirty=!0}remove(e){eu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Oy),this.isDirty=!1,this.children.forEach(e)}}function ky(e){return Dp(e)?e.get():e}class Py{constructor(){this.members=[]}add(e){Qc(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||(eu(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(eu(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:o}=e.options;void 0!==r&&r===o||(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 jy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ay=["","X","Y","Z"];let Ty=0;function Cy(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function My(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Vu,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&My(r)}function Ny({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=t?.()){this.id=Ty++,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(_y),this.nodes.forEach(Wy),this.nodes.forEach(Ky),this.nodes.forEach(Ry)},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 Sy)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new hu),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=Oh(t)&&!(Oh(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const o=()=>this.root.updateBlockedByResize=!1;Vu.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=Ku.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Bu(r),e(i-t))};return Vu.setup(r,!0),()=>Bu(r)}(o,250),jy.hasAnimatedSinceResize&&(jy.hasAnimatedSinceResize=!1,this.nodes.forEach(Uy)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&i&&(r||o)&&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 o=this.options.transition||i.getDefaultTransition()||Zy,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!uy(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={...Ep(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||Uy(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(),Bu(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(Hy),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&&My(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(Vy),void this.nodes.forEach(zy)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(By);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Fy),this.nodes.forEach($y),this.nodes.forEach(Iy),this.nodes.forEach(Dy)):this.nodes.forEach(By),this.clearAllSnapshots();const e=Ku.now();Fu.delta=tu(0,1e3/60,e-Fu.timestamp),Fu.timestamp=e,Fu.isProcessing=!0,$u.update.process(Fu),$u.preRender.process(Fu),$u.render.process(Fu),Fu.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,lh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ly),this.sharedNodes.forEach(Yy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Vu.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Vu.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Gm(this.snapshot.measuredBox.x)||Gm(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(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!sy(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||rm(this.latestValues)||i)&&(o(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)),ev((r=n).x),ev(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(nv))){const{scroll:e}=this.root;e&&(fm(t.x,e.offset.x),fm(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(Ym(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&Ym(t,e),fm(t.x,o.offset.x),fm(t.y,o.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};Ym(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&&(fm(r.x,-n.scroll.offset.x),fm(r.y,-n.scroll.offset.y)),rm(n.latestValues)&&mm(r,n.latestValues,n.layout?.layoutBox)}return rm(this.latestValues)&&mm(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Ym(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!rm(n.latestValues))continue;let r;n.instance&&(nm(n.latestValues)&&n.updateSnapshot(),r=Lh(),Ym(r,n.measurePageBox())),iy(t,n.latestValues,n.snapshot?.layoutBox,r)}return rm(this.latestValues)&&iy(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!==Fu.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:o}=this.options;if(!this.layout||!r&&!o)return;this.resolvedRelativeTargetAt=Fu.timestamp;const i=this.getClosestProjectingParent();var a,s,l,c;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.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,Jm(a.x,s.x,l.x,c?.x),Jm(a.y,s.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Ym(this.target,this.layout.layoutBox),cm(this.target,this.targetDelta)):Ym(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!nm(this.parent.latestValues)&&!om(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}},ey(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ym(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===Fu.timestamp&&(n=!1),n)return;const{layout:r,layoutId:o}=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&&!o)return;Ym(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(fm(e.x,-i.scroll.offset.x),fm(e.y,-i.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,cm(e,a)),r&&rm(i.latestValues)&&mm(e,i.latestValues,i.layout?.layoutBox))}t.x<dm&&t.x>um&&(t.x=1),t.y<dm&&t.y>um&&(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?(qm(this.prevProjectionDelta.x,this.projectionDelta.x),qm(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Zm(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===i&&this.treeScale.y===a&&fy(this.projectionDelta.x,this.prevProjectionDelta.x)&&fy(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:{},o={...this.latestValues},i={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(Xy));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;qy(i.x,e.x,n),qy(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ey(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(e,t,n,r){Gy(e.x,t.x,n.x,r),Gy(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return ly(e.x,t.x)&&ly(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ym(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Ad(0,n.opacity??1,by(r)),e.opacityExit=Ad(t.opacity??1,0,xy(r))):i&&(e.opacity=Ad(t.opacity??1,n.opacity??1,r));for(let o=0;o<my;o++){const i=hy[o];let a=gy(t,i),s=gy(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||vy(a)===vy(s)?(e[i]=Math.max(Ad(yy(a),yy(s),r),0),(dd.test(s)||dd.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Ad(t.rotate||0,n.rotate||0,r))}(o,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&&(Bu(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Vu.update(()=>{jy.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Cp(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=Dp(e)?e:Cp(e);return r.start(Sp("",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:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&tv(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Gm(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Gm(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ym(t,n),mm(t,o),Zm(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Py);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&&Cy("z",e,r,this.animationValues);for(let t=0;t<Ay.length;t++)Cy(`rotate${Ay[t]}`,e,r,this.animationValues),Cy(`skew${Ay[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=ky(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=ky(t?.pointerEvents)||""),void(this.hasProjected&&!rm(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const o=r.animationValues||r.latestValues;this.applyTransformsToTarget();let i=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}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,o);n&&(i=n(o,i)),e.transform=i;const{x:a,y:s}=this.projectionDelta;e.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const t in Sm){if(void 0===o[t])continue;const{correct:n,applyTo:a,isCSSVariable:s}=Sm[t],l="none"===i?o[t]:n(o[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?ky(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(zy),this.root.sharedNodes.clear()}}}function Iy(e){e.updateLayout()}function Dy(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:o}=e.options,i=t.source!==e.layout.source;if("size"===o)py(e=>{const r=i?t.measuredBox[e]:t.layoutBox[e],o=Gm(r);r.min=n[e].min,r.max=r.min+o});else if("x"===o||"y"===o){const e="x"===o?"y":"x";Hm(i?t.measuredBox[e]:t.layoutBox[e],n[e])}else tv(o,t.layoutBox,n)&&py(r=>{const o=i?t.measuredBox[r]:t.layoutBox[r],a=Gm(n[r]);o.max=o.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}};Zm(a,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Zm(s,e.applyTransform(r,!0),t.measuredBox):Zm(s,n,t.layoutBox);const l=!sy(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};ey(s,t.layoutBox,o.layoutBox,a);const l={x:{min:0,max:0},y:{min:0,max:0}};ey(l,n,i.layoutBox,a),uy(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 _y(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 Ry(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ly(e){e.clearSnapshot()}function zy(e){e.clearMeasurements()}function Vy(e){e.isLayoutDirty=!0,e.updateLayout()}function By(e){e.isLayoutDirty=!1}function Fy(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function $y(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Uy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Wy(e){e.resolveTargetDelta()}function Ky(e){e.calcProjection()}function Hy(e){e.resetSkewAndRotation()}function Yy(e){e.removeLeadSnapshot()}function qy(e,t,n){e.translate=Ad(t.translate,0,n),e.scale=Ad(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gy(e,t,n,r){e.min=Ad(t.min,n.min,r),e.max=Ad(t.max,n.max,r)}function Xy(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Zy={duration:.45,ease:[.4,0,.1,1]},Jy=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Qy=Jy("applewebkit/")&&!Jy("chrome/")?Math.round:uu;function ev(e){e.min=Qy(e.min),e.max=Qy(e.max)}function tv(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=dy(t),o=dy(n),i=.2,!(Math.abs(r-o)<=i));var r,o,i}function nv(e){return e!==e.root&&e.scroll?.wasRoot}const rv=Ny({attachResizeListener:(e,t)=>Ey(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ov={current:void 0},iv=Ny({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ov.current){const e=new rv({});e.mount(window),e.setOptions({layoutScroll:!0}),ov.current=e}return ov.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),av=e.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sv(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function lv(...e){return r.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=sv(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():sv(e[t],null)}}}}(...e),e)}class cv extends r.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(sh(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=sh(e)&&e.offsetWidth||0,r=sh(e)&&e.offsetHeight||0,o=getComputedStyle(t),i=this.props.sizeRef.current;i.height=parseFloat(o.height),i.width=parseFloat(o.width),i.top=t.offsetTop,i.left=t.offsetLeft,i.right=n-i.width-i.left,i.bottom=r-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function uv({children:t,isPresent:n,anchorX:o,anchorY:i,root:a,pop:s}){const l=e.useId(),c=e.useRef(null),u=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=e.useContext(av),f=t.props?.ref??t?.ref,h=lv(c,f);return e.useInsertionEffect(()=>{const{width:e,height:t,top:r,left:f,right:p,bottom:h}=u.current;if(n||!1===s||!c.current||!e||!t)return;const m="left"===o?`left: ${f}`:`right: ${p}`,y="bottom"===i?`bottom: ${h}`:`top: ${r}`;c.current.dataset.motionPopId=l;const v=document.createElement("style");d&&(v.nonce=d);const g=a??document.head;return g.appendChild(v),v.sheet&&v.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${m}px !important;\n ${y}px !important;\n }\n `),()=>{c.current?.removeAttribute("data-motion-pop-id"),g.contains(v)&&g.removeChild(v)}},[n]),p.jsx(cv,{isPresent:n,childRef:c,sizeRef:u,pop:s,children:!1===s?t:r.cloneElement(t,{ref:h})})}const dv=({children:t,initial:n,isPresent:o,onExitComplete:i,custom:a,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:u,root:d})=>{const f=Xc(fv),h=e.useId();let m=!0,y=e.useMemo(()=>(m=!1,{id:h,initial:n,isPresent:o,custom:a,onExitComplete:e=>{f.set(e,!0);for(const e of f.values())if(!e)return;i&&i()},register:e=>(f.set(e,!1),()=>f.delete(e))}),[o,f,i]);return s&&m&&(y={...y}),e.useMemo(()=>{f.forEach((e,t)=>f.set(t,!1))},[o]),r.useEffect(()=>{!o&&!f.size&&i&&i()},[o]),t=p.jsx(uv,{pop:"popLayout"===l,isPresent:o,anchorX:c,anchorY:u,root:d,children:t}),p.jsx(Jc.Provider,{value:y,children:t})};function fv(){return new Map}function pv(t=!0){const n=e.useContext(Jc);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=n,a=e.useId();e.useEffect(()=>{if(t)return i(a)},[t]);const s=e.useCallback(()=>t&&o&&o(a),[a,o,t]);return!r&&o?[!1,s]:[!0]}const hv=e=>e.key||"";function mv(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const yv=({children:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:s=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,f]=pv(s),h=e.useMemo(()=>mv(t),[t]),m=s&&!d?[]:h.map(hv),y=e.useRef(!0),v=e.useRef(h),g=Xc(()=>new Map),b=e.useRef(new Set),[x,w]=e.useState(h),[E,O]=e.useState(h);Zc(()=>{y.current=!1,v.current=h;for(let e=0;e<E.length;e++){const t=hv(E[e]);m.includes(t)?(g.delete(t),b.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[E,m.length,m.join("-")]);const S=[];if(h!==x){let e=[...h];for(let t=0;t<E.length;t++){const n=E[t],r=hv(n);m.includes(r)||(e.splice(t,0,n),S.push(n))}return"wait"===a&&S.length&&(e=S),O(mv(e)),w(h),null}"production"!==process.env.NODE_ENV&&"wait"===a&&E.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:k}=e.useContext(Gc);return p.jsx(p.Fragment,{children:E.map(e=>{const t=hv(e),x=!(s&&!d)&&(h===E||m.includes(t));return p.jsx(dv,{isPresent:x,initial:!(y.current&&!r)&&void 0,custom:n,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:x?void 0:()=>{if(b.current.has(t))return;if(!g.has(t))return;b.current.add(t),g.set(t,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(k?.(),O(v.current),s&&f?.(),o&&o())},anchorX:l,anchorY:c,children:e},t)})})},vv=e.createContext({strict:!1}),gv={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 bv=!1;function xv(){return function(){if(bv)return;const e={};for(const t in gv)e[t]={isEnabled:e=>gv[t].some(t=>!!e[t])};Xh(e),bv=!0}(),Gh}const wv=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 Ev(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wv.has(e)}let Ov=e=>!Ev(e);try{"function"==typeof(Sv=require("@emotion/is-prop-valid").default)&&(Ov=e=>e.startsWith("on")?!Ev(e):Sv(e))}catch{}var Sv;const kv=e.createContext({});function Pv(t){const{initial:n,animate:r}=function(e,t){if(Uh(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Bh(t)?t:void 0,animate:Bh(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(kv));return e.useMemo(()=>({initial:n,animate:r}),[jv(n),jv(r)])}function jv(e){return Array.isArray(e)?e.join(" "):e}const Av=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Tv(e,t,n){for(const r in t)Dp(t[r])||km(r,n)||(e[r]=t[r])}function Cv(t,n){const r={};return Tv(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return bm(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),r}function Mv(e,t){const n={},r=Cv(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 Nv=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Iv(t,n,r,o){const i=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Mm(e,n,Im(o),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Tv(e,t.style,t),i.style={...e,...i.style}}return i}const Dv=["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 _v(e){return"string"==typeof e&&!e.includes("-")&&!!(Dv.indexOf(e)>-1||/[A-Z]/u.test(e))}function Rv(t,n,r,{latestValues:o},i,a=!1,s){const l=(s??_v(t)?Iv:Mv)(n,o,i,t),c=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||Dp(e[o])||(Ov(o)||!0===n&&Ev(o)||!t&&!Ev(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,a),u=t!==e.Fragment?{...c,...l,ref:r}:{},{children:d}=n,f=e.useMemo(()=>Dp(d)?d.get():d,[d]);return e.createElement(t,{...u,children:f})}function Lv(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=ky(i[e]);let{initial:a,animate:s}=e;const l=Uh(e),c=Wh(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&&!Vh(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Pp(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&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const zv=t=>(n,r)=>{const o=e.useContext(kv),i=e.useContext(Jc),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Lv(n,r,o,e),renderState:t()}}(t,n,o,i);return r?a():Xc(a)},Vv=zv({scrapeMotionValuesFromProps:Pm,createRenderState:Av}),Bv=zv({scrapeMotionValuesFromProps:Dm,createRenderState:Nv}),Fv=Symbol.for("motionComponentSymbol");function $v(t,n,r){const o=e.useRef(r);e.useInsertionEffect(()=>{o.current=r});const i=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e);const r=o.current;if("function"==typeof r)if(e){const t=r(e);"function"==typeof t&&(i.current=t)}else i.current?(i.current(),i.current=null):r(e);else r&&(r.current=e);n&&(e?n.mount(e):n.unmount())},[n])}const Uv=e.createContext({});function Wv(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Kv(t,n,r,o,i,a){const{visualElement:s}=e.useContext(kv),l=e.useContext(vv),c=e.useContext(Jc),u=e.useContext(av),d=u.reducedMotion,f=u.skipAnimations,p=e.useRef(null),h=e.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(t,{visualState:n,parent:s,props:r,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d,skipAnimations:f,isSVG:a}),h.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const m=p.current,y=e.useContext(Uv);!m||m.projection||!i||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:o,layout:i,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:Hv(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Wv(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(p.current,r,i,y);const v=e.useRef(!1);e.useInsertionEffect(()=>{m&&v.current&&m.update(r,c)});const g=r[Lp],b=e.useRef(Boolean(g)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Zc(()=>{h.current=!0,m&&(v.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),e.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),b.current=!1),m.enteringChildren=void 0)}),m}function Hv(e){if(e)return!1!==e.options.allowProjection?e.projection:Hv(e.parent)}function Yv(t,{forwardMotionProps:n=!1,type:r}={},o,i){o&&function(e){const t=xv();for(const n in e)t[n]={...t[n],...e[n]};Xh(t)}(o);const a=r?"svg"===r:_v(t),s=a?Bv:Vv;function l(r,l){let c;const u={...e.useContext(av),...r,layoutId:qv(r)},{isStatic:d}=u,f=Pv(r),h=s(r,d);if(!d&&"undefined"!=typeof window){!function(t,n){const r=e.useContext(vv).strict;if("production"!==process.env.NODE_ENV&&n&&r){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?ru(!1,e,"lazy-strict-mode"):ou(!1,e,"lazy-strict-mode")}}(u,o);const n=function(e){const t=xv(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(u);c=n.MeasureLayout,f.visualElement=Kv(t,h,u,i,n.ProjectionNode,a)}return p.jsxs(kv.Provider,{value:f,children:[c&&f.visualElement?p.jsx(c,{visualElement:f.visualElement,...u}):null,Rv(t,r,$v(h,f.visualElement,l),h,d,n,a)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const c=e.forwardRef(l);return c[Fv]=t,c}function qv({layoutId:t}){const n=e.useContext(Gc).id;return n&&void 0!==t?n+"-"+t:t}function Gv(e,t){if("undefined"==typeof Proxy)return Yv;const n=new Map,r=(n,r)=>Yv(n,r,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&bu(!1,"motion() is deprecated. Use motion.create() instead."),r(e,t)),{get:(o,i)=>"create"===i?r:(n.has(i)||n.set(i,Yv(i,void 0,e,t)),n.get(i))})}const Xv=(t,n)=>n.isSVG??_v(t)?new _m(n):new jm(n,{allowProjection:t!==e.Fragment});let Zv=0;const Jv={animation:{Feature:class extends Qh{constructor(e){super(e),e.animationState||(e.animationState=$m(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Vh(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 Qh{constructor(){super(...arguments),this.id=Zv++,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=jp(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 Qv(e){return{point:{x:e.pageX,y:e.pageY}}}function eg(e,t,n,r){return Ey(e,t,(e=>t=>hh(t)&&e(t,Qv(t)))(n),r)}const tg=({current:e})=>e?e.ownerDocument.defaultView:null,ng=(e,t)=>Math.abs(e-t);const rg=new Set(["auto","scroll"]);class og{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=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=ig(this.lastRawMoveEventInfo,this.transformPagePoint));const e=sg(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=ng(e.x,t.x),r=ng(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:o}=Fu;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=ig(t,this.transformPagePoint),Vu.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=sg("pointercancel"===e.type?this.lastMoveEventInfo:ig(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!hh(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=r||window;const s=ig(Qv(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=Fu;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,sg(s,this.history)),this.removeListeners=fu(eg(this.contextWindow,"pointermove",this.handlePointerMove),eg(this.contextWindow,"pointerup",this.handlePointerUp),eg(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(rg.has(e.overflowX)||rg.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},o=r.x-t.x,i=r.y-t.y;0===o&&0===i||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=i):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=i),this.scrollPositions.set(e,r),Vu.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Bu(this.updatePoint)}}function ig(e,t){return t?{point:t(e.point)}:e}function ag(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sg({point:e},t){return{point:e,delta:ag(e,cg(t)),offset:ag(e,lg(t)),velocity:ug(t,.1)}}function lg(e){return e[0]}function cg(e){return e[e.length-1]}function ug(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=cg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mu(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>2*mu(t)&&(r=e[1]);const i=yu(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function dg(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 fg(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 pg=.35;function hg(e,t,n){return{min:mg(e,t),max:mg(e,n)}}function mg(e,t){return"number"==typeof e?e:e[t]||0}const yg=new WeakMap;class vg{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:o}=this.getProps();this.panSession=new og(e,{onSessionStart:e=>{t&&this.snapToCursor(Qv(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?ch[i]?null:(ch[i]=!0,()=>{ch[i]=!1}):ch.x||ch.y?null:(ch.x=ch.y=!0,()=>{ch.x=ch.y=!1}),!this.openDragLock))return;var i;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),py(e=>{let t=this.getAxisMotionValue(e).get()||0;if(dd.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Gm(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),o&&Vu.update(()=>o(e,t),!1,!0),_p(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:o,onDrag:i}=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&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&Vu.update(()=>i(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:o,distanceThreshold:n,contextWindow:tg(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Vu.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||!bg(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Ad(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Ad(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}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&&Wv(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:dg(e.x,n,o),y:dg(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=pg){return!1===e?e=0:!0===e&&(e=pg),{x:hg(e,"left","right"),y:hg(e,"top","bottom")}}(t),r!==this.constraints&&!Wv(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&py(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||!Wv(e))return!1;const n=e.current;ou(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 o=function(e,t,n){const r=ym(e,n),{scroll:o}=t;return o&&(fm(r.x,o.offset.x),fm(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:fg(e.x,t.x),y:fg(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=em(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=py(a=>{if(!bg(a,t,this.currentDirection))return;let l=s&&s[a]||{};!0!==i&&i!==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,...o,...l};return this.startAxisValueAnimation(a,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return _p(this.visualElement,e),n.start(Sp(e,n,0,t,this.visualElement,!1))}stopAnimation(){py(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){py(t=>{const{drag:n}=this.getProps();if(!bg(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t],a=o.get()||0;o.set(e[t]-Ad(n,i,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Wv(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};py(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=Gm(e),o=Gm(t);return o>r?n=pu(t.min,t.max-r,e.min):r>o&&(n=pu(e.min,e.max-o,t.min)),tu(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),py(t=>{if(!bg(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Ad(o,i,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yg.set(this.visualElement,this);const e=this.visualElement.current,t=eg(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),o=t.target,i=o!==e&&function(e){return yh.has(e.tagName)||!0===e.isContentEditable}(o);n&&r&&!i&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Wv(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=_h(e,gg(n)),o=_h(t,gg(n));return()=>{r(),o()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Vu.read(r);const a=Ey(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(py(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(),i(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=pg,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function gg(e){let t=!0;return()=>{t?t=!1:e()}}function bg(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const xg=e=>(t,n)=>{e&&Vu.update(()=>e(t,n),!1,!0)};let wg=!1;class Eg extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),wg&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),jy.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:i}=n;return i?(i.isPresent=o,e.layoutDependency!==t&&i.setOptions({...i.options,layoutDependency:t}),wg=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Vu.postRender(()=>{const e=i.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(),lh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;wg=!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 Og(t){const[n,r]=pv(),o=e.useContext(Gc);return p.jsx(Eg,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Uv),isPresent:n,safeToRemove:r})}const Sg={pan:{Feature:class extends Qh{constructor(){super(...arguments),this.removePointerDownListener=uu}onPointerDown(e){this.session=new og(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:tg(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:xg(e),onStart:xg(t),onMove:xg(n),onEnd:(e,t)=>{delete this.session,r&&Vu.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=eg(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 Qh{constructor(e){super(e),this.removeGroupControls=uu,this.removeListeners=uu,this.controls=new vg(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||uu}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:iv,MeasureLayout:Og}};function kg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Vu.postRender(()=>o(t,Qv(t)))}function Pg(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 o=r["onTap"+("End"===n?"":n)];o&&Vu.postRender(()=>o(t,Qv(t)))}const jg=new WeakMap,Ag=new WeakMap,Tg=e=>{const t=jg.get(e.target);t&&t(e)},Cg=e=>{e.forEach(Tg)};function Mg(e,t,n){const r=function({root:e,...t}){const n=e||document;Ag.has(n)||Ag.set(n,{});const r=Ag.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Cg,{root:e,...t})),r[o]}(t);return jg.set(e,n),r.observe(e),()=>{jg.delete(e),r.unobserve(e)}}const Ng={some:0,all:1};const Ig={inView:{Feature:class extends Qh{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:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Ng[r]};this.stopObserver=Mg(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!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(),i=t?n:r;i&&i(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 Qh{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Eh(e,(e,t)=>(Pg(this.node,t,"Start"),(e,{success:t})=>Pg(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends Qh{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=fu(Ey(this.node.current,"focus",()=>this.onFocus()),Ey(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Qh{mount(){const{current:e}=this.node;e&&(this.unmount=fh(e,(e,t)=>(kg(this.node,t,"Start"),e=>kg(this.node,e,"End"))))}unmount(){}}}},Dg=Gv({...Jv,...Ig,...Sg,...{layout:{ProjectionNode:iv,MeasureLayout:Og}}},Xv),_g=[{title:"Dashboard",icon:Il,url:"#"},{title:"Analytics",icon:Cl,url:"#"},{title:"Products",icon:Ll,url:"#"},{title:"Customers",icon:Kl,url:"#"},{title:"Tasks",icon:Dl,url:"#"},{title:"Settings",icon:Bl,url:"#"},{title:"Help",icon:Ml,url:"#"}];function Rg({items:e=_g,onItemClick:t,activeItem:n}){const{state:r}=Dc(),o="collapsed"===r;return p.jsxs(Rc,{variant:"inset",collapsible:"icon",children:[p.jsx(Vc,{className:"h-16 flex items-center px-6 border-b border-border/50",children:p.jsxs("div",{className:"flex items-center gap-2 font-bold text-xl tracking-tight",children:[p.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground shrink-0",children:"B"}),p.jsx(yv,{mode:"wait",children:!o&&p.jsx(Dg.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"})})]})}),p.jsx(Fc,{children:p.jsxs($c,{children:[p.jsx(Uc,{children:p.jsx(yv,{mode:"wait",children:!o&&p.jsx(Dg.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:"Main Menu"})})}),p.jsx(Wc,{children:p.jsx(Kc,{children:e.map(e=>p.jsx(Hc,{children:p.jsx(qc,{tooltip:e.title,isActive:n===e.title,onClick:()=>null==t?void 0:t(e.title),className:"transition-all duration-200 hover:bg-primary/5 hover:text-primary",render:p.jsxs("button",{type:"button",className:"flex items-center w-full",children:[p.jsx(e.icon,{className:"shrink-0"}),p.jsx(yv,{mode:"wait",children:!o&&p.jsx(Dg.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))})})]})}),p.jsx(Bc,{className:"p-4 border-t border-border/50",children:p.jsxs("div",{className:"flex items-center gap-3 min-h-10",children:[p.jsx("div",{className:"w-8 h-8 rounded-full bg-muted shrink-0"}),p.jsx(yv,{mode:"wait",children:!o&&p.jsxs(Dg.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:[p.jsx("span",{className:"text-sm font-medium",children:"Bahry Jarbou"}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"Admin"})]})})]})})]})}function Lg(e){var{className:t,size:n="default"}=e,r=h(e,["className","size"]);return p.jsx("div",Object.assign({"data-slot":"card","data-size":n,className:ht("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)},r))}function zg(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"card-header",className:ht("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 Vg(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"card-title",className:ht("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",t)},n))}function Bg(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"card-description",className:ht("text-sm text-muted-foreground",t)},n))}function Fg(e){var{className:t}=e,n=h(e,["className"]);return p.jsx("div",Object.assign({"data-slot":"card-content",className:ht("px-4 group-data-[size=sm]/card:px-3",t)},n))}var $g=["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 Ug(e){return"string"==typeof e&&$g.includes(e)}var Wg=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 Kg(e){return"string"==typeof e&&Wg.has(e)}function Hg(e){return"string"==typeof e&&e.startsWith("data-")}function Yg(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Kg(n)||Hg(n))&&(t[n]=e[n]);return t}function qg(t){return null==t?null:e.isValidElement(t)&&"object"==typeof t.props&&null!==t.props?Yg(t.props):"object"!=typeof t||Array.isArray(t)?null:Yg(t)}function Gg(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Kg(n)||Hg(n)||Ug(n))&&(t[n]=e[n]);return t}var Xg=["children","width","height","viewBox","className","style","title","desc"];function Zg(){return Zg=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},Zg.apply(null,arguments)}var Jg=e.forwardRef((e,t)=>{var{children:n,width:o,height:i,viewBox:a,className:s,style:l,title:c,desc:u}=e,d=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Xg),f=a||{width:o,height:i,x:0,y:0},p=H("recharts-surface",s);return r.createElement("svg",Zg({},Gg(d),{className:p,width:o,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),r.createElement("title",null,c),r.createElement("desc",null,u),n)}),Qg=["children","className"];function eb(){return eb=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},eb.apply(null,arguments)}var tb=r.forwardRef((e,t)=>{var{children:n,className:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Qg),a=H("recharts-layer",o);return r.createElement("g",eb({className:a},Gg(i),{ref:t}),n)}),nb=e.createContext(null);function rb(e){return function(){return e}}const ob=Math.cos,ib=Math.sin,ab=Math.sqrt,sb=Math.PI,lb=2*sb,cb=Math.PI,ub=2*cb,db=1e-6,fb=ub-db;function pb(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class hb{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?pb:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return pb;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,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-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>db)if(Math.abs(u*s-l*c)>db&&o){let f=n-i,p=r-a,h=s*s+l*l,m=f*f+p*p,y=Math.sqrt(h),v=Math.sqrt(d),g=o*Math.tan((cb-Math.acos((h+d-m)/(2*y*v)))/2),b=g/v,x=g/y;Math.abs(b-1)>db&&this._append`L${e+b*c},${t+b*u}`,this._append`A${o},${o},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,o,i){if(e=+e,t=+t,i=!!i,(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^i,d=i?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>db||Math.abs(this._y1-c)>db)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%ub+ub),d>fb?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>db&&this._append`A${n},${n},0,${+(d>=cb)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}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 mb(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 hb(t)}function yb(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function vb(e){this._context=e}function gb(e){return new vb(e)}function bb(e){return e[0]}function xb(e){return e[1]}function wb(e,t){var n=rb(!0),r=null,o=gb,i=null,a=mb(s);function s(s){var l,c,u,d=(s=yb(s)).length,f=!1;for(null==r&&(i=o(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,s),+t(c,l,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?bb:rb(e),t="function"==typeof t?t:void 0===t?xb:rb(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:rb(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:rb(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:rb(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}function Eb(e,t,n){var r=null,o=rb(!0),i=null,a=gb,s=null,l=mb(c);function c(c){var u,d,f,p,h,m=(c=yb(c)).length,y=!1,v=new Array(m),g=new Array(m);for(null==i&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===y)if(y=!y)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(v[f],g[f]);s.lineEnd(),s.areaEnd()}y&&(v[u]=+e(p,u,c),g[u]=+t(p,u,c),s.point(r?+r(p,u,c):v[u],n?+n(p,u,c):g[u]))}if(h)return s=null,h+""||null}function u(){return wb().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?bb:rb(+e),t="function"==typeof t?t:rb(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?xb:rb(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:rb(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:rb(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:rb(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:rb(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:rb(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:rb(+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?(o="function"==typeof e?e:rb(!!e),c):o},c.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),c):a},c.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),c):i},c}vb.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 Ob{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 Sb={draw(e,t){const n=ab(t/sb);e.moveTo(n,0),e.arc(0,0,n,0,lb)}},kb={draw(e,t){const n=ab(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 Pb=ab(1/3),jb=2*Pb;var Ab={draw(e,t){const n=ab(t/jb),r=n*Pb;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Tb={draw(e,t){const n=ab(t),r=-n/2;e.rect(r,r,n,n)}};const Cb=ib(sb/10)/ib(7*sb/10),Mb=ib(lb/10)*Cb,Nb=-ob(lb/10)*Cb;var Ib={draw(e,t){const n=ab(.8908130915292852*t),r=Mb*n,o=Nb*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=lb*t/5,a=ob(i),s=ib(i);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*o,s*r+a*o)}e.closePath()}};const Db=ab(3);var _b={draw(e,t){const n=-ab(t/(3*Db));e.moveTo(0,2*n),e.lineTo(-Db*n,-n),e.lineTo(Db*n,-n),e.closePath()}};const Rb=-.5,Lb=ab(3)/2,zb=1/ab(12),Vb=3*(zb/2+1);var Bb={draw(e,t){const n=ab(t/Vb),r=n/2,o=n*zb,i=r,a=n*zb+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Rb*r-Lb*o,Lb*r+Rb*o),e.lineTo(Rb*i-Lb*a,Lb*i+Rb*a),e.lineTo(Rb*s-Lb*l,Lb*s+Rb*l),e.lineTo(Rb*r+Lb*o,Rb*o-Lb*r),e.lineTo(Rb*i+Lb*a,Rb*a-Lb*i),e.lineTo(Rb*s+Lb*l,Rb*l-Lb*s),e.closePath()}};function Fb(){}function $b(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 Ub(e){this._context=e}function Wb(e){this._context=e}function Kb(e){this._context=e}function Hb(e){this._context=e}function Yb(e){return e<0?-1:1}function qb(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(Yb(i)+Yb(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Gb(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Xb(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function Zb(e){this._context=e}function Jb(e){this._context=new Qb(e)}function Qb(e){this._context=e}function ex(e){this._context=e}function tx(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function nx(e,t){this._context=e,this._t=t}function rx(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function ox(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function ix(e,t){return e[t]}function ax(e){const t=[];return t.key=e,t}Ub.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:$b(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:$b(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Wb.prototype={areaStart:Fb,areaEnd:Fb,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:$b(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Kb.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:$b(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Hb.prototype={areaStart:Fb,areaEnd:Fb,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))}},Zb.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:Xb(this,this._t0,Gb(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,Xb(this,Gb(this,n=qb(this,e,t)),n);break;default:Xb(this,this._t0,n=qb(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Jb.prototype=Object.create(Zb.prototype)).point=function(e,t){Zb.prototype.point.call(this,t,e)},Qb.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,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},ex.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=tx(e),o=tx(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],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)}},nx.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 sx,lx={},cx={};function ux(){return sx||(sx=1,e=cx,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),cx;var e}var dx,fx={};function px(){return dx||(dx=1,e=fx,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("]")}}),fx;var e}var hx,mx={};function yx(){return hx||(hx=1,e=mx,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)}),mx;var e}var vx,gx,bx,xx,wx,Ex={},Ox={};function Sx(){return vx||(vx=1,e=Ox,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}),Ox;var e}function kx(){return gx||(gx=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sx(),n=yx();e.toPath=function(e){if(Array.isArray(e))return e.map(n.toKey);if("symbol"==typeof e)return[e];const r=[],o=(e=t.toString(e)).length;if(0===o)return r;let i=0,a="",s="",l=!1;for(46===e.charCodeAt(0)&&(r.push(""),i++);i<o;){const t=e[i];s?"\\"===t&&i+1<o?(i++,a+=e[i]):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,i++}return a&&r.push(a),r}}(Ex)),Ex}function Px(){return bx||(bx=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ux(),n=px(),r=yx(),o=kx();e.get=function e(i,a,s){if(null==i)return s;switch(typeof a){case"string":{if(t.isUnsafeProperty(a))return s;const r=i[a];return void 0===r?n.isDeepKey(a)?e(i,o.toPath(a),s):s:r}case"number":case"symbol":{"number"==typeof a&&(a=r.toKey(a));const e=i[a];return void 0===e?s:e}default:{if(Array.isArray(a))return function(e,n,r){if(0===n.length)return r;let o=e;for(let e=0;e<n.length;e++){if(null==o)return r;if(t.isUnsafeProperty(n[e]))return r;o=o[n[e]]}if(void 0===o)return r;return o}(i,a,s);if(a=Object.is(a?.valueOf(),-0)?"-0":String(a),t.isUnsafeProperty(a))return s;const e=i[a];return void 0===e?s:e}}}}(lx)),lx}function jx(){return wx?xx:(wx=1,xx=Px().get)}var Ax=i(jx());function Tx(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 Cx(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 o=n[r-1];return"string"==typeof o?e+o+t:void 0!==o?e+Tx(o)+t:e+t},"")}var Mx=e=>0===e?0:e>0?1:-1,Nx=e=>"number"==typeof e&&e!=+e,Ix=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,Dx=e=>("number"==typeof e||e instanceof Number)&&!Nx(e),_x=e=>Dx(e)||"string"==typeof e,Rx=0,Lx=e=>{var t=++Rx;return"".concat(e||"").concat(t)},zx=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Dx(e)&&"string"!=typeof e)return r;if(Ix(e)){if(null==t)return r;var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return Nx(n)&&(n=r),o&&null!=t&&n>t&&(n=t),n},Vx=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 Bx(e,t,n){return Dx(e)&&Dx(t)?Tx(e+n*(t-e)):t}function Fx(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):Ax(e,t))===n)}var $x=e=>null==e,Ux=e=>$x(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Wx(e){return null!=e}function Kx(){}var Hx=["type","size","sizeType"];function Yx(){return Yx=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},Yx.apply(null,arguments)}function qx(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 Gx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qx(Object(n),!0).forEach(function(t){Xx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xx(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 Zx={symbolCircle:Sb,symbolCross:kb,symbolDiamond:Ab,symbolSquare:Tb,symbolStar:Ib,symbolTriangle:_b,symbolWye:Bb},Jx=Math.PI/180,Qx=e=>{var{type:t="circle",size:n=64,sizeType:o="area"}=e,i=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Hx),a=Gx(Gx({},i),{},{type:t,size:n,sizeType:o}),s="circle";"string"==typeof t&&(s=t);var{className:l,cx:c,cy:u}=a,d=Gg(a);return Dx(c)&&Dx(u)&&Dx(n)?r.createElement("path",Yx({},d,{className:H("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(Ux(e));return Zx[t]||Sb})(s),t=function(e,t){let n=null,r=mb(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:rb(e||Sb),t="function"==typeof t?t:rb(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:rb(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:rb(+e),o):t},o.context=function(e){return arguments.length?(n=null==e?null:e,o):n},o}().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*Jx;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}})(n,o,s)),r=t();if(null!==r)return r})()})):null};Qx.registerSymbol=(e,t)=>{Zx["symbol".concat(Ux(e))]=t};var ew=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,tw=(t,n)=>{if(!t||"function"==typeof t||"boolean"==typeof t)return null;var r=t;if(e.isValidElement(t)&&(r=t.props),"object"!=typeof r&&"function"!=typeof r)return null;var o={};return Object.keys(r).forEach(e=>{Ug(e)&&"function"==typeof r[e]&&(o[e]=t=>r[e](r,t))}),o},nw=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(o=>{var i=e[o];Ug(o)&&"function"==typeof i&&(r||(r={}),r[o]=((e,t,n)=>r=>(e(t,n,r),null))(i,t,n))}),r};function rw(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 ow(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(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rw(Object(n),!0).forEach(function(t){ow(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(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 aw,sw={},lw={};function cw(){return aw||(aw=1,e=lw,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 o=e[r],i=t(o,r,e);n.has(i)||n.set(i,o)}return Array.from(n.values())}),lw;var e}var uw,dw={};function fw(){return uw||(uw=1,e=dw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.ary=function(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}),dw;var e}var pw,hw={};function mw(){return pw||(pw=1,e=hw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),hw;var e}var yw,vw,gw={},bw={},xw={};function ww(){return yw||(yw=1,e=xw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),xw;var e}function Ew(){return vw||(vw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ww();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(bw)),bw}var Ow,Sw,kw={};function Pw(){return Ow||(Ow=1,e=kw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),kw;var e}function jw(){return Sw||(Sw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ew(),n=Pw();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(gw)),gw}var Aw,Tw={},Cw={};function Mw(){return Aw||(Aw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Px();e.property=function(e){return function(n){return t.get(n,e)}}}(Cw)),Cw}var Nw,Iw={},Dw={},_w={},Rw={};function Lw(){return Nw||(Nw=1,e=Rw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),Rw;var e}var zw,Vw={};function Bw(){return zw||(zw=1,e=Vw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),Vw;var e}var Fw,$w,Uw,Ww={};function Kw(){return Fw||(Fw=1,e=Ww,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),Ww;var e}function Hw(){return $w||($w=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lw(),n=Bw(),r=Kw();function o(e,s,l,c){if(s===e)return!0;switch(typeof s){case"object":return function(e,t,r,o){if(null==t)return!0;if(Array.isArray(t))return i(e,t,r,o);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[o,i]of t.entries()){if(!1===n(e.get(o),i,o,e,t,r))return!1}return!0}(e,t,r,o);if(t instanceof Set)return a(e,t,r,o);const s=Object.keys(t);if(null==e||n.isPrimitive(e))return 0===s.length;if(0===s.length)return!0;if(o?.has(t))return o.get(t)===e;o?.set(t,e);try{for(let i=0;i<s.length;i++){const a=s[i];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,o))return!1}return!0}finally{o?.delete(t)}}(e,s,l,c);case"function":return Object.keys(s).length>0?o(e,{...s},l,c):r.isEqualsSameValueZero(e,s);default:return t.isObject(e)?"string"!=typeof s||""===s:r.isEqualsSameValueZero(e,s)}}function i(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const o=new Set;for(let i=0;i<t.length;i++){const a=t[i];let s=!1;for(let l=0;l<e.length;l++){if(o.has(l))continue;let c=!1;if(n(e[l],a,i,e,t,r)&&(c=!0),c){o.add(l),s=!0;break}}if(!s)return!1}return!0}function a(e,t,n,r){return 0===t.size||e instanceof Set&&i([...e],[...t],n,r)}e.isMatchWith=function e(t,n,r){return"function"!=typeof r?e(t,n,()=>{}):o(t,n,function e(t,n,i,a,s,l){const c=r(t,n,i,a,s,l);return void 0!==c?Boolean(c):o(t,n,e,l)},new Map)},e.isSetMatch=a}(_w)),_w}function Yw(){return Uw||(Uw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Hw();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(Dw)),Dw}var qw,Gw={},Xw={},Zw={};function Jw(){return qw||(qw=1,e=Zw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),Zw;var e}var Qw,eE={};function tE(){return Qw||(Qw=1,e=eE,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)}),eE;var e}var nE,rE={};function oE(){return nE||(nE=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]"}(rE)),rE}var iE,aE,sE,lE,cE={};function uE(){return iE||(iE=1,e=cE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),cE;var e}function dE(){return aE||(aE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jw(),n=tE(),r=oE(),o=Bw(),i=uE();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(o.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(i.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,o,i){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,o,i))}}e.cloneDeepWith=function(e,t){return a(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=a,e.copyProperties=s}(Xw)),Xw}function fE(){return sE||(sE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dE();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(Gw)),Gw}function pE(){return lE||(lE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yw(),n=fE();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(Iw)),Iw}var hE,mE,yE={},vE={},gE={};function bE(){return hE||(hE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dE(),n=tE(),r=oE();e.cloneDeepWith=function(e,o){return t.cloneDeepWith(e,(i,a,s,l)=>{const c=o?.(i,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}}})}}(gE)),gE}function xE(){return mE||(mE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bE();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(vE)),vE}var wE,EE={},OE={};function SE(){return wE||(wE=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)}}}(OE)),OE}var kE,PE,jE,AE,TE,CE,ME,NE={};function IE(){return kE||(kE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tE();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(NE)),NE}function DE(){return PE||(PE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=px(),n=SE(),r=IE(),o=kx();e.has=function(e,i){let a;if(a=Array.isArray(i)?i:"string"==typeof i&&t.isDeepKey(i)&&null==e?.[i]?o.toPath(i):[i],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}}(EE)),EE}function _E(){return jE||(jE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yw(),n=yx(),r=xE(),o=Px(),i=DE();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=o.get(n,e);return void 0===r?i.has(n,e):void 0===a?void 0===r:t.isMatch(r,a)}}}(yE)),yE}function RE(){return AE||(AE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mw(),n=Mw(),r=pE(),o=_E();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?o.matchesProperty(e[0],e[1]):r.matches(e);case"string":case"symbol":case"number":return n.property(e)}}}(Tw)),Tw}function LE(){return TE||(TE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cw(),n=fw(),r=mw(),o=jw(),i=RE();e.uniqBy=function(e,a=r.identity){return o.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(i.iteratee(a),1)):[]}}(sw)),sw}function zE(){return ME?CE:(ME=1,CE=LE().uniqBy)}var VE=i(zE());var BE=e.createContext(null),FE=e=>e,$E=()=>{var t=e.useContext(BE);return t?t.store.dispatch:FE},UE=()=>{},WE=()=>UE,KE=(e,t)=>e===t;function HE(t){var n=e.useContext(BE),r=e.useMemo(()=>n?e=>{if(null!=e)return t(e)}:UE,[n,t]);return es.useSyncExternalStoreWithSelector(n?n.subscription.addNestedSub:WE,n?n.store.getState:UE,n?n.store.getState:UE,r,KE)}var YE,qE={},GE={},XE={};function ZE(){return YE||(YE=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 o=t(e),i=t(n);if(o===i&&0===o){if(e<n)return"desc"===r?1:-1;if(e>n)return"desc"===r?-1:1}return"desc"===r?i-o:o-i}return 0}}(XE)),XE}var JE,QE,eO,tO={},nO={};function rO(){return JE||(JE=1,e=nO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),nO;var e}function oO(){return QE||(QE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rO(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.isKey=function(e,o){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!=o&&Object.hasOwn(o,e)))}}(tO)),tO}function iO(){return eO||(eO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZE(),n=oO(),r=kx();e.orderBy=function(e,o,i,a){if(null==e)return[];i=a?void 0:i,Array.isArray(e)||(e=Object.values(e)),Array.isArray(o)||(o=null==o?[null]:[o]),0===o.length&&(o=[null]),Array.isArray(i)||(i=null==i?[]:[i]),i=i.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=o.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 o=t.compareValues(e.criteria[r],n.criteria[r],i[r]);if(0!==o)return o}return 0}).map(e=>e.original)}}(GE)),GE}var aO,sO={};function lO(){return aO||(aO=1,e=sO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const n=[],r=Math.floor(t),o=(e,t)=>{for(let i=0;i<e.length;i++){const a=e[i];Array.isArray(a)&&t<r?o(a,t+1):n.push(a)}};return o(e,0),n}),sO;var e}var cO,uO,dO,fO,pO={};function hO(){return cO||(cO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SE(),n=Ew(),r=Lw(),o=Kw();e.isIterateeCall=function(e,i,a){return!!r.isObject(a)&&(!!("number"==typeof i&&n.isArrayLike(a)&&t.isIndex(i)&&i<a.length||"string"==typeof i&&i in a)&&o.isEqualsSameValueZero(a[i],e))}}(pO)),pO}function mO(){return uO||(uO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iO(),n=lO(),r=hO();e.sortBy=function(e,...o){const i=o.length;return i>1&&r.isIterateeCall(e,o[0],o[1])?o=[]:i>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(e,n.flatten(o),["asc"])}}(qE)),qE}function yO(){return fO?dO:(fO=1,dO=mO().sortBy)}var vO=i(yO()),gO=e=>e.legend.settings;La([e=>e.legend.payload,gO],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?vO(r,n):r});function bO(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 xO=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),wO=()=>Math.random().toString(36).substring(7).split("").join("."),EO={INIT:`@@redux/INIT${wO()}`,REPLACE:`@@redux/REPLACE${wO()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${wO()}`};function OO(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 SO(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 kO(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=SO(e)),t}function PO(e,t,n){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?bO(2):`Expected the root reducer to be a function. Instead, received: '${kO(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?bO(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?bO(1):`Expected the enhancer to be a function. Instead, received: '${kO(n)}'`);return n(PO)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error("production"===process.env.NODE_ENV?bO(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 o}function d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?bO(4):`Expected the listener to be a function. Instead, received: '${kO(e)}'`);if(l)throw new Error("production"===process.env.NODE_ENV?bO(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?bO(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),i=null}}}function f(e){if(!OO(e))throw new Error("production"===process.env.NODE_ENV?bO(7):`Actions must be plain objects. Instead, the actual type was: '${kO(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?bO(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?bO(17):`Action "type" property must be a string. Instead, the actual type was: '${kO(e.type)}'. Value was: '${e.type}' (stringified)`);if(l)throw new Error("production"===process.env.NODE_ENV?bO(9):"Reducers may not dispatch actions.");try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}f({type:EO.INIT});const p={dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?bO(10):`Expected the nextReducer to be a function. Instead, received: '${kO(e)}`);r=e,f({type:EO.REPLACE})},[xO]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?bO(11):`Expected the observer to be an object. Instead, received: '${kO(t)}'`);function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[xO](){return this}}}};return p}function jO(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function AO(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"production"!==process.env.NODE_ENV&&void 0===e[o]&&jO(`No reducer provided for key "${o}"`),"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o,i;"production"!==process.env.NODE_ENV&&(o={});try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:EO.INIT}))throw new Error("production"===process.env.NODE_ENV?bO(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:EO.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?bO(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${EO.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){i=e}return function(e={},t){if(i)throw i;if("production"!==process.env.NODE_ENV){const r=function(e,t,n,r){const o=Object.keys(t),i=n&&n.type===EO.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!OO(e))return`The ${i} has unexpected type of "${kO(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!r[e]);return a.forEach(e=>{r[e]=!0}),n&&n.type===EO.REPLACE?void 0:a.length>0?`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${i}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,n,t,o);r&&jO(r)}let a=!1;const s={};for(let o=0;o<r.length;o++){const i=r[o],l=n[i],c=e[i],u=l(c,t);if(void 0===u){const e=t&&t.type;throw new Error("production"===process.env.NODE_ENV?bO(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${i}" 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[i]=u,a=a||u!==c}return a=a||r.length!==Object.keys(e).length,a?s:e}}function TO(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function CO(e){return OO(e)&&"type"in e&&"string"==typeof e.type}var MO=Symbol.for("immer-nothing"),NO=Symbol.for("immer-draftable"),IO=Symbol.for("immer-state"),DO="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 _O(e,...t){if("production"!==process.env.NODE_ENV){const n=DO[e],r=oS(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 RO=Object,LO=RO.getPrototypeOf,zO="constructor",VO="prototype",BO="configurable",FO="enumerable",$O="writable",UO="value",WO=e=>!!e&&!!e[IO];function KO(e){return!!e&&(qO(e)||eS(e)||!!e[NO]||!!e[zO]?.[NO]||tS(e)||nS(e))}var HO=RO[VO][zO].toString(),YO=new WeakMap;function qO(e){if(!e||!rS(e))return!1;const t=LO(e);if(null===t||t===RO[VO])return!0;const n=RO.hasOwnProperty.call(t,zO)&&t[zO];if(n===Object)return!0;if(!oS(n))return!1;let r=YO.get(n);return void 0===r&&(r=Function.toString.call(n),YO.set(n,r)),r===HO}function GO(e,t,n=!0){if(0===XO(e)){(n?Reflect.ownKeys(e):RO.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function XO(e){const t=e[IO];return t?t.type_:eS(e)?1:tS(e)?2:nS(e)?3:0}var ZO=(e,t,n=XO(e))=>2===n?e.has(t):RO[VO].hasOwnProperty.call(e,t),JO=(e,t,n=XO(e))=>2===n?e.get(t):e[t],QO=(e,t,n,r=XO(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var eS=Array.isArray,tS=e=>e instanceof Map,nS=e=>e instanceof Set,rS=e=>"object"==typeof e,oS=e=>"function"==typeof e,iS=e=>"boolean"==typeof e;var aS=e=>e.copy_||e.base_,sS=e=>e.modified_?e.copy_:e.base_;function lS(e,t){if(tS(e))return new Map(e);if(nS(e))return new Set(e);if(eS(e))return Array[VO].slice.call(e);const n=qO(e);if(!0===t||"class_only"===t&&!n){const t=RO.getOwnPropertyDescriptors(e);delete t[IO];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i[$O]&&(i[$O]=!0,i[BO]=!0),(i.get||i.set)&&(t[o]={[BO]:!0,[$O]:!0,[FO]:i[FO],[UO]:e[o]})}return RO.create(LO(e),t)}{const t=LO(e);if(null!==t&&n)return{...e};const r=RO.create(t);return RO.assign(r,e)}}function cS(e,t=!1){return dS(e)||WO(e)||!KO(e)||(XO(e)>1&&RO.defineProperties(e,{set:uS,add:uS,clear:uS,delete:uS}),RO.freeze(e),t&&GO(e,(e,t)=>{cS(t,!0)},!1)),e}var uS={[UO]:function(){_O(2)}};function dS(e){return null===e||!rS(e)||RO.isFrozen(e)}var fS="MapSet",pS="Patches",hS="ArrayMethods",mS={};function yS(e){const t=mS[e];return t||_O(0,e),t}var vS,gS=e=>!!mS[e],bS=()=>vS;function xS(e,t){t&&(e.patchPlugin_=yS(pS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wS(e){ES(e),e.drafts_.forEach(SS),e.drafts_=null}function ES(e){e===vS&&(vS=e.parent_)}var OS=e=>vS={drafts_:[],parent_:vS,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gS(fS)?yS(fS):void 0,arrayMethodsPlugin_:gS(hS)?yS(hS):void 0};function SS(e){const t=e[IO];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function kS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[IO].modified_&&(wS(t),_O(4)),KO(e)&&(e=PS(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[IO].base_,e,t)}else e=PS(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cS(t,n)}(t,e,!0),wS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==MO?e:void 0}function PS(e,t){if(dS(t))return t;const n=t[IO];if(!n){return NS(t,e.handledSet_,e)}if(!AS(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)}MS(n,e)}return n.copy_}function jS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var AS=(e,t)=>e.scope_===t,TS=[];function CS(e,t,n,r){const o=aS(e),i=e.type_;if(void 0!==r){if(JO(o,r,i)===t)return void QO(o,r,n,i)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;GO(o,(e,n)=>{if(WO(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??TS;for(const e of a)QO(o,e,n,i)}function MS(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)}jS(e)}}function NS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||WO(e)||t.has(e)||!KO(e)||dS(e)||(t.add(e),GO(e,(r,o)=>{if(WO(o)){const t=o[IO];if(AS(t,n)){const n=sS(t);QO(e,r,n,e.type_),jS(t)}}else KO(o)&&NS(o,t,n)})),e}var IS={get(e,t){if(t===IO)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 o=aS(e);if(!ZO(o,t,e.type_))return function(e,t,n){const r=RS(t,n);return r?UO in r?r[UO]:r.get?.call(e.draft_):void 0}(e,o,t);const i=o[t];if(e.finalized_||!KO(i))return i;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return i;if(i===_S(e.base_,t)){zS(e);const n=1===e.type_?+t:t,r=VS(e.scope_,i,e,n);return e.copy_[n]=r}return i},has:(e,t)=>t in aS(e),ownKeys:e=>Reflect.ownKeys(aS(e)),set(e,t,n){const r=RS(aS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=_S(aS(e),t),o=r?.[IO];if(o&&o.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||ZO(e.base_,t,e.type_)))return!0;zS(e),LS(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(WO(n)){const o=n[IO];AS(o,r)&&o.callbacks_.push(function(){zS(e);const r=sS(o);CS(e,n,r,t)})}else KO(n)&&e.callbacks_.push(function(){const o=aS(e);3===e.type_?o.has(n)&&NS(n,r.handledSet_,r):JO(o,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&NS(JO(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(zS(e),void 0!==_S(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),LS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=aS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[$O]:!0,[BO]:1!==e.type_||"length"!==t,[FO]:r[FO],[UO]:n[t]}:r},defineProperty(){_O(11)},getPrototypeOf:e=>LO(e.base_),setPrototypeOf(){_O(12)}},DS={};for(let e in IS){let t=IS[e];DS[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function _S(e,t){const n=e[IO];return(n?aS(n):e)[t]}function RS(e,t){if(!(t in e))return;let n=LO(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=LO(n)}}function LS(e){e.modified_||(e.modified_=!0,e.parent_&&LS(e.parent_))}function zS(e){e.copy_||(e.assigned_=new Map,e.copy_=lS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}DS.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&_O(13),DS.set.call(this,e,t,void 0)},DS.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&_O(14),IS.set.call(this,e[0],t,n,e[0])};function VS(e,t,n,r){const[o,i]=tS(t)?yS(fS).proxyMap_(t,n):nS(t)?yS(fS).proxySet_(t,n):function(e,t){const n=eS(e),r={type_:n?1:0,scope_:t?t.scope_:bS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=r,i=IS;n&&(o=[r],i=DS);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??bS()).drafts_.push(o),i.callbacks_=n?.callbacks_??[],i.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const o=t;if(!o||!AS(o,r))return;r.mapSetPlugin_?.fixSetContents(o);const i=sS(o);CS(e,o.draft_??o,i,n),MS(o,r)})}(n,i,r):i.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:t}=e;i.modified_&&t&&t.generatePatches_(i,[],e)}),o}function BS(e){return WO(e)||_O(10,e),FS(e)}function FS(e){if(!KO(e)||dS(e))return e;const t=e[IO];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=lS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=lS(e,!0);return GO(n,(e,t)=>{QO(n,e,FS(t))},r),t&&(t.finalized_=!1),n}var $S=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(oS(e)&&!oS(t)){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if(oS(t)||_O(6),void 0===n||oS(n)||_O(7),KO(e)){const o=OS(this),i=VS(o,e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?wS(o):ES(o)}return xS(o,n),kS(r,o)}if(!e||!rS(e)){if(r=t(e),void 0===r&&(r=e),r===MO&&(r=void 0),this.autoFreeze_&&cS(r,!0),n){const t=[],o=[];yS(pS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:o}),n(t,o)}return r}_O(1,e)},this.produceWithPatches=(e,t)=>{if(oS(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]},iS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),iS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),iS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){KO(e)||_O(8),WO(e)&&(e=BS(e));const t=OS(this),n=VS(t,e,void 0);return n[IO].isManual_=!0,ES(t),n}finishDraft(e,t){const n=e&&e[IO];n&&n.isManual_||_O(9);const{scope_:r}=n;return xS(r,t),kS(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=yS(pS).applyPatches_;return WO(e)?r(e,t):this.produce(e,e=>r(e,t))}},US=$S.produce;function WS(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var KS=WS(),HS=WS,YS="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?TO:TO.apply(null,arguments)};function qS(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("production"===process.env.NODE_ENV?Qk(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=>CO(t)&&t.type===e,n}function GS(e){return"function"==typeof e&&"type"in e&&((t=e)&&"function"==typeof t.match);var t}function XS(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 ZS=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 JS(e){return KO(e)?US(e,()=>{}):e}function QS(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function ek(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function tk(e,t,n){const r=nk(e,t,n);return{detectMutations:()=>rk(e,t,r,n)}}function nk(e,t=[],n,r="",o=new Set){const i={value:n};if(!e(n)&&!o.has(n)){o.add(n),i.children={};const a=t.length>0;for(const o in n){const s=r?r+"."+o:o;if(a){if(t.some(e=>e instanceof RegExp?e.test(s):s===e))continue}i.children[o]=nk(e,t,n[o],s)}}return i}function rk(e,t=[],n,r,o=!1,i=""){const a=n?n.value:void 0,s=a===r;if(o&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:i};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 o in l){const a=i?i+"."+o:o;if(c){if(t.some(e=>e instanceof RegExp?e.test(a):a===e))continue}const l=rk(e,t,n.children[o],r[o],s,a);if(l.wasMutated)return l}return{wasMutated:!1}}function ok(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||OO(e)}function ik(e,t="",n=ok,r,o=[],i){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(i?.has(e))return!1;const s=null!=r?r(e):Object.entries(e),l=o.length>0;for(const[e,c]of s){const s=t?t+"."+e:e;if(l){if(o.some(e=>e instanceof RegExp?e.test(s):s===e))continue}if(!n(c))return{keyPath:s,value:c};if("object"==typeof c&&(a=ik(c,s,n,r,o,i),a))return a}return i&&ak(e)&&i.add(e),!1}function ak(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!ak(t))return!1;return!0}function sk(e){return"boolean"==typeof e}var lk=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new ZS;if(t&&(sk(t)?i.push(KS):i.push(HS(t.extraArgument))),"production"!==process.env.NODE_ENV){if(n){let e={};sk(n)||(e=n),i.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{let t=function(e,t,r,o){return JSON.stringify(e,n(t,o),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(o,i){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,o):r.push(o),~n.indexOf(i)&&(i=t.call(this,o,i))}else n.push(i);return null==e?i:e.call(this,o,i)}},{isImmutable:r=ek,ignoredPaths:o,warnAfter:i=32}=e;const a=tk.bind(null,r,o);return({getState:e})=>{let n,r=e(),o=a(r);return s=>l=>{const c=XS(i,"ImmutableStateInvariantMiddleware");c.measureTime(()=>{if(r=e(),n=o.detectMutations(),o=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?Qk(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=o.detectMutations(),o=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?Qk(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={};sk(r)||(e=r),i.push(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{const{isSerializable:t=ok,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:i=[],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(!CO(d))return c(d);const f=c(d),p=XS(a,"SerializableStateInvariantMiddleware");return l||r.length&&-1!==r.indexOf(d.type)||p.measureTime(()=>{const e=ik(d,"",t,n,o,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=ik(e.getState(),"",t,n,i,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(o){let e={};sk(o)||(e=o),i.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);const{isActionCreator:t=GS}=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 i},ck="RTK_autoBatch",uk=()=>e=>({payload:e,meta:{[ck]:!0}}),dk=e=>t=>{setTimeout(t,e)},fk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:dk(10):"callback"===e.type?e.queueNotification:dk(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.[ck],i=!o,i&&(a||(a=!0,l(c))),r.dispatch(e)}finally{o=!0}}})};function pk(e){const t=lk(),{reducer:n,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!OO(n))throw new Error("production"===process.env.NODE_ENV?Qk(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");l=AO(n)}if("production"!==process.env.NODE_ENV&&r&&"function"!=typeof r)throw new Error("production"===process.env.NODE_ENV?Qk(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?Qk(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?Qk(4):"each middleware provided to configureStore must be a function");if("production"!==process.env.NODE_ENV&&i){let e=new Set;c.forEach(t=>{if(e.has(t))throw new Error("production"===process.env.NODE_ENV?Qk(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)})}let u=TO;o&&(u=YS({trace:"production"!==process.env.NODE_ENV,..."object"==typeof o&&o}));const d=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error("production"===process.env.NODE_ENV?bO(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=TO(...s)(o.dispatch),{...o,dispatch:i}}}(...c),f=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new ZS(e);return n&&r.push(fk("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?Qk(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?Qk(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?Qk(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 PO(l,a,u(...p))}function hk(e){const t={},n=[];let r;const o={addCase(e,i){if("production"!==process.env.NODE_ENV){if(n.length>0)throw new Error("production"===process.env.NODE_ENV?Qk(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("production"===process.env.NODE_ENV?Qk(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?Qk(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("production"===process.env.NODE_ENV?Qk(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=i,o},addAsyncThunk(e,i){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?Qk(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return i.pending&&(t[e.pending.type]=i.pending),i.rejected&&(t[e.rejected.type]=i.rejected),i.fulfilled&&(t[e.fulfilled.type]=i.fulfilled),i.settled&&n.push({matcher:e.settled,reducer:i.settled}),o},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?Qk(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),o},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?Qk(31):"`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,n,r]}var mk=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},yk=Symbol.for("rtk-slice-createasyncthunk");function vk(e,t){return`${e}/${t}`}function gk({creators:e}={}){const t=e?.asyncThunk?.[yk];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("production"===process.env.NODE_ENV?Qk(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 o=("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)||{},i=Object.keys(o),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?Qk(12):"`context.addCase` cannot be called with an empty action type");if(n in a.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?Qk(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?Qk(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?hk(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return function(e,t){if("production"!==process.env.NODE_ENV&&"object"==typeof t)throw new Error("production"===process.env.NODE_ENV?Qk(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,o,i]=hk(t);if(function(e){return"function"==typeof e}(e))n=()=>JS(e());else{const t=JS(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===a.filter(e=>!!e).length&&(a=[i]),a.reduce((e,n)=>{if(n){if(WO(e)){const r=n(e,t);return void 0===r?e:r}if(KO(e))return US(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 o)e.addCase(t,o[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)})}i.forEach(r=>{const i=o[r],a={reducerName:r,type:vk(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("production"===process.env.NODE_ENV?Qk(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?qS(e,a):qS(e))}(a,i,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error("production"===process.env.NODE_ENV?Qk(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:i,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=o(e,i,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||wk,pending:s||wk,rejected:l||wk,settled:c||wk})}(a,i,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 o=e[t];if(void 0===o)if(n)o=QS(d,r,h);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?Qk(15):"selectSlice returned undefined for an uninjected slice reducer");return o}function o(t=c){const r=QS(u,n,()=>new WeakMap);return QS(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=bk(i,t,()=>QS(d,t,h),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const y={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:p},n),{...y,...m(o,!0)}}};return y}}function bk(e,t,n,r){function o(o,...i){let a=t(o);if(void 0===a)if(r)a=n();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?Qk(16):"selectState returned undefined for an uninjected slice reducer");return e(a,...i)}return o.unwrapped=e,o}var xk=gk();function wk(){}var Ek="listener",Ok="completed",Sk="cancelled",kk=`task-${Sk}`,Pk=`task-${Ok}`,jk=`${Ek}-${Sk}`,Ak=`${Ek}-${Ok}`,Tk=class{constructor(e){this.code=e,this.message=`task ${Sk} (reason: ${e})`}name="TaskAbortError";message},Ck=(e,t)=>{if("function"!=typeof e)throw new TypeError("production"===process.env.NODE_ENV?Qk(32):`${t} is not a function`)},Mk=()=>{},Nk=(e,t=Mk)=>(e.catch(t),e),Ik=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Dk=e=>{if(e.aborted)throw new Tk(e.reason)};function _k(e,t){let n=Mk;return new Promise((r,o)=>{const i=()=>o(new Tk(e.reason));e.aborted?i():(n=Ik(e,i),t.finally(()=>n()).then(r,o))}).finally(()=>{n=Mk})}var Rk=e=>t=>Nk(_k(e,t).then(t=>(Dk(e),t))),Lk=e=>{const t=Rk(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:zk}=Object,Vk={},Bk="listenerMiddleware",Fk=(e,t)=>(n,r)=>{Ck(n,"taskExecutor");const o=new AbortController;var i;i=o,Ik(e,()=>i.abort(e.reason));const a=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(e){return{status:e instanceof Tk?"cancelled":"rejected",error:e}}finally{t?.()}})(async()=>{Dk(e),Dk(o.signal);const t=await n({pause:Rk(o.signal),delay:Lk(o.signal),signal:o.signal});return Dk(o.signal),t},()=>o.abort(Pk));return r?.autoJoin&&t.push(a.catch(Mk)),{result:Rk(e)(a),cancel(){o.abort(kk)}}},$k=(e,t)=>(n,r)=>Nk((async(n,r)=>{Dk(t);let o=()=>{};const i=[new Promise((t,r)=>{let i=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});o=()=>{i(),r()}})];null!=r&&i.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await _k(t,Promise.race(i));return Dk(t),e}finally{o()}})(n,r)),Uk=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=qS(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("production"===process.env.NODE_ENV?Qk(21):"Creating or removing a listener requires one of the known fields for matching an action");return Ck(i,"options.listener"),{predicate:o,type:t,effect:i}},Wk=zk(e=>{const{type:t,predicate:n,effect:r}=Uk(e);return{id:mk(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("production"===process.env.NODE_ENV?Qk(22):"Unsubscribe not initialized")}}},{withTypes:()=>Wk}),Kk=(e,t)=>{const{type:n,effect:r,predicate:o}=Uk(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===o)&&e.effect===r)},Hk=e=>{e.pending.forEach(e=>{e.abort(jk)})},Yk=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},qk=zk(qS(`${Bk}/add`),{withTypes:()=>qk}),Gk=qS(`${Bk}/removeAll`),Xk=zk(qS(`${Bk}/remove`),{withTypes:()=>Xk}),Zk=(...e)=>{console.error(`${Bk}/error`,...e)},Jk=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:o=Zk}=e;Ck(o,"onError");const i=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Hk(e)}))(Kk(t,e)??Wk(e));zk(i,{withTypes:()=>i});const a=e=>{const n=Kk(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Hk(n)),!!n};zk(a,{withTypes:()=>a});const s=async(e,a,s,l)=>{const c=new AbortController,u=$k(i,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,zk({},s,{getOriginalState:l,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:Lk(c.signal),pause:Rk(c.signal),extra:r,signal:c.signal,fork:Fk(c.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==c&&(e.abort(jk),n.delete(e))})},cancel:()=>{c.abort(jk),e.pending.delete(c)},throwIfCancelled:()=>{Dk(c.signal)}})))}catch(e){e instanceof Tk||Yk(o,e,{raisedBy:"effect"})}finally{await Promise.all(d),c.abort(Ak),(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())Hk(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!CO(r))return n(r);if(qk.match(r))return i(r.payload);if(Gk.match(r))return void l();if(Xk.match(r))return a(r.payload);let c=e.getState();const u=()=>{if(c===Vk)throw new Error("production"===process.env.NODE_ENV?Qk(23):`${Bk}: getOriginalState can only be called synchronously`);return c};let d;try{if(d=n(r),t.size>0){const n=e.getState(),i=Array.from(t.values());for(const t of i){let i=!1;try{i=t.predicate(r,n,c)}catch(e){i=!1,Yk(o,e,{raisedBy:"predicate"})}i&&s(t,r,e,u)}}}finally{c=Vk}return d},startListening:i,stopListening:a,clearListeners:l}};function Qk(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 eP=xk({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,o,i;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!==(o=t.payload.bottom)&&void 0!==o?o:0,e.margin.left=null!==(i=t.payload.left)&&void 0!==i?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:tP,setLayout:nP,setChartSize:rP,setScale:oP}=eP.actions,iP=eP.reducer;function aP(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function sP(e){return Number.isFinite(e)}function lP(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function cP(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 uP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cP(Object(n),!0).forEach(function(t){dP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dP(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 fP(e,t,n){return $x(e)||$x(t)?n:_x(t)?Ax(e,t,n):"function"==typeof t?t(e):n}var pP=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,hP=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var o,i,a=e.map(e=>(e.coordinate===t&&(o=!0),e.coordinate===n&&(i=!0),e.coordinate));return o||a.push(t),i||a.push(n),a},mP=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:o,range:i,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"===o&&a.bandwidth?a.bandwidth()/h:0;if(m="angleAxis"===p&&i&&i.length>=2?2*Mx(i[0]-i[1])*m:m,d||f){var y=(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,o=a.map(n);return sP(o)?{coordinate:o+m,value:e,offset:m,index:t}:null}).filter(Wx);return y}return l&&c?c.map((e,t)=>{var n=a.map(e);return sP(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Wx):a.ticks&&null!=u?a.ticks(u).map((e,t)=>{var n=a.map(e);return sP(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Wx):a.domain().map((e,t)=>{var n=a.map(e);return sP(n)?{coordinate:n+m,value:r?r[e]:e,index:t,offset:m}:null}).filter(Wx)},yP={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 o=0;o<r;++o)for(var i=0,a=0,s=0;s<n;++s){var l=e[s],c=null==l?void 0:l[o];if(null!=c){var u=c[1],d=c[0],f=Nx(u)?d:u;f>=0?(c[0]=i,i+=f,c[1]=i):(c[0]=a,a+=f,c[1]=a)}}}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}rx(e,t)}},none:rx,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}rx(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++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]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,rx(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 o=0;o<r;++o)for(var i=0,a=0;a<n;++a){var s=e[a],l=null==s?void 0:s[o];if(null!=l){var c=Nx(l[1])?l[0]:l[1];c>=0?(l[0]=i,i+=c,l[1]=i):(l[0]=0,l[1]=0)}}}}},vP=(e,t,n)=>{var r,o=null!==(r=yP[n])&&void 0!==r?r:rx,i=function(){var e=rb([]),t=ox,n=rx,r=ix;function o(o){var i,a,s=Array.from(e.apply(this,arguments),ax),l=s.length,c=-1;for(const e of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+r(e,s[i].key,c,o)]).data=e;for(i=0,a=yb(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:rb(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:rb(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?ox:"function"==typeof e?e:rb(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?rx:e,o):n},o}().keys(t).value((e,t)=>Number(fP(e,t,0))).order(ox).offset(o),a=i(e);return a.forEach((n,r)=>{n.forEach((n,o)=>{var i=fP(e[o],t[r],0);Array.isArray(i)&&2===i.length&&Dx(i[0])&&Dx(i[1])&&(n[0]=i[0],n[1]=i[1])})}),a};function gP(e){return null==e?void 0:String(e)}function bP(e){var{axis:t,ticks:n,bandSize:r,entry:o,index:i,dataKey:a}=e;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!$x(o[t.dataKey])){var s=Fx(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return null!=n&&n[i]?n[i].coordinate+r/2:null}var l=fP(o,$x(a)?t.dataKey:a),c=t.scale.map(l);return Dx(c)?c:null}var xP=e=>{var{axis:t,ticks:n,offset:r,bandSize:o,entry:i,index:a}=e;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=fP(i,t.dataKey,t.scale.domain()[a]);if($x(s))return null;var l=t.scale.map(s);return Dx(l)?l-o/2+r:null},wP=(e,t,n)=>{var r;if(null!=e)return r=Object.keys(e).reduce((r,o)=>{var i=e[o];if(!i)return r;var{stackedData:a}=i,s=a.reduce((e,r)=>{var o,i=aP(r,t,n),a=(o=i.flat(2).filter(Dx),[Math.min(...o),Math.max(...o)]);return sP(a[0])&&sP(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]]},EP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,SP=(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 o=vO(t,e=>e.coordinate),i=1/0,a=1,s=o.length;a<s;a++){var l=o[a],c=o[a-1];i=Math.min(((null==l?void 0:l.coordinate)||0)-((null==c?void 0:c.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function kP(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:o,name:i}=e;return uP(uP({},t),{},{dataKey:n,payload:r,value:o,name:i})}function PP(e,t){return e?String(e):"string"==typeof t?t:void 0}var jP=e=>e.layout.width,AP=e=>e.layout.height,TP=e=>e.layout.scale,CP=e=>e.layout.margin,MP=La(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),NP=La(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),IP="data-recharts-item-id";function DP(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?DP(Object(n),!0).forEach(function(t){RP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RP(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 LP,zP,VP,BP,FP,$P=La([jP,AP,CP,e=>e.brush.height,function(e){return NP(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return NP(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return MP(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return MP(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},gO,e=>e.legend.size],(e,t,n,r,o,i,a,s,l,c)=>{var u={left:(n.left||0)+o,right:(n.right||0)+i},d=_P(_P({},{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:o}=n,{align:i,verticalAlign:a,layout:s}=t;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==i&&Dx(e[i]))return uP(uP({},e),{},{[i]:e[i]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===i)&&"middle"!==a&&Dx(e[a]))return uP(uP({},e),{},{[a]:e[a]+(o||0)})}return e})(d,l,c);var p=e-d.left-d.right,h=t-d.top-d.bottom;return _P(_P({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(h,0)})}),UP=La($P,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),WP=La(jP,AP,(e,t)=>({x:0,y:0,width:e,height:t})),KP=e.createContext(null),HP=()=>null!=e.useContext(KP),YP=e=>e.brush,qP=La([YP,$P,CP],(e,t,n)=>({height:e.height,x:Dx(e.x)?e.x:t.left,y:Dx(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:Dx(e.width)?e.width:t.width})),GP={},XP={},ZP={};function JP(){return LP||(LP=1,e=ZP,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:n,edges:r}={}){let o,i=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),l=()=>{null!==i&&(e.apply(o,i),o=void 0,i=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),o=void 0,i=null},f=function(...e){if(n?.aborted)return;o=this,i=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}),ZP;var e}function QP(){return zP||(zP=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JP();e.debounce=function(e,n=0,r={}){"object"!=typeof r&&(r={});const{leading:o=!1,trailing:i=!0,maxWait:a}=r,s=Array(2);let l;o&&(s[0]="leading"),i&&(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}}(XP)),XP}function ej(){return VP||(VP=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QP();e.throttle=function(e,n=0,r={}){const{leading:o=!0,trailing:i=!0}=r;return t.debounce(e,n,{leading:o,maxWait:n,trailing:i})}}(GP)),GP}function tj(){return FP?BP:(FP=1,BP=ej().throttle)}var nj=i(tj()),rj=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];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 i=0;console.warn(t.replace(/%s/g,()=>r[i++]))}},oj={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},ij=(e,t,n)=>{var{width:r=oj.width,height:o=oj.height,aspect:i,maxHeight:a}=n,s=Ix(r)?e:Number(r),l=Ix(o)?t:Number(o);return i&&i>0&&(s?l=s/i:l&&(s=l*i),a&&null!=l&&l>a&&(l=a)),{calculatedWidth:s,calculatedHeight:l}},aj={width:0,height:0,overflow:"visible"},sj={width:0,overflowX:"visible"},lj={height:0,overflowY:"visible"},cj={},uj=e=>{var{width:t,height:n}=e,r=Ix(t),o=Ix(n);return r&&o?aj:r?sj:o?lj:cj};function dj(){return dj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dj.apply(null,arguments)}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}var mj=e.createContext(oj.initialDimension);function yj(t){var{children:n,width:o,height:i}=t,a=e.useMemo(()=>({width:o,height:i}),[o,i]);return function(e){return lP(e.width)&&lP(e.height)}(a)?r.createElement(mj.Provider,{value:a},n):null}var vj=()=>e.useContext(mj),gj=e.forwardRef((t,n)=>{var{aspect:o,initialDimension:i=oj.initialDimension,width:a,height:s,minWidth:l=oj.minWidth,minHeight:c,maxHeight:u,children:d,debounce:f=oj.debounce,id:p,className:h,onResize:m,style:y={}}=t,v=e.useRef(null),g=e.useRef();g.current=m,e.useImperativeHandle(n,()=>v.current);var[b,x]=e.useState({containerWidth:i.width,containerHeight:i.height}),w=e.useCallback((e,t)=>{x(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]);e.useEffect(()=>{if(null==v.current||"undefined"==typeof ResizeObserver)return Kx;var e=e=>{var t,n=e[0];if(null!=n){var{width:r,height:o}=n.contentRect;w(r,o),null===(t=g.current)||void 0===t||t.call(g,r,o)}};f>0&&(e=nj(e,f,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=v.current.getBoundingClientRect();return w(n,r),t.observe(v.current),()=>{t.disconnect()}},[w,f]);var{containerWidth:E,containerHeight:O}=b;rj(!o||o>0,"The aspect(%s) must be greater than zero.",o);var{calculatedWidth:S,calculatedHeight:k}=ij(E,O,{width:a,height:s,aspect:o,maxHeight:u});return rj(null!=S&&S>0||null!=k&&k>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.",S,k,a,s,l,c,o),r.createElement("div",{id:p?"".concat(p):void 0,className:H("recharts-responsive-container",h),style:pj(pj({},y),{},{width:a,height:s,minWidth:l,minHeight:c,maxHeight:u}),ref:v},r.createElement("div",{style:uj({width:a,height:s})},r.createElement(yj,{width:S,height:k},d)))}),bj=e.forwardRef((e,t)=>{var n=vj();if(lP(n.width)&&lP(n.height))return e.children;var{width:o,height:i}=function(e){var{width:t,height:n,aspect:r}=e,o=t,i=n;return void 0===o&&void 0===i?(o=oj.width,i=oj.height):void 0===o?o=r&&r>0?void 0:oj.width:void 0===i&&(i=r&&r>0?void 0:oj.height),{width:o,height:i}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=ij(void 0,void 0,{width:o,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Dx(a)&&Dx(s)?r.createElement(yj,{width:a,height:s},e.children):r.createElement(gj,dj({},e,{width:o,height:i,ref:t}))});function xj(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 wj=()=>{var e,t=HP(),n=HE(UP),r=HE(qP),o=null===(e=HE(YP))||void 0===e?void 0:e.padding;return t&&r&&o?{width:r.width-o.left-o.right,height:r.height-o.top-o.bottom,x:o.left,y:o.top}:n},Ej={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Oj=()=>{var e;return null!==(e=HE($P))&&void 0!==e?e:Ej},Sj=()=>HE(jP),kj=()=>HE(AP),Pj=e=>e.layout.layoutType,jj=()=>HE(Pj),Aj=()=>{var e=jj();if("horizontal"===e||"vertical"===e)return e},Tj=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},Cj=t=>{var n=$E(),r=HP(),{width:o,height:i}=t,a=vj(),s=o,l=i;return a&&(s=a.width>0?a.width:o,l=a.height>0?a.height:i),e.useEffect(()=>{!r&&lP(s)&&lP(l)&&n(rP({width:s,height:l}))},[n,r,s,l]),null},Mj=Symbol.for("immer-nothing"),Nj=Symbol.for("immer-draftable"),Ij=Symbol.for("immer-state"),Dj="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 _j(e,...t){if("production"!==process.env.NODE_ENV){const n=Dj[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 Rj=Object.getPrototypeOf;function Lj(e){return!!e&&!!e[Ij]}function zj(e){return!!e&&(Fj(e)||Array.isArray(e)||!!e[Nj]||!!e.constructor?.[Nj]||Hj(e)||Yj(e))}var Vj=Object.prototype.constructor.toString(),Bj=new WeakMap;function Fj(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=Bj.get(n);return void 0===r&&(r=Function.toString.call(n),Bj.set(n,r)),r===Vj}function $j(e,t,n=!0){if(0===Uj(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 Uj(e){const t=e[Ij];return t?t.type_:Array.isArray(e)?1:Hj(e)?2:Yj(e)?3:0}function Wj(e,t){return 2===Uj(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Kj(e,t,n){const r=Uj(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Hj(e){return e instanceof Map}function Yj(e){return e instanceof Set}function qj(e){return e.copy_||e.base_}function Gj(e,t){if(Hj(e))return new Map(e);if(Yj(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Fj(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Ij];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Rj(e),t)}{const t=Rj(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function Xj(e,t=!1){return Jj(e)||Lj(e)||!zj(e)||(Uj(e)>1&&Object.defineProperties(e,{set:Zj,add:Zj,clear:Zj,delete:Zj}),Object.freeze(e),t&&Object.values(e).forEach(e=>Xj(e,!0))),e}var Zj={value:function(){_j(2)}};function Jj(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var Qj,eA={};function tA(e){const t=eA[e];return t||_j(0,e),t}function nA(){return Qj}function rA(e,t){t&&(tA("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function oA(e){iA(e),e.drafts_.forEach(sA),e.drafts_=null}function iA(e){e===Qj&&(Qj=e.parent_)}function aA(e){return Qj={drafts_:[],parent_:Qj,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function sA(e){const t=e[Ij];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function lA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Ij].modified_&&(oA(t),_j(4)),zj(e)&&(e=cA(t,e),t.parent_||dA(t,e)),t.patches_&&tA("Patches").generateReplacementPatches_(n[Ij].base_,e,t.patches_,t.inversePatches_)):e=cA(t,n,[]),oA(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Mj?e:void 0}function cA(e,t,n){if(Jj(t))return t;const r=e.immer_.shouldUseStrictIteration(),o=t[Ij];if(!o)return $j(t,(r,i)=>uA(e,o,t,r,i,n),r),t;if(o.scope_!==e)return t;if(!o.modified_)return dA(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,a=!1;3===o.type_&&(i=new Set(t),t.clear(),a=!0),$j(i,(r,i)=>uA(e,o,t,r,i,n,a),r),dA(e,t,!1),n&&e.patches_&&tA("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function uA(e,t,n,r,o,i,a){if(null==o)return;if("object"!=typeof o&&!a)return;const s=Jj(o);if(!s||a){if("production"!==process.env.NODE_ENV&&o===n&&_j(5),Lj(o)){const a=cA(e,o,i&&t&&3!==t.type_&&!Wj(t.assigned_,r)?i.concat(r):void 0);if(Kj(n,r,a),!Lj(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(zj(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===o&&s)return;cA(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(Hj(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||dA(e,o)}}}function dA(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xj(t,n)}var fA={get(e,t){if(t===Ij)return e;const n=qj(e);if(!Wj(n,t))return function(e,t,n){const r=mA(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_||!zj(r)?r:r===hA(e.base_,t)?(vA(e),e.copy_[t]=gA(r,e)):r},has:(e,t)=>t in qj(e),ownKeys:e=>Reflect.ownKeys(qj(e)),set(e,t,n){const r=mA(qj(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=hA(qj(e),t),o=r?.[Ij];if(o&&o.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||Wj(e.base_,t)))return!0;vA(e),yA(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!==hA(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,vA(e),yA(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=qj(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){_j(11)},getPrototypeOf:e=>Rj(e.base_),setPrototypeOf(){_j(12)}},pA={};function hA(e,t){const n=e[Ij];return(n?qj(n):e)[t]}function mA(e,t){if(!(t in e))return;let n=Rj(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Rj(n)}}function yA(e){e.modified_||(e.modified_=!0,e.parent_&&yA(e.parent_))}function vA(e){e.copy_||(e.copy_=Gj(e.base_,e.scope_.immer_.useStrictShallowCopy_))}$j(fA,(e,t)=>{pA[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),pA.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&_j(13),pA.set.call(this,e,t,void 0)},pA.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&_j(14),fA.set.call(this,e[0],t,n,e[0])};function gA(e,t){const n=Hj(e)?tA("MapSet").proxyMap_(e,t):Yj(e)?tA("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:nA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=fA;n&&(o=[r],i=pA);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}(e,t);return(t?t.scope_:nA()).drafts_.push(n),n}function bA(e){if(!zj(e)||Jj(e))return e;const t=e[Ij];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Gj(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Gj(e,!0);return $j(n,(e,t)=>{Kj(n,e,bA(t))},r),t&&(t.finalized_=!1),n}var xA=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,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if("function"!=typeof t&&_j(6),void 0!==n&&"function"!=typeof n&&_j(7),zj(e)){const o=aA(this),i=gA(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?oA(o):iA(o)}return rA(o,n),lA(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Mj&&(r=void 0),this.autoFreeze_&&Xj(r,!0),n){const t=[],o=[];tA("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}_j(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){zj(e)||_j(8),Lj(e)&&(e=function(e){Lj(e)||_j(10,e);return bA(e)}(e));const t=aA(this),n=gA(e,void 0);return n[Ij].isManual_=!0,iA(t),n}finishDraft(e,t){const n=e&&e[Ij];n&&n.isManual_||_j(9);const{scope_:r}=n;return rA(r,t),lA(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=tA("Patches").applyPatches_;return Lj(e)?r(e,t):this.produce(e,e=>r(e,t))}};xA.produce;var wA,EA=xk({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:uk()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,o=BS(e).payload.indexOf(n);o>-1&&(e.payload[o]=r)},prepare:uk()},removeLegendPayload:{reducer(e,t){var n=BS(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:uk()}}}),{setLegendSize:OA,setLegendSettings:SA,addLegendPayload:kA,replaceLegendPayload:PA,removeLegendPayload:jA}=EA.actions,AA=EA.reducer,TA={exports:{}},CA={};var MA,NA,IA={};
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
+ */NA||(NA=1,"production"===process.env.NODE_ENV?TA.exports=function(){if(wA)return CA;wA=1;var t=e,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;return CA.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=o(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(!i){if(i=!0,r=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,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,o=a)}var r,o,i=!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 i(function(){f.hasValue=!0,f.value=p},[p]),s(p),p},CA}():TA.exports=(MA||(MA=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 t=e,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;IA.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=o(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(!i){if(i=!0,r=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,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,o=a)}var r,o,i=!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 i(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())}()),IA)),TA.exports;var DA={notify(){},get:()=>[]};var _A=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),RA=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),LA=(()=>_A||RA?r.useLayoutEffect:r.useEffect)();function zA(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function VA(e,t){if(zA(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])||!zA(e[n[r]],t[n[r]]))return!1;return!0}var BA=Symbol.for("react-redux-context"),FA="undefined"!=typeof globalThis?globalThis:{};function $A(){if(!r.createContext)return{};const e=FA[BA]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),"production"!==process.env.NODE_ENV&&(t.displayName="ReactRedux"),e.set(r.createContext,t)),t}var UA=$A();var WA=function(e){const{children:t,context:n,serverState:o,store:i}=e,a=r.useMemo(()=>{const t=function(e){let t,n=DA,r=0,o=!1;function i(){l.onStateChange&&l.onStateChange()}function a(){r++,t||(t=e.subscribe(i),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 o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function s(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=DA)}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:i,isSubscribed:function(){return o},trySubscribe:function(){o||(o=!0,a())},tryUnsubscribe:function(){o&&(o=!1,s())},getListeners:()=>n};return l}(i),n={store:i,subscription:t,getServerState:o?()=>o:void 0};if("production"===process.env.NODE_ENV)return n;{const{identityFunctionCheck:t="once",stabilityCheck:r="once"}=e;return Object.assign(n,{stabilityCheck:r,identityFunctionCheck:t})}},[i,o]),s=r.useMemo(()=>i.getState(),[i]);LA(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=n||UA;return r.createElement(l.Provider,{value:a},t)},KA=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function HA(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function YA(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(KA.has(r)){if(null==e[r]&&null==t[r])continue;if(!VA(e[r],t[r]))return!1}else if(!HA(e[r],t[r]))return!1;return!0}function qA(){return qA=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},qA.apply(null,arguments)}function GA(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 XA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GA(Object(n),!0).forEach(function(t){ZA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZA(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){return Array.isArray(e)&&_x(e[0])&&_x(e[1])?e.join(" ~ "):e}var QA={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 eT=e=>{var{separator:t=QA.separator,contentStyle:n,itemStyle:o,labelStyle:i=QA.labelStyle,payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=QA.accessibilityLayer}=e,h=XA(XA({},QA.contentStyle),n),m=XA({margin:0},i),y=!$x(d),v=y?d:"",g=H("recharts-default-tooltip",c),b=H("recharts-tooltip-label",u);y&&f&&null!=a&&(v=f(d,a));var x=p?{role:"status","aria-live":"assertive"}:{};return r.createElement("div",qA({className:g,style:h},x),r.createElement("p",{className:b,style:m},r.isValidElement(v)?v:"".concat(v)),(()=>{if(a&&a.length){var e=function(e,t){return null==t?e:vO(e,t)}(a,l),n=e.map((e,n)=>{if(!e||"none"===e.type)return null;var i=e.formatter||s||JA,{value:l,name:c}=e,u=l,d=c;if(i){var f=i(l,c,e,n,a);if(Array.isArray(f))[u,d]=f;else{if(null==f)return null;u=f}}var p=XA(XA({},QA.itemStyle),{},{color:e.color||QA.itemStyle.color},o);return r.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(n),style:p},_x(d)?r.createElement("span",{className:"recharts-tooltip-item-name"},d):null,_x(d)?r.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,r.createElement("span",{className:"recharts-tooltip-item-value"},u),r.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return r.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},n)}return null})())},tT="recharts-tooltip-wrapper",nT={visibility:"hidden"};function rT(e){var{coordinate:t,translateX:n,translateY:r}=e;return H(tT,{["".concat(tT,"-right")]:Dx(n)&&t&&Dx(t.x)&&n>=t.x,["".concat(tT,"-left")]:Dx(n)&&t&&Dx(t.x)&&n<t.x,["".concat(tT,"-bottom")]:Dx(r)&&t&&Dx(t.y)&&r>=t.y,["".concat(tT,"-top")]:Dx(r)&&t&&Dx(t.y)&&r<t.y})}function oT(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:o,position:i,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(i&&Dx(i[r]))return i[r];var u=n[r]-s-(o>0?o:0),d=n[r]+o;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 iT=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function aT(){var[t,n]=e.useState(()=>!iT&&(!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches));return e.useEffect(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{n(e.matches)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[]),t}function sT(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 lT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sT(Object(n),!0).forEach(function(t){cT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cT(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 uT(e){if(!e.prefersReducedMotion||"auto"!==e.isAnimationActive)return e.isAnimationActive&&e.active?"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing):void 0}function dT(e){var t,n,o,i,a,s,l=aT(),[c,u]=r.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));r.useEffect(()=>{var t=t=>{var n,r,o,i;"Escape"===t.key&&u({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[null===(t=e.coordinate)||void 0===t?void 0:t.x,null===(n=e.coordinate)||void 0===n?void 0:n.y]),!c.dismissed||(null!==(o=null===(i=e.coordinate)||void 0===i?void 0:i.x)&&void 0!==o?o:0)===c.dismissedAtCoordinate.x&&(null!==(a=null===(s=e.coordinate)||void 0===s?void 0:s.y)&&void 0!==a?a:0)===c.dismissedAtCoordinate.y||u(lT(lT({},c),{},{dismissed:!1}));var{cssClasses:d,cssProperties:f}=function(e){var t,n,r,{allowEscapeViewBox:o,coordinate:i,offsetTop:a,offsetLeft:s,position:l,reverseDirection:c,tooltipBox:u,useTranslate3d:d,viewBox:f}=e;return t=u.height>0&&u.width>0&&i?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=oT({allowEscapeViewBox:o,coordinate:i,key:"x",offset:s,position:l,reverseDirection:c,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),translateY:r=oT({allowEscapeViewBox:o,coordinate:i,key:"y",offset:a,position:l,reverseDirection:c,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),useTranslate3d:d}):nT,{cssProperties:t,cssClasses:rT({translateX:n,translateY:r,coordinate:i})}}({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:"number"==typeof e.offset?e.offset:e.offset.x,offsetTop:"number"==typeof e.offset?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),p=e.hasPortalFromProps?{}:lT(lT({transition:uT({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=lT(lT({},p),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return r.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:d,style:h,ref:e.innerRef},e.children)}var fT=r.memo(dT),pT=()=>{var e;return null===(e=HE(e=>e.rootProps.accessibilityLayer))||void 0===e||e};function hT(){return hT=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},hT.apply(null,arguments)}function mT(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 yT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mT(Object(n),!0).forEach(function(t){vT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vT(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 gT={curveBasisClosed:function(e){return new Wb(e)},curveBasisOpen:function(e){return new Kb(e)},curveBasis:function(e){return new Ub(e)},curveBumpX:function(e){return new Ob(e,!0)},curveBumpY:function(e){return new Ob(e,!1)},curveLinearClosed:function(e){return new Hb(e)},curveLinear:gb,curveMonotoneX:function(e){return new Zb(e)},curveMonotoneY:function(e){return new Jb(e)},curveNatural:function(e){return new ex(e)},curveStep:function(e){return new nx(e,.5)},curveStepAfter:function(e){return new nx(e,1)},curveStepBefore:function(e){return new nx(e,0)}},bT=e=>sP(e.x)&&sP(e.y),xT=e=>null!=e.base&&bT(e.base)&&bT(e),wT=e=>e.x,ET=e=>e.y,OT={connectNulls:!1,type:"linear"},ST=e=>{var{type:t=OT.type,points:n=[],baseLine:r,layout:o,connectNulls:i=OT.connectNulls}=e,a=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(Ux(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=gT["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return gT[n]||gb})(t,o),s=i?n.filter(bT):n;if(Array.isArray(r)){var l=n.map((e,t)=>yT(yT({},e),{},{base:r[t]}));return("vertical"===o?Eb().y(ET).x1(wT).x0(e=>e.base.x):Eb().x(wT).y1(ET).y0(e=>e.base.y)).defined(xT).curve(a)(i?l.filter(xT):l)}return("vertical"===o&&Dx(r)?Eb().y(ET).x1(wT).x0(r):Dx(r)?Eb().x(wT).y1(ET).y0(r):wb().x(wT).y(ET)).defined(bT).curve(a)(s)},kT=e=>{var{className:t,points:n,path:o,pathRef:i}=e,a=jj();if(!(n&&n.length||o))return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},l=n&&n.length?ST(s):o;return r.createElement("path",hT({},Yg(e),tw(e),{className:H("recharts-curve",t),d:null===l?void 0:l,ref:i}))},PT=["x","y","top","left","width","height","className"];function jT(){return jT=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},jT.apply(null,arguments)}function AT(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 TT(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 CT=(e,t,n,r,o,i)=>"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),MT=e=>{var{x:t=0,y:n=0,top:o=0,left:i=0,width:a=0,height:s=0,className:l}=e,c=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,PT),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AT(Object(n),!0).forEach(function(t){TT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:t,y:n,top:o,left:i,width:a,height:s},c);return Dx(t)&&Dx(n)&&Dx(a)&&Dx(s)&&Dx(o)&&Dx(i)?r.createElement("path",jT({},Gg(u),{className:H("recharts-cross",l),d:CT(t,n,a,s,o,i)})):null};function NT(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 IT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NT(Object(n),!0).forEach(function(t){DT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DT(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 _T=(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(","),RT=(e,t)=>Object.keys(t).reduce((n,r)=>IT(IT({},n),{},{[r]:e(r,t[r])}),{});function LT(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 zT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LT(Object(n),!0).forEach(function(t){VT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VT(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 BT=(e,t,n)=>e+(t-e)*n,FT=e=>{var{from:t,to:n}=e;return t!==n},$T=(e,t,n)=>{var r=RT((t,n)=>{if(FT(n)){var[r,o]=e(n.from,n.to,n.velocity);return zT(zT({},n),{},{from:r,velocity:o})}return n},t);return n<1?RT((e,t)=>FT(t)&&null!=r[e]?zT(zT({},t),{},{velocity:BT(t.velocity,r[e].velocity,n),from:BT(t.from,r[e].from,n)}):t,t):$T(e,r,n-1)};function UT(e,t,n,r,o,i){var a,s=r.reduce((n,r)=>zT(zT({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{a||(a=r);var u=(r-a)/n.dt;s=$T(n,s,u),o(zT(zT(zT({},e),t),RT((e,t)=>t.from,s))),a=r,Object.values(s).filter(FT).length&&(l=i.setTimeout(c))};return()=>(l=i.setTimeout(c),()=>{var e;null===(e=l)||void 0===e||e()})}var WT=(e,t,n,r,o,i)=>{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?()=>(o(zT(zT({},e),t)),()=>{}):!0===n.isStepper?UT(e,t,n,l,o,i):function(e,t,n,r,o,i,a){var s,l=null,c=o.reduce((n,r)=>{var o=e[r],i=t[r];return null==o||null==i?n:zT(zT({},n),{},{[r]:[o,i]})},{}),u=o=>{s||(s=o);var d=(o-s)/r,f=RT((e,t)=>BT(...t,n(d)),c);if(i(zT(zT(zT({},e),t),f)),d<1)l=a.setTimeout(u);else{var p=RT((e,t)=>BT(...t,n(1)),c);i(zT(zT(zT({},e),t),p))}};return()=>(l=a.setTimeout(u),()=>{var e;null===(e=l)||void 0===e||e()})}(e,t,n,r,l,o,i)},KT=1e-4,HT=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],YT=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),qT=(e,t)=>n=>{var r=HT(e,t);return YT(r,n)},GT=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 o=r.map(e=>parseFloat(e));return[o[0],o[1],o[2],o[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]},XT=(e,t,n,r)=>{var o,i,a=qT(e,n),s=qT(t,r),l=(o=e,i=n,e=>{var t=[...HT(o,i).map((e,t)=>e*t).slice(1),0];return YT(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 o=a(n)-t,i=l(n);if(Math.abs(o-t)<KT||i<KT)return s(n);n=c(n-o/i)}return s(n)};return u.isStepper=!1,u},ZT=function(){return XT(...GT(...arguments))},JT=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return ZT(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,o=(e,o,i)=>{var a=i+(-(e-o)*t-i*n)*r/1e3,s=i*r/1e3+e;return Math.abs(s-o)<KT&&Math.abs(a)<KT?[o,0]:[s,a]};return o.isStepper=!0,o.dt=r,o}();default:if("cubic-bezier"===e.split("(")[0])return ZT(e)}return"function"==typeof e?e:null};class QT{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,o=i=>{i-n>=t?e(i):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(o))};return r=requestAnimationFrame(o),()=>{null!=r&&cancelAnimationFrame(r)}}}function eC(){return function(e){var t=()=>null,n=!1,r=null,o=i=>{if(!n){if(Array.isArray(i)){if(!i.length)return;var a=i,[s,...l]=a;return"number"==typeof s?void(r=e.setTimeout(o.bind(null,l),s)):(o(s),void(r=e.setTimeout(o.bind(null,l))))}"string"==typeof i&&t(i),"object"==typeof i&&t(i),"function"==typeof i&&i()}};return{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),o(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}(new QT)}var tC=e.createContext(eC);var nC={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},rC={t:0},oC={t:1};function iC(t){var n,r,o,i=iw(t,nC),{isActive:a,canBegin:s,duration:l,easing:c,begin:u,onAnimationEnd:d,onAnimationStart:f,children:p}=i,h=aT(),m="auto"===a?!iT&&!h:a,y=(n=i.animationId,r=i.animationManager,o=e.useContext(tC),e.useMemo(()=>null!=r?r:o(n),[n,r,o])),[v,g]=e.useState(m?rC:oC),b=e.useRef(null);return e.useEffect(()=>{m||g(oC)},[m]),e.useEffect(()=>{if(!m||!s)return Kx;var e=WT(rC,oC,JT(c),l,g,y.getTimeoutController());return y.start([f,u,()=>{b.current=e()},l,d]),()=>{y.stop(),b.current&&b.current(),d()}},[m,s,l,c,u,f,d,y]),p(v.t)}function aC(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=e.useRef(Lx(n)),o=e.useRef(t);return o.current!==t&&(r.current=Lx(n),o.current=t),r.current}var sC,lC,cC,uC,dC,fC,pC,hC,mC,yC,vC=["radius"],gC=["radius"];function bC(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 xC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bC(Object(n),!0).forEach(function(t){wC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wC(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 EC(){return EC=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},EC.apply(null,arguments)}function OC(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function SC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var kC=(e,t,n,r,o)=>{var i,a=Tx(n),s=Tx(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(o)){for(var f=[0,0,0,0],p=0;p<4;p++){var h,m=null!==(h=o[p])&&void 0!==h?h:0;f[p]=m>l?l:m}i=Cx(sC||(sC=SC(["M",",",""])),e,t+c*f[0]),f[0]>0&&(i+=Cx(lC||(lC=SC(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,e+u*f[0],t)),i+=Cx(cC||(cC=SC(["L ",",",""])),e+n-u*f[1],t),f[1]>0&&(i+=Cx(uC||(uC=SC(["A ",",",",0,0,",",\n ",",",""])),f[1],f[1],d,e+n,t+c*f[1])),i+=Cx(dC||(dC=SC(["L ",",",""])),e+n,t+r-c*f[2]),f[2]>0&&(i+=Cx(fC||(fC=SC(["A ",",",",0,0,",",\n ",",",""])),f[2],f[2],d,e+n-u*f[2],t+r)),i+=Cx(pC||(pC=SC(["L ",",",""])),e+u*f[3],t+r),f[3]>0&&(i+=Cx(hC||(hC=SC(["A ",",",",0,0,",",\n ",",",""])),f[3],f[3],d,e,t+r-c*f[3])),i+="Z"}else if(l>0&&o===+o&&o>0){var y=Math.min(l,o);i=Cx(mC||(mC=SC(["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*y,y,y,d,e+u*y,t,e+n-u*y,t,y,y,d,e+n,t+c*y,e+n,t+r-c*y,y,y,d,e+n-u*y,t+r,e+u*y,t+r,y,y,d,e,t+r-c*y)}else i=Cx(yC||(yC=SC(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return i},PC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},jC=t=>{var n=iw(t,PC),o=e.useRef(null),[i,a]=e.useState(-1);e.useEffect(()=>{if(o.current&&o.current.getTotalLength)try{var e=o.current.getTotalLength();e&&a(e)}catch(e){}},[]);var{x:s,y:l,width:c,height:u,radius:d,className:f}=n,{animationEasing:p,animationDuration:h,animationBegin:m,isAnimationActive:y,isUpdateAnimationActive:v}=n,g=e.useRef(c),b=e.useRef(u),x=e.useRef(s),w=e.useRef(l),E=aC(e.useMemo(()=>({x:s,y:l,width:c,height:u,radius:d}),[s,l,c,u,d]),"rectangle-");if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var O=H("recharts-rectangle",f);if(!v){var S=Gg(n),{radius:k}=S,P=OC(S,vC);return r.createElement("path",EC({},P,{x:Tx(s),y:Tx(l),width:Tx(c),height:Tx(u),radius:"number"==typeof d?d:void 0,className:O,d:kC(s,l,c,u,d)}))}var j=g.current,A=b.current,T=x.current,C=w.current,M="0px ".concat(-1===i?1:i,"px"),N="".concat(i,"px ").concat(i,"px"),I=_T(["strokeDasharray"],h,"string"==typeof p?p:PC.animationEasing);return r.createElement(iC,{animationId:E,key:E,canBegin:i>0,duration:h,easing:p,isActive:v,begin:m},e=>{var t,i=Bx(j,c,e),a=Bx(A,u,e),f=Bx(T,s,e),p=Bx(C,l,e);o.current&&(g.current=i,b.current=a,x.current=f,w.current=p),t=y?e>0?{transition:I,strokeDasharray:N}:{strokeDasharray:M}:{strokeDasharray:N};var h=Gg(n),{radius:m}=h,v=OC(h,gC);return r.createElement("path",EC({},v,{radius:"number"==typeof d?d:void 0,className:O,d:kC(f,p,i,a,d),ref:o,style:xC(xC({},t),n.style)}))})};function AC(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 TC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AC(Object(n),!0).forEach(function(t){CC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CC(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 MC,NC,IC,DC,_C,RC,LC,zC=Math.PI/180,VC=e=>180*e/Math.PI,BC=(e,t,n,r)=>({x:e+Math.cos(-zC*r)*n,y:t+Math.sin(-zC*r)*n}),FC=(e,t)=>{var{x:n,y:r}=e,{cx:o,cy:i}=t,a=((e,t)=>{var{x:n,y:r}=e,{x:o,y:i}=t;return Math.sqrt((n-o)**2+(r-i)**2)})({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a,angle:0};var s=(n-o)/a,l=Math.acos(s);return r>i&&(l=2*Math.PI-l),{radius:a,angle:VC(l),angleInRadian:l}},$C=(e,t)=>{var{startAngle:n,endAngle:r}=t,o=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},UC=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:o,angle:i}=FC({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(o<a||o>s)return null;if(0===o)return null;var l,{startAngle:c,endAngle:u}=(e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-360*i,endAngle:n-360*i}})(t),d=i;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?TC(TC({},t),{},{radius:o,angle:$C(d,t)}):null};function WC(e){var{cx:t,cy:n,radius:r,startAngle:o,endAngle:i}=e;return{points:[BC(t,n,r,o),BC(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function KC(){return KC=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},KC.apply(null,arguments)}function HC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var YC=e=>{var{cx:t,cy:n,radius:r,angle:o,sign:i,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+r,u=Math.asin(s/c)/zC,d=l?o:o+i*u,f=l?o-i*u:o;return{center:BC(t,n,c,d),circleTangency:BC(t,n,r,d),lineTangency:BC(t,n,c*Math.cos(u*zC),f),theta:u}},qC=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a}=e,s=((e,t)=>Mx(t-e)*Math.min(Math.abs(t-e),359.999))(i,a),l=i+s,c=BC(t,n,o,i),u=BC(t,n,o,l),d=Cx(MC||(MC=HC(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),c.x,c.y,o,o,+(Math.abs(s)>180),+(i>l),u.x,u.y);if(r>0){var f=BC(t,n,r,i),p=BC(t,n,r,l);d+=Cx(NC||(NC=HC(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),p.x,p.y,r,r,+(Math.abs(s)>180),+(i<=l),f.x,f.y)}else d+=Cx(IC||(IC=HC(["L ",","," Z"])),t,n);return d},GC={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},XC=e=>{var t=iw(e,GC),{cx:n,cy:o,innerRadius:i,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(a<i||u===d)return null;var p,h=H("recharts-sector",f),m=a-i,y=zx(s,m,0,!0);return p=y>0&&Math.abs(u-d)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,cornerRadius:i,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=Mx(c-l),{circleTangency:d,lineTangency:f,theta:p}=YC({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:i,cornerIsExternal:s}),{circleTangency:h,lineTangency:m,theta:y}=YC({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:s}),v=s?Math.abs(l-c):Math.abs(l-c)-p-y;if(v<0)return a?Cx(DC||(DC=HC(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),f.x,f.y,i,i,2*i,i,i,2*-i):qC({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var g=Cx(_C||(_C=HC(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),f.x,f.y,i,i,+(u<0),d.x,d.y,o,o,+(v>180),+(u<0),h.x,h.y,i,i,+(u<0),m.x,m.y);if(r>0){var{circleTangency:b,lineTangency:x,theta:w}=YC({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),{circleTangency:E,lineTangency:O,theta:S}=YC({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),k=s?Math.abs(l-c):Math.abs(l-c)-w-S;if(k<0&&0===i)return"".concat(g,"L").concat(t,",").concat(n,"Z");g+=Cx(RC||(RC=HC(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),O.x,O.y,i,i,+(u<0),E.x,E.y,r,r,+(k>180),+(u>0),b.x,b.y,i,i,+(u<0),x.x,x.y)}else g+=Cx(LC||(LC=HC(["L",",","Z"])),t,n);return g})({cx:n,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(y,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):qC({cx:n,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),r.createElement("path",KC({},Gg(t),{className:h,d:p}))};function ZC(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(ew(t)){if("centric"===e){var{cx:r,cy:o,innerRadius:i,outerRadius:a,angle:s}=t,l=BC(r,o,i,s),c=BC(r,o,a,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return WC(t)}}var JC,QC,eM,tM,nM,rM={},oM={},iM={};function aM(){return JC||(JC=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rO();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(iM)),iM}function sM(){return QC||(QC=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aM();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}}(oM)),oM}function lM(){return eM||(eM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hO(),n=sM();e.range=function(e,r,o){o&&"number"!=typeof o&&t.isIterateeCall(e,r,o)&&(r=o=void 0),e=n.toFinite(e),void 0===r?(r=e,e=0):r=n.toFinite(r),o=void 0===o?e<r?1:-1:n.toFinite(o);const i=Math.max(Math.ceil((r-e)/(o||1)),0),a=new Array(i);for(let t=0;t<i;t++)a[t]=e,e+=o;return a}}(rM)),rM}function cM(){return nM?tM:(nM=1,tM=lM().range)}var uM=i(cM()),dM=e=>e.chartData,fM=La([dM],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),pM=(e,t,n,r)=>r?fM(e):dM(e),hM=(e,t,n)=>n?fM(e):dM(e),mM=La([pM],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});La([fM],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});var yM=La([dM],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});function vM(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(sP(t)&&sP(n))return!0}return!1}function gM(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function bM(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[o,i]=e;if(sP(o))n=o;else if("function"==typeof o)return;if(sP(i))r=i;else if("function"==typeof i)return;var a=[n,r];if(vM(a))return a}}var xM,wM=1e9,EM=!0,OM="[DecimalError] ",SM=OM+"Invalid argument: ",kM=OM+"Exponent out of range: ",PM=Math.floor,jM=Math.pow,AM=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,TM=1e7,CM=9007199254740991,MM=PM(1286742750677284.5),NM={};function IM(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),EM?UM(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),i>(s=(a=Math.ceil(d/7))>s?a+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=l.length)-(i=c.length)<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/TM|0,l[i]%=TM;for(n&&(l.unshift(n),++o),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=o,EM?UM(t,d):t}function DM(e,t,n){if(e!==~~e||e<t||e>n)throw Error(SM+e)}function _M(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(i+=BM(n)),i+=r;(n=7-(r=(a=e[t])+"").length)&&(i+=BM(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}NM.absoluteValue=NM.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},NM.comparedTo=NM.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(o=e.d.length)?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1},NM.decimalPlaces=NM.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},NM.dividedBy=NM.div=function(e){return RM(this,new this.constructor(e))},NM.dividedToIntegerBy=NM.idiv=function(e){var t=this.constructor;return UM(RM(this,new t(e),0,1),t.precision)},NM.equals=NM.eq=function(e){return!this.cmp(e)},NM.exponent=function(){return zM(this)},NM.greaterThan=NM.gt=function(e){return this.cmp(e)>0},NM.greaterThanOrEqualTo=NM.gte=function(e){return this.cmp(e)>=0},NM.isInteger=NM.isint=function(){return this.e>this.d.length-2},NM.isNegative=NM.isneg=function(){return this.s<0},NM.isPositive=NM.ispos=function(){return this.s>0},NM.isZero=function(){return 0===this.s},NM.lessThan=NM.lt=function(e){return this.cmp(e)<0},NM.lessThanOrEqualTo=NM.lte=function(e){return this.cmp(e)<1},NM.logarithm=NM.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(xM))throw Error(OM+"NaN");if(n.s<1)throw Error(OM+(n.s?"NaN":"-Infinity"));return n.eq(xM)?new r(0):(EM=!1,t=RM(FM(n,i),FM(e,i),i),EM=!0,UM(t,o))},NM.minus=NM.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?WM(t,e):IM(t,(e.s=-e.s,e))},NM.modulo=NM.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(OM+"NaN");return n.s?(EM=!1,t=RM(n,e,0,1).times(e),EM=!0,n.minus(t)):UM(new r(n),o)},NM.naturalExponential=NM.exp=function(){return LM(this)},NM.naturalLogarithm=NM.ln=function(){return FM(this)},NM.negated=NM.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},NM.plus=NM.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?IM(t,e):WM(t,(e.s=-e.s,e))},NM.precision=NM.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(SM+e);if(t=zM(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},NM.squareRoot=NM.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(OM+"NaN")}for(e=zM(s),EM=!1,0==(o=Math.sqrt(+s))||o==1/0?(((t=_M(s.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=PM((e+1)/2)-(e<0||e%2),r=new l(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(o.toString()),o=a=(n=l.precision)+3;;)if(r=(i=r).plus(RM(s,i,a+2)).times(.5),_M(i.d).slice(0,a)===(t=_M(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(UM(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if("9999"!=t)break;a+=4}return EM=!0,UM(r,n)},NM.times=NM.mul=function(e){var t,n,r,o,i,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)&&(i=f,f=p,p=i,a=l,l=c,c=a),i=[],r=a=l+c;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%TM|0,t=s/TM|0;i[o]=(i[o]+t)%TM|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,EM?UM(e,d.precision):e},NM.toDecimalPlaces=NM.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(DM(e,0,wM),void 0===t?t=r.rounding:DM(t,0,8),UM(n,e+zM(n)+1,t))},NM.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=KM(r,!0):(DM(e,0,wM),void 0===t?t=o.rounding:DM(t,0,8),n=KM(r=UM(new o(r),e+1,t),!0,e+1)),n},NM.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?KM(o):(DM(e,0,wM),void 0===t?t=i.rounding:DM(t,0,8),n=KM((r=UM(new i(o),e+zM(o)+1,t)).abs(),!1,e+zM(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},NM.toInteger=NM.toint=function(){var e=this,t=e.constructor;return UM(new t(e),zM(e)+1,t.rounding)},NM.toNumber=function(){return+this},NM.toPower=NM.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l(xM);if(!(s=new l(s)).s){if(e.s<1)throw Error(OM+"Infinity");return s}if(s.eq(xM))return s;if(r=l.precision,e.eq(xM))return UM(s,r);if(a=(t=e.e)>=(n=e.d.length-1),i=s.s,a){if((n=c<0?-c:c)<=CM){for(o=new l(xM),t=Math.ceil(r/7+4),EM=!1;n%2&&HM((o=o.times(s)).d,t),0!==(n=PM(n/2));)HM((s=s.times(s)).d,t);return EM=!0,e.s<0?new l(xM).div(o):UM(o,r)}}else if(i<0)throw Error(OM+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,EM=!1,o=e.times(FM(s,r+12)),EM=!0,(o=LM(o)).s=i,o},NM.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?r=KM(o,(n=zM(o))<=i.toExpNeg||n>=i.toExpPos):(DM(e,1,wM),void 0===t?t=i.rounding:DM(t,0,8),r=KM(o=UM(new i(o),e,t),e<=(n=zM(o))||n<=i.toExpNeg,e)),r},NM.toSignificantDigits=NM.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(DM(e,1,wM),void 0===t?t=n.rounding:DM(t,0,8)),UM(new n(this),e,t)},NM.toString=NM.valueOf=NM.val=NM.toJSON=NM[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zM(e),n=e.constructor;return KM(e,t<=n.toExpNeg||t>=n.toExpPos)};var RM=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%TM|0,r=n/TM|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*TM+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,h,m,y,v,g,b,x,w,E,O,S,k=r.constructor,P=r.s==o.s?1:-1,j=r.d,A=o.d;if(!r.s)return new k(r);if(!o.s)throw Error(OM+"Division by zero");for(l=r.e-o.e,O=A.length,w=j.length,h=(p=new k(P)).d=[],c=0;A[c]==(j[c]||0);)++c;if(A[c]>(j[c]||0)&&--l,(g=null==i?i=k.precision:a?i+(zM(r)-zM(o))+1:i)<0)return new k(0);if(g=g/7+2|0,c=0,1==O)for(u=0,A=A[0],g++;(c<w||u)&&g--;c++)b=u*TM+(j[c]||0),h[c]=b/A|0,u=b%A|0;else{for((u=TM/(A[0]+1)|0)>1&&(A=e(A,u),j=e(j,u),O=A.length,w=j.length),x=O,y=(m=j.slice(0,O)).length;y<O;)m[y++]=0;(S=A.slice()).unshift(0),E=A[0],A[1]>=TM/2&&++E;do{u=0,(s=t(A,m,O,y))<0?(v=m[0],O!=y&&(v=v*TM+(m[1]||0)),(u=v/E|0)>1?(u>=TM&&(u=TM-1),1==(s=t(d=e(A,u),m,f=d.length,y=m.length))&&(u--,n(d,O<f?S:A,f))):(0==u&&(s=u=1),d=A.slice()),(f=d.length)<y&&d.unshift(0),n(m,d,y),-1==s&&(s=t(A,m,O,y=m.length))<1&&(u++,n(m,O<y?S:A,y)),y=m.length):0===s&&(u++,m=[0]),h[c++]=u,s&&m[0]?m[y++]=j[x]||0:(m=[j[x]],y=1)}while((x++<w||void 0!==m[0])&&g--)}return h[0]||h.shift(),p.e=l,UM(p,a?i+zM(p)+1:i)}}();function LM(e,t){var n,r,o,i,a,s=0,l=0,c=e.constructor,u=c.precision;if(zM(e)>16)throw Error(kM+zM(e));if(!e.s)return new c(xM);for(EM=!1,a=u,i=new c(.03125);e.abs().gte(.1);)e=e.times(i),l+=5;for(a+=Math.log(jM(2,l))/Math.LN10*2+5|0,n=r=o=new c(xM),c.precision=a;;){if(r=UM(r.times(e),a),n=n.times(++s),_M((i=o.plus(RM(r,n,a))).d).slice(0,a)===_M(o.d).slice(0,a)){for(;l--;)o=UM(o.times(o),a);return c.precision=u,null==t?(EM=!0,UM(o,u)):o}o=i}}function zM(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function VM(e,t,n){if(t>e.LN10.sd())throw EM=!0,n&&(e.precision=n),Error(OM+"LN10 precision limit exceeded");return UM(new e(e.LN10),t)}function BM(e){for(var t="";e--;)t+="0";return t}function FM(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=e,p=f.d,h=f.constructor,m=h.precision;if(f.s<1)throw Error(OM+(f.s?"NaN":"-Infinity"));if(f.eq(xM))return new h(0);if(null==t?(EM=!1,c=m):c=t,f.eq(10))return null==t&&(EM=!0),VM(h,c);if(c+=10,h.precision=c,r=(n=_M(p)).charAt(0),i=zM(f),!(Math.abs(i)<15e14))return l=VM(h,c+2,m).times(i+""),f=FM(new h(r+"."+n.slice(1)),c-10).plus(l),h.precision=m,null==t?(EM=!0,UM(f,m)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=_M((f=f.times(e)).d)).charAt(0),d++;for(i=zM(f),r>1?(f=new h("0."+n),i++):f=new h(r+"."+n.slice(1)),s=a=f=RM(f.minus(xM),f.plus(xM),c),u=UM(f.times(f),c),o=3;;){if(a=UM(a.times(u),c),_M((l=s.plus(RM(a,new h(o),c))).d).slice(0,c)===_M(s.d).slice(0,c))return s=s.times(2),0!==i&&(s=s.plus(VM(h,c+2,m).times(i+""))),s=RM(s,new h(d),c),h.precision=m,null==t?(EM=!0,UM(s,m)):s;s=l,o+=2}}function $M(e,t){var n,r,o;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(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=PM(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),EM&&(e.e>MM||e.e<-MM))throw Error(kM+n)}else e.s=0,e.e=0,e.d=[0];return e}function UM(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(i=d.length))return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;o=(r%=7)-7+a}if(void 0!==n&&(s=c/(i=jM(10,a-o-1))%10|0,l=t<0||void 0!==d[u+1]||c%i,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?o>0?c/jM(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=zM(e),d.length=1,t=t-i-1,d[0]=jM(10,(7-t%7)%7),e.e=PM(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,i=1,u--):(d.length=u+1,i=jM(10,7-r),d[u]=o>0?(c/jM(10,a-o)%jM(10,o)|0)*i:0),l)for(;;){if(0==u){(d[0]+=i)==TM&&(d[0]=1,++e.e);break}if(d[u]+=i,d[u]!=TM)break;d[u--]=0,i=1}for(r=d.length;0===d[--r];)d.pop();if(EM&&(e.e>MM||e.e<-MM))throw Error(kM+zM(e));return e}function WM(e,t){var n,r,o,i,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),EM?UM(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>(o=Math.max(Math.ceil(p/7),s)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((u=(o=l.length)<(s=d.length))&&(s=o),o=0;o<s;o++)if(l[o]!=d[o]){u=l[o]<d[o];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,o=d.length-s;o>0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]<d[o]){for(i=o;i&&0===l[--i];)l[i]=TM-1;--l[i],l[o]+=TM}l[o]-=d[o]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,EM?UM(t,p):t):new f(0)}function KM(e,t,n){var r,o=zM(e),i=_M(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+BM(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+BM(-o-1)+i,n&&(r=n-a)>0&&(i+=BM(r))):o>=a?(i+=BM(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+BM(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=BM(r))),e.s<0?"-"+i:i}function HM(e,t){if(e.length>t)return e.length=t,!0}function YM(e){if(!e||"object"!=typeof e)throw Error(OM+"Object expected");var t,n,r,o=["precision",1,wM,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(PM(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(SM+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(SM+n+": "+r);this[n]=new this(r)}return this}var qM=function e(t){var n,r,o;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)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(SM+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])):$M(t,e.toString())}if("string"!=typeof e)throw Error(SM+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!AM.test(e))throw Error(SM+e);$M(t,e)}if(i.prototype=NM,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=YM,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});xM=new qM(1);var GM=qM;function XM(e){return 0===e?1:Math.floor(new GM(e).abs().log(10).toNumber())+1}function ZM(e,t,n){for(var r=new GM(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i}var JM=e=>{var[t,n]=e,[r,o]=[t,n];return t>n&&([r,o]=[n,t]),[r,o]},QM=(e,t,n)=>{if(e.lte(0))return new GM(0);var r=XM(e.toNumber()),o=new GM(10).pow(r),i=e.div(o),a=1!==r?.05:.1,s=new GM(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return new GM(t?s.toNumber():Math.ceil(s.toNumber()))},eN=(e,t,n)=>{var r;if(e.lte(0))return new GM(0);var o=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new GM(i).abs().log(10).toNumber()),s=new GM(10).pow(a),l=e.div(s).toNumber(),c=o.findIndex(e=>e>=l-1e-10);if(-1===c&&(s=s.mul(10),c=0),(c+=n)>=o.length){var u=Math.floor(c/o.length);c%=o.length,s=s.mul(new GM(10).pow(u))}var d=null!==(r=o[c])&&void 0!==r?r:1,f=new GM(d).mul(s);return t?f:new GM(Math.ceil(f.toNumber()))},tN=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:QM;if(!Number.isFinite((t-e)/(n-1)))return{step:new GM(0),tickMin:new GM(0),tickMax:new GM(0)};var a,s=i(new GM(t).sub(e).div(n-1),r,o);a=e<=0&&t>=0?new GM(0):(a=new GM(e).add(t).div(2)).sub(new GM(a).mod(s));var l=Math.ceil(a.sub(e).div(s).toNumber()),c=Math.ceil(new GM(t).sub(a).div(s).toNumber()),u=l+c+1;return u>n?tN(e,t,n,r,o+1,i):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:s,tickMin:a.sub(new GM(l).mul(s)),tickMax:a.add(new GM(c).mul(s))})},nN=function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",a=Math.max(r,2),[s,l]=JM([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 GM(1),o=new GM(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new GM(10).pow(XM(e)-1),o=new GM(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new GM(Math.floor(e)))}else 0===e?o=new GM(Math.floor((t-1)/2)):n||(o=new GM(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(o.add(new GM(l-a).mul(r)).toNumber());return s})(s,r,o);var u="snap125"===i?eN:QM,{step:d,tickMin:f,tickMax:p}=tN(s,l,a,o,0,u),h=ZM(f,p.add(new GM(.1).mul(d)),d);return t>n?h.reverse():h},rN=function(e,t){var[n,r]=e,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",[a,s]=JM([n,r]);if(a===-1/0||s===1/0)return[n,r];if(a===s)return[a];var l="snap125"===i?eN:QM,c=Math.max(t,2),u=l(new GM(s).sub(a).div(c-1),o,0),d=[...ZM(new GM(a),new GM(s),u),s];return!1===o&&(d=d.map(e=>Math.round(e))),n>r?d.reverse():d},oN=e=>e.rootProps.maxBarSize,iN=e=>e.rootProps.barCategoryGap,aN=e=>e.rootProps.stackOffset,sN=e=>e.rootProps.reverseStackOrder,lN=e=>e.options.chartName,cN=e=>e.rootProps.syncId,uN=e=>e.rootProps.syncMethod,dN=e=>e.options.eventEmitter,fN={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},pN=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function hN(e,t,n){return"auto"!==n?n:null!=e?pP(e,t)?"category":"number":void 0}function mN(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 yN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mN(Object(n),!0).forEach(function(t){vN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vN(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 gN={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"},bN={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"},xN=La([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},Tj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=hN(t,"angleAxis",gN.type))&&void 0!==n?n:"category";return yN(yN({},gN),{},{type:r})}),wN=La([(e,t)=>e.polarAxis.radiusAxis[t],Tj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=hN(t,"radiusAxis",bN.type))&&void 0!==n?n:"category";return yN(yN({},bN),{},{type:r})}),EN=e=>e.polarOptions,ON=La([jP,AP,$P],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}),SN=La([EN,ON],(e,t)=>{if(null!=e)return zx(e.innerRadius,t,0)}),kN=La([EN,ON],(e,t)=>{if(null!=e)return zx(e.outerRadius,t,.8*t)}),PN=La([EN],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});La([xN,PN],pN);var jN=La([ON,SN,kN],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});La([wN,jN],pN);var AN=La([Pj,EN,SN,kN,jP,AP],(e,t,n,r,o,i)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:zx(a,o,o/2),cy:zx(s,i,i/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),TN=(e,t)=>t,CN=(e,t,n)=>n;function MN(e){return null==e?void 0:e.id}function NN(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:o,dataKey:i}=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=MN(e);n.forEach((t,n)=>{var r,l=null==i||o?n:String(fP(t,i,null)),c=fP(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 IN(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var DN=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function _N(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var RN=e=>{var t=Pj(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},LN=e=>e.tooltip.settings.axisId;function zN(e){if(null!=e){var t=e.ticks,n=e.bandwidth,r=e.range(),o=[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}(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(e){var t=o[0],n=o[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 o=e.bandwidth();switch(n.position){case"middle":r+=o/2;break;case"end":r+=o}}return r}}}}}function VN(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function BN(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function FN(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=VN,n=(t,n)=>VN(e(t),n),r=(t,n)=>e(t)-n):(t=e===VN||e===BN?e:$N,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function $N(){return 0}function UN(e){return null===e?NaN:+e}const WN=FN(VN).right;FN(UN).center;class KN extends Map{constructor(e,t=YN){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(HN(this,e))}has(e){return super.has(HN(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 HN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function YN(e){return null!==e&&"object"==typeof e?e.valueOf():e}function qN(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const GN=Math.sqrt(50),XN=Math.sqrt(10),ZN=Math.sqrt(2);function JN(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=GN?10:i>=XN?5:i>=ZN?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/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,o)*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?JN(e,t,2*n):[s,l,c]}function QN(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?JN(t,e,n):JN(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)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;else 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;return l}function eI(e,t,n){return JN(e=+e,t=+t,n=+n)[2]}function tI(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?eI(t,e,n):eI(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function nI(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function rI(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function oI(e,t,n=0,r=1/0,o){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(o=void 0===o?qN:function(e=VN){if(e===VN)return qN;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))}}(o);r>n;){if(r-n>600){const i=r-n+1,a=t-n+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(a-i/2<0?-1:1);oI(e,t,Math.max(n,Math.floor(t-a*l/i+c)),Math.min(r,Math.floor(t+(i-a)*l/i+c)),o)}const i=e[t];let a=n,s=r;for(iI(e,n,t),o(e[r],i)>0&&iI(e,n,r);a<s;){for(iI(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}0===o(e[n],i)?iI(e,n,s):(++s,iI(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function iI(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function aI(e,t,n=UN){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,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}function sI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function lI(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 cI=Symbol("implicit");function uI(){var e=new KN,t=[],n=[],r=cI;function o(o){let i=e.get(o);if(void 0===i){if(r!==cI)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new KN;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return uI(t,n).unknown(r)},sI.apply(o,arguments),o}function dI(){var e,t,n=uI().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,f=d?a:i,p=d?i: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=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map(function(t){return f+e*t});return o(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?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,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 dI(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},sI.apply(d(),arguments)}function fI(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return fI(t())},e}function pI(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hI(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function mI(){}var yI=.7,vI=1/yI,gI="\\s*([+-]?\\d+)\\s*",bI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wI=/^#([0-9a-f]{3,8})$/,EI=new RegExp(`^rgb\\(${gI},${gI},${gI}\\)$`),OI=new RegExp(`^rgb\\(${xI},${xI},${xI}\\)$`),SI=new RegExp(`^rgba\\(${gI},${gI},${gI},${bI}\\)$`),kI=new RegExp(`^rgba\\(${xI},${xI},${xI},${bI}\\)$`),PI=new RegExp(`^hsl\\(${bI},${xI},${xI}\\)$`),jI=new RegExp(`^hsla\\(${bI},${xI},${xI},${bI}\\)$`),AI={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 TI(){return this.rgb().formatHex()}function CI(){return this.rgb().formatRgb()}function MI(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=wI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?NI(t):3===n?new _I(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?II(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?II(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=EI.exec(e))?new _I(t[1],t[2],t[3],1):(t=OI.exec(e))?new _I(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=SI.exec(e))?II(t[1],t[2],t[3],t[4]):(t=kI.exec(e))?II(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=PI.exec(e))?FI(t[1],t[2]/100,t[3]/100,1):(t=jI.exec(e))?FI(t[1],t[2]/100,t[3]/100,t[4]):AI.hasOwnProperty(e)?NI(AI[e]):"transparent"===e?new _I(NaN,NaN,NaN,0):null}function NI(e){return new _I(e>>16&255,e>>8&255,255&e,1)}function II(e,t,n,r){return r<=0&&(e=t=n=NaN),new _I(e,t,n,r)}function DI(e,t,n,r){return 1===arguments.length?((o=e)instanceof mI||(o=MI(o)),o?new _I((o=o.rgb()).r,o.g,o.b,o.opacity):new _I):new _I(e,t,n,null==r?1:r);var o}function _I(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function RI(){return`#${BI(this.r)}${BI(this.g)}${BI(this.b)}`}function LI(){const e=zI(this.opacity);return`${1===e?"rgb(":"rgba("}${VI(this.r)}, ${VI(this.g)}, ${VI(this.b)}${1===e?")":`, ${e})`}`}function zI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function VI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function BI(e){return((e=VI(e))<16?"0":"")+e.toString(16)}function FI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new UI(e,t,n,r)}function $I(e){if(e instanceof UI)return new UI(e.h,e.s,e.l,e.opacity);if(e instanceof mI||(e=MI(e)),!e)return new UI;if(e instanceof UI)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new UI(a,s,l,e.opacity)}function UI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function WI(e){return(e=(e||0)%360)<0?e+360:e}function KI(e){return Math.max(0,Math.min(1,e||0))}function HI(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}pI(mI,MI,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:TI,formatHex:TI,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $I(this).formatHsl()},formatRgb:CI,toString:CI}),pI(_I,DI,hI(mI,{brighter(e){return e=null==e?vI:Math.pow(vI,e),new _I(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?yI:Math.pow(yI,e),new _I(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _I(VI(this.r),VI(this.g),VI(this.b),zI(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:RI,formatHex:RI,formatHex8:function(){return`#${BI(this.r)}${BI(this.g)}${BI(this.b)}${BI(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:LI,toString:LI})),pI(UI,function(e,t,n,r){return 1===arguments.length?$I(e):new UI(e,t,n,null==r?1:r)},hI(mI,{brighter(e){return e=null==e?vI:Math.pow(vI,e),new UI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?yI:Math.pow(yI,e),new UI(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,o=2*n-r;return new _I(HI(e>=240?e-240:e+120,o,r),HI(e,o,r),HI(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new UI(WI(this.h),KI(this.s),KI(this.l),zI(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=zI(this.opacity);return`${1===e?"hsl(":"hsla("}${WI(this.h)}, ${100*KI(this.s)}%, ${100*KI(this.l)}%${1===e?")":`, ${e})`}`}}));var YI=e=>()=>e;function qI(e){return 1===(e=+e)?GI: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):YI(isNaN(t)?n:t)}}function GI(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):YI(isNaN(e)?t:e)}var XI=function e(t){var n=qI(t);function r(e,t){var r=n((e=DI(e)).r,(t=DI(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=GI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function ZI(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function JI(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=iD(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function QI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function eD(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tD(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=iD(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var nD=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rD=new RegExp(nD.source,"g");function oD(e,t){var n,r,o,i=nD.lastIndex=rD.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=nD.exec(e))&&(r=rD.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:eD(n,r)})),i=rD.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),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 iD(e,t){var n,r=typeof t;return null==t||"boolean"===r?YI(t):("number"===r?eD:"string"===r?(n=MI(t))?(t=n,XI):oD:t instanceof MI?XI:t instanceof Date?QI:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?ZI:Array.isArray(t)?JI:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?tD:eD)(e,t)}function aD(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function sD(e,t){void 0===t&&(t=e,e=iD);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}function lD(e){return+e}var cD=[0,1];function uD(e){return e}function dD(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function fD(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=dD(o,r),i=n(a,i)):(r=dD(r,o),i=n(i,a)),function(e){return i(r(e))}}function pD(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=dD(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=WN(e,t,1,r)-1;return i[n](o[n](t))}}function hD(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mD(){var e,t,n,r,o,i,a=cD,s=cD,l=iD,c=uD;function u(){var e=Math.min(a.length,s.length);return c!==uD&&(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?pD:fD,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),eD)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,lD),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=aD,u()},d.clamp=function(e){return arguments.length?(c=!!e||uD,u()):c!==uD},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 yD(){return mD()(uD,uD)}function vD(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 gD(e){return(e=vD(Math.abs(e)))?e[1]:NaN}var bD,xD=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wD(e){if(!(t=xD.exec(e)))throw new Error("invalid format: "+e);var t;return new ED({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 ED(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 OD(e,t){var n=vD(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}wD.prototype=ED.prototype,ED.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 SD={"%":(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)=>OD(100*e,t),r:OD,s:function(e,t){var n=vD(e,t);if(!n)return bD=void 0,e.toPrecision(t);var r=n[0],o=n[1],i=o-(bD=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+vD(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function kD(e){return e}var PD,jD,AD,TD=Array.prototype.map,CD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MD(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?kD:(t=TD.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?kD:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(TD.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=wD(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,y=e.comma,v=e.precision,g=e.trim,b=e.type;"n"===b?(y=!0,b="g"):SD[b]||(void 0===v&&(v=12),g=!0,b="g"),(h||"0"===n&&"="===d)&&(h=!0,n="0",d="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?i:/[%p]/.test(b)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),E=SD[b],O=/[defgprs%]/.test(b);function S(e){var t,o,i,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),v),g&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+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===bD?"":CD[8+bD/3])+p+(S&&"("===f?")":""),O)for(t=-1,o=e.length;++t<o;)if(48>(i=e.charCodeAt(t))||i>57){p=(46===i?a+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}y&&!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(y&&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 v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(gD(t)/3))),r=Math.pow(10,-n),o=d(((e=wD(e)).type="f",e),{suffix:CD[8+n/3]});return function(e){return o(r*e)}}}}function ND(e,t,n,r){var o,i=tI(e,t,n);switch((r=wD(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(gD(t)/3)))-gD(Math.abs(e)))}(i,a))||(r.precision=o),AD(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gD(t)-gD(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-gD(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return jD(r)}function ID(e){var t=e.domain;return e.ticks=function(e){var n=t();return QN(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return ND(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=eI(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function DD(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function _D(e){return Math.log(e)}function RD(e){return Math.exp(e)}function LD(e){return-Math.log(-e)}function zD(e){return-Math.exp(-e)}function VD(e){return isFinite(e)?+("1e"+e):e<0?0:e}function BD(e){return(t,n)=>-e(-t,n)}function FD(e){const t=e(_D,RD),n=t.domain;let r,o,i=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)}(i),o=function(e){return 10===e?VD:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=BD(r),o=BD(o),e(LD,zD)):e(_D,RD),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},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(!(i%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<i;++c)if(u=d<0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=i-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=QN(a,s,p))}else h=QN(d,f,Math.min(f-d,p)).map(o);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=wD(n)).precision||(n.trim=!0),n=jD(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(DD(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function $D(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function UD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function WD(e){var t=1,n=e($D(t),UD(t));return n.constant=function(n){return arguments.length?e($D(t=+n),UD(t)):t},ID(n)}function KD(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function HD(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function YD(e){return e<0?-e*e:e*e}function qD(e){var t=e(uD,uD),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(uD,uD):.5===n?e(HD,YD):e(KD(n),KD(1/n)):n},ID(t)}function GD(){var e=qD(mD());return e.copy=function(){return hD(e,GD()).exponent(e.exponent())},sI.apply(e,arguments),e}function XD(e){return Math.sign(e)*e*e}PD=MD({thousands:",",grouping:[3],currency:["$",""]}),jD=PD.format,AD=PD.formatPrefix;const ZD=new Date,JD=new Date;function QD(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>QD(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&&(o.count=(t,r)=>(ZD.setTime(+t),JD.setTime(+r),e(ZD),e(JD),Math.floor(n(ZD,JD))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const e_=QD(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);e_.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?QD(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):e_:null),e_.range;const t_=1e3,n_=6e4,r_=36e5,o_=864e5,i_=6048e5,a_=2592e6,s_=31536e6,l_=QD(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*t_)},(e,t)=>(t-e)/t_,e=>e.getUTCSeconds());l_.range;const c_=QD(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*t_)},(e,t)=>{e.setTime(+e+t*n_)},(e,t)=>(t-e)/n_,e=>e.getMinutes());c_.range;const u_=QD(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*n_)},(e,t)=>(t-e)/n_,e=>e.getUTCMinutes());u_.range;const d_=QD(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*t_-e.getMinutes()*n_)},(e,t)=>{e.setTime(+e+t*r_)},(e,t)=>(t-e)/r_,e=>e.getHours());d_.range;const f_=QD(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*r_)},(e,t)=>(t-e)/r_,e=>e.getUTCHours());f_.range;const p_=QD(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*n_)/o_,e=>e.getDate()-1);p_.range;const h_=QD(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/o_,e=>e.getUTCDate()-1);h_.range;const m_=QD(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/o_,e=>Math.floor(e/o_));function y_(e){return QD(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())*n_)/i_)}m_.range;const v_=y_(0),g_=y_(1),b_=y_(2),x_=y_(3),w_=y_(4),E_=y_(5),O_=y_(6);function S_(e){return QD(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)/i_)}v_.range,g_.range,b_.range,x_.range,w_.range,E_.range,O_.range;const k_=S_(0),P_=S_(1),j_=S_(2),A_=S_(3),T_=S_(4),C_=S_(5),M_=S_(6);k_.range,P_.range,j_.range,A_.range,T_.range,C_.range,M_.range;const N_=QD(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());N_.range;const I_=QD(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());I_.range;const D_=QD(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());D_.every=e=>isFinite(e=Math.floor(e))&&e>0?QD(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,D_.range;const __=QD(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 R_(e,t,n,r,o,i){const a=[[l_,1,t_],[l_,5,5e3],[l_,15,15e3],[l_,30,3e4],[i,1,n_],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,r_],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,o_],[r,2,1728e5],[n,1,i_],[t,1,a_],[t,3,7776e6],[e,1,s_]];function s(t,n,r){const o=Math.abs(n-t)/r,i=FN(([,,e])=>e).right(a,o);if(i===a.length)return e.every(tI(t/s_,n/s_,r));if(0===i)return e_.every(Math.max(tI(t,n,r),1));const[s,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}__.every=e=>isFinite(e=Math.floor(e))&&e>0?QD(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,__.range;const[L_,z_]=R_(__,I_,k_,m_,f_,u_),[V_,B_]=R_(D_,N_,v_,p_,d_,c_);function F_(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 $_(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 U_(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var W_,K_,H_,Y_={"-":"",_:" ",0:"0"},q_=/^\s*\d+/,G_=/^%/,X_=/[\\^$*+?|[\]().{}]/g;function Z_(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function J_(e){return e.replace(X_,"\\$&")}function Q_(e){return new RegExp("^(?:"+e.map(J_).join("|")+")","i")}function eR(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function tR(e,t,n){var r=q_.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function nR(e,t,n){var r=q_.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function rR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function oR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function iR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function aR(e,t,n){var r=q_.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function sR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function lR(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 cR(e,t,n){var r=q_.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function uR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function dR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function fR(e,t,n){var r=q_.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function pR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function hR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function mR(e,t,n){var r=q_.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yR(e,t,n){var r=q_.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function vR(e,t,n){var r=q_.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function gR(e,t,n){var r=G_.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bR(e,t,n){var r=q_.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function xR(e,t,n){var r=q_.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wR(e,t){return Z_(e.getDate(),t,2)}function ER(e,t){return Z_(e.getHours(),t,2)}function OR(e,t){return Z_(e.getHours()%12||12,t,2)}function SR(e,t){return Z_(1+p_.count(D_(e),e),t,3)}function kR(e,t){return Z_(e.getMilliseconds(),t,3)}function PR(e,t){return kR(e,t)+"000"}function jR(e,t){return Z_(e.getMonth()+1,t,2)}function AR(e,t){return Z_(e.getMinutes(),t,2)}function TR(e,t){return Z_(e.getSeconds(),t,2)}function CR(e){var t=e.getDay();return 0===t?7:t}function MR(e,t){return Z_(v_.count(D_(e)-1,e),t,2)}function NR(e){var t=e.getDay();return t>=4||0===t?w_(e):w_.ceil(e)}function IR(e,t){return e=NR(e),Z_(w_.count(D_(e),e)+(4===D_(e).getDay()),t,2)}function DR(e){return e.getDay()}function _R(e,t){return Z_(g_.count(D_(e)-1,e),t,2)}function RR(e,t){return Z_(e.getFullYear()%100,t,2)}function LR(e,t){return Z_((e=NR(e)).getFullYear()%100,t,2)}function zR(e,t){return Z_(e.getFullYear()%1e4,t,4)}function VR(e,t){var n=e.getDay();return Z_((e=n>=4||0===n?w_(e):w_.ceil(e)).getFullYear()%1e4,t,4)}function BR(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Z_(t/60|0,"0",2)+Z_(t%60,"0",2)}function FR(e,t){return Z_(e.getUTCDate(),t,2)}function $R(e,t){return Z_(e.getUTCHours(),t,2)}function UR(e,t){return Z_(e.getUTCHours()%12||12,t,2)}function WR(e,t){return Z_(1+h_.count(__(e),e),t,3)}function KR(e,t){return Z_(e.getUTCMilliseconds(),t,3)}function HR(e,t){return KR(e,t)+"000"}function YR(e,t){return Z_(e.getUTCMonth()+1,t,2)}function qR(e,t){return Z_(e.getUTCMinutes(),t,2)}function GR(e,t){return Z_(e.getUTCSeconds(),t,2)}function XR(e){var t=e.getUTCDay();return 0===t?7:t}function ZR(e,t){return Z_(k_.count(__(e)-1,e),t,2)}function JR(e){var t=e.getUTCDay();return t>=4||0===t?T_(e):T_.ceil(e)}function QR(e,t){return e=JR(e),Z_(T_.count(__(e),e)+(4===__(e).getUTCDay()),t,2)}function eL(e){return e.getUTCDay()}function tL(e,t){return Z_(P_.count(__(e)-1,e),t,2)}function nL(e,t){return Z_(e.getUTCFullYear()%100,t,2)}function rL(e,t){return Z_((e=JR(e)).getUTCFullYear()%100,t,2)}function oL(e,t){return Z_(e.getUTCFullYear()%1e4,t,4)}function iL(e,t){var n=e.getUTCDay();return Z_((e=n>=4||0===n?T_(e):T_.ceil(e)).getUTCFullYear()%1e4,t,4)}function aL(){return"+0000"}function sL(){return"%"}function lL(e){return+e}function cL(e){return Math.floor(+e/1e3)}function uL(e){return new Date(e)}function dL(e){return e instanceof Date?+e:+new Date(+e)}function fL(e,t,n,r,o,i,a,s,l,c){var u=yD(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),y=c("%I %p"),v=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:i(e)<e?y:r(e)<e?o(e)<e?v: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,dL)):f().map(uL)},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(DD(n,e)):u},u.copy=function(){return hD(u,fL(e,t,n,r,o,i,a,s,l,c))},u}function pL(){var e,t,n,r,o,i=0,a=1,s=uD,l=!1;function c(t){return null==t||isNaN(t=+t)?o: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(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),c):[i,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(iD),c.rangeRound=u(aD),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),c}}function hL(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function mL(){var e=qD(pL());return e.copy=function(){return hL(e,mL()).exponent(e.exponent())},lI.apply(e,arguments)}function yL(){var e,t,n,r,o,i,a,s=0,l=.5,c=1,u=1,d=uD,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=sD(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=i(s=+s),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),o=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(iD),p.rangeRound=h(aD),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function vL(){var e=qD(yL());return e.copy=function(){return hL(e,vL()).exponent(e.exponent())},lI.apply(e,arguments)}!function(e){W_=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Q_(o),u=eR(o),d=Q_(i),f=eR(i),p=Q_(a),h=eR(a),m=Q_(s),y=eR(s),v=Q_(l),g=eR(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:wR,e:wR,f:PR,g:LR,G:VR,H:ER,I:OR,j:SR,L:kR,m:jR,M:AR,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:lL,s:cL,S:TR,u:CR,U:MR,V:IR,w:DR,W:_R,x:null,X:null,y:RR,Y:zR,Z:BR,"%":sL},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:FR,e:FR,f:HR,g:rL,G:iL,H:$R,I:UR,j:WR,L:KR,m:YR,M:qR,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:lL,s:cL,S:GR,u:XR,U:ZR,V:QR,w:eL,W:tL,x:null,X:null,y:nL,Y:oL,Z:aL,"%":sL},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=v.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=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:dR,e:dR,f:vR,g:sR,G:aR,H:pR,I:pR,j:fR,L:yR,m:uR,M:hR,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:cR,Q:bR,s:xR,S:mR,u:nR,U:rR,V:oR,w:tR,W:iR,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:sR,Y:aR,Z:lR,"%":gR};function E(e,t){return function(n){var r,o,i,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!=(o=Y_[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function O(e,t){return function(n){var r,o,i=U_(1900,void 0,1);if(S(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=$_(U_(i.y,0,1))).getUTCDay(),r=o>4||0===o?P_.ceil(r):P_(r),r=h_.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=F_(U_(i.y,0,1))).getDay(),r=o>4||0===o?g_.ceil(r):g_(r),r=p_.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?$_(U_(i.y,0,1)).getUTCDay():F_(U_(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,$_(i)):F_(i)}}function S(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in Y_?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=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),K_=W_.format,W_.parse,H_=W_.utcFormat,W_.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 gL=Object.freeze({__proto__:null,scaleBand:dI,scaleDiverging:function e(){var t=ID(yL()(uD));return t.copy=function(){return hL(t,e())},lI.apply(t,arguments)},scaleDivergingLog:function e(){var t=FD(yL()).domain([.1,1,10]);return t.copy=function(){return hL(t,e()).base(t.base())},lI.apply(t,arguments)},scaleDivergingPow:vL,scaleDivergingSqrt:function(){return vL.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=WD(yL());return t.copy=function(){return hL(t,e()).constant(t.constant())},lI.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,lD),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,lD):[0,1],ID(r)},scaleImplicit:cI,scaleLinear:function e(){var t=yD();return t.copy=function(){return hD(t,e())},sI.apply(t,arguments),ID(t)},scaleLog:function e(){const t=FD(mD()).domain([1,10]);return t.copy=()=>hD(t,e()).base(t.base()),sI.apply(t,arguments),t},scaleOrdinal:uI,scalePoint:function(){return fI(dI.apply(null,arguments).paddingInner(1))},scalePow:GD,scaleQuantile:function e(){var t,n=[],r=[],o=[];function i(){var e=0,t=Math.max(1,r.length);for(o=new Array(t-1);++e<t;)o[e-1]=aI(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[WN(o,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[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(VN),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return o.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},sI.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,o=1,i=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[WN(i,e,0,o)]:t}function l(){var e=-1;for(i=new Array(o);++e<o;)i[e]=((e+1)*r-(e-o)*n)/(o+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?(o=(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,i[0]]:t>=o?[i[o-1],r]:[i[t-1],i[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return i.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},sI.apply(ID(s),arguments)},scaleRadial:function e(){var t,n=yD(),r=[0,1],o=!1;function i(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:o?Math.round(r):r}return i.invert=function(e){return n.invert(XD(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,lD)).map(XD)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(o=!!e,i):o},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},sI.apply(i,arguments),ID(i)},scaleSequential:function e(){var t=ID(pL()(uD));return t.copy=function(){return hL(t,e())},lI.apply(t,arguments)},scaleSequentialLog:function e(){var t=FD(pL()).domain([1,10]);return t.copy=function(){return hL(t,e()).base(t.base())},lI.apply(t,arguments)},scaleSequentialPow:mL,scaleSequentialQuantile:function e(){var t=[],n=uD;function r(e){if(null!=e&&!isNaN(e=+e))return n((WN(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(VN),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 rI(e);if(t>=1)return nI(e);var n,r=(n-1)*t,o=Math.floor(r),i=nI(oI(e,o).subarray(0,o+1));return i+(rI(e.subarray(o+1))-i)*(r-o)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},lI.apply(r,arguments)},scaleSequentialSqrt:function(){return mL.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=WD(pL());return t.copy=function(){return hL(t,e()).constant(t.constant())},lI.apply(t,arguments)},scaleSqrt:function(){return GD.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=WD(mD());return t.copy=function(){return hD(t,e()).constant(t.constant())},sI.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[WN(n,e,0,o)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),o=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},sI.apply(i,arguments)},scaleTime:function(){return sI.apply(fL(V_,B_,D_,N_,v_,p_,d_,c_,l_,K_).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return sI.apply(fL(L_,z_,__,I_,k_,h_,f_,u_,l_,H_).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:ND});function bL(e,t,n){if("function"==typeof e)return e.copy().domain(t).range(n);if(null!=e){var r=function(e){var t=gL;if(e in t&&"function"==typeof t[e])return t[e]();var n="scale".concat(Ux(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 xL(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?bL(e.scale,n,r):bL(t,n,r)}function wL(e){return function(e){return"scale".concat(Ux(e))}(e)in gL}var EL=(e,t,n)=>{if(null!=e){var{scale:r,type:o}=e;return"auto"===r?"category"===o&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===o?"band":"linear":"string"==typeof r?wL(r)?r:"point":void 0}};function OL(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}),o=e.range();if(!(0===n.length||o.length<2))return e=>{var t,o,i=function(e,t){for(var n=0,r=e.length,o=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(o?e[i]<t:e[i]>t)?n=i+1:r=i}return n}(r,e);if(i<=0)return n[0];if(i>=n.length)return n[n.length-1];var a=null!==(t=r[i-1])&&void 0!==t?t:0,s=null!==(o=r[i])&&void 0!==o?o:0;return Math.abs(e-a)<=Math.abs(e-s)?n[i-1]:n[i]}}}function SL(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 kL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SL(Object(n),!0).forEach(function(t){PL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PL(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 jL=[0,"auto"],AL={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"},TL=(e,t)=>e.cartesianAxis.xAxis[t],CL=(e,t)=>{var n=TL(e,t);return null==n?AL:n},ML={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:jL,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},NL=(e,t)=>e.cartesianAxis.yAxis[t],IL=(e,t)=>{var n=NL(e,t);return null==n?ML:n},DL={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:""},_L=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?DL:n},RL=(e,t,n)=>{switch(t){case"xAxis":return CL(e,n);case"yAxis":return IL(e,n);case"zAxis":return _L(e,n);case"angleAxis":return xN(e,n);case"radiusAxis":return wN(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},LL=(e,t,n)=>{switch(t){case"xAxis":return CL(e,n);case"yAxis":return IL(e,n);case"angleAxis":return xN(e,n);case"radiusAxis":return wN(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},zL=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function VL(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 BL=e=>e.graphicalItems.cartesianItems,FL=La([TN,CN],VL),$L=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),UL=La([BL,RL,FL],$L,{memoizeOptions:{resultEqualityCheck:_N}}),WL=La([UL],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(IN)),KL=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),HL=La([UL],KL),YL=e=>e.map(e=>e.data).filter(Boolean).flat(1),qL=La([UL],e=>e.some(e=>!e.data)),GL=La([UL],YL,{memoizeOptions:{resultEqualityCheck:_N}}),XL=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:o}=t;return e.length>0?e:n.slice(r,o+1)},ZL=La([GL,pM],XL),JL=(e,t,n,r,o,i)=>{var{chartData:a=[],dataStartIndex:s,dataEndIndex:l}=r,c=((e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:fP(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:fP(e,t)}))):e.map(e=>({value:e})))(e,t,n);return o&&null!=(null==t?void 0:t.dataKey)&&i.length>0?[...a.slice(s,l+1).map(e=>({value:fP(e,t.dataKey)})).filter(e=>null!=e.value),...c]:c},QL=La([ZL,RL,UL,pM,qL,GL],JL);function ez(e){if(_x(e)||e instanceof Date){var t=Number(e);if(sP(t))return t}}function tz(e){if(Array.isArray(e)){var t=[ez(e[0]),ez(e[1])];return vM(t)?t:void 0}var n=ez(e);if(null!=n)return[n,n]}function nz(e){return e.map(ez).filter(Wx)}function rz(e,t){var n=ez(e),r=ez(t);return null==n&&null==r?0:null==n?-1:null==r?1:n-r}var oz=La([QL],e=>null==e?void 0:e.map(e=>e.value).sort(rz));function iz(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var az=e=>{var t=RN(e),n=LN(e);return LL(e,t,n)},sz=La([az],e=>null==e?void 0:e.dataKey),lz=La([WL,pM,az],NN),cz=(e,t,n,r)=>{var o=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(o).map(t=>{var[o,i]=t,a=r?[...i].reverse():i,s=a.map(MN);return[o,{stackedData:vP(e,s,n),graphicalItems:a}]}))},uz=La([lz,WL,aN,sN],cz),dz=(e,t,n,r)=>{var{dataStartIndex:o,dataEndIndex:i}=t;if(null==r&&"zAxis"!==n){var a=wP(e,o,i);if(null==a||0!==a[0]||0!==a[1])return a}},fz=La([RL],e=>e.allowDataOverflow),pz=e=>{var t;if(null==e||!("domain"in e))return jL;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=nz(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:jL},hz=La([RL],pz),mz=La([hz,fz],bM),yz=La([uz,dM,TN,mz],dz,{memoizeOptions:{resultEqualityCheck:DN}}),vz=e=>e.errorBars,gz=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 o=r.flat();return[Math.min(...o),Math.max(...o)]}},bz=function(e,t,n,r,o){var i,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=>iz(o,e));l.forEach(n=>{var r,o=fP(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||Nx(t)){if(Array.isArray(t)){var o=nz(t);o.length>0&&(r=Math.max(...o))}}else r=t;return null==r?[]:nz(n.flatMap(t=>{var n,o,i=fP(e,t.dataKey);if(Array.isArray(i)?[n,o]=i:n=o=i,sP(n)&&sP(o))return[r-n,r+o]}))}(n,o,c);if(s.length>=2){var l=Math.min(...s),u=Math.max(...s);(null==i||l<i)&&(i=l),(null==a||u>a)&&(a=u)}var d=tz(o);null!=d&&(i=null==i?d[0]:Math.min(i,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=tz(fP(e,t.dataKey));null!=n&&(i=null==i?n[0]:Math.min(i,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),sP(i)&&sP(a))return[i,a]},xz=La([ZL,RL,HL,vz,TN,mM],bz,{memoizeOptions:{resultEqualityCheck:DN}});function wz(e){var{value:t}=e;if(_x(t)||t instanceof Date)return t}var Ez=e=>e.referenceElements.dots,Oz=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),Sz=La([Ez,TN,CN],Oz),kz=e=>e.referenceElements.areas,Pz=La([kz,TN,CN],Oz),jz=e=>e.referenceElements.lines,Az=La([jz,TN,CN],Oz),Tz=(e,t)=>{if(null!=e){var n=nz(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},Cz=La(Sz,TN,Tz),Mz=(e,t)=>{if(null!=e){var n=nz(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)]}},Nz=La([Pz,TN],Mz);var Iz=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return nz([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:nz(n)}(e):function(e){var t;if(null!=e.y)return nz([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:nz(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},Dz=La([Az,TN],Iz),_z=La(Cz,Dz,Nz,(e,t,n)=>gz(e,n,t)),Rz=(e,t,n,r,o,i,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(vM(r))return gM(r,t,n)}catch(e){}if(Array.isArray(e)&&2===e.length){var o,i,[a,s]=e;if("auto"===a)null!=t&&(o=Math.min(...t));else if(Dx(a))o=a;else if("function"==typeof a)try{null!=t&&(o=a(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof a&&EP.test(a)){var l=EP.exec(a);if(null==l||null==l[1]||null==t)o=void 0;else{var c=+l[1];o=t[0]-c}}else o=null==t?void 0:t[0];if("auto"===s)null!=t&&(i=Math.max(...t));else if(Dx(s))i=s;else if("function"==typeof s)try{null!=t&&(i=s(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof s&&OP.test(s)){var u=OP.exec(s);if(null==u||null==u[1]||null==t)i=void 0;else{var d=+u[1];i=t[1]+d}}else i=null==t?void 0:t[1];var f=[o,i];if(vM(f))return null==t?f:gM(f,t,n)}}}(t,"vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?gz(r,i,o):gz(i,o),e.allowDataOverflow),Lz=La([RL,hz,mz,yz,xz,_z,Pj,TN],Rz,{memoizeOptions:{resultEqualityCheck:DN}}),zz=[0,1],Vz=(e,t,n,r,o,i,a)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==a){var s,{dataKey:l,type:c}=e,u=pP(t,i);return u&&null==l?uM(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===c?((e,t,n)=>{var r=e.map(wz).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&Vx(r))?uM(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,u):"expand"!==o||u?a:zz}},Bz=La([RL,Pj,ZL,QL,aN,TN,Lz],Vz),Fz=La([RL,zL,lN],EL),$z=(e,t,n)=>{var{niceTicks:r}=t;if("none"!==r){var o=pz(t),i=Array.isArray(o)&&("auto"===o[0]||"auto"===o[1]);if(("snap125"===r||"adaptive"===r)&&null!=t&&t.tickCount&&vM(e)){if(i)return nN(e,t.tickCount,t.allowDecimals,r);if("number"===t.type)return rN(e,t.tickCount,t.allowDecimals,r)}if("auto"===r&&"linear"===n&&null!=t&&t.tickCount){if(i&&vM(e))return nN(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&vM(e))return rN(e,t.tickCount,t.allowDecimals,"adaptive")}}},Uz=La([Bz,LL,Fz],$z),Wz=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&vM(t)&&Array.isArray(n)&&n.length>0){var o,i,a=t[0],s=null!==(o=n[0])&&void 0!==o?o:0,l=t[1],c=null!==(i=n[n.length-1])&&void 0!==i?i:0;return[Math.min(a,s),Math.max(l,c)]}return t},Kz=La([RL,Bz,Uz,TN],Wz),Hz=La(QL,RL,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(nz(e.map(e=>e.value))).sort((e,t)=>e-t),o=r[0],i=r[r.length-1];if(null==o||null==i)return 1/0;var a=i-o;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}}),Yz=La(Hz,Pj,iN,$P,(e,t,n,r,o)=>o,(e,t,n,r,o)=>{if(!sP(e))return 0;var i="vertical"===t?r.height:r.width;if("gap"===o)return e*i/2;if("no-gap"===o){var a=zx(n,e*i),s=e*i/2;return s-a-(s-a)/i*a}return 0}),qz=La(CL,(e,t,n)=>{var r=CL(e,t);return null==r||"string"!=typeof r.padding?0:Yz(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:o}=e;return"string"==typeof o?{left:t,right:t}:{left:(null!==(n=o.left)&&void 0!==n?n:0)+t,right:(null!==(r=o.right)&&void 0!==r?r:0)+t}}),Gz=La(IL,(e,t,n)=>{var r=IL(e,t);return null==r||"string"!=typeof r.padding?0:Yz(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:o}=e;return"string"==typeof o?{top:t,bottom:t}:{top:(null!==(n=o.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=o.bottom)&&void 0!==r?r:0)+t}}),Xz=La([$P,qz,qP,YP,(e,t,n)=>n],(e,t,n,r,o)=>{var{padding:i}=r;return o?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),Zz=La([$P,Pj,Gz,qP,YP,(e,t,n)=>n],(e,t,n,r,o,i)=>{var{padding:a}=o;return i?[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]}),Jz=(e,t,n,r)=>{var o;switch(t){case"xAxis":return Xz(e,n,r);case"yAxis":return Zz(e,n,r);case"zAxis":return null===(o=_L(e,n))||void 0===o?void 0:o.range;case"angleAxis":return PN(e);case"radiusAxis":return jN(e,n);default:return}},Qz=La([RL,Jz],pN),eV=La([Fz,Kz],(e,t)=>{if(null!=t){if("linear"===e){if(!vM(t)){for(var n,r,o=0;o<t.length;o++){var i=t[o];sP(i)&&((void 0===n||i<n)&&(n=i),(void 0===r||i>r)&&(r=i))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}}),tV=La([RL,Fz,eV,Qz],xL),nV=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:o,scale:i}=n;return!pP(e,r)||"number"!==o&&"auto"===i?void 0:t.map(e=>e.value)}},rV=La([Pj,QL,LL,TN],nV),oV=La([tV],zN);function iV(e,t){return e.id<t.id?-1:e.id>t.id?1:0}La([tV],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):OL(e,void 0)}),La([tV,oz],OL),La([UL,vz,TN],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>iz(n,e)));var aV=(e,t)=>t,sV=(e,t,n)=>n,lV=La(MP,aV,sV,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(iV)),cV=La(NP,aV,sV,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(iV)),uV=(e,t)=>({width:e.width,height:t.height}),dV=La($P,CL,uV),fV=La(AP,$P,lV,aV,sV,(e,t,n,r,o)=>{var i,a={};return n.forEach(n=>{var s=uV(t,n);null==i&&(i=((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&&!o||"bottom"===r&&o;a[n.id]=i-Number(l)*s.height,i+=(l?-1:1)*s.height}),a}),pV=La(jP,$P,cV,aV,sV,(e,t,n,r,o)=>{var i,a={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==i&&(i=((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&&!o||"right"===r&&o;a[n.id]=i-Number(l)*s.width,i+=(l?-1:1)*s.width}),a}),hV=La([$P,CL,(e,t)=>{var n=CL(e,t);if(null!=n)return fV(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:e.left,y:0}:{x:e.left,y:o}}}),mV=La([$P,IL,(e,t)=>{var n=IL(e,t);if(null!=n)return pV(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:0,y:e.top}:{x:o,y:e.top}}}),yV=La($P,IL,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),vV=(e,t,n)=>{switch(t){case"xAxis":return dV(e,n).width;case"yAxis":return yV(e,n).height;default:return}},gV=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:o,type:i,dataKey:a}=n,s=pP(e,r),l=t.map(e=>e.value),c=l.filter(e=>null!=e);return a&&s&&"category"===i&&o&&Vx(c)?l:void 0}},bV=La([Pj,QL,RL,TN],gV),xV=La([Pj,(e,t,n)=>{switch(t){case"xAxis":return CL(e,n);case"yAxis":return IL(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Fz,oV,bV,rV,Jz,Uz,TN],(e,t,n,r,o,i,a,s,l)=>{if(null!=t){var c=pP(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:i,duplicateDomain:o,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}}),wV=La([Pj,LL,Fz,oV,Uz,Jz,bV,rV,TN],(e,t,n,r,o,i,a,s,l)=>{if(null!=t&&null!=r){var c=pP(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!=i&&i.length>=2?2*Mx(i[0]-i[1])*h:h;var m=d||o;return m?m.map((e,t)=>{var n=a?a.indexOf(e):e,o=r.map(n);return sP(o)?{index:t,coordinate:o+h,value:e,offset:h}:null}).filter(Wx):c&&s?s.map((e,t)=>{var n=r.map(e);return sP(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Wx):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return sP(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Wx):r.domain().map((e,t)=>{var n=r.map(e);return sP(n)?{coordinate:n+h,value:a?a[e]:e,index:t,offset:h}:null}).filter(Wx)}}),EV=La([Pj,LL,oV,Jz,bV,rV,TN],(e,t,n,r,o,i,a)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=pP(e,a),{tickCount:l}=t,c=0;return c="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*Mx(r[0]-r[1])*c:c,s&&i?i.map((e,t)=>{var r=n.map(e);return sP(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(Wx):n.ticks?n.ticks(l).map((e,t)=>{var r=n.map(e);return sP(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(Wx):n.domain().map((e,t)=>{var r=n.map(e);return sP(r)?{coordinate:r+c,value:o?o[e]:e,index:t,offset:c}:null}).filter(Wx)}}),OV=La(RL,oV,(e,t)=>{if(null!=e&&null!=t)return kL(kL({},e),{},{scale:t})}),SV=La([RL,Fz,Bz,Qz],xL),kV=La([SV],zN),PV=La((e,t,n)=>_L(e,n),kV,(e,t)=>{if(null!=e&&null!=t)return kL(kL({},e),{},{scale:t})}),jV=La([Pj,MP,NP],(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}});La([(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,o=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<r&&(r=a,o=i)}return null===(n=o)||void 0===n?void 0:n.value}});var AV=e=>e.options.defaultTooltipEventType,TV=e=>e.options.validateTooltipEventTypes;function CV(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function MV(e,t){return CV(t,AV(e),TV(e))}var NV=(e,t)=>{var n,r=Number(t);if(!Nx(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},IV={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},DV=xk({name:"tooltip",initialState:{itemInteraction:{click:IV,hover:IV},axisInteraction:{click:IV,hover:IV},keyboardInteraction:IV,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:uk()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,o=BS(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=r)},prepare:uk()},removeTooltipEntrySettings:{reducer(e,t){var n=BS(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:uk()},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:_V,replaceTooltipEntrySettings:RV,removeTooltipEntrySettings:LV,setTooltipSettingsState:zV,setActiveMouseOverItemIndex:VV,mouseLeaveItem:BV,mouseLeaveChart:FV,setActiveClickItemIndex:$V,setMouseOverAxisIndex:UV,setMouseClickAxisIndex:WV,setSyncInteraction:KV,setKeyboardInteraction:HV}=DV.actions,YV=DV.reducer;function qV(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 GV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qV(Object(n),!0).forEach(function(t){XV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XV(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 ZV=(e,t,n,r)=>{if(null==t)return IV;var o=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==o)return IV;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var i=!0===e.settings.active;if(null!=o.index){if(i)return GV(GV({},o),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return GV(GV({},IV),{},{coordinate:o.coordinate})};function JV(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],o=t[1];if(void 0===n)return!1;var i=Math.min(r,o),a=Math.max(r,o);return n>=i&&n<=a}var QV=(e,t,n,r)=>{var o=null==e?void 0:e.index;if(null==o)return null;var i=Number(o);if(!sP(i))return o;var a=1/0;t.length>0&&(a=t.length-1);var s=Math.max(0,Math.min(i,a)),l=t[s];return null==l||function(e,t,n){if(null==n||null==t)return!0;var r=fP(e,t);return null==r||!vM(n)||JV(r,n)}(l,n,r)?String(s):null},eB=(e,t,n,r,o,i,a)=>{if(null!=i){var s=a[0],l=null==s?void 0:s.getPosition(i);if(null!=l)return l;var c=null==o?void 0:o[Number(i)];if(c)return"horizontal"===n?{x:c.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:c.coordinate}}},tB=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var o;if(o="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==o)return e.tooltipItemPayloads;if(null==o&&(null!=r||e.keyboardInteraction.active)){var i=e.tooltipItemPayloads[0];return null!=i?[i]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===o})},nB=e=>e.options.tooltipPayloadSearcher,rB=e=>e.tooltip;function oB(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 iB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oB(Object(n),!0).forEach(function(t){aB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aB(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 sB(e){if("string"==typeof e)return e}var lB=(e,t,n,r,o,i,a)=>{if(null!=t&&null!=i){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n;return e.reduce((e,n)=>{var d,f,p,{dataDefinedOnItem:h,settings:m}=n,y=function(e,t){return null!=e?e:t}(h,s),v=Array.isArray(y)?aP(y,c,u):y,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(v)&&!Array.isArray(v[0])&&"axis"===a?Fx(v,r,o):i(v,t,l,b),Array.isArray(f))?f.forEach(t=>{var n,r,o=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?sB(e.color):void 0,fill:"fill"in e?sB(e.fill):void 0}}}(t),i=null==o?void 0:o.name,a=null==o?void 0:o.dataKey,s=null==o?void 0:o.payload,l=iB(iB({},m),{},{name:i,unit:null==o?void 0:o.unit,color:null!==(n=null==o?void 0:o.color)&&void 0!==n?n:null==m?void 0:m.color,fill:null!==(r=null==o?void 0:o.fill)&&void 0!==r?r:null==m?void 0:m.fill});e.push(kP({tooltipEntrySettings:l,dataKey:a,payload:s,value:fP(s,a),name:null==i?void 0:String(i)}))}):e.push(kP({tooltipEntrySettings:m,dataKey:g,payload:f,value:fP(f,g),name:null!==(p=fP(f,b))&&void 0!==p?p:null==m?void 0:m.name}));return e},[])}},cB=La([az,zL,lN],EL),uB=La([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),dB=La([RN,LN],VL),fB=La([uB,az,dB],$L,{memoizeOptions:{resultEqualityCheck:_N}}),pB=La([fB],e=>e.filter(IN)),hB=La([fB],YL,{memoizeOptions:{resultEqualityCheck:_N}}),mB=La([fB],e=>e.some(e=>!e.data)),yB=La([hB,dM],XL),vB=La([pB,dM,az],NN),gB=La([yB,az,fB,dM,mB,hB],JL),bB=La([az],pz),xB=La([az],e=>e.allowDataOverflow),wB=La([bB,xB],bM),EB=La([fB],e=>e.filter(IN)),OB=La([vB,EB,aN,sN],cz),SB=La([OB,dM,RN,wB],dz),kB=La([fB],KL),PB=La([yB,az,kB,vz,RN,yM],bz,{memoizeOptions:{resultEqualityCheck:DN}}),jB=La([Ez,RN,LN],Oz),AB=La([jB,RN],Tz),TB=La([kz,RN,LN],Oz),CB=La([TB,RN],Mz),MB=La([jz,RN,LN],Oz),NB=La([MB,RN],Iz),IB=La([AB,NB,CB],gz),DB=La([az,bB,wB,SB,PB,IB,Pj,RN],Rz),_B=La([az,Pj,yB,gB,aN,RN,DB],Vz),RB=La([_B,az,cB],$z),LB=La([az,_B,RB,RN],Wz),zB=e=>{var t=RN(e),n=LN(e);return Jz(e,t,n,!1)},VB=La([az,zB],pN),BB=La([az,cB,LB,VB],xL),FB=La([BB],zN),$B=La([Pj,gB,az,RN],gV),UB=La([Pj,gB,az,RN],nV),WB=La([Pj,az,cB,FB,zB,$B,UB,RN],(e,t,n,r,o,i,a,s)=>{if(t){var{type:l}=t,c=pP(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!=o&&(null==o?void 0:o.length)>=2?2*Mx(o[0]-o[1])*d:d,c&&a?a.map((e,t)=>{var n=r.map(e);return sP(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(Wx):r.domain().map((e,t)=>{var n=r.map(e);return sP(n)?{coordinate:n+d,value:i?i[e]:e,index:t,offset:d}:null}).filter(Wx)}}}),KB=La([AV,TV,e=>e.tooltip.settings],(e,t,n)=>CV(n.shared,e,t)),HB=e=>e.tooltip.settings.trigger,YB=e=>e.tooltip.settings.defaultIndex,qB=La([rB,KB,HB,YB],ZV),GB=La([qB,yB,sz,_B],QV),XB=La([WB,GB],NV),ZB=La([qB],e=>{if(e)return e.dataKey}),JB=La([qB],e=>{if(e)return e.graphicalItemId}),QB=La([rB,KB,HB,YB],tB),eF=La([jP,AP,Pj,$P,WB,YB,QB],eB),tF=La([qB,eF],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),nF=La([qB],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),rF=La([QB,GB,dM,sz,XB,nB,KB],lB),oF=La([rF],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function iF(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 aF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iF(Object(n),!0).forEach(function(t){sF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sF(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 lF=()=>{var e=HE(az),t=HE(WB),n=HE(FB);return SP(e&&n?aF(aF({},e),{},{scale:n}):void 0,t)};function cF(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 uF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cF(Object(n),!0).forEach(function(t){dF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dF(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 fF=(e,t,n,r,o)=>{var i,a=null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0;if(a<=1||null==e)return 0;if("angleAxis"===r&&null!=o&&Math.abs(Math.abs(o[1]-o[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,y=void 0;if(null!=p&&null!=h&&null!=m)if(Mx(h-p)!==Mx(m-h)){var v=[];if(Mx(m-h)===Mx(o[1]-o[0])){y=m;var g=h+o[1]-o[0];v[0]=Math.min(g,(g+p)/2),v[1]=Math.max(g,(g+p)/2)}else{y=p;var b=m+o[1]-o[0];v[0]=Math.min(h,(b+h)/2),v[1]=Math.max(h,(b+h)/2)}var x,w=[Math.min(h,(y+h)/2),Math.max(h,(y+h)/2)];if(e>w[0]&&e<=w[1]||e>=v[0]&&e<=v[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 j=t[k+1],A=t[k-1];if(0===k&&null!=j&&e<=(P.coordinate+j.coordinate)/2)return P.index;if(k===a-1&&null!=A&&e>(P.coordinate+A.coordinate)/2)return P.index;if(k>0&&k<a-1&&null!=A&&null!=j&&e>(P.coordinate+A.coordinate)/2&&e<=(P.coordinate+j.coordinate)/2)return P.index}}return-1},pF=()=>HE(lN),hF=(e,t)=>t,mF=(e,t,n)=>n,yF=(e,t,n,r)=>r,vF=La(WB,e=>vO(e,e=>e.coordinate)),gF=La([rB,hF,mF,yF],ZV),bF=La([gF,yB,sz,_B],QV),xF=La([rB,hF,mF,yF],tB),wF=La([jP,AP,Pj,$P,WB,yF,xF],eB),EF=La([gF,wF],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),OF=La([WB,bF],NV),SF=La([xF,bF,dM,sz,OF,nB,hF],lB),kF=La([gF,bF],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),PF=(e,t,n,r,o,i,a)=>{if(e&&r&&o&&i&&n){var s=UC(e,n);if(s){var l=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),c=fF(l,a,i,r,o),u=((e,t,n,r)=>{var o=t.find(e=>e&&e.index===n);if(o){if("centric"===e){var i=o.coordinate,{radius:a}=r;return uF(uF(uF({},r),BC(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,{angle:l}=r;return uF(uF(uF({},r),BC(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,i,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},jF=La(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}}),AF=La(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(fN));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 TF(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 CF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TF(Object(n),!0).forEach(function(t){MF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MF(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 NF={zIndexMap:Object.values(fN).reduce((e,t)=>CF(CF({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},IF=new Set(Object.values(fN));var DF=xk({name:"zIndex",initialState:NF,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:uk()},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 IF.has(e)}(n)&&delete e.zIndexMap[n])},prepare:uk()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:o}=t.payload;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:o?void 0:r,panoramaElement:o?r:void 0}},prepare:uk()},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:uk()}}}),{registerZIndexPortal:_F,unregisterZIndexPortal:RF,registerZIndexPortalElement:LF,unregisterZIndexPortalElement:zF}=DF.actions,VF=DF.reducer;function BF(n){var{zIndex:r,children:o}=n,i=void 0!==jj()&&void 0!==r&&0!==r,a=HP(),s=e.useRef(void 0),l=e.useRef(new Set),c=$E(),u=HE(e=>jF(e,r,a));if(e.useLayoutEffect(()=>{if(!i){var e=l.current;return e.forEach(e=>{c(RF({zIndex:e}))}),e.clear(),void(s.current=void 0)}if(l.current.has(r)||(c(_F({zIndex:r})),l.current.add(r)),u){s.current=u;var t=l.current;t.forEach(e=>{e!==r&&(c(RF({zIndex:e})),t.delete(e))})}},[c,r,i,u]),e.useLayoutEffect(()=>{var e=l.current;return()=>{e.forEach(e=>{c(RF({zIndex:e}))}),e.clear()}},[c]),!i)return o;var d=null!=u?u:s.current;return d?t.createPortal(o,d):null}function FF(){return FF=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},FF.apply(null,arguments)}function $F(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 UF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$F(Object(n),!0).forEach(function(t){WF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$F(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WF(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 KF(t){var{cursor:n,cursorComp:r,cursorProps:o}=t;return e.isValidElement(n)?e.cloneElement(n,o):e.createElement(r,o)}function HF(e){var t,n,o,i,{coordinate:a,payload:s,index:l,offset:c,tooltipAxisBandSize:u,layout:d,cursor:f,tooltipEventType:p,chartName:h}=e,m=a,y=s,v=l;if(!f||!m||"ScatterChart"!==h&&"axis"!==p)return null;if("ScatterChart"===h)n=m,o=MT,i=fN.cursorLine;else if("BarChart"===h)n=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,m,c,u),o=jC,i=fN.cursorRectangle;else if("radial"===d&&ew(m)){var{cx:g,cy:b,radius:x,startAngle:w,endAngle:E}=WC(m);n={cx:g,cy:b,startAngle:w,endAngle:E,innerRadius:x,outerRadius:x},o=XC,i=fN.cursorLine}else n={points:ZC(d,m,c)},o=kT,i=fN.cursorLine;var O="object"==typeof f&&"className"in f?f.className:void 0,S=UF(UF(UF(UF({stroke:"#ccc",pointerEvents:"none"},c),n),qg(f)),{},{payload:y,payloadIndex:v,className:H("recharts-tooltip-cursor",O)});return r.createElement(BF,{zIndex:null!==(t=e.zIndex)&&void 0!==t?t:i},r.createElement(KF,{cursor:f,cursorComp:o,cursorProps:S}))}function YF(e){var t=lF(),n=Oj(),o=jj(),i=pF();return null==t||null==n||null==o||null==i?null:r.createElement(HF,FF({},e,{offset:n,layout:o,tooltipAxisBandSize:t,chartName:i}))}var qF,GF=e.createContext(null),XF={exports:{}};var ZF=(qF||(qF=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||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,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},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 o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].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,o,i,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,o),!0;case 5:return u.fn.call(u.context,t,r,o,i),!0;case 6:return u.fn.call(u.context,t,r,o,i,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,o);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 i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}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}(XF)),XF.exports),JF=new(i(ZF)),QF="recharts.syncEvent.tooltip",e$="recharts.syncEvent.brush",t$=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Nx(n))return e[n]}},n$=xk({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),r$=n$.reducer,{createEventEmitter:o$}=n$.actions;function i$(e){return e.tooltip.syncInteraction}var a$=xk({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:s$,setDataStartEndIndexes:l$,setComputedData:c$}=a$.actions,u$=a$.reducer,d$=["x","y"];function f$(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?f$(Object(n),!0).forEach(function(t){h$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h$(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 m$(){var t=HE(cN),n=HE(dN),r=$E(),o=HE(uN),i=HE(WB),a=jj(),s=wj(),l=HE(e=>e.rootProps.className);e.useEffect(()=>{if(null==t)return Kx;var e=(e,l,c)=>{var u;if(n!==c&&t===e)if(!1!==l.payload.active)if("index"!==o){if(null!=i){var d;if("function"==typeof o){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=o(i,f);d=i[p]}else"value"===o&&(d=i.find(e=>String(e.value)===l.payload.label));var{coordinate:h}=l.payload;if(null!=h&&null!=s)if(null!=d){var{x:m,y:y}=h,v=Math.min(m,s.x+s.width),g=Math.min(y,s.y+s.height),b={x:"horizontal"===a?d.coordinate:v,y:"horizontal"===a?g:d.coordinate},x=KV({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});r(x)}else r(KV({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:void 0}));else r(KV({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(s&&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,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(w,d$),{x:k,y:P,width:j,height:A}=l.payload.sourceViewBox,T=p$(p$({},S),{},{x:s.x+(j?(E-k)/j:0)*s.width,y:s.y+(A?(O-P)/A:0)*s.height});r(p$(p$({},l),{},{payload:p$(p$({},l.payload),{},{coordinate:T})}))}else r(l);else r(KV({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))};return JF.on(QF,e),()=>{JF.off(QF,e)}},[l,r,n,t,o,i,a,s])}function y$(){var t=$E();e.useEffect(()=>{t(o$())},[t]),m$(),function(){var t=HE(cN),n=HE(dN),r=$E();e.useEffect(()=>{if(null==t)return Kx;var e=(e,o,i)=>{n!==i&&t===e&&r(l$(o))};return JF.on(e$,e),()=>{JF.off(e$,e)}},[r,n,t])}()}function v$(t,n,r,o,i,a){var s=HE(e=>((e,t,n)=>{if(null!=t){var r=rB(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(e,t,n)),l=HE(JB),c=HE(dN),u=HE(cN),d=HE(uN),f=HE(i$),p=null!=(null==f?void 0:f.sourceViewBox),h=wj();e.useEffect(()=>{if(!p&&null!=u&&null!=c){var e=KV({active:a,coordinate:r,dataKey:s,index:i,label:"number"==typeof o?String(o):o,sourceViewBox:h,graphicalItemId:l});JF.emit(QF,u,e,c)}},[p,r,s,l,i,o,c,u,d,a,h])}function g$(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 b$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g$(Object(n),!0).forEach(function(t){x$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x$(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 w$(e){return e.dataKey}var E$=[],O$={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 S$(n){var o,i,a=iw(n,O$),{active:s,allowEscapeViewBox:l,animationDuration:c,animationEasing:u,content:d,filterNull:f,isAnimationActive:p,offset:h,payloadUniqBy:m,position:y,reverseDirection:v,useTranslate3d:g,wrapperStyle:b,cursor:x,shared:w,trigger:E,defaultIndex:O,portal:S,axisId:k}=a,P=$E(),j="number"==typeof O?String(O):O;e.useEffect(()=>{P(zV({shared:w,trigger:E,axisId:k,active:s,defaultIndex:j}))},[P,w,E,k,s,j]);var A=wj(),T=pT(),C=function(e){return HE(t=>MV(t,e))}(w),{activeIndex:M,isActive:N}=null!==(o=HE(e=>kF(e,C,E,j)))&&void 0!==o?o:{},I=HE(e=>SF(e,C,E,j)),D=HE(e=>OF(e,C,E,j)),_=HE(e=>EF(e,C,E,j)),R=I,L=e.useContext(GF),z=null!==(i=null!=s?s:N)&&void 0!==i&&i,[V,B]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[n,r]=e.useState({height:0,left:0,top:0,width:0}),o=e.useCallback(e=>{if(null!=e){var t=e.getBoundingClientRect(),o={height:t.height,left:t.left,top:t.top,width:t.width};(Math.abs(o.height-n.height)>1||Math.abs(o.left-n.left)>1||Math.abs(o.top-n.top)>1||Math.abs(o.width-n.width)>1)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[n.width,n.height,n.top,n.left,...t]);return[n,o]}([R,z]),F="axis"===C?D:void 0;v$(C,E,_,F,M,z);var $=null!=S?S:L;if(null==$||null==A||null==C)return null;var U=null!=R?R:E$;z||(U=E$),f&&U.length&&(U=function(e,t,n){return!0===t?VE(e,n):"function"==typeof t?VE(e,t):e}(U.filter(e=>null!=e.value&&(!0!==e.hide||a.includeHidden)),m,w$));var W=U.length>0,K=b$(b$({},a),{},{payload:U,label:F,active:z,activeIndex:M,coordinate:_,accessibilityLayer:T}),H=r.createElement(fT,{allowEscapeViewBox:l,animationDuration:c,animationEasing:u,isAnimationActive:p,active:z,coordinate:_,hasPayload:W,offset:h,position:y,reverseDirection:v,useTranslate3d:g,viewBox:A,wrapperStyle:b,lastBoundingBox:V,innerRef:B,hasPortalFromProps:Boolean(S)},function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):"function"==typeof e?r.createElement(e,t):r.createElement(eT,t)}(d,K));return r.createElement(r.Fragment,null,t.createPortal(H,$),z&&r.createElement(YF,{cursor:x,tooltipEventType:C,coordinate:_,payload:U,index:M}))}var k$=e=>null;function P$(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}k$.displayName="Cell";function j$(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 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 T$=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j$(Object(n),!0).forEach(function(t){A$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),C$=new class{constructor(e){P$(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}}(T$.cacheSize),M$={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},N$="recharts_measurement_span";var I$=(e,t)=>{try{var n=document.getElementById(N$);n||((n=document.createElement("span")).setAttribute("id",N$),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,M$,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(e){return{width:0,height:0}}},D$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||iT)return{width:0,height:0};if(!T$.enableCache)return I$(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",o=t.fontWeight||"",i=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(o,"|").concat(i,"|").concat(a,"|").concat(s)}(e,t),r=C$.get(n);if(r)return r;var o=I$(e,t);return C$.set(n,o),o};var _$=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,R$=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,L$=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,z$=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,V$={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},B$=["cm","mm","pt","pc","in","Q","px"];var F$="NaN";class $${static parse(e){var t,[,n,r]=null!==(t=z$.exec(e))&&void 0!==t?t:[];return null==n?$$.NaN:new $$(parseFloat(n),null!=r?r:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,Nx(e)&&(this.unit=""),""===t||L$.test(t)||(this.num=NaN,this.unit=""),function(e){return B$.includes(e)}(t)&&(this.num=function(e,t){return e*V$[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new $$(NaN,""):new $$(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new $$(NaN,""):new $$(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new $$(NaN,""):new $$(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new $$(NaN,""):new $$(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Nx(this.num)}}function U$(e){if(null==e||e.includes(F$))return F$;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,o,i]=null!==(n=_$.exec(t))&&void 0!==n?n:[],a=$$.parse(null!=r?r:""),s=$$.parse(null!=i?i:""),l="*"===o?a.multiply(s):a.divide(s);if(l.isNaN())return F$;t=t.replace(_$,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=null!==(c=R$.exec(t))&&void 0!==c?c:[],p=$$.parse(null!=u?u:""),h=$$.parse(null!=f?f:""),m="+"===d?p.add(h):p.subtract(h);if(m.isNaN())return F$;t=t.replace(R$,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}($$,"NaN",new $$(NaN,""));var W$=/\(([^()]*)\)/;function K$(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=W$.exec(n));){var[,r]=t;n=n.replace(W$,U$(r))}return n}(t),t=U$(t)}function H$(e){var t=function(e){try{return K$(e)}catch(e){return F$}}(e.slice(5,-1));return t===F$?"":t}var Y$=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],q$=["dx","dy","angle","className","breakAll"];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 X$(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Z$=/[ \f\n\r\t\v\u2028\u2029]+/,J$=e=>{var{children:t,breakAll:n,style:r}=e;try{var o=[];return $x(t)||(o=n?t.toString().split(""):t.toString().split(Z$)),{wordsWithComputedWidth:o.map(e=>({word:e,width:D$(e,r).width})),spaceWidth:n?0:D$(" ",r).width}}catch(e){return null}};function Q$(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var eU=(e,t,n,r)=>e.reduce((e,o)=>{var{word:i,width:a}=o,s=e[e.length-1];if(s&&null!=a&&(null==t||r||s.width+a+n<Number(t)))s.words.push(i),s.width+=a+n;else{var l={words:[i],width:a};e.push(l)}return e},[]),tU=e=>e.reduce((e,t)=>e.width>t.width?e:t),nU=(e,t,n,r,o,i,a,s)=>{var l=e.slice(0,t),c=J$({breakAll:n,style:r,children:l+"…"});if(!c)return[!1,[]];var u=eU(c.wordsWithComputedWidth,i,a,s);return[u.length>o||tU(u).width>Number(i),u]},rU=e=>[{words:$x(e)?[]:e.toString().split(Z$),width:void 0}],oU=e=>{var{width:t,scaleToFit:n,children:r,style:o,breakAll:i,maxLines:a}=e;if((t||n)&&!iT){var s=J$({breakAll:i,children:r,style:o});if(!s)return rU(r);var{wordsWithComputedWidth:l,spaceWidth:c}=s;return((e,t,n,r,o)=>{var{maxLines:i,children:a,style:s,breakAll:l}=e,c=Dx(i),u=String(a),d=eU(t,r,n,o);if(!c||o)return d;if(!(d.length>i||tU(d).width>Number(r)))return d;for(var f,p=0,h=u.length-1,m=0;p<=h&&m<=u.length-1;){var y=Math.floor((p+h)/2),v=y-1,[g,b]=nU(u,v,l,s,i,r,n,o),[x]=nU(u,y,l,s,i,r,n,o);if(g||x||(p=y+1),g&&x&&(h=y-1),!g&&x){f=b;break}m++}return f||d})({breakAll:i,children:r,maxLines:a,style:o},l,c,t,Boolean(n))}return rU(r)},iU="#808080",aU={angle:0,breakAll:!1,capHeight:"0.71em",fill:iU,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},sU=e.forwardRef((t,n)=>{var o=iw(t,aU),{x:i,y:a,lineHeight:s,capHeight:l,fill:c,scaleToFit:u,textAnchor:d,verticalAnchor:f}=o,p=X$(o,Y$),h=e.useMemo(()=>oU({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:u,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,u,p.style,p.width]),{dx:m,dy:y,angle:v,className:g,breakAll:b}=p,x=X$(p,q$);if(!_x(i)||!_x(a)||0===h.length)return null;var w,E=Number(i)+(Dx(m)?m:0),O=Number(a)+(Dx(y)?y:0);if(!sP(E)||!sP(O))return null;switch(f){case"start":w=H$("calc(".concat(l,")"));break;case"middle":w=H$("calc(".concat((h.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:w=H$("calc(".concat(h.length-1," * -").concat(s,")"))}var S=[],k=h[0];if(u&&null!=k){var P=k.width,{width:j}=p;S.push("scale(".concat(Dx(j)&&Dx(P)?j/P:1,")"))}return v&&S.push("rotate(".concat(v,", ").concat(E,", ").concat(O,")")),S.length&&(x.transform=S.join(" ")),r.createElement("text",G$({},Gg(x),{ref:n,x:E,y:O,className:H("recharts-text",g),textAnchor:d,fill:c.includes("url")?iU:c}),h.map((e,t)=>{var n=e.words.join(b?"":" ");return r.createElement("tspan",{x:E,dy:0===t?w:s,key:"".concat(n,"-").concat(t)},n)}))});function lU(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 cU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lU(Object(n),!0).forEach(function(t){uU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uU(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}sU.displayName="Text";var dU=["labelRef"],fU=["content"];function pU(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function hU(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 mU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hU(Object(n),!0).forEach(function(t){yU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yU(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 vU(){return vU=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},vU.apply(null,arguments)}var gU=e.createContext(null),bU=t=>{var{x:n,y:o,upperWidth:i,lowerWidth:a,width:s,height:l,children:c}=t,u=e.useMemo(()=>({x:n,y:o,upperWidth:i,lowerWidth:a,width:s,height:l}),[n,o,i,a,s,l]);return r.createElement(gU.Provider,{value:u},c)},xU=()=>{var t=e.useContext(gU),n=wj();return t||(n?xj(n):void 0)},wU=e.createContext(null),EU=e=>null!=e&&"function"==typeof e,OU=(e,t,n,o,i)=>{var a,s,{offset:l,className:c}=e,{cx:u,cy:d,innerRadius:f,outerRadius:p,startAngle:h,endAngle:m,clockWise:y}=i,v=(f+p)/2,g=((e,t)=>Mx(t-e)*Math.min(Math.abs(t-e),360))(h,m),b=g>=0?1:-1;switch(t){case"insideStart":a=h+b*l,s=y;break;case"insideEnd":a=m-b*l,s=!y;break;case"end":a=m+b*l,s=y;break;default:throw new Error("Unsupported position ".concat(t))}s=g<=0?s:!s;var x=BC(u,d,v,a),w=BC(u,d,v,a+359*(s?1:-1)),E="M".concat(x.x,",").concat(x.y,"\n A").concat(v,",").concat(v,",0,1,").concat(s?0:1,",\n ").concat(w.x,",").concat(w.y),O=$x(e.id)?Lx("recharts-radial-line-"):e.id;return r.createElement("text",vU({},o,{dominantBaseline:"central",className:H("recharts-radial-bar-label",c)}),r.createElement("defs",null,r.createElement("path",{id:O,d:E})),r.createElement("textPath",{xlinkHref:"#".concat(O)},n))},SU=e=>null!=e&&"cx"in e&&Dx(e.cx),kU={angle:0,offset:5,zIndex:fN.label,position:"middle",textBreakAll:!1};function PU(t){var n,o,i,a,s,l=iw(t,kU),{viewBox:c,parentViewBox:u,position:d,value:f,children:p,content:h,className:m="",textBreakAll:y,labelRef:v}=l,g=(n=e.useContext(wU),o=HE(AN),n||o),b=xU(),x=function(e){if(!SU(e))return e;var{cx:t,cy:n,outerRadius:r}=e,o=2*r;return{x:t-r,y:n-r,width:o,upperWidth:o,lowerWidth:o,height:o}}(i=null==c?"center"===d?b:null!=g?g:b:SU(c)?c:xj(c));if(!i||$x(f)&&$x(p)&&!e.isValidElement(h)&&"function"!=typeof h)return null;var w=mU(mU({},l),{},{viewBox:i});if(e.isValidElement(h)){var{labelRef:E}=w,O=pU(w,dU);return e.cloneElement(h,O)}if("function"==typeof h){var{content:S}=w,k=pU(w,fU);if(a=e.createElement(h,k),e.isValidElement(a))return a}else a=(e=>{var{value:t,formatter:n}=e,r=$x(e.children)?t:e.children;return"function"==typeof n?n(r):r})(l);var P=Gg(l);if(SU(i)){if("insideStart"===d||"insideEnd"===d||"end"===d)return OU(l,d,a,P,i);s=((e,t,n)=>{var{cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if("outside"===n){var{x:u,y:d}=BC(r,o,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"end"};var f=(i+a)/2,{x:p,y:h}=BC(r,o,f,c);return{x:p,y:h,textAnchor:"middle",verticalAnchor:"middle"}})(i,l.offset,l.position)}else{if(!x)return null;var j=(e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:o}=e,{x:i,y:a,height:s,upperWidth:l,lowerWidth:c}=xj(t),u=i,d=i+(l-c)/2,f=(u+d)/2,p=(l+c)/2,h=u+l/2,m=s>=0?1:-1,y=m*r,v=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=o;if("top"===n){var S={x:u+l/2,y:a-y,horizontalAnchor:"middle",verticalAnchor:v};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+y,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 j={x:f+p+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"};return O&&(j.width=Math.max(O.x+O.width-j.x,0),j.height=s),j}var A=O?{width:p,height:s}:{};return"insideLeft"===n?cU({x:f+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"},A):"insideRight"===n?cU({x:f+p-x,y:a+s/2,horizontalAnchor:w,verticalAnchor:"middle"},A):"insideTop"===n?cU({x:u+l/2,y:a+y,horizontalAnchor:"middle",verticalAnchor:g},A):"insideBottom"===n?cU({x:d+c/2,y:a+s-y,horizontalAnchor:"middle",verticalAnchor:v},A):"insideTopLeft"===n?cU({x:u+x,y:a+y,horizontalAnchor:E,verticalAnchor:g},A):"insideTopRight"===n?cU({x:u+l-x,y:a+y,horizontalAnchor:w,verticalAnchor:g},A):"insideBottomLeft"===n?cU({x:d+x,y:a+s-y,horizontalAnchor:E,verticalAnchor:v},A):"insideBottomRight"===n?cU({x:d+c-x,y:a+s-y,horizontalAnchor:w,verticalAnchor:v},A):n&&"object"==typeof n&&(Dx(n.x)||Ix(n.x))&&(Dx(n.y)||Ix(n.y))?cU({x:i+zx(n.x,p),y:a+zx(n.y,s),horizontalAnchor:"end",verticalAnchor:"end"},A):cU({x:h,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},A)})({viewBox:x,position:d,offset:l.offset,parentViewBox:SU(u)?void 0:u});s=mU(mU({x:j.x,y:j.y,textAnchor:j.horizontalAnchor,verticalAnchor:j.verticalAnchor},void 0!==j.width?{width:j.width}:{}),void 0!==j.height?{height:j.height}:{})}return r.createElement(BF,{zIndex:l.zIndex},r.createElement(sU,vU({ref:v,className:H("recharts-label",m)},P,s,{textAnchor:Q$(P.textAnchor)?P.textAnchor:s.textAnchor,breakAll:y}),a))}PU.displayName="Label";function jU(t){var{label:n,labelRef:o}=t;return((t,n,o)=>{if(!t)return null;var i={viewBox:n,labelRef:o};return!0===t?r.createElement(PU,vU({key:"label-implicit"},i)):_x(t)?r.createElement(PU,vU({key:"label-implicit",value:t},i)):e.isValidElement(t)?t.type===PU?e.cloneElement(t,mU({key:"label-implicit"},i)):r.createElement(PU,vU({key:"label-implicit",content:t},i)):EU(t)?r.createElement(PU,vU({key:"label-implicit",content:t},i)):t&&"object"==typeof t?r.createElement(PU,vU({},t,{key:"label-implicit"},i)):null})(n,xU(),o)||null}var AU=["valueAccessor"],TU=["dataKey","clockWise","id","textBreakAll","zIndex"];function CU(){return CU=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},CU.apply(null,arguments)}function MU(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var NU=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(function(e){return $x(e)||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}(t))return t},IU=e.createContext(void 0),DU=IU.Provider,_U=e.createContext(void 0);function RU(t){var{valueAccessor:n=NU}=t,o=MU(t,AU),{dataKey:i,clockWise:a,id:s,textBreakAll:l,zIndex:c}=o,u=MU(o,TU),d=e.useContext(IU),f=e.useContext(_U),p=d||f;return p&&p.length?r.createElement(BF,{zIndex:null!=c?c:fN.label},r.createElement(tb,{className:"recharts-label-list"},p.map((e,t)=>{var a,c=$x(i)?n(e,t):fP(e.payload,i),d=$x(s)?{}:{id:"".concat(s,"-").concat(t)};return r.createElement(PU,CU({key:"label-".concat(t)},Gg(e),u,d,{fill:null!==(a=o.fill)&&void 0!==a?a:e.fill,parentViewBox:e.parentViewBox,value:c,textBreakAll:l,viewBox:e.viewBox,index:t,zIndex:0}))}))):null}function LU(e){var{label:t}=e;return t?!0===t?r.createElement(RU,{key:"labelList-implicit"}):r.isValidElement(t)||EU(t)?r.createElement(RU,{key:"labelList-implicit",content:t}):"object"==typeof t?r.createElement(RU,CU({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function zU(){return zU=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},zU.apply(null,arguments)}_U.Provider,RU.displayName="LabelList";var VU=e=>{var{cx:t,cy:n,r:o,className:i}=e,a=H("recharts-dot",i);return Dx(t)&&Dx(n)&&Dx(o)?r.createElement("circle",zU({},Yg(e),tw(e),{className:a,cx:t,cy:n,r:o})):null},BU=xk({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:FU,removeRadiusAxis:$U,addAngleAxis:UU,removeAngleAxis:WU}=BU.actions,KU=BU.reducer;var HU,YU={exports:{}},qU={};function GU(){if(HU)return qU;HU=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=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 o: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 i:return p;default:return h}}case t:return h}}}return qU.ContextConsumer=i,qU.ContextProvider=a,qU.Element=e,qU.ForwardRef=s,qU.Fragment=n,qU.Lazy=d,qU.Memo=u,qU.Portal=t,qU.Profiler=o,qU.StrictMode=r,qU.Suspense=l,qU.SuspenseList=c,qU.isContextConsumer=function(e){return h(e)===i},qU.isContextProvider=function(e){return h(e)===a},qU.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},qU.isForwardRef=function(e){return h(e)===s},qU.isFragment=function(e){return h(e)===n},qU.isLazy=function(e){return h(e)===d},qU.isMemo=function(e){return h(e)===u},qU.isPortal=function(e){return h(e)===t},qU.isProfiler=function(e){return h(e)===o},qU.isStrictMode=function(e){return h(e)===r},qU.isSuspense=function(e){return h(e)===l},qU.isSuspenseList=function(e){return h(e)===c},qU.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},qU.typeOf=h,qU}var XU,ZU,JU={};
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 QU(){return XU||(XU=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 i:case o: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"),o=Symbol.for("react.strict_mode"),i=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");JU.ContextConsumer=a,JU.ContextProvider=s,JU.Element=t,JU.ForwardRef=l,JU.Fragment=r,JU.Lazy=f,JU.Memo=d,JU.Portal=n,JU.Profiler=i,JU.StrictMode=o,JU.Suspense=c,JU.SuspenseList=u,JU.isContextConsumer=function(t){return e(t)===a},JU.isContextProvider=function(t){return e(t)===s},JU.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},JU.isForwardRef=function(t){return e(t)===l},JU.isFragment=function(t){return e(t)===r},JU.isLazy=function(t){return e(t)===f},JU.isMemo=function(t){return e(t)===d},JU.isPortal=function(t){return e(t)===n},JU.isProfiler=function(t){return e(t)===i},JU.isStrictMode=function(t){return e(t)===o},JU.isSuspense=function(t){return e(t)===c},JU.isSuspenseList=function(t){return e(t)===u},JU.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===o||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)},JU.typeOf=e}()),JU}function eW(){return ZU||(ZU=1,"production"===process.env.NODE_ENV?YU.exports=GU():YU.exports=QU()),YU.exports}var tW=eW(),nW=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",rW=null,oW=null,iW=t=>{if(t===rW&&Array.isArray(oW))return oW;var n=[];return e.Children.forEach(t,e=>{$x(e)||(tW.isFragment(e)?n=n.concat(iW(e.props.children)):n.push(e))}),oW=n,rW=t,n};function aW(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>nW(e)):[nW(t)],iW(e).forEach(e=>{var t=Ax(e,"type.displayName")||Ax(e,"type.name");t&&-1!==r.indexOf(t)&&n.push(e)}),n}var sW,lW,cW,uW=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot),dW={};function fW(){return sW||(sW=1,e=dW,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}),dW;var e}function pW(){return cW?lW:(cW=1,lW=fW().isPlainObject)}var hW,mW,yW,vW,gW,bW=i(pW());function xW(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 wW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xW(Object(n),!0).forEach(function(t){EW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EW(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 OW(){return OW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OW.apply(null,arguments)}function SW(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var kW=(e,t,n,r,o)=>{var i,a=n-r;return i=Cx(hW||(hW=SW(["M ",",",""])),e,t),i+=Cx(mW||(mW=SW(["L ",",",""])),e+n,t),i+=Cx(yW||(yW=SW(["L ",",",""])),e+n-a/2,t+o),i+=Cx(vW||(vW=SW(["L ",",",""])),e+n-a/2-r,t+o),i+=Cx(gW||(gW=SW(["L ",","," Z"])),e,t)},PW={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},jW=t=>{var n=iw(t,PW),{x:o,y:i,upperWidth:a,lowerWidth:s,height:l,className:c}=n,{animationEasing:u,animationDuration:d,animationBegin:f,isUpdateAnimationActive:p}=n,h=e.useRef(null),[m,y]=e.useState(-1),v=e.useRef(a),g=e.useRef(s),b=e.useRef(l),x=e.useRef(o),w=e.useRef(i),E=aC(t,"trapezoid-");if(e.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var e=h.current.getTotalLength();e&&y(e)}catch(e){}},[]),o!==+o||i!==+i||a!==+a||s!==+s||l!==+l||0===a&&0===s||0===l)return null;var O=H("recharts-trapezoid",c);if(!p)return r.createElement("g",null,r.createElement("path",OW({},Gg(n),{className:O,d:kW(o,i,a,s,l)})));var S=v.current,k=g.current,P=b.current,j=x.current,A=w.current,T="0px ".concat(-1===m?1:m,"px"),C="".concat(m,"px ").concat(m,"px"),M=_T(["strokeDasharray"],d,u);return r.createElement(iC,{animationId:E,key:E,canBegin:m>0,duration:d,easing:u,isActive:p,begin:f},e=>{var t=Bx(S,a,e),c=Bx(k,s,e),u=Bx(P,l,e),d=Bx(j,o,e),f=Bx(A,i,e);h.current&&(v.current=t,g.current=c,b.current=u,x.current=d,w.current=f);var p=e>0?{transition:M,strokeDasharray:C}:{strokeDasharray:T};return r.createElement("path",OW({},Gg(n),{className:O,d:kW(d,f,t,c,u),ref:h,style:wW(wW({},p),n.style)}))})},AW=["option","shapeType","activeClassName","inActiveClassName"];function TW(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?TW(Object(n),!0).forEach(function(t){MW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MW(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 NW(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return r.createElement(jC,n);case"trapezoid":return r.createElement(jW,n);case"sector":return r.createElement(XC,n);case"symbols":if(function(e){return"symbols"===e}(t))return r.createElement(Qx,n);break;case"curve":return r.createElement(kT,n);default:return null}}function IW(t){var n,{option:o,shapeType:i,activeClassName:a="recharts-active-shape",inActiveClassName:s="recharts-shape"}=t,l=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,AW);if(e.isValidElement(o))n=e.cloneElement(o,CW(CW({},l),function(t){return e.isValidElement(t)?t.props:t}(o)));else if("function"==typeof o)n=o(l,l.index);else if(bW(o)&&"boolean"!=typeof o){var c=function(e,t){return CW(CW({},t),e)}(o,l);n=r.createElement(NW,{shapeType:i,elementProps:c})}else{var u=l;n=r.createElement(NW,{shapeType:i,elementProps:u})}return l.isActive?r.createElement(tb,{className:a},n):r.createElement(tb,{className:s},n)}var DW,_W=(e,t,n)=>{var r=$E();return(o,i)=>a=>{null==e||e(o,i,a),r(VV({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}},RW=e=>{var t=$E();return(n,r)=>o=>{null==e||e(n,r,o),t(BV())}},LW=(e,t,n)=>{var r=$E();return(o,i)=>a=>{null==e||e(o,i,a),r($V({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}};function zW(t){var{tooltipEntrySettings:n}=t,r=$E(),o=HP(),i=e.useRef(null);return e.useLayoutEffect(()=>{o||(null===i.current?r(_V(n)):i.current!==n&&r(RV({prev:i.current,next:n})),i.current=n)},[n,r,o]),e.useLayoutEffect(()=>()=>{i.current&&(r(LV(i.current)),i.current=null)},[r]),null}function VW(t){var{legendPayload:n}=t,r=$E(),o=HP(),i=e.useRef(null);return e.useLayoutEffect(()=>{o||(null===i.current?r(kA(n)):i.current!==n&&r(PA({prev:i.current,next:n})),i.current=n)},[r,o,n]),e.useLayoutEffect(()=>()=>{i.current&&(r(jA(i.current)),i.current=null)},[r]),null}var BW=null!==(DW=r["useId".toString()])&&void 0!==DW?DW:()=>{var[e]=r.useState(()=>Lx("uid-"));return e};var FW=e.createContext(void 0),$W=e=>{var{id:t,type:n,children:o}=e,i=function(e,t){var n=BW();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(n),t);return r.createElement(FW.Provider,{value:i},o(i))},UW=xk({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:uk()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,o=BS(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=r)},prepare:uk()},removeCartesianGraphicalItem:{reducer(e,t){var n=BS(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:uk()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:uk()},removePolarGraphicalItem:{reducer(e,t){var n=BS(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:uk()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,o=BS(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=r)},prepare:uk()}}}),{addCartesianGraphicalItem:WW,replaceCartesianGraphicalItem:KW,removeCartesianGraphicalItem:HW,addPolarGraphicalItem:YW,removePolarGraphicalItem:qW,replacePolarGraphicalItem:GW}=UW.actions,XW=UW.reducer,ZW=t=>{var n=$E(),r=e.useRef(null);return e.useLayoutEffect(()=>{null===r.current?n(WW(t)):r.current!==t&&n(KW({prev:r.current,next:t})),r.current=t},[n,t]),e.useLayoutEffect(()=>()=>{r.current&&(n(HW(r.current)),r.current=null)},[n]),null},JW=e.memo(ZW),QW=["points"];function eK(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 tK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eK(Object(n),!0).forEach(function(t){nK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nK(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 rK(){return rK=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},rK.apply(null,arguments)}function oK(t){var{option:n,dotProps:o,className:i}=t;if(e.isValidElement(n))return e.cloneElement(n,o);if("function"==typeof n)return n(o);var a=H(i,"boolean"!=typeof n?n.className:""),s=null!=o?o:{},{points:l}=s,c=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(s,QW);return r.createElement(VU,rK({},c,{className:a}))}function iK(t){var{points:n,dot:o,className:i,dotClassName:a,dataKey:s,baseProps:l,needClip:c,clipPathId:u,zIndex:d=fN.scatter}=t;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(n,o))return null;var f,p=uW(o),h=null==(f=o)?null:e.isValidElement(f)?Gg(f.props):"object"!=typeof f||Array.isArray(f)?null:Gg(f),m=n.map((e,t)=>{var i,c,u=tK(tK(tK({r:3},l),h),{},{index:t,cx:null!==(i=e.x)&&void 0!==i?i:void 0,cy:null!==(c=e.y)&&void 0!==c?c:void 0,dataKey:s,value:e.value,payload:e.payload,points:n});return r.createElement(oK,{key:"dot-".concat(t),option:o,dotProps:u,className:a})}),y={};return c&&null!=u&&(y.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(u,")")),r.createElement(BF,{zIndex:d},r.createElement(tb,rK({className:i},y),m))}function aK(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 sK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aK(Object(n),!0).forEach(function(t){lK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lK(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 cK=xk({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:uk()},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:uk()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:uk()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:uk()},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:uk()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:uk()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:uk()},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:uk()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:uk()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,o=e.yAxis[n];if(o){var i,a=o.widthHistory||[];if(3===a.length&&a[0]===a[2]&&r===a[1]&&r!==o.width&&Math.abs(r-(null!==(i=a[0])&&void 0!==i?i:0))<=1)return;var s=[...a,r].slice(-3);e.yAxis[n]=sK(sK({},o),{},{width:r,widthHistory:s})}}}}),{addXAxis:uK,replaceXAxis:dK,removeXAxis:fK,addYAxis:pK,replaceYAxis:hK,removeYAxis:mK,addZAxis:yK,replaceZAxis:vK,removeZAxis:gK,updateYAxisWidth:bK}=cK.actions,xK=cK.reducer,wK=La([$P],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),EK=La([wK,jP,AP],(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)}}),OK=()=>HE(EK);function SK(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 kK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SK(Object(n),!0).forEach(function(t){PK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PK(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 jK=t=>{var{point:n,childIndex:o,mainColor:i,activeDot:a,dataKey:s,clipPath:l}=t;if(!1===a||null==n.x||null==n.y)return null;var c,u=kK(kK(kK({},{index:o,dataKey:s,cx:n.x,cy:n.y,r:4,fill:null!=i?i:"none",strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value}),qg(a)),tw(a));return c=e.isValidElement(a)?e.cloneElement(a,u):"function"==typeof a?a(u):r.createElement(VU,u),r.createElement(tb,{className:"recharts-active-dot",clipPath:l},c)};function AK(e){var{points:t,mainColor:n,activeDot:o,itemDataKey:i,clipPath:a,zIndex:s=fN.activeDot}=e,l=HE(GB),c=HE(oF);if(null==t||null==c)return null;var u=t.find(e=>c.includes(e.payload));return $x(u)?null:r.createElement(BF,{zIndex:s},r.createElement(jK,{point:u,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:o,clipPath:a}))}var TK=(e,t,n)=>{var r=null!=n?n:e;if(!$x(r))return zx(r,t,0)};function CK(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 MK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CK(Object(n),!0).forEach(function(t){NK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NK(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 IK=t=>{var{chartData:n}=t,r=$E(),o=HP();return e.useEffect(()=>o?()=>{}:(r(s$(n)),()=>{r(s$(void 0))}),[n,r,o]),null},DK={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},_K=xk({name:"brush",initialState:DK,reducers:{setBrushSettings:(e,t)=>null==t.payload?DK:t.payload}}),{setBrushSettings:RK}=_K.actions,LK=_K.reducer;var zK=xk({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=BS(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=BS(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=BS(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),{addDot:VK,removeDot:BK,addArea:FK,removeArea:$K,addLine:UK,removeLine:WK}=zK.actions,KK=zK.reducer,HK=e.createContext(void 0),YK=t=>{var{children:n}=t,[o]=e.useState("".concat(Lx("recharts"),"-clip")),i=OK();if(null==i)return null;var{x:a,y:s,width:l,height:c}=i;return r.createElement(HK.Provider,{value:o},r.createElement("defs",null,r.createElement("clipPath",{id:o},r.createElement("rect",{x:a,y:s,height:c,width:l}))),n)};function qK(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var o=e[r];void 0!==o&&n.push(o)}return n}function GK(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),o=r*Math.PI/180,i=Math.atan(n/t),a=o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}function XK(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function ZK(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 JK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZK(Object(n),!0).forEach(function(t){QK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QK(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 eH(e,t,n){var r,{tick:o,ticks:i,viewBox:a,minTickGap:s,orientation:l,interval:c,tickFormatter:u,unit:d,angle:f}=e;if(!i||!i.length||!o)return[];if(Dx(c)||iT)return null!==(r=function(e,t){return qK(e,t+1)}(i,Dx(c)?c:0))&&void 0!==r?r:[];var p=[],h="top"===l||"bottom"===l?"width":"height",m=d&&"width"===h?D$(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},y=(e,r)=>{var o="function"==typeof u?u(e.value,r):e.value;return"width"===h?GK(D$(o,{fontSize:t,letterSpacing:n}),m,f):D$(o,{fontSize:t,letterSpacing:n})[h]},v=i[0],g=i[1],b=i.length>=2&&null!=v&&null!=g?Mx(g.coordinate-v.coordinate):1,x=function(e,t,n){var r="width"===n,{x:o,y:i,width:a,height:s}=e;return 1===t?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}(a,b,h);return"equidistantPreserveStart"===c?function(e,t,n,r,o){for(var i,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:qK(r,u)};var i,a=c,f=()=>(void 0===i&&(i=n(t,a)),i),p=t.coordinate,h=0===c||XK(e,p,f,d,l);h||(c=0,d=s,u+=1),h&&(d=p+e*(f()/2+o),c+=u)};u<=a.length;)if(i=f())return i.v;return[]}(b,x,y,i,s):"equidistantPreserveEnd"===c?function(e,t,n,r,o){var i=(r||[]).slice().length;if(0===i)return[];for(var{start:a,end:s}=t,l=1;l<=i;l++){for(var c,u=(i-1)%l,d=a,f=!0,p=function(){var t=r[h];if(null==t)return 0;var i,a=h,l=()=>(void 0===i&&(i=n(t,a)),i),c=t.coordinate,p=h===u||XK(e,c,l,d,s);if(!p)return f=!1,1;p&&(d=c+e*(l()/2+o))},h=u;h<i&&(0===(c=p())||1!==c);h+=l);if(f){for(var m=[],y=u;y<i;y+=l){var v=r[y];null!=v&&m.push(v)}return m}}return[]}(b,x,y,i,s):(p="preserveStart"===c||"preserveStartEnd"===c?function(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(i){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=JK(JK({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),null!=u.tickCoord&&XK(e,u.tickCoord,()=>d,l,c)&&(c=u.tickCoord-e*(d/2+o),a[s-1]=JK(JK({},u),{},{isShow:!0}))}}for(var p=i?s-1:s,h=function(t){var r=a[t];if(null==r)return 1;var i,s=r,u=()=>(void 0===i&&(i=n(r,t)),i);if(0===t){var d=e*(s.coordinate-e*u()/2-l);a[t]=s=JK(JK({},s),{},{tickCoord:d<0?s.coordinate-d*e:s.coordinate})}else a[t]=s=JK(JK({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&XK(e,s.tickCoord,u,l,c)&&(l=s.tickCoord+e*(u()/2+o),a[t]=JK(JK({},s),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(b,x,y,i,s,"preserveStartEnd"===c):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,{start:s}=t,{end:l}=t,c=function(t){var r=i[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);i[t]=u=JK(JK({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate})}else i[t]=u=JK(JK({},u),{},{tickCoord:u.coordinate});null!=u.tickCoord&&XK(e,u.tickCoord,d,s,l)&&(l=u.tickCoord-e*(d()/2+o),i[t]=JK(JK({},u),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}(b,x,y,i,s),p.filter(e=>e.isShow))}var tH=xk({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:o}=t.payload;e[n][r]=o},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:nH,removeRenderedTicks:rH}=tH.actions,oH=tH.reducer,iH=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function aH(){return aH=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},aH.apply(null,arguments)}function sH(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 lH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sH(Object(n),!0).forEach(function(t){cH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cH(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 uH={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:fN.axis};function dH(e){var{x:t,y:n,width:o,height:i,orientation:a,mirror:s,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var u=lH(lH(lH({},c),Yg(l)),{},{fill:"none"});if("top"===a||"bottom"===a){var d=+("top"===a&&!s||"bottom"===a&&s);u=lH(lH({},u),{},{x1:t,y1:n+d*i,x2:t+o,y2:n+d*i})}else{var f=+("left"===a&&!s||"right"===a&&s);u=lH(lH({},u),{},{x1:t+f*o,y1:n,x2:t+f*o,y2:n+i})}return r.createElement("line",aH({},u,{className:H("recharts-cartesian-axis-line",Ax(l,"className"))}))}function fH(e){var t,n,{option:o,tickProps:i,value:a}=e,s=H(i.className,"recharts-cartesian-axis-tick-value");if(r.isValidElement(o))t=r.cloneElement(o,lH(lH({},i),{},{className:s}));else if("function"==typeof o)t=o(lH(lH({},i),{},{className:s}));else{var l="recharts-cartesian-axis-tick-value";"boolean"!=typeof o&&(l=H(l,(n=o)&&"object"==typeof n&&"className"in n&&"string"==typeof n.className?n.className:"")),t=r.createElement(sU,aH({},i,{className:l}),a)}return t}function pH(t){var{ticks:n,axisType:r,axisId:o}=t,i=$E();return e.useEffect(()=>{if(null==o||null==r)return Kx;var e=n.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index}));return i(nH({ticks:e,axisId:o,axisType:r})),()=>{i(rH({axisId:o,axisType:r}))}},[i,n,o,r]),null}var hH=e.forwardRef((e,t)=>{var{ticks:n=[],tick:o,tickLine:i,stroke:a,tickFormatter:s,unit:l,padding:c,tickTextProps:u,orientation:d,mirror:f,x:p,y:h,width:m,height:y,tickSize:v,tickMargin:g,fontSize:b,letterSpacing:x,getTicksConfig:w,events:E,axisType:O,axisId:S}=e,k=eH(lH(lH({},w),{},{ticks:n}),b,x),P=Yg(w),j=qg(o),A=Q$(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),C={};"object"==typeof i&&(C=i);var M=lH(lH({},P),{},{fill:"none"},C),N=k.map(e=>lH({entry:e},function(e,t,n,r,o,i,a,s,l){var c,u,d,f,p,h,m=s?-1:1,y=e.tickSize||a,v=Dx(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":c=u=e.coordinate,h=(d=(f=n+ +!s*o)-m*y)-m*l,p=v;break;case"left":d=f=e.coordinate,p=(c=(u=t+ +!s*r)-m*y)-m*l,h=v;break;case"right":d=f=e.coordinate,p=(c=(u=t+ +s*r)+m*y)+m*l,h=v;break;default:c=u=e.coordinate,h=(d=(f=n+ +s*o)+m*y)+m*l,p=v}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:h}}}(e,p,h,m,y,d,v,f,g))),I=N.map(e=>{var{entry:t,line:n}=e;return r.createElement(tb,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},i&&r.createElement("line",aH({},M,n,{className:H("recharts-cartesian-axis-tick-line",Ax(i,"className"))})))}),D=N.map((e,t)=>{var n,i,{entry:d,tick:f}=e,p=lH(lH(lH(lH({verticalAnchor:T},P),{},{textAnchor:A,stroke:"none",fill:a},f),{},{index:t,payload:d,visibleTicksCount:k.length,tickFormatter:s,padding:c},u),{},{angle:null!==(n=null!==(i=null==u?void 0:u.angle)&&void 0!==i?i:P.angle)&&void 0!==n?n:0}),h=lH(lH({},p),j);return r.createElement(tb,aH({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(d.value,"-").concat(d.coordinate,"-").concat(d.tickCoord)},nw(E,d,t)),o&&r.createElement(fH,{option:o,tickProps:h,value:"".concat("function"==typeof s?s(d.value,t):d.value).concat(l||"")}))});return r.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(O,"-ticks")},r.createElement(pH,{ticks:k,axisId:S,axisType:O}),D.length>0&&r.createElement(BF,{zIndex:fN.label},r.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(O,"-tick-labels"),ref:t},D)),I.length>0&&r.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(O,"-tick-lines")},I))}),mH=e.forwardRef((t,n)=>{var{axisLine:o,width:i,height:a,className:s,hide:l,ticks:c,axisType:u,axisId:d}=t,f=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,iH),[p,h]=e.useState(""),[m,y]=e.useState(""),v=e.useRef(null);e.useImperativeHandle(n,()=>({getCalculatedWidth:()=>{var e;return(e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:o=0,tickMargin:i=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+(o+i)+s+(n?r:0);return Math.round(l)}return 0})({ticks:v.current,label:null===(e=t.labelRef)||void 0===e?void 0:e.current,labelGapWithTick:5,tickSize:t.tickSize,tickMargin:t.tickMargin})}}));var g=e.useCallback(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),o=r.fontSize,i=r.letterSpacing;o===p&&i===m||(h(o),y(i))}}},[p,m]);return l||null!=i&&i<=0||null!=a&&a<=0?null:r.createElement(BF,{zIndex:t.zIndex},r.createElement(tb,{className:H("recharts-cartesian-axis",s)},r.createElement(dH,{x:t.x,y:t.y,width:i,height:a,orientation:t.orientation,mirror:t.mirror,axisLine:o,otherSvgProps:Yg(t)}),r.createElement(hH,{ref:g,axisType:u,events:f,fontSize:p,getTicksConfig:t,height:t.height,letterSpacing:m,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}),r.createElement(bU,{x:t.x,y:t.y,width:t.width,height:t.height,lowerWidth:t.width,upperWidth:t.width},r.createElement(jU,{label:t.label,labelRef:t.labelRef}),t.children)))}),yH=r.forwardRef((e,t)=>{var n=iw(e,uH);return r.createElement(mH,aH({},n,{ref:t}))});yH.displayName="CartesianAxis";var vH=["x1","y1","x2","y2","key"],gH=["offset"],bH=["xAxisId","yAxisId"],xH=["xAxisId","yAxisId"];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}function SH(){return SH=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},SH.apply(null,arguments)}function kH(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var PH=e=>{var{fill:t}=e;if(!t||"none"===t)return null;var{fillOpacity:n,x:o,y:i,width:a,height:s,ry:l}=e;return r.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function jH(e){var t,{option:n,lineItemProps:o}=e;if(r.isValidElement(n))t=r.cloneElement(n,o);else if("function"==typeof n)t=n(o);else{var i,{x1:a,y1:s,x2:l,y2:c,key:u}=o,d=null!==(i=Yg(kH(o,vH)))&&void 0!==i?i:{},{offset:f}=d,p=kH(d,gH);t=r.createElement("line",SH({},p,{x1:a,y1:s,x2:l,y2:c,fill:"none",key:u}))}return t}function AH(e){var{x:t,width:n,horizontal:o=!0,horizontalPoints:i}=e;if(!o||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,l=kH(e,bH),c=i.map((e,i)=>{var a=EH(EH({},l),{},{x1:t,y1:e,x2:t+n,y2:e,key:"line-".concat(i),index:i});return r.createElement(jH,{key:"line-".concat(i),option:o,lineItemProps:a})});return r.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function TH(e){var{y:t,height:n,vertical:o=!0,verticalPoints:i}=e;if(!o||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,l=kH(e,xH),c=i.map((e,i)=>{var a=EH(EH({},l),{},{x1:e,y1:t,x2:e,y2:t+n,key:"line-".concat(i),index:i});return r.createElement(jH,{option:o,lineItemProps:a,key:"line-".concat(i)})});return r.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function CH(e){var{horizontalFill:t,fillOpacity:n,x:o,y:i,width:a,height:s,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length||null==l)return null;var u=l.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,l)=>{var c=u[l+1],d=null==c?i+s-e:c-e;if(d<=0)return null;var f=l%t.length;return r.createElement("rect",{key:"react-".concat(l),y:e,x:o,height:d,width:a,stroke:"none",fill:t[f],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function MH(e){var{vertical:t=!0,verticalFill:n,fillOpacity:o,x:i,y:a,width:s,height:l,verticalPoints:c}=e;if(!t||!n||!n.length)return null;var u=c.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,t)=>{var c=u[t+1],d=null==c?i+s-e:c-e;if(d<=0)return null;var f=t%n.length;return r.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:d,height:l,stroke:"none",fill:n[f],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var NH=(e,t)=>{var{xAxis:n,width:r,height:o,offset:i}=e;return hP(eH(EH(EH(EH({},uH),n),{},{ticks:mP(n),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},IH=(e,t)=>{var{yAxis:n,width:r,height:o,offset:i}=e;return hP(eH(EH(EH(EH({},uH),n),{},{ticks:mP(n),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},DH={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:fN.grid};function _H(e){var t=Sj(),n=kj(),o=Oj(),i=EH(EH({},iw(e,DH)),{},{x:Dx(e.x)?e.x:o.left,y:Dx(e.y)?e.y:o.top,width:Dx(e.width)?e.width:o.width,height:Dx(e.height)?e.height:o.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:u,height:d,syncWithTicks:f,horizontalValues:p,verticalValues:h}=i,m=HP(),y=HE(e=>xV(e,"xAxis",a,m)),v=HE(e=>xV(e,"yAxis",s,m));if(!(lP(u)&&lP(d)&&Dx(l)&&Dx(c)))return null;var g=i.verticalCoordinatesGenerator||NH,b=i.horizontalCoordinatesGenerator||IH,{horizontalPoints:x,verticalPoints:w}=i;if(!(x&&x.length||"function"!=typeof b)){var E=p&&p.length,O=b({yAxis:v?EH(EH({},v),{},{ticks:E?p:v.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:o},!!E||f);rj(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:y?EH(EH({},y),{},{ticks:S?h:y.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:o},!!S||f);rj(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(w=k)}return r.createElement(BF,{zIndex:i.zIndex},r.createElement("g",{className:"recharts-cartesian-grid"},r.createElement(PH,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),r.createElement(CH,SH({},i,{horizontalPoints:x})),r.createElement(MH,SH({},i,{verticalPoints:w})),r.createElement(AH,SH({},i,{offset:o,horizontalPoints:x,xAxis:y,yAxis:v})),r.createElement(TH,SH({},i,{offset:o,verticalPoints:w,xAxis:y,yAxis:v}))))}_H.displayName="CartesianGrid";var RH=xk({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:o}=t.payload;e[n]&&(e[n]=e[n].map(e=>e.dataKey===r.dataKey&&e.direction===r.direction?o: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:LH,replaceErrorBar:zH,removeErrorBar:VH}=RH.actions,BH=RH.reducer,FH=["children"];var $H={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},UH=e.createContext($H);function WH(e){var{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,FH);return r.createElement(UH.Provider,{value:n},t)}function KH(e,t){var n,r,o=HE(t=>CL(t,e)),i=HE(e=>IL(e,t)),a=null!==(n=null==o?void 0:o.allowDataOverflow)&&void 0!==n?n:AL.allowDataOverflow,s=null!==(r=null==i?void 0:i.allowDataOverflow)&&void 0!==r?r:ML.allowDataOverflow;return{needClip:a||s,needClipX:a,needClipY:s}}function HH(e){var{xAxisId:t,yAxisId:n,clipPathId:o}=e,i=OK(),{needClipX:a,needClipY:s,needClip:l}=KH(t,n);if(!l||!i)return null;var{x:c,y:u,width:d,height:f}=i;return r.createElement("clipPath",{id:"clipPath-".concat(o)},r.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 YH=(e,t,n,r)=>OV(e,"xAxis",t,r),qH=(e,t,n,r)=>EV(e,"xAxis",t,r),GH=(e,t,n,r)=>OV(e,"yAxis",n,r),XH=(e,t,n,r)=>EV(e,"yAxis",n,r),ZH=La([Pj,YH,GH,qH,XH],(e,t,n,r,o)=>pP(e,"xAxis")?SP(t,r,!1):SP(n,o,!1));function JH(e){return"line"===e.type}var QH=La([BL,(e,t,n,r,o)=>o],(e,t)=>e.filter(JH).find(e=>e.id===t)),eY=La([Pj,YH,GH,qH,XH,QH,ZH,pM],(e,t,n,r,o,i,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(null!=i&&null!=t&&null!=n&&null!=r&&null!=o&&0!==r.length&&0!==o.length&&null!=a&&("horizontal"===e||"vertical"===e)){var d,{dataKey:f,data:p}=i;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:o,yAxisTicks:i,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((e,l)=>{var c=fP(e,a);if("horizontal"===t){var u=bP({axis:n,ticks:o,bandSize:s,entry:e,index:l}),d=$x(c)?null:r.scale.map(c);return{x:u,y:null!=d?d:null,value:c,payload:e}}var f=$x(c)?null:n.scale.map(c),p=bP({axis:r,ticks:i,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:o,dataKey:f,bandSize:a,displayedData:d})}});function tY(e){var t=qg(e);if(null!=t){var{r:n,strokeWidth:r}=t,o=Number(n),i=Number(r);return(Number.isNaN(o)||o<0)&&(o=3),(Number.isNaN(i)||i<0)&&(i=2),{r:o,strokeWidth:i}}return{r:3,strokeWidth:2}}var nY=["id"],rY=["type","layout","connectNulls","needClip","shape"],oY=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function iY(){return iY=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},iY.apply(null,arguments)}function aY(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 sY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aY(Object(n),!0).forEach(function(t){lY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lY(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 cY(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var uY=e=>{var{dataKey:t,name:n,stroke:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:PP(n,t),payload:e}]},dY=r.memo(e=>{var{dataKey:t,data:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:n,getPosition:Kx,settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:PP(s,t),hide:l,type:u,color:o,unit:c,graphicalItemId:d}};return r.createElement(zW,{tooltipEntrySettings:f})}),fY=(e,t)=>"".concat(t,"px ").concat(e,"px");function pY(e,t){for(var n=e.length%2!=0?[...e,0]:e,r=[],o=0;o<t;++o)r.push(...n);return r}function hY(e){var{clipPathId:t,points:n,props:o}=e,{dot:i,dataKey:a,needClip:s}=o,{id:l}=o,c=Yg(cY(o,nY));return r.createElement(iK,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:c,needClip:s,clipPathId:t})}function mY(t){var{showLabels:n,children:o,points:i}=t,a=e.useMemo(()=>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 sY(sY({},r),{},{value:e.value,payload:e.payload,viewBox:r,parentViewBox:void 0,fill:void 0})}),[i]);return r.createElement(DU,{value:n?a:void 0},o)}function yY(e){var{clipPathId:t,pathRef:n,points:o,strokeDasharray:i,props:a}=e,{type:s,layout:l,connectNulls:c,needClip:u,shape:d}=a,f=sY(sY({},Gg(cY(a,rY))),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:o,type:s,layout:l,connectNulls:c,strokeDasharray:null!=i?i:a.strokeDasharray});return r.createElement(r.Fragment,null,(null==o?void 0:o.length)>1&&r.createElement(IW,iY({shapeType:"curve",option:d},f,{pathRef:n})),r.createElement(hY,{points:o,clipPathId:t,props:a}))}function vY(t){var{clipPathId:n,props:o,pathRef:i,previousPointsRef:a,longestAnimatedLengthRef:s}=t,{points:l,strokeDasharray:c,isAnimationActive:u,animationBegin:d,animationDuration:f,animationEasing:p,animateNewValues:h,width:m,height:y,onAnimationEnd:v,onAnimationStart:g}=o,b=a.current,x=aC(l,"recharts-line-"),w=e.useRef(x),[E,O]=e.useState(!1),S=!E,k=e.useCallback(()=>{"function"==typeof v&&v(),O(!1)},[v]),P=e.useCallback(()=>{"function"==typeof g&&g(),O(!0)},[g]),j=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(i.current),A=e.useRef(0);w.current!==x&&(A.current=s.current,w.current=x);var T=A.current;return r.createElement(mY,{points:l,showLabels:S},o.children,r.createElement(iC,{animationId:x,begin:d,duration:f,isActive:u,easing:p,onAnimationEnd:k,onAnimationStart:P,key:x},e=>{var t,d=Bx(T,j+T,e),f=Math.min(d,j);if(u)if(c){var p="".concat(c).split(/[,\s]+/gim).map(e=>parseFloat(e));t=((e,t,n)=>{var r=n.reduce((e,t)=>e+t,0);if(!r)return fY(t,e);for(var o=Math.floor(e/r),i=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>i){a=[...n.slice(0,s),i-l];break}}var d=a.length%2==0?[0,t]:[t];return[...pY(n,o),...a,...d].map(e=>"".concat(e,"px")).join(", ")})(f,j,p)}else t=fY(j,f);else t=null==c?void 0:String(c);if(e>0&&j>0&&(a.current=l,s.current=Math.max(s.current,f)),b){var v=b.length/l.length,g=1===e?l:l.map((t,n)=>{var r=Math.floor(n*v);if(b[r]){var o=b[r];return sY(sY({},t),{},{x:Bx(o.x,t.x,e),y:Bx(o.y,t.y,e)})}return sY(sY({},t),{},h?{x:Bx(2*m,t.x,e),y:Bx(y/2,t.y,e)}:{x:t.x,y:t.y})});return a.current=g,r.createElement(yY,{props:o,points:g,clipPathId:n,pathRef:i,strokeDasharray:t})}return r.createElement(yY,{props:o,points:l,clipPathId:n,pathRef:i,strokeDasharray:t})}),r.createElement(LU,{label:o.label}))}function gY(t){var{clipPathId:n,props:o}=t,i=e.useRef(null),a=e.useRef(0),s=e.useRef(null);return r.createElement(vY,{props:o,clipPathId:n,previousPointsRef:i,longestAnimatedLengthRef:a,pathRef:s})}var bY=(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:fP(e.payload,t)}};class xY extends e.Component{render(){var{hide:e,dot:t,points:n,className:o,xAxisId:i,yAxisId:a,top:s,left:l,width:c,height:u,id:d,needClip:f,zIndex:p}=this.props;if(e)return null;var h=H("recharts-line",o),m=d,{r:y,strokeWidth:v}=tY(t),g=uW(t),b=2*y+v,x=f?"url(#clipPath-".concat(g?"":"dots-").concat(m,")"):void 0;return r.createElement(BF,{zIndex:p},r.createElement(tb,{className:h},f&&r.createElement("defs",null,r.createElement(HH,{clipPathId:m,xAxisId:i,yAxisId:a}),!g&&r.createElement("clipPath",{id:"clipPath-dots-".concat(m)},r.createElement("rect",{x:l-b/2,y:s-b/2,width:c+b,height:u+b}))),r.createElement(WH,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:bY,errorBarOffset:0},r.createElement(gY,{props:this.props,clipPathId:m}))),r.createElement(AK,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var wY={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:fN.line,type:"linear"};function EY(e){var t=iw(e,wY),{activeDot:n,animateNewValues:o,animationBegin:i,animationDuration:a,animationEasing:s,connectNulls:l,dot:c,hide:u,isAnimationActive:d,label:f,legendType:p,xAxisId:h,yAxisId:m,id:y}=t,v=cY(t,oY),{needClip:g}=KH(h,m),b=OK(),x=jj(),w=HP(),E=HE(e=>eY(e,h,m,w,y));if("horizontal"!==x&&"vertical"!==x||null==E||null==b)return null;var{height:O,width:S,x:k,y:P}=b;return r.createElement(xY,iY({},v,{id:y,connectNulls:l,dot:c,activeDot:n,animateNewValues:o,animationBegin:i,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 OY(e){var t=iw(e,wY),n=HP();return r.createElement($W,{id:t.id,type:"line"},e=>r.createElement(r.Fragment,null,r.createElement(VW,{legendPayload:uY(t)}),r.createElement(dY,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),r.createElement(JW,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),r.createElement(EY,iY({},t,{id:e}))))}var SY=r.memo(OY,YA);function kY(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 PY(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}SY.displayName="Line";var jY=(e,t,n)=>OV(e,"xAxis",kY(e,t),n),AY=(e,t,n)=>EV(e,"xAxis",kY(e,t),n),TY=(e,t,n)=>OV(e,"yAxis",PY(e,t),n),CY=(e,t,n)=>EV(e,"yAxis",PY(e,t),n),MY=La([Pj,jY,TY,AY,CY],(e,t,n,r,o)=>pP(e,"xAxis")?SP(t,r,!1):SP(n,o,!1)),NY=La([BL,(e,t)=>t],(e,t)=>e.filter(e=>"area"===e.type).find(e=>e.id===t)),IY=e=>{var t=Pj(e);return pP(t,"xAxis")?"yAxis":"xAxis"},DY=La([NY,(e,t,n)=>uz(e,IY(e),((e,t)=>"yAxis"===IY(e)?PY(e,t):kY(e,t))(e,t),n)],(e,t)=>{var n;if(null!=e&&null!=t){var{stackId:r}=e,o=MN(e);if(null!=r&&null!=o){var i=null===(n=t[r])||void 0===n?void 0:n.stackedData,a=null==i?void 0:i.find(e=>e.key===o);if(null!=a)return a.map(e=>[e[0],e[1]])}}}),_Y=La([Pj,jY,TY,AY,CY,DY,hM,MY,NY,e=>e.rootProps.baseValue],(e,t,n,r,o,i,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!=o&&0!==r.length&&0!==o.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:o},stackedData:i,layout:a,chartBaseValue:s,xAxis:l,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:f,yAxisTicks:p,bandSize:h}=e,m=i&&i.length,y=rq(a,s,r,l,c),v="horizontal"===a,g=!1,b=u.map((e,t)=>{var r,a,s,u;if(m)u=i[d+t];else{var b=fP(e,o);Array.isArray(b)?(u=b,g=!0):u=[y,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==fP(e,o);return v?{x:bP({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:bP({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 v?{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}}):v?c.scale.map(y):l.scale.map(y);return{points:b,baseLine:null!=t?t:0,isRange:g}}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:o,dataStartIndex:d,areaSettings:l,stackedData:i,displayedData:p,chartBaseValue:c,bandSize:s})}}),RY=["id"],LY=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function zY(){return zY=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},zY.apply(null,arguments)}function VY(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function BY(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 FY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BY(Object(n),!0).forEach(function(t){$Y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BY(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}function UY(e,t){return e&&"none"!==e?e:t}var WY=e=>{var{dataKey:t,name:n,stroke:r,fill:o,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:UY(r,o),value:PP(n,t),payload:e}]},KY=r.memo(e=>{var{dataKey:t,data:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:n,getPosition:Kx,settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:PP(s,t),hide:l,type:u,color:UY(o,a),unit:c,graphicalItemId:d}};return r.createElement(zW,{tooltipEntrySettings:f})});function HY(e){var{clipPathId:t,points:n,props:o}=e,{needClip:i,dot:a,dataKey:s}=o,l=Yg(o);return r.createElement(iK,{points:n,dot:a,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:l,needClip:i,clipPathId:t})}function YY(e){var{showLabels:t,children:n,points:o}=e,i=o.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 FY(FY({},r),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:r,fill:void 0})});return r.createElement(DU,{value:t?i:void 0},n)}function qY(e){var{points:t,baseLine:n,needClip:o,clipPathId:i,props:a}=e,{layout:s,type:l,stroke:c,connectNulls:u,isRange:d}=a,{id:f}=a,p=VY(a,RY),h=Yg(p),m=Gg(p);return r.createElement(r.Fragment,null,(null==t?void 0:t.length)>1&&r.createElement(tb,{clipPath:o?"url(#clipPath-".concat(i,")"):void 0},r.createElement(kT,zY({},m,{id:f,points:t,connectNulls:u,type:l,baseLine:n,layout:s,stroke:"none",className:"recharts-area-area"})),"none"!==c&&r.createElement(kT,zY({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:t})),"none"!==c&&d&&Array.isArray(n)&&r.createElement(kT,zY({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:n}))),r.createElement(HY,{points:t,props:p,clipPathId:i}))}function GY(e){var t,n,{alpha:o,baseLine:i,points:a,strokeWidth:s}=e,l=null===(t=a[0])||void 0===t?void 0:t.y,c=null===(n=a[a.length-1])||void 0===n?void 0:n.y;if(!sP(l)||!sP(c))return null;var u=o*Math.abs(l-c),d=Math.max(...a.map(e=>e.x||0));return Dx(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(e=>e.x||0),d)),Dx(d)?r.createElement("rect",{x:0,y:l<c?l:l-u,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}function XY(e){var t,n,{alpha:o,baseLine:i,points:a,strokeWidth:s}=e,l=null===(t=a[0])||void 0===t?void 0:t.x,c=null===(n=a[a.length-1])||void 0===n?void 0:n.x;if(!sP(l)||!sP(c))return null;var u=o*Math.abs(l-c),d=Math.max(...a.map(e=>e.y||0));return Dx(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(e=>e.y||0),d)),Dx(d)?r.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}function ZY(e){var{alpha:t,layout:n,points:o,baseLine:i,strokeWidth:a}=e;return"vertical"===n?r.createElement(GY,{alpha:t,points:o,baseLine:i,strokeWidth:a}):r.createElement(XY,{alpha:t,points:o,baseLine:i,strokeWidth:a})}function JY(t){var{needClip:n,clipPathId:o,props:i,previousPointsRef:a,previousBaselineRef:s}=t,{points:l,baseLine:c,isAnimationActive:u,animationBegin:d,animationDuration:f,animationEasing:p,onAnimationStart:h,onAnimationEnd:m}=i,y=aC(e.useMemo(()=>({points:l,baseLine:c}),[l,c]),"recharts-area-"),v=Aj(),[g,b]=e.useState(!1),x=!g,w=e.useCallback(()=>{"function"==typeof m&&m(),b(!1)},[m]),E=e.useCallback(()=>{"function"==typeof h&&h(),b(!0)},[h]);if(null==v)return null;var O=a.current,S=s.current;return r.createElement(YY,{showLabels:x,points:l},i.children,r.createElement(iC,{animationId:y,begin:d,duration:f,isActive:u,easing:p,onAnimationEnd:w,onAnimationStart:E,key:y},e=>{if(O){var t,d=O.length/l.length,f=1===e?l:l.map((t,n)=>{var r=Math.floor(n*d);if(O[r]){var o=O[r];return FY(FY({},t),{},{x:Bx(o.x,t.x,e),y:Bx(o.y,t.y,e)})}return t});return t=Dx(c)?Bx(S,c,e):$x(c)||Nx(c)?Bx(S,0,e):c.map((t,n)=>{var r=Math.floor(n*d);if(Array.isArray(S)&&S[r]){var o=S[r];return FY(FY({},t),{},{x:Bx(o.x,t.x,e),y:Bx(o.y,t.y,e)})}return t}),e>0&&(a.current=f,s.current=t),r.createElement(qY,{points:f,baseLine:t,needClip:n,clipPathId:o,props:i})}return e>0&&(a.current=l,s.current=c),r.createElement(tb,null,u&&r.createElement("defs",null,r.createElement("clipPath",{id:"animationClipPath-".concat(o)},r.createElement(ZY,{alpha:e,points:l,baseLine:c,layout:v,strokeWidth:i.strokeWidth}))),r.createElement(tb,{clipPath:"url(#animationClipPath-".concat(o,")")},r.createElement(qY,{points:l,baseLine:c,needClip:n,clipPathId:o,props:i})))}),r.createElement(LU,{label:i.label}))}function QY(t){var{needClip:n,clipPathId:o,props:i}=t,a=e.useRef(null),s=e.useRef();return r.createElement(JY,{needClip:n,clipPathId:o,props:i,previousPointsRef:a,previousBaselineRef:s})}class eq extends e.PureComponent{render(){var{hide:e,dot:t,points:n,className:o,top:i,left:a,needClip:s,xAxisId:l,yAxisId:c,width:u,height:d,id:f,baseLine:p,zIndex:h}=this.props;if(e)return null;var m=H("recharts-area",o),y=f,{r:v,strokeWidth:g}=tY(t),b=uW(t),x=2*v+g,w=s?"url(#clipPath-".concat(b?"":"dots-").concat(y,")"):void 0;return r.createElement(BF,{zIndex:h},r.createElement(tb,{className:m},s&&r.createElement("defs",null,r.createElement(HH,{clipPathId:y,xAxisId:l,yAxisId:c}),!b&&r.createElement("clipPath",{id:"clipPath-dots-".concat(y)},r.createElement("rect",{x:a-x/2,y:i-x/2,width:u+x,height:d+x}))),r.createElement(QY,{needClip:s,clipPathId:y,props:this.props})),r.createElement(AK,{points:n,mainColor:UY(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}),this.props.isRange&&Array.isArray(p)&&r.createElement(AK,{points:p,mainColor:UY(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}))}}var tq={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:fN.area};function nq(e){var t,{activeDot:n,animationBegin:o,animationDuration:i,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:h,xAxisId:m,yAxisId:y}=e,v=VY(e,LY),g=jj(),b=pF(),{needClip:x}=KH(m,y),w=HP(),{points:E,isRange:O,baseLine:S}=null!==(t=HE(t=>_Y(t,e.id,w)))&&void 0!==t?t:{},k=OK();if("horizontal"!==g&&"vertical"!==g||null==k)return null;if("AreaChart"!==b&&"ComposedChart"!==b)return null;var{height:P,width:j,x:A,y:T}=k;return E&&E.length?r.createElement(eq,zY({},v,{activeDot:n,animationBegin:o,animationDuration:i,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:j,left:A,top:T,xAxisId:m,yAxisId:y})):null}var rq=(e,t,n,r,o)=>{var i=null!=n?n:t;if(Dx(i))return i;var a="horizontal"===e?o: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"===i?c:"dataMax"===i||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===i?s[0]:"dataMax"===i?s[1]:s[0]};function oq(e){var t=iw(e,tq),n=HP();return r.createElement($W,{id:t.id,type:"area"},e=>r.createElement(r.Fragment,null,r.createElement(VW,{legendPayload:WY(t)}),r.createElement(KY,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),r.createElement(JW,{type:"area",id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:gP(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),r.createElement(nq,zY({},t,{id:e}))))}var iq=r.memo(oq,YA);iq.displayName="Area";var aq="production"===process.env.NODE_ENV,sq="Invariant failed";function lq(){return lq=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},lq.apply(null,arguments)}function cq(e){return r.createElement(IW,lq({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var uq=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(n,r)=>{if(Dx(e))return e;var o=Dx(n)||$x(n);return o?e(n,r):(o||function(e,t){if(aq)throw new Error(sq);var n="function"==typeof t?t():t,r=n?"".concat(sq,": ").concat(n):sq;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)}},dq=La([BL,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),fq=La([dq],e=>null==e?void 0:e.maxBarSize),pq=La([Pj,BL,kY,PY,(e,t,n)=>n],(e,t,n,r,o)=>t.filter(t=>"horizontal"===e?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===o).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),hq=La([pq,e=>e.rootProps.barSize,(e,t)=>{var n=Pj(e),r=kY(e,t),o=PY(e,t);if(null!=r&&null!=o)return"horizontal"===n?vV(e,"xAxis",r):vV(e,"yAxis",o)}],(e,t,n)=>{var r=e.filter(IN),o=e.filter(e=>null==e.stackId),i=r.reduce((e,t)=>{var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{}),a=Object.entries(i).map(e=>{var r,[o,i]=e;return{stackId:o,dataKeys:i.map(e=>e.dataKey),barSize:TK(t,n,null===(r=i[0])||void 0===r?void 0:r.barSize)}});return[...a,...o.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:TK(t,n,e.barSize)}))]}),mq=(e,t,n)=>{var r,o,i=Pj(e),a=kY(e,t),s=PY(e,t);if(null!=a&&null!=s)return"horizontal"===i?(r=OV(e,"xAxis",a,n),o=EV(e,"xAxis",a,n)):(r=OV(e,"yAxis",s,n),o=EV(e,"yAxis",s,n)),SP(r,o)},yq=La([hq,oN,e=>e.rootProps.barGap,iN,(e,t,n)=>{var r,o,i=dq(e,t);if(null==i)return 0;var a=kY(e,t),s=PY(e,t);if(null==a||null==s)return 0;var l,c,u=Pj(e),d=oN(e),{maxBarSize:f}=i,p=$x(f)?d:f;return"horizontal"===u?(l=OV(e,"xAxis",a,n),c=EV(e,"xAxis",a,n)):(l=OV(e,"yAxis",s,n),c=EV(e,"yAxis",s,n)),null!==(r=null!==(o=SP(l,c,!0))&&void 0!==o?o:p)&&void 0!==r?r:0},mq,fq],(e,t,n,r,o,i,a)=>{var s=$x(a)?t:a,l=function(e,t,n,r,o){var i,a=r.length;if(!(a<1)){var s,l=zx(e,n,0,!0),c=[];if(sP(null===(i=r[0])||void 0===i?void 0:i.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}},o=[...e,r];return p=r.position,o},c)}else{var h=zx(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 y=sP(o)?Math.min(m,o):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h+(m+l)*n+(m-y)/2,size:y}}],c)}return s}}(n,r,o!==i?o:i,e,s);return o!==i&&null!=l&&(l=l.map(e=>MK(MK({},e),{},{position:MK(MK({},e.position),{},{offset:e.position.offset-o/2})}))),l}),vq=La([yq,dq],(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}}),gq=La([(e,t,n)=>{var r=Pj(e),o=kY(e,t),i=PY(e,t);if(null!=o&&null!=i)return"horizontal"===r?uz(e,"yAxis",i,n):uz(e,"xAxis",o,n)},dq],(e,t)=>{var n=MN(t);if(e&&null!=n&&null!=t){var{stackId:r}=t;if(null!=r){var o=e[r];if(o){var{stackedData:i}=o;if(i)return i.find(e=>e.key===n)}}}}),bq=La([$P,WP,(e,t,n)=>{var r=kY(e,t);if(null!=r)return OV(e,"xAxis",r,n)},(e,t,n)=>{var r=PY(e,t);if(null!=r)return OV(e,"yAxis",r,n)},(e,t,n)=>{var r=kY(e,t);if(null!=r)return EV(e,"xAxis",r,n)},(e,t,n)=>{var r=PY(e,t);if(null!=r)return EV(e,"yAxis",r,n)},vq,Pj,hM,mq,gq,dq,(e,t,n,r)=>r],(e,t,n,r,o,i,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!=o&&null!=i&&null!=c){var y,{data:v}=d;if(null!=(y=null!=v&&v.length>0?v:null==p?void 0:p.slice(h,m+1)))return function(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:o},pos:i,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:f,offset:p,cells:h,parentViewBox:m,dataStartIndex:y}=e,v="horizontal"===t?l:s,g=d?v.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]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]})({numericAxis:v}),x=v.scale.map(b);return f.map((e,f)=>{var v,w,E,O,S,k;if(d){var P=d[f+y];if(null==P)return null;v=((e,t)=>{if(!t||2!==t.length||!Dx(t[0])||!Dx(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Dx(e[0])||e[0]<n)&&(o[0]=n),(!Dx(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o})(P,g)}else v=fP(e,n),Array.isArray(v)||(v=[b,v]);var j=uq(r,$q)(v[1],f);if("horizontal"===t){var A,T=l.scale.map(v[0]),C=l.scale.map(v[1]);if(null==T||null==C)return null;w=xP({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:e,index:f}),E=null!==(A=null!=C?C:T)&&void 0!==A?A:void 0,O=i.size;var M=T-C;if(S=Nx(M)?0:M,k={x:w,y:p.top,width:O,height:p.height},Math.abs(j)>0&&Math.abs(S)<Math.abs(j)){var N=Mx(S||j)*(Math.abs(j)-Math.abs(S));E-=N,S+=N}}else{var I=s.scale.map(v[0]),D=s.scale.map(v[1]);if(null==I||null==D)return null;if(w=I,E=xP({axis:l,ticks:u,bandSize:a,offset:i.offset,entry:e,index:f}),O=D-I,S=i.size,k={x:p.left,y:E,width:p.width,height:S},Math.abs(j)>0&&Math.abs(O)<Math.abs(j))O+=Mx(O||j)*(Math.abs(j)-Math.abs(O))}return null!=w&&null!=E&&null!=O&&null!=S&&(o||0!==O&&0!==S)?Cq(Cq({},e),{},{stackedBarStart:x,x:w,y:E,width:O,height:S,value:d?v:v[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:o,yAxisTicks:i,stackedData:u,displayedData:y,offset:e,cells:f,dataStartIndex:h})}}),xq=["index"];function wq(){return wq=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},wq.apply(null,arguments)}var Eq=e.createContext(void 0),Oq=t=>{var{index:n}=t,o=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,xq),i=(t=>{var n=e.useContext(Eq);if(null!=n){var{stackId:r}=n;return"url(#".concat(((e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t))(r,t),")")}})(n);return r.createElement(tb,wq({className:"recharts-bar-stack-layer",clipPath:i},o))},Sq=["onMouseEnter","onMouseLeave","onClick"],kq=["value","background","tooltipPosition"],Pq=["id"],jq=["onMouseEnter","onClick","onMouseLeave"];function Aq(){return Aq=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},Aq.apply(null,arguments)}function Tq(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 Cq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tq(Object(n),!0).forEach(function(t){Mq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mq(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 Nq(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Iq=e=>{var{dataKey:t,name:n,fill:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:PP(n,t),payload:e}]},Dq=r.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:o,fill:i,name:a,hide:s,unit:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:void 0,getPosition:Kx,settings:{stroke:n,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:PP(a,t),hide:s,type:c,color:i,unit:l,graphicalItemId:u}};return r.createElement(zW,{tooltipEntrySettings:d})});function _q(e){var t=HE(GB),{data:n,dataKey:o,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,u=Nq(a,Sq),d=_W(s,o,a.id),f=RW(l),p=LW(c,o,a.id);if(!i||null==n)return null;var h,m,y=qg(i);return r.createElement(BF,{zIndex:(h=i,m=fN.barBackground,h&&"object"==typeof h&&"zIndex"in h&&"number"==typeof h.zIndex&&sP(h.zIndex)?h.zIndex:m)},n.map((e,n)=>{var{value:a,background:s,tooltipPosition:l}=e,c=Nq(e,kq);if(!s)return null;var h=d(e,n),m=f(e,n),v=p(e,n),g=Cq(Cq(Cq(Cq(Cq({option:i,isActive:String(n)===t},c),{},{fill:"#eee"},s),y),nw(u,e,n)),{},{onMouseEnter:h,onMouseLeave:m,onClick:v,dataKey:o,index:n,className:"recharts-bar-background-rectangle"});return r.createElement(cq,Aq({key:"background-bar-".concat(n)},g))}))}function Rq(e){var{showLabels:t,children:n,rects:o}=e,i=null==o?void 0:o.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return Cq(Cq({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return r.createElement(DU,{value:t?i:void 0},n)}function Lq(t){var{shape:n,activeBar:o,baseProps:i,entry:a,index:s,dataKey:l}=t,c=HE(GB),u=HE(ZB),d=o&&String(a.originalDataIndex)===c&&(null==u||l===u),[f,p]=e.useState(!1),[h,m]=e.useState(!1);e.useEffect(()=>{var e;return d?(p(!0),e=requestAnimationFrame(()=>{m(!0)})):m(!1),()=>{cancelAnimationFrame(e)}},[d]);var y,v=e.useCallback(()=>{d||p(!1)},[d]),g=d&&h,b=d||f;y=d?!0===o?n:o:n;var x=r.createElement(cq,Aq({},i,{name:String(i.name)},a,{isActive:g,option:y,index:s,dataKey:l,onTransitionEnd:v}));return b?r.createElement(BF,{zIndex:fN.activeBar},r.createElement(Oq,{index:a.originalDataIndex},x)):x}function zq(e){var{shape:t,baseProps:n,entry:o,index:i,dataKey:a}=e;return r.createElement(cq,Aq({},n,{name:String(n.name)},o,{isActive:!1,option:t,index:i,dataKey:a}))}function Vq(e){var t,{data:n,props:o}=e,i=null!==(t=Yg(o))&&void 0!==t?t:{},{id:a}=i,s=Nq(i,Pq),{shape:l,dataKey:c,activeBar:u}=o,{onMouseEnter:d,onClick:f,onMouseLeave:p}=o,h=Nq(o,jq),m=_W(d,c,a),y=RW(p),v=LW(f,c,a);return n?r.createElement(r.Fragment,null,n.map((e,t)=>r.createElement(Oq,Aq({index:e.originalDataIndex,key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(t),className:"recharts-bar-rectangle"},nw(h,e,t),{onMouseEnter:m(e,t),onMouseLeave:y(e,t),onClick:v(e,t)}),u?r.createElement(Lq,{shape:l,activeBar:u,baseProps:s,entry:e,index:t,dataKey:c}):r.createElement(zq,{shape:l,baseProps:s,entry:e,index:t,dataKey:c})))):null}function Bq(t){var{props:n,previousRectanglesRef:o}=t,{data:i,layout:a,isAnimationActive:s,animationBegin:l,animationDuration:c,animationEasing:u,onAnimationEnd:d,onAnimationStart:f}=n,p=o.current,h=aC(n,"recharts-bar-"),[m,y]=e.useState(!1),v=!m,g=e.useCallback(()=>{"function"==typeof d&&d(),y(!1)},[d]),b=e.useCallback(()=>{"function"==typeof f&&f(),y(!0)},[f]);return r.createElement(Rq,{showLabels:v,rects:i},r.createElement(iC,{animationId:h,begin:l,duration:c,isActive:s,easing:u,onAnimationEnd:g,onAnimationStart:b,key:h},e=>{var t=1===e?i:null==i?void 0:i.map((t,n)=>{var r=p&&p[n];if(r)return Cq(Cq({},t),{},{x:Bx(r.x,t.x,e),y:Bx(r.y,t.y,e),width:Bx(r.width,t.width,e),height:Bx(r.height,t.height,e)});if("horizontal"===a){var o=Bx(0,t.height,e),i=Bx(t.stackedBarStart,t.y,e);return Cq(Cq({},t),{},{y:i,height:o})}var s=Bx(0,t.width,e),l=Bx(t.stackedBarStart,t.x,e);return Cq(Cq({},t),{},{width:s,x:l})});return e>0&&(o.current=null!=t?t:null),null==t?null:r.createElement(tb,null,r.createElement(Vq,{props:n,data:t}))}),r.createElement(LU,{label:n.label}),n.children)}function Fq(t){var n=e.useRef(null);return r.createElement(Bq,{previousRectanglesRef:n,props:t})}var $q=0,Uq=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:fP(e,t)}};class Wq extends e.PureComponent{render(){var{hide:e,data:t,dataKey:n,className:o,xAxisId:i,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(e||null==t)return null;var u=H("recharts-bar",o),d=c;return r.createElement(tb,{className:u,id:c},s&&r.createElement("defs",null,r.createElement(HH,{clipPathId:d,xAxisId:i,yAxisId:a})),r.createElement(tb,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},r.createElement(_q,{data:t,dataKey:n,background:l,allOtherBarProps:this.props}),r.createElement(Fq,this.props)))}}var Kq={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:$q,xAxisId:0,yAxisId:0,zIndex:fN.bar};function Hq(e){var t,{xAxisId:n,yAxisId:o,hide:i,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f}=e,{needClip:p}=KH(n,o),h=jj(),m=HP(),y=aW(e.children,k$),v=HE(t=>bq(t,e.id,m,y));if("vertical"!==h&&"horizontal"!==h)return null;var g=null==v?void 0:v[0];return t=null==g||null==g.height||null==g.width?0:"vertical"===h?g.height/2:g.width/2,r.createElement(WH,{xAxisId:n,yAxisId:o,data:v,dataPointFormatter:Uq,errorBarOffset:t},r.createElement(Wq,Aq({},e,{layout:h,needClip:p,data:v,xAxisId:n,yAxisId:o,hide:i,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f})))}function Yq(t){var n,o,i=iw(t,Kq),a=(n=i.stackId,null!=(o=e.useContext(Eq))?o.stackId:null!=n?gP(n):void 0),s=HP();return r.createElement($W,{id:i.id,type:"bar"},e=>r.createElement(r.Fragment,null,r.createElement(VW,{legendPayload:Iq(i)}),r.createElement(Dq,{dataKey:i.dataKey,stroke:i.stroke,strokeWidth:i.strokeWidth,fill:i.fill,name:i.name,hide:i.hide,unit:i.unit,tooltipType:i.tooltipType,id:e}),r.createElement(JW,{type:"bar",id:e,data:void 0,xAxisId:i.xAxisId,yAxisId:i.yAxisId,zAxisId:0,dataKey:i.dataKey,stackId:a,hide:i.hide,barSize:i.barSize,minPointSize:i.minPointSize,maxBarSize:i.maxBarSize,isPanorama:s,hasCustomShape:null!=i.shape}),r.createElement(BF,{zIndex:i.zIndex},r.createElement(Hq,Aq({},i,{id:e})))))}var qq=r.memo(Yq,YA);qq.displayName="Bar";var Gq=["option","isActive"];function Xq(){return Xq=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},Xq.apply(null,arguments)}function Zq(e){var{option:t,isActive:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Gq);return"string"==typeof t?r.createElement(IW,Xq({option:r.createElement(Qx,Xq({type:t},o)),isActive:n,shapeType:"symbols"},o)):r.createElement(IW,Xq({option:t,isActive:n,shapeType:"symbols"},o))}var Jq=La([BL,(e,t,n,r,o)=>o],(e,t)=>e.filter(e=>"scatter"===e.type).find(e=>e.id===t)),Qq=La([(e,t,n,r,o,i,a)=>pM(e,0,0,a),(e,t,n,r,o,i,a)=>OV(e,"xAxis",t,a),(e,t,n,r,o,i,a)=>EV(e,"xAxis",t,a),(e,t,n,r,o,i,a)=>OV(e,"yAxis",n,a),(e,t,n,r,o,i,a)=>EV(e,"yAxis",n,a),(e,t,n,r)=>PV(e,"zAxis",r,!1),Jq,(e,t,n,r,o,i)=>i],(e,t,n,r,o,i,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!=o&&0!==(null==n?void 0:n.length)&&0!==(null==o?void 0:o.length)))return function(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:o,scatterSettings:i,xAxisTicks:a,yAxisTicks:s,cells:l}=e,c=$x(n.dataKey)?i.dataKey:n.dataKey,u=$x(r.dataKey)?i.dataKey:r.dataKey,d=o&&o.dataKey,f=o?o.range:DL.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=fP(e,c),y=fP(e,u),v=!$x(d)&&fP(e,d)||"-",g=[{name:$x(n.dataKey)?i.name:n.name||String(n.dataKey),unit:n.unit||"",value:f,payload:e,dataKey:c,type:i.tooltipType,graphicalItemId:i.id},{name:$x(r.dataKey)?i.name:r.name||String(r.dataKey),unit:r.unit||"",value:y,payload:e,dataKey:u,type:i.tooltipType,graphicalItemId:i.id}];"-"!==v&&null!=o&&g.push({name:o.name||o.dataKey,unit:o.unit||"",value:v,payload:e,dataKey:d,type:i.tooltipType,graphicalItemId:i.id});var b=bP({axis:n,ticks:a,bandSize:h,entry:e,index:t,dataKey:c}),x=bP({axis:r,ticks:s,bandSize:m,entry:e,index:t,dataKey:u}),w="-"!==v&&null!=o?o.scale.map(v):p,E=null==w?0:Math.sqrt(Math.max(w,0)/Math.PI);return aG(aG({},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:y,z:v},tooltipPayload:g,tooltipPosition:{x:b,y:x},payload:e},l&&l[t]&&l[t].props)})}({displayedData:l,xAxis:t,yAxis:r,zAxis:i,scatterSettings:a,xAxisTicks:n,yAxisTicks:o,cells:s})}),eG=["id"],tG=["onMouseEnter","onClick","onMouseLeave"],nG=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function rG(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function oG(){return oG=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},oG.apply(null,arguments)}function iG(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 aG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iG(Object(n),!0).forEach(function(t){sG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sG(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 lG=e=>{var{dataKey:t,name:n,fill:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:PP(n,t),payload:e}]},cG=r.memo(e=>{var{dataKey:t,points:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:null==n?void 0:n.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null==n||null===(t=n[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:o,strokeWidth:i,fill:a,nameKey:void 0,dataKey:t,name:PP(s,t),hide:l,type:c,color:a,unit:"",graphicalItemId:u}};return r.createElement(zW,{tooltipEntrySettings:d})});function uG(e){var{points:t,props:n}=e,{line:o,lineType:i,lineJointType:a}=n;if(!o)return null;var s,l,c=Yg(n),u=qg(o);if("joint"===i)s=t.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"===i){var{xmin:d,xmax:f,a:p,b:h}=(e=>{for(var t=e.length,n=0,r=0,o=0,i=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,o+=l*c,i+=l*l,a=Math.min(a,l),s=Math.max(s,l)}var p=t*i!==n*n?(t*o-n*r)/(t*i-n*n):0;return{xmin:a,xmax:s,a:p,b:(r-p*n)/t}})(t),m=e=>p*e+h;s=[{x:d,y:m(d)},{x:f,y:m(f)}]}var y=aG(aG(aG({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:s});return l=r.isValidElement(o)?r.cloneElement(o,y):"function"==typeof o?o(y):r.createElement(kT,oG({},y,{type:a})),r.createElement(tb,{className:"recharts-scatter-line",key:"recharts-scatter-line"},l)}function dG(t){var{showLabels:n,points:o,children:i}=t,a=wj(),s=e.useMemo(()=>null==o?void 0:o.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 aG(aG({},r),{},{value:void 0,payload:e.payload,viewBox:r,parentViewBox:a,fill:void 0})}),[a,o]);return r.createElement(DU,{value:n?s:void 0},i)}function fG(e){var t,{points:n,allOtherScatterProps:o}=e,{shape:i,activeShape:a,dataKey:s}=o,{id:l}=o,c=rG(o,eG),u=HE(GB),{onMouseEnter:d,onClick:f,onMouseLeave:p}=o,h=rG(o,tG),m=_W(d,s,l),y=RW(p),v=LW(f,s,l);if(t=n,!(Array.isArray(t)&&t.length>0))return null;var g=Yg(c);return r.createElement(r.Fragment,null,r.createElement(uG,{points:n,props:c}),n.map((e,t)=>{var n=null!=a&&!1!==a,o=n&&u===String(t),s=n&&o?a:i,c=aG(aG(aG({},g),e),{},{index:t,[IP]:String(l)});return r.createElement(BF,{key:"symbol-".concat(null==e?void 0:e.cx,"-").concat(null==e?void 0:e.cy,"-").concat(null==e?void 0:e.size,"-").concat(t),zIndex:o?fN.activeDot:void 0},r.createElement(tb,oG({className:"recharts-scatter-symbol"},nw(h,e,t),{onMouseEnter:m(e,t),onMouseLeave:y(e,t),onClick:v(e,t)}),r.createElement(Zq,oG({option:s,isActive:o},c))))}))}function pG(t){var{previousPointsRef:n,props:o}=t,{points:i,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c}=o,u=n.current,d=aC(o,"recharts-scatter-"),[f,p]=e.useState(!1),h=e.useCallback(()=>{p(!1)},[]),m=e.useCallback(()=>{p(!0)},[]),y=!f;return r.createElement(dG,{showLabels:y,points:i},o.children,r.createElement(iC,{animationId:d,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:h,onAnimationStart:m,key:d},e=>{var t=1===e?i:null==i?void 0:i.map((t,n)=>{var r=u&&u[n];return aG(aG({},t),{},r?{cx:null==t.cx?void 0:Bx(r.cx,t.cx,e),cy:null==t.cy?void 0:Bx(r.cy,t.cy,e),size:Bx(r.size,t.size,e)}:{size:Bx(0,t.size,e)})});return e>0&&(n.current=t),r.createElement(tb,null,r.createElement(fG,{points:t,allOtherScatterProps:o,showLabels:y}))}),r.createElement(LU,{label:o.label}))}var hG=(e,t,n)=>({x:e.cx,y:e.cy,value:Number("x"===n?e.node.x:e.node.y),errorVal:fP(e,t)});function mG(t){var{hide:n,points:o,className:i,needClip:a,xAxisId:s,yAxisId:l,id:c}=t,u=e.useRef(null);if(n)return null;var d=H("recharts-scatter",i),f=c;return r.createElement(BF,{zIndex:t.zIndex},r.createElement(tb,{className:d,clipPath:a?"url(#clipPath-".concat(f,")"):void 0,id:c},a&&r.createElement("defs",null,r.createElement(HH,{clipPathId:f,xAxisId:s,yAxisId:l})),r.createElement(WH,{xAxisId:s,yAxisId:l,data:o,dataPointFormatter:hG,errorBarOffset:0},r.createElement(tb,{key:"recharts-scatter-symbols"},r.createElement(pG,{props:t,previousPointsRef:u})))))}var yG={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:fN.scatter};function vG(t){var n=iw(t,yG),{animationBegin:o,animationDuration:i,animationEasing:a,hide:s,isAnimationActive:l,legendType:c,lineJointType:u,lineType:d,shape:f,xAxisId:p,yAxisId:h,zAxisId:m}=n,y=rG(n,nG),{needClip:v}=KH(p,h),g=e.useMemo(()=>aW(t.children,k$),[t.children]),b=HP(),x=HE(e=>Qq(e,p,h,m,t.id,g,b));return null==v||null==x?null:r.createElement(r.Fragment,null,r.createElement(cG,{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}),r.createElement(mG,oG({},y,{xAxisId:p,yAxisId:h,zAxisId:m,lineType:d,lineJointType:u,legendType:c,shape:f,hide:s,isAnimationActive:l,animationBegin:o,animationDuration:i,animationEasing:a,points:x,needClip:v})))}function gG(e){var t=iw(e,yG),n=HP();return r.createElement($W,{id:t.id,type:"scatter"},e=>r.createElement(r.Fragment,null,r.createElement(VW,{legendPayload:lG(t)}),r.createElement(JW,{type:"scatter",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:n}),r.createElement(vG,oG({},t,{id:e}))))}var bG=r.memo(gG,YA);bG.displayName="Scatter";var xG=["domain","range"],wG=["domain","range"];function EG(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function OG(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 SG(e,t){if(e===t)return!0;var{domain:n,range:r}=e,o=EG(e,xG),{domain:i,range:a}=t,s=EG(t,wG);return!!OG(n,i)&&(!!OG(r,a)&&YA(o,s))}var kG=["type"],PG=["dangerouslySetInnerHTML","ticks","scale"],jG=["id","scale"];function AG(){return AG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AG.apply(null,arguments)}function TG(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 CG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TG(Object(n),!0).forEach(function(t){MG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MG(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 NG(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function IG(t){var n=$E(),r=e.useRef(null),o=Aj(),{type:i}=t,a=NG(t,kG),s=hN(o,"xAxis",i),l=e.useMemo(()=>{if(null!=s)return CG(CG({},a),{},{type:s})},[a,s]);return e.useLayoutEffect(()=>{null!=l&&(null===r.current?n(uK(l)):r.current!==l&&n(dK({prev:r.current,next:l})),r.current=l)},[l,n]),e.useLayoutEffect(()=>()=>{r.current&&(n(fK(r.current)),r.current=null)},[n]),null}var DG=e=>{var{xAxisId:t,className:n}=e,o=HE(WP),i=HP(),a="xAxis",s=HE(e=>wV(e,a,t,i)),l=HE(e=>dV(e,t)),c=HE(e=>hV(e,t)),u=HE(e=>TL(e,t));if(null==l||null==c||null==u)return null;var{dangerouslySetInnerHTML:d,ticks:f,scale:p}=e,h=NG(e,PG),{id:m,scale:y}=u,v=NG(u,jG);return r.createElement(yH,AG({},h,v,{x:c.x,y:c.y,width:l.width,height:l.height,className:H("recharts-".concat(a," ").concat(a),n),viewBox:o,ticks:s,axisType:a,axisId:t}))},_G={allowDataOverflow:AL.allowDataOverflow,allowDecimals:AL.allowDecimals,allowDuplicatedCategory:AL.allowDuplicatedCategory,angle:AL.angle,axisLine:uH.axisLine,height:AL.height,hide:!1,includeHidden:AL.includeHidden,interval:AL.interval,label:!1,minTickGap:AL.minTickGap,mirror:AL.mirror,orientation:AL.orientation,padding:AL.padding,reversed:AL.reversed,scale:AL.scale,tick:AL.tick,tickCount:AL.tickCount,tickLine:uH.tickLine,tickSize:uH.tickSize,type:AL.type,niceTicks:AL.niceTicks,xAxisId:0},RG=e=>{var t=iw(e,_G);return r.createElement(r.Fragment,null,r.createElement(IG,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),r.createElement(DG,t))},LG=r.memo(RG,SG);LG.displayName="XAxis";var zG=["type"],VG=["dangerouslySetInnerHTML","ticks","scale"],BG=["id","scale"];function FG(){return FG=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},FG.apply(null,arguments)}function $G(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 UG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$G(Object(n),!0).forEach(function(t){WG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$G(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WG(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 KG(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function HG(t){var n=$E(),r=e.useRef(null),o=Aj(),{type:i}=t,a=KG(t,zG),s=hN(o,"yAxis",i),l=e.useMemo(()=>{if(null!=s)return UG(UG({},a),{},{type:s})},[s,a]);return e.useLayoutEffect(()=>{null!=l&&(null===r.current?n(pK(l)):r.current!==l&&n(hK({prev:r.current,next:l})),r.current=l)},[l,n]),e.useLayoutEffect(()=>()=>{r.current&&(n(mK(r.current)),r.current=null)},[n]),null}function YG(t){var{yAxisId:n,className:o,width:i,label:a}=t,s=e.useRef(null),l=e.useRef(null),c=HE(WP),u=HP(),d=$E(),f="yAxis",p=HE(e=>yV(e,n)),h=HE(e=>mV(e,n)),m=HE(e=>wV(e,f,n,u)),y=HE(e=>NL(e,n));if(e.useLayoutEffect(()=>{if("auto"===i&&p&&!EU(a)&&!e.isValidElement(a)&&null!=y){var t=s.current;if(t){var r=t.getCalculatedWidth();Math.round(p.width)!==Math.round(r)&&d(bK({id:n,width:r}))}}},[m,p,d,a,n,i,y]),null==p||null==h||null==y)return null;var{dangerouslySetInnerHTML:v,ticks:g,scale:b}=t,x=KG(t,VG),{id:w,scale:E}=y,O=KG(y,BG);return r.createElement(yH,FG({},x,O,{ref:s,labelRef:l,x:h.x,y:h.y,tickTextProps:"auto"===i?{width:void 0}:{width:i},width:p.width,height:p.height,className:H("recharts-".concat(f," ").concat(f),o),viewBox:c,ticks:m,axisType:f,axisId:n}))}var qG={allowDataOverflow:ML.allowDataOverflow,allowDecimals:ML.allowDecimals,allowDuplicatedCategory:ML.allowDuplicatedCategory,angle:ML.angle,axisLine:uH.axisLine,hide:!1,includeHidden:ML.includeHidden,interval:ML.interval,label:!1,minTickGap:ML.minTickGap,mirror:ML.mirror,orientation:ML.orientation,padding:ML.padding,reversed:ML.reversed,scale:ML.scale,tick:ML.tick,tickCount:ML.tickCount,tickLine:uH.tickLine,tickSize:uH.tickSize,type:ML.type,niceTicks:ML.niceTicks,width:ML.width,yAxisId:0},GG=e=>{var t=iw(e,qG);return r.createElement(r.Fragment,null,r.createElement(HG,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),r.createElement(YG,t))},XG=r.memo(GG,SG);XG.displayName="YAxis";var ZG=La([(e,t)=>t,Pj,AN,RN,VB,WB,vF,$P],(e,t,n,r,o,i,a,s)=>{if(e&&t&&r&&o&&i)return"horizontal"===t||"vertical"===t?((e,t,n,r,o,i,a)=>{if(e&&n&&r&&o&&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=fF(s,i,o,n,r),c=((e,t,n,r)=>{var o=t.find(e=>e&&e.index===n);if(o){if("horizontal"===e)return{x:o.coordinate,y:r.relativeY};if("vertical"===e)return{x:r.relativeX,y:o.coordinate}}return{x:0,y:0}})(t,o,l,e);return{activeIndex:String(l),activeCoordinate:c}}})(e,t,r,o,i,a,s):PF(e,t,n,r,o,i,a)});function JG(e){var t,n,r,o=e.currentTarget.getBoundingClientRect();if("getBBox"in(r=e).currentTarget&&"function"==typeof r.currentTarget.getBBox){var i=e.currentTarget.getBBox();t=i.width>0?o.width/i.width:1,n=i.height>0?o.height/i.height:1}else{var a=e.currentTarget;t=a.offsetWidth>0?o.width/a.offsetWidth:1,n=a.offsetHeight>0?o.height/a.offsetHeight:1}var s=(e,r)=>({relativeX:Math.round((e-o.left)/t),relativeY:Math.round((r-o.top)/n)});return"touches"in e?Array.from(e.touches).map(e=>s(e.clientX,e.clientY)):s(e.clientX,e.clientY)}var QG=qS("mouseClick"),eX=Jk();eX.startListening({actionCreator:QG,effect:(e,t)=>{var n=e.payload,r=ZG(t.getState(),JG(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(WV({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var tX=qS("mouseMove"),nX=Jk(),rX=null,oX=null,iX=null;function aX(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}nX.startListening({actionCreator:tX,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:o,throttledEvents:i}=r.eventSettings,a="all"===i||(null==i?void 0:i.includes("mousemove"));null!==rX&&(cancelAnimationFrame(rX),rX=null),null===oX||"number"==typeof o&&a||(clearTimeout(oX),oX=null),iX=JG(n);var s=()=>{var e=t.getState(),n=MV(e,e.tooltip.settings.shared);if(!iX)return rX=null,void(oX=null);if("axis"===n){var r=ZG(e,iX);null!=(null==r?void 0:r.activeIndex)?t.dispatch(UV({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(FV())}rX=null,oX=null};a?"raf"===o?rX=requestAnimationFrame(s):"number"==typeof o&&null===oX&&(oX=setTimeout(s,o)):s()}});var sX={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},lX=xk({name:"rootProps",initialState:sX,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:sX.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}}}),cX=lX.reducer,{updateOptions:uX}=lX.actions,dX=xk({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:fX}=dX.actions,pX=dX.reducer,hX=qS("keyDown"),mX=qS("focus"),yX=qS("blur"),vX=Jk(),gX=null,bX=null,xX=null;function wX(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}})}vX.startListening({actionCreator:hX,effect:(e,t)=>{xX=e.payload,null!==gX&&(cancelAnimationFrame(gX),gX=null);var n=t.getState(),{throttleDelay:r,throttledEvents:o}=n.eventSettings,i="all"===o||o.includes("keydown");null===bX||"number"==typeof r&&i||(clearTimeout(bX),bX=null);var a=()=>{try{var e=t.getState();if(!(!1!==e.rootProps.accessibilityLayer))return;var{keyboardInteraction:n}=e.tooltip,r=xX;if("ArrowRight"!==r&&"ArrowLeft"!==r&&"Enter"!==r)return;var o=QV(n,yB(e),sz(e),_B(e)),i=null==o?-1:Number(o),a=!Number.isFinite(i)||i<0,s=WB(e),l=yB(e),c=MV(e,e.tooltip.settings.shared);if("Enter"===r){if(a)return;var u=wF(e,c,"hover",String(n.index));return void t.dispatch(HV({active:!n.active,activeIndex:n.index,activeCoordinate:u}))}var d,f="left-to-right"===jV(e)?1:-1,p="ArrowRight"===r?1:-1;if(a){var h=sz(e),m=_B(e),y=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(d=-1,p*f>0){for(var v=0;v<l.length;v++)if(null!=QV(y(v),l,h,m)){d=v;break}}else for(var g=l.length-1;g>=0;g--)if(null!=QV(y(g),l,h,m)){d=g;break}if(d<0)return}else{d=i+p*f;var b=(null==s?void 0:s.length)||l.length;if(0===b||d>=b||d<0)return}var x=wF(e,c,"hover",String(d));t.dispatch(HV({active:!0,activeIndex:d.toString(),activeCoordinate:x}))}finally{gX=null,bX=null}};i?"raf"===r?gX=requestAnimationFrame(a):"number"==typeof r&&null===bX&&(a(),xX=null,bX=setTimeout(()=>{xX?a():(bX=null,gX=null)},r)):a()}}),vX.startListening({actionCreator:mX,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var o=MV(n,n.tooltip.settings.shared),i=wF(n,o,"hover",String("0"));t.dispatch(HV({active:!0,activeIndex:"0",activeCoordinate:i}))}}}}),vX.startListening({actionCreator:yX,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;r.active&&t.dispatch(HV({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});var EX=qS("externalEvent"),OX=Jk(),SX=new Map,kX=new Map,PX=new Map;OX.startListening({actionCreator:EX,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(null!=n){var o=r.type,i=wX(r);PX.set(o,{handler:n,reactEvent:i});var a=SX.get(o);void 0!==a&&(cancelAnimationFrame(a),SX.delete(o));var s=t.getState(),{throttleDelay:l,throttledEvents:c}=s.eventSettings,u=c,d="all"===u||(null==u?void 0:u.includes(o)),f=kX.get(o);void 0===f||"number"==typeof l&&d||(clearTimeout(f),kX.delete(o));var p=()=>{var e=PX.get(o);try{if(!e)return;var{handler:n,reactEvent:r}=e,i=t.getState(),a={activeCoordinate:tF(i),activeDataKey:ZB(i),activeIndex:GB(i),activeLabel:XB(i),activeTooltipIndex:GB(i),isTooltipActive:nF(i)};n&&n(a,r)}finally{SX.delete(o),kX.delete(o),PX.delete(o)}};if(d)if("raf"===l){var h=requestAnimationFrame(p);SX.set(o,h)}else if("number"==typeof l){if(!kX.has(o)){p();var m=setTimeout(p,l);kX.set(o,m)}}else p();else p()}}});var jX=La([rB],e=>e.tooltipItemPayloads),AX=La([jX,(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:o}=r;if(null!=o)return o(t)}}}),TX=qS("touchMove"),CX=Jk(),MX=null,NX=null,IX=null,DX=null;CX.startListening({actionCreator:TX,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){DX=wX(n);var r=t.getState(),{throttleDelay:o,throttledEvents:i}=r.eventSettings,a="all"===i||i.includes("touchmove");null!==MX&&(cancelAnimationFrame(MX),MX=null),null===NX||"number"==typeof o&&a||(clearTimeout(NX),NX=null),IX=Array.from(n.touches).map(e=>JG({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(null!=DX){var e=t.getState(),n=MV(e,e.tooltip.settings.shared);if("axis"===n){var r,o=null===(r=IX)||void 0===r?void 0:r[0];if(null==o)return MX=null,void(NX=null);var i=ZG(e,o);null!=(null==i?void 0:i.activeIndex)&&t.dispatch(UV({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if("item"===n){var a,s=DX.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(IP))&&void 0!==a?a:void 0,d=fB(e).find(e=>e.id===u);if(null==c||null==d||null==u)return;var{dataKey:f}=d,p=AX(e,c,u);t.dispatch(VV({activeDataKey:f,activeIndex:c,activeCoordinate:p,activeGraphicalItemId:u}))}MX=null,NX=null}};a?"raf"===o?MX=requestAnimationFrame(s):"number"==typeof o&&null===NX&&(s(),DX=null,NX=setTimeout(()=>{DX?s():(NX=null,MX=null)},o)):s()}}});var _X={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},RX=xk({name:"eventSettings",initialState:_X,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:LX}=RX.actions,zX=AO({brush:LK,cartesianAxis:xK,chartData:u$,errorBars:BH,eventSettings:RX.reducer,graphicalItems:XW,layout:iP,legend:AA,options:r$,polarAxis:KU,polarOptions:pX,referenceElements:KK,renderedTicks:oH,rootProps:cX,tooltip:YV,zIndex:VF});function VX(t){var{preloadedState:n,children:o,reduxStoreName:i}=t,a=HP(),s=e.useRef(null);if(a)return o;null==s.current&&(s.current=function(e){return pk({reducer:zX,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([eX.middleware,nX.middleware,vX.middleware,OX.middleware,CX.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(fk({type:"raf"}))},devTools:{serialize:{replacer:aX},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(n,i));var l=BE;return r.createElement(WA,{context:l,store:s.current},o)}function BX(t){var{layout:n,margin:r}=t,o=$E(),i=HP();return e.useEffect(()=>{i||(o(nP(n)),o(tP(r)))},[o,i,n,r]),null}var FX=e.memo(BX,YA);function $X(t){var n=$E();return e.useEffect(()=>{n(uX(t))},[n,t]),null}var UX=t=>{var n=$E();return e.useEffect(()=>{n(LX(t))},[n,t]),null},WX=e.memo(UX,YA);function KX(t){var{zIndex:n,isPanorama:o}=t,i=e.useRef(null),a=$E();return e.useLayoutEffect(()=>(i.current&&a(LF({zIndex:n,element:i.current,isPanorama:o})),()=>{a(zF({zIndex:n,isPanorama:o}))}),[a,n,o]),r.createElement("g",{tabIndex:-1,ref:i,className:"recharts-zIndex-layer_".concat(n)})}function HX(e){var{children:t,isPanorama:n}=e,o=HE(AF);if(!o||0===o.length)return t;var i=o.filter(e=>e<0),a=o.filter(e=>e>0);return r.createElement(r.Fragment,null,i.map(e=>r.createElement(KX,{key:e,zIndex:e,isPanorama:n})),t,a.map(e=>r.createElement(KX,{key:e,zIndex:e,isPanorama:n})))}var YX=["children"];function qX(){return qX=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},qX.apply(null,arguments)}var GX={width:"100%",height:"100%",display:"block"},XX=e.forwardRef((e,t)=>{var n=Sj(),o=kj(),i=pT();if(!lP(n)||!lP(o))return null;var a,s,{children:l,otherAttributes:c,title:u,desc:d}=e;return null!=c&&(a="number"==typeof c.tabIndex?c.tabIndex:i?0:void 0,s="string"==typeof c.role?c.role:i?"application":void 0),r.createElement(Jg,qX({},c,{title:u,desc:d,role:s,tabIndex:a,width:n,height:o,style:GX,ref:t}),l)}),ZX=e=>{var{children:t}=e,n=HE(qP);if(!n)return null;var{width:o,height:i,y:a,x:s}=n;return r.createElement(Jg,{width:o,height:i,x:s,y:a},t)},JX=e.forwardRef((e,t)=>{var{children:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,YX);return HP()?r.createElement(ZX,null,r.createElement(HX,{isPanorama:!0},n)):r.createElement(XX,qX({ref:t},o),r.createElement(HX,{isPanorama:!1},n))});function QX(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 eZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QX(Object(n),!0).forEach(function(t){tZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tZ(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 nZ(){return nZ=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},nZ.apply(null,arguments)}var rZ=()=>(y$(),null);function oZ(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var iZ=e.forwardRef((t,n)=>{var o,i,a=e.useRef(null),[s,l]=e.useState({containerWidth:oZ(null===(o=t.style)||void 0===o?void 0:o.width),containerHeight:oZ(null===(i=t.style)||void 0===i?void 0:i.height)}),c=e.useCallback((e,t)=>{l(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]),u=e.useCallback(e=>{if("function"==typeof n&&n(e),null!=a.current&&(a.current.disconnect(),a.current=null),null!=e&&"undefined"!=typeof ResizeObserver){var{width:t,height:r}=e.getBoundingClientRect();c(t,r);var o=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:n,height:r}=t.contentRect;c(n,r)}});o.observe(e),a.current=o}},[n,c]);return e.useEffect(()=>()=>{var e=a.current;null!=e&&e.disconnect()},[c]),r.createElement(r.Fragment,null,r.createElement(Cj,{width:s.containerWidth,height:s.containerHeight}),r.createElement("div",nZ({ref:u},t)))}),aZ=e.forwardRef((t,n)=>{var{width:o,height:i}=t,[a,s]=e.useState({containerWidth:oZ(o),containerHeight:oZ(i)}),l=e.useCallback((e,t)=>{s(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]),c=e.useCallback(e=>{if("function"==typeof n&&n(e),null!=e){var{width:t,height:r}=e.getBoundingClientRect();l(t,r)}},[n,l]);return r.createElement(r.Fragment,null,r.createElement(Cj,{width:a.containerWidth,height:a.containerHeight}),r.createElement("div",nZ({ref:c},t)))}),sZ=e.forwardRef((e,t)=>{var{width:n,height:o}=e;return r.createElement(r.Fragment,null,r.createElement(Cj,{width:n,height:o}),r.createElement("div",nZ({ref:t},e)))}),lZ=e.forwardRef((e,t)=>{var{width:n,height:o}=e;return"string"==typeof n||"string"==typeof o?r.createElement(aZ,nZ({},e,{ref:t})):"number"==typeof n&&"number"==typeof o?r.createElement(sZ,nZ({},e,{width:n,height:o,ref:t})):r.createElement(r.Fragment,null,r.createElement(Cj,{width:n,height:o}),r.createElement("div",nZ({ref:t},e)))});var cZ=e.forwardRef((t,n)=>{var{children:o,className:i,height:a,onClick:s,onContextMenu:l,onDoubleClick:c,onMouseDown:u,onMouseEnter:d,onMouseLeave:f,onMouseMove:p,onMouseUp:h,onTouchEnd:m,onTouchMove:y,onTouchStart:v,style:g,width:b,responsive:x,dispatchTouchEvents:w=!0}=t,E=e.useRef(null),O=$E(),[S,k]=e.useState(null),[P,j]=e.useState(null),A=function(){var t=$E(),[n,r]=e.useState(null),o=HE(TP);return e.useEffect(()=>{if(null!=n){var e=n.getBoundingClientRect().width/n.offsetWidth;sP(e)&&e!==o&&t(oP(e))}},[n,t,o]),r}(),T=vj(),C=(null==T?void 0:T.width)>0?T.width:b,M=(null==T?void 0:T.height)>0?T.height:a,N=e.useCallback(e=>{A(e),"function"==typeof n&&n(e),k(e),j(e),null!=e&&(E.current=e)},[A,n,k,j]),I=e.useCallback(e=>{O(QG(e)),O(EX({handler:s,reactEvent:e}))},[O,s]),D=e.useCallback(e=>{O(tX(e)),O(EX({handler:d,reactEvent:e}))},[O,d]),_=e.useCallback(e=>{O(FV()),O(EX({handler:f,reactEvent:e}))},[O,f]),R=e.useCallback(e=>{O(tX(e)),O(EX({handler:p,reactEvent:e}))},[O,p]),L=e.useCallback(()=>{O(mX())},[O]),z=e.useCallback(()=>{O(yX())},[O]),V=e.useCallback(e=>{O(hX(e.key))},[O]),B=e.useCallback(e=>{O(EX({handler:l,reactEvent:e}))},[O,l]),F=e.useCallback(e=>{O(EX({handler:c,reactEvent:e}))},[O,c]),$=e.useCallback(e=>{O(EX({handler:u,reactEvent:e}))},[O,u]),U=e.useCallback(e=>{O(EX({handler:h,reactEvent:e}))},[O,h]),W=e.useCallback(e=>{O(EX({handler:v,reactEvent:e}))},[O,v]),K=e.useCallback(e=>{w&&O(TX(e)),O(EX({handler:y,reactEvent:e}))},[O,w,y]),Y=e.useCallback(e=>{O(EX({handler:m,reactEvent:e}))},[O,m]),q=function(e){return e?iZ:lZ}(x);return r.createElement(GF.Provider,{value:S},r.createElement(nb.Provider,{value:P},r.createElement(q,{width:null!=C?C:null==g?void 0:g.width,height:null!=M?M:null==g?void 0:g.height,className:H("recharts-wrapper",i),style:eZ({position:"relative",cursor:"default",width:C,height:M},g),onClick:I,onContextMenu:B,onDoubleClick:F,onFocus:L,onBlur:z,onKeyDown:V,onMouseDown:$,onMouseEnter:D,onMouseLeave:_,onMouseMove:R,onMouseUp:U,onTouchEnd:Y,onTouchMove:K,onTouchStart:W,ref:N},r.createElement(rZ,null),o)))}),uZ=["width","height","responsive","children","className","style","compact","title","desc"];var dZ=e.forwardRef((e,t)=>{var{width:n,height:o,responsive:i,children:a,className:s,style:l,compact:c,title:u,desc:d}=e,f=function(e,t){if(null==e)return{};var n,r,o=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 i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,uZ),p=Yg(f);return c?r.createElement(r.Fragment,null,r.createElement(Cj,{width:n,height:o}),r.createElement(JX,{otherAttributes:p,title:u,desc:d},a)):r.createElement(cZ,{className:s,style:l,width:n,height:o,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},r.createElement(JX,{otherAttributes:p,title:u,desc:d,ref:t},r.createElement(YK,null,a)))});function fZ(){return fZ=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},fZ.apply(null,arguments)}function pZ(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 hZ(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 mZ=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pZ(Object(n),!0).forEach(function(t){hZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pZ(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"},_X),yZ=e.forwardRef(function(e,t){var n,o=iw(e.categoricalChartProps,mZ),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=e,u={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return r.createElement(VX,{preloadedState:{options:u},reduxStoreName:null!==(n=c.id)&&void 0!==n?n:i},r.createElement(IK,{chartData:c.data}),r.createElement(FX,{layout:o.layout,margin:o.margin}),r.createElement(WX,{throttleDelay:o.throttleDelay,throttledEvents:o.throttledEvents}),r.createElement($X,{baseValue:o.baseValue,accessibilityLayer:o.accessibilityLayer,barCategoryGap:o.barCategoryGap,maxBarSize:o.maxBarSize,stackOffset:o.stackOffset,barGap:o.barGap,barSize:o.barSize,syncId:o.syncId,syncMethod:o.syncMethod,className:o.className,reverseStackOrder:o.reverseStackOrder}),r.createElement(dZ,fZ({},o,{ref:t})))}),vZ=["axis"],gZ=e.forwardRef((e,t)=>r.createElement(yZ,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:vZ,tooltipPayloadSearcher:t$,categoricalChartProps:e,ref:t})),bZ=["axis","item"],xZ=e.forwardRef((e,t)=>r.createElement(yZ,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:bZ,tooltipPayloadSearcher:t$,categoricalChartProps:e,ref:t})),wZ=["item"],EZ=e.forwardRef((e,t)=>r.createElement(yZ,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:wZ,tooltipPayloadSearcher:t$,categoricalChartProps:e,ref:t})),OZ=["axis"],SZ=e.forwardRef((e,t)=>r.createElement(yZ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:OZ,tooltipPayloadSearcher:t$,categoricalChartProps:e,ref:t}));function kZ({className:e}){const[t,n]=r.useState(()=>{if("undefined"!=typeof window){const e=localStorage.getItem("bmj-ui-theme");return"light"===e||"dark"===e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return"light"});r.useEffect(()=>{const e=window.document.documentElement;e.classList.remove("light","dark"),e.classList.add(t),localStorage.setItem("bmj-ui-theme",t)},[t]);return p.jsx(en,{variant:"ghost",size:"icon",onClick:()=>{n(e=>"light"===e?"dark":"light")},className:e,"aria-label":"Toggle theme",children:"light"===t?p.jsx(Rl,{className:"w-5 h-5 transition-all"}):p.jsx(Fl,{className:"w-5 h-5 transition-all"})})}Array(12).fill(0);let PZ=1;const jZ=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,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:PZ++,i=this.toasts.find(e=>e.id===o),a=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:a,title:n}):t):this.addToast({title:n,...r,dismissible:a,id:o}),o},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=(t,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let i,a=void 0!==r;const s=o.then(async t=>{i=["resolve",t];if(e.isValidElement(t))a=!1,this.create({id:r,type:"default",message:t});else if(AZ(t)&&!t.ok){a=!1;const o="function"==typeof n.error?await n.error(`HTTP error! status: ${t.status}`):n.error,i="function"==typeof n.description?await n.description(`HTTP error! status: ${t.status}`):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:i,...s})}else if(t instanceof Error){a=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:i,...s})}else if(void 0!==n.success){a=!1;const o="function"==typeof n.success?await n.success(t):n.success,i="function"==typeof n.description?await n.description(t):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"success",description:i,...s})}}).catch(async t=>{if(i=["reject",t],void 0!==n.error){a=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:i,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),null==n.finally||n.finally.call(n)}),l=()=>new Promise((e,t)=>s.then(()=>"reject"===i[0]?t(i[1]):e(i[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)||PZ++;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}},AZ=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,TZ=(e,t)=>{const n=(null==t?void 0:t.id)||PZ++;return jZ.addToast({title:e,...t,id:n}),n},CZ=Object.assign(TZ,{success:jZ.success,info:jZ.info,warning:jZ.warning,error:jZ.error,custom:jZ.custom,message:jZ.message,promise:jZ.promise,dismiss:jZ.dismiss,loading:jZ.loading},{getHistory:()=>jZ.toasts,getToasts:()=>jZ.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 MZ=r.createContext(void 0);function NZ(e){const t=r.useContext(MZ);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.":k(33));return t}"production"!==process.env.NODE_ENV&&(MZ.displayName="MenuPositionerContext");const IZ=r.createContext(void 0);function DZ(e){const t=r.useContext(IZ);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.":k(36));return t}"production"!==process.env.NODE_ENV&&(IZ.displayName="MenuRootContext");const _Z=r.createContext(void 0);function RZ(e=!0){const t=r.useContext(_Z);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.":k(25));return t}"production"!==process.env.NODE_ENV&&(_Z.displayName="ContextMenuRootContext");const LZ={type:"regular-item"};function zZ(e){const{closeOnClick:t,disabled:n=!1,highlighted:o,id:i,store:a,typingRef:s=a.context.typingRef,nativeButton:l,itemMetadata:c,nodeId:u}=e,d=r.useRef(null),{getButtonProps:f,buttonRef:p}=Xt({disabled:n,focusableWhenDisabled:!0,native:l,composite:!0}),h=function(e){const{closeOnClick:t,highlighted:n,id:o,nodeId:i,store:a,typingRef:s,itemRef:l,itemMetadata:c}=e,{events:u}=a.useState("floatingTreeRoot"),d=RZ(!0),f=void 0!==d;return r.useMemo(()=>({id:o,role:"menuitem",tabIndex:n?0:-1,onKeyDown(e){" "===e.key&&s?.current&&e.preventDefault()},onMouseMove(e){i&&u.emit("itemhover",{nodeId:i,target:e.currentTarget})},onClick(e){t&&u.emit("close",{domEvent:e,reason:Po})},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&&!Tn&&2===e.button)return}!l.current||!a.context.allowMouseUpTriggerRef.current||f&&2!==e.button||c&&"regular-item"!==c.type||l.current.click()}}),[t,n,o,u,i,a,s,l,d,f,c])}({closeOnClick:t,highlighted:o,id:i,nodeId:u,store:a,typingRef:s,itemRef:d,itemMetadata:c}),m=r.useCallback(e=>v(h,{onMouseEnter(){"submenu-trigger"===c.type&&c.setActive()}},e,f),[h,f,c]),y=A(d,p);return r.useMemo(()=>({getItemProps:m,itemRef:y}),[m,y])}const VZ=r.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});"production"!==process.env.NODE_ENV&&(VZ.displayName="CompositeListContext");let BZ=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function FZ(e={}){const{label:t,metadata:n,textRef:o,indexGuessBehavior:i,index:a}=e,{register:s,unregister:l,subscribeMapChange:c,elementsRef:u,labelsRef:d,nextIndexRef:f}=r.useContext(VZ),p=r.useRef(-1),[h,m]=r.useState(a??(i===BZ.GuessFromOrder?()=>{if(-1===p.current){const e=f.current;f.current+=1,p.current=e}return p.current}:-1)),y=r.useRef(null),v=r.useCallback(e=>{if(y.current=e,-1!==h&&null!==e&&(u.current[h]=e,d)){const n=void 0!==t;d.current[h]=n?t:o?.current?.textContent??e.textContent}},[h,u,d,t,o]);return Yt(()=>{if(null!=a)return;const e=y.current;return e?(s(e,n),()=>{l(e)}):void 0},[a,s,l,n]),Yt(()=>{if(null==a)return c(e=>{const t=y.current?e.get(y.current)?.index:null;null!=t&&m(t)})},[a,c,m]),r.useMemo(()=>({ref:v,index:h}),[h,v])}const $Z=r.createContext(void 0);"production"!==process.env.NODE_ENV&&($Z.displayName="MenuGroupContext");const UZ=r.forwardRef(function(e,t){const{render:n,className:o,...i}=e,[a,s]=r.useState(void 0),l=r.useMemo(()=>({setLabelId:s}),[s]),c=$("div",e,{ref:t,props:{role:"group","aria-labelledby":a,...i}});return p.jsx($Z.Provider,{value:l,children:c})});"production"!==process.env.NODE_ENV&&(UZ.displayName="MenuGroup");const WZ=r.forwardRef(function(e,t){const{className:n,render:o,id:i,...a}=e,s=fn(i),{setLabelId:l}=function(){const e=r.useContext($Z);if(void 0===e)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 e}();return Yt(()=>(l(s),()=>{l(void 0)}),[l,s]),$("div",e,{ref:t,props:{id:s,role:"presentation",...a}})});"production"!==process.env.NODE_ENV&&(WZ.displayName="MenuGroupLabel");const KZ=r.forwardRef(function(e,t){const{render:n,className:r,id:o,label:i,nativeButton:a=!1,disabled:s=!1,closeOnClick:l=!0,...c}=e,u=FZ({label:i}),d=NZ(!0),f=fn(o),{store:p}=DZ(),h=p.useState("isActive",u.index),m=p.useState("itemProps"),{getItemProps:y,itemRef:v}=zZ({closeOnClick:l,disabled:s,highlighted:h,id:f,store:p,nativeButton:a,nodeId:d?.nodeId,itemMetadata:LZ});return $("div",e,{state:{disabled:s,highlighted:h},props:[m,c,y],ref:[v,t,u.ref]})});"production"!==process.env.NODE_ENV&&(KZ.displayName="MenuItem");const HZ=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(HZ.displayName="ToolbarRootContext");const YZ={...qo,...vo},qZ=r.forwardRef(function(e,t){const{render:n,className:o,finalFocus:i,...a}=e,{store:s}=DZ(),{side:l,align:c}=NZ(),u=null!=r.useContext(HZ),d=s.useState("open"),f=s.useState("transitionStatus"),h=s.useState("popupProps"),m=s.useState("mounted"),y=s.useState("instantType"),v=s.useState("activeTriggerElement"),g=s.useState("parent"),b=s.useState("lastOpenChangeReason"),x=s.useState("rootId"),w=s.useState("floatingRootContext"),E=s.useState("floatingTreeRoot"),O=s.useState("closeDelay"),S=s.useState("activeTriggerElement"),k="context-menu"===g.type;bo({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),r.useEffect(()=>{function e(e){s.setOpen(!1,No(e.reason,e.domEvent))}return E.events.on("close",e),()=>{E.events.off("close",e)}},[E.events,s]);const P=s.useState("hoverEnabled"),j=s.useState("disabled");As(w,{enabled:P&&!j&&!k&&"menubar"!==g.type,closeDelay:O});const A={transitionStatus:f,side:l,align:c,open:d,nested:"menu"===g.type,instant:y},T=r.useCallback(e=>{s.set("popupElement",e)},[s]),C=$("div",e,{state:A,ref:[t,s.context.popupRef,T],stateAttributesMapping:YZ,props:[h,{onKeyDown(e){u&&rl.has(e.key)&&e.stopPropagation()}},kc(f),a,{"data-rootownerid":x}]});let M=void 0===g.type||k;return(v||"menubar"===g.type&&b!==ko)&&(M=!0),p.jsx(Vi,{context:w,modal:k,disabled:!m,returnFocus:void 0===i?M:i,initialFocus:"menu"!==g.type,restoreFocus:!0,externalTree:"menubar"!==g.type?E:void 0,previousFocusableElement:S,nextFocusableElement:void 0===g.type?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===g.type?s.context.beforeContentFocusGuardRef:void 0,children:C})});"production"!==process.env.NODE_ENV&&(qZ.displayName="MenuPopup");const GZ=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(GZ.displayName="MenuPortalContext");const XZ=r.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=DZ();return o.useState("mounted")||n?p.jsx(GZ.Provider,{value:n,children:p.jsx(ki,{ref:t,...r})}):null});function ZZ(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:i}=e,a=Ft(i),s=r.useRef(0),l=j(QZ).current,c=j(JZ).current,[u,d]=r.useState(0),f=r.useRef(u),h=Ft((e,t)=>{c.set(e,t??null),f.current+=1,d(f.current)}),m=Ft(e=>{c.delete(e),f.current+=1,d(f.current)}),y=r.useMemo(()=>{const e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(eJ).forEach((t,n)=>{const r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,u]);Yt(()=>{if("function"!=typeof MutationObserver||0===y.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 y.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[y]),Yt(()=>{f.current===u&&(n.current.length!==y.size&&(n.current.length=y.size),o&&o.current.length!==y.size&&(o.current.length=y.size),s.current=y.size),a(y)},[a,y,n,o,u]),Yt(()=>()=>{n.current=[]},[n]),Yt(()=>()=>{o&&(o.current=[])},[o]);const v=Ft(e=>(l.add(e),()=>{l.delete(e)}));Yt(()=>{l.forEach(e=>e(y))},[l,y]);const g=r.useMemo(()=>({register:h,unregister:m,subscribeMapChange:v,elementsRef:n,labelsRef:o,nextIndexRef:s}),[h,m,v,n,o,s]);return p.jsx(VZ.Provider,{value:g,children:t})}function JZ(){return new Map}function QZ(){return new Set}function eJ(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&&(XZ.displayName="MenuPortal");const tJ=r.forwardRef(function(e,t){const{anchor:n,positionMethod:o="absolute",className:i,render:a,side:s,align:l,sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:y=!1,collisionAvoidance:v=V,...g}=e,{store:b}=DZ(),x=function(){const e=r.useContext(GZ);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Menu.Portal> is missing.":k(32));return e}(),w=RZ(!0),E=b.useState("parent"),O=b.useState("floatingRootContext"),S=b.useState("floatingTreeRoot"),P=b.useState("mounted"),j=b.useState("open"),A=b.useState("modal"),T=b.useState("activeTriggerElement"),C=b.useState("transitionStatus"),M=b.useState("positionerElement"),N=b.useState("instantType"),I=b.useState("hasViewport"),D=b.useState("lastOpenChangeReason"),_=b.useState("floatingNodeId"),R=b.useState("floatingParentNodeId"),L=O.useState("domReferenceElement"),z=r.useRef(null),F=go(M,!1,!1);let U=n,W=c,K=u,H=l,Y=v;"context-menu"===E.type&&(U=n??E.context?.anchor,H=H??"start",s||"center"===H||(K=e.alignOffset??2,W=e.sideOffset??-5));let q=s,G=H;"menu"===E.type?(q=q??"inline-end",G=G??"start",Y=e.collisionAvoidance??B):"menubar"===E.type&&(q=q??"bottom",G=G??"start");const X="context-menu"===E.type,Z=Oc({anchor:U,floatingRootContext:O,positionMethod:w?"fixed":o,mounted:P,side:q,sideOffset:W,align:G,alignOffset:K,arrowPadding:X?0:h,collisionBoundary:d,collisionPadding:f,sticky:m,nodeId:_,keepMounted:x,disableAnchorTracking:y,collisionAvoidance:Y,shiftCrossAxis:X&&!("side"in Y&&"flip"===Y.side),externalTree:S,adaptiveOrigin:I?xc:void 0}),J=r.useMemo(()=>{const e={};return j||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...Z.positionerStyles,...e}}},[j,P,Z.positionerStyles]);r.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===_&&b.set("hoverEnabled",!1),e.nodeId!==_&&e.parentNodeId===b.select("floatingParentNodeId")&&b.setOpen(!1,No(Co)))}return S.events.on("menuopenchange",e),()=>{S.events.off("menuopenchange",e)}},[b,S.events,_]),r.useEffect(()=>{if(null!=b.select("floatingParentNodeId"))return S.events.on("menuopenchange",e),()=>{S.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==b.select("floatingParentNodeId"))return;const t=e.reason??Co;b.setOpen(!1,No(t))}},[S.events,b]);const Q=gn();r.useEffect(()=>{j||Q.clear()},[j,Q]),r.useEffect(()=>{function e(e){if(j&&e.nodeId===b.select("floatingParentNodeId"))if(e.target&&T&&T!==e.target){const e=b.select("closeDelay");e>0?Q.isStarted()||Q.start(e,()=>{b.setOpen(!1,No(Co))}):b.setOpen(!1,No(Co))}else Q.clear()}return S.events.on("itemhover",e),()=>{S.events.off("itemhover",e)}},[S.events,j,T,b,Q]),r.useEffect(()=>{const e={open:j,nodeId:_,parentNodeId:R,reason:b.select("lastOpenChangeReason")};S.events.emit("menuopenchange",e)},[S.events,j,b,_,R]),Yt(()=>{const e=L,t=z.current;if(e&&(z.current=e),t&&e&&e!==t){b.set("instantType",void 0);const e=new AbortController;return F(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[L,F,b]);const ee={open:j,side:Z.side,align:Z.align,anchorHidden:Z.anchorHidden,nested:"menu"===E.type,instant:N},te=r.useMemo(()=>({side:Z.side,align:Z.align,arrowRef:Z.arrowRef,arrowUncentered:Z.arrowUncentered,arrowStyles:Z.arrowStyles,nodeId:Z.context.nodeId}),[Z.side,Z.align,Z.arrowRef,Z.arrowUncentered,Z.arrowStyles,Z.context.nodeId]),ne=$("div",e,{state:ee,stateAttributesMapping:qo,ref:[t,b.useStateSetter("positionerElement")],props:[J,kc(C),g]}),re=P&&"menu"!==E.type&&("menubar"!==E.type&&A&&D!==Oo||"menubar"===E.type&&E.context.modal);let oe=null;return"menubar"===E.type?oe=E.context.contentElement:void 0===E.type&&(oe=T),p.jsxs(MZ.Provider,{value:te,children:[re&&p.jsx(sl,{ref:"context-menu"===E.type||"nested-context-menu"===E.type?E.context.internalBackdropRef:null,inert:al(!j),cutout:oe}),p.jsx(Ii,{id:_,children:p.jsx(ZZ,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:ne})})]})});"production"!==process.env.NODE_ENV&&(tJ.displayName="MenuPositioner");const nJ=r.createContext(null);function rJ(e){return r.useContext(nJ)}"production"!==process.env.NODE_ENV&&(nJ.displayName="MenubarContext");const oJ={...bs,disabled:Va(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:Va(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),allowMouseEnter:Va(e=>e.allowMouseEnter),stickIfOpen:Va(e=>e.stickIfOpen),parent:Va(e=>e.parent),rootId:Va(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:Va(e=>e.activeIndex),isActive:Va((e,t)=>e.activeIndex===t),hoverEnabled:Va(e=>e.hoverEnabled),instantType:Va(e=>e.instantType),lastOpenChangeReason:Va(e=>e.openChangeReason),floatingTreeRoot:Va(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:Va(e=>e.floatingNodeId),floatingParentNodeId:Va(e=>e.floatingParentNodeId),itemProps:Va(e=>e.itemProps),closeDelay:Va(e=>e.closeDelay),hasViewport:Va(e=>e.hasViewport),keyboardEventRelay:Va(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class iJ extends us{constructor(e){super({...{...vs(),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 ji,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:L,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...e},{positionerRef:r.createRef(),popupRef:r.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),onOpenChangeComplete:void 0,triggerElements:new ys},oJ),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 o=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),a=e.store.select("keyboardEventRelay");t===o&&n===i&&r===a||(t=o,n=i,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=j(()=>new iJ(t)).current;return e??n}unsubscribeParentListener=null}const aJ=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(aJ.displayName="MenuSubmenuRootContext");const sJ=rs(function(e){const{children:t,open:n,onOpenChange:o,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:s=!1,modal:l,loopFocus:c=!0,orientation:u="vertical",actionsRef:d,closeParentOnEsc:f=!1,handle:h,triggerId:m,defaultTriggerId:y=null,highlightItemOnHover:g=!0}=e,b=RZ(!0),x=DZ(!0),w=rJ(),E=r.useContext(aJ),O=r.useMemo(()=>E&&x?{type:"menu",store:x.store}:w?{type:"menubar",context:w}:b&&!x?{type:"context-menu",context:b}:{type:void 0},[b,x,w,E]),S=iJ.useStore(h?.store,{open:a,openProp:n,activeTriggerId:y,triggerIdProp:m,parent:O});cl(()=>{void 0===n&&!1===S.state.open&&!0===a&&S.update({open:!0,activeTriggerId:y})}),S.useControlledProp("openProp",n),S.useControlledProp("triggerIdProp",m),S.useContextCallback("onOpenChangeComplete",i);const k=S.useState("floatingTreeRoot"),P=Ni(k),j=Ci();Yt(()=>{b&&!x?S.update({parent:{type:"context-menu",context:b},floatingNodeId:P,floatingParentNodeId:j}):x&&S.update({floatingNodeId:P,floatingParentNodeId:j})},[b,x,P,j,S]);const A=S.useState("open"),T=S.useState("activeTriggerElement"),C=S.useState("positionerElement"),M=S.useState("hoverEnabled"),N=S.useState("modal"),I=S.useState("disabled"),D=S.useState("lastOpenChangeReason"),_=S.useState("parent"),L=S.useState("activeIndex"),z=S.useState("payload"),V=S.useState("floatingParentNodeId"),B=r.useRef(null),F=null!=V;let $;"production"!==process.env.NODE_ENV&&void 0!==_.type&&void 0!==l&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."),S.useSyncedValues({disabled:s,modal:void 0===_.type?l:void 0,rootId:dn()});const{openMethod:U,triggerProps:W}=yl(A);hs(S);const{forceUnmount:K}=ms(A,S,()=>{S.update({allowMouseEnter:!1,stickIfOpen:!0})}),H=r.useRef("context-menu"!==_.type),Y=gn();r.useEffect(()=>{if(A||(B.current=null),"context-menu"===_.type)return A?void Y.start(500,()=>{H.current=!0}):(Y.clear(),void(H.current=!1))},[Y,A,_.type]),ml(A&&N&&D!==Oo&&"touch"!==U,C),Yt(()=>{A||M||S.set("hoverEnabled",!0)},[A,M,S]);const q=r.useRef(!0),G=gn(),X=Ft((e,t)=>{const n=t.reason;if(A===e&&t.trigger===T&&D===n)return;if(t.preventUnmountOnClose=()=>{S.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||(t.trigger=T??void 0),o?.(e,t),t.isCanceled)return;const r={open:e,nativeEvent:t.event,reason:t.reason,nested:F};$?.emit("openchange",r);const i=t.event;if(!1===e&&"click"===i?.type&&"touch"===i.pointerType&&!q.current)return;if(!e&&null!==L){const e=S.context.itemDomElements.current[L];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}e&&n===So?(q.current=!1,G.start(300,()=>{q.current=!0})):(q.current=!0,G.clear());const a=(n===Eo||n===Po)&&0===i.detail&&i?.isTrusted,s=!e&&(n===Ao||null==n),l={open:e,openChangeReason:n};B.current=t.event??null;const c=t.trigger?.id??null;(c||e)&&(l.activeTriggerId=c,l.activeTriggerElement=t.trigger??null),S.update(l),"menubar"!==_.type||n!==So&&n!==jo&&n!==Oo&&n!==To&&n!==Co?a||s?S.set("instantType",a?"click":"dismiss"):S.set("instantType",void 0):S.set("instantType","group")}),Z=r.useCallback(e=>{const t=No(e);return t.preventUnmountOnClose=()=>{S.set("preventUnmountingOnClose",!0)},t},[S]),J=r.useCallback(()=>{S.setOpen(!1,Z(Mo))},[S,Z]);let Q;r.useImperativeHandle(d,()=>({unmount:K,close:J}),[K,J]),"context-menu"===_.type&&(Q=_.context),r.useImperativeHandle(Q?.positionerRef,()=>C,[C]),r.useImperativeHandle(Q?.actionsRef,()=>({setOpen:X}),[X]);const ee=ws({popupStore:S,onOpenChange:X});$=ee.context.events,r.useEffect(()=>{const e=({open:e,eventDetails:t})=>X(e,t);return $.on("setOpen",e),()=>{$?.off("setOpen",e)}},[$,X]);const te=Ui(ee,{enabled:!I,bubbles:{escapeKey:f&&"menu"===_.type},outsidePress:()=>"context-menu"!==_.type||"contextmenu"===B.current?.type||H.current,externalTree:F?k:void 0}),ne=Vs(ee,{role:"menu"}),re=yc(),oe=r.useCallback(e=>{S.select("activeIndex")!==e&&S.set("activeIndex",e)},[S]),ie=Ls(ee,{enabled:!I,listRef:S.context.itemDomElements,activeIndex:L,nested:void 0!==_.type,loopFocus:c,orientation:u,parentOrientation:"menubar"===_.type?_.context.orientation:void 0,rtl:"rtl"===re,disabledIndices:R,onNavigate:oe,openOnArrowKeyDown:"context-menu"!==_.type,externalTree:F?k:void 0,focusItemOnHover:g}),ae=r.useCallback(e=>{S.context.typingRef.current=e},[S]),se=function(e,t){const n="rootStore"in e?e.rootStore:e,o=n.context.dataRef,i=n.useState("open"),{listRef:a,elementsRef:s,activeIndex:l,onMatch:c,onTypingChange:u,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=t,h=gn(),m=r.useRef(""),y=r.useRef(p??l??-1),v=r.useRef(null);Yt(()=>{(i||null===p)&&(h.clear(),v.current=null,""!==m.current&&(m.current=""))},[i,p,h]),Yt(()=>{i&&""===m.current&&(y.current=p??l??-1)},[i,p,l]);const g=Ft(e=>{e?o.current.typing||(o.current.typing=e,u?.(e)):o.current.typing&&(o.current.typing=e,u?.(e))}),b=Ft(e=>{function t(e){const t=s?.current[e];return!t||Nr(t)}function n(e,n,r=0){if(0===e.length)return-1;const o=(r%e.length+e.length)%e.length,i=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){const r=(o+n)%e.length,a=e[r];if(a?.toLocaleLowerCase().startsWith(i)&&t(r))return r}return-1}const r=a.current;if(m.current.length>0&&" "===e.key&&(Gn(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;i&&" "!==e.key&&(Gn(e),g(!0));const o=""===m.current;o&&(y.current=p??l??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&m.current===e.key&&(m.current="",y.current=v.current),m.current+=e.key,h.start(f,()=>{m.current="",y.current=v.current,g(!1)});const u=((o?p??l??-1:y.current)??0)+1,d=n(r,m.current,u);-1!==d?(c?.(d),v.current=d):" "!==e.key&&(m.current="",g(!1))}),x=Ft(e=>{const t=e.relatedTarget,r=n.select("domReferenceElement"),o=n.select("floatingElement"),i=Bn(r,t),a=Bn(o,t);i||a||(h.clear(),m.current="",y.current=v.current,g(!1))}),w=r.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]),E=r.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return r.useMemo(()=>d?{reference:w,floating:E}:{},[d,w,E])}(ee,{listRef:S.context.itemLabels,elementsRef:S.context.itemDomElements,activeIndex:L,resetMs:500,onMatch:e=>{A&&e!==L&&S.set("activeIndex",e)},onTypingChange:ae}),{getReferenceProps:le,getFloatingProps:ce,getItemProps:ue,getTriggerProps:de}=Ms([te,ne,ie,se]),fe=r.useMemo(()=>{const e=v(le(),{onMouseMove(){S.set("allowMouseEnter",!0)}},W);return delete e.role,e},[le,S,W]),pe=r.useMemo(()=>{const e=de();if(!e)return e;const t=v(e,W);return delete t.role,delete t["aria-controls"],t},[de,W]),he=r.useMemo(()=>ce({onMouseMove(){S.set("allowMouseEnter",!0),"menu"===_.type&&S.set("hoverEnabled",!1)},onClick(){S.select("hoverEnabled")&&S.set("hoverEnabled",!1)},onKeyDown(e){const t=S.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}}),[ce,_.type,S]),me=r.useMemo(()=>ue(),[ue]);S.useSyncedValues({floatingRootContext:ee,activeTriggerProps:fe,inactiveTriggerProps:pe,popupProps:he,itemProps:me});const ye=r.useMemo(()=>({store:S,parent:O}),[S,O]),ve=p.jsx(IZ.Provider,{value:ye,children:"function"==typeof t?t({payload:z}):t});return void 0===_.type||"context-menu"===_.type?p.jsx(Di,{externalTree:k,children:ve}):ve});function lJ(e){const{render:t,className:n,state:o=L,props:i=R,refs:a=R,metadata:s,stateAttributesMapping:l,tag:c="div",...u}=e,{compositeProps:d,compositeRef:f}=function(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:o}=Gt(),{ref:i,index:a}=FZ(e),s=n===a,l=r.useRef(null),c=A(i,l),u=r.useMemo(()=>({tabIndex:s?0:-1,onFocus(){o(a)},onMouseMove(){const e=l.current;if(!t||!e)return;const n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;s||n||e.focus()}}),[s,o,a,t]);return{compositeProps:u,compositeRef:c,index:a}}({metadata:s});return $(c,e,{state:o,ref:[...a,f],props:[d,...i,u],stateAttributesMapping:l})}function cJ(e){return wt(e)&&e.hasAttribute("data-rootownerid")?e.getAttribute("data-rootownerid")??void 0:Nt(e)?void 0:cJ(_t(e))}"production"!==process.env.NODE_ENV&&(sJ.displayName="MenuRoot");const uJ=os(function(e,t){const{render:n,className:i,disabled:a=!1,nativeButton:s=!0,id:l,openOnHover:c,delay:u=100,closeDelay:d=0,handle:f,payload:h,...m}=e,y=DZ(!0),v=f?.store??y?.store;if(!v)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 g=fn(l),b=v.useState("isTriggerActive",g),x=v.useState("floatingRootContext"),w=v.useState("isOpenedByTrigger",g),E=r.useRef(null),O=function(){const e=RZ(!0),t=DZ(!0),n=rJ(),o=r.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n]);return o}(),S=Gt(!0),P=Mi(),j=r.useMemo(()=>P??new ji,[P]),A=Ni(j),T=Ci(),{registerTrigger:C,isMountedByThisTrigger:M}=ps(g,E,v,{payload:h,closeDelay:d,parent:O,floatingTreeRoot:j,floatingNodeId:A,floatingParentNodeId:T,keyboardEventRelay:S?.relayKeyboardEvent}),N="menubar"===O.type,I=v.useState("disabled"),D=a||I||N&&O.context.disabled,{getButtonProps:_,buttonRef:R}=Xt({disabled:D,native:s});r.useEffect(()=>{w||void 0!==O.type||(v.context.allowMouseUpTriggerRef.current=!1)},[v,w,O.type]);const z=r.useRef(null),V=gn(),B=Ft(e=>{if(!z.current)return;V.clear(),v.context.allowMouseUpTriggerRef.current=!1;const t=e.target;if(Bn(z.current,t)||Bn(v.select("positionerElement"),t)||t===z.current)return;if(null!=t&&cJ(t)===v.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 o=parseFloat(n.width)||0,i=parseFloat(n.height)||0,a=parseFloat(r.width)||0,s=parseFloat(r.height)||0,l=Math.max(t.width,o,a),c=Math.max(t.height,i,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}}(z.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||j.events.emit("close",{domEvent:e,reason:"cancel-open"})});r.useEffect(()=>{if(w&&v.select("lastOpenChangeReason")===Oo){xn(z.current).addEventListener("mouseup",B,{once:!0})}},[w,B,v]);const F=N&&O.context.hasSubmenuOpen,U=Cs(x,{enabled:(c??F)&&!D&&"context-menu"!==O.type&&(!N||F&&!M),handleClose:Ks({blockPointerEvents:!N}),mouseOnly:!0,move:!1,restMs:void 0===O.type?u:void 0,delay:{close:d},triggerElementRef:E,externalTree:j,isActiveTrigger:b}),W=function(e,t){const n=gn(),[o,i]=r.useState(!1);return Yt(()=>{e&&"trigger-hover"===t?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),o}(w,v.select("lastOpenChangeReason")),K=function(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.context.dataRef,{enabled:i=!0,event:a="click",toggle:s=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:u=0,reason:d=Eo}=t,f=r.useRef(void 0),p=fo(),h=gn(),m=r.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current,r=e.nativeEvent,i=n.select("open");if(0!==e.button||"click"===a||Jn(t,!0)&&l)return;const m=o.current.openEvent,y=m?.type,v=n.select("domReferenceElement")!==e.currentTarget,g=i&&v||!(i&&s&&(!m||!c||"click"===y||"mousedown"===y));if(Wn(r.target)){const e=No(d,r,r.target);return void(g&&"touch"===t&&u>0?h.start(u,()=>{n.setOpen(!0,e)}):n.setOpen(g,e))}const b=e.currentTarget;p.request(()=>{const e=No(d,r,b);g&&"touch"===t&&u>0?h.start(u,()=>{n.setOpen(!0,e)}):n.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(Jn(t,!0)&&l)return;const r=n.select("open"),i=o.current.openEvent,p=n.select("domReferenceElement")!==e.currentTarget,m=r&&p||!(r&&s&&(!i||!c||Qn(i))),y=No(d,e.nativeEvent,e.currentTarget);m&&"touch"===t&&u>0?h.start(u,()=>{n.setOpen(!0,y)}):n.setOpen(m,y)},onKeyDown(){f.current=void 0}}),[o,a,l,n,c,s,p,h,u,d]);return r.useMemo(()=>i?{reference:m}:L,[i,m])}(x,{enabled:!D&&"context-menu"!==O.type,event:w&&N?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===O.type&&W}),H=Os(x,{enabled:!D&&F}),Y=function(e){const{enabled:t=!0,mouseDownAction:n,open:o}=e,i=r.useRef(!1);return r.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!o||"close"===n&&o)&&(i.current=!0,xn(e.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:L,[t,n,o])}({open:w,enabled:N,mouseDownAction:"open"}),q=Ms([K,H]),G={disabled:D,open:w},X=v.useState("triggerProps",M),Z=[z,t,R,C,E],J=[q.getReferenceProps(),U??L,X,{"aria-haspopup":"menu",id:g,onMouseDown:e=>{if(v.select("open"))return;V.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0});xn(e.currentTarget).addEventListener("mouseup",B,{once:!0})}},N?{role:"menuitem"}:{},Y,m,_],Q=r.useRef(null),ee=Ft(e=>{o.flushSync(()=>{v.setOpen(!1,No(jo,e.nativeEvent,e.currentTarget))});const t=ro(Q.current,-1);t?.focus()}),te=Ft(e=>{const t=v.select("positionerElement");if(t&&oo(e,t))v.context.beforeContentFocusGuardRef.current?.focus();else{o.flushSync(()=>{v.setOpen(!1,No(jo,e.nativeEvent,e.currentTarget))});let n=ro(v.context.triggerFocusTargetRef.current||E.current,1);for(;null!==n&&Bn(t,n);){const e=n;if(n=to(n),n===e)break}n?.focus()}}),ne=$("button",e,{enabled:!N,stateAttributesMapping:Yo,state:G,ref:Z,props:J});return N?p.jsx(lJ,{tag:"button",render:n,className:i,state:G,refs:Z,props:J,stateAttributesMapping:Yo}):w?p.jsxs(r.Fragment,{children:[p.jsx(ai,{ref:Q,onFocus:ee},`${g}-pre-focus-guard`),p.jsx(r.Fragment,{children:ne},g),p.jsx(ai,{ref:v.context.triggerFocusTargetRef,onFocus:te},`${g}-post-focus-guard`)]}):p.jsx(r.Fragment,{children:ne},g)});function dJ(e){var t=h(e,[]);return p.jsx(sJ,Object.assign({"data-slot":"dropdown-menu"},t))}function fJ(e){var t=h(e,[]);return p.jsx(uJ,Object.assign({"data-slot":"dropdown-menu-trigger"},t))}function pJ(e){var{align:t="start",alignOffset:n=0,side:r="bottom",sideOffset:o=4,className:i}=e,a=h(e,["align","alignOffset","side","sideOffset","className"]);return p.jsx(XZ,{children:p.jsx(tJ,{className:"isolate z-50 outline-none",align:t,alignOffset:n,side:r,sideOffset:o,children:p.jsx(qZ,Object.assign({"data-slot":"dropdown-menu-content",className:ht("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",i)},a))})})}function hJ(e){var t=h(e,[]);return p.jsx(UZ,Object.assign({"data-slot":"dropdown-menu-group"},t))}function mJ(e){var{className:t,inset:n}=e,r=h(e,["className","inset"]);return p.jsx(WZ,Object.assign({"data-slot":"dropdown-menu-label","data-inset":n,className:ht("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",t)},r))}function yJ(e){var{className:t,inset:n,variant:r="default"}=e,o=h(e,["className","inset","variant"]);return p.jsx(KZ,Object.assign({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:ht("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 vJ(e){var{className:t}=e,n=h(e,["className"]);return p.jsx(Ro,Object.assign({"data-slot":"dropdown-menu-separator",className:ht("-mx-1 my-1 h-px bg-border",t)},n))}function gJ(){const e=e=>{CZ.info(`${e} clicked`,{description:"This feature will be implemented soon."})};return p.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:[p.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 flex-1",children:[p.jsx(Lc,{}),p.jsxs("div",{className:"relative w-full max-w-md hidden md:block",children:[p.jsx(Vl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),p.jsx(_o,{placeholder:"Search dashboard...",className:"pl-10 bg-muted/50 border-none focus-visible:ring-1 focus-visible:ring-primary/20"})]}),p.jsx(en,{variant:"ghost",size:"icon",className:"md:hidden",children:p.jsx(Vl,{className:"w-5 h-5"})})]}),p.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[p.jsx("div",{className:"hidden xs:block",children:p.jsx(kZ,{})}),p.jsxs(en,{variant:"ghost",size:"icon",className:"relative",children:[p.jsx(Tl,{className:"w-5 h-5"}),p.jsx("span",{className:"absolute top-2 right-2 w-2 h-2 bg-primary rounded-full border-2 border-background"})]}),p.jsxs(dJ,{children:[p.jsx(fJ,{render:p.jsx(en,{variant:"ghost",size:"icon",className:"rounded-full"}),children:p.jsx(Wl,{className:"w-5 h-5"})}),p.jsx(pJ,{align:"end",className:"w-56",children:p.jsxs(hJ,{children:[p.jsx(mJ,{children:"My Account"}),p.jsx(vJ,{}),p.jsxs(yJ,{onClick:()=>e("Profile"),children:[p.jsx(Wl,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Profile"})]}),p.jsxs(yJ,{onClick:()=>e("Billing"),children:[p.jsx(Nl,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Billing"})]}),p.jsxs(yJ,{onClick:()=>e("Team"),children:[p.jsx(Kl,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Team"})]}),p.jsxs(yJ,{onClick:()=>e("Subscription"),children:[p.jsx(Yl,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Subscription"})]}),p.jsx(vJ,{}),p.jsxs(yJ,{variant:"destructive",onClick:()=>e("Log out"),children:[p.jsx(_l,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Log out"})]})]})})]})]})]})}"production"!==process.env.NODE_ENV&&(uJ.displayName="MenuTrigger"),exports.AppSidebar=Rg,exports.ChartCard=function({title:e,description:t,data:n,dataKey:r,categoryKey:o,color:i="var(--primary)",className:a,loading:s,type:l="area"}){return s?p.jsxs(Lg,{className:ht("col-span-full lg:col-span-2",a),children:[p.jsxs(zg,{children:[p.jsx(tc,{className:"h-6 w-40 mb-2"}),p.jsx(tc,{className:"h-4 w-64"})]}),p.jsx(Fg,{className:"h-75 w-full pt-4",children:p.jsx(tc,{className:"h-full w-full rounded-lg"})})]}):p.jsxs(Lg,{className:ht("bmj-card-hover col-span-full lg:col-span-2",a),children:[p.jsxs(zg,{children:[p.jsx(Vg,{className:"text-lg font-semibold",children:e}),t&&p.jsx(Bg,{children:t})]}),p.jsx(Fg,{className:"h-75 w-full pt-4",children:p.jsx(bj,{width:"100%",height:"100%",children:(()=>{const t={data:n,margin:{top:10,right:10,left:-20,bottom:0}},a={xAxis:p.jsx(LG,{dataKey:o,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},dy:10,type:"scatter"===l?"number":"category"}),yAxis:p.jsx(XG,{dataKey:"scatter"===l?r:void 0,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},type:"number"}),grid:p.jsx(_H,{strokeDasharray:"3 3",vertical:!1,stroke:"var(--border)",opacity:.5}),tooltip:p.jsx(S$,{cursor:"scatter"===l?{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(l){case"bar":return p.jsxs(xZ,Object.assign({},t,{children:[a.grid,a.xAxis,a.yAxis,a.tooltip,p.jsx(qq,{dataKey:r,fill:i,radius:[4,4,0,0],barSize:32})]}));case"line":return p.jsxs(gZ,Object.assign({},t,{children:[a.grid,a.xAxis,a.yAxis,a.tooltip,p.jsx(SY,{type:"monotone",dataKey:r,stroke:i,strokeWidth:2,dot:{r:4,fill:i,strokeWidth:2,stroke:"var(--card)"},activeDot:{r:6,strokeWidth:0}})]}));case"scatter":return p.jsxs(EZ,Object.assign({},t,{children:[a.grid,a.xAxis,a.yAxis,a.tooltip,p.jsx(bG,{name:e,data:n,fill:i,shape:"circle"})]}));default:return p.jsxs(SZ,Object.assign({},t,{children:[p.jsx("defs",{children:p.jsxs("linearGradient",{id:`colorValue-${e.replace(/\s+/g,"-")}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:i,stopOpacity:.1}),p.jsx("stop",{offset:"95%",stopColor:i,stopOpacity:0})]})}),a.grid,a.xAxis,a.yAxis,a.tooltip,p.jsx(iq,{type:"monotone",dataKey:r,stroke:i,strokeWidth:2,fillOpacity:1,fill:`url(#colorValue-${e.replace(/\s+/g,"-")})`})]}))}})()})})]})},exports.DashboardLayout=function({children:e,sidebarItems:t,onSidebarItemClick:n,activeSidebarItem:r}){return p.jsxs(_c,{children:[p.jsx(Rg,{items:t,onItemClick:n,activeItem:r}),p.jsxs(zc,{className:"flex flex-col",children:[p.jsx(gJ,{}),p.jsx("main",{className:"flex-1 p-6 overflow-y-auto",children:e})]})]})},exports.StatCard=function({title:e,value:t,description:n,trend:r,icon:o,className:i,loading:a}){return a?p.jsxs(Lg,{className:ht("overflow-hidden",i),children:[p.jsxs(zg,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(tc,{className:"h-4 w-24"}),p.jsx(tc,{className:"h-4 w-4 rounded-full"})]}),p.jsxs(Fg,{className:"space-y-2",children:[p.jsx(tc,{className:"h-8 w-32"}),p.jsx(tc,{className:"h-3 w-40"})]})]}):p.jsx(Dg.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},children:p.jsxs(Lg,{className:ht("bmj-card-hover overflow-hidden",i),children:[p.jsxs(zg,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(Vg,{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:e}),o&&p.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(Fg,{children:[p.jsx("div",{className:"text-2xl font-bold tracking-tight",children:t}),(n||r)&&p.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r&&p.jsxs("span",{className:ht("flex items-center text-xs font-medium",r.isPositive?"text-emerald-500":"text-rose-500"),children:[r.isPositive?p.jsx(Ul,{className:"w-3 h-3 mr-1"}):p.jsx($l,{className:"w-3 h-3 mr-1"}),r.value,"%"]}),n&&p.jsx("p",{className:"text-xs text-muted-foreground",children:n})]})]})]})})},exports.Topbar=gJ;
2
76
  //# sourceMappingURL=index.js.map